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

[or-cvs] Compile on win32



Update of /home/or/cvsroot/tor/src/common
In directory moria:/tmp/cvs-serv3669/src/common

Modified Files:
	compat.c 
Log Message:
Compile on win32

Index: compat.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/common/compat.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- compat.c	26 Jun 2005 05:03:21 -0000	1.55
+++ compat.c	27 Jun 2005 23:35:04 -0000	1.56
@@ -143,14 +143,16 @@
  * Requires that nlen be greater than zero.
  */
 const void *
-tor_memmem(const void *haystack, size_t hlen, const void *needle, size_t nlen)
+tor_memmem(const void *_haystack, size_t hlen, const void *_needle, size_t nlen)
 {
 #if defined(HAVE_MEMMEM) && (!defined(__GNUC__) || __GNUC__ >= 2)
   tor_assert(nlen);
   return memmem(haystack, hlen, needle, nlen);
 #else
   /* This isn't as fast as the GLIBC implementation, but it doesn't need to be. */
-  const void *p, *end;
+  const char *p, *end;
+  const char *haystack = (const char*)_haystack;
+  const char *needle = (const char*)_needle;
   char first;
   tor_assert(nlen);