Commit ec5d9a685a672f77bf3f1cd40a704619aea562b6

Guillem Jover 2017-06-14T02:44:37

Namespace header inclusion protection macros Use LIBBSD_, and remove trailing underscores.

diff --git a/include/bsd/libutil.h b/include/bsd/libutil.h
index ebb6160..45b3b15 100644
--- a/include/bsd/libutil.h
+++ b/include/bsd/libutil.h
@@ -36,8 +36,8 @@
  * $FreeBSD: src/lib/libutil/libutil.h,v 1.47 2008/04/23 00:49:12 scf Exp $
  */
 
-#ifndef _LIBUTIL_H_
-#define _LIBUTIL_H_
+#ifndef LIBBSD_LIBUTIL_H
+#define LIBBSD_LIBUTIL_H
 
 #include <features.h>
 #include <sys/cdefs.h>
@@ -86,4 +86,4 @@ __END_DECLS
 #define FPARSELN_UNESCREST	0x08
 #define FPARSELN_UNESCALL	0x0f
 
-#endif /* !_LIBUTIL_H_ */
+#endif /* !LIBBSD_LIBUTIL_H */
diff --git a/include/bsd/md5.h b/include/bsd/md5.h
index 9a75fad..5f3ae46 100644
--- a/include/bsd/md5.h
+++ b/include/bsd/md5.h
@@ -12,8 +12,8 @@
  * with every copy.
  */
 
-#ifndef _MD5_H_
-#define _MD5_H_
+#ifndef LIBBSD_MD5_H
+#define LIBBSD_MD5_H
 
 #include <stdint.h>
 
@@ -51,4 +51,4 @@ char	*MD5Data(const uint8_t *, size_t, char *)
 		__attribute__((__bounded__(__minbytes__,3,MD5_DIGEST_STRING_LENGTH)));
 __END_DECLS
 
-#endif /* _MD5_H_ */
+#endif /* LIBBSD_MD5_H */
diff --git a/include/bsd/netinet/ip_icmp.h b/include/bsd/netinet/ip_icmp.h
index 45f5d72..b42699a 100644
--- a/include/bsd/netinet/ip_icmp.h
+++ b/include/bsd/netinet/ip_icmp.h
@@ -30,8 +30,8 @@
  * $FreeBSD: src/sys/netinet/ip_icmp.h,v 1.22 2004/04/07 20:46:13 imp Exp $
  */
 
-#ifndef _NETINET_IP_ICMP_H_
-#define _NETINET_IP_ICMP_H_
+#ifndef LIBBSD_NETINET_IP_ICMP_H
+#define LIBBSD_NETINET_IP_ICMP_H
 
 #include <sys/types.h>		/* uint32_t */
 #include <netinet/in.h>		/* in_addr */
diff --git a/include/bsd/readpassphrase.h b/include/bsd/readpassphrase.h
index e1dacc3..14744b8 100644
--- a/include/bsd/readpassphrase.h
+++ b/include/bsd/readpassphrase.h
@@ -20,8 +20,8 @@
  * Materiel Command, USAF, under agreement number F39502-99-1-0512.
  */
 
-#ifndef _READPASSPHRASE_H_
-#define _READPASSPHRASE_H_
+#ifndef LIBBSD_READPASSPHRASE_H
+#define LIBBSD_READPASSPHRASE_H
 
 #define RPP_ECHO_OFF    0x00		/* Turn off echo (default). */
 #define RPP_ECHO_ON     0x01		/* Leave echo on. */
@@ -38,4 +38,4 @@ __BEGIN_DECLS
 char * readpassphrase(const char *, char *, size_t, int);
 __END_DECLS
 
-#endif /* !_READPASSPHRASE_H_ */
+#endif /* !LIBBSD_READPASSPHRASE_H */
diff --git a/include/bsd/stringlist.h b/include/bsd/stringlist.h
index e3c42e9..ff30cac 100644
--- a/include/bsd/stringlist.h
+++ b/include/bsd/stringlist.h
@@ -29,8 +29,8 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef _STRINGLIST_H
-#define _STRINGLIST_H
+#ifndef LIBBSD_STRINGLIST_H
+#define LIBBSD_STRINGLIST_H
 #include <sys/cdefs.h>
 #include <sys/types.h>
 
@@ -51,4 +51,4 @@ char		*sl_find(StringList *, const char *);
 int		 sl_delete(StringList *, const char *, int);
 __END_DECLS
 
-#endif /* _STRINGLIST_H */
+#endif /* LIBBSD_STRINGLIST_H */
diff --git a/include/bsd/sys/bitstring.h b/include/bsd/sys/bitstring.h
index 125ef51..f356ca7 100644
--- a/include/bsd/sys/bitstring.h
+++ b/include/bsd/sys/bitstring.h
@@ -32,8 +32,8 @@
  * $FreeBSD$
  */
 
-#ifndef _SYS_BITSTRING_H_
-#define	_SYS_BITSTRING_H_
+#ifndef LIBBSD_SYS_BITSTRING_H
+#define LIBBSD_SYS_BITSTRING_H
 
 typedef	unsigned char bitstr_t;
 
@@ -143,4 +143,4 @@ typedef	unsigned char bitstr_t;
 	*(value) = _value; \
 } while (0)
 
-#endif /* !_SYS_BITSTRING_H_ */
+#endif /* !LIBBSD_SYS_BITSTRING_H */
diff --git a/include/bsd/sys/queue.h b/include/bsd/sys/queue.h
index 55bd494..4a94ea7 100644
--- a/include/bsd/sys/queue.h
+++ b/include/bsd/sys/queue.h
@@ -30,8 +30,8 @@
  * $FreeBSD$
  */
 
-#ifndef _SYS_QUEUE_H_
-#define	_SYS_QUEUE_H_
+#ifndef LIBBSD_SYS_QUEUE_H
+#define LIBBSD_SYS_QUEUE_H
 
 #include <sys/cdefs.h>
 
@@ -691,4 +691,4 @@ struct {								\
 		(head2)->tqh_last = &(head2)->tqh_first;		\
 } while (0)
 
-#endif /* !_SYS_QUEUE_H_ */
+#endif /* !LIBBSD_SYS_QUEUE_H */
diff --git a/include/bsd/sys/tree.h b/include/bsd/sys/tree.h
index 1cce727..628bec0 100644
--- a/include/bsd/sys/tree.h
+++ b/include/bsd/sys/tree.h
@@ -27,8 +27,8 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef	_SYS_TREE_H_
-#define	_SYS_TREE_H_
+#ifndef LIBBSD_SYS_TREE_H
+#define LIBBSD_SYS_TREE_H
 
 #include <sys/cdefs.h>
 
@@ -762,4 +762,4 @@ name##_RB_MINMAX(struct name *head, int val)				\
 	    ((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL);	\
 	     (x) = (y))
 
-#endif	/* _SYS_TREE_H_ */
+#endif /* LIBBSD_SYS_TREE_H */
diff --git a/include/bsd/timeconv.h b/include/bsd/timeconv.h
index 29e0988..e2a2c55 100644
--- a/include/bsd/timeconv.h
+++ b/include/bsd/timeconv.h
@@ -38,8 +38,8 @@
  * $FreeBSD$
  */
 
-#ifndef _TIMECONV_H_
-#define _TIMECONV_H_
+#ifndef LIBBSD_TIMECONV_H
+#define LIBBSD_TIMECONV_H
 
 #include <sys/cdefs.h>
 #include <stdint.h>
@@ -54,4 +54,4 @@ time_t _long_to_time(long tlong);
 int _time_to_int(time_t t);
 time_t _int_to_time(int tint);
 
-#endif /* _TIMECONV_H_ */
+#endif /* LIBBSD_TIMECONV_H */
diff --git a/include/bsd/vis.h b/include/bsd/vis.h
index 835d2d6..970dfdd 100644
--- a/include/bsd/vis.h
+++ b/include/bsd/vis.h
@@ -30,8 +30,8 @@
  * $FreeBSD: src/include/vis.h,v 1.11 2003/10/30 10:40:49 phk Exp $
  */
 
-#ifndef _VIS_H_
-#define	_VIS_H_
+#ifndef LIBBSD_VIS_H
+#define LIBBSD_VIS_H
 
 #include <sys/types.h>
 
@@ -85,4 +85,4 @@ ssize_t strnunvis(char *, const char *, size_t);
 int	unvis(char *, int, int *, int);
 __END_DECLS
 
-#endif /* !_VIS_H_ */
+#endif /* !LIBBSD_VIS_H */