[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r8509: Fix some warnings on mingw; hopefully this should let us bui (in tor/trunk: . src/common src/or)



Author: nickm
Date: 2006-09-27 20:53:02 -0400 (Wed, 27 Sep 2006)
New Revision: 8509

Modified:
   tor/trunk/
   tor/trunk/configure.in
   tor/trunk/src/common/compat.c
   tor/trunk/src/or/main.c
Log:
 r8750@totoro:  nickm | 2006-09-27 20:52:01 -0400
 Fix some warnings on mingw; hopefully this should let us build on mingw without warnings.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r8750] on 96637b51-b116-0410-a10e-9941ebb49b64
 svk:merge ticket from /tor/trunk [r8912] on c95137ef-5f19-0410-b913-86e773d04f59

Modified: tor/trunk/configure.in
===================================================================
--- tor/trunk/configure.in	2006-09-26 22:03:26 UTC (rev 8508)
+++ tor/trunk/configure.in	2006-09-28 00:53:02 UTC (rev 8509)
@@ -403,8 +403,10 @@
 
 dnl The warning message here is no longer strictly accurate.
 
-AC_CHECK_HEADERS(unistd.h string.h signal.h netdb.h ctype.h sys/stat.h sys/types.h fcntl.h sys/fcntl.h sys/ioctl.h sys/socket.h sys/time.h netinet/in.h arpa/inet.h errno.h assert.h time.h pwd.h grp.h, , AC_MSG_WARN(some headers were not found, compilation may fail))
+AC_CHECK_HEADERS(unistd.h string.h signal.h ctype.h sys/stat.h sys/types.h fcntl.h sys/fcntl.h sys/time.h errno.h assert.h time.h, , AC_MSG_WARN(some headers were not found, compilation may fail))
 
+AC_CHECK_HEADERS(netdb.h sys/ioctl.h sys/socket.h arpa/inet.h netinet/in.h pwd.h grp.h)
+
 AC_CHECK_HEADERS(event.h, , AC_MSG_ERROR(Libevent header (event.h) not found. Tor requires libevent to build.),
 [#ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
@@ -501,6 +503,7 @@
 AC_CHECK_SIZEOF(__int64)
 AC_CHECK_SIZEOF(void *)
 AC_CHECK_SIZEOF(time_t)
+AC_CHECK_SIZEOF(size_t)
 
 AC_CHECK_TYPES([uint, u_char])
 

Modified: tor/trunk/src/common/compat.c
===================================================================
--- tor/trunk/src/common/compat.c	2006-09-26 22:03:26 UTC (rev 8508)
+++ tor/trunk/src/common/compat.c	2006-09-28 00:53:02 UTC (rev 8509)
@@ -185,7 +185,11 @@
   res->mmap_handle = CreateFileMapping(res->file_handle,
                                        NULL,
                                        PAGE_READONLY,
+#if SIZEOF_SIZE_T > 4
                                        (res->base.size >> 32),
+#else
+                                       0,
+#endif
                                        (res->base.size & 0xfffffffful),
                                        NULL);
   if (res->mmap_handle != INVALID_HANDLE_VALUE)

Modified: tor/trunk/src/or/main.c
===================================================================
--- tor/trunk/src/or/main.c	2006-09-26 22:03:26 UTC (rev 8508)
+++ tor/trunk/src/or/main.c	2006-09-28 00:53:02 UTC (rev 8509)
@@ -1036,6 +1036,7 @@
             "Error from libevent when setting one-second timeout event");
 }
 
+#ifndef MS_WINDOWS
 /** Called when a possibly ignorable libevent error occurs; ensures that we
  * don't get into an infinite loop by ignoring too many errors from
  * libevent. */
@@ -1048,6 +1049,7 @@
   }
   return 0;
 }
+#endif
 
 /** Called when we get a SIGHUP: reload configuration files and keys,
  * retry all connections, re-upload all descriptors, and so on. */