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.

 > Uh, I wouldn't use `-1' as an error indicator of type `size_t': `size_t'
 > is declared unsigned on many platforms, comparing it with `-1' will
 > cause warnings on many systems. Functions returning a memory size or a
 > negative error condition should use `ssize_t' (see read(2) for example).
 > 

Good point. Another case of careless code copying (tm). I've changed
the function to return 0 in case of an error, as a buffer size of 0 is
not going to do us any good.

regards,
Markus

-- 
Markus Hoenicka
[EMAIL PROTECTED]
(Spam-protected email: replace the quadrupeds with "mhoenicka")
http://www.mhoenicka.de

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
libdbi-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libdbi-devel

Reply via email to