[ace-bugs] [ace-users] [RFC] #error'ing or #warning when
_REENTRANT is not defined
Douglas C. Schmidt
schmidt at dre.vanderbilt.edu
Mon Jul 9 15:05:56 CDT 2007
Thanks for using the PRF!
> ACE VERSION: 5.5.9
> HOST MACHINE and OPERATING SYSTEM:
> Debian GNU/Linux unstable
> COMPILER NAME AND VERSION (AND PATCHLEVEL):
> g++ (GCC) 4.1.3 20070601 (prerelease) (Debian 4.1.2-12)
> THE $ACE_ROOT/ace/config.h FILE:
> symlink to config-linux.h
> THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE:
> symlink to platform_linux.GNU
> CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.features
> AREA/CLASS/EXAMPLE AFFECTED:
> Depending on #include order, a program behavior can change
> DOES THE PROBLEM AFFECT:
> COMPILATION? yes
> LINKING? no
> EXECUTION? possibly
> Including some headers before or after ACE can make programs
> behave differently. It does not affect the autotools compilation method.
> A while ago, the Debian packages for ACE got a bug report showing that
> #include'ing a boost header before any ACE header or after did not
> behave the same.
Right, in general, it's a good idea to include the ACE headers first.
> I worked around this by converting the automatic definition of the
> _REENTRANT macro into an #error. (Note that the code has moved to
> $ACE_ROOT/ace/config-macros.h recently.)
> It turns out it's probably not the way to go, as it breaks very simple
> use cases.
> What would be a better way to address this issue? I think replacing the
> #error with a #warning followed by the #define could do.
That's fine, but I still recommend including the ACE headers first!
>  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=380739
>  http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=22;filename=20-check-_REENTRANT.dpatch;att=1;bug=380739
>  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=420216
> ace-users mailing list
> ace-users at mail.cse.wustl.edu
More information about the Ace-users