From f13eebcc9b1407e5aeaf010536fcb5e469dbfe71 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Sat, 22 Apr 2017 09:34:18 -0400 Subject: 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 --- utils/lndir/lndir-Xos.h | 5 +---- utils/lndir/lndir-Xosdefs.h | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) (limited to 'utils/lndir') 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 #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_ */ -- cgit v1.2.1