Permalink
Browse files

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/<fname.h> to be of form EVENT2_<FNAME_H>_INCLUDED_,
and all Libevent 1.x headers in include/<fname.h> to be of the form
EVENT1_<FNAME_H>_INCLUDED_, and all internal libevent headers with
names like <fname.h> to the form <FNAME_H>_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 (<F>) {
	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/(?<![A-Za-z0-9_])$macros{$fn}(?![A-Za-z0-9_])/${goodmacro}_INCLUDED_/g;\n"
    }
}
=== And then running the script below that it generated over all
=== the .h files again
#!/usr/bin/perl -w -i -p

s/(?<![A-Za-z0-9_])_BUFFEREVENT_INTERNAL_H_(?![A-Za-z0-9_])/BUFFEREVENT_INTERNAL_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_CHANGELIST_H_(?![A-Za-z0-9_])/CHANGELIST_INTERNAL_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_DEFER_INTERNAL_H_(?![A-Za-z0-9_])/DEFER_INTERNAL_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVBUFFER_INTERNAL_H_(?![A-Za-z0-9_])/EVBUFFER_INTERNAL_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVENT_INTERNAL_H_(?![A-Za-z0-9_])/EVENT_INTERNAL_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVMAP_H_(?![A-Za-z0-9_])/EVMAP_INTERNAL_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVRPC_INTERNAL_H_(?![A-Za-z0-9_])/EVRPC_INTERNAL_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVSIGNAL_H_(?![A-Za-z0-9_])/EVSIGNAL_INTERNAL_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVTHREAD_INTERNAL_H_(?![A-Za-z0-9_])/EVTHREAD_INTERNAL_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVENT_HT_H(?![A-Za-z0-9_])/HT_INTERNAL_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_HTTP_INTERNAL_H_(?![A-Za-z0-9_])/HTTP_INTERNAL_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVDNS_H_(?![A-Za-z0-9_])/EVENT1_EVDNS_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVENT_H_(?![A-Za-z0-9_])/EVENT1_EVENT_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVENT2_BUFFER_H_(?![A-Za-z0-9_])/EVENT2_BUFFER_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVENT2_BUFFER_COMPAT_H_(?![A-Za-z0-9_])/EVENT2_BUFFER_COMPAT_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVENT2_BUFFEREVENT_H_(?![A-Za-z0-9_])/EVENT2_BUFFEREVENT_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVENT2_BUFFEREVENT_COMPAT_H_(?![A-Za-z0-9_])/EVENT2_BUFFEREVENT_COMPAT_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVENT2_BUFFEREVENT_SSL_H_(?![A-Za-z0-9_])/EVENT2_BUFFEREVENT_SSL_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVENT2_BUFFEREVENT_STRUCT_H_(?![A-Za-z0-9_])/EVENT2_BUFFEREVENT_STRUCT_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVENT2_DNS_H_(?![A-Za-z0-9_])/EVENT2_DNS_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVENT2_DNS_COMPAT_H_(?![A-Za-z0-9_])/EVENT2_DNS_COMPAT_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVENT2_DNS_STRUCT_H_(?![A-Za-z0-9_])/EVENT2_DNS_STRUCT_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVENT2_EVENT_H_(?![A-Za-z0-9_])/EVENT2_EVENT_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVENT2_EVENT_COMPAT_H_(?![A-Za-z0-9_])/EVENT2_EVENT_COMPAT_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVENT2_EVENT_STRUCT_H_(?![A-Za-z0-9_])/EVENT2_EVENT_STRUCT_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVENT2_HTTP_H_(?![A-Za-z0-9_])/EVENT2_HTTP_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVENT2_HTTP_COMPAT_H_(?![A-Za-z0-9_])/EVENT2_HTTP_COMPAT_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVENT2_HTTP_STRUCT_H_(?![A-Za-z0-9_])/EVENT2_HTTP_STRUCT_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVENT2_EVENT_KEYVALQ_STRUCT_H_(?![A-Za-z0-9_])/EVENT2_KEYVALQ_STRUCT_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVENT2_LISTENER_H_(?![A-Za-z0-9_])/EVENT2_LISTENER_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVENT2_RPC_H_(?![A-Za-z0-9_])/EVENT2_RPC_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVENT2_RPC_COMPAT_H_(?![A-Za-z0-9_])/EVENT2_RPC_COMPAT_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVENT2_RPC_STRUCT_H_(?![A-Za-z0-9_])/EVENT2_RPC_STRUCT_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVENT2_TAG_H_(?![A-Za-z0-9_])/EVENT2_TAG_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVENT2_TAG_COMPAT_H_(?![A-Za-z0-9_])/EVENT2_TAG_COMPAT_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVENT2_THREAD_H_(?![A-Za-z0-9_])/EVENT2_THREAD_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVENT2_UTIL_H_(?![A-Za-z0-9_])/EVENT2_UTIL_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVHTTP_H_(?![A-Za-z0-9_])/EVENT1_EVHTTP_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVRPC_H_(?![A-Za-z0-9_])/EVENT1_EVRPC_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVUTIL_H_(?![A-Za-z0-9_])/EVENT1_EVUTIL_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVENT_IOCP_INTERNAL_H(?![A-Za-z0-9_])/IOCP_INTERNAL_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVENT_IPV6_INTERNAL_H(?![A-Za-z0-9_])/IPV6_INTERNAL_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_LOG_H_(?![A-Za-z0-9_])/LOG_INTERNAL_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_MIN_HEAP_H_(?![A-Za-z0-9_])/MINHEAP_INTERNAL_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVENT_MM_INTERNAL_H(?![A-Za-z0-9_])/MM_INTERNAL_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_RATELIM_INTERNAL_H_(?![A-Za-z0-9_])/RATELIM_INTERNAL_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_STRLCPY_INTERNAL_H_(?![A-Za-z0-9_])/STRLCPY_INTERNAL_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_REGRESS_H_(?![A-Za-z0-9_])/REGRESS_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_TESTUTILS_H(?![A-Za-z0-9_])/REGRESS_TESTUTILS_H_INCLUDED_/g;
# Weird macro for test/tinytest.h...
s/(?<![A-Za-z0-9_])TINYTEST_H_INCLUDED_(?![A-Za-z0-9_])/TINYTEST_H_INCLUDED_/g;
# No macro known for test/tinytest_local.h!
# Weird macro for test/tinytest_macros.h...
s/(?<![A-Za-z0-9_])TINYTEST_MACROS_H_INCLUDED_(?![A-Za-z0-9_])/TINYTEST_MACROS_H_INCLUDED_/g;
s/(?<![A-Za-z0-9_])_EVENT_UTIL_INTERNAL_H(?![A-Za-z0-9_])/UTIL_INTERNAL_H_INCLUDED_/g;
  • Loading branch information...
1 parent f82c57e commit 3f8c7cd0353f4b2adcf19a90ffd3b8ba42b68209 Nick Mathewson committed Feb 29, 2012
Showing with 138 additions and 138 deletions.
  1. +3 −3 bufferevent-internal.h
  2. +2 −2 changelist-internal.h
  3. +3 −3 defer-internal.h
  4. +3 −3 evbuffer-internal.h
  5. +3 −3 event-internal.h
  6. +3 −3 evmap-internal.h
  7. +3 −3 evrpc-internal.h
  8. +3 −3 evsignal-internal.h
  9. +3 −3 evthread-internal.h
  10. +2 −2 ht-internal.h
  11. +2 −2 http-internal.h
  12. +3 −3 include/evdns.h
  13. +3 −3 include/event.h
  14. +3 −3 include/event2/buffer.h
  15. +2 −2 include/event2/buffer_compat.h
  16. +3 −3 include/event2/bufferevent.h
  17. +2 −2 include/event2/bufferevent_compat.h
  18. +3 −3 include/event2/bufferevent_ssl.h
  19. +3 −3 include/event2/bufferevent_struct.h
  20. +3 −3 include/event2/dns.h
  21. +3 −3 include/event2/dns_compat.h
  22. +3 −3 include/event2/dns_struct.h
  23. +3 −3 include/event2/event.h
  24. +3 −3 include/event2/event_compat.h
  25. +3 −3 include/event2/event_struct.h
  26. +3 −3 include/event2/http.h
  27. +3 −3 include/event2/http_compat.h
  28. +3 −3 include/event2/http_struct.h
  29. +2 −2 include/event2/keyvalq_struct.h
  30. +2 −2 include/event2/listener.h
  31. +5 −5 include/event2/rpc.h
  32. +3 −3 include/event2/rpc_compat.h
  33. +3 −3 include/event2/rpc_struct.h
  34. +3 −3 include/event2/tag.h
  35. +3 −3 include/event2/tag_compat.h
  36. +3 −3 include/event2/thread.h
  37. +3 −3 include/event2/util.h
  38. +3 −3 include/evhttp.h
  39. +3 −3 include/evrpc.h
  40. +3 −3 include/evutil.h
  41. +2 −2 iocp-internal.h
  42. +2 −2 ipv6-internal.h
  43. +2 −2 log-internal.h
  44. +3 −3 minheap-internal.h
  45. +2 −2 mm-internal.h
  46. +2 −2 ratelim-internal.h
  47. +2 −2 strlcpy-internal.h
  48. +3 −3 test/regress.h
  49. +3 −3 test/regress_testutils.h
  50. +2 −2 util-internal.h
View
@@ -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 _BUFFEREVENT_INTERNAL_H_
-#define _BUFFEREVENT_INTERNAL_H_
+#ifndef BUFFEREVENT_INTERNAL_H_INCLUDED_
+#define BUFFEREVENT_INTERNAL_H_INCLUDED_
#ifdef __cplusplus
extern "C" {
@@ -418,4 +418,4 @@ int _bufferevent_ratelim_init(struct bufferevent_private *bev);
#endif
-#endif /* _BUFFEREVENT_INTERNAL_H_ */
+#endif /* BUFFEREVENT_INTERNAL_H_INCLUDED_ */
View
@@ -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 _CHANGELIST_H_
-#define _CHANGELIST_H_
+#ifndef CHANGELIST_INTERNAL_H_INCLUDED_
+#define CHANGELIST_INTERNAL_H_INCLUDED_
/*
A "changelist" is a list of all the fd status changes that should be made
View
@@ -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 _DEFER_INTERNAL_H_
-#define _DEFER_INTERNAL_H_
+#ifndef DEFER_INTERNAL_H_INCLUDED_
+#define DEFER_INTERNAL_H_INCLUDED_
#ifdef __cplusplus
extern "C" {
@@ -102,5 +102,5 @@ void event_deferred_cb_schedule(struct deferred_cb_queue *, struct deferred_cb *
void event_deferred_cb_queue_init(struct deferred_cb_queue *);
struct deferred_cb_queue *event_base_get_deferred_cb_queue(struct event_base *);
-#endif /* _EVENT_INTERNAL_H_ */
+#endif /* EVENT_INTERNAL_H_INCLUDED_ */
View
@@ -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 _EVBUFFER_INTERNAL_H_
-#define _EVBUFFER_INTERNAL_H_
+#ifndef EVBUFFER_INTERNAL_H_INCLUDED_
+#define EVBUFFER_INTERNAL_H_INCLUDED_
#ifdef __cplusplus
extern "C" {
@@ -326,4 +326,4 @@ void evbuffer_invoke_callbacks(struct evbuffer *buf);
}
#endif
-#endif /* _EVBUFFER_INTERNAL_H_ */
+#endif /* EVBUFFER_INTERNAL_H_INCLUDED_ */
View
@@ -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_INTERNAL_H_
-#define _EVENT_INTERNAL_H_
+#ifndef EVENT_INTERNAL_H_INCLUDED_
+#define EVENT_INTERNAL_H_INCLUDED_
#ifdef __cplusplus
extern "C" {
@@ -380,5 +380,5 @@ int event_base_foreach_event_(struct event_base *base,
}
#endif
-#endif /* _EVENT_INTERNAL_H_ */
+#endif /* EVENT_INTERNAL_H_INCLUDED_ */
View
@@ -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 _EVMAP_H_
-#define _EVMAP_H_
+#ifndef EVMAP_INTERNAL_H_INCLUDED_
+#define EVMAP_INTERNAL_H_INCLUDED_
/** @file evmap-internal.h
*
@@ -114,4 +114,4 @@ int evmap_foreach_event(struct event_base *base,
event_base_foreach_event_cb fn,
void *arg);
-#endif /* _EVMAP_H_ */
+#endif /* EVMAP_INTERNAL_H_INCLUDED_ */
View
@@ -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_INTERNAL_H_
-#define _EVRPC_INTERNAL_H_
+#ifndef EVRPC_INTERNAL_H_INCLUDED_
+#define EVRPC_INTERNAL_H_INCLUDED_
#include "http-internal.h"
@@ -201,4 +201,4 @@ struct evrpc_request_wrapper {
int (*reply_unmarshal)(void *, struct evbuffer*);
};
-#endif /* _EVRPC_INTERNAL_H_ */
+#endif /* EVRPC_INTERNAL_H_INCLUDED_ */
View
@@ -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 _EVSIGNAL_H_
-#define _EVSIGNAL_H_
+#ifndef EVSIGNAL_INTERNAL_H_INCLUDED_
+#define EVSIGNAL_INTERNAL_H_INCLUDED_
#ifndef evutil_socket_t
#include "event2/util.h"
@@ -61,4 +61,4 @@ void evsig_dealloc(struct event_base *);
void evsig_set_base(struct event_base *base);
-#endif /* _EVSIGNAL_H_ */
+#endif /* EVSIGNAL_INTERNAL_H_INCLUDED_ */
View
@@ -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 _EVTHREAD_INTERNAL_H_
-#define _EVTHREAD_INTERNAL_H_
+#ifndef EVTHREAD_INTERNAL_H_INCLUDED_
+#define EVTHREAD_INTERNAL_H_INCLUDED_
#ifdef __cplusplus
extern "C" {
@@ -381,4 +381,4 @@ int evutil_secure_rng_global_setup_locks_(const int enable_locks);
}
#endif
-#endif /* _EVTHREAD_INTERNAL_H_ */
+#endif /* EVTHREAD_INTERNAL_H_INCLUDED_ */
View
@@ -5,8 +5,8 @@
/* Based on ideas by Christopher Clark and interfaces from Niels Provos. */
-#ifndef _EVENT_HT_H
-#define _EVENT_HT_H
+#ifndef HT_INTERNAL_H_INCLUDED_
+#define HT_INTERNAL_H_INCLUDED_
#define HT_HEAD(name, type) \
struct name { \
View
@@ -7,8 +7,8 @@
* need to know about these.
*/
-#ifndef _HTTP_INTERNAL_H_
-#define _HTTP_INTERNAL_H_
+#ifndef HTTP_INTERNAL_H_INCLUDED_
+#define HTTP_INTERNAL_H_INCLUDED_
#include "event2/event_struct.h"
#include "util-internal.h"
View
@@ -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 _EVDNS_H_
-#define _EVDNS_H_
+#ifndef EVENT1_EVDNS_H_INCLUDED_
+#define EVENT1_EVDNS_H_INCLUDED_
/** @file evdns.h
@@ -42,4 +42,4 @@
#include <event2/dns_compat.h>
#include <event2/dns_struct.h>
-#endif /* _EVDNS_H_ */
+#endif /* EVENT1_EVDNS_H_INCLUDED_ */
View
@@ -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_ */
View
@@ -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_ */
@@ -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
@@ -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_ */
@@ -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
@@ -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_ */
@@ -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_ */
View
@@ -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_ */
@@ -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_ */
@@ -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_ */
View
@@ -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_ */
@@ -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_ */
@@ -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_ */
Oops, something went wrong.

0 comments on commit 3f8c7cd

Please sign in to comment.