[Libevent-users] compile patches for non-gcc

Jan Kneschke jan at kneschke.de
Thu Jun 14 11:04:40 EDT 2007


Hi,

I'm porting http://jan.kneschke.de/projects/mysql/mysql-proxy from a
simple poll() to libevent-1.3b and ran a compile-run on the MySQL
build-farm.

We are using the native compilers if possible to sort out possible user
problems on our side. For libevent we had some problems on AIX and
Solaris which got fixed in the attached patches.

HPUX is still open as it is missing a definition for "struct
sockaddr_storage".

This way I get a clean compile on:
- solaris 8-10 (x86|x86_64|sparc32|sparc64)
- AIX 5.2 (ppc32|ppc64)
- Linux (gcc 2.95 on SuSE 7.3 up to recent)
- FreeBSD
- MacOSX 10.3 and later

The patches are:

libevent-1.3b-aix-clockgettime.diff

  AIX has clock_gettime(), but only if you #define _XOPEN_SOURCE >= 500.
  Without it, the defines are invisible which leads to a compile error.
  Checking if the defines are available fixes it.

libevent-1.3b-aix-select.diff

  sys/select.h is needed for the NFDBITS

libevent-1.3b-c99-comments.diff

  // comments are available in C99 and GCC 3+ only.

libevent-1.3b-c99-varargs.diff

  args... is GCC only, __VAR_ARGS__ is C99 and available on older
  compilers too.

libevent-1.3b-c99-variables.diff

  in pre-c99 variables have to be defined before code. This affects the
  compile in gcc-2.95.

libevent-1.3b-cflags.diff

  Setting CFLAGS directly breaks the passing of -m64, -xarch=v9, ...
  from the command line to get a 64bit compile. Use AM_CFLAGS instead.

libevent-1.3b-config-h.diff

  config.h is needed to get defines right.

libevent-1.3b-inline.diff

  configure checks for the right way to define something 'inline'.
  Use it.

libevent-1.3b-solaris.diff

  On solaris we need -lresolv and -lnsl for get inet_aton and friends.

libevent-1.3b-stdint.diff

  stdint.h is available on all recent compilers and defines uint8_t and
  friends which uint8_t is BSD only. The checks in config.h are nice,
  but aren't propagated to the application which is using event.h.

cheers,
  Jan
-- 
 jan: "Gee, Brain^WEric, what'd you wanna do tonight?"
eric: Same thing we do everynight: Take over the HelloWorld!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libevent-1.3b-aix-clockgettime.diff
Type: text/x-patch
Size: 564 bytes
Desc: not available
Url : http://monkeymail.org/archives/libevent-users/attachments/20070614/1eb2d644/libevent-1.3b-aix-clockgettime-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libevent-1.3b-aix-select.diff
Type: text/x-patch
Size: 380 bytes
Desc: not available
Url : http://monkeymail.org/archives/libevent-users/attachments/20070614/1eb2d644/libevent-1.3b-aix-select-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libevent-1.3b-c99-comments.diff
Type: text/x-patch
Size: 58372 bytes
Desc: not available
Url : http://monkeymail.org/archives/libevent-users/attachments/20070614/1eb2d644/libevent-1.3b-c99-comments-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libevent-1.3b-c99-varargs.diff
Type: text/x-patch
Size: 804 bytes
Desc: not available
Url : http://monkeymail.org/archives/libevent-users/attachments/20070614/1eb2d644/libevent-1.3b-c99-varargs-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libevent-1.3b-c99-variables.diff
Type: text/x-patch
Size: 1771 bytes
Desc: not available
Url : http://monkeymail.org/archives/libevent-users/attachments/20070614/1eb2d644/libevent-1.3b-c99-variables-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libevent-1.3b-cflags.diff
Type: text/x-patch
Size: 936 bytes
Desc: not available
Url : http://monkeymail.org/archives/libevent-users/attachments/20070614/1eb2d644/libevent-1.3b-cflags-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libevent-1.3b-config-h.diff
Type: text/x-patch
Size: 2674 bytes
Desc: not available
Url : http://monkeymail.org/archives/libevent-users/attachments/20070614/1eb2d644/libevent-1.3b-config-h-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libevent-1.3b-inline.diff
Type: text/x-patch
Size: 855 bytes
Desc: not available
Url : http://monkeymail.org/archives/libevent-users/attachments/20070614/1eb2d644/libevent-1.3b-inline-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libevent-1.3b-solaris.diff
Type: text/x-patch
Size: 728 bytes
Desc: not available
Url : http://monkeymail.org/archives/libevent-users/attachments/20070614/1eb2d644/libevent-1.3b-solaris-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libevent-1.3b-stdint.diff
Type: text/x-patch
Size: 2605 bytes
Desc: not available
Url : http://monkeymail.org/archives/libevent-users/attachments/20070614/1eb2d644/libevent-1.3b-stdint-0001.bin


More information about the Libevent-users mailing list