This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Fix isblank / isascii / toascii namespace (bug 17635)
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Mon, 5 Jan 2015 06:42:43 -0800
- Subject: Re: Fix isblank / isascii / toascii namespace (bug 17635)
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 2 dot 10 dot 1412190114480 dot 976 at digraph dot polyomino dot org dot uk>
On Thu, Dec 18, 2014 at 5:15 PM, Joseph Myers <joseph@codesourcery.com> wrote:
> Use of isblank brings in isascii and toascii, but isblank is a C99
> function and the other two aren't; similarly, isascii and toascii are
> UNIX98 functions and bring in isblank, which isn't. (Not a
> conformance issue because of the is* and to* reservation, but still
> contrary to glibc practice.) This patch fixes this by splitting
> isblank out of ctype-extn.c to a separate ctype-c99.c. isblank_l is
> also moved to a separate file, ctype-c99_l.c (non-XSI POSIX.1-2008 has
> isblank_l, but isascii / toascii are marked OB XSI). (In principle
> all these functions could go in separate files - that's optimal for
> static linking - but they are also all very small, and splitting them
> all out is not needed to fix the present bug.)
>
> Tested for x86_64 (testsuite, and that installed stripped shared
> libraries are unchanged by the patch - the ordering in which new and
> existing sources are listed in ctype/Makefile is arranged so functions
> go in the same order so that this comparison works).
>
> 2014-12-19 Joseph Myers <joseph@codesourcery.com>
>
> [BZ #17635]
> * ctype/ctype-c99.c: New file. isblank implementation moved from
> ...
> * ctype/ctype-extn.c: ... here.
> (__isblank_l): Move to ...
> * ctype/ctype-c99_l.c: ... here. New file.
> * ctype/Makefile (routines): Add ctype-c99 and ctype-c99_l.
> * conform/Makefile (test-xfail-ISO99/ctype.h/linknamespace):
> Remove variable.
> (test-xfail-ISO11/ctype.h/linknamespace): Likewise.
> (test-xfail-XPG3/ctype.h/linknamespace): Likewise.
> (test-xfail-XPG4/ctype.h/linknamespace): Likewise.
> (test-xfail-UNIX98/ctype.h/linknamespace): Likewise.
> (test-xfail-POSIX2008/ctype.h/linknamespace): Likewise.
>
Looks good to me.
Thanks.
--
H.J.