From 3f8c7cd0353f4b2adcf19a90ffd3b8ba42b68209 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 29 Feb 2012 15:07:31 -0500 Subject: [PATCH] Convert include-guard macro convention to avoid reserved identifiers Previously we used include-guards with names like _EVENT2_EVENT_H_. But C reserves macros beginning with an underscore for use by the system. This patch converts all include guards for files like include/event2/ to be of form EVENT2__INCLUDED_, and all Libevent 1.x headers in include/ to be of the form EVENT1__INCLUDED_, and all internal libevent headers with names like to the form _INCLUDED_. FNAME_H is here derived from fname.h by replacing every non-macro-usable character in fname.h with an underscore, and putting every remaining character in uppercase. This is an automatic conversion. The script that produced was made by running the following script over all header files: ===== #!/usr/bin/perl -w # Run this on every .h file except config.h, sys/queue.h, WIN32/event2/event-config.h use strict; my %macros = (); my %skipped = (); FILE: for my $fn (@ARGV) { my $f = $fn; if ($fn !~ /^\.\//) { $f = "./$fn"; } if ($f eq './config.h' or $f =~ m#/tree.h$# or $f =~ m#/queue.h# or $f =~ m#/event-config.h# or $f =~ m#/evconfig-private.h#) { $skipped{$fn} = 1; next FILE; } $skipped{$fn} = 0; open(F, $fn); while () { if (/^#ifndef ([A-Za-z0-9_]+)/) { $macros{$fn} = $1; next FILE; } } } print "#!/usr/bin/perl -w -i -p\n\n"; for my $fn (@ARGV) { if (! exists $macros{$fn}) { print "# No macro known for $fn!\n" if (!$skipped{$fn}); } else { if ($macros{$fn} !~ /_H_?$/) { print "# Weird macro for $fn...\n"; } my $goodmacro = uc $fn; $goodmacro =~ s#^\./##; $goodmacro =~ s#INCLUDE/EVENT2#EVENT2#; $goodmacro =~ s#INCLUDE/#EVENT1_#; $goodmacro =~ s#TEST/##; $goodmacro =~ s#[\/\-\.]#_#g; print "s/(? #include -#endif /* _EVDNS_H_ */ +#endif /* EVENT1_EVDNS_H_INCLUDED_ */ diff --git a/include/event.h b/include/event.h index e0634201..3a1b0c2c 100644 --- a/include/event.h +++ b/include/event.h @@ -24,8 +24,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _EVENT_H_ -#define _EVENT_H_ +#ifndef EVENT1_EVENT_H_INCLUDED_ +#define EVENT1_EVENT_H_INCLUDED_ /** @file event.h @@ -82,4 +82,4 @@ typedef unsigned short u_short; } #endif -#endif /* _EVENT_H_ */ +#endif /* EVENT1_EVENT_H_INCLUDED_ */ diff --git a/include/event2/buffer.h b/include/event2/buffer.h index 2e3b0f46..0e7919c4 100644 --- a/include/event2/buffer.h +++ b/include/event2/buffer.h @@ -23,8 +23,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _EVENT2_BUFFER_H_ -#define _EVENT2_BUFFER_H_ +#ifndef EVENT2_BUFFER_H_INCLUDED_ +#define EVENT2_BUFFER_H_INCLUDED_ /** @file event2/buffer.h @@ -1003,4 +1003,4 @@ size_t evbuffer_add_iovec(struct evbuffer * buffer, struct evbuffer_iovec * vec, } #endif -#endif /* _EVENT2_BUFFER_H_ */ +#endif /* EVENT2_BUFFER_H_INCLUDED_ */ diff --git a/include/event2/buffer_compat.h b/include/event2/buffer_compat.h index a713ee32..c155332e 100644 --- a/include/event2/buffer_compat.h +++ b/include/event2/buffer_compat.h @@ -24,8 +24,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _EVENT2_BUFFER_COMPAT_H_ -#define _EVENT2_BUFFER_COMPAT_H_ +#ifndef EVENT2_BUFFER_COMPAT_H_INCLUDED_ +#define EVENT2_BUFFER_COMPAT_H_INCLUDED_ /** @file event2/buffer_compat.h diff --git a/include/event2/bufferevent.h b/include/event2/bufferevent.h index a7d360d5..85cdf71a 100644 --- a/include/event2/bufferevent.h +++ b/include/event2/bufferevent.h @@ -24,8 +24,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _EVENT2_BUFFEREVENT_H_ -#define _EVENT2_BUFFEREVENT_H_ +#ifndef EVENT2_BUFFEREVENT_H_INCLUDED_ +#define EVENT2_BUFFEREVENT_H_INCLUDED_ /** @file event2/bufferevent.h @@ -862,4 +862,4 @@ bufferevent_rate_limit_group_reset_totals( } #endif -#endif /* _EVENT2_BUFFEREVENT_H_ */ +#endif /* EVENT2_BUFFEREVENT_H_INCLUDED_ */ diff --git a/include/event2/bufferevent_compat.h b/include/event2/bufferevent_compat.h index 3256fd16..65482042 100644 --- a/include/event2/bufferevent_compat.h +++ b/include/event2/bufferevent_compat.h @@ -25,8 +25,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _EVENT2_BUFFEREVENT_COMPAT_H_ -#define _EVENT2_BUFFEREVENT_COMPAT_H_ +#ifndef EVENT2_BUFFEREVENT_COMPAT_H_INCLUDED_ +#define EVENT2_BUFFEREVENT_COMPAT_H_INCLUDED_ #define evbuffercb bufferevent_data_cb #define everrorcb bufferevent_event_cb diff --git a/include/event2/bufferevent_ssl.h b/include/event2/bufferevent_ssl.h index f32a035f..b0bd82fc 100644 --- a/include/event2/bufferevent_ssl.h +++ b/include/event2/bufferevent_ssl.h @@ -23,8 +23,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _EVENT2_BUFFEREVENT_SSL_H_ -#define _EVENT2_BUFFEREVENT_SSL_H_ +#ifndef EVENT2_BUFFEREVENT_SSL_H_INCLUDED_ +#define EVENT2_BUFFEREVENT_SSL_H_INCLUDED_ /** @file event2/bufferevent_ssl.h @@ -124,4 +124,4 @@ unsigned long bufferevent_get_openssl_error(struct bufferevent *bev); } #endif -#endif /* _EVENT2_BUFFEREVENT_SSL_H_ */ +#endif /* EVENT2_BUFFEREVENT_SSL_H_INCLUDED_ */ diff --git a/include/event2/bufferevent_struct.h b/include/event2/bufferevent_struct.h index cfac3127..e84c082c 100644 --- a/include/event2/bufferevent_struct.h +++ b/include/event2/bufferevent_struct.h @@ -24,8 +24,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _EVENT2_BUFFEREVENT_STRUCT_H_ -#define _EVENT2_BUFFEREVENT_STRUCT_H_ +#ifndef EVENT2_BUFFEREVENT_STRUCT_H_INCLUDED_ +#define EVENT2_BUFFEREVENT_STRUCT_H_INCLUDED_ /** @file event2/bufferevent_struct.h @@ -113,4 +113,4 @@ struct bufferevent { } #endif -#endif /* _EVENT2_BUFFEREVENT_STRUCT_H_ */ +#endif /* EVENT2_BUFFEREVENT_STRUCT_H_INCLUDED_ */ diff --git a/include/event2/dns.h b/include/event2/dns.h index ad7227f5..4b03d760 100644 --- a/include/event2/dns.h +++ b/include/event2/dns.h @@ -132,8 +132,8 @@ * with the next probe. */ -#ifndef _EVENT2_DNS_H_ -#define _EVENT2_DNS_H_ +#ifndef EVENT2_DNS_H_INCLUDED_ +#define EVENT2_DNS_H_INCLUDED_ #ifdef __cplusplus extern "C" { @@ -640,4 +640,4 @@ void evdns_getaddrinfo_cancel(struct evdns_getaddrinfo_request *req); } #endif -#endif /* !_EVENT2_DNS_H_ */ +#endif /* !EVENT2_DNS_H_INCLUDED_ */ diff --git a/include/event2/dns_compat.h b/include/event2/dns_compat.h index 1469a014..965fd654 100644 --- a/include/event2/dns_compat.h +++ b/include/event2/dns_compat.h @@ -24,8 +24,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _EVENT2_DNS_COMPAT_H_ -#define _EVENT2_DNS_COMPAT_H_ +#ifndef EVENT2_DNS_COMPAT_H_INCLUDED_ +#define EVENT2_DNS_COMPAT_H_INCLUDED_ /** @file event2/dns_compat.h @@ -333,4 +333,4 @@ int evdns_config_windows_nameservers(void); } #endif -#endif /* _EVENT2_EVENT_COMPAT_H_ */ +#endif /* EVENT2_EVENT_COMPAT_H_INCLUDED_ */ diff --git a/include/event2/dns_struct.h b/include/event2/dns_struct.h index 620c66ec..593a8a70 100644 --- a/include/event2/dns_struct.h +++ b/include/event2/dns_struct.h @@ -24,8 +24,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _EVENT2_DNS_STRUCT_H_ -#define _EVENT2_DNS_STRUCT_H_ +#ifndef EVENT2_DNS_STRUCT_H_INCLUDED_ +#define EVENT2_DNS_STRUCT_H_INCLUDED_ /** @file event2/dns_struct.h @@ -76,5 +76,5 @@ struct evdns_server_question { } #endif -#endif /* _EVENT2_DNS_STRUCT_H_ */ +#endif /* EVENT2_DNS_STRUCT_H_INCLUDED_ */ diff --git a/include/event2/event.h b/include/event2/event.h index 8ab34da1..b75261be 100644 --- a/include/event2/event.h +++ b/include/event2/event.h @@ -24,8 +24,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _EVENT2_EVENT_H_ -#define _EVENT2_EVENT_H_ +#ifndef EVENT2_EVENT_H_INCLUDED_ +#define EVENT2_EVENT_H_INCLUDED_ /** @mainpage @@ -1283,4 +1283,4 @@ int event_base_update_cache_time(struct event_base *base); } #endif -#endif /* _EVENT2_EVENT_H_ */ +#endif /* EVENT2_EVENT_H_INCLUDED_ */ diff --git a/include/event2/event_compat.h b/include/event2/event_compat.h index a1d2f252..87403a4d 100644 --- a/include/event2/event_compat.h +++ b/include/event2/event_compat.h @@ -24,8 +24,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _EVENT2_EVENT_COMPAT_H_ -#define _EVENT2_EVENT_COMPAT_H_ +#ifndef EVENT2_EVENT_COMPAT_H_INCLUDED_ +#define EVENT2_EVENT_COMPAT_H_INCLUDED_ /** @file event2/event_compat.h @@ -217,4 +217,4 @@ void event_set(struct event *, evutil_socket_t, short, void (*)(evutil_socket_t, } #endif -#endif /* _EVENT2_EVENT_COMPAT_H_ */ +#endif /* EVENT2_EVENT_COMPAT_H_INCLUDED_ */ diff --git a/include/event2/event_struct.h b/include/event2/event_struct.h index 714a6cd0..ee1b2566 100644 --- a/include/event2/event_struct.h +++ b/include/event2/event_struct.h @@ -24,8 +24,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _EVENT2_EVENT_STRUCT_H_ -#define _EVENT2_EVENT_STRUCT_H_ +#ifndef EVENT2_EVENT_STRUCT_H_INCLUDED_ +#define EVENT2_EVENT_STRUCT_H_INCLUDED_ /** @file event2/event_struct.h @@ -156,4 +156,4 @@ LIST_HEAD (event_dlist, event); } #endif -#endif /* _EVENT2_EVENT_STRUCT_H_ */ +#endif /* EVENT2_EVENT_STRUCT_H_INCLUDED_ */ diff --git a/include/event2/http.h b/include/event2/http.h index 144661b3..109b73b0 100644 --- a/include/event2/http.h +++ b/include/event2/http.h @@ -24,8 +24,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _EVENT2_HTTP_H_ -#define _EVENT2_HTTP_H_ +#ifndef EVENT2_HTTP_H_INCLUDED_ +#define EVENT2_HTTP_H_INCLUDED_ /* For int types. */ #include @@ -927,4 +927,4 @@ char *evhttp_uri_join(struct evhttp_uri *uri, char *buf, size_t limit); } #endif -#endif /* _EVENT2_HTTP_H_ */ +#endif /* EVENT2_HTTP_H_INCLUDED_ */ diff --git a/include/event2/http_compat.h b/include/event2/http_compat.h index c29c48e9..0d9af17f 100644 --- a/include/event2/http_compat.h +++ b/include/event2/http_compat.h @@ -24,8 +24,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _EVENT2_HTTP_COMPAT_H_ -#define _EVENT2_HTTP_COMPAT_H_ +#ifndef EVENT2_HTTP_COMPAT_H_INCLUDED_ +#define EVENT2_HTTP_COMPAT_H_INCLUDED_ /** @file event2/http_compat.h @@ -87,4 +87,4 @@ void evhttp_connection_set_base(struct evhttp_connection *evcon, } #endif -#endif /* _EVENT2_EVENT_COMPAT_H_ */ +#endif /* EVENT2_EVENT_COMPAT_H_INCLUDED_ */ diff --git a/include/event2/http_struct.h b/include/event2/http_struct.h index 75f7d9dd..f245dff8 100644 --- a/include/event2/http_struct.h +++ b/include/event2/http_struct.h @@ -24,8 +24,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _EVENT2_HTTP_STRUCT_H_ -#define _EVENT2_HTTP_STRUCT_H_ +#ifndef EVENT2_HTTP_STRUCT_H_INCLUDED_ +#define EVENT2_HTTP_STRUCT_H_INCLUDED_ /** @file event2/http_struct.h @@ -126,5 +126,5 @@ struct { } #endif -#endif /* _EVENT2_HTTP_STRUCT_H_ */ +#endif /* EVENT2_HTTP_STRUCT_H_INCLUDED_ */ diff --git a/include/event2/keyvalq_struct.h b/include/event2/keyvalq_struct.h index ab8040bf..c028c0b2 100644 --- a/include/event2/keyvalq_struct.h +++ b/include/event2/keyvalq_struct.h @@ -24,8 +24,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _EVENT2_EVENT_KEYVALQ_STRUCT_H_ -#define _EVENT2_EVENT_KEYVALQ_STRUCT_H_ +#ifndef EVENT2_KEYVALQ_STRUCT_H_INCLUDED_ +#define EVENT2_KEYVALQ_STRUCT_H_INCLUDED_ #ifdef __cplusplus extern "C" { diff --git a/include/event2/listener.h b/include/event2/listener.h index 10887bae..7bdf9bfc 100644 --- a/include/event2/listener.h +++ b/include/event2/listener.h @@ -24,8 +24,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _EVENT2_LISTENER_H_ -#define _EVENT2_LISTENER_H_ +#ifndef EVENT2_LISTENER_H_INCLUDED_ +#define EVENT2_LISTENER_H_INCLUDED_ #ifdef __cplusplus extern "C" { diff --git a/include/event2/rpc.h b/include/event2/rpc.h index 2ac7ad2b..a780ff89 100644 --- a/include/event2/rpc.h +++ b/include/event2/rpc.h @@ -24,8 +24,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _EVENT2_RPC_H_ -#define _EVENT2_RPC_H_ +#ifndef EVENT2_RPC_H_INCLUDED_ +#define EVENT2_RPC_H_INCLUDED_ #ifdef __cplusplus extern "C" { @@ -76,7 +76,7 @@ extern "C" { #define EVTAG_HAS(msg, member) \ ((msg)->member##_set == 1) -#ifndef _EVENT2_RPC_COMPAT_H_ +#ifndef EVENT2_RPC_COMPAT_H_INCLUDED_ /** Assigns a value to the member in the message. @@ -119,7 +119,7 @@ extern "C" { #define EVTAG_GET_WITH_LEN(msg, member, pvalue, plen) \ (*(msg)->base->member##_get)((msg), (pvalue), (plen)) -#endif /* _EVENT2_RPC_COMPAT_H_ */ +#endif /* EVENT2_RPC_COMPAT_H_INCLUDED_ */ /** Adds a value to an array. @@ -593,4 +593,4 @@ void evrpc_request_set_cb(struct evrpc_request_wrapper *ctx, } #endif -#endif /* _EVENT2_RPC_H_ */ +#endif /* EVENT2_RPC_H_INCLUDED_ */ diff --git a/include/event2/rpc_compat.h b/include/event2/rpc_compat.h index a4e24bb6..8d8334d2 100644 --- a/include/event2/rpc_compat.h +++ b/include/event2/rpc_compat.h @@ -24,8 +24,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _EVENT2_RPC_COMPAT_H_ -#define _EVENT2_RPC_COMPAT_H_ +#ifndef EVENT2_RPC_COMPAT_H_INCLUDED_ +#define EVENT2_RPC_COMPAT_H_INCLUDED_ /** @file event2/rpc_compat.h @@ -58,4 +58,4 @@ extern "C" { } #endif -#endif /* _EVENT2_EVENT_COMPAT_H_ */ +#endif /* EVENT2_EVENT_COMPAT_H_INCLUDED_ */ diff --git a/include/event2/rpc_struct.h b/include/event2/rpc_struct.h index c339ae58..8f691f49 100644 --- a/include/event2/rpc_struct.h +++ b/include/event2/rpc_struct.h @@ -24,8 +24,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _EVENT2_RPC_STRUCT_H_ -#define _EVENT2_RPC_STRUCT_H_ +#ifndef EVENT2_RPC_STRUCT_H_INCLUDED_ +#define EVENT2_RPC_STRUCT_H_INCLUDED_ #ifdef __cplusplus extern "C" { @@ -97,4 +97,4 @@ struct evrpc { } #endif -#endif /* _EVENT2_RPC_STRUCT_H_ */ +#endif /* EVENT2_RPC_STRUCT_H_INCLUDED_ */ diff --git a/include/event2/tag.h b/include/event2/tag.h index 36a85bba..7632bd58 100644 --- a/include/event2/tag.h +++ b/include/event2/tag.h @@ -24,8 +24,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _EVENT2_TAG_H_ -#define _EVENT2_TAG_H_ +#ifndef EVENT2_TAG_H_INCLUDED_ +#define EVENT2_TAG_H_INCLUDED_ /** @file event2/tag.h @@ -121,4 +121,4 @@ int evtag_unmarshal_timeval(struct evbuffer *evbuf, ev_uint32_t need_tag, } #endif -#endif /* _EVENT2_TAG_H_ */ +#endif /* EVENT2_TAG_H_INCLUDED_ */ diff --git a/include/event2/tag_compat.h b/include/event2/tag_compat.h index 73c19330..a276c0d3 100644 --- a/include/event2/tag_compat.h +++ b/include/event2/tag_compat.h @@ -24,8 +24,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _EVENT2_TAG_COMPAT_H_ -#define _EVENT2_TAG_COMPAT_H_ +#ifndef EVENT2_TAG_COMPAT_H_INCLUDED_ +#define EVENT2_TAG_COMPAT_H_INCLUDED_ /** @file event2/tag_compat.h @@ -46,4 +46,4 @@ #define encode_int64(evbuf, number) evtag_encode_int64((evbuf), (number)) /**@}*/ -#endif /* _EVENT2_TAG_H_ */ +#endif /* EVENT2_TAG_H_INCLUDED_ */ diff --git a/include/event2/thread.h b/include/event2/thread.h index e17ac025..43b58d08 100644 --- a/include/event2/thread.h +++ b/include/event2/thread.h @@ -23,8 +23,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _EVENT2_THREAD_H_ -#define _EVENT2_THREAD_H_ +#ifndef EVENT2_THREAD_H_INCLUDED_ +#define EVENT2_THREAD_H_INCLUDED_ /** @file event2/thread.h @@ -233,4 +233,4 @@ int evthread_make_base_notifiable(struct event_base *base); } #endif -#endif /* _EVENT2_THREAD_H_ */ +#endif /* EVENT2_THREAD_H_INCLUDED_ */ diff --git a/include/event2/util.h b/include/event2/util.h index ad0398c6..72a8530b 100644 --- a/include/event2/util.h +++ b/include/event2/util.h @@ -23,8 +23,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _EVENT2_UTIL_H_ -#define _EVENT2_UTIL_H_ +#ifndef EVENT2_UTIL_H_INCLUDED_ +#define EVENT2_UTIL_H_INCLUDED_ /** @file event2/util.h @@ -713,4 +713,4 @@ void evutil_secure_rng_add_bytes(const char *dat, size_t datlen); } #endif -#endif /* _EVUTIL_H_ */ +#endif /* EVENT1_EVUTIL_H_INCLUDED_ */ diff --git a/include/evhttp.h b/include/evhttp.h index 5ce15e65..549bc9b1 100644 --- a/include/evhttp.h +++ b/include/evhttp.h @@ -24,8 +24,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _EVHTTP_H_ -#define _EVHTTP_H_ +#ifndef EVENT1_EVHTTP_H_INCLUDED_ +#define EVENT1_EVHTTP_H_INCLUDED_ /** @file evhttp.h @@ -42,4 +42,4 @@ #include #include -#endif /* _EVHTTP_H_ */ +#endif /* EVENT1_EVHTTP_H_INCLUDED_ */ diff --git a/include/evrpc.h b/include/evrpc.h index 5b88262d..7e986f7d 100644 --- a/include/evrpc.h +++ b/include/evrpc.h @@ -24,8 +24,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _EVRPC_H_ -#define _EVRPC_H_ +#ifndef EVENT1_EVRPC_H_INCLUDED_ +#define EVENT1_EVRPC_H_INCLUDED_ /** @file evrpc.h @@ -42,4 +42,4 @@ #include #include -#endif /* _EVRPC_H_ */ +#endif /* EVENT1_EVRPC_H_INCLUDED_ */ diff --git a/include/evutil.h b/include/evutil.h index 02bca89e..12c137d7 100644 --- a/include/evutil.h +++ b/include/evutil.h @@ -23,8 +23,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _EVUTIL_H_ -#define _EVUTIL_H_ +#ifndef EVENT1_EVUTIL_H_INCLUDED_ +#define EVENT1_EVUTIL_H_INCLUDED_ /** @file evutil.h @@ -36,4 +36,4 @@ #include -#endif /* _EVUTIL_H_ */ +#endif /* EVENT1_EVUTIL_H_INCLUDED_ */ diff --git a/iocp-internal.h b/iocp-internal.h index 22321e45..6eaf96c2 100644 --- a/iocp-internal.h +++ b/iocp-internal.h @@ -24,8 +24,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _EVENT_IOCP_INTERNAL_H -#define _EVENT_IOCP_INTERNAL_H +#ifndef IOCP_INTERNAL_H_INCLUDED_ +#define IOCP_INTERNAL_H_INCLUDED_ #ifdef __cplusplus extern "C" { diff --git a/ipv6-internal.h b/ipv6-internal.h index 7444b0ff..0c207377 100644 --- a/ipv6-internal.h +++ b/ipv6-internal.h @@ -27,8 +27,8 @@ /* Internal use only: Fake IPv6 structures and values on platforms that * do not have them */ -#ifndef _EVENT_IPV6_INTERNAL_H -#define _EVENT_IPV6_INTERNAL_H +#ifndef IPV6_INTERNAL_H_INCLUDED_ +#define IPV6_INTERNAL_H_INCLUDED_ #include "event2/event-config.h" #include "evconfig-private.h" diff --git a/log-internal.h b/log-internal.h index 47064e22..fb24af1a 100644 --- a/log-internal.h +++ b/log-internal.h @@ -24,8 +24,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _LOG_H_ -#define _LOG_H_ +#ifndef LOG_INTERNAL_H_INCLUDED_ +#define LOG_INTERNAL_H_INCLUDED_ #include "event2/util.h" diff --git a/minheap-internal.h b/minheap-internal.h index 2f2a8dc6..466530ab 100644 --- a/minheap-internal.h +++ b/minheap-internal.h @@ -25,8 +25,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _MIN_HEAP_H_ -#define _MIN_HEAP_H_ +#ifndef MINHEAP_INTERNAL_H_INCLUDED_ +#define MINHEAP_INTERNAL_H_INCLUDED_ #include "event2/event-config.h" #include "evconfig-private.h" @@ -186,4 +186,4 @@ void min_heap_shift_down_(min_heap_t* s, unsigned hole_index, struct event* e) (s->p[hole_index] = e)->ev_timeout_pos.min_heap_idx = hole_index; } -#endif /* _MIN_HEAP_H_ */ +#endif /* MINHEAP_INTERNAL_H_INCLUDED_ */ diff --git a/mm-internal.h b/mm-internal.h index ff6d4758..4ba6fce4 100644 --- a/mm-internal.h +++ b/mm-internal.h @@ -23,8 +23,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _EVENT_MM_INTERNAL_H -#define _EVENT_MM_INTERNAL_H +#ifndef MM_INTERNAL_H_INCLUDED_ +#define MM_INTERNAL_H_INCLUDED_ #include diff --git a/ratelim-internal.h b/ratelim-internal.h index 4e3f8c4c..6c76e727 100644 --- a/ratelim-internal.h +++ b/ratelim-internal.h @@ -23,8 +23,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _RATELIM_INTERNAL_H_ -#define _RATELIM_INTERNAL_H_ +#ifndef RATELIM_INTERNAL_H_INCLUDED_ +#define RATELIM_INTERNAL_H_INCLUDED_ #ifdef __cplusplus extern "C" { diff --git a/strlcpy-internal.h b/strlcpy-internal.h index 5fb2fff1..2b74404b 100644 --- a/strlcpy-internal.h +++ b/strlcpy-internal.h @@ -1,5 +1,5 @@ -#ifndef _STRLCPY_INTERNAL_H_ -#define _STRLCPY_INTERNAL_H_ +#ifndef STRLCPY_INTERNAL_H_INCLUDED_ +#define STRLCPY_INTERNAL_H_INCLUDED_ #ifdef __cplusplus extern "C" { diff --git a/test/regress.h b/test/regress.h index dd6e3fad..842d621a 100644 --- a/test/regress.h +++ b/test/regress.h @@ -24,8 +24,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _REGRESS_H_ -#define _REGRESS_H_ +#ifndef REGRESS_H_INCLUDED_ +#define REGRESS_H_INCLUDED_ #ifdef __cplusplus extern "C" { @@ -122,4 +122,4 @@ long timeval_msec_diff(const struct timeval *start, const struct timeval *end); } #endif -#endif /* _REGRESS_H_ */ +#endif /* REGRESS_H_INCLUDED_ */ diff --git a/test/regress_testutils.h b/test/regress_testutils.h index 1f09427d..f90b9c99 100644 --- a/test/regress_testutils.h +++ b/test/regress_testutils.h @@ -24,8 +24,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _TESTUTILS_H -#define _TESTUTILS_H +#ifndef REGRESS_TESTUTILS_H_INCLUDED_ +#define REGRESS_TESTUTILS_H_INCLUDED_ #include "event2/dns.h" @@ -62,5 +62,5 @@ struct sockaddr; int regress_get_listener_addr(struct evconnlistener *lev, struct sockaddr *sa, ev_socklen_t *socklen); -#endif /* _TESTUTILS_H */ +#endif /* REGRESS_TESTUTILS_H_INCLUDED_ */ diff --git a/util-internal.h b/util-internal.h index 52de23dd..2444dced 100644 --- a/util-internal.h +++ b/util-internal.h @@ -23,8 +23,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _EVENT_UTIL_INTERNAL_H -#define _EVENT_UTIL_INTERNAL_H +#ifndef UTIL_INTERNAL_H_INCLUDED_ +#define UTIL_INTERNAL_H_INCLUDED_ #include "event2/event-config.h" #include "evconfig-private.h"