projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
95a0f8e
)
Avoid compile problem in eclipse
author
Dennis Schafroth
<dennis@indexdata.com>
Fri, 30 Jul 2010 15:16:39 +0000
(17:16 +0200)
committer
Dennis Schafroth
<dennis@indexdata.com>
Fri, 30 Jul 2010 15:16:39 +0000
(17:16 +0200)
src/sc_test.c
patch
|
blob
|
history
diff --git
a/src/sc_test.c
b/src/sc_test.c
index
289e50c
..
e06a6ba
100644
(file)
--- a/
src/sc_test.c
+++ b/
src/sc_test.c
@@
-15,11
+15,14
@@
#endif
#include <stdio.h>
#endif
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <yaz/xmalloc.h>
#include <yaz/log.h>
#include <yaz/sc.h>
#include <string.h>
#include <yaz/xmalloc.h>
#include <yaz/log.h>
#include <yaz/sc.h>
+#ifdef WIN32
+
/** \brief handle that is used to stop that service should be stopped */
HANDLE default_stop_event = NULL;
/** \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;
}
return 0;
}
+#endif
+
/** \brief the system main function */
int main(int argc, char **argv)
{
/** \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);
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);
}
/*
exit(0);
}
/*