maint: prevent multiple inclusion of header files

* find/print.h: Add #ifndef / #define / #endif guard to prevent
multiple inclusion of this header file.
* lib/fdleak.h: Likewise.
* lib/findutils-version.h: Likewise.
* lib/regextype.h: Likewise.
* lib/splitstring.h: Likewise.
This commit is contained in:
Bernhard Voelker 2018-02-03 00:32:14 +01:00
parent e9340a8bd7
commit 565bbeb89d
5 changed files with 21 additions and 1 deletions

View File

@ -14,6 +14,9 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef PRINT_H
#define PRINT_H
#include "defs.h"
struct format_val;
@ -30,3 +33,5 @@ bool
insert_fprintf (struct format_val *vec,
const struct parser_table *entry,
char *format);
#endif /* PRINT_H */

View File

@ -14,9 +14,13 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef FDLEAK_H
#define FDLEAK_H
void remember_non_cloexec_fds (void);
void forget_non_cloexec_fds (void);
void complain_about_leaky_fds (void);
int open_cloexec(const char *path, int flags, ...);
#endif

View File

@ -14,7 +14,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef FINDUTILS_VERSION_H
#define FINDUTILS_VERSION_H
/*
* display_findutils_version displays GNU coding standard compliant
* version information.
@ -25,3 +26,5 @@
*
*/
void display_findutils_version(const char *official_name);
#endif

View File

@ -17,6 +17,8 @@
*/
/* Written by James Youngman <jay@gnu.org>.
*/
#ifndef REGEXTPE_H
#define REGEXTPE_H
/* Translate a regular expression type name into an option mask.
* This could convert "grep" into RE_SYNTAX_GREP, for example.
@ -55,3 +57,5 @@ int get_regex_type_synonym(unsigned int ix, unsigned int context);
* respectively, findutils, general callers, or all callers.
*/
unsigned int get_regex_type_context(unsigned int ix);
#endif

View File

@ -17,6 +17,8 @@
/*
* Written by James Youngman.
*/
#ifndef SPLITSTRING_H
#define SPLITSTRING_H
/* Split a string into fields. The string is never modified.
*
@ -38,3 +40,5 @@
bool splitstring(const char *s, const char *separators,
bool first, size_t *pos, size_t *len);
#endif