[omniORB] autoconf & having to #define __osname__

Bastiaan Bakker Bastiaan.Bakker@lifeline.nl
Mon Sep 16 09:50:01 2002


On Sat, 2002-09-14 at 10:24, bjorn rohde jensen wrote:
> Hi guys,
> 
>   This issue has already been addressed in omniORB4, where
> including omniconfig.h will set the proper defines for
> the platform, omniORB was configured on. You can read about
> it in the manual:)
> 

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.

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.

Regards,

Bastiaan Bakker
LifeLine Networks bv

 

> Yours sincerely,
> 
> Bjorn
>