diff options
author | Zack Weinberg <zackw@panix.com> | 2019-03-16 21:01:12 -0400 |
---|---|---|
committer | Zack Weinberg <zackw@panix.com> | 2020-01-08 13:42:38 -0500 |
commit | 7e2c24ffcbb36f4c568da4d7c6b31f89b21613ab (patch) | |
tree | 27ce22d6673b694724784a8d2c120b9ebbc9d836 /posix/unistd.h | |
parent | ee57733099e3d12bc0a822a2d56f4e5b1b2cdae1 (diff) | |
download | glibc-7e2c24ffcbb36f4c568da4d7c6b31f89b21613ab.zip glibc-7e2c24ffcbb36f4c568da4d7c6b31f89b21613ab.tar.gz glibc-7e2c24ffcbb36f4c568da4d7c6b31f89b21613ab.tar.bz2 |
Limit the set of strings.h functions also exposed in string.h.
As someone who can remember when you might not be able to include both
string.h and strings.h at the same time, it annoys me that strings.h
still exists and is the only standard source for str(n)casecmp(_l) and
ffs. I think it’s right that we expose those functions from string.h.
However, there’s no reason we need to keep exposing the other obsolete
functions that strings.h declares from string.h.
This patch creates <bits/strings_x2k8.h>, which declares the
non-obsolete functions whose official home is strings.h. strings.h
includes it unconditionally, and string.h includes it under
__USE_MISC, instead of strings.h.
Two tests of the obsolete strings.h functions had to be adjusted.
* string/strings.h (strcasecmp, strncasecmp, strcasecmp_l)
(strncasecmp_l, ffs, ffsl, ffsll): Move declarations to...
* string/bits/strings_x2k8.h: ... this new file.
* string/Makefile: Install bits/strings_x2k8.h.
* include/bits/strings_x2k8h: New wrapper.
* string/string.h: Include bits/strings_x2k8.h instead of
strings.h.
* debug/tst-chk1.c, string/test-string.h: Include strings.h.
* scripts/check-obsolete-constructs.py: string.h is no longer
expected to include strings.h.
* sysdeps/i386/i686/multiarch/bcopy.c
* sysdeps/i386/i686/multiarch/bzero.c
* sysdeps/i386/i686/multiarch/ifunc-impl-list.c
* sysdeps/powerpc/powerpc32/power4/multiarch/ifunc-impl-list.c
* sysdeps/powerpc/powerpc64/multiarch/bcopy-ppc64.c
* sysdeps/powerpc/powerpc64/multiarch/bcopy.c
* sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c
* sysdeps/s390/bzero.c
* sysdeps/s390/multiarch/ifunc-impl-list.c
* sysdeps/sparc/sparc64/multiarch/bzero.c
* sysdeps/sparc/sparc64/multiarch/ifunc-impl-list.c:
Include strings.h.
Diffstat (limited to 'posix/unistd.h')
0 files changed, 0 insertions, 0 deletions