[omniORB] autoconf & having to #define __osname__

Duncan Grisby duncan@grisby.org
Sat Sep 21 23:11:00 2002


On Monday 16 September, Bastiaan Bakker wrote:

> Well, I did read 'the docs', but not the 'correct' ones:
> The files I read, README.FIRST and README.unix (at least in omniORB beta
> 2) do not mention omniconfig.h. However, the HTML docs do. 
> To avoid similar confusion in the future it may be a good idea to ditch
> README.* and let them point to the HTML docs.

I've updated the readmes.

> Something else that confused me is that fact that omniconfig.h, or
> rather omniORB4/acconfig.h does set a lot of preprocessor symbol, but
> not __linux__ and friends. Yet omnithreads.h contains specific checks
> for these symbols and it even doesn't include omniconfig.h. Apparently
> this works, at least on my platform because g++ already #defines
> __linux__. But this may not be the case with every compiler.
> Replacement of all the #if defined(__linux__), etc. with #ifdef
> OMNIORB_USE_POSIX_THREADS, etc. with the latter set in acconfig.h or
> CORBA_sysdep_trad.h will at least make the mechanism more transparent.

I've modified things a bit so the symbols like __linux__ are now
defined in omniconfig.h. omnithread.h does not #include omniconfig.h,
since it is trying to be a stand-alone header that works outside of
omniORB. However, as long as you #include <omniORB4/CORBA.h>,
omniconfig.h is included before omnithread.h, so it all works.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan@grisby.org     --
   -- http://www.grisby.org --