Nick Mathewson wrote:
On Tue, May 19, 2009 at 06:03:18PM -0400, Nick Mathewson wrote:
 [...]
With respect to building it with Visual C, please see my message to
this very list from last Thursday:

  http://monkeymail.org/archives/libevent-users/2009-May/001650.html

So reading that message again, I guess I wasn't as explicit as I
should have been.  Short version: "yes, I think the next release will
build okay with visual C.  But somebody besides me test out the code
in the subversion repository to make sure there aren't any surprises."

yrs,

(Using: Visual Studio Express and Windows 7 SDK Beta, Vista Home Premium 32 bit)

As of r1298.

-----------------

Build fails on ssize_t in args to evbuffer_reserve_space.

If I search for ssize_t then I can see:

#define _EVENT_ssize_t
use of ssize_t
use of SSIZE_T
use of ev_ssize_t

I added:

#define ssize_t _EVENT_ssize_t

#define ev_ssize_t _EVENT_ssize_t


and compilation of the library completed, but that's hardly
a sane solution.

Note that SSIZE_T is defined (at least in the beta of the
SDK for Windows 7) in BaseTsd.h, and that file is probably
a good source for definitions that fake a lake of inttypes.

-----------------

I had to add ..\..\include to the header search paths for
the test projects, otherwise teh include of <event2/util.h>
from evutil.h will fail.

-----------------

I had to add Ws2_32.lib to the link dependencies for all the
tests.

-----------------

libevent fails to find definitions for a lot of functions
named evmap_*.  I added map.c to the file list for libevent.

-----------------

time-test.c does not compile because event2\event_struct.h
uses struct timeval.h and WinSock.h has not been included.

I added:

#ifdef WIN32
#include <winsock2.h>
#include <windows.h>
#include <io.h>
#endif

to time-test.c, but the reality is that any file including
event_struct.h will need to do this.  I suggest using a
private type that is equivalent of including WinSock2.h
into a base libevent header. This isn't likely to increase
the dependencies of a Windows application that uses libevent.

-----------------

signal-test.c and time-test.c use the C99 __func__.

I added:

#define __func__ __FUNCTION__

in a Win32-specific block - I'm lazy, its compiler-specific
really.

-----------------

Execution fails:

C:\src\libevent\WIN32-Prj>time_test\debug\time_test
[err] evsig_init: socketpair: Successful WSAStartup not yet performed [WSANOTINITIALISED ]

C:\src\libevent\WIN32-Prj>signal_test\debug\signal_test.exe
[err] evsig_init: socketpair: Successful WSAStartup not yet performed [WSANOTINITIALISED ]

event_test fails the same way though I don't get an error
message when running from the command line (I do under the debugger,
which is odd).


_______________________________________________
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users

Reply via email to