commit 7c2865fa821bd47bc8b831581b438b03e71d3740 Author: Nick Mathewson nickm@torproject.org Date: Fri Jun 10 15:08:45 2011 -0400
Have autoconf tell us SIZEOF_SIZE_T --- configure.ac | 2 ++ src/util.h | 9 ++++----- 2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/configure.ac b/configure.ac index faf57a7..da838db 100644 --- a/configure.ac +++ b/configure.ac @@ -17,6 +17,8 @@ PKG_CHECK_MODULES([openssl], [openssl >= 0.9.7]) # We don't need -lssl, only -lcrypto openssl_LIBS=`echo "$openssl_LIBS" | $SED -e 's/-lssl//'`
+AC_CHECK_SIZEOF(size_t) + AC_CONFIG_FILES([Makefile])
AC_OUTPUT diff --git a/src/util.h b/src/util.h index a48f7d8..e62e730 100644 --- a/src/util.h +++ b/src/util.h @@ -5,11 +5,13 @@ in all redistributed copies and derived works. There is no warranty. */
+#ifndef UTIL_H +#define UTIL_H + /* va_list definition */ #include <stdarg.h>
-#ifndef UTIL_H -#define UTIL_H +#include "config.h"
struct sockaddr_storage; struct event_base; @@ -29,9 +31,6 @@ int init_evdns_base(struct event_base *base); /***** String functions stuff. *****/
/* The sizeof a size_t, as computed by sizeof. */ -#ifndef SIZEOF_SIZE_T -#define SIZEOF_SIZE_T 4 -#endif #ifndef SSIZE_T_MAX #if (SIZEOF_SIZE_T == 4) #define SSIZE_T_MAX INT32_MAX