[uClibc]BUG?: tolower & Co. behaviour!

David Schleef ds at schleef.org
Mon Jul 22 18:07:04 UTC 2002


On Mon, Jul 22, 2002 at 07:21:19PM +0200, Soewono Effendi wrote:
> Hi all,
> 
> please take good care in using tolower & Co. under uClibc-0.9.12,
> especially if you include ctype.h
> 
> See the attached example. This works fine under normal GCC, but not
> under uClibc.
> I tested it using the uClibc toolchain.
> I spent hours in debuging dnsmasq, just to find out that tolower & Co.
> behave differently under uClibc ;(

>     *cp++ = tolower (*p++);

tolower() is allowed to be defined as a macro, and thus, p++ may
be evaluated several times.  This is a bug in dnsmasq.



dave...




More information about the uClibc mailing list