summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-01-30 19:25:31 +0000
committerNick Mathewson <nickm@torproject.org>2008-01-30 19:25:31 +0000
commitb4ebe55d12d46c79ac46c801b1096ae1afda75f7 (patch)
treeb94101a6730f5183881a16ae90079891298ef61c /configure.in
parent0b0654662010a14579ce9c8dac9a1719d8c47160 (diff)
downloadtor-b4ebe55d12d46c79ac46c801b1096ae1afda75f7.tar.gz
tor-b4ebe55d12d46c79ac46c801b1096ae1afda75f7.zip
r13971@tombo: nickm | 2008-01-30 14:25:25 -0500
Write a new autoconf macro to test whether a function is declared. It is suboptimal and possibly buggy in some way, but it seems to work for me. use it to test for a declaration of malloc_good_size, so we can workaround operating systems (like older OSX) that have the function in their libc but do not deign to declare it in their headers. Should resolve bug 587. svn:r13339
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in8
1 files changed, 8 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index c7580eafa3..8e675a6d3f 100644
--- a/configure.in
+++ b/configure.in
@@ -275,6 +275,14 @@ dnl These headers are not essential
AC_CHECK_HEADERS(stdint.h sys/types.h inttypes.h sys/param.h sys/wait.h limits.h sys/limits.h netinet/in.h arpa/inet.h machine/limits.h syslog.h sys/time.h sys/resource.h inttypes.h utime.h sys/utime.h sys/mman.h netintet/in.h netinet/in6.h malloc.h sys/syslimits.h malloc/malloc.h)
+TOR_CHECK_PROTOTYPE(malloc_good_size, HAVE_MALLOC_GOOD_SIZE_PROTOTYPE,
+[#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
+#ifdef HAVE_MALLOC_MALLOC_H
+#include <malloc/malloc.h>
+#endif])
+
AC_CHECK_HEADERS(net/if.h, net_if_found=1, net_if_found=0,
[#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>