diff -r -u4 -d -N ./WIN32-Code/win32.c ../libevent-1.4.4-stable-win32/WIN32-Code/win32.c
--- ./WIN32-Code/win32.c 2007-12-22 12:03:54.000000000 +0900
+++ ../libevent-1.4.4-stable-win32/WIN32-Code/win32.c 2008-06-13 12:59:18.000000000 +0900
@@ -346,9 +346,9 @@
struct timeval *tv)
{
struct win32op *win32op = op;
int res = 0;
- int i;
+ u_int i;
int fd_count;
fd_set_copy(win32op->readset_out, win32op->readset_in);
fd_set_copy(win32op->exset_out, win32op->readset_in);
diff -r -u4 -d -N ./WIN32-Prj/libevent.dsp ../libevent-1.4.4-stable-win32/WIN32-Prj/libevent.dsp
--- ./WIN32-Prj/libevent.dsp 2007-11-12 11:37:32.000000000 +0900
+++ ../libevent-1.4.4-stable-win32/WIN32-Prj/libevent.dsp 1970-01-01 09:00:00.000000000 +0900
@@ -1,128 +0,0 @@
-# Microsoft Developer Studio Project File - Name="libevent" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-CFG=libevent - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "libevent.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "libevent.mak" CFG="libevent - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "libevent - Win32 Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "libevent - Win32 Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "libevent - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "..\\" /I "..\WIN32-Code" /I "..\compat" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ELSEIF "$(CFG)" == "libevent - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\\" /I "..\WIN32-Code" /I "..\compat" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ENDIF
-
-# Begin Target
-
-# Name "libevent - Win32 Release"
-# Name "libevent - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\log.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\event.c
-# End Source File
-# Begin Source File
-
-SOURCE="..\WIN32-Code\misc.c"
-# End Source File
-# Begin Source File
-
-SOURCE="..\WIN32-Code\win32.c"
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\acconfig.h
-# End Source File
-# Begin Source File
-
-SOURCE="..\WIN32-Code\config.h"
-# End Source File
-# Begin Source File
-
-SOURCE=..\compat\err.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\event.h
-# End Source File
-# Begin Source File
-
-SOURCE="..\WIN32-Code\misc.h"
-# End Source File
-# End Group
-# End Target
-# End Project
diff -r -u4 -d -N ./WIN32-Prj/libevent.dsw ../libevent-1.4.4-stable-win32/WIN32-Prj/libevent.dsw
--- ./WIN32-Prj/libevent.dsw 2007-11-12 11:37:32.000000000 +0900
+++ ../libevent-1.4.4-stable-win32/WIN32-Prj/libevent.dsw 1970-01-01 09:00:00.000000000 +0900
@@ -1,74 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "event_test"=".\event_test\event_test.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name libevent
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "libevent"=".\libevent.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "signal_test"=".\signal_test\signal_test.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name libevent
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "time_test"=".\time_test\time_test.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name libevent
- End Project Dependency
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff -r -u4 -d -N ./WIN32-Prj/libevent.sln ../libevent-1.4.4-stable-win32/WIN32-Prj/libevent.sln
--- ./WIN32-Prj/libevent.sln 1970-01-01 09:00:00.000000000 +0900
+++ ../libevent-1.4.4-stable-win32/WIN32-Prj/libevent.sln 2008-06-13 12:57:42.000000000 +0900
@@ -0,0 +1,21 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libevent", "libevent.vcproj", "{299FF863-6648-469D-98B3-5602BB48975F}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ Debug = Debug
+ Release = Release
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {299FF863-6648-469D-98B3-5602BB48975F}.Debug.ActiveCfg = Debug|Win32
+ {299FF863-6648-469D-98B3-5602BB48975F}.Debug.Build.0 = Debug|Win32
+ {299FF863-6648-469D-98B3-5602BB48975F}.Release.ActiveCfg = Release|Win32
+ {299FF863-6648-469D-98B3-5602BB48975F}.Release.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff -r -u4 -d -N ./WIN32-Prj/libevent.vcproj ../libevent-1.4.4-stable-win32/WIN32-Prj/libevent.vcproj
--- ./WIN32-Prj/libevent.vcproj 1970-01-01 09:00:00.000000000 +0900
+++ ../libevent-1.4.4-stable-win32/WIN32-Prj/libevent.vcproj 2008-06-13 13:10:16.000000000 +0900
@@ -0,0 +1,417 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r -u4 -d -N ./buffer.c ../libevent-1.4.4-stable-win32/buffer.c
--- ./buffer.c 2007-11-12 11:37:32.000000000 +0900
+++ ../libevent-1.4.4-stable-win32/buffer.c 2008-06-13 12:37:22.000000000 +0900
@@ -154,9 +154,9 @@
#endif
va_copy(aq, ap);
#ifdef WIN32
- sz = vsnprintf(buffer, space - 1, fmt, aq);
+ sz = _vsnprintf(buffer, space - 1, fmt, aq);
buffer[space - 1] = '\0';
#else
sz = vsnprintf(buffer, space, fmt, aq);
#endif
@@ -164,9 +164,9 @@
va_end(aq);
if (sz < 0)
return (-1);
- if (sz < space) {
+ if ((size_t) sz < space) {
buf->off += sz;
if (buf->cb != NULL)
(*buf->cb)(buf, oldoff, buf->off, buf->cbarg);
return (sz);
@@ -373,10 +373,10 @@
* before the reader has a chance to do something
* about it. If the reader does not tell us how much
* data we should read, we artifically limit it.
*/
- if (n > buf->totallen << 2)
- n = buf->totallen << 2;
+ if ((size_t) n > (buf->totallen << 2))
+ n = (buf->totallen << 2);
if (n < EVBUFFER_MAX_READ)
n = EVBUFFER_MAX_READ;
}
#endif
diff -r -u4 -d -N ./evdns.c ../libevent-1.4.4-stable-win32/evdns.c
--- ./evdns.c 2008-05-14 13:07:42.000000000 +0900
+++ ../libevent-1.4.4-stable-win32/evdns.c 2008-06-13 12:38:04.000000000 +0900
@@ -131,9 +131,9 @@
/* libevent doesn't work without this */
typedef ev_uint8_t u_char;
typedef unsigned int uint;
#endif
-#include
+#include "event.h"
#define u64 ev_uint64_t
#define u32 ev_uint32_t
#define u16 ev_uint16_t
@@ -2803,9 +2803,9 @@
int status = 0, r, added_any;
IP_ADDR_STRING *ns;
GetNetworkParams_fn_t fn;
- if (!(handle = LoadLibrary("iphlpapi.dll"))) {
+ if (!(handle = LoadLibraryA("iphlpapi.dll"))) {
log(EVDNS_LOG_WARN, "Could not open iphlpapi.dll");
status = -1;
goto done;
}
@@ -2873,15 +2873,15 @@
char *buf;
DWORD bufsz = 0, type = 0;
int status = 0;
- if (RegQueryValueEx(key, subkey, 0, &type, NULL, &bufsz)
+ if (RegQueryValueExA(key, subkey, 0, &type, NULL, &bufsz)
!= ERROR_MORE_DATA)
return -1;
if (!(buf = malloc(bufsz)))
return -1;
- if (RegQueryValueEx(key, subkey, 0, &type, (LPBYTE)buf, &bufsz)
+ if (RegQueryValueExA(key, subkey, 0, &type, (LPBYTE)buf, &bufsz)
== ERROR_SUCCESS && bufsz > 1) {
status = evdns_nameserver_ip_add_line(buf);
}
@@ -2909,14 +2909,14 @@
if (((int)GetVersion()) > 0) { /* NT */
HKEY nt_key = 0, interfaces_key = 0;
- if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_NS_NT_KEY, 0,
+ if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, WIN_NS_NT_KEY, 0,
KEY_READ, &nt_key) != ERROR_SUCCESS) {
log(EVDNS_LOG_DEBUG,"Couldn't open nt key, %d",(int)GetLastError());
return -1;
}
- r = RegOpenKeyEx(nt_key, "Interfaces", 0,
+ r = RegOpenKeyExA(nt_key, "Interfaces", 0,
KEY_QUERY_VALUE|KEY_ENUMERATE_SUB_KEYS,
&interfaces_key);
if (r != ERROR_SUCCESS) {
log(EVDNS_LOG_DEBUG,"Couldn't open interfaces key, %d",(int)GetLastError());
@@ -2929,9 +2929,9 @@
RegCloseKey(interfaces_key);
RegCloseKey(nt_key);
} else {
HKEY win_key = 0;
- if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_NS_9X_KEY, 0,
+ if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, WIN_NS_9X_KEY, 0,
KEY_READ, &win_key) != ERROR_SUCCESS) {
log(EVDNS_LOG_DEBUG, "Couldn't open registry key, %d", (int)GetLastError());
return -1;
}
diff -r -u4 -d -N ./evdns.h ../libevent-1.4.4-stable-win32/evdns.h
--- ./evdns.h 2007-11-12 11:37:32.000000000 +0900
+++ ../libevent-1.4.4-stable-win32/evdns.h 2008-06-13 12:38:22.000000000 +0900
@@ -164,9 +164,9 @@
extern "C" {
#endif
/* For integer types. */
-#include
+#include "evutil.h"
/** Error codes 0-5 are as described in RFC 1035. */
#define DNS_ERR_NONE 0
/** The name server was unable to interpret the query */
diff -r -u4 -d -N ./event-config.h ../libevent-1.4.4-stable-win32/event-config.h
--- ./event-config.h 2008-05-14 13:11:20.000000000 +0900
+++ ../libevent-1.4.4-stable-win32/event-config.h 2008-06-13 12:51:14.000000000 +0900
@@ -20,9 +20,9 @@
/* Define if /dev/poll is available */
/* #undef _EVENT_HAVE_DEVPOLL */
/* Define to 1 if you have the header file. */
-#define _EVENT_HAVE_DLFCN_H 1
+/* #undef _EVENT_HAVE_DLFCN_H */
/* Define if your system supports the epoll system calls */
/* #undef _EVENT_HAVE_EPOLL */
@@ -32,36 +32,36 @@
/* Define if your system supports event ports */
/* #undef _EVENT_HAVE_EVENT_PORTS */
/* Define to 1 if you have the `fcntl' function. */
-#define _EVENT_HAVE_FCNTL 1
+/* #undef _EVENT_HAVE_FCNTL */
/* Define to 1 if you have the header file. */
#define _EVENT_HAVE_FCNTL_H 1
/* Define to 1 if you have the `getaddrinfo' function. */
-#define _EVENT_HAVE_GETADDRINFO 1
+/* #undef _EVENT_HAVE_GETADDRINFO */
/* Define to 1 if you have the `getnameinfo' function. */
-#define _EVENT_HAVE_GETNAMEINFO 1
+/* #undef _EVENT_HAVE_GETNAMEINFO */
/* Define to 1 if you have the `gettimeofday' function. */
-#define _EVENT_HAVE_GETTIMEOFDAY 1
+/* #define _EVENT_HAVE_GETTIMEOFDAY 1 */
/* Define to 1 if you have the `inet_ntop' function. */
-#define _EVENT_HAVE_INET_NTOP 1
+/* #undef _EVENT_HAVE_INET_NTOP */
/* Define to 1 if you have the header file. */
-#define _EVENT_HAVE_INTTYPES_H 1
+/* #undef _EVENT_HAVE_INTTYPES_H 1 */
/* Define to 1 if you have the `kqueue' function. */
-#define _EVENT_HAVE_KQUEUE 1
+/* #undef _EVENT_HAVE_KQUEUE */
/* Define to 1 if you have the `nsl' library (-lnsl). */
/* #undef _EVENT_HAVE_LIBNSL */
/* Define to 1 if you have the `resolv' library (-lresolv). */
-#define _EVENT_HAVE_LIBRESOLV 1
+/* #undef _EVENT_HAVE_LIBRESOLV */
/* Define to 1 if you have the `rt' library (-lrt). */
/* #undef _EVENT_HAVE_LIBRT */
@@ -74,27 +74,27 @@
/* Define to 1 if you have the header file. */
/* #undef _EVENT_HAVE_NETINET_IN6_H */
/* Define to 1 if you have the `poll' function. */
-#define _EVENT_HAVE_POLL 1
+/* #undef _EVENT_HAVE_POLL */
/* Define to 1 if you have the header file. */
-#define _EVENT_HAVE_POLL_H 1
+/* #undef _EVENT_HAVE_POLL_H */
/* Define to 1 if you have the `port_create' function. */
/* #undef _EVENT_HAVE_PORT_CREATE */
/* Define to 1 if you have the header file. */
/* #undef _EVENT_HAVE_PORT_H */
/* Define to 1 if you have the `select' function. */
-#define _EVENT_HAVE_SELECT 1
+/* #undef _EVENT_HAVE_SELECT */
/* Define if F_SETFD is defined in */
-#define _EVENT_HAVE_SETFD 1
+/* #undef _EVENT_HAVE_SETFD */
/* Define to 1 if you have the `sigaction' function. */
-#define _EVENT_HAVE_SIGACTION 1
+/* #undef _EVENT_HAVE_SIGACTION */
/* Define to 1 if you have the `signal' function. */
#define _EVENT_HAVE_SIGNAL 1
@@ -104,9 +104,9 @@
/* Define to 1 if you have the header file. */
#define _EVENT_HAVE_STDARG_H 1
/* Define to 1 if you have the header file. */
-#define _EVENT_HAVE_STDINT_H 1
+/* #define _EVENT_HAVE_STDINT_H 1 */
/* Define to 1 if you have the header file. */
#define _EVENT_HAVE_STDLIB_H 1
@@ -116,18 +116,18 @@
/* Define to 1 if you have the header file. */
#define _EVENT_HAVE_STRING_H 1
/* Define to 1 if you have the `strlcpy' function. */
-#define _EVENT_HAVE_STRLCPY 1
+/* #undef _EVENT_HAVE_STRLCPY */
/* Define to 1 if you have the `strsep' function. */
-#define _EVENT_HAVE_STRSEP 1
+/* #undef _EVENT_HAVE_STRSEP */
/* Define to 1 if you have the `strtok_r' function. */
-#define _EVENT_HAVE_STRTOK_R 1
+/* #undef _EVENT_HAVE_STRTOK_R */
/* Define to 1 if you have the `strtoll' function. */
-#define _EVENT_HAVE_STRTOLL 1
+/* #undef _EVENT_HAVE_STRTOLL */
/* Define to 1 if the system has the type `struct in6_addr'. */
#define _EVENT_HAVE_STRUCT_IN6_ADDR 1
@@ -137,69 +137,69 @@
/* Define to 1 if you have the header file. */
/* #undef _EVENT_HAVE_SYS_EPOLL_H */
/* Define to 1 if you have the header file. */
-#define _EVENT_HAVE_SYS_EVENT_H 1
+/* #undef _EVENT_HAVE_SYS_EVENT_H */
/* Define to 1 if you have the header file. */
-#define _EVENT_HAVE_SYS_IOCTL_H 1
+/* #undef _EVENT_HAVE_SYS_IOCTL_H */
/* Define to 1 if you have the header file. */
-#define _EVENT_HAVE_SYS_PARAM_H 1
+/* #undef _EVENT_HAVE_SYS_PARAM_H */
/* Define to 1 if you have the header file. */
-#define _EVENT_HAVE_SYS_QUEUE_H 1
+/* #undef _EVENT_HAVE_SYS_QUEUE_H */
/* Define to 1 if you have the header file. */
-#define _EVENT_HAVE_SYS_SELECT_H 1
+/* #undef _EVENT_HAVE_SYS_SELECT_H */
/* Define to 1 if you have the header file. */
-#define _EVENT_HAVE_SYS_SOCKET_H 1
+/* #undef _EVENT_HAVE_SYS_SOCKET_H */
/* Define to 1 if you have the header file. */
#define _EVENT_HAVE_SYS_STAT_H 1
/* Define to 1 if you have the header file. */
-#define _EVENT_HAVE_SYS_TIME_H 1
+/* #define _EVENT_HAVE_SYS_TIME_H 1 */
/* Define to 1 if you have the header file. */
-#define _EVENT_HAVE_SYS_TYPES_H 1
+/* #define _EVENT_HAVE_SYS_TYPES_H 1 */
/* Define if TAILQ_FOREACH is defined in */
-#define _EVENT_HAVE_TAILQFOREACH 1
+/* #undef _EVENT_HAVE_TAILQFOREACH */
/* Define if timeradd is defined in */
-#define _EVENT_HAVE_TIMERADD 1
+/* #undef _EVENT_HAVE_TIMERADD */
/* Define if timerclear is defined in */
-#define _EVENT_HAVE_TIMERCLEAR 1
+/* #define _EVENT_HAVE_TIMERCLEAR 1 */
/* Define if timercmp is defined in */
#define _EVENT_HAVE_TIMERCMP 1
/* Define if timerisset is defined in */
#define _EVENT_HAVE_TIMERISSET 1
/* Define to 1 if the system has the type `uint16_t'. */
-#define _EVENT_HAVE_UINT16_T 1
+/* #undef _EVENT_HAVE_UINT16_T */
/* Define to 1 if the system has the type `uint32_t'. */
-#define _EVENT_HAVE_UINT32_T 1
+/* #undef _EVENT_HAVE_UINT32_T */
/* Define to 1 if the system has the type `uint64_t'. */
-#define _EVENT_HAVE_UINT64_T 1
+/* #undef _EVENT_HAVE_UINT64_T */
/* Define to 1 if the system has the type `uint8_t'. */
-#define _EVENT_HAVE_UINT8_T 1
+/* #undef _EVENT_HAVE_UINT8_T */
/* Define to 1 if you have the header file. */
-#define _EVENT_HAVE_UNISTD_H 1
+/* #define _EVENT_HAVE_UNISTD_H 1 */
/* Define to 1 if you have the `vasprintf' function. */
-#define _EVENT_HAVE_VASPRINTF 1
+/* #undef _EVENT_HAVE_VASPRINTF */
/* Define if kqueue works correctly with pipes */
-#define _EVENT_HAVE_WORKING_KQUEUE 1
+/* #undef _EVENT_HAVE_WORKING_KQUEUE */
/* Name of package */
#define _EVENT_PACKAGE "libevent"
diff -r -u4 -d -N ./event.h ../libevent-1.4.4-stable-win32/event.h
--- ./event.h 2008-05-04 09:48:36.000000000 +0900
+++ ../libevent-1.4.4-stable-win32/event.h 2008-06-13 12:43:54.000000000 +0900
@@ -158,9 +158,9 @@
#ifdef __cplusplus
extern "C" {
#endif
-#include
+#include "event-config.h"
#ifdef _EVENT_HAVE_SYS_TYPES_H
#include
#endif
#ifdef _EVENT_HAVE_SYS_TIME_H
@@ -171,9 +171,9 @@
#endif
#include
/* For int types. */
-#include
+#include "evutil.h"
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
#include
diff -r -u4 -d -N ./evhttp.h ../libevent-1.4.4-stable-win32/evhttp.h
--- ./evhttp.h 2008-05-14 13:07:42.000000000 +0900
+++ ../libevent-1.4.4-stable-win32/evhttp.h 2008-06-13 12:44:04.000000000 +0900
@@ -26,9 +26,9 @@
*/
#ifndef _EVHTTP_H_
#define _EVHTTP_H_
-#include
+#include "event.h"
#ifdef __cplusplus
extern "C" {
#endif
diff -r -u4 -d -N ./evrpc.c ../libevent-1.4.4-stable-win32/evrpc.c
--- ./evrpc.c 2008-05-14 13:07:42.000000000 +0900
+++ ../libevent-1.4.4-stable-win32/evrpc.c 2008-06-13 12:44:42.000000000 +0900
@@ -87,12 +87,12 @@
while ((rpc = TAILQ_FIRST(&base->registered_rpcs)) != NULL) {
assert(evrpc_unregister_rpc(base, rpc->uri));
}
while ((hook = TAILQ_FIRST(&base->input_hooks)) != NULL) {
- assert(evrpc_remove_hook(base, INPUT, hook));
+ assert(evrpc_remove_hook(base, EVRPC_HOOK_INPUT, hook));
}
while ((hook = TAILQ_FIRST(&base->output_hooks)) != NULL) {
- assert(evrpc_remove_hook(base, OUTPUT, hook));
+ assert(evrpc_remove_hook(base, EVRPC_HOOK_OUTPUT, hook));
}
free(base);
}
@@ -105,16 +105,16 @@
struct _evrpc_hooks *base = vbase;
struct evrpc_hook_list *head = NULL;
struct evrpc_hook *hook = NULL;
switch (hook_type) {
- case INPUT:
+ case EVRPC_HOOK_INPUT:
head = &base->in_hooks;
break;
- case OUTPUT:
+ case EVRPC_HOOK_OUTPUT:
head = &base->out_hooks;
break;
default:
- assert(hook_type == INPUT || hook_type == OUTPUT);
+ assert(hook_type == EVRPC_HOOK_INPUT || hook_type == EVRPC_HOOK_OUTPUT);
}
hook = calloc(1, sizeof(struct evrpc_hook));
assert(hook != NULL);
@@ -150,16 +150,16 @@
{
struct _evrpc_hooks *base = vbase;
struct evrpc_hook_list *head = NULL;
switch (hook_type) {
- case INPUT:
+ case EVRPC_HOOK_INPUT:
head = &base->in_hooks;
break;
- case OUTPUT:
+ case EVRPC_HOOK_OUTPUT:
head = &base->out_hooks;
break;
default:
- assert(hook_type == INPUT || hook_type == OUTPUT);
+ assert(hook_type == EVRPC_HOOK_INPUT || hook_type == EVRPC_HOOK_OUTPUT);
}
return (evrpc_remove_hook_internal(head, handle));
}
@@ -423,13 +423,13 @@
evhttp_connection_free(connection);
}
while ((hook = TAILQ_FIRST(&pool->input_hooks)) != NULL) {
- assert(evrpc_remove_hook(pool, INPUT, hook));
+ assert(evrpc_remove_hook(pool, EVRPC_HOOK_INPUT, hook));
}
while ((hook = TAILQ_FIRST(&pool->output_hooks)) != NULL) {
- assert(evrpc_remove_hook(pool, OUTPUT, hook));
+ assert(evrpc_remove_hook(pool, EVRPC_HOOK_OUTPUT, hook));
}
free(pool);
}
diff -r -u4 -d -N ./evrpc.h ../libevent-1.4.4-stable-win32/evrpc.h
--- ./evrpc.h 2007-11-12 11:37:32.000000000 +0900
+++ ../libevent-1.4.4-stable-win32/evrpc.h 2008-06-13 12:45:00.000000000 +0900
@@ -435,10 +435,10 @@
* implement compression, authentication, encryption, ...
*/
enum EVRPC_HOOK_TYPE {
- INPUT, /**< apply the function to an input hook */
- OUTPUT /**< apply the function to an output hook */
+ EVRPC_HOOK_INPUT, /**< apply the function to an input hook */
+ EVRPC_HOOK_OUTPUT /**< apply the function to an output hook */
};
/** adds a processing hook to either an rpc base or rpc pool
*
@@ -446,9 +446,9 @@
*
* The add functions return handles that can be used for removing hooks.
*
* @param vbase a pointer to either struct evrpc_base or struct evrpc_pool
- * @param hook_type either INPUT or OUTPUT
+ * @param hook_type either EVRPC_HOOK_INPUT or EVRPC_HOOK_OUTPUT
* @param cb the callback to call when the hook is activated
* @param cb_arg an additional argument for the callback
* @return a handle to the hook so it can be removed later
* @see evrpc_remove_hook()
@@ -460,9 +460,9 @@
/** removes a previously added hook
*
* @param vbase a pointer to either struct evrpc_base or struct evrpc_pool
- * @param hook_type either INPUT or OUTPUT
+ * @param hook_type either EVRPC_HOOK_INPUT or EVRPC_HOOK_OUTPUT
* @param handle a handle returned by evrpc_add_hook()
* @return 1 on success or 0 on failure
* @see evrpc_add_hook()
*/
diff -r -u4 -d -N ./evutil.h ../libevent-1.4.4-stable-win32/evutil.h
--- ./evutil.h 2008-05-14 13:07:42.000000000 +0900
+++ ../libevent-1.4.4-stable-win32/evutil.h 2008-06-13 12:45:10.000000000 +0900
@@ -37,9 +37,9 @@
#ifdef __cplusplus
extern "C" {
#endif
-#include
+#include "event-config.h"
#ifdef _EVENT_HAVE_SYS_TIME_H
#include
#endif
#ifdef _EVENT_HAVE_STDINT_H
diff -r -u4 -d -N ./http.c ../libevent-1.4.4-stable-win32/http.c
--- ./http.c 2008-05-08 14:15:48.000000000 +0900
+++ ../libevent-1.4.4-stable-win32/http.c 2008-06-13 12:45:52.000000000 +0900
@@ -727,10 +727,10 @@
return (0);
/* Completed chunk */
evbuffer_add(req->input_buffer,
- EVBUFFER_DATA(buf), req->ntoread);
- evbuffer_drain(buf, req->ntoread);
+ EVBUFFER_DATA(buf), (size_t) req->ntoread);
+ evbuffer_drain(buf, (size_t) req->ntoread);
req->ntoread = -1;
if (req->chunk_cb != NULL) {
(*req->chunk_cb)(req, req->cb_arg);
evbuffer_drain(req->input_buffer,
@@ -763,10 +763,10 @@
evbuffer_add_buffer(req->input_buffer, buf);
} else if (EVBUFFER_LENGTH(buf) >= req->ntoread) {
/* Completed content length */
evbuffer_add(req->input_buffer, EVBUFFER_DATA(buf),
- req->ntoread);
- evbuffer_drain(buf, req->ntoread);
+ (size_t) req->ntoread);
+ evbuffer_drain(buf, (size_t) req->ntoread);
req->ntoread = 0;
evhttp_connection_done(evcon);
return;
}
diff -r -u4 -d -N ./signal.c ../libevent-1.4.4-stable-win32/signal.c
--- ./signal.c 2008-05-14 13:07:42.000000000 +0900
+++ ../libevent-1.4.4-stable-win32/signal.c 2008-06-13 12:55:46.000000000 +0900
@@ -277,9 +277,9 @@
ncalls = base->sig.evsigcaught[EVENT_SIGNAL(ev)];
if (ncalls) {
if (!(ev->ev_events & EV_PERSIST))
event_del(ev);
- event_active(ev, EV_SIGNAL, ncalls);
+ event_active(ev, EV_SIGNAL, (short) ncalls);
base->sig.evsigcaught[EVENT_SIGNAL(ev)] = 0;
}
}
}