Importing strchrnul() from gnulib?

Alexandre Julliard julliard at winehq.org
Wed Sep 8 06:12:21 CDT 2010


Wolfram Sang <wolfram at the-dreams.de> writes:

> taking another approach at Bug 19070, I noticed that
> dlls/hhctrl.ocx/hhctrl.c has even more problems with commandline-handling.
> All three invocations of strchr() should better be strchrnul(). (Compare
> calling hh.exe with '-mapid' and '-mapid ' to see one difference).
> strchrnul ist protected by _GNU_SOURCE, though. Because I could imagine
> there are more places throughout the source needing a fix like this, I
> think about importing strchrnul() directly from gnulib into
> libs/wine/string.c (most appropriate place I could find). The function is
> LGPLv2+, of course. Objections?

You'd have to make a more convincing case that it's really needed a
lot. For hhctrl the command line parsing could be done much better,
without requiring strchrnul.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list