chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] [PATCH 0/1] Add _XOPEN_SOURCE feature test macro


From: Peter Bex
Subject: Re: [Chicken-hackers] [PATCH 0/1] Add _XOPEN_SOURCE feature test macro
Date: Mon, 16 Jan 2017 21:31:58 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

On Tue, Jan 17, 2017 at 08:19:23AM +1300, Evan Hanson wrote:
> Regarding the new warnings you're seeing, Peter, unfortunately I can't
> reproduce them. I've now tried all three combinations of Cygwin and
> Windows 7 (32 vs. 64-bit), and the _XOPEN_SOURCE declaration seems to
> work fine as-is on all of them for me. The x86 box I used was from
> modern.ie, too, which AIUI is what you're using as well(?), so I'm at a
> bit of a loss. Are you using the setup-x86.exe Cygwin installers from
> cygwin.com?

Yeah, that's the one I was using.  I've performed a system update of my
Cygwin install (which was at least a year old or so), and that seems to
have fixed the problem.  Sorry for bothering you with a red herring!

Unfortunately, the _XOPEN_SOURCE definition without a value broke the
build on MingW, it says something like:

  error: operator '<' has no left operand
  # if _XOPEN_SOURCE < 500

According to feature_test_macros, we can also define it to a value to
set a specific level of POSIX/XOPEN support.

Attached is a modified version of the patch which sets _XOPEN_SOURCE
to 700, which unlocks SUSv4 / POSIX.1-2008 support.  I've tested this
and an added benefit is that setting it to 700 also makes a warning 
about "implicit declaration of function nanosleep()" go away on GNU Hurd.

I've tested it on MingW, Cygwin, Hurd and Linux.

Looks to me like if this is applied the only thing that remains is the
compiler warnings on OpenBSD (#1107), which are unrelated to these
implicitly declared functions.

Cheers,
Peter

Attachment: 0001-Add-_XOPEN_SOURCE-feature-test-macro.patch
Description: Text Data

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]