[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
Hi Thomas,
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
> 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].
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[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.
That's fine, but I still recommend including the ACE headers first!
Thanks,
Doug
> 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
>
> _______________________________________________
> ace-users mailing list
> ace-users at mail.cse.wustl.edu
> http://mail.cse.wustl.edu/mailman/listinfo/ace-users
More information about the Ace-users
mailing list