From a3e464c5f2b0fe1ee4d1db6136e1d1e063cdc4b9 Mon Sep 17 00:00:00 2001 From: reyk Date: Thu, 11 Jun 2015 18:49:09 +0000 Subject: [PATCH] Use "compliant" header guards by avoiding the reserved '_' namespace. Pointed out by Markus Elfring OK mikeb@ millert@ --- sbin/iked/chap_ms.h | 8 ++++---- sbin/iked/dh.h | 8 ++++---- sbin/iked/eap.h | 8 ++++---- sbin/iked/iked.h | 8 ++++---- sbin/iked/ikev2.h | 8 ++++---- sbin/iked/types.h | 8 ++++---- usr.sbin/httpd/http.h | 8 ++++---- usr.sbin/ikectl/parser.h | 8 ++++---- usr.sbin/relayctl/parser.h | 7 ++++++- usr.sbin/relayd/http.h | 8 ++++---- usr.sbin/relayd/relayd.h | 8 ++++---- usr.sbin/snmpctl/parser.h | 7 ++++++- usr.sbin/snmpd/mib.h | 8 ++++---- usr.sbin/snmpd/snmp.h | 8 ++++---- usr.sbin/snmpd/snmpd.h | 8 ++++---- 15 files changed, 64 insertions(+), 54 deletions(-) diff --git a/sbin/iked/chap_ms.h b/sbin/iked/chap_ms.h index f668eb26aec..d78d335170a 100644 --- a/sbin/iked/chap_ms.h +++ b/sbin/iked/chap_ms.h @@ -1,4 +1,4 @@ -/* $OpenBSD: chap_ms.h,v 1.4 2014/11/20 03:48:12 tedu Exp $ */ +/* $OpenBSD: chap_ms.h,v 1.5 2015/06/11 18:49:09 reyk Exp $ */ /* * Copyright (c) 2010-2013 Reyk Floeter @@ -16,8 +16,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef _CHAP_MS_H -#define _CHAP_MS_H +#ifndef CHAP_MS_H +#define CHAP_MS_H #define MSCHAP_CHALLENGE_SZ 8 #define MSCHAPV2_CHALLENGE_SZ 16 @@ -44,4 +44,4 @@ void mschap_radiuskey(u_int8_t *, const u_int8_t *, const u_int8_t *, const u_int8_t *); void mschap_msk(u_int8_t *, int, u_int8_t *, u_int8_t *); -#endif /* _CHAP_MS_H */ +#endif /* CHAP_MS_H */ diff --git a/sbin/iked/dh.h b/sbin/iked/dh.h index 1abd9952af9..1b058d3f8ae 100644 --- a/sbin/iked/dh.h +++ b/sbin/iked/dh.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dh.h,v 1.6 2014/08/27 10:28:57 reyk Exp $ */ +/* $OpenBSD: dh.h,v 1.7 2015/06/11 18:49:09 reyk Exp $ */ /* * Copyright (c) 2010-2013 Reyk Floeter @@ -16,8 +16,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef _DH_H_ -#define _DH_H_ +#ifndef DH_GROUP_H +#define DH_GROUP_H enum group_type { GROUP_MODP = 0, @@ -59,4 +59,4 @@ int dh_getlen(struct group *); int dh_create_exchange(struct group *, u_int8_t *); int dh_create_shared(struct group *, u_int8_t *, u_int8_t *); -#endif /* _DH_H_ */ +#endif /* DH_GROUP_H */ diff --git a/sbin/iked/eap.h b/sbin/iked/eap.h index a8d158e7c7d..799750cbfe5 100644 --- a/sbin/iked/eap.h +++ b/sbin/iked/eap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: eap.h,v 1.3 2013/01/08 10:38:19 reyk Exp $ */ +/* $OpenBSD: eap.h,v 1.4 2015/06/11 18:49:09 reyk Exp $ */ /* * Copyright (c) 2010-2013 Reyk Floeter @@ -16,8 +16,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef _IKEV2_EAP_H -#define _IKEV2_EAP_H +#ifndef IKED_EAP_H +#define IKED_EAP_H struct eap_header { u_int8_t eap_code; @@ -168,4 +168,4 @@ struct eap_mschap_failure { extern struct iked_constmap eap_mserror_map[]; -#endif /* _IKEV2_EAP_H */ +#endif /* IKED_EAP_H */ diff --git a/sbin/iked/iked.h b/sbin/iked/iked.h index e9da417d39a..568fceba9a1 100644 --- a/sbin/iked/iked.h +++ b/sbin/iked/iked.h @@ -1,4 +1,4 @@ -/* $OpenBSD: iked.h,v 1.84 2015/03/26 19:52:35 markus Exp $ */ +/* $OpenBSD: iked.h,v 1.85 2015/06/11 18:49:09 reyk Exp $ */ /* * Copyright (c) 2010-2013 Reyk Floeter @@ -25,8 +25,8 @@ #include "types.h" #include "dh.h" -#ifndef _IKED_H -#define _IKED_H +#ifndef IKED_H +#define IKED_H /* * Common IKEv1/IKEv2 header @@ -966,4 +966,4 @@ size_t keylength_xf(u_int, u_int, u_int); size_t noncelength_xf(u_int, u_int); int cmdline_symset(char *); -#endif /* _IKED_H */ +#endif /* IKED_H */ diff --git a/sbin/iked/ikev2.h b/sbin/iked/ikev2.h index 62831f71be7..b79466501f1 100644 --- a/sbin/iked/ikev2.h +++ b/sbin/iked/ikev2.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ikev2.h,v 1.18 2015/03/26 19:52:35 markus Exp $ */ +/* $OpenBSD: ikev2.h,v 1.19 2015/06/11 18:49:09 reyk Exp $ */ /* * Copyright (c) 2010-2013 Reyk Floeter @@ -16,8 +16,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef _IKEV2_H -#define _IKEV2_H +#ifndef IKED_IKEV2_H +#define IKED_IKEV2_H #define IKEV2_VERSION 0x20 /* IKE version 2.0 */ #define IKEV1_VERSION 0x10 /* IKE version 1.0 */ @@ -515,4 +515,4 @@ struct ikev2_cfg { extern struct iked_constmap ikev2_cfg_map[]; -#endif /* _IKEV2_H */ +#endif /* IKED_IKEV2_H */ diff --git a/sbin/iked/types.h b/sbin/iked/types.h index 2d2fb9f1bab..3c30efba842 100644 --- a/sbin/iked/types.h +++ b/sbin/iked/types.h @@ -1,4 +1,4 @@ -/* $OpenBSD: types.h,v 1.18 2014/02/17 15:07:23 markus Exp $ */ +/* $OpenBSD: types.h,v 1.19 2015/06/11 18:49:09 reyk Exp $ */ /* * Copyright (c) 2010-2013 Reyk Floeter @@ -16,8 +16,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef _IKED_TYPES_H -#define _IKED_TYPES_H +#ifndef IKED_TYPES_H +#define IKED_TYPES_H #ifndef IKED_USER #define IKED_USER "_iked" @@ -138,4 +138,4 @@ enum flushmode { #define nitems(_a) (sizeof((_a)) / sizeof((_a)[0])) #endif -#endif /* _IKED_TYPES_H */ +#endif /* IKED_TYPES_H */ diff --git a/usr.sbin/httpd/http.h b/usr.sbin/httpd/http.h index 00cf235c199..9042342cf76 100644 --- a/usr.sbin/httpd/http.h +++ b/usr.sbin/httpd/http.h @@ -1,4 +1,4 @@ -/* $OpenBSD: http.h,v 1.12 2015/02/11 12:52:01 florian Exp $ */ +/* $OpenBSD: http.h,v 1.13 2015/06/11 18:49:09 reyk Exp $ */ /* * Copyright (c) 2012 - 2015 Reyk Floeter @@ -16,8 +16,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef _HTTP_H -#define _HTTP_H +#ifndef HTTP_H +#define HTTP_H #define HTTP_PORT 80 #define HTTPS_PORT 443 @@ -250,4 +250,4 @@ struct http_descriptor { struct kvtree http_headers; }; -#endif /* _HTTP_H */ +#endif /* HTTP_H */ diff --git a/usr.sbin/ikectl/parser.h b/usr.sbin/ikectl/parser.h index 42814005f32..250bae08db9 100644 --- a/usr.sbin/ikectl/parser.h +++ b/usr.sbin/ikectl/parser.h @@ -1,4 +1,4 @@ -/* $OpenBSD: parser.h,v 1.12 2013/01/08 10:38:19 reyk Exp $ */ +/* $OpenBSD: parser.h,v 1.13 2015/06/11 18:49:09 reyk Exp $ */ /* * Copyright (c) 2007-2013 Reyk Floeter @@ -16,8 +16,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef _IKECTL_PARSER_H -#define _IKECTL_PARSER_H +#ifndef IKECTL_PARSER_H +#define IKECTL_PARSER_H enum actions { NONE, @@ -88,4 +88,4 @@ int ca_key_delete(struct ca *, char *); int ca_key_install(struct ca *, char *, char *); int ca_key_import(struct ca *, char *, char *); -#endif /* _IKECTL_PARSER_H */ +#endif /* IKECTL_PARSER_H */ diff --git a/usr.sbin/relayctl/parser.h b/usr.sbin/relayctl/parser.h index 158d95ff406..c481e8ac9e3 100644 --- a/usr.sbin/relayctl/parser.h +++ b/usr.sbin/relayctl/parser.h @@ -1,4 +1,4 @@ -/* $OpenBSD: parser.h,v 1.15 2015/01/22 17:42:09 reyk Exp $ */ +/* $OpenBSD: parser.h,v 1.16 2015/06/11 18:49:09 reyk Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard @@ -18,6 +18,9 @@ #include "relayd.h" +#ifndef RELAYCTL_PARSER_H +#define RELAYCTL_PARSER_H + enum actions { NONE, SHOW_SUM, @@ -48,3 +51,5 @@ struct parse_result { }; struct parse_result *parse(int, char *[]); + +#endif /* RELAYCTL_PARSER_H */ diff --git a/usr.sbin/relayd/http.h b/usr.sbin/relayd/http.h index 05b45d602dc..a043e20acbe 100644 --- a/usr.sbin/relayd/http.h +++ b/usr.sbin/relayd/http.h @@ -1,4 +1,4 @@ -/* $OpenBSD: http.h,v 1.6 2015/05/30 09:38:11 claudio Exp $ */ +/* $OpenBSD: http.h,v 1.7 2015/06/11 18:49:09 reyk Exp $ */ /* * Copyright (c) 2012 - 2014 Reyk Floeter @@ -16,8 +16,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef _HTTP_H -#define _HTTP_H +#ifndef HTTP_H +#define HTTP_H #define HTTP_PORT 80 #define HTTPS_PORT 443 @@ -200,4 +200,4 @@ struct http_descriptor { struct kvtree http_headers; }; -#endif /* _HTTP_H */ +#endif /* HTTP_H */ diff --git a/usr.sbin/relayd/relayd.h b/usr.sbin/relayd/relayd.h index f35eca57336..eef5e70eb5d 100644 --- a/usr.sbin/relayd/relayd.h +++ b/usr.sbin/relayd/relayd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: relayd.h,v 1.210 2015/06/08 15:47:51 claudio Exp $ */ +/* $OpenBSD: relayd.h,v 1.211 2015/06/11 18:49:09 reyk Exp $ */ /* * Copyright (c) 2006 - 2015 Reyk Floeter @@ -18,8 +18,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef _RELAYD_H -#define _RELAYD_H +#ifndef RELAYD_H +#define RELAYD_H #include #include @@ -1381,4 +1381,4 @@ int config_setrelay(struct relayd *, struct relay *); int config_getrelay(struct relayd *, struct imsg *); int config_getrelaytable(struct relayd *, struct imsg *); -#endif /* _RELAYD_H */ +#endif /* RELAYD_H */ diff --git a/usr.sbin/snmpctl/parser.h b/usr.sbin/snmpctl/parser.h index d50a7ed96ca..604eb94d53e 100644 --- a/usr.sbin/snmpctl/parser.h +++ b/usr.sbin/snmpctl/parser.h @@ -1,4 +1,4 @@ -/* $OpenBSD: parser.h,v 1.9 2014/04/14 12:56:21 blambert Exp $ */ +/* $OpenBSD: parser.h,v 1.10 2015/06/11 18:49:09 reyk Exp $ */ /* * Copyright (c) 2007, 2008 Reyk Floeter @@ -16,6 +16,9 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#ifndef SNMPCTL_PARSER_H +#define SNMPCTL_PARSER_H + enum actions { NONE, MONITOR, @@ -60,3 +63,5 @@ struct parse_result { struct parse_result *parse(int, char *[]); void snmpclient(struct parse_result *); + +#endif /* SNMPCTL_PARSER_H */ diff --git a/usr.sbin/snmpd/mib.h b/usr.sbin/snmpd/mib.h index 03f0171de86..8223d387ad0 100644 --- a/usr.sbin/snmpd/mib.h +++ b/usr.sbin/snmpd/mib.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mib.h,v 1.36 2015/06/10 10:03:59 mikeb Exp $ */ +/* $OpenBSD: mib.h,v 1.37 2015/06/11 18:49:09 reyk Exp $ */ /* * Copyright (c) 2007, 2008 Reyk Floeter @@ -16,8 +16,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef _SNMPD_MIB_H -#define _SNMPD_MIB_H +#ifndef SNMPD_MIB_H +#define SNMPD_MIB_H /* * Adding new MIBs: @@ -1330,4 +1330,4 @@ void mib_init(void); -#endif /* _SNMPD_MIB_H */ +#endif /* SNMPD_MIB_H */ diff --git a/usr.sbin/snmpd/snmp.h b/usr.sbin/snmpd/snmp.h index 384ce39eaca..7b513de8b1a 100644 --- a/usr.sbin/snmpd/snmp.h +++ b/usr.sbin/snmpd/snmp.h @@ -1,4 +1,4 @@ -/* $OpenBSD: snmp.h,v 1.13 2014/11/19 10:19:00 blambert Exp $ */ +/* $OpenBSD: snmp.h,v 1.14 2015/06/11 18:49:09 reyk Exp $ */ /* * Copyright (c) 2007, 2008, 2012 Reyk Floeter @@ -16,8 +16,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef SNMP_HEADER -#define SNMP_HEADER +#ifndef SNMPD_SNMP_H +#define SNMPD_SNMP_H #include #include @@ -450,4 +450,4 @@ snmp_agentx_byteorder_native(struct agentx_hdr *h) #error "Unknown host byte order" #endif -#endif /* SNMP_HEADER */ +#endif /* SNMPD_SNMP_H */ diff --git a/usr.sbin/snmpd/snmpd.h b/usr.sbin/snmpd/snmpd.h index 759a313ea2f..1a8c46aed28 100644 --- a/usr.sbin/snmpd/snmpd.h +++ b/usr.sbin/snmpd/snmpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: snmpd.h,v 1.59 2015/01/16 00:05:13 deraadt Exp $ */ +/* $OpenBSD: snmpd.h,v 1.60 2015/06/11 18:49:09 reyk Exp $ */ /* * Copyright (c) 2007, 2008, 2012 Reyk Floeter @@ -17,8 +17,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef _SNMPD_H -#define _SNMPD_H +#ifndef SNMPD_H +#define SNMPD_H #include #include @@ -755,4 +755,4 @@ struct trapcmd * int varbind_convert(struct agentx_pdu *, struct agentx_varbind_hdr *, struct ber_element **, struct ber_element **); -#endif /* _SNMPD_H */ +#endif /* SNMPD_H */ -- 2.20.1