diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2017-04-22 09:34:18 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-04-23 11:05:48 -0400 |
commit | f13eebcc9b1407e5aeaf010536fcb5e469dbfe71 (patch) | |
tree | 99bb45d293b74ba0570a2555e07fed09f8c3f659 /rts/posix | |
parent | 87fbf39a61d2535a172fbcecec098730eba1777f (diff) | |
download | haskell-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/posix')
-rw-r--r-- | rts/posix/Clock.h | 5 | ||||
-rw-r--r-- | rts/posix/Select.h | 5 | ||||
-rw-r--r-- | rts/posix/Signals.h | 5 | ||||
-rw-r--r-- | rts/posix/TTY.h | 5 |
4 files changed, 4 insertions, 16 deletions
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 */ |