cleanup POSIX/XOPEN defines for switch to C99
ClosedPublic

Authored by kgardas on Mar 29 2016, 5:25 AM.

Details

Summary

This patch cleans up various POSIX and XOPEN defines.
We aim to switch to C99 solely and for this the lowest version
of supported POSIX/XOPEN is:
_XOPEN_SOURCE 600
_POSIX_C_SOURCE 200112L

Test Plan

tested on Solaris 11 and OpenBSD 5.9. Should be good
also on Solaris 10, FreeBSD and DragonFlyBSD. We need to test
on Mac OS X, Linux and MinGW

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kgardas updated this revision to Diff 7097.Mar 29 2016, 5:25 AM
kgardas retitled this revision from to cleanup POSIX/XOPEN defines for switch to C99.
kgardas updated this object.
kgardas edited the test plan for this revision. (Show Details)
kgardas added reviewers: bgamari, austin, hvr.
hvr edited edge metadata.Mar 29 2016, 5:45 AM
hvr updated the Trac tickets for this revision.
hvr requested changes to this revision.Mar 29 2016, 5:48 AM
hvr edited edge metadata.

please make sure to reference Trac #11757 in the commit message (D2053 didn't and I had to reference it manually in Trac)

otherwise this looks good to me

This revision now requires changes to proceed.Mar 29 2016, 5:48 AM
kgardas updated this revision to Diff 7107.Mar 29 2016, 8:28 AM
kgardas edited edge metadata.

update code comment: listing standards and related trac ticket

hvr accepted this revision.Mar 29 2016, 8:40 AM
hvr edited edge metadata.
This revision is now accepted and ready to land.Mar 29 2016, 8:40 AM
This revision was automatically updated to reflect the committed changes.
Phyx added a subscriber: Phyx.Mar 29 2016, 4:26 PM
Phyx added inline comments.
rts/PosixSource.h
28

Hmm, since the __USE_MINGW_ANSI_STDIO is still there, shouldn't we leave this comment too?

kgardas added inline comments.Mar 29 2016, 4:53 PM
rts/PosixSource.h
28

Indeed, my mistake. Anyway, this should go away to immediately. I hope @hvr will take care about it as he discovered that this define is neither needed.