summaryrefslogtreecommitdiff
path: root/rts/PosixSource.h
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2021-07-23 05:11:59 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-08-09 15:11:58 -0400
commitfc350dba63da7eefbaa2793fe9fe99f8571b75c0 (patch)
treea607a0c9ddc2d051cc282d29a9285fbb8aa347e3 /rts/PosixSource.h
parentdb7098fe7aa3f7324d146821334b774032ea87bd (diff)
downloadhaskell-fc350dba63da7eefbaa2793fe9fe99f8571b75c0.tar.gz
Make `PosixSource.h` installed and under `rts/`
is used outside of the rts so we do this rather than just fish it out of the repo in ad-hoc way, in order to make packages in this repo more self-contained.
Diffstat (limited to 'rts/PosixSource.h')
-rw-r--r--rts/PosixSource.h38
1 files changed, 0 insertions, 38 deletions
diff --git a/rts/PosixSource.h b/rts/PosixSource.h
deleted file mode 100644
index 13fd7b0ff5..0000000000
--- a/rts/PosixSource.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* -----------------------------------------------------------------------------
- *
- * (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.
- * ---------------------------------------------------------------------------*/
-
-#pragma once
-
-#include <ghcplatform.h>
-
-/* We aim for C99 so we need to define following two defines in a consistent way
- with what POSIX/XOPEN provide for C99. Some OSes are particularly picky about
- the right versions defined here, e.g. Solaris
- We also settle on lowest version of POSIX/XOPEN needed for proper C99 support
- here which is POSIX.1-2001 compilation and Open Group Technical Standard,
- Issue 6 (XPG6). XPG6 itself is a result of the merge of X/Open and POSIX
- specification. It is also referred as IEEE Std. 1003.1-2001 or ISO/IEC
- 9945:2002 or UNIX 03 and SUSv3.
- Please also see trac ticket #11757 for more information about switch
- to C99/C11.
-
- However, the use of `strnlen`, which is strictly speaking only available in
- IEEE Std 1003.1-2008 (XPG7), requires lifting the bounds, to be able to
- compile ghc on systems that are strict about enforcing the standard, e.g.
- Apples mobile platforms.
-
- Oracle's Solaris 11 supports only up to XPG6, hence the ifdef.
- */
-
-#if defined(solaris2_HOST_OS)
-#define _POSIX_C_SOURCE 200112L
-#define _XOPEN_SOURCE 600
-#else
-#define _POSIX_C_SOURCE 200809L
-#define _XOPEN_SOURCE 700
-#endif