Discussion:
[omniORB] _OSF_SOURCE and omnithread.h problem(s)
Nikola Radovanovic
2008-11-19 13:41:19 UTC
Permalink
hi,
Recently we started using some Tru64 system-specific API (which forces
using of _OSF_SOURCE define directive) and ran on to some problems while
compiling omniORB-dependent source(s): on Tru64 <signal.h> signal is
defined as a macro (leading to that every build fails when it comes to
compiling of signal method in _OMNITHREAD_NTDLL_ class), so we patched
omnithread, by undefining signal in omnithread.h:

#if defined(__osf1__)
#if defined(_OSF_SOURCE) && defined(signal)
#undef signal
#endif
#endif

just before declaration of void signal(void);

(see patch attached)

this problem arises only when using _OSF_SOURCE as a preprocessor
directive - so every source which is compiled with this directive (and
includes omnithread.h) will fail to build. Also, this affects building
of omniORBpy (we presume that it defines _OSF_SOURCE at some point - but
cant claim for sure).
We are currently using omniORB versions: 4.0.6; 4.0.7; 4.1.1;4.1.2 and
4.1.3. all have the same problem

best regards
nikola

-------------- next part --------------
*** omnithread.h Wed Nov 19 08:08:24 2008
--- omnithread.h.new Wed Nov 19 08:15:50 2008
***************
*** 328,333 ****
--- 328,338 ----
// Returns 1 (true) if successfully signalled, 0 (false) if time
// expired.

+ #if defined(__osf1__)
+ #if defined(_OSF_SOURCE) && defined(signal)
+ #undef signal
+ #endif
+ #endif
void signal(void);
// if one or more threads have called wait(), signal wakes up at least
// one of them, possibly more. See POSIX threads documentation for
Duncan Grisby
2008-12-12 18:39:49 UTC
Permalink
Post by Nikola Radovanovic
Recently we started using some Tru64 system-specific API (which forces
using of _OSF_SOURCE define directive) and ran on to some problems
while compiling omniORB-dependent source(s): on Tru64 <signal.h>
signal is defined as a macro (leading to that every build fails when
it comes to compiling of signal method in _OMNITHREAD_NTDLL_ class),
#if defined(__osf1__)
#if defined(_OSF_SOURCE) && defined(signal)
#undef signal
#endif
#endif
Thanks for the patch. I've applied it in cvs, in the omni4_1_develop
branch. Sorry for the delay.

Cheers,

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
Loading...