[ace-users] [RFC] #error'ing or #warning when _REENTRANT is not
defined
Thomas Girard
thomas.g.girard at free.fr
Mon Jul 9 14:08:26 CDT 2007
Hello,
here's 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
unchanged
AREA/CLASS/EXAMPLE AFFECTED:
Depending on #include order, a program behavior can change
DOES THE PROBLEM AFFECT:
COMPILATION? yes
LINKING? no
EXECUTION? possibly
SYNOPSIS:
Including some headers before or after ACE can make programs
behave differently. It does not affect the autotools compilation method.
DESCRIPTION:
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[1].
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[3].
What would be a better way to address this issue? I think replacing the
#error with a #warning followed by the #define could do.
Regards,
Thomas
[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=380739
[2] http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=22;filename=20-check-_REENTRANT.dpatch;att=1;bug=380739
[3] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=420216
More information about the Ace-users
mailing list