[omniORB] Linux GCC 2.95 issue with omniorb 2.8.0pre1

Brent Fulgham bfulgham@xpsystems.com
Mon, 23 Aug 1999 12:54:44 -0700


When compiling omniorb 2.8.0pre1, I found that convertior and genior would
not compile
properly because of a change in the way getopt is handled on Linux with the
forthcoming GLIBC 2.1.2.  In a non-SysV compatible move, getopt must now be
included
as its own header.  Attached is a small patch I used, which should probably
be
refined to prevent GLIBC 2.1.1 and earlier from triggering it:

--- omniorb-2.8.0pre1.orig/src/appl/utils/catior/catior.cc
+++ omniorb-2.8.0pre1/src/appl/utils/catior/catior.cc
@@ -27,6 +27,12 @@
 #include <iostream.h>
 #include <stdlib.h>
 
+// Note:  Added for Linux GLIBC 2.1.2pre10
+#ifdef __linux__
+#include <getopt.h>
+#endif
+// End additions
+
 #include <omniORB2/CORBA.h>
 
 #ifndef Swap16
--- omniorb-2.8.0pre1.orig/src/appl/utils/convertior/convertior.cc
+++ omniorb-2.8.0pre1/src/appl/utils/convertior/convertior.cc
@@ -27,6 +27,12 @@
 #include <iostream.h>
 #include <stdlib.h>
 
+// Note:  Added for Linux GLIBC 2.2.1pre10
+#ifdef __linux__
+#include <getopt.h>
+#endif
+// End additions
+
 #include <omniORB2/CORBA.h>
 
 #ifndef Swap16