[Libevent-users] Patch for trunk to build on mingw, plus a couple of questions.

Niels Provos provos at citi.umich.edu
Tue Nov 21 20:23:53 EST 2006


On 11/21/06, Nick Mathewson <nickm at freehaven.net> wrote:
> I've got a patch that fixes all of the build errors in the main source
> files here:
>    http://freehaven.net/~nickm/mingw-libevent-3.diff

That patch is now on trunk.  Thank you.

> 1) Windows has no getaddrinfo or getnameinfo.  This keeps http.c from
>   building.  I've faked getaddrinfo somewhat, but there still needs to
>   be an implementation of name_from_addr.  Probably, it would make
>   sense to have http.c use evdns.c rather than calling the platform
>   resolver and blocking.

That is on the TODO list, but I did not get to it yet.  If you have
time to look into this that would be great.

> 2) The types u_int8_t, u_int16_t, and so on are defined in config.h
>    when they aren't present on the platform.  This would be fine,
>    except for the fact that they're used in event.h, and config.h
>    isn't installed.  As a user of libevent, I need to detect these
>    types myself and typedef them when they don't exist.

I suppose we could add something into event.h to define these types if
they don't exist.  We could also have a separate header file to define
these rather than cluttering up event.h.

> 3) http.c uses strlcpy, so libevent adds a strlcpy implementation when
>    the platform doesn't have one.  This is fine, except for the fact
>    that the strlcpy implementation is actually exported by libevent:
>    later, when I use autoconf to detect whether strlcpy is available,
>    I need to make sure to do so before I search for libevent, so that
>    I don't erroneously pick up libevent's strlcpy implementation.

That's going to be pretty easy, right?

Niels.


More information about the Libevent-users mailing list