X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fsc_test.c;h=e06a6ba00fbe207df857132220cf78a7de44ee0f;hb=31c5e5fa92f5980deac3c042b765e4148329cd1b;hp=42be11ad6c153412bf4699f71a609fca1e2aefd3;hpb=379504a233e3e2cc85bca1e7b6d864f1395aec7c;p=yaz-moved-to-github.git diff --git a/src/sc_test.c b/src/sc_test.c index 42be11a..e06a6ba 100644 --- a/src/sc_test.c +++ b/src/sc_test.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2009 Index Data + * Copyright (C) 1995-2010 Index Data * See the file LICENSE for details. */ @@ -15,11 +15,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 +54,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); } /*