event_get_version() fails.

W.C.A. Wijngaards wouter at NLnetLabs.nl
Mon Jan 5 15:19:41 CET 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Marc,

This test program fails:
#include <stdio.h>
#include "event.h"
int main() { return printf("version %s\n", event_get_version()); }

compiled with gcc test.c *.o -lm
$ ./a.out
version EV_VERSION_MAJOR.EV_VERSION_MINOR

using gcc 4.3.0

You need to indirectly call the # quoting.
#define EVENT_QUOTED(a) #a
#define EVENT_VERSION(a,b) EVENT_QUOTED(a) "." EVENT_QUOTED(b)

const char *event_get_version (void)
{
          return EVENT_VERSION(EV_VERSION_MAJOR, EV_VERSION_MINOR);
}

Best regards,
   Wouter
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkliFv0ACgkQkDLqNwOhpPhoPwCeOnsuY1/qXJGcFbjC6NlfNAH3
r/EAoJHLWDellgmPYcCdfbXYiUtmclvK
=ISUw
-----END PGP SIGNATURE-----



More information about the libev mailing list