[GHC] #12624: Un-revert PosixSource.h cleanup
GHC
ghc-devs at haskell.org
Sun Oct 9 22:55:04 UTC 2016
#12624: Un-revert PosixSource.h cleanup
-------------------------------------+-------------------------------------
Reporter: bgamari | Owner:
Type: task | Status: new
Priority: normal | Milestone: 8.2.1
Component: Compiler | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D2579
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari <ben@…>):
In [changeset:"8dc72f3c33b0e724ddb690c9d494969980c10afd/ghc"
8dc72f3c/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="8dc72f3c33b0e724ddb690c9d494969980c10afd"
Cleanup PosixSource.h
When trying to build arm64-apple-iso, the build fell over `strdup`, as
the arm64-apple-ios build did not fall into `darwin_HOST_OS`, and would
need `ios_HOST_OS`.
This diff tries to clean up PosixSource.h, instead of layering another
define on top.
As we use `strnlen` in sources that include PosixSource.h, and `strnlen`
is defined in POSIX.1-2008, the `_POSIX_C_SOURCE` and `_XOPEN_SOURCE`
are increased accordingly.
Furthermore the `_DARWIN_C_SOURCE` (required for `u_char`, etc. used in
sysctl.h) define is moved into `OSThreads.h` alongside a similar ifdef
for freebsd.
Test Plan: Build on all supported platforms.
Reviewers: austin, simonmar, erikd, kgardas, bgamari
Reviewed By: simonmar, erikd, kgardas, bgamari
Subscribers: Phyx, hvr, thomie
Differential Revision: https://phabricator.haskell.org/D2579
GHC Trac Issues: #12624
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12624#comment:10>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list