[Libevent-users] Re: [Patch] Install autoconf header file as evconfig.h

Niels Provos provos at citi.umich.edu
Tue Feb 27 23:03:23 EST 2007


I submitted this to trunk.  I don't think it's ideal but a fine
solution for now.

Thank you,
Niels.

On 2/16/07, Nick Mathewson <nickm at freehaven.net> wrote:
> Hi, all!
>
> Now that Libevent 1.3 is out, it's time for Patches Less Obvious.
>
> One longstanding problems has been that it's not possible to include
> event.h unless you first define u_int8_t, u_int32_t, struct timeval,
> and so on.  It wasn't possible for event.h to do so itself, since the
> info needed to decide whether to define those existed only in the
> config.h file created by autoconf.
>
> Here is a patch that solves this problem by renaming "config.h" to
> "evconfig.h", making it get included from "event.h", and installing it
> as a header file to $PREFIX/include.  This way, people on platforms
> like mingw and Solaris will be able to build projects that use mingw
> correctly.
>
> This isn't a new or controversial approach, so far as I can tell: many
> other projects, like mysql, postgresql, glib, expat, firefox, SDL,
> python, and so on, do the same thing.  (For an approximate list, run
> "ls /usr/include/*/*config.h" on your favorite _nix machine.)
>
> The patch is here:
>
>     http://www.wangafu.net/~nickm/libevent_evconfig_patch/evconfig.diff
>
> In addition to this patch, you'll need to rename WIN32-Code/config.h
> to WIN32-Code/evconfig.h.
>
> You'll need to re-run aclocal, autoheader, autoconf, and automake
> after applying this patch.  I have not tested it on all platforms.
>
> yrs,
> --
> Nick Mathewson
>
>


More information about the Libevent-users mailing list