[omniORB] problems with omniORB3 under IRIX 6.5, MIPSpro C++ 7.2.1
James Riden
jamesr@harlequin.co.uk
Wed, 27 Oct 1999 16:08:28 +0100
--=====================_941033308==_
Content-Type: text/plain; charset="us-ascii"
Dear omniORBers,
I'm experiencing a problem with the MIPSpro 7.2.1 compiler on
IRIX 6.5 It seems to need fully (or more fully) qualified
names when invoking superclass constructors in an initializer
list.
For instance, the following piece of code from include/omniORB3/
userexception.h :
>#define OMNIORB_DECLARE_USER_EXCEPTION(name, attr) \
> \
>class name : public CORBA::UserException { \
>public: \
> inline name() { \
> pd_insertToAnyFn = insertToAnyFn; \
> pd_insertToAnyFnNCP = insertToAnyFnNCP; \
> } \
> inline name(const name& _ex) : CORBA::UserException(_ex) {} \
^^^^^^^
IRIX compiler needs this to be added
> inline name& operator=(const name& _ex) { \
> * (CORBA::UserException*) this = _ex; return *this; \
(As David Riddoch has pointed out, this would break MSVC builds
so I've wrapped it up in a macro.)
I've patched the attached files, so that the omniORB3 libraries
and examples now compile and run OK on IRIX 6.5, with MIPSpro
C++ 7.2.1 and on WinNT 4.0 with MSVC 5. (There's still a
problem with the nameserver on IRIX but I'll get round to that
soon).
Even if you don't need the hack shown above, the platform
makefile mips_irix_6.4_6.5_common.mk still refers to
libomniDynamic2 instead of 3 which needs to be changed.
The patch should leave the behaviour of all other platforms
unchanged, but I'm not entirely sure - especially about using
a macro within a macro in userexception.h .
Questions :
Has anyone else tried omniORB 3 on IRIX, especially with the
7.3 compiler ?
Unfortunately I don't have a copy of the standard, so can anyone tell
me whether the IRIX compiler is non-conforming, please ?
thanks,
James
--=====================_941033308==_
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: attachment; filename="omniORB3.txt"
*** omniORB_3_orig/omni/include/omniORB3/CORBA_sysdep.h Wed Oct 20 18:19:52 1999
--- omniORB_3/omni/include/omniORB3/CORBA_sysdep.h Wed Oct 20 19:10:26 1999
***************
*** 144,149 ****
--- 144,150 ----
#ifndef __CORBA_SYSDEP_H__
#define __CORBA_SYSDEP_H__
+ #define SUPER_CLASS_CTOR(a,b) b
#define HAS_Cplusplus_const_cast
// Unset this define if the compiler does not support const_cast<T*>
***************
*** 251,256 ****
--- 252,263 ----
#if _COMPILER_VERSION >= 721
#define HAS_Cplusplus_Namespace
+ #define HAS_Cplusplus_Bool
+ #if _COMPILER_VERSION < 730
+ // we hope version 7.3 will get this right.
+ #undef SUPER_CLASS_CTOR
+ #define SUPER_CLASS_CTOR(a,b) a##::##b
+ #endif
#endif
#if _MIPS_SZINT == 64
*** omniORB_3_orig/omni/include/omniORB3/userexception.h Wed Oct 20 18:19:58 1999
--- omniORB_3/omni/include/omniORB3/userexception.h Wed Oct 20 17:50:03 1999
***************
*** 57,63 ****
pd_insertToAnyFn = insertToAnyFn; \
pd_insertToAnyFnNCP = insertToAnyFnNCP; \
} \
! inline name(const name& _ex) : UserException(_ex) {} \
inline name& operator=(const name& _ex) { \
* (CORBA::UserException*) this = _ex; return *this; \
} \
--- 57,63 ----
pd_insertToAnyFn = insertToAnyFn; \
pd_insertToAnyFnNCP = insertToAnyFnNCP; \
} \
! inline name(const name& _ex) : SUPER_CLASS_CTOR(CORBA,UserException)(_ex) {} \
inline name& operator=(const name& _ex) { \
* (CORBA::UserException*) this = _ex; return *this; \
} \
*** omniORB_3_orig/omni/src/lib/omniORB2/orbcore/corbaOrb.cc Wed Oct 20 18:21:10 1999
--- omniORB_3/omni/src/lib/omniORB2/orbcore/corbaOrb.cc Wed Oct 20 18:08:12 1999
***************
*** 303,309 ****
omniOrbORB::omniOrbORB(int nil)
! : ORB(nil),
pd_refCount(1),
pd_destroyed(0),
pd_shutdown(0),
--- 303,309 ----
omniOrbORB::omniOrbORB(int nil)
! : SUPER_CLASS_CTOR(CORBA,ORB)(nil),
pd_refCount(1),
pd_destroyed(0),
pd_shutdown(0),
*** omniORB_3_orig/omni/src/lib/omniORB2/orbcore/corbaBoa.cc Wed Oct 20 18:21:09 1999
--- omniORB_3/omni/src/lib/omniORB2/orbcore/corbaBoa.cc Wed Oct 20 18:08:32 1999
***************
*** 176,182 ****
omniOrbBOA::omniOrbBOA(int nil)
! : BOA(nil),
pd_state(IDLE),
pd_refCount(1),
pd_activeObjList(0),
--- 176,182 ----
omniOrbBOA::omniOrbBOA(int nil)
! : SUPER_CLASS_CTOR(CORBA,BOA)(nil),
pd_state(IDLE),
pd_refCount(1),
pd_activeObjList(0),
*** omniORB_3_orig/omni/mk/platforms/mips_irix_6.4_6.5_common.mk Wed Oct 20 18:20:09 1999
--- omniORB_3/omni/mk/platforms/mips_irix_6.4_6.5_common.mk Wed Oct 20 18:55:35 1999
***************
*** 106,112 ****
# variable was original set in unix.mk
OMNIORB_LIB = $(patsubst %,$(LibSearchPattern),omniORB3) \
! $(patsubst %,$(LibSearchPattern),omniDynamic2) \
$($(omniORBGatekeeperImplementation)_LIB) \
$(patsubst %,$(LibSearchPattern),omniORB3) \
$(OMNITHREAD_LIB)
--- 106,112 ----
# variable was original set in unix.mk
OMNIORB_LIB = $(patsubst %,$(LibSearchPattern),omniORB3) \
! $(patsubst %,$(LibSearchPattern),omniDynamic3) \
$($(omniORBGatekeeperImplementation)_LIB) \
$(patsubst %,$(LibSearchPattern),omniORB3) \
$(OMNITHREAD_LIB)
*** omniORB_3_orig/omni/src/lib/omniORB2/orbcore/poa.cc Wed Oct 20 18:21:16 1999
--- omniORB_3/omni/src/lib/omniORB2/orbcore/poa.cc Wed Oct 20 18:05:24 1999
***************
*** 1402,1408 ****
omniOrbPOAManager* manager,
const Policies& policies,
omniOrbPOA* parent)
! : POA(0),
pd_destroyed(0),
pd_dying(0),
pd_refCount(1),
--- 1402,1408 ----
omniOrbPOAManager* manager,
const Policies& policies,
omniOrbPOA* parent)
! : SUPER_CLASS_CTOR(PortableServer,POA)(0),
pd_destroyed(0),
pd_dying(0),
pd_refCount(1),
***************
*** 1460,1466 ****
omniOrbPOA::omniOrbPOA() // nil constructor
! : POA(1),
pd_destroyed(1),
pd_dying(1),
pd_refCount(0),
--- 1460,1466 ----
omniOrbPOA::omniOrbPOA() // nil constructor
! : SUPER_CLASS_CTOR(PortableServer,POA)(1),
pd_destroyed(1),
pd_dying(1),
pd_refCount(0),
*** omniORB_3_orig/omni/src/lib/omniORB2/orbcore/poamanager.h Wed Oct 20 18:21:17 1999
--- omniORB_3/omni/src/lib/omniORB2/orbcore/poamanager.h Wed Oct 20 18:01:29 1999
***************
*** 55,61 ****
public:
virtual ~omniOrbPOAManager();
inline omniOrbPOAManager(int is_nil = 0)
! : POAManager(is_nil),
pd_refCount(1),
pd_state(HOLDING)
{}
--- 55,61 ----
public:
virtual ~omniOrbPOAManager();
inline omniOrbPOAManager(int is_nil = 0)
! : SUPER_CLASS_CTOR(PortableServer,POAManager)(is_nil),
pd_refCount(1),
pd_state(HOLDING)
{}
--=====================_941033308==_
Content-Type: text/plain; charset="us-ascii"
--=====================_941033308==_--