]> granicus.if.org Git - libevent/commitdiff
build fixes from nick mathewson
authorNiels Provos <provos@gmail.com>
Fri, 1 Apr 2005 04:20:39 +0000 (04:20 +0000)
committerNiels Provos <provos@gmail.com>
Fri, 1 Apr 2005 04:20:39 +0000 (04:20 +0000)
svn:r139

buffer.c
log.c
signal.c

index e30c46f309c85d8ae4852d2546b0292cade982a3..f334f219992ecf6d26a2e9849fa7f7d7f5bdad88 100644 (file)
--- a/buffer.c
+++ b/buffer.c
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/types.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#ifdef HAVE_VASPRINTF
+/* If we have vasprintf, we need to define this before we include stdio.h. */
+#define _GNU_SOURCE
+#endif
+
+#include <sys/types.h>
+
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
 #endif
diff --git a/log.c b/log.c
index 7aac5ef36bd345a47ab8fc3b59cb8d58a91c277f..6b5755f842689f6d67d48f072cbfe97cf5585113 100644 (file)
--- a/log.c
+++ b/log.c
  * SUCH DAMAGE.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #ifdef WIN32
 #define WIN32_LEAN_AND_MEAN
 #include <windows.h>
@@ -47,7 +51,7 @@
 #include <sys/tree.h>
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
-#else 
+#else
 #include <sys/_time.h>
 #endif
 #include <stdio.h>
@@ -57,6 +61,8 @@
 #include <errno.h>
 #include "event.h"
 
+#include "log.h"
+
 static void _warn_helper(int severity, int log_errno, const char *fmt,
                          va_list ap);
 static void event_log(int severity, const char *msg);
index cc5573882b532c1841ad19b902265394211460cb..19a85f1477141a7e8f2ed1cd24096bd7289d99d3 100644 (file)
--- a/signal.c
+++ b/signal.c
@@ -56,10 +56,6 @@ static short evsigcaught[NSIG];
 static int needrecalc;
 volatile sig_atomic_t evsignal_caught = 0;
 
-void evsignal_process(void);
-int evsignal_recalc(sigset_t *);
-int evsignal_deliver(sigset_t *);
-
 static struct event ev_signal;
 static int ev_signal_pair[2];
 static int ev_signal_added;