Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
39 lines (33 sloc) 1.13 KB
/* -----------------------------------------------------------------------------
* (c) The GHC Team, 1998-2005
* Include this file into sources which should not need any non-Posix services.
* That includes most RTS C sources.
* ---------------------------------------------------------------------------*/
#include <ghcplatform.h>
#if defined(freebsd_HOST_OS)
#define _POSIX_C_SOURCE 200112L
#define _XOPEN_SOURCE 600
#define _POSIX_SOURCE 1
#define _POSIX_C_SOURCE 199506L
#define _XOPEN_SOURCE 500
// FreeBSD takes a different approach to _ISOC99_SOURCE: on FreeBSD it
// means "I want *just* C99 things", whereas on GNU libc and Solaris
// it means "I also want C99 things".
// On both GNU libc and FreeBSD, _ISOC99_SOURCE is implied by
// _XOPEN_SOURCE==600, but on Solaris it is an error to omit it.
#define _ISOC99_SOURCE
#if defined(darwin_HOST_OS)
/* If we don't define this the including sysctl breaks with things like
error: syntax error before 'u_char'
#define _DARWIN_C_SOURCE 1
#endif /* POSIXSOURCE_H */
Jump to Line
Something went wrong with that request. Please try again.