summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/HsVersions.h6
-rw-r--r--compiler/nativeGen/NCG.h5
-rw-r--r--compiler/utils/md5.h8
-rw-r--r--driver/utils/isMinTTY.h5
-rw-r--r--includes/Cmm.h5
-rw-r--r--includes/HsFFI.h5
-rw-r--r--includes/MachDeps.h5
-rw-r--r--includes/Rts.h5
-rw-r--r--includes/RtsAPI.h5
-rw-r--r--includes/Stg.h5
-rw-r--r--includes/ghcconfig.h5
-rw-r--r--includes/rts/Adjustor.h5
-rw-r--r--includes/rts/BlockSignals.h5
-rw-r--r--includes/rts/Config.h5
-rw-r--r--includes/rts/Constants.h5
-rw-r--r--includes/rts/EventLogFormat.h5
-rw-r--r--includes/rts/EventLogWriter.h5
-rw-r--r--includes/rts/FileLock.h5
-rw-r--r--includes/rts/Flags.h5
-rw-r--r--includes/rts/GetTime.h5
-rw-r--r--includes/rts/Globals.h5
-rw-r--r--includes/rts/Hpc.h5
-rw-r--r--includes/rts/IOManager.h5
-rw-r--r--includes/rts/Libdw.h7
-rw-r--r--includes/rts/LibdwPool.h5
-rw-r--r--includes/rts/Linker.h5
-rw-r--r--includes/rts/Main.h5
-rw-r--r--includes/rts/Messages.h5
-rw-r--r--includes/rts/OSThreads.h5
-rw-r--r--includes/rts/Parallel.h5
-rw-r--r--includes/rts/PrimFloat.h5
-rw-r--r--includes/rts/Signals.h5
-rw-r--r--includes/rts/SpinLock.h8
-rw-r--r--includes/rts/Stable.h5
-rw-r--r--includes/rts/StaticPtrTable.h5
-rw-r--r--includes/rts/TTY.h5
-rw-r--r--includes/rts/Threads.h5
-rw-r--r--includes/rts/Ticky.h5
-rw-r--r--includes/rts/Time.h5
-rw-r--r--includes/rts/Timer.h5
-rw-r--r--includes/rts/Types.h5
-rw-r--r--includes/rts/Utils.h5
-rw-r--r--includes/rts/prof/CCS.h5
-rw-r--r--includes/rts/prof/LDV.h5
-rw-r--r--includes/rts/storage/Block.h4
-rw-r--r--includes/rts/storage/ClosureMacros.h5
-rw-r--r--includes/rts/storage/ClosureTypes.h5
-rw-r--r--includes/rts/storage/Closures.h6
-rw-r--r--includes/rts/storage/FunTypes.h5
-rw-r--r--includes/rts/storage/GC.h5
-rw-r--r--includes/rts/storage/InfoTables.h5
-rw-r--r--includes/rts/storage/MBlock.h5
-rw-r--r--includes/rts/storage/TSO.h5
-rw-r--r--includes/stg/DLL.h5
-rw-r--r--includes/stg/HaskellMachRegs.h5
-rw-r--r--includes/stg/MachRegs.h5
-rw-r--r--includes/stg/MiscClosures.h5
-rw-r--r--includes/stg/Prim.h5
-rw-r--r--includes/stg/Regs.h5
-rw-r--r--includes/stg/RtsMachRegs.h5
-rw-r--r--includes/stg/SMP.h5
-rw-r--r--includes/stg/Ticky.h6
-rw-r--r--includes/stg/Types.h5
-rw-r--r--libraries/base/include/CTypes.h5
-rw-r--r--libraries/base/include/HsBase.h6
-rw-r--r--libraries/base/include/HsEvent.h4
-rw-r--r--libraries/base/include/WCsubst.h7
-rw-r--r--libraries/base/include/consUtils.h5
-rw-r--r--libraries/base/include/md5.h8
-rw-r--r--libraries/integer-gmp/include/HsIntegerGmp.h.in5
-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
-rw-r--r--utils/hp2ps/AreaBelow.h5
-rw-r--r--utils/hp2ps/AuxFile.h5
-rw-r--r--utils/hp2ps/Axes.h5
-rw-r--r--utils/hp2ps/Curves.h5
-rw-r--r--utils/hp2ps/Defines.h5
-rw-r--r--utils/hp2ps/Deviation.h5
-rw-r--r--utils/hp2ps/Dimensions.h5
-rw-r--r--utils/hp2ps/Error.h5
-rw-r--r--utils/hp2ps/HpFile.h5
-rw-r--r--utils/hp2ps/Key.h5
-rw-r--r--utils/hp2ps/Main.h5
-rw-r--r--utils/hp2ps/Marks.h5
-rw-r--r--utils/hp2ps/PsFile.h5
-rw-r--r--utils/hp2ps/Reorder.h5
-rw-r--r--utils/hp2ps/Scale.h5
-rw-r--r--utils/hp2ps/Shade.h5
-rw-r--r--utils/hp2ps/TopTwenty.h5
-rw-r--r--utils/hp2ps/TraceElement.h5
-rw-r--r--utils/hp2ps/Utilities.h5
-rw-r--r--utils/lndir/lndir-Xos.h5
-rw-r--r--utils/lndir/lndir-Xosdefs.h5
183 files changed, 191 insertions, 742 deletions
diff --git a/compiler/HsVersions.h b/compiler/HsVersions.h
index 4a0b04ad70..a4ec3e4c40 100644
--- a/compiler/HsVersions.h
+++ b/compiler/HsVersions.h
@@ -1,5 +1,4 @@
-#ifndef HSVERSIONS_H
-#define HSVERSIONS_H
+#pragma once
#if 0
@@ -64,6 +63,3 @@ foreign import ccall unsafe saccessor \
#define ASSERTM(e) do { bool <- e; MASSERT(bool) }
#define ASSERTM2(e,msg) do { bool <- e; MASSERT2(bool,msg) }
#define WARNM2(e,msg) do { bool <- e; WARN(bool, msg) return () }
-
-#endif /* HsVersions.h */
-
diff --git a/compiler/nativeGen/NCG.h b/compiler/nativeGen/NCG.h
index bca1de41e3..e7e20768b6 100644
--- a/compiler/nativeGen/NCG.h
+++ b/compiler/nativeGen/NCG.h
@@ -6,9 +6,6 @@
-------------------------------------------------------------------------- */
-#ifndef NCG_H
-#define NCG_H
+#pragma once
#include "ghc_boot_platform.h"
-
-#endif
diff --git a/compiler/utils/md5.h b/compiler/utils/md5.h
index 10c8dabd43..0b31f9019c 100644
--- a/compiler/utils/md5.h
+++ b/compiler/utils/md5.h
@@ -1,6 +1,5 @@
/* MD5 message digest */
-#ifndef _MD5_H
-#define _MD5_H
+#pragma once
#include "HsFFI.h"
@@ -17,8 +16,3 @@ void MD5Init(struct MD5Context *context);
void MD5Update(struct MD5Context *context, byte const *buf, int len);
void MD5Final(byte digest[16], struct MD5Context *context);
void MD5Transform(word32 buf[4], word32 const in[16]);
-
-#endif /* _MD5_H */
-
-
-
diff --git a/driver/utils/isMinTTY.h b/driver/utils/isMinTTY.h
index 22e9a473cc..74ae5c848a 100644
--- a/driver/utils/isMinTTY.h
+++ b/driver/utils/isMinTTY.h
@@ -1,8 +1,5 @@
-#ifndef ISMINTTY_H
-#define ISMINTTY_H
+#pragma once
#include <stdbool.h>
bool isMinTTY();
-
-#endif /* ISMINTTY_H */
diff --git a/includes/Cmm.h b/includes/Cmm.h
index 276348a6c9..779416b6da 100644
--- a/includes/Cmm.h
+++ b/includes/Cmm.h
@@ -25,8 +25,7 @@
*
* -------------------------------------------------------------------------- */
-#ifndef CMM_H
-#define CMM_H
+#pragma once
/*
* In files that are included into both C and C-- (and perhaps
@@ -942,5 +941,3 @@
} \
\
return (dst);
-
-#endif /* CMM_H */
diff --git a/includes/HsFFI.h b/includes/HsFFI.h
index 53478a7a5e..bee942c44c 100644
--- a/includes/HsFFI.h
+++ b/includes/HsFFI.h
@@ -9,8 +9,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef HSFFI_H
-#define HSFFI_H
+#pragma once
#ifdef __cplusplus
extern "C" {
@@ -122,5 +121,3 @@ extern void hs_try_putmvar (int capability, HsStablePtr sp);
#ifdef __cplusplus
}
#endif
-
-#endif /* HSFFI_H */
diff --git a/includes/MachDeps.h b/includes/MachDeps.h
index 380b3fb061..778975ea3c 100644
--- a/includes/MachDeps.h
+++ b/includes/MachDeps.h
@@ -13,8 +13,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef MACHDEPS_H
-#define MACHDEPS_H
+#pragma once
/* Don't allow stage1 (cross-)compiler embed assumptions about target
* platform. When ghc-stage1 is being built by ghc-stage0 is should not
@@ -122,5 +121,3 @@
#define TAG_MASK ((1 << TAG_BITS) - 1)
#endif /* !defined(STAGE) || STAGE >= 2 */
-
-#endif /* MACHDEPS_H */
diff --git a/includes/Rts.h b/includes/Rts.h
index be49b326f2..b36fc94a5e 100644
--- a/includes/Rts.h
+++ b/includes/Rts.h
@@ -10,8 +10,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef RTS_H
-#define RTS_H
+#pragma once
#ifdef __cplusplus
extern "C" {
@@ -313,5 +312,3 @@ TICK_VAR(2)
#ifdef __cplusplus
}
#endif
-
-#endif /* RTS_H */
diff --git a/includes/RtsAPI.h b/includes/RtsAPI.h
index e5326f759b..f9b561800d 100644
--- a/includes/RtsAPI.h
+++ b/includes/RtsAPI.h
@@ -9,8 +9,7 @@
*
* --------------------------------------------------------------------------*/
-#ifndef RTSAPI_H
-#define RTSAPI_H
+#pragma once
#ifdef __cplusplus
extern "C" {
@@ -445,5 +444,3 @@ extern StgWord base_GHCziTopHandler_runNonIO_closure[];
#ifdef __cplusplus
}
#endif
-
-#endif /* RTSAPI_H */
diff --git a/includes/Stg.h b/includes/Stg.h
index 619984d8e5..ff5e3174c0 100644
--- a/includes/Stg.h
+++ b/includes/Stg.h
@@ -23,8 +23,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef STG_H
-#define STG_H
+#pragma once
#if !(__STDC_VERSION__ >= 199901L)
# error __STDC_VERSION__ does not advertise C99 or later
@@ -567,5 +566,3 @@ typedef union {
c; \
})
#endif
-
-#endif /* STG_H */
diff --git a/includes/ghcconfig.h b/includes/ghcconfig.h
index 5f10e923fd..7b99835a23 100644
--- a/includes/ghcconfig.h
+++ b/includes/ghcconfig.h
@@ -1,7 +1,4 @@
-#ifndef __GHCCONFIG_H__
-#define __GHCCONFIG_H__
+#pragma once
#include "ghcautoconf.h"
#include "ghcplatform.h"
-
-#endif
diff --git a/includes/rts/Adjustor.h b/includes/rts/Adjustor.h
index 5e96a072fb..49fd62652d 100644
--- a/includes/rts/Adjustor.h
+++ b/includes/rts/Adjustor.h
@@ -11,8 +11,7 @@
*
* -------------------------------------------------------------------------- */
-#ifndef RTS_ADJUSTOR_H
-#define RTS_ADJUSTOR_H
+#pragma once
/* Creating and destroying an adjustor thunk */
void* createAdjustor (int cconv,
@@ -21,5 +20,3 @@ void* createAdjustor (int cconv,
char *typeString);
void freeHaskellFunctionPtr (void* ptr);
-
-#endif /* RTS_ADJUSTOR_H */
diff --git a/includes/rts/BlockSignals.h b/includes/rts/BlockSignals.h
index 166d7bb3fe..23bc9859e0 100644
--- a/includes/rts/BlockSignals.h
+++ b/includes/rts/BlockSignals.h
@@ -11,8 +11,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef RTS_BLOCKSIGNALS_H
-#define RTS_BLOCKSIGNALS_H
+#pragma once
/* Used by runProcess() in the process package
*/
@@ -33,5 +32,3 @@ void blockUserSignals(void);
* The inverse of blockUserSignals(); re-enable the deliver of console events.
*/
void unblockUserSignals(void);
-
-#endif /* RTS_BLOCKSIGNALS_H */
diff --git a/includes/rts/Config.h b/includes/rts/Config.h
index 51ee74fdb8..43057773f2 100644
--- a/includes/rts/Config.h
+++ b/includes/rts/Config.h
@@ -13,8 +13,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef RTS_CONFIG_H
-#define RTS_CONFIG_H
+#pragma once
#if defined(TICKY_TICKY) && defined(THREADED_RTS)
#error TICKY_TICKY is incompatible with THREADED_RTS
@@ -47,5 +46,3 @@
/* Profile spin locks */
#define PROF_SPIN
-
-#endif /* RTS_CONFIG_H */
diff --git a/includes/rts/Constants.h b/includes/rts/Constants.h
index 62fa833173..27097bf45b 100644
--- a/includes/rts/Constants.h
+++ b/includes/rts/Constants.h
@@ -17,8 +17,7 @@
*
* -------------------------------------------------------------------------- */
-#ifndef RTS_CONSTANTS_H
-#define RTS_CONSTANTS_H
+#pragma once
/* -----------------------------------------------------------------------------
Minimum closure sizes
@@ -314,5 +313,3 @@
* we can have static arrays of this size in the RTS for speed.
*/
#define MAX_NUMA_NODES 16
-
-#endif /* RTS_CONSTANTS_H */
diff --git a/includes/rts/EventLogFormat.h b/includes/rts/EventLogFormat.h
index d6838abd8a..160aa19303 100644
--- a/includes/rts/EventLogFormat.h
+++ b/includes/rts/EventLogFormat.h
@@ -73,8 +73,7 @@
*
* -------------------------------------------------------------------------- */
-#ifndef RTS_EVENTLOGFORMAT_H
-#define RTS_EVENTLOGFORMAT_H
+#pragma once
/*
* Markers for begin/end of the Header.
@@ -245,5 +244,3 @@ typedef StgWord64 EventTaskId; /* for EVENT_TASK_* */
typedef StgWord64 EventKernelThreadId; /* for EVENT_TASK_CREATE */
#endif
-
-#endif /* RTS_EVENTLOGFORMAT_H */
diff --git a/includes/rts/EventLogWriter.h b/includes/rts/EventLogWriter.h
index f9cb25fe62..829b0f2697 100644
--- a/includes/rts/EventLogWriter.h
+++ b/includes/rts/EventLogWriter.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef EVENTLOG_WRITER_H
-#define EVENTLOG_WRITER_H
+#pragma once
#include <stddef.h>
#include <stdbool.h>
@@ -36,5 +35,3 @@ typedef struct {
* a file `program.eventlog`.
*/
extern const EventLogWriter FileEventLogWriter;
-
-#endif /* EVENTLOG_WRITER_H */
diff --git a/includes/rts/FileLock.h b/includes/rts/FileLock.h
index e4c7c66fa7..8bc08141cf 100644
--- a/includes/rts/FileLock.h
+++ b/includes/rts/FileLock.h
@@ -11,12 +11,9 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef RTS_FILELOCK_H
-#define RTS_FILELOCK_H
+#pragma once
#include "Stg.h"
int lockFile(int fd, StgWord64 dev, StgWord64 ino, int for_writing);
int unlockFile(int fd);
-
-#endif /* RTS_FILELOCK_H */
diff --git a/includes/rts/Flags.h b/includes/rts/Flags.h
index 5195a3a627..405fce166d 100644
--- a/includes/rts/Flags.h
+++ b/includes/rts/Flags.h
@@ -11,8 +11,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef RTS_FLAGS_H
-#define RTS_FLAGS_H
+#pragma once
#include <stdio.h>
#include <stdint.h>
@@ -282,5 +281,3 @@ extern char **prog_argv;
*/
extern int rts_argc; /* ditto */
extern char **rts_argv;
-
-#endif /* RTS_FLAGS_H */
diff --git a/includes/rts/GetTime.h b/includes/rts/GetTime.h
index e5dbd9e238..5b75b01bb8 100644
--- a/includes/rts/GetTime.h
+++ b/includes/rts/GetTime.h
@@ -11,9 +11,6 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef RTS_GETTIME_H
-#define RTS_GETTIME_H
+#pragma once
StgWord64 getMonotonicNSec (void);
-
-#endif /* RTS_GETTIME_H */
diff --git a/includes/rts/Globals.h b/includes/rts/Globals.h
index e3ff643556..63d26e7814 100644
--- a/includes/rts/Globals.h
+++ b/includes/rts/Globals.h
@@ -14,8 +14,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef RTS_GLOBALS_H
-#define RTS_GLOBALS_H
+#pragma once
#define mkStoreAccessorPrototype(name) \
StgStablePtr \
@@ -35,5 +34,3 @@ mkStoreAccessorPrototype(LibHSghcInitLinkerDone)
mkStoreAccessorPrototype(LibHSghcGlobalDynFlags)
mkStoreAccessorPrototype(LibHSghcStaticOptions)
mkStoreAccessorPrototype(LibHSghcStaticOptionsReady)
-
-#endif /* RTS_GLOBALS_H */
diff --git a/includes/rts/Hpc.h b/includes/rts/Hpc.h
index d70d1db829..58d4813ac1 100644
--- a/includes/rts/Hpc.h
+++ b/includes/rts/Hpc.h
@@ -11,8 +11,7 @@
*
* -------------------------------------------------------------------------- */
-#ifndef RTS_HPC_H
-#define RTS_HPC_H
+#pragma once
// Simple linked list of modules
typedef struct _HpcModuleInfo {
@@ -33,5 +32,3 @@ HpcModuleInfo * hs_hpc_rootModule (void);
void startupHpc(void);
void exitHpc(void);
-
-#endif /* RTS_HPC_H */
diff --git a/includes/rts/IOManager.h b/includes/rts/IOManager.h
index f9e2cd7958..5d79a64b00 100644
--- a/includes/rts/IOManager.h
+++ b/includes/rts/IOManager.h
@@ -11,8 +11,7 @@
*
* -------------------------------------------------------------------------- */
-#ifndef RTS_IOMANAGER_H
-#define RTS_IOMANAGER_H
+#pragma once
#if defined(mingw32_HOST_OS)
@@ -42,5 +41,3 @@ void ioManagerWakeup (void);
void ioManagerDie (void);
void ioManagerStart (void);
#endif
-
-#endif /* RTS_IOMANAGER_H */
diff --git a/includes/rts/Libdw.h b/includes/rts/Libdw.h
index 6a3b95e462..391847552e 100644
--- a/includes/rts/Libdw.h
+++ b/includes/rts/Libdw.h
@@ -6,10 +6,7 @@
*
* --------------------------------------------------------------------------*/
-#include "Rts.h"
-
-#ifndef RTS_LIBDW_H
-#define RTS_LIBDW_H
+#pragma once
// Chunk capacity
// This is rather arbitrary
@@ -92,5 +89,3 @@ Backtrace *libdwGetBacktrace(LibdwSession *session);
/* Lookup Location information for the given address.
* Returns 0 if successful, 1 if address could not be found. */
int libdwLookupLocation(LibdwSession *session, Location *loc, StgPtr pc);
-
-#endif /* RTS_LIBDW_H */
diff --git a/includes/rts/LibdwPool.h b/includes/rts/LibdwPool.h
index 3360192725..76ff41c8c7 100644
--- a/includes/rts/LibdwPool.h
+++ b/includes/rts/LibdwPool.h
@@ -6,8 +6,7 @@
*
* --------------------------------------------------------------------------*/
-#ifndef RTS_LIBDW_POOL_H
-#define RTS_LIBDW_POOL_H
+#pragma once
/* Claim a session from the pool */
LibdwSession *libdwPoolTake(void);
@@ -18,5 +17,3 @@ void libdwPoolRelease(LibdwSession *sess);
/* Free any sessions in the pool forcing a reload of any loaded debug
* information */
void libdwPoolClear(void);
-
-#endif /* RTS_LIBDW_POOL_H */
diff --git a/includes/rts/Linker.h b/includes/rts/Linker.h
index 34bf0df741..793195b3ab 100644
--- a/includes/rts/Linker.h
+++ b/includes/rts/Linker.h
@@ -11,8 +11,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef RTS_LINKER_H
-#define RTS_LINKER_H
+#pragma once
#if defined(mingw32_HOST_OS)
typedef wchar_t pathchar;
@@ -86,5 +85,3 @@ pathchar* findSystemLibrary(pathchar* dll_name);
/* called by the initialization code for a module, not a user API */
StgStablePtr foreignExportStablePtr (StgPtr p);
-
-#endif /* RTS_LINKER_H */
diff --git a/includes/rts/Main.h b/includes/rts/Main.h
index 1c332fc95c..05924ad92b 100644
--- a/includes/rts/Main.h
+++ b/includes/rts/Main.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef RTSMAIN_H
-#define RTSMAIN_H
+#pragma once
/* -----------------------------------------------------------------------------
* The entry point for Haskell programs that use a Haskell main function
@@ -17,5 +16,3 @@ int hs_main (int argc, char *argv[], // program args
StgClosure *main_closure, // closure for Main.main
RtsConfig rts_config) // RTS configuration
GNUC3_ATTRIBUTE(__noreturn__);
-
-#endif /* RTSMAIN_H */
diff --git a/includes/rts/Messages.h b/includes/rts/Messages.h
index 85ffddaffd..2a6a84b821 100644
--- a/includes/rts/Messages.h
+++ b/includes/rts/Messages.h
@@ -14,8 +14,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef RTS_MESSAGES_H
-#define RTS_MESSAGES_H
+#pragma once
#include <stdarg.h>
@@ -102,5 +101,3 @@ extern RtsMsgFunction rtsFatalInternalErrorFn;
extern RtsMsgFunction rtsDebugMsgFn;
extern RtsMsgFunction rtsErrorMsgFn;
extern RtsMsgFunction rtsSysErrorMsgFn;
-
-#endif /* RTS_MESSAGES_H */
diff --git a/includes/rts/OSThreads.h b/includes/rts/OSThreads.h
index 2ebbd1e0f1..05e52d919a 100644
--- a/includes/rts/OSThreads.h
+++ b/includes/rts/OSThreads.h
@@ -12,8 +12,7 @@
*
* --------------------------------------------------------------------------*/
-#ifndef RTS_OSTHREADS_H
-#define RTS_OSTHREADS_H
+#pragma once
#if defined(HAVE_PTHREAD_H) && !defined(mingw32_HOST_OS)
@@ -257,5 +256,3 @@ typedef StgWord64 KernelThreadId;
KernelThreadId kernelThreadId (void);
#endif /* CMINUSMINUS */
-
-#endif /* RTS_OSTHREADS_H */
diff --git a/includes/rts/Parallel.h b/includes/rts/Parallel.h
index 2c84327729..de1c6e1fae 100644
--- a/includes/rts/Parallel.h
+++ b/includes/rts/Parallel.h
@@ -11,9 +11,6 @@
*
* -------------------------------------------------------------------------- */
-#ifndef RTS_PARALLEL_H
-#define RTS_PARALLEL_H
+#pragma once
StgInt newSpark (StgRegTable *reg, StgClosure *p);
-
-#endif /* RTS_PARALLEL_H */
diff --git a/includes/rts/PrimFloat.h b/includes/rts/PrimFloat.h
index 248ea6246f..835a18aac4 100644
--- a/includes/rts/PrimFloat.h
+++ b/includes/rts/PrimFloat.h
@@ -9,12 +9,9 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef RTS_PRIMFLOAT_H
-#define RTS_PRIMFLOAT_H
+#pragma once
StgDouble __int_encodeDouble (I_ j, I_ e);
StgFloat __int_encodeFloat (I_ j, I_ e);
StgDouble __word_encodeDouble (W_ j, I_ e);
StgFloat __word_encodeFloat (W_ j, I_ e);
-
-#endif /* RTS_PRIMFLOAT_H */
diff --git a/includes/rts/Signals.h b/includes/rts/Signals.h
index 22cbe4ad77..d321b0d0c4 100644
--- a/includes/rts/Signals.h
+++ b/includes/rts/Signals.h
@@ -11,8 +11,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef RTS_SIGNALS_H
-#define RTS_SIGNALS_H
+#pragma once
/* NB. #included in Haskell code, no prototypes in here. */
@@ -22,5 +21,3 @@
#define STG_SIG_ERR (-3)
#define STG_SIG_HAN (-4)
#define STG_SIG_RST (-5)
-
-#endif /* RTS_SIGNALS_H */
diff --git a/includes/rts/SpinLock.h b/includes/rts/SpinLock.h
index dccd86705c..6530a3a2f0 100644
--- a/includes/rts/SpinLock.h
+++ b/includes/rts/SpinLock.h
@@ -19,9 +19,8 @@
*
* -------------------------------------------------------------------------- */
-#ifndef RTS_SPINLOCK_H
-#define RTS_SPINLOCK_H
-
+#pragma once
+
#if defined(THREADED_RTS)
#if defined(PROF_SPIN)
@@ -112,6 +111,3 @@ INLINE_HEADER void initSpinLock(void * p STG_UNUSED)
{ /* nothing */ }
#endif /* THREADED_RTS */
-
-#endif /* RTS_SPINLOCK_H */
-
diff --git a/includes/rts/Stable.h b/includes/rts/Stable.h
index f75b9ab806..75fcf4f7eb 100644
--- a/includes/rts/Stable.h
+++ b/includes/rts/Stable.h
@@ -11,8 +11,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef RTS_STABLE_H
-#define RTS_STABLE_H
+#pragma once
EXTERN_INLINE StgPtr deRefStablePtr (StgStablePtr stable_ptr);
StgStablePtr getStablePtr (StgPtr p);
@@ -39,5 +38,3 @@ StgPtr deRefStablePtr(StgStablePtr sp)
{
return stable_ptr_table[(StgWord)sp].addr;
}
-
-#endif /* RTS_STABLE_H */
diff --git a/includes/rts/StaticPtrTable.h b/includes/rts/StaticPtrTable.h
index e536f4b496..97a1720823 100644
--- a/includes/rts/StaticPtrTable.h
+++ b/includes/rts/StaticPtrTable.h
@@ -11,8 +11,7 @@
*
* -------------------------------------------------------------------------- */
-#ifndef RTS_STATICPTRTABLE_H
-#define RTS_STATICPTRTABLE_H
+#pragma once
/** Inserts an entry in the Static Pointer Table.
*
@@ -43,5 +42,3 @@ void hs_spt_insert_stableptr(StgWord64 key[2], StgStablePtr *entry);
*
* */
void hs_spt_remove (StgWord64 key[2]);
-
-#endif /* RTS_STATICPTRTABLE_H */
diff --git a/includes/rts/TTY.h b/includes/rts/TTY.h
index f0b4225fbf..3555818c4a 100644
--- a/includes/rts/TTY.h
+++ b/includes/rts/TTY.h
@@ -11,10 +11,7 @@
*
* -------------------------------------------------------------------------- */
-#ifndef RTS_TTY_H
-#define RTS_TTY_H
+#pragma once
void* __hscore_get_saved_termios(int fd);
void __hscore_set_saved_termios(int fd, void* ts);
-
-#endif /* RTS_TTY_H */
diff --git a/includes/rts/Threads.h b/includes/rts/Threads.h
index f45d351c2b..17a64c1ba0 100644
--- a/includes/rts/Threads.h
+++ b/includes/rts/Threads.h
@@ -12,8 +12,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef RTS_THREADS_H
-#define RTS_THREADS_H
+#pragma once
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
@@ -75,5 +74,3 @@ extern Capability MainCapability;
// current value at the moment).
//
extern void setNumCapabilities (uint32_t new_);
-
-#endif /* RTS_THREADS_H */
diff --git a/includes/rts/Ticky.h b/includes/rts/Ticky.h
index ff4d44a0d0..de4e518430 100644
--- a/includes/rts/Ticky.h
+++ b/includes/rts/Ticky.h
@@ -11,8 +11,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef RTS_TICKY_H
-#define RTS_TICKY_H
+#pragma once
/* -----------------------------------------------------------------------------
The StgEntCounter type - needed regardless of TICKY_TICKY
@@ -31,5 +30,3 @@ typedef struct _StgEntCounter {
StgInt allocs; /* number of allocations by this fun */
struct _StgEntCounter *link;/* link to chain them all together */
} StgEntCounter;
-
-#endif /* RTS_TICKY_H */
diff --git a/includes/rts/Time.h b/includes/rts/Time.h
index a1debedea0..5fa166e125 100644
--- a/includes/rts/Time.h
+++ b/includes/rts/Time.h
@@ -9,8 +9,7 @@
*
* --------------------------------------------------------------------------*/
-#ifndef RTSTIME_H
-#define RTSTIME_H
+#pragma once
// For most time values in the RTS we use a fixed resolution of nanoseconds,
// normalising the time we get from platform-dependent APIs to this
@@ -39,5 +38,3 @@ INLINE_HEADER Time fsecondsToTime (double t)
{
return (Time)(t * TIME_RESOLUTION);
}
-
-#endif // RTSTIME_H
diff --git a/includes/rts/Timer.h b/includes/rts/Timer.h
index ca039537d3..f0a63d8d39 100644
--- a/includes/rts/Timer.h
+++ b/includes/rts/Timer.h
@@ -11,11 +11,8 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef RTS_TIMER_H
-#define RTS_TIMER_H
+#pragma once
void startTimer (void);
void stopTimer (void);
int rtsTimerSignal (void);
-
-#endif /* RTS_TIMER_H */
diff --git a/includes/rts/Types.h b/includes/rts/Types.h
index 4b0e680ae5..242b831819 100644
--- a/includes/rts/Types.h
+++ b/includes/rts/Types.h
@@ -11,8 +11,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef RTS_TYPES_H
-#define RTS_TYPES_H
+#pragma once
#include <stddef.h>
#include <stdbool.h>
@@ -30,5 +29,3 @@ typedef unsigned int nat __attribute__((deprecated)); /* uint32_t */
typedef struct StgClosure_ StgClosure;
typedef struct StgInfoTable_ StgInfoTable;
typedef struct StgTSO_ StgTSO;
-
-#endif /* RTS_TYPES_H */
diff --git a/includes/rts/Utils.h b/includes/rts/Utils.h
index a4a57ab332..4ab025b887 100644
--- a/includes/rts/Utils.h
+++ b/includes/rts/Utils.h
@@ -10,10 +10,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef RTS_UTILS_H
-#define RTS_UTILS_H
+#pragma once
/* Alternate to raise(3) for threaded rts, for BSD-based OSes */
int genericRaise(int sig);
-
-#endif /* RTS_UTILS_H */
diff --git a/includes/rts/prof/CCS.h b/includes/rts/prof/CCS.h
index 1ed53c1d7c..4805063a0f 100644
--- a/includes/rts/prof/CCS.h
+++ b/includes/rts/prof/CCS.h
@@ -11,8 +11,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef RTS_PROF_CCS_H
-#define RTS_PROF_CCS_H
+#pragma once
/* -----------------------------------------------------------------------------
* Data Structures
@@ -253,5 +252,3 @@ extern CostCentreStack * RTS_VAR(CCS_LIST); // registered CCS list
#define ENTER_CCS_THUNK(cap,p) doNothing()
#endif /* PROFILING */
-
-#endif /* RTS_PROF_CCS_H */
diff --git a/includes/rts/prof/LDV.h b/includes/rts/prof/LDV.h
index 7d6f9ff409..fdbab4d901 100644
--- a/includes/rts/prof/LDV.h
+++ b/includes/rts/prof/LDV.h
@@ -11,8 +11,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef RTS_PROF_LDV_H
-#define RTS_PROF_LDV_H
+#pragma once
#ifdef PROFILING
@@ -43,5 +42,3 @@
#define LDV_RECORD_CREATE(c) /* nothing */
#endif /* PROFILING */
-
-#endif /* STGLDVPROF_H */
diff --git a/includes/rts/storage/Block.h b/includes/rts/storage/Block.h
index 7d6f102ab8..3c6f2b1fba 100644
--- a/includes/rts/storage/Block.h
+++ b/includes/rts/storage/Block.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef RTS_STORAGE_BLOCK_H
-#define RTS_STORAGE_BLOCK_H
+#pragma once
#include "ghcconfig.h"
@@ -351,4 +350,3 @@ round_up_to_mblocks(StgWord words)
}
#endif /* !CMINUSMINUS */
-#endif /* RTS_STORAGE_BLOCK_H */
diff --git a/includes/rts/storage/ClosureMacros.h b/includes/rts/storage/ClosureMacros.h
index c8c270fdfe..af77df37b5 100644
--- a/includes/rts/storage/ClosureMacros.h
+++ b/includes/rts/storage/ClosureMacros.h
@@ -6,8 +6,7 @@
*
* -------------------------------------------------------------------------- */
-#ifndef RTS_STORAGE_CLOSUREMACROS_H
-#define RTS_STORAGE_CLOSUREMACROS_H
+#pragma once
/* -----------------------------------------------------------------------------
Info tables are slammed up against the entry code, and the label
@@ -596,5 +595,3 @@ EXTERN_INLINE void overwritingClosureOfs (StgClosure *p, uint32_t offset)
for (i = offset; i < size; i++)
((StgWord *)p)[i] = 0;
}
-
-#endif /* RTS_STORAGE_CLOSUREMACROS_H */
diff --git a/includes/rts/storage/ClosureTypes.h b/includes/rts/storage/ClosureTypes.h
index 234e00b174..68cc919257 100644
--- a/includes/rts/storage/ClosureTypes.h
+++ b/includes/rts/storage/ClosureTypes.h
@@ -7,8 +7,7 @@
*
* -------------------------------------------------------------------------- */
-#ifndef RTS_STORAGE_CLOSURETYPES_H
-#define RTS_STORAGE_CLOSURETYPES_H
+#pragma once
/*
* WARNING WARNING WARNING
@@ -83,5 +82,3 @@
#define SMALL_MUT_ARR_PTRS_FROZEN 62
#define COMPACT_NFDATA 63
#define N_CLOSURE_TYPES 64
-
-#endif /* RTS_STORAGE_CLOSURETYPES_H */
diff --git a/includes/rts/storage/Closures.h b/includes/rts/storage/Closures.h
index 2c62552b2f..f5baead002 100644
--- a/includes/rts/storage/Closures.h
+++ b/includes/rts/storage/Closures.h
@@ -6,8 +6,7 @@
*
* -------------------------------------------------------------------------- */
-#ifndef RTS_STORAGE_CLOSURES_H
-#define RTS_STORAGE_CLOSURES_H
+#pragma once
/*
* The Layout of a closure header depends on which kind of system we're
@@ -475,6 +474,3 @@ typedef struct StgCompactNFData_ {
// Used temporarily to store the result of compaction. Doesn't need to be
// a GC root.
} StgCompactNFData;
-
-
-#endif /* RTS_STORAGE_CLOSURES_H */
diff --git a/includes/rts/storage/FunTypes.h b/includes/rts/storage/FunTypes.h
index 8c565888c1..27858fb82b 100644
--- a/includes/rts/storage/FunTypes.h
+++ b/includes/rts/storage/FunTypes.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef RTS_STORAGE_FUNTYPES_H
-#define RTS_STORAGE_FUNTYPES_H
+#pragma once
/* generic - function comes with a small bitmap */
#define ARG_GEN 0
@@ -53,5 +52,3 @@
#define ARG_PPPPPP 26
#define ARG_PPPPPPP 27
#define ARG_PPPPPPPP 28
-
-#endif /* RTS_STORAGE_FUNTYPES_H */
diff --git a/includes/rts/storage/GC.h b/includes/rts/storage/GC.h
index ddc4238592..387bd260d3 100644
--- a/includes/rts/storage/GC.h
+++ b/includes/rts/storage/GC.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef RTS_STORAGE_GC_H
-#define RTS_STORAGE_GC_H
+#pragma once
#include <stddef.h>
#include "rts/OSThreads.h"
@@ -241,5 +240,3 @@ INLINE_HEADER void initBdescr(bdescr *bd, generation *gen, generation *dest)
bd->gen_no = gen->no;
bd->dest_no = dest->no;
}
-
-#endif /* RTS_STORAGE_GC_H */
diff --git a/includes/rts/storage/InfoTables.h b/includes/rts/storage/InfoTables.h
index 307aac371c..e732a30daf 100644
--- a/includes/rts/storage/InfoTables.h
+++ b/includes/rts/storage/InfoTables.h
@@ -6,8 +6,7 @@
*
* -------------------------------------------------------------------------- */
-#ifndef RTS_STORAGE_INFOTABLES_H
-#define RTS_STORAGE_INFOTABLES_H
+#pragma once
/* ----------------------------------------------------------------------------
Relative pointers
@@ -394,5 +393,3 @@ typedef struct StgConInfoTable_ {
#else
#define GET_PROF_DESC(info) ((info)->prof.closure_desc)
#endif
-
-#endif /* RTS_STORAGE_INFOTABLES_H */
diff --git a/includes/rts/storage/MBlock.h b/includes/rts/storage/MBlock.h
index a8251c8c0b..9fbe92ec7d 100644
--- a/includes/rts/storage/MBlock.h
+++ b/includes/rts/storage/MBlock.h
@@ -9,8 +9,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef RTS_STORAGE_MBLOCK_H
-#define RTS_STORAGE_MBLOCK_H
+#pragma once
extern W_ peak_mblocks_allocated;
extern W_ mblocks_allocated;
@@ -31,5 +30,3 @@ extern void *getNextMBlock(void **state, void *mblock);
// needed for HEAP_ALLOCED below
extern SpinLock gc_alloc_block_sync;
#endif
-
-#endif /* RTS_STORAGE_MBLOCK_H */
diff --git a/includes/rts/storage/TSO.h b/includes/rts/storage/TSO.h
index fd32919e9d..e50e336a32 100644
--- a/includes/rts/storage/TSO.h
+++ b/includes/rts/storage/TSO.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef RTS_STORAGE_TSO_H
-#define RTS_STORAGE_TSO_H
+#pragma once
/*
* PROFILING info in a TSO
@@ -260,5 +259,3 @@ void dirty_STACK (Capability *cap, StgStack *stack);
/* this is the NIL ptr for a TSO queue (e.g. runnable queue) */
#define END_TSO_QUEUE ((StgTSO *)(void*)&stg_END_TSO_QUEUE_closure)
-
-#endif /* RTS_STORAGE_TSO_H */
diff --git a/includes/stg/DLL.h b/includes/stg/DLL.h
index 8ab5d8c3d4..cf857a8682 100644
--- a/includes/stg/DLL.h
+++ b/includes/stg/DLL.h
@@ -11,8 +11,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef __STGDLL_H__
-#define __STGDLL_H__ 1
+#pragma once
#if defined(COMPILING_WINDOWS_DLL)
# if defined(x86_64_HOST_ARCH)
@@ -71,5 +70,3 @@
#else
#define DLL_IMPORT_STDLIB DLLIMPORT
#endif
-
-#endif /* __STGDLL_H__ */
diff --git a/includes/stg/HaskellMachRegs.h b/includes/stg/HaskellMachRegs.h
index e95cefd822..37e687bc4e 100644
--- a/includes/stg/HaskellMachRegs.h
+++ b/includes/stg/HaskellMachRegs.h
@@ -12,8 +12,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef HASKELLMACHREGS_H
-#define HASKELLMACHREGS_H
+#pragma once
/*
* Defining NO_REGS causes no global registers to be used. NO_REGS is
@@ -45,5 +44,3 @@
#endif
#include "MachRegs.h"
-
-#endif /* HASKELLMACHREGS_H */
diff --git a/includes/stg/MachRegs.h b/includes/stg/MachRegs.h
index 232ce03810..a0cf595505 100644
--- a/includes/stg/MachRegs.h
+++ b/includes/stg/MachRegs.h
@@ -12,8 +12,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef MACHREGS_H
-#define MACHREGS_H
+#pragma once
/* This file is #included into Haskell code in the compiler: #defines
* only in here please.
@@ -714,5 +713,3 @@ the stack. See Note [Overlapping global registers] for implications.
#else
#undef NO_ARG_REGS
#endif
-
-#endif /* MACHREGS_H */
diff --git a/includes/stg/MiscClosures.h b/includes/stg/MiscClosures.h
index 9d907ab3ba..1181abcca4 100644
--- a/includes/stg/MiscClosures.h
+++ b/includes/stg/MiscClosures.h
@@ -17,8 +17,7 @@
*
* --------------------------------------------------------------------------*/
-#ifndef STGMISCCLOSURES_H
-#define STGMISCCLOSURES_H
+#pragma once
#if IN_STG_CODE
# define RTS_RET_INFO(i) extern W_(i)[]
@@ -532,5 +531,3 @@ void * pushCostCentre (void *ccs, void *cc);
extern unsigned int n_capabilities;
#endif
-
-#endif /* STGMISCCLOSURES_H */
diff --git a/includes/stg/Prim.h b/includes/stg/Prim.h
index 9872512701..fa3a3ec91f 100644
--- a/includes/stg/Prim.h
+++ b/includes/stg/Prim.h
@@ -11,8 +11,7 @@
*
* -------------------------------------------------------------------------- */
-#ifndef PRIM_H
-#define PRIM_H
+#pragma once
/* libraries/ghc-prim/cbits/atomic.c */
StgWord hs_atomic_add8(StgWord x, StgWord val);
@@ -81,5 +80,3 @@ StgWord hs_ctz8(StgWord x);
StgWord hs_ctz16(StgWord x);
StgWord hs_ctz32(StgWord x);
StgWord hs_ctz64(StgWord64 x);
-
-#endif /* PRIM_H */
diff --git a/includes/stg/Regs.h b/includes/stg/Regs.h
index 36324632d2..cf9e306504 100644
--- a/includes/stg/Regs.h
+++ b/includes/stg/Regs.h
@@ -11,8 +11,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef REGS_H
-#define REGS_H
+#pragma once
/*
* The STG machine has a collection of "registers", each one of which
@@ -527,5 +526,3 @@ GLOBAL_REG_DECL(bdescr *,HpAlloc,REG_HpAlloc)
#define stg_gc_fun (FunReg->stgGCFun)
#endif /* IN_STG_CODE */
-
-#endif /* REGS_H */
diff --git a/includes/stg/RtsMachRegs.h b/includes/stg/RtsMachRegs.h
index 29262dc17a..5a0464b909 100644
--- a/includes/stg/RtsMachRegs.h
+++ b/includes/stg/RtsMachRegs.h
@@ -12,8 +12,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef RTSMACHREGS_H
-#define RTSMACHREGS_H
+#pragma once
#ifdef UnregisterisedCompiler
#ifndef NO_REGS
@@ -51,5 +50,3 @@
#endif
#include "MachRegs.h"
-
-#endif /* RTSMACHREGS_H */
diff --git a/includes/stg/SMP.h b/includes/stg/SMP.h
index 0e806b6716..e4ae6121fa 100644
--- a/includes/stg/SMP.h
+++ b/includes/stg/SMP.h
@@ -11,8 +11,7 @@
*
* -------------------------------------------------------------------------- */
-#ifndef SMP_H
-#define SMP_H
+#pragma once
#if arm_HOST_ARCH && defined(arm_HOST_ARCH_PRE_ARMv6)
void arm_atomic_spin_lock(void);
@@ -299,5 +298,3 @@ atomic_dec(StgVolatilePtr p)
#define VOLATILE_LOAD(p) ((StgWord)*((StgWord*)(p)))
#endif /* !THREADED_RTS */
-
-#endif /* SMP_H */
diff --git a/includes/stg/Ticky.h b/includes/stg/Ticky.h
index 5143c2fd5c..1e16a1ae08 100644
--- a/includes/stg/Ticky.h
+++ b/includes/stg/Ticky.h
@@ -11,8 +11,7 @@
*
* -------------------------------------------------------------------------- */
-#ifndef TICKYCOUNTERS_H
-#define TICKYCOUNTERS_H
+#pragma once
/* These should probably be automatically generated in order to
keep them consistent with the macros that use them (which are
@@ -215,6 +214,3 @@ EXTERN StgInt RET_UNBOXED_TUP_hst[TICKY_BIN_COUNT] INIT({0});
#define TICK_ALLOC_SE_THK(g,s)
#endif
-
-
-#endif /* TICKYCOUNTERS_H */
diff --git a/includes/stg/Types.h b/includes/stg/Types.h
index 3a08eb2f85..af6a51791c 100644
--- a/includes/stg/Types.h
+++ b/includes/stg/Types.h
@@ -18,8 +18,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef STGTYPES_H
-#define STGTYPES_H
+#pragma once
#if defined(mingw32_HOST_OS)
/* Inform mingw we want the ISO rather than Windows printf format specifiers. */
@@ -182,5 +181,3 @@ typedef StgWord8* StgByteArray;
typedef void *(*(*StgFunPtr)(void))(void);
typedef StgFunPtr StgFun(void);
-
-#endif /* STGTYPES_H */
diff --git a/libraries/base/include/CTypes.h b/libraries/base/include/CTypes.h
index e9d19a8401..2b40c41f03 100644
--- a/libraries/base/include/CTypes.h
+++ b/libraries/base/include/CTypes.h
@@ -5,8 +5,7 @@
// --------------------------------------------------------------------------
-}
-#ifndef CTYPES__H
-#define CTYPES__H
+#pragma once
{-
// As long as there is no automatic derivation of classes for newtypes we resort
@@ -47,5 +46,3 @@ newtype {-# CTYPE "THE_CTYPE" #-} T = T B \
newtype {-# CTYPE "THE_CTYPE" #-} T = T (B) \
deriving (OPAQUE_CLASSES) \
deriving newtype Show;
-
-#endif
diff --git a/libraries/base/include/HsBase.h b/libraries/base/include/HsBase.h
index cbbccbf458..8ee207431c 100644
--- a/libraries/base/include/HsBase.h
+++ b/libraries/base/include/HsBase.h
@@ -6,8 +6,7 @@
*
* ---------------------------------------------------------------------------*/
-#ifndef __HSBASE_H__
-#define __HSBASE_H__
+#pragma once
#include "HsBaseConfig.h"
@@ -554,6 +553,3 @@ INLINE intptr_t __hscore_to_intptr (void *p) { return (intptr_t)p; }
void errorBelch2(const char*s, char *t);
void debugBelch2(const char*s, char *t);
-
-#endif /* __HSBASE_H__ */
-
diff --git a/libraries/base/include/HsEvent.h b/libraries/base/include/HsEvent.h
index fe0a7ca643..e2fb629e35 100644
--- a/libraries/base/include/HsEvent.h
+++ b/libraries/base/include/HsEvent.h
@@ -1,5 +1,4 @@
-#ifndef __HS_EVENT_H__
-#define __HS_EVENT_H__
+#pragma once
#include "EventConfig.h"
@@ -33,7 +32,6 @@ INLINE int __hsevent_kill_thread(pthread_t *tid, int sig)
return pthread_kill(*tid, sig);
}
-#endif /* __HS_EVENT_H__ */
/*
* Local Variables:
* c-file-style: "stroustrup"
diff --git a/libraries/base/include/WCsubst.h b/libraries/base/include/WCsubst.h
index 11bedb6be2..306f89a2bb 100644
--- a/libraries/base/include/WCsubst.h
+++ b/libraries/base/include/WCsubst.h
@@ -1,6 +1,4 @@
-#ifndef WCSUBST_INCL
-
-#define WCSUBST_INCL
+#pragma once
#include "HsFFI.h"
#include <stdlib.h>
@@ -20,6 +18,3 @@ HsInt u_towupper(HsInt wc);
HsInt u_towtitle(HsInt wc);
HsInt u_gencat(HsInt wc);
-
-#endif
-
diff --git a/libraries/base/include/consUtils.h b/libraries/base/include/consUtils.h
index 588139ce92..3536593f3c 100644
--- a/libraries/base/include/consUtils.h
+++ b/libraries/base/include/consUtils.h
@@ -3,11 +3,10 @@
*
* Win32 Console API helpers.
*/
-#ifndef __CONSUTILS_H__
-#define __CONSUTILS_H__
+#pragma once
+
extern int is_console__(int fd);
extern int set_console_buffering__(int fd, int cooked);
extern int set_console_echo__(int fd, int on);
extern int get_console_echo__(int fd);
extern int flush_input_console__ (int fd);
-#endif
diff --git a/libraries/base/include/md5.h b/libraries/base/include/md5.h
index 486a96cbdd..a1b6157075 100644
--- a/libraries/base/include/md5.h
+++ b/libraries/base/include/md5.h
@@ -1,6 +1,5 @@
/* MD5 message digest */
-#ifndef _MD5_H
-#define _MD5_H
+#pragma once
#include "HsFFI.h"
@@ -17,8 +16,3 @@ void __hsbase_MD5Init(struct MD5Context *context);
void __hsbase_MD5Update(struct MD5Context *context, byte const *buf, int len);
void __hsbase_MD5Final(byte digest[16], struct MD5Context *context);
void __hsbase_MD5Transform(word32 buf[4], word32 const in[16]);
-
-#endif /* _MD5_H */
-
-
-
diff --git a/libraries/integer-gmp/include/HsIntegerGmp.h.in b/libraries/integer-gmp/include/HsIntegerGmp.h.in
index ba0767cae7..4823841881 100644
--- a/libraries/integer-gmp/include/HsIntegerGmp.h.in
+++ b/libraries/integer-gmp/include/HsIntegerGmp.h.in
@@ -1,5 +1,4 @@
-#ifndef _HS_INTEGER_GMP_H_
-#define _HS_INTEGER_GMP_H_
+#pragma once
/* Whether GMP is embedded into integer-gmp */
#define GHC_GMP_INTREE @UseIntreeGmp@
@@ -10,5 +9,3 @@
#define GHC_GMP_VERSION_PL @GhcGmpVerPl@
#define GHC_GMP_VERSION \
(@GhcGmpVerMj@ * 10000 + @GhcGmpVerMi@ * 100 + @GhcGmpVerPl@)
-
-#endif /* _HS_INTEGER_GMP_H_ */
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 */
-
diff --git a/utils/hp2ps/AreaBelow.h b/utils/hp2ps/AreaBelow.h
index d7f713f2b4..05333f389f 100644
--- a/utils/hp2ps/AreaBelow.h
+++ b/utils/hp2ps/AreaBelow.h
@@ -1,6 +1,3 @@
-#ifndef AREA_BELOW_H
-#define AREA_BELOW_H
+#pragma once
floatish AreaBelow PROTO((void));
-
-#endif /* AREA_BELOW_H */
diff --git a/utils/hp2ps/AuxFile.h b/utils/hp2ps/AuxFile.h
index 6e962c492e..68ba367a75 100644
--- a/utils/hp2ps/AuxFile.h
+++ b/utils/hp2ps/AuxFile.h
@@ -1,7 +1,4 @@
-#ifndef AUX_FILE_H
-#define AUX_FILE_H
+#pragma once
void PutAuxFile PROTO((FILE *));
void GetAuxFile PROTO((FILE *));
-
-#endif /* AUX_FILE_H */
diff --git a/utils/hp2ps/Axes.h b/utils/hp2ps/Axes.h
index e4be505dfb..930c072655 100644
--- a/utils/hp2ps/Axes.h
+++ b/utils/hp2ps/Axes.h
@@ -1,6 +1,3 @@
-#ifndef AXES_H
-#define AXES_H
+#pragma once
void Axes PROTO((void));
-
-#endif /* AXES_H */
diff --git a/utils/hp2ps/Curves.h b/utils/hp2ps/Curves.h
index 0aa397f42c..b3409877b0 100644
--- a/utils/hp2ps/Curves.h
+++ b/utils/hp2ps/Curves.h
@@ -1,10 +1,7 @@
-#ifndef CURVES_H
-#define CURVES_H
+#pragma once
void Curves PROTO((void));
void CurvesInit PROTO((void));
floatish xpage PROTO((floatish));
floatish ypage PROTO((floatish));
-
-#endif /* CURVES_H */
diff --git a/utils/hp2ps/Defines.h b/utils/hp2ps/Defines.h
index ae620f4183..8b4dd3b06c 100644
--- a/utils/hp2ps/Defines.h
+++ b/utils/hp2ps/Defines.h
@@ -1,5 +1,4 @@
-#ifndef DEFINES_H
-#define DEFINES_H
+#pragma once
/*
* Things that can be altered.
@@ -57,5 +56,3 @@ extern int _twenty_;
#define VERSION "0.25" /* as of 95/03/21 */
#define max(x,y) ((x) > (y) ? (x) : (y)) /* not everyone has this */
-
-#endif /* DEFINES_H */
diff --git a/utils/hp2ps/Deviation.h b/utils/hp2ps/Deviation.h
index 14e4df1ad0..3d97d3cee1 100644
--- a/utils/hp2ps/Deviation.h
+++ b/utils/hp2ps/Deviation.h
@@ -1,7 +1,4 @@
-#ifndef DEVIATION_H
-#define DEVIATION_H
+#pragma once
void Deviation PROTO((void));
void Identorder PROTO((int));
-
-#endif /* DEVIATION_H */
diff --git a/utils/hp2ps/Dimensions.h b/utils/hp2ps/Dimensions.h
index 7bcc05beee..50c2a42b0f 100644
--- a/utils/hp2ps/Dimensions.h
+++ b/utils/hp2ps/Dimensions.h
@@ -1,5 +1,4 @@
-#ifndef DIMENSIONS_H
-#define DIMENSIONS_H
+#pragma once
extern floatish borderheight;
extern floatish borderwidth;
@@ -18,5 +17,3 @@ extern floatish graphwidth;
void Dimensions PROTO((void));
floatish StringSize PROTO((char *));
-
-#endif /* DIMENSIONS_H */
diff --git a/utils/hp2ps/Error.h b/utils/hp2ps/Error.h
index c1cdede415..94d5c2d4c9 100644
--- a/utils/hp2ps/Error.h
+++ b/utils/hp2ps/Error.h
@@ -1,8 +1,5 @@
-#ifndef ERROR_H
-#define ERROR_H
+#pragma once
extern void Error PROTO((const char *, ...));
extern void Disaster PROTO((const char *, ...));
extern void Usage PROTO((const char *));
-
-#endif /* ERROR_H */
diff --git a/utils/hp2ps/HpFile.h b/utils/hp2ps/HpFile.h
index 6e01d1edca..ff5a91632a 100644
--- a/utils/hp2ps/HpFile.h
+++ b/utils/hp2ps/HpFile.h
@@ -1,5 +1,4 @@
-#ifndef HP_FILE_H
-#define HP_FILE_H
+#pragma once
typedef enum {
/* These tokens are found in ".hp" files */
@@ -71,5 +70,3 @@ extern char *datestring;
extern char *sampleunitstring;
extern char *valueunitstring;
-
-#endif /* HP_FILE_H */
diff --git a/utils/hp2ps/Key.h b/utils/hp2ps/Key.h
index d2a7b8eae3..3773220da5 100644
--- a/utils/hp2ps/Key.h
+++ b/utils/hp2ps/Key.h
@@ -1,6 +1,3 @@
-#ifndef KEY_H
-#define KEY_H
+#pragma once
void Key PROTO((void));
-
-#endif /* KEY_H */
diff --git a/utils/hp2ps/Main.h b/utils/hp2ps/Main.h
index 7a8626b375..b023d42656 100644
--- a/utils/hp2ps/Main.h
+++ b/utils/hp2ps/Main.h
@@ -1,5 +1,4 @@
-#ifndef MAIN_H
-#define MAIN_H
+#pragma once
#include "ghcconfig.h"
#include <stdio.h>
@@ -71,5 +70,3 @@ extern char *auxfile;
extern FILE *hpfp;
extern FILE *psfp;
-
-#endif /* MAIN_H */
diff --git a/utils/hp2ps/Marks.h b/utils/hp2ps/Marks.h
index 41956f6e83..fe536e809f 100644
--- a/utils/hp2ps/Marks.h
+++ b/utils/hp2ps/Marks.h
@@ -1,6 +1,3 @@
-#ifndef MARKS_H
-#define MARKS_H
+#pragma once
void Marks PROTO((void));
-
-#endif /* MARKS_H */
diff --git a/utils/hp2ps/PsFile.h b/utils/hp2ps/PsFile.h
index 07d3ed2859..4f04297a57 100644
--- a/utils/hp2ps/PsFile.h
+++ b/utils/hp2ps/PsFile.h
@@ -1,7 +1,4 @@
-#ifndef PS_FILE_H
-#define PS_FILE_H
+#pragma once
void PutPsFile PROTO((void));
void NextPage PROTO((void)); // for Key.c
-
-#endif /* PS_FILE_H */
diff --git a/utils/hp2ps/Reorder.h b/utils/hp2ps/Reorder.h
index ec3ec98b0a..89457596d5 100644
--- a/utils/hp2ps/Reorder.h
+++ b/utils/hp2ps/Reorder.h
@@ -1,7 +1,4 @@
-#ifndef REORDER_H
-#define REORDER_H
+#pragma once
void Reorder PROTO((void));
void OrderFor PROTO((char *, int));
-
-#endif /* REORDER_H */
diff --git a/utils/hp2ps/Scale.h b/utils/hp2ps/Scale.h
index 0c19d6c3c0..da28a33133 100644
--- a/utils/hp2ps/Scale.h
+++ b/utils/hp2ps/Scale.h
@@ -1,7 +1,4 @@
-#ifndef SCALE_H
-#define SCALE_H
+#pragma once
floatish MaxCombinedHeight PROTO((void));
void Scale PROTO((void));
-
-#endif /* SCALE_H */
diff --git a/utils/hp2ps/Shade.h b/utils/hp2ps/Shade.h
index 0e49c90d04..20738fbaf2 100644
--- a/utils/hp2ps/Shade.h
+++ b/utils/hp2ps/Shade.h
@@ -1,8 +1,5 @@
-#ifndef SHADE_H
-#define SHADE_H
+#pragma once
floatish ShadeOf PROTO((char *));
void ShadeFor PROTO((char *, floatish));
void SetPSColour PROTO((floatish));
-
-#endif /* SHADE_H */
diff --git a/utils/hp2ps/TopTwenty.h b/utils/hp2ps/TopTwenty.h
index 53a7aed509..4e6d01c958 100644
--- a/utils/hp2ps/TopTwenty.h
+++ b/utils/hp2ps/TopTwenty.h
@@ -1,6 +1,3 @@
-#ifndef TOP_TWENTY_H
-#define TOP_TWENTY_H
+#pragma once
void TopTwenty PROTO((void));
-
-#endif /* TOP_TWENTY_H */
diff --git a/utils/hp2ps/TraceElement.h b/utils/hp2ps/TraceElement.h
index d843392a23..92ab117f4c 100644
--- a/utils/hp2ps/TraceElement.h
+++ b/utils/hp2ps/TraceElement.h
@@ -1,6 +1,3 @@
-#ifndef TRACE_ELEMENT_H
-#define TRACE_ELEMENT_H
+#pragma once
void TraceElement PROTO((void));
-
-#endif /* TRACE_ELEMENT_H */
diff --git a/utils/hp2ps/Utilities.h b/utils/hp2ps/Utilities.h
index 10776d9613..d6e1efccba 100644
--- a/utils/hp2ps/Utilities.h
+++ b/utils/hp2ps/Utilities.h
@@ -1,5 +1,4 @@
-#ifndef UTILITIES_H
-#define UTILITIES_H
+#pragma once
char* Basename PROTO((char *));
void DropSuffix PROTO((char *, char *));
@@ -9,5 +8,3 @@ char *copystring PROTO((char *));
char *copystring2 PROTO((char *, char *));
void *xmalloc PROTO((size_t));
void *xrealloc PROTO((void *, size_t));
-
-#endif /* UTILITIES_H */
diff --git a/utils/lndir/lndir-Xos.h b/utils/lndir/lndir-Xos.h
index e91e959c73..c6d1e3652c 100644
--- a/utils/lndir/lndir-Xos.h
+++ b/utils/lndir/lndir-Xos.h
@@ -21,8 +21,7 @@
* in a "signficant" number of source files.
*/
-#ifndef _XOS_H_
-#define _XOS_H_
+#pragma once
#include "lndir-Xosdefs.h"
@@ -148,5 +147,3 @@ struct timezone {
#ifdef ISC
#include <sys/bsdtypes.h>
#endif
-
-#endif /* _XOS_H_ */
diff --git a/utils/lndir/lndir-Xosdefs.h b/utils/lndir/lndir-Xosdefs.h
index e21db4b24e..7e232c97c5 100644
--- a/utils/lndir/lndir-Xosdefs.h
+++ b/utils/lndir/lndir-Xosdefs.h
@@ -23,8 +23,7 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifndef _XOSDEFS_H_
-#define _XOSDEFS_H_
+#pragma once
/*
* X_NOT_STDC_ENV means does not have ANSI C header files. Lack of this
@@ -95,5 +94,3 @@
#define X_NOT_STDC_ENV
#endif
#endif
-
-#endif /* _XOSDEFS_H_ */