[omniORB] Yet another Cygwin build patch

Vladimir Panov gbr at voidland.org
Sun Jan 29 01:28:23 GMT 2006


Hi.

Under Cygwin, configure defines (either in a header or on the 
command-line) the following macro: __linux__. This breaks the build 
under a current Cygwin installation. I have attached a very simple patch 
against omniORB 4.0.7 which fixes the problem.

Note that this patch by itself is not enough to build omniORB under 
Cygwin. Look also here:
http://www.omniorb-support.com/pipermail/omniorb-list/2005-January/026285.html
and here:
http://cygwin.com/ml/cygwin/2006-01/msg01397.html

Vlado

-------------- next part --------------
diff -r -u -N omniORB-4.0.7-orig/configure omniORB-4.0.7/configure
--- omniORB-4.0.7-orig/configure	2006-01-09 18:01:26.000000000 +0200
+++ omniORB-4.0.7/configure	2006-01-29 00:29:47.000000000 +0200
@@ -11857,7 +11857,7 @@
 
 case "$host" in
   *-*-linux-*)   plat_name="Linux";    plat_def="__linux__";    os_v="2";;
-  *-*-cygwin*)   plat_name="Cygwin";   plat_def="__linux__";    os_v="2";;
+  *-*-cygwin*)   plat_name="Cygwin";   plat_def="__cygwin__";   os_v="1";;
   *-*-solaris*)  plat_name="SunOS";    plat_def="__sunos__";    os_v="5";;
   *-*-osf3*)     plat_name="OSF1";     plat_def="__osf1__";     os_v="3";;
   *-*-osf4*)     plat_name="OSF1";     plat_def="__osf1__";     os_v="4";;
diff -r -u -N omniORB-4.0.7-orig/configure.ac omniORB-4.0.7/configure.ac
--- omniORB-4.0.7-orig/configure.ac	2006-01-09 18:01:26.000000000 +0200
+++ omniORB-4.0.7/configure.ac	2006-01-29 00:29:12.000000000 +0200
@@ -153,7 +153,7 @@
 
 case "$host" in
   *-*-linux-*)   plat_name="Linux";    plat_def="__linux__";    os_v="2";;
-  *-*-cygwin*)   plat_name="Cygwin";   plat_def="__linux__";    os_v="2";;
+  *-*-cygwin*)   plat_name="Cygwin";   plat_def="__cygwin__";   os_v="1";;
   *-*-solaris*)  plat_name="SunOS";    plat_def="__sunos__";    os_v="5";;
   *-*-osf3*)     plat_name="OSF1";     plat_def="__osf1__";     os_v="3";;
   *-*-osf4*)     plat_name="OSF1";     plat_def="__osf1__";     os_v="4";;
diff -r -u -N omniORB-4.0.7-orig/include/omnithread.h omniORB-4.0.7/include/omnithread.h
--- omniORB-4.0.7-orig/include/omnithread.h	2005-01-24 20:21:02.000000000 +0200
+++ omniORB-4.0.7/include/omnithread.h	2006-01-29 00:26:41.000000000 +0200
@@ -171,6 +171,9 @@
 #include <omnithread/posix.h>
 #include <sched.h>
 
+#elif defined(__cygwin__)
+#include <omnithread/posix.h>
+
 #else
 #error "No implementation header file"
 #endif
diff -r -u -N omniORB-4.0.7-orig/mk/beforeauto.mk.in omniORB-4.0.7/mk/beforeauto.mk.in
--- omniORB-4.0.7-orig/mk/beforeauto.mk.in	2005-03-22 15:53:41.000000000 +0200
+++ omniORB-4.0.7/mk/beforeauto.mk.in	2006-01-29 00:26:02.000000000 +0200
@@ -1031,7 +1031,7 @@
 ###################
 ifdef Cygwin
 CXXLINKOPTIONS += -Wl,--enable-auto-import
-IMPORT_CPPFLAGS += -D__linux__ -D__cygwin__
+IMPORT_CPPFLAGS += -D__cygwin__
 SHAREDLIB_CPPFLAGS =
 OMNITHREAD_POSIX_CPPFLAGS = -DNoNanoSleep -DPthreadDraftVersion=10
 OMNITHREAD_CPPFLAGS = -D_REENTRANT


More information about the omniORB-list mailing list