Ticket #156 (new defect)

Opened 1 year ago

Last modified 1 year ago

_XOPEN_SOURCE causes compiler warnings on OS X

Reported by: dmacks Assigned to: lennart
Priority: minor Milestone:
Component: build-system Version:
Keywords: Cc:

Description

configure.ac has:

# Solaris stuff ... AC_CHECK_DECL([CMSG_SPACE]CFLAGS="$CFLAGS -D_XOPEN_SOURCE=500 -DEXTENSIONS")

The AC_CHECK_DECL result on my OS X 10.3 (gcc3.3) and apparently also on 10.4 (gcc4.0) machines cause compiler warnings from system headers. Removing the _XOPEN_SOURCE token from that configure action solves it. I'm not a Solaris machine, so the explanation of the check is out of sync with the check itself, and the test gives an inappropriate result on my platform.

What's the actual intent here? Should the whole thing be conditionalized on a platform/host test?

Change History

08/14/07 02:24:36 changed by dmacks

(sorry, wiki-formatting ate the codeblock)

# Solaris stuff
[...]
AC_CHECK_DECL([CMSG_SPACE]CFLAGS="$CFLAGS -D_XOPEN_SOURCE=500 -DEXTENSIONS")

08/20/07 01:54:52 changed by lennart

Hmm, the check is indeed strange. I am not sure how to fix this best. TBH i don't care too much as long as my Linux build doesn't break. I have neither Solaris nor MacOSX around, hence I am unable to cook up a patch.

The right fix is probably something that checks whether CMSG_SPACE becomes available as soon as those two definitions are made.

09/25/07 20:28:31 changed by dmacks

I'll be happy to work on a patch when I get a moment. Would be great if a Solaris person would let me know what the actual goal here and meaning of those -D flags is: sounds like we should see whether CMSG_SPACE is available without flags, and if not, try again with flags, and if they become available with flags, include the flags?