]> granicus.if.org Git - libevent/commitdiff
Remove a needless include of rpc_compat.h
authorNick Mathewson <nickm@torproject.org>
Sat, 23 Jan 2010 21:47:54 +0000 (16:47 -0500)
committerNick Mathewson <nickm@torproject.org>
Sun, 24 Jan 2010 04:12:29 +0000 (23:12 -0500)
Nothing in evrpc.c was using rpc_compat.h, so it's best to take it
out, especially since it polluted our build process with GCC variadic
macros.

While we're at it, this patch puts an extra restriction on when the
variadic macros in rpc_compat.h are defined.  Not only must GCC be the
compiler, but GCC must not be running in -ansi mode.

evrpc.c
include/event2/rpc_compat.h

diff --git a/evrpc.c b/evrpc.c
index e05972c325657e69524c39b078eb4c86eb9867d6..8600297b93f4ee339835d54fb2b4ea1994cee42b 100644 (file)
--- a/evrpc.c
+++ b/evrpc.c
@@ -56,7 +56,6 @@
 #include "event2/event_struct.h"
 #include "event2/rpc.h"
 #include "event2/rpc_struct.h"
-#include "event2/rpc_compat.h"
 #include "evrpc-internal.h"
 #include "event2/http.h"
 #include "event2/buffer.h"
index 5711efa7e5238db5d4f9b52e011ff7735836b6a9..5d59ad1ba56b7b2e120227b11069204f297b101e 100644 (file)
@@ -39,7 +39,7 @@ extern "C" {
 #endif
 
 /** backwards compatible accessors that work only with gcc */
-#ifdef __GNUC__
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
 
 #undef EVTAG_ASSIGN
 #undef EVTAG_GET