[omniORB] Patches fo FreeBSD

Sandro Tolaini tolaini@libero.it
21 Mar 2002 16:36:45 +0100


--=-QIIfg14gNoqLMXbLSuQd
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi everybody omniORB users (expecially working on FreeBSD :))

I'm sending a small patch for the omniORB source tree that fixes the
following:

* FreeBSD platform suffers of the same shutdown() behaviour noted in
HP-UX (ie. shutdown() does not interrupt an already pending recv()).

* If using -W -Wunused to compile a project that includes omnithread.h,
a warning about an unused parameter in omni_thread::run() and
omni_thread::run_undetached() shows up.

* Under FreeBSD, the default compiler is named gcc/g++ and not
gcc295/g++295, as stated in x86_freebsd_40.mk.

We are using (and stressing) omniORB under FreeBSD 4.4 and, recently,
under FreeBSD 4.5. I tested the patch on these platforms.

Duncan, could you please merge the patch in the CVS tree for omniORB
3.0.4 (and, if applicable, for omniORB 4.0)?

Thanks,
  Sandro Tolaini.


--=-QIIfg14gNoqLMXbLSuQd
Content-Disposition: attachment; filename=freebsd.diff
Content-Transfer-Encoding: quoted-printable
Content-Type: text/x-patch; charset=ISO-8859-1

diff -ru omni.t/omni/include/omnithread.h omni/include/omnithread.h
--- omni.t/omni/include/omnithread.h	Thu Mar 21 16:02:46 2002
+++ omni/include/omnithread.h	Thu Mar 21 16:17:20 2002
@@ -475,8 +475,8 @@
=20
 private:
=20
-    virtual void run(void* arg) {}
-    virtual void* run_undetached(void* arg) { return NULL; }
+    virtual void run(void* /* arg */) {}
+    virtual void* run_undetached(void* /* arg */) { return NULL; }
 	// can be overridden in a derived class.  When constructed using the
 	// the constructor omni_thread(void*, priority_t), these functions are
 	// called by start() and start_undetached() respectively.
diff -ru omni.t/omni/mk/platforms/x86_freebsd_4.0.mk omni/mk/platforms/x86_=
freebsd_4.0.mk
--- omni.t/omni/mk/platforms/x86_freebsd_4.0.mk	Wed Aug  9 18:07:28 2000
+++ omni/mk/platforms/x86_freebsd_4.0.mk	Thu Mar 21 13:12:29 2002
@@ -10,7 +10,7 @@
 #
 # You must set a path to a Python 1.5.2 interpreter.
=20
-#PYTHON =3D /usr/local/bin/python
+PYTHON =3D /usr/local/bin/python
=20
=20
 #
@@ -28,7 +28,7 @@
=20
 CPP =3D /usr/libexec/cpp
=20
-CXX =3D g++295
+CXX =3D g++
 CXXMAKEDEPEND +=3D -D__cplusplus -D__GNUG__ -D__GNUC__
 CXXDEBUGFLAGS =3D -O2
=20
@@ -39,7 +39,7 @@
 EgcsMajorVersion =3D 1
 EgcsMinorVersion =3D 1        # This is actually a post-1.0 egcs snapshot.
=20
-CC           =3D gcc295
+CC           =3D gcc
 CMAKEDEPEND  +=3D -D__GNUC__
 CDEBUGFLAGS  =3D -O2
=20
diff -ru omni.t/omni/src/lib/omniORB2/orbcore/tcpSocketMTfactory.cc omni/sr=
c/lib/omniORB2/orbcore/tcpSocketMTfactory.cc
--- omni.t/omni/src/lib/omniORB2/orbcore/tcpSocketMTfactory.cc	Thu Mar 21 1=
6:02:49 2002
+++ omni/src/lib/omniORB2/orbcore/tcpSocketMTfactory.cc	Thu Mar 21 13:10:41=
 2002
@@ -307,6 +307,11 @@
 #  endif
 #endif
=20
+#if defined(__freebsd__)
+#  include <poll.h>
+#  define USE_POLL_ON_RECV
+#endif
+
 #if !defined(__VMS)
 #include <fcntl.h>
 #define USE_NONBLOCKING_CONNECT

--=-QIIfg14gNoqLMXbLSuQd--