summaryrefslogtreecommitdiff
path: root/rts
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
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')
-rw-r--r--rts/Arena.c2
-rw-r--r--rts/Capability.c2
-rw-r--r--rts/CheckUnload.c2
-rw-r--r--rts/ClosureFlags.c2
-rw-r--r--rts/Disassembler.c2
-rw-r--r--rts/FileLock.c2
-rw-r--r--rts/Globals.c2
-rw-r--r--rts/Hash.c2
-rw-r--r--rts/Hpc.c2
-rw-r--r--rts/HsFFI.c2
-rw-r--r--rts/IPE.c2
-rw-r--r--rts/Inlines.c2
-rw-r--r--rts/Interpreter.c2
-rw-r--r--rts/LdvProfile.c2
-rw-r--r--rts/Linker.c2
-rw-r--r--rts/OldARMAtomic.c2
-rw-r--r--rts/Pool.c2
-rw-r--r--rts/PosixSource.h38
-rw-r--r--rts/Printer.c2
-rw-r--r--rts/ProfHeap.c2
-rw-r--r--rts/ProfilerReport.c2
-rw-r--r--rts/ProfilerReportJson.c2
-rw-r--r--rts/Profiling.c2
-rw-r--r--rts/Proftimer.c2
-rw-r--r--rts/RaiseAsync.c2
-rw-r--r--rts/RetainerProfile.c2
-rw-r--r--rts/RetainerSet.c2
-rw-r--r--rts/RtsAPI.c2
-rw-r--r--rts/RtsDllMain.c2
-rw-r--r--rts/RtsFlags.c2
-rw-r--r--rts/RtsMain.c2
-rw-r--r--rts/RtsMessages.c2
-rw-r--r--rts/RtsUtils.c2
-rw-r--r--rts/STM.c2
-rw-r--r--rts/Schedule.c2
-rw-r--r--rts/Sparks.c2
-rw-r--r--rts/SpinLock.c2
-rw-r--r--rts/StableName.c2
-rw-r--r--rts/StablePtr.c2
-rw-r--r--rts/Stats.c2
-rw-r--r--rts/StgCRun.c2
-rw-r--r--rts/StgPrimFloat.c2
-rw-r--r--rts/Task.c2
-rw-r--r--rts/ThreadLabels.c2
-rw-r--r--rts/ThreadPaused.c2
-rw-r--r--rts/Threads.c2
-rw-r--r--rts/Ticky.c2
-rw-r--r--rts/Timer.c2
-rw-r--r--rts/TraverseHeap.c2
-rw-r--r--rts/TraverseHeapTest.c2
-rw-r--r--rts/WSDeque.c2
-rw-r--r--rts/Weak.c2
-rw-r--r--rts/adjustor/LibffiAdjustor.c2
-rw-r--r--rts/adjustor/NativeAlpha.c2
-rw-r--r--rts/adjustor/NativeAmd64.c2
-rw-r--r--rts/adjustor/NativeIA64.c2
-rw-r--r--rts/adjustor/NativePowerPC.c2
-rw-r--r--rts/adjustor/NativeSparc.c2
-rw-r--r--rts/adjustor/Nativei386.c2
-rw-r--r--rts/eventlog/EventLog.c2
-rw-r--r--rts/eventlog/EventLogWriter.c2
-rw-r--r--rts/hooks/FlagDefaults.c2
-rw-r--r--rts/hooks/LongGCSync.c2
-rw-r--r--rts/hooks/MallocFail.c2
-rw-r--r--rts/hooks/OnExit.c2
-rw-r--r--rts/hooks/OutOfHeap.c2
-rw-r--r--rts/hooks/StackOverflow.c2
-rw-r--r--rts/posix/GetTime.c2
-rw-r--r--rts/posix/OSMem.c2
-rw-r--r--rts/posix/OSThreads.c6
-rw-r--r--rts/posix/Select.c2
-rw-r--r--rts/posix/Signals.c2
-rw-r--r--rts/posix/TTY.c2
-rw-r--r--rts/posix/Ticker.c6
-rw-r--r--rts/posix/ticker/Pthread.c6
-rw-r--r--rts/posix/ticker/Setitimer.c2
-rw-r--r--rts/posix/ticker/TimerCreate.c2
-rw-r--r--rts/sm/BlockAlloc.c2
-rw-r--r--rts/sm/CNF.c2
-rw-r--r--rts/sm/Compact.c2
-rw-r--r--rts/sm/Evac.c2
-rw-r--r--rts/sm/GC.c2
-rw-r--r--rts/sm/GCAux.c2
-rw-r--r--rts/sm/GCUtils.c2
-rw-r--r--rts/sm/MBlock.c2
-rw-r--r--rts/sm/MarkWeak.c2
-rw-r--r--rts/sm/Sanity.c2
-rw-r--r--rts/sm/Scav.c2
-rw-r--r--rts/sm/Storage.c6
-rw-r--r--rts/sm/Sweep.c2
90 files changed, 97 insertions, 135 deletions
diff --git a/rts/Arena.c b/rts/Arena.c
index 1d6dac623c..8129475332 100644
--- a/rts/Arena.c
+++ b/rts/Arena.c
@@ -18,7 +18,7 @@
which most allocations are small.
-------------------------------------------------------------------------- */
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "RtsUtils.h"
diff --git a/rts/Capability.c b/rts/Capability.c
index 7a83821e00..374dfe8de7 100644
--- a/rts/Capability.c
+++ b/rts/Capability.c
@@ -16,7 +16,7 @@
*
* --------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "Capability.h"
diff --git a/rts/CheckUnload.c b/rts/CheckUnload.c
index 345a17cfec..03cbdb5b2e 100644
--- a/rts/CheckUnload.c
+++ b/rts/CheckUnload.c
@@ -8,7 +8,7 @@
*
* --------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "RtsUtils.h"
diff --git a/rts/ClosureFlags.c b/rts/ClosureFlags.c
index f8dba8f326..da66b34d9a 100644
--- a/rts/ClosureFlags.c
+++ b/rts/ClosureFlags.c
@@ -6,7 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
StgWord16 closure_flags[] = {
diff --git a/rts/Disassembler.c b/rts/Disassembler.c
index 451521d57e..2abb4e1b8d 100644
--- a/rts/Disassembler.c
+++ b/rts/Disassembler.c
@@ -10,7 +10,7 @@
#if defined(DEBUG)
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "RtsAPI.h"
#include "rts/Bytecodes.h"
diff --git a/rts/FileLock.c b/rts/FileLock.c
index 4509de1a42..2ab608dcac 100644
--- a/rts/FileLock.c
+++ b/rts/FileLock.c
@@ -6,7 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "FileLock.h"
diff --git a/rts/Globals.c b/rts/Globals.c
index 848581e4d2..b7ed814752 100644
--- a/rts/Globals.c
+++ b/rts/Globals.c
@@ -17,7 +17,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "Globals.h"
diff --git a/rts/Hash.c b/rts/Hash.c
index 39c5360f56..0b408c7af1 100644
--- a/rts/Hash.c
+++ b/rts/Hash.c
@@ -8,7 +8,7 @@
* pp. 446 -- 457.
* -------------------------------------------------------------------------- */
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "Hash.h"
diff --git a/rts/Hpc.c b/rts/Hpc.c
index 0c297fc60a..7a9e42caed 100644
--- a/rts/Hpc.c
+++ b/rts/Hpc.c
@@ -2,7 +2,7 @@
* (c)2006 Galois Connections, Inc.
*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "Trace.h"
diff --git a/rts/HsFFI.c b/rts/HsFFI.c
index e482932193..58651b81e9 100644
--- a/rts/HsFFI.c
+++ b/rts/HsFFI.c
@@ -6,7 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "HsFFI.h"
#include "Rts.h"
diff --git a/rts/IPE.c b/rts/IPE.c
index d881682e7d..122331e066 100644
--- a/rts/IPE.c
+++ b/rts/IPE.c
@@ -7,7 +7,7 @@
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "RtsUtils.h"
diff --git a/rts/Inlines.c b/rts/Inlines.c
index a3eb956d0c..94699e9c4d 100644
--- a/rts/Inlines.c
+++ b/rts/Inlines.c
@@ -2,7 +2,7 @@
// compiled for real here, just in case the definition was not inlined
// at some call site:
#define KEEP_INLINES
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "Schedule.h"
#include "Capability.h"
diff --git a/rts/Interpreter.c b/rts/Interpreter.c
index a5705f8fb2..bcda08018a 100644
--- a/rts/Interpreter.c
+++ b/rts/Interpreter.c
@@ -5,7 +5,7 @@
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "RtsAPI.h"
#include "rts/Bytecodes.h"
diff --git a/rts/LdvProfile.c b/rts/LdvProfile.c
index 71064ddbce..aef1703c4a 100644
--- a/rts/LdvProfile.c
+++ b/rts/LdvProfile.c
@@ -9,7 +9,7 @@
#if defined(PROFILING)
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "Profiling.h"
diff --git a/rts/Linker.c b/rts/Linker.c
index 6a294ffb8b..2641a677be 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -7,7 +7,7 @@
* ---------------------------------------------------------------------------*/
#if 0
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#endif
#include "Rts.h"
diff --git a/rts/OldARMAtomic.c b/rts/OldARMAtomic.c
index e76f4c6354..deac848eba 100644
--- a/rts/OldARMAtomic.c
+++ b/rts/OldARMAtomic.c
@@ -13,7 +13,7 @@
*
* -------------------------------------------------------------------------- */
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#if defined(HAVE_SCHED_H)
diff --git a/rts/Pool.c b/rts/Pool.c
index d6ea0d492f..7fb32acc62 100644
--- a/rts/Pool.c
+++ b/rts/Pool.c
@@ -6,7 +6,7 @@
*
* --------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "RtsUtils.h"
#include "Pool.h"
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
diff --git a/rts/Printer.c b/rts/Printer.c
index 7d9614cfd7..90a40f2626 100644
--- a/rts/Printer.c
+++ b/rts/Printer.c
@@ -7,7 +7,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "ghcconfig.h"
#include "Rts.h"
diff --git a/rts/ProfHeap.c b/rts/ProfHeap.c
index b05c34d80f..e9d9dd364e 100644
--- a/rts/ProfHeap.c
+++ b/rts/ProfHeap.c
@@ -6,7 +6,7 @@
*
* --------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "Capability.h"
diff --git a/rts/ProfilerReport.c b/rts/ProfilerReport.c
index 60c90a72da..436667066c 100644
--- a/rts/ProfilerReport.c
+++ b/rts/ProfilerReport.c
@@ -8,7 +8,7 @@
#if defined(PROFILING)
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "RtsUtils.h"
diff --git a/rts/ProfilerReportJson.c b/rts/ProfilerReportJson.c
index 5a3890c85e..71a557b8de 100644
--- a/rts/ProfilerReportJson.c
+++ b/rts/ProfilerReportJson.c
@@ -8,7 +8,7 @@
#if defined(PROFILING)
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "RtsUtils.h"
diff --git a/rts/Profiling.c b/rts/Profiling.c
index e96f6b2b93..c04cb3ae6b 100644
--- a/rts/Profiling.c
+++ b/rts/Profiling.c
@@ -8,7 +8,7 @@
#if defined(PROFILING)
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "RtsUtils.h"
diff --git a/rts/Proftimer.c b/rts/Proftimer.c
index 29abb62a8e..7bc5e865b4 100644
--- a/rts/Proftimer.c
+++ b/rts/Proftimer.c
@@ -6,7 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "Profiling.h"
diff --git a/rts/RaiseAsync.c b/rts/RaiseAsync.c
index 822bf2875e..022999acdc 100644
--- a/rts/RaiseAsync.c
+++ b/rts/RaiseAsync.c
@@ -6,7 +6,7 @@
*
* --------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "sm/Storage.h"
diff --git a/rts/RetainerProfile.c b/rts/RetainerProfile.c
index 0db1cd2a18..68e412c9c7 100644
--- a/rts/RetainerProfile.c
+++ b/rts/RetainerProfile.c
@@ -9,7 +9,7 @@
#if defined(PROFILING)
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "RetainerProfile.h"
diff --git a/rts/RetainerSet.c b/rts/RetainerSet.c
index 556bcc0eab..d668376cb4 100644
--- a/rts/RetainerSet.c
+++ b/rts/RetainerSet.c
@@ -9,7 +9,7 @@
#if defined(PROFILING)
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "Stats.h"
diff --git a/rts/RtsAPI.c b/rts/RtsAPI.c
index d334a05dfb..469f4c52f6 100644
--- a/rts/RtsAPI.c
+++ b/rts/RtsAPI.c
@@ -6,7 +6,7 @@
*
* --------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "RtsAPI.h"
#include "HsFFI.h"
diff --git a/rts/RtsDllMain.c b/rts/RtsDllMain.c
index c844e6e65d..641f1fb7dc 100644
--- a/rts/RtsDllMain.c
+++ b/rts/RtsDllMain.c
@@ -6,7 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "RtsAPI.h"
#include "RtsDllMain.h"
diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c
index 149a2859ff..778f49c13b 100644
--- a/rts/RtsFlags.c
+++ b/rts/RtsFlags.c
@@ -7,7 +7,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "RtsUtils.h"
diff --git a/rts/RtsMain.c b/rts/RtsMain.c
index 21b8577cca..d2fd460ee2 100644
--- a/rts/RtsMain.c
+++ b/rts/RtsMain.c
@@ -8,7 +8,7 @@
#define COMPILING_RTS_MAIN
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "RtsAPI.h"
diff --git a/rts/RtsMessages.c b/rts/RtsMessages.c
index c816322a63..9b165faea7 100644
--- a/rts/RtsMessages.c
+++ b/rts/RtsMessages.c
@@ -6,7 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "RtsUtils.h"
diff --git a/rts/RtsUtils.c b/rts/RtsUtils.c
index ca01bdb6e0..3878a40697 100644
--- a/rts/RtsUtils.c
+++ b/rts/RtsUtils.c
@@ -6,7 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "RtsAPI.h"
diff --git a/rts/STM.c b/rts/STM.c
index 16dd029aea..d3555cdb37 100644
--- a/rts/STM.c
+++ b/rts/STM.c
@@ -83,7 +83,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "RtsUtils.h"
diff --git a/rts/Schedule.c b/rts/Schedule.c
index 85d66ab030..4a4b2d494a 100644
--- a/rts/Schedule.c
+++ b/rts/Schedule.c
@@ -6,7 +6,7 @@
*
* --------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#define KEEP_LOCKCLOSURE
#include "Rts.h"
diff --git a/rts/Sparks.c b/rts/Sparks.c
index 47cf310188..65e598f669 100644
--- a/rts/Sparks.c
+++ b/rts/Sparks.c
@@ -6,7 +6,7 @@
*
-------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "Schedule.h"
diff --git a/rts/SpinLock.c b/rts/SpinLock.c
index b362d89838..1e86860f11 100644
--- a/rts/SpinLock.c
+++ b/rts/SpinLock.c
@@ -19,7 +19,7 @@
*
* -------------------------------------------------------------------------- */
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#if defined(THREADED_RTS)
diff --git a/rts/StableName.c b/rts/StableName.c
index 4b26fee396..5d4f2002ad 100644
--- a/rts/StableName.c
+++ b/rts/StableName.c
@@ -8,7 +8,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "RtsAPI.h"
diff --git a/rts/StablePtr.c b/rts/StablePtr.c
index 469a17a5b9..8f860d480c 100644
--- a/rts/StablePtr.c
+++ b/rts/StablePtr.c
@@ -8,7 +8,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "RtsAPI.h"
diff --git a/rts/Stats.c b/rts/Stats.c
index 55e05974f5..9aa3f9566f 100644
--- a/rts/Stats.c
+++ b/rts/Stats.c
@@ -6,7 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "RtsFlags.h"
diff --git a/rts/StgCRun.c b/rts/StgCRun.c
index f1148139e2..b439b7e36a 100644
--- a/rts/StgCRun.c
+++ b/rts/StgCRun.c
@@ -26,7 +26,7 @@
*
* -------------------------------------------------------------------------- */
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "ghcconfig.h"
// Enable DWARF Call-Frame Information (used for stack unwinding) on Linux.
diff --git a/rts/StgPrimFloat.c b/rts/StgPrimFloat.c
index b7b0f10332..a8c266ae78 100644
--- a/rts/StgPrimFloat.c
+++ b/rts/StgPrimFloat.c
@@ -7,7 +7,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "StgPrimFloat.h"
diff --git a/rts/Task.c b/rts/Task.c
index 28a1f2c314..3cfe6e1769 100644
--- a/rts/Task.c
+++ b/rts/Task.c
@@ -8,7 +8,7 @@
*
* -------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "RtsUtils.h"
diff --git a/rts/ThreadLabels.c b/rts/ThreadLabels.c
index b982c7995c..ad72141dce 100644
--- a/rts/ThreadLabels.c
+++ b/rts/ThreadLabels.c
@@ -7,7 +7,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "ThreadLabels.h"
diff --git a/rts/ThreadPaused.c b/rts/ThreadPaused.c
index 9f41fa1ab3..c94b95afab 100644
--- a/rts/ThreadPaused.c
+++ b/rts/ThreadPaused.c
@@ -6,7 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-// #include "PosixSource.h"
+// #include "rts/PosixSource.h"
#include "Rts.h"
#include "ThreadPaused.h"
diff --git a/rts/Threads.c b/rts/Threads.c
index 130d451640..6a3894ccda 100644
--- a/rts/Threads.c
+++ b/rts/Threads.c
@@ -6,7 +6,7 @@
*
* --------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "Capability.h"
diff --git a/rts/Ticky.c b/rts/Ticky.c
index 83ba70887c..c045f43f56 100644
--- a/rts/Ticky.c
+++ b/rts/Ticky.c
@@ -7,7 +7,7 @@
*-------------------------------------------------------------------------- */
#define TICKY_C /* define those variables */
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "eventlog/EventLog.h"
diff --git a/rts/Timer.c b/rts/Timer.c
index d60d09e726..ec3dff0a5c 100644
--- a/rts/Timer.c
+++ b/rts/Timer.c
@@ -15,7 +15,7 @@
*
*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "Timer.h"
diff --git a/rts/TraverseHeap.c b/rts/TraverseHeap.c
index 40e51a3ca8..2285a93b6f 100644
--- a/rts/TraverseHeap.c
+++ b/rts/TraverseHeap.c
@@ -10,7 +10,7 @@
#if defined(PROFILING)
#include <string.h>
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "sm/Storage.h"
diff --git a/rts/TraverseHeapTest.c b/rts/TraverseHeapTest.c
index 9a71242e55..fe92bbdc5b 100644
--- a/rts/TraverseHeapTest.c
+++ b/rts/TraverseHeapTest.c
@@ -1,7 +1,7 @@
#if defined(PROFILING) && defined(DEBUG)
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include <string.h>
#include <Rts.h>
#include <rts/storage/Closures.h>
diff --git a/rts/WSDeque.c b/rts/WSDeque.c
index 4974dfa7a7..7d002afbe5 100644
--- a/rts/WSDeque.c
+++ b/rts/WSDeque.c
@@ -46,7 +46,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "RtsUtils.h"
diff --git a/rts/Weak.c b/rts/Weak.c
index 0adf5a8b92..ef588a14b7 100644
--- a/rts/Weak.c
+++ b/rts/Weak.c
@@ -6,7 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "RtsAPI.h"
diff --git a/rts/adjustor/LibffiAdjustor.c b/rts/adjustor/LibffiAdjustor.c
index 4b843c1b82..b74059b8ce 100644
--- a/rts/adjustor/LibffiAdjustor.c
+++ b/rts/adjustor/LibffiAdjustor.c
@@ -2,7 +2,7 @@
* libffi-based adjustor thunk logic.
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "RtsUtils.h"
diff --git a/rts/adjustor/NativeAlpha.c b/rts/adjustor/NativeAlpha.c
index 46fe4c090d..0e1e257983 100644
--- a/rts/adjustor/NativeAlpha.c
+++ b/rts/adjustor/NativeAlpha.c
@@ -2,7 +2,7 @@
* Alpha architecture adjustor thunk logic.
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "RtsUtils.h"
diff --git a/rts/adjustor/NativeAmd64.c b/rts/adjustor/NativeAmd64.c
index 67efe7aa31..391661539f 100644
--- a/rts/adjustor/NativeAmd64.c
+++ b/rts/adjustor/NativeAmd64.c
@@ -2,7 +2,7 @@
* AMD64 architecture adjustor thunk logic.
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "RtsUtils.h"
diff --git a/rts/adjustor/NativeIA64.c b/rts/adjustor/NativeIA64.c
index 9fd1991c0a..229b1322d6 100644
--- a/rts/adjustor/NativeIA64.c
+++ b/rts/adjustor/NativeIA64.c
@@ -2,7 +2,7 @@
* IA64 architecture adjustor thunk logic.
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "RtsUtils.h"
diff --git a/rts/adjustor/NativePowerPC.c b/rts/adjustor/NativePowerPC.c
index 2e5d60549a..31d89ee510 100644
--- a/rts/adjustor/NativePowerPC.c
+++ b/rts/adjustor/NativePowerPC.c
@@ -2,7 +2,7 @@
* PowerPC architecture adjustor thunk logic.
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "RtsUtils.h"
diff --git a/rts/adjustor/NativeSparc.c b/rts/adjustor/NativeSparc.c
index 059455d050..52e023dcbe 100644
--- a/rts/adjustor/NativeSparc.c
+++ b/rts/adjustor/NativeSparc.c
@@ -2,7 +2,7 @@
* SPARC architecture adjustor thunk logic.
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "RtsUtils.h"
diff --git a/rts/adjustor/Nativei386.c b/rts/adjustor/Nativei386.c
index af6d842be8..2cf69bd800 100644
--- a/rts/adjustor/Nativei386.c
+++ b/rts/adjustor/Nativei386.c
@@ -2,7 +2,7 @@
* i386 architecture adjustor thunk logic.
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "RtsUtils.h"
diff --git a/rts/eventlog/EventLog.c b/rts/eventlog/EventLog.c
index b8a80a0d4d..dff1d153fa 100644
--- a/rts/eventlog/EventLog.c
+++ b/rts/eventlog/EventLog.c
@@ -6,7 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#if defined(TRACING)
diff --git a/rts/eventlog/EventLogWriter.c b/rts/eventlog/EventLogWriter.c
index 047c211db4..06aad2841e 100644
--- a/rts/eventlog/EventLogWriter.c
+++ b/rts/eventlog/EventLogWriter.c
@@ -6,7 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "RtsUtils.h"
diff --git a/rts/hooks/FlagDefaults.c b/rts/hooks/FlagDefaults.c
index 1307fa0239..741745524f 100644
--- a/rts/hooks/FlagDefaults.c
+++ b/rts/hooks/FlagDefaults.c
@@ -4,7 +4,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "Hooks.h"
diff --git a/rts/hooks/LongGCSync.c b/rts/hooks/LongGCSync.c
index 58ee52fa3d..af56d0cb62 100644
--- a/rts/hooks/LongGCSync.c
+++ b/rts/hooks/LongGCSync.c
@@ -4,7 +4,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "sm/GC.h"
#include "sm/GCThread.h"
diff --git a/rts/hooks/MallocFail.c b/rts/hooks/MallocFail.c
index 42606b6f34..2948429a50 100644
--- a/rts/hooks/MallocFail.c
+++ b/rts/hooks/MallocFail.c
@@ -4,7 +4,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "Hooks.h"
diff --git a/rts/hooks/OnExit.c b/rts/hooks/OnExit.c
index e5e85f5dd3..e571af1853 100644
--- a/rts/hooks/OnExit.c
+++ b/rts/hooks/OnExit.c
@@ -4,7 +4,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "Hooks.h"
diff --git a/rts/hooks/OutOfHeap.c b/rts/hooks/OutOfHeap.c
index 20d9809024..8e3ba7dede 100644
--- a/rts/hooks/OutOfHeap.c
+++ b/rts/hooks/OutOfHeap.c
@@ -4,7 +4,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "Hooks.h"
#include "RtsFlags.h"
diff --git a/rts/hooks/StackOverflow.c b/rts/hooks/StackOverflow.c
index e1a90097e9..34dd9f64ab 100644
--- a/rts/hooks/StackOverflow.c
+++ b/rts/hooks/StackOverflow.c
@@ -4,7 +4,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "Hooks.h"
#include "RtsFlags.h"
diff --git a/rts/posix/GetTime.c b/rts/posix/GetTime.c
index fa6f70f73c..b2e522facc 100644
--- a/rts/posix/GetTime.c
+++ b/rts/posix/GetTime.c
@@ -7,7 +7,7 @@
* ---------------------------------------------------------------------------*/
// Not POSIX, due to use of ru_majflt in getPageFaults()
-// #include "PosixSource.h"
+// #include "rts/PosixSource.h"
#include "Rts.h"
#include "GetTime.h"
diff --git a/rts/posix/OSMem.c b/rts/posix/OSMem.c
index f27e5ee0d2..db388414d9 100644
--- a/rts/posix/OSMem.c
+++ b/rts/posix/OSMem.c
@@ -7,7 +7,7 @@
* ---------------------------------------------------------------------------*/
// This is non-posix compliant.
-// #include "PosixSource.h"
+// #include "rts/PosixSource.h"
#include "Rts.h"
diff --git a/rts/posix/OSThreads.c b/rts/posix/OSThreads.c
index b05d5cbd03..862e6007a6 100644
--- a/rts/posix/OSThreads.c
+++ b/rts/posix/OSThreads.c
@@ -7,9 +7,9 @@
*
* --------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
-/* We've defined _POSIX_SOURCE via "PosixSource.h", and yet still use
+/* We've defined _POSIX_SOURCE via "rts/PosixSource.h", and yet still use
some non-POSIX features. With _POSIX_SOURCE defined, visibility of
non-POSIX extension prototypes requires _DARWIN_C_SOURCE on Mac OS X,
__BSD_VISIBLE on FreeBSD and DragonflyBSD, and _NETBSD_SOURCE on
@@ -19,7 +19,7 @@
system headers are included via "Rts.h".
An alternative approach could be to write portable wrappers or stubs for all
- the non-posix functions in a C-module that does not include "PosixSource.h",
+ the non-posix functions in a C-module that does not include "rts/PosixSource.h",
and then use only POSIX features and the portable wrapper functions in all
other C-modules. */
#include "ghcconfig.h"
diff --git a/rts/posix/Select.c b/rts/posix/Select.c
index 9cd8e4e010..b342b0c109 100644
--- a/rts/posix/Select.c
+++ b/rts/posix/Select.c
@@ -9,7 +9,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "Signals.h"
diff --git a/rts/posix/Signals.c b/rts/posix/Signals.c
index 185c69eee3..2441f52016 100644
--- a/rts/posix/Signals.c
+++ b/rts/posix/Signals.c
@@ -6,7 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "Schedule.h"
diff --git a/rts/posix/TTY.c b/rts/posix/TTY.c
index 88fca28306..52ade92374 100644
--- a/rts/posix/TTY.c
+++ b/rts/posix/TTY.c
@@ -6,7 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "RtsUtils.h" // __hscore_get/set prototypes
diff --git a/rts/posix/Ticker.c b/rts/posix/Ticker.c
index 0b2dd25bbd..35387cdff4 100644
--- a/rts/posix/Ticker.c
+++ b/rts/posix/Ticker.c
@@ -20,9 +20,9 @@
* Ticker.c for consistency.
*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
-/* We've defined _POSIX_SOURCE via "PosixSource.h", and yet still use
+/* We've defined _POSIX_SOURCE via "rts/PosixSource.h", and yet still use
some non-POSIX features. With _POSIX_SOURCE defined, visibility of
non-POSIX extension prototypes requires _DARWIN_C_SOURCE on Mac OS X,
__BSD_VISIBLE on FreeBSD and DragonflyBSD, and _NetBSD_SOURCE on
@@ -32,7 +32,7 @@
system headers are included via "Rts.h".
An alternative approach could be to write portable wrappers or stubs for all
- the non-posix functions in a C-module that does not include "PosixSource.h",
+ the non-posix functions in a C-module that does not include "rts/PosixSource.h",
and then use only POSIX features and the portable wrapper functions in all
other C-modules. */
#include "ghcconfig.h"
diff --git a/rts/posix/ticker/Pthread.c b/rts/posix/ticker/Pthread.c
index 3cc7b2b801..796cf5eb24 100644
--- a/rts/posix/ticker/Pthread.c
+++ b/rts/posix/ticker/Pthread.c
@@ -35,7 +35,7 @@
* etc.).
*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "Ticker.h"
@@ -187,8 +187,8 @@ initTicker (Time interval, TickProc handle_tick)
* On FreeBSD 12.2 pthread_set_name_np() is unconditionally declared in
* <pthread_np.h>, while pthread_setname_np() is conditionally declared in
* <pthread.h> when _POSIX_SOURCE is not defined, but we're including
- * <PosixSource.h>, so must use pthread_set_name_np() instead. See similar
- * code in "rts/posix/OSThreads.c".
+ * <rts/PosixSource.h>, so must use pthread_set_name_np() instead. See
+ * similar code in "rts/posix/OSThreads.c".
*
* Create the thread with all blockable signals blocked, leaving signal
* handling to the main and/or other threads. This is especially useful in
diff --git a/rts/posix/ticker/Setitimer.c b/rts/posix/ticker/Setitimer.c
index 1221a72a83..816d603db3 100644
--- a/rts/posix/ticker/Setitimer.c
+++ b/rts/posix/ticker/Setitimer.c
@@ -6,7 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "Ticker.h"
diff --git a/rts/posix/ticker/TimerCreate.c b/rts/posix/ticker/TimerCreate.c
index 43081d8a30..3abf1c6c7f 100644
--- a/rts/posix/ticker/TimerCreate.c
+++ b/rts/posix/ticker/TimerCreate.c
@@ -6,7 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "Ticker.h"
diff --git a/rts/sm/BlockAlloc.c b/rts/sm/BlockAlloc.c
index 6e67f2cc8d..180a06f33e 100644
--- a/rts/sm/BlockAlloc.c
+++ b/rts/sm/BlockAlloc.c
@@ -15,7 +15,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "Storage.h"
diff --git a/rts/sm/CNF.c b/rts/sm/CNF.c
index bfe6493cfa..25c50adcc3 100644
--- a/rts/sm/CNF.c
+++ b/rts/sm/CNF.c
@@ -10,7 +10,7 @@
#define _GNU_SOURCE
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "RtsUtils.h"
diff --git a/rts/sm/Compact.c b/rts/sm/Compact.c
index b1250b77e0..43867343fc 100644
--- a/rts/sm/Compact.c
+++ b/rts/sm/Compact.c
@@ -11,7 +11,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "GCThread.h"
diff --git a/rts/sm/Evac.c b/rts/sm/Evac.c
index ea40563499..0e0e887b1e 100644
--- a/rts/sm/Evac.c
+++ b/rts/sm/Evac.c
@@ -11,7 +11,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "Evac.h"
diff --git a/rts/sm/GC.c b/rts/sm/GC.c
index 21b7b17f0d..90a5164414 100644
--- a/rts/sm/GC.c
+++ b/rts/sm/GC.c
@@ -11,7 +11,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "HsFFI.h"
diff --git a/rts/sm/GCAux.c b/rts/sm/GCAux.c
index 55b4f99596..f0e18a5ca5 100644
--- a/rts/sm/GCAux.c
+++ b/rts/sm/GCAux.c
@@ -7,7 +7,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "GC.h"
diff --git a/rts/sm/GCUtils.c b/rts/sm/GCUtils.c
index 52ea27f263..627c95fb42 100644
--- a/rts/sm/GCUtils.c
+++ b/rts/sm/GCUtils.c
@@ -11,7 +11,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "BlockAlloc.h"
diff --git a/rts/sm/MBlock.c b/rts/sm/MBlock.c
index 344bd3f0e9..ffd4f41266 100644
--- a/rts/sm/MBlock.c
+++ b/rts/sm/MBlock.c
@@ -8,7 +8,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "RtsUtils.h"
diff --git a/rts/sm/MarkWeak.c b/rts/sm/MarkWeak.c
index 379e3aaa80..2d4482501a 100644
--- a/rts/sm/MarkWeak.c
+++ b/rts/sm/MarkWeak.c
@@ -11,7 +11,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "MarkWeak.h"
diff --git a/rts/sm/Sanity.c b/rts/sm/Sanity.c
index ceb71c59ec..63ef9732dd 100644
--- a/rts/sm/Sanity.c
+++ b/rts/sm/Sanity.c
@@ -13,7 +13,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#if defined(DEBUG) /* whole file */
diff --git a/rts/sm/Scav.c b/rts/sm/Scav.c
index fe6dc4be54..b82eadd9cd 100644
--- a/rts/sm/Scav.c
+++ b/rts/sm/Scav.c
@@ -42,7 +42,7 @@
- scavenge_one() scavenges only stack frame SRTs
------------------------------------------------------------------------- */
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "Storage.h"
diff --git a/rts/sm/Storage.c b/rts/sm/Storage.c
index 7d450a8931..5241494365 100644
--- a/rts/sm/Storage.c
+++ b/rts/sm/Storage.c
@@ -15,15 +15,15 @@
#if RTS_LINKER_USE_MMAP
/*
* On FreeBSD and Darwin, when _XOPEN_SOURCE is defined, MAP_ANONYMOUS is not
- * exposed from <sys/mman.h>. Include <sys/mman.h> before "PosixSource.h".
+ * exposed from <sys/mman.h>. Include <sys/mman.h> before "rts/PosixSource.h".
*
- * Alternatively, we could drop "PosixSource.h" from this file, but for just
+ * Alternatively, we could drop "rts/PosixSource.h" from this file, but for just
* one non-POSIX macro, that seems a needless price to pay.
*/
#include <sys/mman.h>
#endif
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "Storage.h"
diff --git a/rts/sm/Sweep.c b/rts/sm/Sweep.c
index d6634dcb16..2278e57f40 100644
--- a/rts/sm/Sweep.c
+++ b/rts/sm/Sweep.c
@@ -11,7 +11,7 @@
*
* ---------------------------------------------------------------------------*/
-#include "PosixSource.h"
+#include "rts/PosixSource.h"
#include "Rts.h"
#include "BlockAlloc.h"