Solaris feature_tests.h

Karel Gardas karel.gardas at
Mon Sep 26 08:52:41 UTC 2016

Hi Ben,

sending Oracle copyrighted header file to public mailing list is no-go 
for me, I hope you understand it. :-)

Anyway, the problem with the patch[1] is simple: Oracle's Solaris 11 
supports max:

#define _POSIX_C_SOURCE 200112L
#define _XOPEN_SOURCE   600

the patch[1] assigned values:

#define _POSIX_C_SOURCE 200809L
#define _XOPEN_SOURCE   700

which are not recognized by Oracle's feature_tests.h hence the complain 
and #error.

I've verified this fact on both Solaris 11.2 and Solaris 11.3. On the 
other hand Illumos derivates should be OK with the definition of 
patch[1] as Illumos sometime in its history added handling for XPG7[2]. 
Basically if you look into history of Illumos feature_tests.h and you 
get the first commit[3], then you basically will see what's in Solaris 
11.2/11.3 minus few really unrelated changes done in Solaris.

I hope it's more clear now, what's happened with[1] on Solaris.





On 09/26/16 09:17 AM, Ben Gamari wrote:
> Hi Karel,
> A few months ago we reverted a cleanup [1] to PosixSource.h due to
> breakage on Solaris. I believe I have found [2] a build log from a
> failing build, but sadly it's far from clear what is going on. Do you
> suppose you could send us your /usr/include/sys/feature_tests.h? I
> suspect this will shed some light on what has gone wrong.
> For the record, I've opened #12624 to track this issue.
> Cheers,
> - Ben
> [1]
> [2]

More information about the ghc-devs mailing list