]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Initial IRIX compatibility fixes: check for inttypes.h; check for platform cell_t.
authorNick Mathewson <nickm@torproject.org>
Tue, 22 Feb 2005 04:26:45 +0000 (04:26 +0000)
committerNick Mathewson <nickm@torproject.org>
Tue, 22 Feb 2005 04:26:45 +0000 (04:26 +0000)
svn:r3648

configure.in
src/common/torint.h
src/or/or.h

index 0ecab905ef0945faa31fe30e7bd1879d35a9ec95..d411c907071ab238171fedc22de6588798672248 100644 (file)
@@ -149,13 +149,14 @@ AC_CHECK_HEADERS(zlib.h, , AC_MSG_ERROR(Zlib header (zlib.h) not found. Tor requ
 
 dnl These headers are not essential
 
-AC_CHECK_HEADERS(stdint.h sys/types.h inttypes.h sys/param.h sys/wait.h sys/limits.h netinet/in.h arpa/inet.h machine/limits.h syslog.h sys/time.h sys/resource.h pthread.h stddef.h)
+AC_CHECK_HEADERS(stdint.h sys/types.h inttypes.h sys/param.h sys/wait.h sys/limits.h netinet/in.h arpa/inet.h machine/limits.h syslog.h sys/time.h sys/resource.h pthread.h stddef.h inttypes.h)
 
 AC_CHECK_FUNCS(gettimeofday ftime socketpair uname inet_aton strptime getrlimit setrlimit strlcat strlcpy strtoull getpwnam ftello pthread_create gethostbyname_r getaddrinfo)
 AC_FUNC_FSEEKO
 
 AC_CHECK_MEMBERS([struct timeval.tv_sec])
 
+
 dnl In case we aren't given a working stdint.h, we'll need to grow our own.
 dnl Watch out.
 
@@ -180,6 +181,10 @@ AC_CHECK_SIZEOF(long long)
 AC_CHECK_SIZEOF(__int64)
 AC_CHECK_SIZEOF(void *)
 
+# We want to make sure that we _don't_ have a cell_t defined, like IRIX does.
+
+AC_CHECK_SIZEOF(cell_t)
+
 # Now, let's see about alignment requirements.  On some platforms, we override
 # the default.
 case $host in
index 7bebb1009dc2215b3285510d462c675edbc9f715..75e45239c8cd13644a04044cbd460b1ed00997ed 100644 (file)
@@ -33,6 +33,9 @@
 #include <machine/limits.h>
 #endif
 #endif
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
 
 #if (SIZEOF_INT8_T != 0)
 #define HAVE_INT8_T
index 840ca4a6bbc1016b8fade47f346576a5794f75c6..059adefa570437cf1e10831c1d8b80f2db3f921a 100644 (file)
 #include "../common/util.h"
 #include "../common/torgzip.h"
 
+#if (SIZEOF_CELL_T != 0)
+/* On Irix, stdlib.h defines a cell_t type, so we need to make sure
+ * that our stuff always calls cell_t something different. */
+#define cell_t tor_cell_t
+#endif
+
 /** Define this if you want Tor to crash when any problem comes up,
  * so you can get a coredump and track things down. */
 #undef TOR_FRAGILE