Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[ace-users] _REENTRANT define in config-macros.h

20 views
Skip to first unread message

Doug McCorkle

unread,
Jan 31, 2007, 1:58:46 PM1/31/07
to ace-...@cse.wustl.edu
TAO VERSION: 1.5.4
ACE VERSION: 5.5.4

HOST MACHINE and OPERATING SYSTEM:
If on Windows based OS's, which version of WINSOCK do you
use?:

Darwin doug-mccorkles-computer.local 8.8.1 Darwin Kernel Version
8.8.1: Mon Sep 25 19:42:00 PDT 2006; root:xnu-792.13.8.obj~1/
RELEASE_I386 i386 i386

TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
COMPILER NAME AND VERSION (AND PATCHLEVEL):

THE $ACE_ROOT/ace/config.h FILE [if you use a link to a platform-
specific file, simply state which one]:

THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE [if you
use a link to a platform-specific file, simply state which one
(unless this isn't used in this case, e.g., with Microsoft Visual
C++)]:

CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/
default.features
(used by MPC when you generate your own makefiles):

AREA/CLASS/EXAMPLE AFFECTED:
When compiling ACE/TAO with other libraries that define _REENTRANT.

DOES THE PROBLEM AFFECT:
COMPILATION?
Yes. I get a compile warning about _REENTRANT being defined.

LINKING?
EXECUTION?
OTHER (please specify)?

SYNOPSIS:
When I use ACE/TAO with another library that defines the _REENTRANT I
get a compile warning about redefining _REENTRANT. This is minor
issue but wanted to see if the _REENTRANT define could be set to 1.

DESCRIPTION:
When using the vrjuggler vpr (vapor) library with TAO libraries I get
compile warnings about _REENTRANT being redefined. One solution is
to move the include of the ACE/TAO headers below the other headers
that define _REENTRANT but this causes compile errors on windows
platforms.

REPEAT BY:
Create a simple program that includes a vpr and TAO header.

SAMPLE FIX/WORKAROUND:
Change the _REENTRANT define in config-macros.h:

# define _REENTRANT

to this:

# define _REENTRANT 1

Thanks for the help.

Doug

Steve Huston

unread,
Jan 31, 2007, 4:55:48 PM1/31/07
to Doug McCorkle, ace-...@cse.wustl.edu
Good catch, Doug... I think, though, that cofnig-macros.h should not
be defining _REENTRANT at all. If needed, it should be set in a
platform's config.h file.

Can you try removing the _REENTRANT setting from config-macros.h
completely and let us know how that goes?

Thanks,
-Steve

--
Steve Huston, Riverace Corporation
New Support options to help you with ACE!
See http://www.riverace.com/support.htm

> _______________________________________________
> ace-users mailing list
> ace-...@mail.cse.wustl.edu
> http://mail.cse.wustl.edu/mailman/listinfo/ace-users
>


Thomas Girard

unread,
Feb 1, 2007, 3:22:00 AM2/1/07
to ace-...@mail.cse.wustl.edu
Hello,

On Wed, Jan 31, 2007 at 04:55:48PM -0500, Steve Huston wrote:
> Good catch, Doug... I think, though, that cofnig-macros.h should not
> be defining _REENTRANT at all. If needed, it should be set in a
> platform's config.h file.
>
> Can you try removing the _REENTRANT setting from config-macros.h
> completely and let us know how that goes?

We had a report on the Debian BTS asking that _REENTRANT should not be
automatically defined, as this can hide some problems. Please see:

http://bugs.debian.org/380739

for details. As a consequence, Debian ACE+TAO builds now include the
attached patch, which #error out instead of silently defining the macro.

Sorry for not sending it earlier, I have been quite busy these days.

Regards,

Thomas

20-check-_REENTRANT.dpatch

Doug McCorkle

unread,
Feb 3, 2007, 8:01:32 AM2/3/07
to Steve Huston, ace-...@cse.wustl.edu

On Jan 31, 2007, at 3:55 PM, Steve Huston wrote:

> Good catch, Doug... I think, though, that cofnig-macros.h should not
> be defining _REENTRANT at all. If needed, it should be set in a
> platform's config.h file.
>
> Can you try removing the _REENTRANT setting from config-macros.h
> completely and let us know how that goes?
>

That did not work. I got configuration errors when ACE was configuring.

I tried removing _REENTRANT completely and I also tried adding
_REENTRANT to the end of the config-macosx.h file. Neither option
worked even though it appears that _REENTRANT is a preprocessor
define during the configure stage of ACE.

[snip]

Doug


0 new messages