From 407b8f6dbfea049fafceccb626862d6072c41d93 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Sun, 28 Nov 2021 19:20:53 +0100 Subject: [PATCH] Prefix include guards with LIBITE_ to safe guard name space The tree.h and queue.h include guards must remain so users don't accidentally get their system queue.h included as well. Signed-off-by: Joachim Wiberg --- src/conio.h | 6 +++--- src/lite.h | 6 +++--- src/strdupa.h | 6 +++--- src/strlite.h | 6 +++--- src/strndupa.h | 6 +++--- src/strnlen.h | 6 +++--- test/check.h | 6 +++--- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/conio.h b/src/conio.h index 33fc3a6..46c1dfd 100644 --- a/src/conio.h +++ b/src/conio.h @@ -29,8 +29,8 @@ extern "C" { #endif -#ifndef CONIO_H_ -#define CONIO_H_ +#ifndef LIBITE_CONIO_H_ +#define LIBITE_CONIO_H_ #include @@ -130,7 +130,7 @@ static inline void printheader(FILE *fp, const char *line, int nl) printhdr(fp, line, nl, REVERSE); } -#endif /* CONIO_H_ */ +#endif /* LIBITE_CONIO_H_ */ #ifdef __cplusplus } diff --git a/src/lite.h b/src/lite.h index 1c8aa87..944135b 100644 --- a/src/lite.h +++ b/src/lite.h @@ -38,8 +38,8 @@ extern "C" { #endif -#ifndef LITE_H_ -#define LITE_H_ +#ifndef LIBITE_LITE_H_ +#define LIBITE_LITE_H_ #include #include /* Definition of AT_* constants for utimensat() */ @@ -245,7 +245,7 @@ static inline int fisslashdir(const char *dir) #define pidfile_read_pid(file) pidfile_read(file) #define signal_pidfile(file, signo) pidfile_signal(file, signo) -#endif /* LITE_H_ */ +#endif /* LIBITE_LITE_H_ */ #ifdef __cplusplus } diff --git a/src/strdupa.h b/src/strdupa.h index 74613ca..20b140b 100644 --- a/src/strdupa.h +++ b/src/strdupa.h @@ -36,8 +36,8 @@ extern "C" { #endif -#ifndef LITE_STRDUPA_H -#define LITE_STRDUPA_H +#ifndef LIBITE_STRDUPA_H +#define LIBITE_STRDUPA_H #if !defined(HAVE_STRDUPA) #if defined(strdupa) @@ -67,7 +67,7 @@ extern "C" #endif /* __GNUC__ */ #endif /* !HAVE_STRDUPA */ -#endif /* LITE_STRDUPA_H */ +#endif /* LIBITE_STRDUPA_H */ #ifdef __cplusplus } diff --git a/src/strlite.h b/src/strlite.h index 6d8aab4..73f3c04 100644 --- a/src/strlite.h +++ b/src/strlite.h @@ -33,8 +33,8 @@ extern "C" { #endif -#ifndef LITE_STRING_H_ -#define LITE_STRING_H_ +#ifndef LIBITE_STRING_H_ +#define LIBITE_STRING_H_ #include /* uint8_t, uint16_t, uint32_t, INT32_MAX, etc. */ #include @@ -143,7 +143,7 @@ static inline int string_case_compare(const char *a, const char *b) return strlen(a) == strlen(b) && !strcasecmp(a, b); } -#endif /* LITE_STRING_H_ */ +#endif /* LIBITE_STRING_H_ */ #ifdef __cplusplus } diff --git a/src/strndupa.h b/src/strndupa.h index 124a3e8..64a39ce 100644 --- a/src/strndupa.h +++ b/src/strndupa.h @@ -36,8 +36,8 @@ extern "C" { #endif -#ifndef LITE_STRNDUPA_H_ -#define LITE_STRNDUPA_H_ +#ifndef LIBITE_STRNDUPA_H_ +#define LIBITE_STRNDUPA_H_ #if !defined(HAVE_STRNDUPA) #if defined(strndupa) @@ -69,7 +69,7 @@ extern "C" #endif /* __GNUC__ */ #endif /* !HAVE_STRNDUPA */ -#endif /* GNU_STRING_STRNDUPA_H */ +#endif /* LIBITE_STRNDUPA_H */ #ifdef __cplusplus } diff --git a/src/strnlen.h b/src/strnlen.h index 44acd3b..61824a5 100644 --- a/src/strnlen.h +++ b/src/strnlen.h @@ -27,8 +27,8 @@ extern "C" { #endif -#ifndef LITE_STRNLEN_H_ -#define LITE_STRNLEN_H_ +#ifndef LIBITE_STRNLEN_H_ +#define LIBITE_STRNLEN_H_ #if !defined(HAVE_STRNLEN) #if defined(strnlen) @@ -58,7 +58,7 @@ static inline size_t xstrnlen(const char *str, size_t lim) } #endif -#endif /* LITE_STRNLEN_H_ */ +#endif /* LIBITE_STRNLEN_H_ */ #ifdef __cplusplus } diff --git a/test/check.h b/test/check.h index 72226c8..4885117 100644 --- a/test/check.h +++ b/test/check.h @@ -1,5 +1,5 @@ -#ifndef LITE_TESTS_CHECK_H_ -#define LITE_TESTS_CHECK_H_ +#ifndef LIBLITE_TESTS_CHECK_H_ +#define LIBLITE_TESTS_CHECK_H_ #include #include @@ -78,4 +78,4 @@ static inline char *timespec2str(struct timespec *ts, char *buf, size_t len) return buf; } -#endif /* LITE_TESTS_CHECK_H_ */ +#endif /* LIBLITE_TESTS_CHECK_H_ */