X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fsc_test.c;h=e88ddca87d3964e285007de2cc388120ea90bcec;hp=289e50ca510d98c2098c2793b123f187698a6a36;hb=5c1eb188e9cf6f0dd2e435a1f81938f258515edb;hpb=88d3bedf772316f87e1996f655ccf8d1e2589755 diff --git a/src/sc_test.c b/src/sc_test.c index 289e50c..e88ddca 100644 --- a/src/sc_test.c +++ b/src/sc_test.c @@ -1,12 +1,14 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2010 Index Data + * Copyright (C) Index Data * See the file LICENSE for details. */ - /** * \file sc_test.c * \brief Small test for the Windows Service Control utility */ +#if HAVE_CONFIG_H +#include +#endif #ifdef WIN32 #include @@ -15,11 +17,14 @@ #endif #include +#include #include #include #include #include +#ifdef WIN32 + /** \brief handle that is used to stop that service should be stopped */ HANDLE default_stop_event = NULL; @@ -51,14 +56,20 @@ static int default_sc_main(yaz_sc_t s, int argc, char **argv) return 0; } +#endif + /** \brief the system main function */ int main(int argc, char **argv) { +#ifdef WIN32 yaz_sc_t s = yaz_sc_create("yaz_sc_test", "YAZ Service Control Test"); yaz_sc_program(s, argc, argv, default_sc_main, default_sc_stop); yaz_sc_destroy(&s); +#else + printf("Only on Windows\n"); +#endif exit(0); } /*