summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2017-04-22 09:34:18 -0400
committerBen Gamari <ben@smart-cactus.org>2017-04-23 11:05:48 -0400
commitf13eebcc9b1407e5aeaf010536fcb5e469dbfe71 (patch)
tree99bb45d293b74ba0570a2555e07fed09f8c3f659 /rts
parent87fbf39a61d2535a172fbcecec098730eba1777f (diff)
downloadhaskell-f13eebcc9b1407e5aeaf010536fcb5e469dbfe71.tar.gz
cpp: Use #pragma once instead of #ifndef guards
This both says what we mean and silences a bunch of spurious CPP linting warnings. This pragma is supported by all CPP implementations which we support. Reviewers: austin, erikd, simonmar, hvr Reviewed By: simonmar Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3482
Diffstat (limited to 'rts')
-rw-r--r--rts/Apply.h5
-rw-r--r--rts/Arena.h5
-rw-r--r--rts/AutoApply.h6
-rw-r--r--rts/AwaitEvent.h5
-rw-r--r--rts/Capability.h5
-rw-r--r--rts/CheckUnload.h5
-rw-r--r--rts/Disassembler.h5
-rw-r--r--rts/Excn.h6
-rw-r--r--rts/FileLock.h5
-rw-r--r--rts/GetEnv.h5
-rw-r--r--rts/GetTime.h5
-rw-r--r--rts/Globals.h5
-rw-r--r--rts/Hash.h5
-rw-r--r--rts/Interpreter.h5
-rw-r--r--rts/LdvProfile.h5
-rw-r--r--rts/Libdw.h5
-rw-r--r--rts/LibdwPool.h5
-rw-r--r--rts/LinkerInternals.h4
-rw-r--r--rts/Messages.h2
-rw-r--r--rts/PathUtils.h5
-rw-r--r--rts/PosixSource.h5
-rw-r--r--rts/Prelude.h5
-rw-r--r--rts/Printer.h6
-rw-r--r--rts/ProfHeap.h5
-rw-r--r--rts/ProfilerReport.h5
-rw-r--r--rts/ProfilerReportJson.h5
-rw-r--r--rts/Profiling.h5
-rw-r--r--rts/Proftimer.h5
-rw-r--r--rts/RaiseAsync.h5
-rw-r--r--rts/RetainerProfile.h5
-rw-r--r--rts/RetainerSet.h4
-rw-r--r--rts/RtsFlags.h5
-rw-r--r--rts/RtsSignals.h5
-rw-r--r--rts/RtsSymbolInfo.h5
-rw-r--r--rts/RtsSymbols.h5
-rw-r--r--rts/RtsUtils.h5
-rw-r--r--rts/SMPClosureOps.h5
-rw-r--r--rts/STM.h6
-rw-r--r--rts/Schedule.h5
-rw-r--r--rts/Sparks.h5
-rw-r--r--rts/Stable.h5
-rw-r--r--rts/StaticPtrTable.h5
-rw-r--r--rts/Stats.h5
-rw-r--r--rts/StgPrimFloat.h5
-rw-r--r--rts/StgRun.h5
-rw-r--r--rts/Task.h5
-rw-r--r--rts/ThreadLabels.h5
-rw-r--r--rts/ThreadPaused.h5
-rw-r--r--rts/Threads.h5
-rw-r--r--rts/Ticker.h5
-rw-r--r--rts/Ticky.h5
-rw-r--r--rts/Timer.h5
-rw-r--r--rts/TopHandler.h4
-rw-r--r--rts/Trace.h5
-rw-r--r--rts/Updates.h5
-rw-r--r--rts/WSDeque.h5
-rw-r--r--rts/Weak.h6
-rw-r--r--rts/eventlog/EventLog.h5
-rw-r--r--rts/hooks/Hooks.h5
-rw-r--r--rts/linker/CacheFlush.h5
-rw-r--r--rts/linker/Elf.h5
-rw-r--r--rts/linker/M32Alloc.h5
-rw-r--r--rts/linker/MachO.h5
-rw-r--r--rts/linker/MachOTypes.h4
-rw-r--r--rts/linker/PEi386.h5
-rw-r--r--rts/linker/SymbolExtras.h5
-rw-r--r--rts/posix/Clock.h5
-rw-r--r--rts/posix/Select.h5
-rw-r--r--rts/posix/Signals.h5
-rw-r--r--rts/posix/TTY.h5
-rw-r--r--rts/sm/BlockAlloc.h5
-rw-r--r--rts/sm/CNF.h5
-rw-r--r--rts/sm/Compact.h5
-rw-r--r--rts/sm/Evac.h6
-rw-r--r--rts/sm/GC.h5
-rw-r--r--rts/sm/GCTDecl.h5
-rw-r--r--rts/sm/GCThread.h5
-rw-r--r--rts/sm/GCUtils.h5
-rw-r--r--rts/sm/HeapAlloc.h5
-rw-r--r--rts/sm/MarkStack.h5
-rw-r--r--rts/sm/MarkWeak.h5
-rw-r--r--rts/sm/OSMem.h5
-rw-r--r--rts/sm/Sanity.h5
-rw-r--r--rts/sm/Scav.h6
-rw-r--r--rts/sm/ShouldCompact.h5
-rw-r--r--rts/sm/Storage.h5
-rw-r--r--rts/sm/Sweep.h5
-rw-r--r--rts/win32/AsyncIO.h5
-rw-r--r--rts/win32/ConsoleHandler.h6
-rw-r--r--rts/win32/IOManager.h5
-rw-r--r--rts/win32/WorkQueue.h6
-rw-r--r--rts/win32/veh_excn.h6
92 files changed, 98 insertions, 365 deletions
diff --git a/rts/Apply.h b/rts/Apply.h
index 1c0b1623d9..f225c4ea81 100644
--- a/rts/Apply.h
+++ b/rts/Apply.h
@@ -6,8 +6,7 @@
*
* -------------------------------------------------------------------------- */
-#ifndef APPLY_H
-#define APPLY_H
+#pragma once
// canned slow entry points, indexed by arg type (ARG_P, ARG_PP, etc.)
#ifdef IN_STG_CODE
@@ -22,5 +21,3 @@ extern RTS_PRIVATE StgWord stg_stack_save_entries[];
#else
extern RTS_PRIVATE StgFun *stg_stack_save_entries[];
#endif
-
-#endif /* APPLY_H */
diff --git a/rts/Arena.h b/rts/Arena.h
index 086a0200ad..8fa8236d8d 100644
--- a/rts/Arena.h
+++ b/rts/Arena.h
@@ -4,8 +4,7 @@
Arena allocation interface.
-------------------------------------------------------------------------- */
-#ifndef ARENA_H
-#define ARENA_H
+#pragma once
// Abstract type of arenas
typedef struct _Arena Arena;
@@ -21,5 +20,3 @@ RTS_PRIVATE void arenaFree ( Arena * );
// For internal use only:
RTS_PRIVATE unsigned long arenaBlocks( void );
-
-#endif /* ARENA_H */
diff --git a/rts/AutoApply.h b/rts/AutoApply.h
index b73e666ba9..b1d26368c4 100644
--- a/rts/AutoApply.h
+++ b/rts/AutoApply.h
@@ -6,8 +6,7 @@
*
* -------------------------------------------------------------------------- */
-#ifndef AUTOAPPLY_H
-#define AUTOAPPLY_H
+#pragma once
// Build a new PAP: function is in R1
// ret addr and m arguments taking up n words are on the stack.
@@ -98,6 +97,3 @@
#else
#define jump_SAVE_CCCS(target,...) jump (target) [__VA_ARGS__]
#endif
-
-#endif /* APPLY_H */
-
diff --git a/rts/AwaitEvent.h b/rts/AwaitEvent.h
index f7c504b16b..92848addf2 100644
--- a/rts/AwaitEvent.h
+++ b/rts/AwaitEvent.h
@@ -6,8 +6,7 @@
*
* -------------------------------------------------------------------------*/
-#ifndef AWAITEVENT_H
-#define AWAITEVENT_H
+#pragma once
#if !defined(THREADED_RTS)
/* awaitEvent(bool wait)
@@ -20,5 +19,3 @@
RTS_PRIVATE void awaitEvent(bool wait); /* In posix/Select.c or
* win32/AwaitEvent.c */
#endif
-
-#endif /* AWAITEVENT_H */
diff --git a/rts/Capability.h b/rts/Capability.h
index bcc168dcbd..515c2da30c 100644
--- a/rts/Capability.h
+++ b/rts/Capability.h
@@ -18,8 +18,7 @@
*
* --------------------------------------------------------------------------*/
-#ifndef CAPABILITY_H
-#define CAPABILITY_H
+#pragma once
#include "sm/GC.h" // for evac_fn
#include "Task.h"
@@ -476,5 +475,3 @@ INLINE_HEADER bool emptyInbox(Capability *cap)
#endif
#include "EndPrivate.h"
-
-#endif /* CAPABILITY_H */
diff --git a/rts/CheckUnload.h b/rts/CheckUnload.h
index 7d2e5b1321..ab85ead852 100644
--- a/rts/CheckUnload.h
+++ b/rts/CheckUnload.h
@@ -8,13 +8,10 @@
*
* --------------------------------------------------------------------------*/
-#ifndef CHECKUNLOAD_H
-#define CHECKUNLOAD_H
+#pragma once
#include "BeginPrivate.h"
void checkUnload (StgClosure *static_objects);
#include "EndPrivate.h"
-
-#endif // CHECKUNLOAD_H
diff --git a/rts/Disassembler.h b/rts/Disassembler.h
index c6f71564c4..5adff2eb5f 100644
--- a/rts/Disassembler.h
+++ b/rts/Disassembler.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef DISASSEMBLER_H
-#define DISASSEMBLER_H
+#pragma once
#ifdef DEBUG
@@ -15,5 +14,3 @@ RTS_PRIVATE int disInstr ( StgBCO *bco, int pc );
RTS_PRIVATE void disassemble( StgBCO *bco );
#endif
-
-#endif /* DISASSEMBLER_H */
diff --git a/rts/Excn.h b/rts/Excn.h
index b393234021..d32c145c50 100644
--- a/rts/Excn.h
+++ b/rts/Excn.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef EXCN_H
-#define EXCN_H
+#pragma once
#include "ghcconfig.h"
@@ -29,6 +28,3 @@
#define BEGIN_WINDOWS_VEH_HANDLER
#define END_WINDOWS_VEH_HANDLER
#endif /* mingw32_HOST_OS */
-
-#endif /* EXCN_H */
-
diff --git a/rts/FileLock.h b/rts/FileLock.h
index 72ab170437..276b1c61be 100644
--- a/rts/FileLock.h
+++ b/rts/FileLock.h
@@ -6,10 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef POSIX_FILELOCK_H
-#define POSIX_FILELOCK_H
+#pragma once
RTS_PRIVATE void initFileLocking(void);
RTS_PRIVATE void freeFileLocking(void);
-
-#endif /* POSIX_FILELOCK_H */
diff --git a/rts/GetEnv.h b/rts/GetEnv.h
index 5e3d0cf184..a6f2b54dae 100644
--- a/rts/GetEnv.h
+++ b/rts/GetEnv.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef GETENV_H
-#define GETENV_H
+#pragma once
#include "BeginPrivate.h"
@@ -19,5 +18,3 @@ void freeProgEnvv (int envc, char *envv[]);
/* calls to getProgEnvv must have a corresponding freeProgEnvv */
#include "EndPrivate.h"
-
-#endif /* GETENV_H */
diff --git a/rts/GetTime.h b/rts/GetTime.h
index 4aaddd00fe..719b45f8b9 100644
--- a/rts/GetTime.h
+++ b/rts/GetTime.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef GETTIME_H
-#define GETTIME_H
+#pragma once
#include "BeginPrivate.h"
@@ -26,5 +25,3 @@ void getUnixEpochTime (StgWord64 *sec, StgWord32 *nsec);
W_ getPageFaults (void);
#include "EndPrivate.h"
-
-#endif /* GETTIME_H */
diff --git a/rts/Globals.h b/rts/Globals.h
index 395d240e2a..c7aecae396 100644
--- a/rts/Globals.h
+++ b/rts/Globals.h
@@ -9,10 +9,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef GLOBALS_H
-#define GLOBALS_H
+#pragma once
RTS_PRIVATE void initGlobalStore(void);
RTS_PRIVATE void exitGlobalStore(void);
-
-#endif
diff --git a/rts/Hash.h b/rts/Hash.h
index 5d085b033c..1dde314d0e 100644
--- a/rts/Hash.h
+++ b/rts/Hash.h
@@ -6,8 +6,7 @@
*
* -------------------------------------------------------------------------- */
-#ifndef HASH_H
-#define HASH_H
+#pragma once
#include "BeginPrivate.h"
@@ -66,5 +65,3 @@ void freeHashTable ( HashTable *table, void (*freeDataFun)(void *) );
void exitHashTable ( void );
#include "EndPrivate.h"
-
-#endif /* HASH_H */
diff --git a/rts/Interpreter.h b/rts/Interpreter.h
index fd4f7b98c3..fa341f26fe 100644
--- a/rts/Interpreter.h
+++ b/rts/Interpreter.h
@@ -6,9 +6,6 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef INTERPRETER_H
-#define INTERPRETER_H
+#pragma once
RTS_PRIVATE Capability *interpretBCO (Capability* cap);
-
-#endif /* INTERPRETER_H */
diff --git a/rts/LdvProfile.h b/rts/LdvProfile.h
index 7475dc15da..5c0a5a4dbb 100644
--- a/rts/LdvProfile.h
+++ b/rts/LdvProfile.h
@@ -7,8 +7,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef LDVPROFILE_H
-#define LDVPROFILE_H
+#pragma once
#ifdef PROFILING
@@ -37,5 +36,3 @@ RTS_PRIVATE void LdvCensusKillAll ( void );
LDVW((c)) = (size)
#endif /* PROFILING */
-
-#endif /* LDVPROFILE_H */
diff --git a/rts/Libdw.h b/rts/Libdw.h
index bb3e71b78f..d737745c02 100644
--- a/rts/Libdw.h
+++ b/rts/Libdw.h
@@ -11,8 +11,7 @@
*
* -------------------------------------------------------------------------- */
-#ifndef LIBDW_H
-#define LIBDW_H
+#pragma once
#include "BeginPrivate.h"
@@ -44,5 +43,3 @@ int libdwForEachFrameOutwards(Backtrace *bt,
#endif /* USE_LIBDW */
#include "EndPrivate.h"
-
-#endif /* LIBDW_H */
diff --git a/rts/LibdwPool.h b/rts/LibdwPool.h
index 3c4216d09b..b1c333eebc 100644
--- a/rts/LibdwPool.h
+++ b/rts/LibdwPool.h
@@ -6,8 +6,7 @@
*
* --------------------------------------------------------------------------*/
-#ifndef LIBDW_POOL_H
-#define LIBDW_POOL_H
+#pragma once
#include "BeginPrivate.h"
@@ -26,5 +25,3 @@ INLINE_HEADER void libdwPoolInit(void) {}
#endif /* USE_LIBDW */
#include "EndPrivate.h"
-
-#endif /* LIBDW_POOL_H */
diff --git a/rts/LinkerInternals.h b/rts/LinkerInternals.h
index 9d47661f12..65b95f757c 100644
--- a/rts/LinkerInternals.h
+++ b/rts/LinkerInternals.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef LINKERINTERNALS_H
-#define LINKERINTERNALS_H
+#pragma once
#include "Rts.h"
#include "Hash.h"
@@ -342,4 +341,3 @@ struct _ObjectCodeFormatInfo { void* placeholder; };
#endif
#include "EndPrivate.h"
-#endif /* LINKERINTERNALS_H */
diff --git a/rts/Messages.h b/rts/Messages.h
index 1459b581d4..a6637ea75b 100644
--- a/rts/Messages.h
+++ b/rts/Messages.h
@@ -6,6 +6,8 @@
*
* --------------------------------------------------------------------------*/
+#pragma once
+
#include "BeginPrivate.h"
uint32_t messageBlackHole(Capability *cap, MessageBlackHole *msg);
diff --git a/rts/PathUtils.h b/rts/PathUtils.h
index 4821938d7d..152606a7b0 100644
--- a/rts/PathUtils.h
+++ b/rts/PathUtils.h
@@ -6,8 +6,7 @@
*
* --------------------------------------------------------------------------*/
-#ifndef PATH_UTILS_H
-#define PATH_UTILS_H
+#pragma once
#include "BeginPrivate.h"
@@ -39,5 +38,3 @@ pathchar* mkPath(char* path);
HsBool endsWithPath(pathchar* base, pathchar* str);
#include "EndPrivate.h"
-
-#endif /* PATH_UTILS_H */
diff --git a/rts/PosixSource.h b/rts/PosixSource.h
index edf16b5b1a..edee5fa94e 100644
--- a/rts/PosixSource.h
+++ b/rts/PosixSource.h
@@ -6,8 +6,7 @@
* That includes most RTS C sources.
* ---------------------------------------------------------------------------*/
-#ifndef POSIXSOURCE_H
-#define POSIXSOURCE_H
+#pragma once
#include <ghcplatform.h>
@@ -50,5 +49,3 @@
*/
#define __USE_MINGW_ANSI_STDIO 1
#endif
-
-#endif /* POSIXSOURCE_H */
diff --git a/rts/Prelude.h b/rts/Prelude.h
index d3c9494f53..ba36c1035c 100644
--- a/rts/Prelude.h
+++ b/rts/Prelude.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef PRELUDE_H
-#define PRELUDE_H
+#pragma once
/* These definitions are required by the RTS .cmm files too, so we
* need declarations that we can #include into the generated .hc files.
@@ -119,5 +118,3 @@ PRELUDE_INFO(base_GHCziStable_StablePtr_con_info);
#define FunPtr_con_info DLL_IMPORT_DATA_REF(base_GHCziPtr_FunPtr_con_info)
#define StablePtr_static_info DLL_IMPORT_DATA_REF(base_GHCziStable_StablePtr_static_info)
#define StablePtr_con_info DLL_IMPORT_DATA_REF(base_GHCziStable_StablePtr_con_info)
-
-#endif /* PRELUDE_H */
diff --git a/rts/Printer.h b/rts/Printer.h
index e72fdb068b..7d1bb81234 100644
--- a/rts/Printer.h
+++ b/rts/Printer.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef PRINTER_H
-#define PRINTER_H
+#pragma once
#include "BeginPrivate.h"
@@ -34,6 +33,3 @@ extern const char *what_next_strs[];
#endif
#include "EndPrivate.h"
-
-#endif /* PRINTER_H */
-
diff --git a/rts/ProfHeap.h b/rts/ProfHeap.h
index 7b12578175..85f81f3b9e 100644
--- a/rts/ProfHeap.h
+++ b/rts/ProfHeap.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef PROFHEAP_H
-#define PROFHEAP_H
+#pragma once
#include "BeginPrivate.h"
@@ -22,5 +21,3 @@ bool doingRetainerProfiling(void);
#endif
#include "EndPrivate.h"
-
-#endif /* PROFHEAP_H */
diff --git a/rts/ProfilerReport.h b/rts/ProfilerReport.h
index e2a1d539a4..516244eee3 100644
--- a/rts/ProfilerReport.h
+++ b/rts/ProfilerReport.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef PROFILER_REPORT_H
-#define PROFILER_REPORT_H
+#pragma once
#include <stdio.h>
@@ -24,5 +23,3 @@ void writeCCSReport( FILE *prof_file, CostCentreStack const *ccs,
#endif
#include "EndPrivate.h"
-
-#endif /* PROFILER_REPORT_H */
diff --git a/rts/ProfilerReportJson.h b/rts/ProfilerReportJson.h
index 1e115d7265..ace2e581e8 100644
--- a/rts/ProfilerReportJson.h
+++ b/rts/ProfilerReportJson.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef PROFILER_REPORT_JSON_H
-#define PROFILER_REPORT_JSON_H
+#pragma once
#include <stdio.h>
@@ -25,5 +24,3 @@ void writeCCSReportJson(FILE *prof_file,
#endif
#include "EndPrivate.h"
-
-#endif /* PROFILER_REPORT_JSON_H */
diff --git a/rts/Profiling.h b/rts/Profiling.h
index 24a4e24f0d..2160052fc7 100644
--- a/rts/Profiling.h
+++ b/rts/Profiling.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef PROFILING_H
-#define PROFILING_H
+#pragma once
#include <stdio.h>
@@ -53,5 +52,3 @@ void debugCCS( CostCentreStack *ccs );
#endif
#include "EndPrivate.h"
-
-#endif /* PROFILING_H */
diff --git a/rts/Proftimer.h b/rts/Proftimer.h
index e323b939c6..89fb100b44 100644
--- a/rts/Proftimer.h
+++ b/rts/Proftimer.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef PROFTIMER_H
-#define PROFTIMER_H
+#pragma once
#include "BeginPrivate.h"
@@ -20,5 +19,3 @@ void startHeapProfTimer ( void );
extern bool performHeapProfile;
#include "EndPrivate.h"
-
-#endif /* PROFTIMER_H */
diff --git a/rts/RaiseAsync.h b/rts/RaiseAsync.h
index 3f65e25252..002c22d39a 100644
--- a/rts/RaiseAsync.h
+++ b/rts/RaiseAsync.h
@@ -6,8 +6,7 @@
*
* --------------------------------------------------------------------------*/
-#ifndef RAISEASYNC_H
-#define RAISEASYNC_H
+#pragma once
#define THROWTO_SUCCESS 0
#define THROWTO_BLOCKED 1
@@ -79,5 +78,3 @@ interruptible(StgTSO *t)
#include "EndPrivate.h"
#endif /* CMINUSMINUS */
-
-#endif /* RAISEASYNC_H */
diff --git a/rts/RetainerProfile.h b/rts/RetainerProfile.h
index 180c4e24e3..959c346a84 100644
--- a/rts/RetainerProfile.h
+++ b/rts/RetainerProfile.h
@@ -7,8 +7,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef RETAINERPROFILE_H
-#define RETAINERPROFILE_H
+#pragma once
#ifdef PROFILING
@@ -49,5 +48,3 @@ extern W_ retainerStackBlocks ( void );
#include "EndPrivate.h"
#endif /* PROFILING */
-
-#endif /* RETAINERPROFILE_H */
diff --git a/rts/RetainerSet.h b/rts/RetainerSet.h
index 55a9989926..38253a1e94 100644
--- a/rts/RetainerSet.h
+++ b/rts/RetainerSet.h
@@ -7,8 +7,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef RETAINERSET_H
-#define RETAINERSET_H
+#pragma once
#include <stdio.h>
@@ -194,4 +193,3 @@ void outputAllRetainerSet(FILE *);
#include "EndPrivate.h"
#endif /* PROFILING */
-#endif /* RETAINERSET_H */
diff --git a/rts/RtsFlags.h b/rts/RtsFlags.h
index af60bcfd63..71ad219d29 100644
--- a/rts/RtsFlags.h
+++ b/rts/RtsFlags.h
@@ -7,8 +7,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef RTSFLAGS_H
-#define RTSFLAGS_H
+#pragma once
#include "BeginPrivate.h"
@@ -21,5 +20,3 @@ void freeRtsArgs (void);
extern RtsConfig rtsConfig;
#include "EndPrivate.h"
-
-#endif /* RTSFLAGS_H */
diff --git a/rts/RtsSignals.h b/rts/RtsSignals.h
index de346b836d..d4176034e3 100644
--- a/rts/RtsSignals.h
+++ b/rts/RtsSignals.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef RTSSIGNALS_H
-#define RTSSIGNALS_H
+#pragma once
#if !defined(mingw32_HOST_OS)
@@ -63,5 +62,3 @@ void markSignalHandlers (evac_fn evac, void *user);
#include "EndPrivate.h"
#endif /* RTS_USER_SIGNALS */
-
-#endif /* RTSSIGNALS_H */
diff --git a/rts/RtsSymbolInfo.h b/rts/RtsSymbolInfo.h
index 6987183d2a..1f3d35e5ef 100644
--- a/rts/RtsSymbolInfo.h
+++ b/rts/RtsSymbolInfo.h
@@ -6,12 +6,9 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef RTS_SYMBOLINFO_H
-#define RTS_SYMBOLINFO_H
+#pragma once
#include "LinkerInternals.h"
HsBool isSymbolWeak(ObjectCode *owner, void *label);
void setWeakSymbol(ObjectCode *owner, void *label);
-
-#endif /* RTS_SYMBOLINFO_H */
diff --git a/rts/RtsSymbols.h b/rts/RtsSymbols.h
index 7f7ac0fce6..c2b2f07d94 100644
--- a/rts/RtsSymbols.h
+++ b/rts/RtsSymbols.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef RTS_SYMBOLS_H
-#define RTS_SYMBOLS_H
+#pragma once
#include "ghcautoconf.h"
#include "LinkerInternals.h"
@@ -26,5 +25,3 @@ typedef struct _RtsSymbolVal {
} RtsSymbolVal;
extern RtsSymbolVal rtsSyms[];
-
-#endif /* RTS_SYMBOLS_H */
diff --git a/rts/RtsUtils.h b/rts/RtsUtils.h
index 6514e351d1..4b513cc1ba 100644
--- a/rts/RtsUtils.h
+++ b/rts/RtsUtils.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef RTSUTILS_H
-#define RTSUTILS_H
+#pragma once
#include "BeginPrivate.h"
@@ -46,5 +45,3 @@ void printRtsInfo(void);
void checkFPUStack(void);
#include "EndPrivate.h"
-
-#endif /* RTSUTILS_H */
diff --git a/rts/SMPClosureOps.h b/rts/SMPClosureOps.h
index 39cde45544..4ade2d018a 100644
--- a/rts/SMPClosureOps.h
+++ b/rts/SMPClosureOps.h
@@ -6,8 +6,7 @@
*
* -------------------------------------------------------------------------- */
-#ifndef RTS_STORAGE_SMPCLOSUREOPS_H
-#define RTS_STORAGE_SMPCLOSUREOPS_H
+#pragma once
#include "BeginPrivate.h"
@@ -125,5 +124,3 @@ INLINE_HEADER void unlockTSO(StgTSO *tso)
#endif /* CMINUSMINUS */
#include "EndPrivate.h"
-
-#endif /* RTS_STORAGE_SMPCLOSUREOPS_H */
diff --git a/rts/STM.h b/rts/STM.h
index 6dfa20d0ee..e9e5e27cd9 100644
--- a/rts/STM.h
+++ b/rts/STM.h
@@ -30,8 +30,7 @@
*/
-#ifndef STM_H
-#define STM_H
+#pragma once
#ifdef THREADED_RTS
//#define STM_CG_LOCK
@@ -218,6 +217,3 @@ void stmWriteTVar(Capability *cap,
/*----------------------------------------------------------------------*/
#include "EndPrivate.h"
-
-#endif /* STM_H */
-
diff --git a/rts/Schedule.h b/rts/Schedule.h
index 1453af41ca..23a1a5b770 100644
--- a/rts/Schedule.h
+++ b/rts/Schedule.h
@@ -7,8 +7,7 @@
*
* -------------------------------------------------------------------------*/
-#ifndef SCHEDULE_H
-#define SCHEDULE_H
+#pragma once
#include "rts/OSThreads.h"
#include "Capability.h"
@@ -246,5 +245,3 @@ emptyThreadQueues(Capability *cap)
#endif /* !IN_STG_CODE */
#include "EndPrivate.h"
-
-#endif /* SCHEDULE_H */
diff --git a/rts/Sparks.h b/rts/Sparks.h
index fbbac08432..d87d03076d 100644
--- a/rts/Sparks.h
+++ b/rts/Sparks.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef SPARKS_H
-#define SPARKS_H
+#pragma once
#include "WSDeque.h"
@@ -104,5 +103,3 @@ INLINE_HEADER bool fizzledSpark (StgClosure *spark)
#endif // THREADED_RTS
#include "EndPrivate.h"
-
-#endif /* SPARKS_H */
diff --git a/rts/Stable.h b/rts/Stable.h
index 679b4e8e41..5535637fa3 100644
--- a/rts/Stable.h
+++ b/rts/Stable.h
@@ -12,8 +12,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef STABLE_H
-#define STABLE_H
+#pragma once
#include "sm/GC.h" // for evac_fn below
@@ -50,5 +49,3 @@ extern Mutex stable_mutex;
#endif
#include "EndPrivate.h"
-
-#endif /* STABLE_H */
diff --git a/rts/StaticPtrTable.h b/rts/StaticPtrTable.h
index 4ad126cc38..830080390c 100644
--- a/rts/StaticPtrTable.h
+++ b/rts/StaticPtrTable.h
@@ -6,8 +6,7 @@
*
* -------------------------------------------------------------------------- */
-#ifndef STATICPTRTABLE_H
-#define STATICPTRTABLE_H
+#pragma once
#include "BeginPrivate.h"
@@ -15,5 +14,3 @@
void exitStaticPtrTable ( void );
#include "EndPrivate.h"
-
-#endif /* STATICPTRTABLE_H */
diff --git a/rts/Stats.h b/rts/Stats.h
index 537f5695a5..7ccb7c4616 100644
--- a/rts/Stats.h
+++ b/rts/Stats.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef STATS_H
-#define STATS_H
+#pragma once
#include "GetTime.h"
@@ -65,5 +64,3 @@ Time stat_getElapsedGCTime(void);
Time stat_getElapsedTime(void);
#include "EndPrivate.h"
-
-#endif /* STATS_H */
diff --git a/rts/StgPrimFloat.h b/rts/StgPrimFloat.h
index c704dc295c..70ece8f074 100644
--- a/rts/StgPrimFloat.h
+++ b/rts/StgPrimFloat.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef STGPRIMFLOAT_H
-#define STGPRIMFLOAT_H
+#pragma once
#include "BeginPrivate.h"
@@ -20,5 +19,3 @@ void __decodeFloat_Int (I_ *man, I_ *exp, StgFloat flt);
// includes/rts/PrimFloat.h.
#include "EndPrivate.h"
-
-#endif /* STGPRIMFLOAT_H */
diff --git a/rts/StgRun.h b/rts/StgRun.h
index 3839793fc3..356c40dba2 100644
--- a/rts/StgRun.h
+++ b/rts/StgRun.h
@@ -6,13 +6,10 @@
*
---------------------------------------------------------------------------- */
-#ifndef STGRUN_H
-#define STGRUN_H
+#pragma once
RTS_PRIVATE StgRegTable * StgRun (StgFunPtr f, StgRegTable *basereg);
#if defined(mingw32_HOST_OS)
StgWord8 *win32AllocStack(void);
#endif
-
-#endif /* STGRUN_H */
diff --git a/rts/Task.h b/rts/Task.h
index e5c21931a1..0410407a60 100644
--- a/rts/Task.h
+++ b/rts/Task.h
@@ -9,8 +9,7 @@
*
* -------------------------------------------------------------------------*/
-#ifndef TASK_H
-#define TASK_H
+#pragma once
#include "GetTime.h"
@@ -347,5 +346,3 @@ serialisableTaskId (Task *task)
}
#include "EndPrivate.h"
-
-#endif /* TASK_H */
diff --git a/rts/ThreadLabels.h b/rts/ThreadLabels.h
index 742e77ae58..b70eaea4ea 100644
--- a/rts/ThreadLabels.h
+++ b/rts/ThreadLabels.h
@@ -7,8 +7,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef THREADLABELS_H
-#define THREADLABELS_H
+#pragma once
#include "BeginPrivate.h"
@@ -23,5 +22,3 @@ void labelThread (Capability *cap,
char *label);
#include "EndPrivate.h"
-
-#endif /* THREADLABELS_H */
diff --git a/rts/ThreadPaused.h b/rts/ThreadPaused.h
index 197b8d3257..4d762f9aed 100644
--- a/rts/ThreadPaused.h
+++ b/rts/ThreadPaused.h
@@ -6,9 +6,6 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef THREADPAUSED_H
-#define THREADPAUSED_H
+#pragma once
RTS_PRIVATE void threadPaused ( Capability *cap, StgTSO * );
-
-#endif /* THREADPAUSED_H */
diff --git a/rts/Threads.h b/rts/Threads.h
index 98792f4b71..faef2cbbc8 100644
--- a/rts/Threads.h
+++ b/rts/Threads.h
@@ -6,8 +6,7 @@
*
* --------------------------------------------------------------------------*/
-#ifndef THREADS_H
-#define THREADS_H
+#pragma once
#include "BeginPrivate.h"
@@ -51,5 +50,3 @@ void printThreadQueue (StgTSO *t);
#endif
#include "EndPrivate.h"
-
-#endif /* THREADS_H */
diff --git a/rts/Ticker.h b/rts/Ticker.h
index c276ec6017..2564723067 100644
--- a/rts/Ticker.h
+++ b/rts/Ticker.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef TICKER_H
-#define TICKER_H
+#pragma once
#include "BeginPrivate.h"
@@ -19,5 +18,3 @@ void stopTicker (void);
void exitTicker (bool wait);
#include "EndPrivate.h"
-
-#endif /* TICKER_H */
diff --git a/rts/Ticky.h b/rts/Ticky.h
index a32a7a6542..1a5357d8db 100644
--- a/rts/Ticky.h
+++ b/rts/Ticky.h
@@ -6,9 +6,6 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef TICKY_H
-#define TICKY_H
+#pragma once
RTS_PRIVATE void PrintTickyInfo(void);
-
-#endif /* TICKY_H */
diff --git a/rts/Timer.h b/rts/Timer.h
index daf0cc3d7f..b8bf0b887b 100644
--- a/rts/Timer.h
+++ b/rts/Timer.h
@@ -6,10 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef TIMER_H
-#define TIMER_H
+#pragma once
RTS_PRIVATE void initTimer (void);
RTS_PRIVATE void exitTimer (bool wait);
-
-#endif /* TIMER_H */
diff --git a/rts/TopHandler.h b/rts/TopHandler.h
index fddebb05ef..1146eea71c 100644
--- a/rts/TopHandler.h
+++ b/rts/TopHandler.h
@@ -6,11 +6,15 @@
*
* ---------------------------------------------------------------------------*/
+#pragma once
+
#include <BeginPrivate.h>
+
#include <rts/Types.h>
#include <rts/storage/Closures.h>
#include <stg/Types.h>
#include <rts/Stable.h>
+
// Initialize the top handler subsystem
void initTopHandler(void);
diff --git a/rts/Trace.h b/rts/Trace.h
index 383c4099dd..4fb06e1fdd 100644
--- a/rts/Trace.h
+++ b/rts/Trace.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef TRACE_H
-#define TRACE_H
+#pragma once
#include "rts/EventLogFormat.h"
#include "Capability.h"
@@ -868,5 +867,3 @@ INLINE_HEADER void traceTaskDelete(Task *task STG_UNUSED)
}
#include "EndPrivate.h"
-
-#endif /* TRACE_H */
diff --git a/rts/Updates.h b/rts/Updates.h
index 513177217d..adbfb49832 100644
--- a/rts/Updates.h
+++ b/rts/Updates.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef UPDATES_H
-#define UPDATES_H
+#pragma once
#ifndef CMINUSMINUS
#include "BeginPrivate.h"
@@ -89,5 +88,3 @@ INLINE_HEADER void updateWithIndirection (Capability *cap,
#ifndef CMINUSMINUS
#include "EndPrivate.h"
#endif
-
-#endif /* UPDATES_H */
diff --git a/rts/WSDeque.h b/rts/WSDeque.h
index 58c7a58cb4..2936c281fe 100644
--- a/rts/WSDeque.h
+++ b/rts/WSDeque.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef WSDEQUE_H
-#define WSDEQUE_H
+#pragma once
typedef struct WSDeque_ {
// Size of elements array. Used for modulo calculation: we round up
@@ -122,5 +121,3 @@ discardElements (WSDeque *q)
q->top = q->bottom;
// pool->topBound = pool->top;
}
-
-#endif // WSDEQUE_H
diff --git a/rts/Weak.h b/rts/Weak.h
index d938979802..ab335424db 100644
--- a/rts/Weak.h
+++ b/rts/Weak.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef WEAK_H
-#define WEAK_H
+#pragma once
#include "Capability.h"
@@ -22,6 +21,3 @@ void scheduleFinalizers(Capability *cap, StgWeak *w);
void markWeakList(void);
#include "EndPrivate.h"
-
-#endif /* WEAK_H */
-
diff --git a/rts/eventlog/EventLog.h b/rts/eventlog/EventLog.h
index e36c97353e..90bb214495 100644
--- a/rts/eventlog/EventLog.h
+++ b/rts/eventlog/EventLog.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef EVENTLOG_H
-#define EVENTLOG_H
+#pragma once
#include "rts/EventLogFormat.h"
#include "rts/EventLogWriter.h"
@@ -185,5 +184,3 @@ INLINE_HEADER void postThreadLabel(Capability *cap STG_UNUSED,
#endif
#include "EndPrivate.h"
-
-#endif /* TRACING_H */
diff --git a/rts/hooks/Hooks.h b/rts/hooks/Hooks.h
index 1383ccdb0f..760e1daefc 100644
--- a/rts/hooks/Hooks.h
+++ b/rts/hooks/Hooks.h
@@ -11,8 +11,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef RTS_HOOKS_H
-#define RTS_HOOKS_H
+#pragma once
#include "BeginPrivate.h"
@@ -25,5 +24,3 @@ extern void MallocFailHook (W_ request_size /* in bytes */, const char *msg);
extern void FlagDefaultsHook (void);
#include "EndPrivate.h"
-
-#endif /* RTS_HOOKS_H */
diff --git a/rts/linker/CacheFlush.h b/rts/linker/CacheFlush.h
index f4d939d21e..aa081cca29 100644
--- a/rts/linker/CacheFlush.h
+++ b/rts/linker/CacheFlush.h
@@ -1,5 +1,4 @@
-#ifndef CACHE_FLUSH_H
-#define CACHE_FLUSH_H
+#pragma once
#include "LinkerInternals.h"
@@ -8,5 +7,3 @@
void ocFlushInstructionCache( ObjectCode *oc );
#include "EndPrivate.h"
-
-#endif /* CACHE_FLUSH_H */
diff --git a/rts/linker/Elf.h b/rts/linker/Elf.h
index 0c33130122..57ec46e146 100644
--- a/rts/linker/Elf.h
+++ b/rts/linker/Elf.h
@@ -1,5 +1,4 @@
-#ifndef LINKER_ELF_H
-#define LINKER_ELF_H
+#pragma once
#include "Rts.h"
#include "LinkerInternals.h"
@@ -13,5 +12,3 @@ int ocRunInit_ELF ( ObjectCode* oc );
int ocAllocateSymbolExtras_ELF( ObjectCode *oc );
#include "EndPrivate.h"
-
-#endif /* LINKER_ELF_H */
diff --git a/rts/linker/M32Alloc.h b/rts/linker/M32Alloc.h
index 8ec49cae21..e71f500e08 100644
--- a/rts/linker/M32Alloc.h
+++ b/rts/linker/M32Alloc.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef RTS_LINKER_M32ALLOC
-#define RTS_LINKER_M32ALLOC
+#pragma once
#if RTS_LINKER_USE_MMAP
#include <fcntl.h>
@@ -36,5 +35,3 @@ void m32_free(void *addr, size_t size) M32_NO_RETURN;
void * m32_alloc(size_t size, size_t alignment) M32_NO_RETURN;
#include "EndPrivate.h"
-
-#endif
diff --git a/rts/linker/MachO.h b/rts/linker/MachO.h
index 9362eb7238..c07e2944a1 100644
--- a/rts/linker/MachO.h
+++ b/rts/linker/MachO.h
@@ -1,5 +1,4 @@
-#ifndef LINKER_MACHO_H
-#define LINKER_MACHO_H
+#pragma once
#include "Rts.h"
@@ -21,5 +20,3 @@ void machoInitSymbolsWithoutUnderscore( void );
#endif
#include "EndPrivate.h"
-
-#endif /* LINKER_MACHO_H */
diff --git a/rts/linker/MachOTypes.h b/rts/linker/MachOTypes.h
index 5b2dced81b..b7ee7e2ed7 100644
--- a/rts/linker/MachOTypes.h
+++ b/rts/linker/MachOTypes.h
@@ -1,5 +1,4 @@
-#ifndef MachOTypes_h
-#define MachOTypes_h
+#pragma once
#if defined(OBJFORMAT_MACHO)
@@ -130,4 +129,3 @@ typedef struct _SectionFormatInfo {
} SectionFormatInfo;
#endif /* OBJECTFORMAT_MACHO */
-#endif /* MachOTypes_h */
diff --git a/rts/linker/PEi386.h b/rts/linker/PEi386.h
index 09b8c91c94..b034d6c7c9 100644
--- a/rts/linker/PEi386.h
+++ b/rts/linker/PEi386.h
@@ -1,5 +1,4 @@
-#ifndef LINKER_PE_I386_H
-#define LINKER_PE_I386_H
+#pragma once
#include "Rts.h"
#include "LinkerInternals.h"
@@ -107,5 +106,3 @@ See #9218
#include "EndPrivate.h"
-
-#endif /* LINKER_PE_I386_H */
diff --git a/rts/linker/SymbolExtras.h b/rts/linker/SymbolExtras.h
index 25cb022ab0..d28baf49df 100644
--- a/rts/linker/SymbolExtras.h
+++ b/rts/linker/SymbolExtras.h
@@ -1,5 +1,4 @@
-#ifndef LINKER_SYMBOL_EXTRAS_H
-#define LINKER_SYMBOL_EXTRAS_H
+#pragma once
#include "Rts.h"
#include "LinkerInternals.h"
@@ -26,5 +25,3 @@ SymbolExtra* makeSymbolExtra( ObjectCode const* oc,
#endif /* NEED_SYMBOL_EXTRAS */
#include "EndPrivate.h"
-
-#endif /* LINKER_SYMBOL_EXTRAS_H */
diff --git a/rts/posix/Clock.h b/rts/posix/Clock.h
index 2c71d7a75d..d027351d31 100644
--- a/rts/posix/Clock.h
+++ b/rts/posix/Clock.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef POSIX_CLOCK_H
-#define POSIX_CLOCK_H
+#pragma once
#ifdef HAVE_UNISTD_H
# include <unistd.h>
@@ -31,5 +30,3 @@
# include <mach/mach.h>
# include <mach/mach_time.h>
#endif
-
-#endif /* POSIX_CLOCK_H */
diff --git a/rts/posix/Select.h b/rts/posix/Select.h
index 50d49d4ba5..ed2a9b3427 100644
--- a/rts/posix/Select.h
+++ b/rts/posix/Select.h
@@ -6,12 +6,9 @@
*
* -------------------------------------------------------------------------*/
-#ifndef POSIX_SELECT_H
-#define POSIX_SELECT_H
+#pragma once
// An absolute time value in units of 10ms.
typedef StgWord LowResTime;
RTS_PRIVATE LowResTime getDelayTarget (HsInt us);
-
-#endif /* POSIX_SELECT_H */
diff --git a/rts/posix/Signals.h b/rts/posix/Signals.h
index d281821400..0fe8c486a7 100644
--- a/rts/posix/Signals.h
+++ b/rts/posix/Signals.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef POSIX_SIGNALS_H
-#define POSIX_SIGNALS_H
+#pragma once
#ifdef HAVE_SIGNAL_H
# include <signal.h>
@@ -33,5 +32,3 @@ void ioManagerStartCap (/* inout */ Capability **cap);
extern StgInt *signal_handlers;
#include "EndPrivate.h"
-
-#endif /* POSIX_SIGNALS_H */
diff --git a/rts/posix/TTY.h b/rts/posix/TTY.h
index 7b8e16bb92..eb1863cddd 100644
--- a/rts/posix/TTY.h
+++ b/rts/posix/TTY.h
@@ -6,9 +6,6 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef POSIX_TTY_H
-#define POSIX_TTY_H
+#pragma once
RTS_PRIVATE void resetTerminalSettings (void);
-
-#endif /* POSIX_TTY_H */
diff --git a/rts/sm/BlockAlloc.h b/rts/sm/BlockAlloc.h
index c26ae104e1..9b561df5db 100644
--- a/rts/sm/BlockAlloc.h
+++ b/rts/sm/BlockAlloc.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef BLOCK_ALLOC_H
-#define BLOCK_ALLOC_H
+#pragma once
#include "BeginPrivate.h"
@@ -31,5 +30,3 @@ extern W_ n_alloc_blocks; // currently allocated blocks
extern W_ hw_alloc_blocks; // high-water allocated blocks
#include "EndPrivate.h"
-
-#endif /* BLOCK_ALLOC_H */
diff --git a/rts/sm/CNF.h b/rts/sm/CNF.h
index d888b0ce31..a01c153213 100644
--- a/rts/sm/CNF.h
+++ b/rts/sm/CNF.h
@@ -11,8 +11,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef SM_CNF_H
-#define SM_CNF_H
+#pragma once
#include "BeginPrivate.h"
@@ -81,5 +80,3 @@ extern void insertCompactHash (Capability *cap,
extern void verifyCompact (StgCompactNFData *str);
#include "EndPrivate.h"
-
-#endif // SM_COMPACT_H
diff --git a/rts/sm/Compact.h b/rts/sm/Compact.h
index 7ff6e12d14..6dcb50b1aa 100644
--- a/rts/sm/Compact.h
+++ b/rts/sm/Compact.h
@@ -11,8 +11,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef SM_COMPACT_H
-#define SM_COMPACT_H
+#pragma once
#include "BeginPrivate.h"
@@ -49,5 +48,3 @@ is_marked(StgPtr p, bdescr *bd)
void compact (StgClosure *static_objects);
#include "EndPrivate.h"
-
-#endif /* SM_COMPACT_H */
diff --git a/rts/sm/Evac.h b/rts/sm/Evac.h
index 62d54eb7b9..65a15a2493 100644
--- a/rts/sm/Evac.h
+++ b/rts/sm/Evac.h
@@ -11,8 +11,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef SM_EVAC_H
-#define SM_EVAC_H
+#pragma once
#include "BeginPrivate.h"
@@ -38,6 +37,3 @@ REGPARM1 void evacuate1 (StgClosure **p);
extern W_ thunk_selector_depth;
#include "EndPrivate.h"
-
-#endif /* SM_EVAC_H */
-
diff --git a/rts/sm/GC.h b/rts/sm/GC.h
index a2bf6123d6..a176fde3f6 100644
--- a/rts/sm/GC.h
+++ b/rts/sm/GC.h
@@ -11,8 +11,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef SM_GC_H
-#define SM_GC_H
+#pragma once
#include "BeginPrivate.h"
@@ -62,5 +61,3 @@ void releaseGCThreads (Capability *cap, bool idle_cap[]);
#define WORK_UNIT_WORDS 128
#include "EndPrivate.h"
-
-#endif /* SM_GC_H */
diff --git a/rts/sm/GCTDecl.h b/rts/sm/GCTDecl.h
index f1f9516098..d3717d1e45 100644
--- a/rts/sm/GCTDecl.h
+++ b/rts/sm/GCTDecl.h
@@ -9,8 +9,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef SM_GCTDECL_H
-#define SM_GCTDECL_H
+#pragma once
#include "BeginPrivate.h"
@@ -143,5 +142,3 @@ extern __thread gc_thread* gct;
#endif // THREADED_RTS
#include "EndPrivate.h"
-
-#endif // SM_GCTDECL_H
diff --git a/rts/sm/GCThread.h b/rts/sm/GCThread.h
index 89457e6467..15f1f13f20 100644
--- a/rts/sm/GCThread.h
+++ b/rts/sm/GCThread.h
@@ -11,8 +11,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef SM_GCTHREAD_H
-#define SM_GCTHREAD_H
+#pragma once
#include "WSDeque.h"
#include "GetTime.h" // for Ticks
@@ -208,5 +207,3 @@ extern ThreadLocalKey gctKey;
#endif
#include "EndPrivate.h"
-
-#endif // SM_GCTHREAD_H
diff --git a/rts/sm/GCUtils.h b/rts/sm/GCUtils.h
index 3092262af6..072b1fc60d 100644
--- a/rts/sm/GCUtils.h
+++ b/rts/sm/GCUtils.h
@@ -11,8 +11,7 @@
*
* --------------------------------------------------------------------------*/
-#ifndef SM_GCUTILS_H
-#define SM_GCUTILS_H
+#pragma once
#include "BeginPrivate.h"
@@ -76,5 +75,3 @@ recordMutableGen_GC (StgClosure *p, uint32_t gen_no)
}
#include "EndPrivate.h"
-
-#endif /* SM_GCUTILS_H */
diff --git a/rts/sm/HeapAlloc.h b/rts/sm/HeapAlloc.h
index 0ec1e6d7bb..a74e79a86d 100644
--- a/rts/sm/HeapAlloc.h
+++ b/rts/sm/HeapAlloc.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef SM_HEAP_ALLOC_H
-#define SM_HEAP_ALLOC_H
+#pragma once
#include "BeginPrivate.h"
@@ -223,5 +222,3 @@ StgBool HEAP_ALLOCED_GC(void *p)
#endif
#include "EndPrivate.h"
-
-#endif /* SM_HEAP_ALLOC_H */
diff --git a/rts/sm/MarkStack.h b/rts/sm/MarkStack.h
index 881e2b0b17..51eee5770d 100644
--- a/rts/sm/MarkStack.h
+++ b/rts/sm/MarkStack.h
@@ -11,8 +11,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef SM_MARKSTACK_H
-#define SM_MARKSTACK_H
+#pragma once
#include "BeginPrivate.h"
#include "GCUtils.h"
@@ -68,5 +67,3 @@ mark_stack_empty(void)
}
#include "EndPrivate.h"
-
-#endif /* SM_MARKSTACK_H */
diff --git a/rts/sm/MarkWeak.h b/rts/sm/MarkWeak.h
index bd27bf551a..eba1f217c5 100644
--- a/rts/sm/MarkWeak.h
+++ b/rts/sm/MarkWeak.h
@@ -11,8 +11,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef SM_MARKWEAK_H
-#define SM_MARKWEAK_H
+#pragma once
#include "BeginPrivate.h"
@@ -27,5 +26,3 @@ void markWeakPtrList ( void );
void scavengeLiveWeak ( StgWeak * );
#include "EndPrivate.h"
-
-#endif /* SM_MARKWEAK_H */
diff --git a/rts/sm/OSMem.h b/rts/sm/OSMem.h
index 4d158df40d..4a19b348e5 100644
--- a/rts/sm/OSMem.h
+++ b/rts/sm/OSMem.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef SM_OSMEM_H
-#define SM_OSMEM_H
+#pragma once
#include "BeginPrivate.h"
@@ -88,5 +87,3 @@ void osReleaseHeapMemory(void);
#endif
#include "EndPrivate.h"
-
-#endif /* SM_OSMEM_H */
diff --git a/rts/sm/Sanity.h b/rts/sm/Sanity.h
index 63ae05d2a2..f9f1b3b787 100644
--- a/rts/sm/Sanity.h
+++ b/rts/sm/Sanity.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef SANITY_H
-#define SANITY_H
+#pragma once
#ifdef DEBUG
@@ -42,5 +41,3 @@ void checkBQ (StgTSO *bqe, StgClosure *closure);
#include "EndPrivate.h"
#endif /* DEBUG */
-
-#endif /* SANITY_H */
diff --git a/rts/sm/Scav.h b/rts/sm/Scav.h
index ddd7d6d2ba..865a78a242 100644
--- a/rts/sm/Scav.h
+++ b/rts/sm/Scav.h
@@ -11,8 +11,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef SM_SCAV_H
-#define SM_SCAV_H
+#pragma once
#include "BeginPrivate.h"
@@ -25,6 +24,3 @@ void scavenge_capability_mut_Lists1 (Capability *cap);
#endif
#include "EndPrivate.h"
-
-#endif /* SM_SCAV_H */
-
diff --git a/rts/sm/ShouldCompact.h b/rts/sm/ShouldCompact.h
index a8ae85df51..bce8ced288 100644
--- a/rts/sm/ShouldCompact.h
+++ b/rts/sm/ShouldCompact.h
@@ -11,8 +11,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef SM_SHOULDCOMPACT_H
-#define SM_SHOULDCOMPACT_H
+#pragma once
#define SHOULDCOMPACT_STATIC 0
#define SHOULDCOMPACT_IN_CNF 1
@@ -22,5 +21,3 @@
#ifndef CMINUSMINUS
extern StgWord shouldCompact (StgCompactNFData *str, StgClosure *p);
#endif
-
-#endif
diff --git a/rts/sm/Storage.h b/rts/sm/Storage.h
index 69901fd6ed..2d69eeed74 100644
--- a/rts/sm/Storage.h
+++ b/rts/sm/Storage.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef SM_STORAGE_H
-#define SM_STORAGE_H
+#pragma once
#include "Capability.h"
@@ -197,5 +196,3 @@ extern StgIndStatic * debug_caf_list;
extern StgIndStatic * revertible_caf_list;
#include "EndPrivate.h"
-
-#endif /* SM_STORAGE_H */
diff --git a/rts/sm/Sweep.h b/rts/sm/Sweep.h
index b590faa803..02cda8df69 100644
--- a/rts/sm/Sweep.h
+++ b/rts/sm/Sweep.h
@@ -11,9 +11,6 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef SM_SWEEP_H
-#define SM_SWEEP_H
+#pragma once
RTS_PRIVATE void sweep(generation *gen);
-
-#endif /* SM_SWEEP_H */
diff --git a/rts/win32/AsyncIO.h b/rts/win32/AsyncIO.h
index 3737db087a..75d0e0460d 100644
--- a/rts/win32/AsyncIO.h
+++ b/rts/win32/AsyncIO.h
@@ -5,8 +5,7 @@
* (c) sof, 2002-2003.
*/
-#ifndef WIN32_ASYNCHIO_H
-#define WIN32_ASYNCHIO_H
+#pragma once
extern unsigned int
addIORequest(int fd,
@@ -23,5 +22,3 @@ extern int awaitRequests(bool wait);
extern void abandonRequestWait(void);
extern void resetAbandonRequestWait(void);
-
-#endif /* WIN32_ASYNCHIO_H */
diff --git a/rts/win32/ConsoleHandler.h b/rts/win32/ConsoleHandler.h
index cd4a5447da..06af9dd0d0 100644
--- a/rts/win32/ConsoleHandler.h
+++ b/rts/win32/ConsoleHandler.h
@@ -2,8 +2,8 @@
* Console control handler support.
*
*/
-#ifndef WIN32_CONSOLEHANDLER_H
-#define WIN32_CONSOLEHANDLER_H
+
+#pragma once
/*
* Console control handlers lets an application handle Ctrl+C, Ctrl+Break etc.
@@ -60,5 +60,3 @@ extern void startSignalHandlers(Capability *cap);
extern int rts_waitConsoleHandlerCompletion(void);
#endif /* THREADED_RTS */
-
-#endif /* Win32_CONSOLEHANDLER_H */
diff --git a/rts/win32/IOManager.h b/rts/win32/IOManager.h
index 01521ca8da..a5bd61ab1b 100644
--- a/rts/win32/IOManager.h
+++ b/rts/win32/IOManager.h
@@ -5,8 +5,7 @@
* (c) sof, 2002-2003
*/
-#ifndef WIN32_IOMANAGER_H
-#define WIN32_IOMANAGER_H
+#pragma once
#include <windows.h>
@@ -103,5 +102,3 @@ extern int AddProcRequest ( void* proc,
CompletionProc onCompletion);
extern void abandonWorkRequest ( int reqID );
-
-#endif /* WIN32_IOMANAGER_H */
diff --git a/rts/win32/WorkQueue.h b/rts/win32/WorkQueue.h
index eb0b601df3..4dbfcd40d3 100644
--- a/rts/win32/WorkQueue.h
+++ b/rts/win32/WorkQueue.h
@@ -6,8 +6,8 @@
*
*/
-#ifndef WIN32_WORKQUEUE_H
-#define WIN32_WORKQUEUE_H
+#pragma once
+
#include <windows.h>
/* This is a fixed-size queue. */
@@ -34,5 +34,3 @@ extern HANDLE GetWorkQueueHandle ( WorkQueue* pq );
extern BOOL GetWork ( WorkQueue* pq, void** ppw );
extern BOOL FetchWork ( WorkQueue* pq, void** ppw );
extern int SubmitWork ( WorkQueue* pq, void* pw );
-
-#endif /* WIN32_WORKQUEUE_H */
diff --git a/rts/win32/veh_excn.h b/rts/win32/veh_excn.h
index 4223a2ae2d..fda837f1f1 100644
--- a/rts/win32/veh_excn.h
+++ b/rts/win32/veh_excn.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef WIN32_VEH_EXCN_H
-#define WIN32_VEH_EXCN_H
+#pragma once
#include <stdio.h>
#include <stdlib.h>
@@ -68,6 +67,3 @@ long WINAPI __hs_exception_handler( struct _EXCEPTION_POINTERS *exception_data )
// prototypes to the functions doing the registration and unregistration of the VEH handlers
void __register_hs_exception_handler( void );
void __unregister_hs_exception_handler( void );
-
-#endif /* WIN32_VEH_EXCN_H */
-