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 /utils/lndir | |
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 'utils/lndir')
-rw-r--r-- | utils/lndir/lndir-Xos.h | 5 | ||||
-rw-r--r-- | utils/lndir/lndir-Xosdefs.h | 5 |
2 files changed, 2 insertions, 8 deletions
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_ */ |