[omniORB] Endianness

Gary D. Duzan gdd0@gte.com
Wed, 21 Apr 1999 13:57:10 -0400


   __x86__ is set in omniORB2.7.1/mk/platforms/i586_linux_2.0{,_glibc}.mk.
If you don't use omniORB's makefiles there are a number of macros which
need to be defined, including this one, to compile your code. For our
own stuff I just grabbed all the flags set for our platform and added
them (as options) to our make system. It would be nice not to have to
worry about this, but it could be a pain to maintain over N platforms
and M compilers.

					Gary Duzan
					GTE Laboratories



In Message <21D757CECBD2D211AD5D00105A2974A71970D3@EXCHANGE> ,
   Brent Fulgham <bfulgham@xpsystems.com> wrote:

=>I received a complaint from a fellow Linux developer that the header files
=>for omniORB do not detect processor endianness.  After looking into it, I
=>realized that gcc/g++ under Linux define "__i386__", while the
=>omniORB2/CORBA_sysdep.h header file looks for "__x86__".
=>
=>I was wondering if anyone running on other i386-based OS's, or even other
=>Linuxes could comment on whether this has been a problem for them.
=>
=>My planned workaround is to add the lines:
=>#ifdef __i386__
=>#define __x86__
=>#endif
=>
=>To the Debian version of the files.  If this is useful for others I would
=>like to see it placed in the upstream sources.
=>
=>As an alternative, we could also use the GNU C Library #include <endian.h>,
=>which will define __LITTLE_ENDIAN, __BIG_ENDIAN, or __PDP_ENDIAN.  Perhaps
=>any of these Macros could be used to set _OMNIORB_HOST_BYTE_ORDER for
=>systems running under the GNU C Library.
=>
=>Thanks,
=>
=>-Brent
=>