]> granicus.if.org Git - libevent/commitdiff
Some tweaks to Brodie Thesfield's MSVC patch.
authorNick Mathewson <nickm@torproject.org>
Tue, 28 Jul 2009 19:41:48 +0000 (19:41 +0000)
committerNick Mathewson <nickm@torproject.org>
Tue, 28 Jul 2009 19:41:48 +0000 (19:41 +0000)
svn:r1386

WIN32-Code/event-config.h
WIN32-Code/win32.c
event_rpcgen.py
test/regress_dns.c
test/regress_main.c

index 6c85329b15a3f2e09ebe64eb06e64a057f26aa2a..0fd5d3f1e6e813c77bf27d5b5f785022e3710104 100644 (file)
 #define _EVENT_socklen_t unsigned int
 
 /* Define to `int' if <sys/types.h> does not define. */
-#define _EVENT_ssize_t intptr_t
-
-#define ssize_t SSIZE_T
+#define _EVENT_ssize_t SSIZE_T
 
 #endif
index 6c8ba2171139b698a22e04d333cfe01aba1426df..470558858fd920820d41bdca077164d3a9657c1c 100644 (file)
@@ -334,7 +334,7 @@ win32_dispatch(struct event_base *base, struct timeval *tv)
                }
        }
        if (win32op->writeset_out->fd_count) {
-        SOCKET s;
+               SOCKET s;
                i = rand() % win32op->writeset_out->fd_count;
                for (j=0; j<win32op->writeset_out->fd_count; ++j) {
                        if (++i >= win32op->writeset_out->fd_count)
index 136d6a83b6830b8a65fe48c251521ea760df4a96..6b8f5fa95caea8861986bda9ceedc3bb2fda6ed1 100755 (executable)
@@ -1561,9 +1561,13 @@ class CCodeGenerator:
         pre += ( '#include <stdlib.h>\n'
                  '#include <string.h>\n'
                  '#include <assert.h>\n'
+                 '#include <event-config.h>\n'
                  '#include <event2/event.h>\n'
                  '#include <event2/buffer.h>\n'
                  '#include <event2/tag.h>\n\n'
+                 '#ifdef _EVENT___func__\n'
+                 '#define __func__ _EVENT___FUNC__\n'
+                 '#endif\n\n'
                  )
 
         for statement in cppdirect:
index 5b74fc4ad6476cc844dbd40873d2b0a2d62455f8..c535006e2dc2b54c364c363d2593fd0740a22dd2 100644 (file)
@@ -70,6 +70,9 @@ static int dns_ok = 0;
 static int dns_got_cancel = 0;
 static int dns_err = 0;
 
+/* XXXXX have evutil export this. */
+int evutil_strcasecmp(const char *, const char *);
+
 static void
 dns_gethostbyname_cb(int result, char type, int count, int ttl,
     void *addresses, void *arg)
index 3f2a23916d3e02c6ed95299b5677a18d4c6793ee..4bb0e694b93ec787d9b5f05f47de4564868d81a7 100644 (file)
 #ifdef WIN32
 #include <winsock2.h>
 #include <windows.h>
-#define __func__    __FUNCTION__
 #endif
 
 #ifdef HAVE_CONFIG_H
 #include "event-config.h"
 #endif
 
+#ifdef _EVENT___func__
+#define __func__ _EVENT___func__
+#endif
+
 #if 0
 #include <sys/types.h>
 #include <sys/stat.h>