[omniORB] _OSF_SOURCE and omnithread.h problem(s)

Nikola Radovanovic nikola.radovanovic at dmsgroup.rs
Wed Nov 19 08:40:47 GMT 2008


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


More information about the omniORB-list mailing list