bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: enforcing the use of string.h related modules


From: Eric Blake
Subject: Re: enforcing the use of string.h related modules
Date: Sat, 27 Jan 2007 14:53:44 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9) Gecko/20061207 Thunderbird/1.5.0.9 Mnenhy/0.7.4.666

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

According to Bruno Haible on 1/27/2007 8:10 AM:
> 
> Most of us are developing on sane systems with few broken or missing
> functions. If, for example, someone uses the 'string' module and stpcpy(),
> he will not get a warning: /usr/include/string.h declares stpcpy(), and
> glibc implements it. So the programmer is unaware of the portability
> problem. Here is a proposed patch, that leads to a link error if someone
> uses stpcpy() without the 'stpcpy' module (assuming the 'string' module
> is present - which is quite likely since so much depends on it).

Sounds like a great idea to me.  I guess the alternative would be making
stpcpy.c part of the string module, and removing the stpcpy module
altogether (and likewise for the other affected modules), but that has
more churn on existing gnulib users.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFu8no84KuGfSFAYARApTmAJ9WJTorX7J1TjB6ugatIoLVwUNl8wCfWY/k
qHhxo7utYRpPmM31PbWf0+A=
=IkEN
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]