]> rtime.felk.cvut.cz Git - orte.git/commitdiff
Fix reported problem "compile error on cygwin"
authorPavel Pisa <pisa@cmp.felk.cvut.cz>
Thu, 14 Nov 2013 13:02:50 +0000 (14:02 +0100)
committerPavel Pisa <pisa@cmp.felk.cvut.cz>
Thu, 14 Nov 2013 13:02:50 +0000 (14:02 +0100)
The Windows service support in ORTE manager is enabled
now for Cygwin build as well. Build under MINGW has been
tested but some external volunteer is required for Cygwin
environment test.

Another option is to add config option which allows
to specify if Windows service support should or should not
be build.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
orte/manager/ortemanager.c

index 16dde7403c8e29e48266d89d0700dc0026b6945b..c6c29a34a79ec27d7c505867ae91472749dca533 100644 (file)
@@ -74,7 +74,7 @@ onMgrAppDelete(const struct ORTEAppInfo *appInfo, void *param) {
          appInfo->hostId,appInfo->appId);
 }
 
-#ifdef _WIN32
+#if defined(_WIN32) || defined(__CYGWIN__)
 //Windows service support
 void serviceDispatchTable(void);  //forward declaration
 void removeService(void);         //forward declaration
@@ -152,7 +152,7 @@ static void usage(void) {
   printf("  -e, --events                  register event system\n");
   printf("  -l, --logfile <filename>      set log file name\n");
   printf("  -V, --version                 show version\n");
-#ifdef _WIN32
+#if defined(_WIN32) || defined(__CYGWIN__)
   printf("  -i, --install_service         install service into service manager on Windows\n");
   printf("  -r, --remove_service          remove service from service manager on Windows\n");
 #endif
@@ -243,7 +243,7 @@ int main(int argc,char *argv[]) {
       case 'D':
         orteDaemon=ORTE_TRUE;
         break;
-      #ifdef _WIN32
+      #if defined(_WIN32) || defined(__CYGWIN__)
       case 's':
         serviceDispatchTable();
         exit(0);