|
From: Florian F. <oc...@ve...> - 2008-11-27 22:24:56
|
Hi Markus, On Thu, Nov 27, 2008 at 10:57:57PM +0100, Markus Hoenicka wrote: > Florian Forster writes: > > I've just tried to compile libdbi with > > ./configure --disable-docs \ > > CFLAGS="-Wall -Werror" \ > > CPPFLAGS="-D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=500" > > an ran into problems with [v]asprintf: Since they're no in any > > standard, Mac OS X (and therefore probably FreeBSD as well) will > > deactivate the prototypes. I'll follow up on this.. > > Just for the record: on FreeBSD 6.1 there are problems with snprintf, > strcasecmp, and (v)asprintf using these flags. Yeah, I ultimately ran into problems under Mac OS X, too. The (v)asprintf problem is, that the configure script checks if the C library exports such a symbol but not if the header files declare it. `strcasecmp' is easy: Just include <strings.h> (notice the second `s'!). I didn't have any problems with snprintf, but I ran into a signedness problem: Somewhere a `const unsigned char *' gets casted to a `const char *' which produces a warning. Another problem that prevents me from using `-Wall -Werror' is that some functions are declared ``deprected'' but used internally. I think the solution to that would be to put a `#ifndef LIBDBI_API_DEPRECATED' block around the definition in include/dbi/dbi.h. That way, src/dbi_main.c can define #define LIBDBI_API_DEPRECATED /**/ before including the header, effectively deactivating the warnings for that file only. I have some changed code for most of the above problems, but since work more *against* CVS than I work *with* CVS creating patches suddenly becomes a challenging task ;) I'll send the patches tomorrow. Does anybody have a Git import of the repository public somewhere? Regards, -octo -- Florian octo Forster Hacker in training GnuPG: 0x91523C3D http://verplant.org/ |