[omniORB] omniORB_280pre2 patch for AIX

Craig Rodrigues rodrigc@mediaone.net
Tue, 14 Sep 1999 23:46:03 -0400


--k1lZvvs/B4yU6o8G
Content-Type: text/plain; charset=us-ascii

Sai,

Can you accept this patch?
Without it, omniORB 2.8.0 will not build with version 3.6.6
of the IBM xlC compiler.

Thanks.
-- 
Craig Rodrigues        
http://www.gis.net/~craigr    
rodrigc@mediaone.net          

--k1lZvvs/B4yU6o8G
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="omniorb_280pre2_xlC3.6.6.patch"

diff -r -c omniORB_280pre2/include/omniORB2/CORBA_sysdep.h patched/omniORB_280pre2/include/omniORB2/CORBA_sysdep.h
*** omniORB_280pre2/include/omniORB2/CORBA_sysdep.h	Mon Aug 30 14:43:34 1999
--- patched/omniORB_280pre2/include/omniORB2/CORBA_sysdep.h	Sat Sep 11 20:12:19 1999
***************
*** 250,256 ****
  #     define SIZEOF_PTR 8
  #endif
  
! #elif defined(__xlC__) && (__xlC__ <= 0x0301)
  
  #undef HAS_Cplusplus_const_cast
  
--- 250,256 ----
  #     define SIZEOF_PTR 8
  #endif
  
! #elif defined(__xlC__) && (__xlC__ <= 0x0306)
  
  #undef HAS_Cplusplus_const_cast
  
diff -r -c omniORB_280pre2/mk/platforms/powerpc_aix_4.2.mk patched/omniORB_280pre2/mk/platforms/powerpc_aix_4.2.mk
*** omniORB_280pre2/mk/platforms/powerpc_aix_4.2.mk	Sat Jun 26 12:43:53 1999
--- patched/omniORB_280pre2/mk/platforms/powerpc_aix_4.2.mk	Sat Sep 11 20:12:19 1999
***************
*** 6,11 ****
--- 6,14 ----
  AIX = 1
  PowerPCProcessor = 1
  
+ AIX_MAJOR_VERS := $(shell uname -v)
+ AIX_MINOR_VERS := $(shell uname -r)
+ 
  #
  # Include general unix things
  #
***************
*** 47,53 ****
--- 50,66 ----
  CC               = xlC_r
  CLINK           = xlC_r
  
+ # Get the compiler version
+ XLCVERSION := $(shell echo "__xlC__" > /tmp/testAIXCompilerVersion.C )
+ XLCVERSION := $(shell $(CXX) -+ -E /tmp/testAIXCompilerVersion.C | tail -1')
  
+ MAKECPPSHAREDLIB= /usr/ibmcxx/bin/makeC++SharedLib_r
+ 
+ ifeq ($(XLCVERSION),0x0301)
+     MAKECPPSHAREDLIB = /usr/lpp/xlC/bin/makeC++SharedLib_r
+ endif
+ 
+ 
  # Name all static libraries with -ar.a suffix.
  LibPattern = lib%-ar.a
  LibSuffixPattern = %-ar.a
***************
*** 70,84 ****
  #
  # Notice that the version number 2.7 is hardwired in OMNIORB2_LIB.
  #
! OMNIORB2_LIB = $(patsubst %,$(LibSharedSearchPattern),omniORB27) \
!                $(patsubst %,$(LibSharedSearchPattern),omniDynamic27) \
                 $(OMNITHREAD_LIB) $(SOCKET_LIB)
! lib_depend := $(patsubst %,$(LibSharedPattern),omniORB27) \
!               $(patsubst %,$(LibSharedPattern),omniDynamic27)
  OMNIORB2_LIB_DEPEND1 := $(GENERATE_LIB_DEPEND)
  OMNIORB2_LIB_DEPEND = $(OMNIORB2_LIB_DEPEND1) $(OMNITHREAD_LIB_DEPEND)
  
! OMNIORB2_LC_LIB = $(patsubst %,$(LibSharedSearchPattern),omniLC2)
  
  CorbaImplementation = OMNIORB2
  
--- 83,97 ----
  #
  # Notice that the version number 2.7 is hardwired in OMNIORB2_LIB.
  #
! OMNIORB2_LIB = $(patsubst %,$(LibSharedSearchPattern),omniORB28) \
!                $(patsubst %,$(LibSharedSearchPattern),omniDynamic28) \
                 $(OMNITHREAD_LIB) $(SOCKET_LIB)
! lib_depend := $(patsubst %,$(LibSharedPattern),omniORB28) \
!               $(patsubst %,$(LibSharedPattern),omniDynamic28)
  OMNIORB2_LIB_DEPEND1 := $(GENERATE_LIB_DEPEND)
  OMNIORB2_LIB_DEPEND = $(OMNIORB2_LIB_DEPEND1) $(OMNITHREAD_LIB_DEPEND)
  
! OMNIORB2_LC_LIB = $(patsubst %,$(LibSharedSearchPattern),omniLC3)
  
  CorbaImplementation = OMNIORB2
  
diff -r -c omniORB_280pre2/src/lib/omniORB2/dynamic/sharedlib/dir.mk patched/omniORB_280pre2/src/lib/omniORB2/dynamic/sharedlib/dir.mk
*** omniORB_280pre2/src/lib/omniORB2/dynamic/sharedlib/dir.mk	Sat Aug 14 09:21:26 1999
--- patched/omniORB_280pre2/src/lib/omniORB2/dynamic/sharedlib/dir.mk	Sat Sep 11 20:12:19 1999
***************
*** 333,339 ****
  $(dynlib): $(DYN2_OBJS)
  	(set -x; \
          $(RM) $@; \
!         /usr/lpp/xlC/bin/makeC++SharedLib_r \
               -o $(dynsoname) $(IMPORT_LIBRARY_FLAGS) \
           $(filter-out $(LibSuffixPattern),$^) $(OMNITHREAD_LIB) \
           -L../../orbcore/sharedlib -l$(libcorename) -p 40; \
--- 333,339 ----
  $(dynlib): $(DYN2_OBJS)
  	(set -x; \
          $(RM) $@; \
!         $(MAKECPPSHAREDLIB) \
               -o $(dynsoname) $(IMPORT_LIBRARY_FLAGS) \
           $(filter-out $(LibSuffixPattern),$^) $(OMNITHREAD_LIB) \
           -L../../orbcore/sharedlib -l$(libcorename) -p 40; \
diff -r -c omniORB_280pre2/src/lib/omniORB2/lifecycle/sharedlib/dir.mk patched/omniORB_280pre2/src/lib/omniORB2/lifecycle/sharedlib/dir.mk
*** omniORB_280pre2/src/lib/omniORB2/lifecycle/sharedlib/dir.mk	Sat Aug 14 09:21:55 1999
--- patched/omniORB_280pre2/src/lib/omniORB2/lifecycle/sharedlib/dir.mk	Sat Sep 11 20:47:15 1999
***************
*** 348,354 ****
  $(lclib): $(LC_OBJS)
  	(set -x; \
          $(RM) $@; \
!         /usr/lpp/xlC/bin/makeC++SharedLib_r \
               -o $(lcsoname) $(IMPORT_LIBRARY_FLAGS) \
           $(filter-out $(LibSuffixPattern),$^) $(OMNITHREAD_LIB) \
           -L../../orbcore/sharedlib -l$(libcorename) \
--- 348,354 ----
  $(lclib): $(LC_OBJS)
  	(set -x; \
          $(RM) $@; \
!         $(MAKECPPSHAREDLIB) \
               -o $(lcsoname) $(IMPORT_LIBRARY_FLAGS) \
           $(filter-out $(LibSuffixPattern),$^) $(OMNITHREAD_LIB) \
           -L../../orbcore/sharedlib -l$(libcorename) \
diff -r -c omniORB_280pre2/src/lib/omniORB2/orbcore/gatekeepers/alone/gatekeeper.cc patched/omniORB_280pre2/src/lib/omniORB2/orbcore/gatekeepers/alone/gatekeeper.cc
*** omniORB_280pre2/src/lib/omniORB2/orbcore/gatekeepers/alone/gatekeeper.cc	Wed Sep  1 08:44:58 1999
--- patched/omniORB_280pre2/src/lib/omniORB2/orbcore/gatekeepers/alone/gatekeeper.cc	Wed Sep 15 00:21:48 1999
***************
*** 105,111 ****
  	static char gServerDotted[256] = "" ;
  
  	struct sockaddr_in clientAddr ;
! 	int clientAddrSize = sizeof(clientAddr) ;
  	char clientDotted[256] = "" ;
  	char clientName[256] = "" ;
  
--- 105,116 ----
  	static char gServerDotted[256] = "" ;
  
  	struct sockaddr_in clientAddr ;
!         #if defined(__aix__)
!         size_t  
!         #else
! 	socklen_t 
!         #endif   /* solves problem with getpeername() */
!              clientAddrSize = sizeof(clientAddr) ;
  	char clientDotted[256] = "" ;
  	char clientName[256] = "" ;
  
diff -r -c omniORB_280pre2/src/lib/omniORB2/orbcore/sharedlib/dir.mk patched/omniORB_280pre2/src/lib/omniORB2/orbcore/sharedlib/dir.mk
*** omniORB_280pre2/src/lib/omniORB2/orbcore/sharedlib/dir.mk	Sat Aug 14 09:22:16 1999
--- patched/omniORB_280pre2/src/lib/omniORB2/orbcore/sharedlib/dir.mk	Sat Sep 11 20:12:20 1999
***************
*** 315,321 ****
  $(lib): $(ORB2_OBJS)
  	(set -x; \
          $(RM) $@; \
!         /usr/lpp/xlC/bin/makeC++SharedLib_r \
               -o $(soname) $(IMPORT_LIBRARY_FLAGS) \
           $(filter-out $(LibSuffixPattern),$^) $(OMNITHREAD_LIB) \
           -p 40; \
--- 315,321 ----
  $(lib): $(ORB2_OBJS)
  	(set -x; \
          $(RM) $@; \
!         $(MAKECPPSHAREDLIB) \
               -o $(soname) $(IMPORT_LIBRARY_FLAGS) \
           $(filter-out $(LibSuffixPattern),$^) $(OMNITHREAD_LIB) \
           -p 40; \
diff -r -c omniORB_280pre2/src/lib/omnithread/sharedlib/dir.mk patched/omniORB_280pre2/src/lib/omnithread/sharedlib/dir.mk
*** omniORB_280pre2/src/lib/omnithread/sharedlib/dir.mk	Sat Aug 14 09:20:42 1999
--- patched/omniORB_280pre2/src/lib/omnithread/sharedlib/dir.mk	Sat Sep 11 20:12:20 1999
***************
*** 240,246 ****
  $(lib): $(OBJS)
  	(set -x; \
          $(RM) $@; \
!         /usr/lpp/xlC/bin/makeC++SharedLib_r \
               -o $(soname) $(IMPORT_LIBRARY_FLAGS) \
           $(filter-out $(LibSuffixPattern),$^) \
           -p 40; \
--- 240,246 ----
  $(lib): $(OBJS)
  	(set -x; \
          $(RM) $@; \
!         $(MAKECPPSHAREDLIB) \
               -o $(soname) $(IMPORT_LIBRARY_FLAGS) \
           $(filter-out $(LibSuffixPattern),$^) \
           -p 40; \

--k1lZvvs/B4yU6o8G--