Commit Graph

370 Commits

Author SHA1 Message Date
Stefan Liebler f1ffad98be S390: Optimize strspn and wcsspn.
This patch provides optimized versions of strspn and wcsspn with the z13
vector instructions.

ChangeLog:

	* sysdeps/s390/multiarch/strspn-c.c: New File.
	* sysdeps/s390/multiarch/strspn-vx.S: Likewise.
	* sysdeps/s390/multiarch/strspn.c: Likewise.
	* sysdeps/s390/multiarch/wcsspn-c.c: Likewise.
	* sysdeps/s390/multiarch/wcsspn-vx.S: Likewise.
	* sysdeps/s390/multiarch/wcsspn.c: Likewise.
	* wcsmbs/wcsspn.c: Use WCSSPN if defined.
	* sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strspn and
	wcsspn functions.
	* sysdeps/s390/multiarch/ifunc-impl-list.c
	(__libc_ifunc_impl_list): Add ifunc test for strspn, wcsspn.
	* string/test-strspn.c: Add wcsspn support.
	* wcsmbs/test-wcsspn.c: New File.
	* wcsmbs/Makefile (strop-tests): Add wcsspn.
	* benchtests/bench-strspn.c: Add wcsspn support.
	* benchtests/bench-wcsspn.c: New File.
	* benchtests/Makefile (wcsmbs-bench): Add wcsspn.
2015-08-26 10:26:24 +02:00
Stefan Liebler d23d4ef19f S390: Optimize strchrnul and wcschrnul.
This patch provides optimized versions of strchrnul and wcschrnul with the z13
vector instructions.

ChangeLog:

	* sysdeps/s390/multiarch/strchrnul-c.c: New File.
	* sysdeps/s390/multiarch/strchrnul-vx.S: Likewise.
	* sysdeps/s390/multiarch/strchrnul.c: Likewise.
	* sysdeps/s390/multiarch/wcschrnul-c.c: Likewise.
	* sysdeps/s390/multiarch/wcschrnul-vx.S: Likewise.
	* sysdeps/s390/multiarch/wcschrnul.c: Likewise.
	* sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strchrnul and
	wcschrnul functions.
	* sysdeps/s390/multiarch/ifunc-impl-list.c
	(__libc_ifunc_impl_list): Add ifunc test for strchrnul, wcschrnul.
	* wcsmbs/wcschrnul.c: Use WCSCHRNUL if defined.
	* string/test-strchr.c: Add wcschrnul support.
	* wcsmbs/test-wcschrnul.c: New File.
	* wcsmbs/Makefile (strop-tests): Add wcschrnul.
	* benchtests/bench-strchr.c: Add wcschrnul support.
	* benchtests/bench-wcschrnul.c: New File.
	* benchtests/Makefile (wcsmbs-bench): Add wcschrnul.
2015-08-26 10:26:23 +02:00
Stefan Liebler cee82e70cc S390: Optimize strncmp and wcsncmp.
This patch provides optimized versions of strncmp and wcsncmp with the z13
vector instructions.

ChangeLog:

	* sysdeps/s390/multiarch/strncmp-c.c: New File.
	* sysdeps/s390/multiarch/strncmp-vx.S: Likewise.
	* sysdeps/s390/multiarch/strncmp.c: Likewise.
	* sysdeps/s390/multiarch/wcsncmp-c.c: Likewise.
	* sysdeps/s390/multiarch/wcsncmp-vx.S: Likewise.
	* sysdeps/s390/multiarch/wcsncmp.c: Likewise.
	* sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strncmp and
	wcsncmp functions.
	* sysdeps/s390/multiarch/ifunc-impl-list.c
	(__libc_ifunc_impl_list): Add ifunc test for strncmp, wcsncmp.
	* wcsmbs/wcsncmp.c (WCSNCMP): Define and use macro.
	* benchtests/bench-strncmp.c: Add wcsncmp support.
	* benchtests/bench-wcsncmp.c: New File.
	* benchtests/Makefile (wcsmbs-bench): Add wcsncmp.
2015-08-26 10:26:22 +02:00
Stefan Liebler e1fe91180e S390: Optimize strncat wcsncat.
This patch provides optimized versions of strncat and wcsncat with the z13
vector instructions.

ChangeLog:

	* sysdeps/s390/multiarch/strncat-c.c: New File.
	* sysdeps/s390/multiarch/strncat-vx.S: Likewise.
	* sysdeps/s390/multiarch/strncat.c: Likewise.
	* sysdeps/s390/multiarch/wcsncat-c.c: Likewise.
	* sysdeps/s390/multiarch/wcsncat-vx.S: Likewise.
	* sysdeps/s390/multiarch/wcsncat.c: Likewise.
	* sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strncat and
	wcsncat functions.
	* sysdeps/s390/multiarch/ifunc-impl-list.c
	(__libc_ifunc_impl_list): Add ifunc test for strncat, wcsncat.
	* wcsmbs/wcsncat.c (WCSNCAT): Define and use macro.
	* string/test-strncat.c: Add wcsncat support.
	* wcsmbs/test-wcsncat.c: New File.
	* wcsmbs/Makefile (strop-tests): Add wcsncat.
	* benchtests/bench-strncat.c: Add wcsncat support.
	* benchtests/bench-wcsncat.c: New File.
	* benchtests/Makefile (wcsmbs-bench): Add wcsncat.
2015-08-26 10:26:22 +02:00
Stefan Liebler d626a24f23 S390: Optimize strcat and wcscat.
This patch provides optimized versions of strcat and wcscat with the z13
vector instructions.

ChangeLog:

	* sysdeps/s390/multiarch/strcat-c.c: New File.
	* sysdeps/s390/multiarch/strcat-vx.S: Likewise.
	* sysdeps/s390/multiarch/strcat.c: Likewise.
	* sysdeps/s390/multiarch/wcscat-c.c: Likewise.
	* sysdeps/s390/multiarch/wcscat-vx.S: Likewise.
	* sysdeps/s390/multiarch/wcscat.c: Likewise.
	* sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strcat and
	wcscat functions.
	* sysdeps/s390/multiarch/ifunc-impl-list.c
	(__libc_ifunc_impl_list): Add ifunc test for strcat, wcscat.
	* string/strcat.c (STRCAT): Define and use macro.
	* wcsmbs/wcscat.c: Use WCSCAT if defined.
	* string/test-strcat.c: Add wcscat support.
	* wcsmbs/test-wcscat.c: New File.
	* wcsmbs/Makefile (strop-tests): Add wcscat.
	* benchtests/bench-strcat.c: Add wcscat support.
	* benchtests/bench-wcscat.c: New File.
	* benchtests/Makefile (wcsmbs-bench): Add wcscat.
2015-08-26 10:26:21 +02:00
Stefan Liebler b3a0c176d1 S390: Optimize stpncpy and wcpncpy.
This patch provides optimized versions of stpncpy and wcpncpy with the z13
vector instructions.

ChangeLog:

	* sysdeps/s390/multiarch/stpncpy-c.c: New File.
	* sysdeps/s390/multiarch/stpncpy-vx.S: Likewise.
	* sysdeps/s390/multiarch/stpncpy.c: Likewise.
	* sysdeps/s390/multiarch/wcpncpy-c.c: Likewise.
	* sysdeps/s390/multiarch/wcpncpy-vx.S: Likewise.
	* sysdeps/s390/multiarch/wcpncpy.c: Likewise.
	* sysdeps/s390/multiarch/Makefile (sysdep_routines): Add stpncpy and
	wcpncpy functions.
	* sysdeps/s390/multiarch/ifunc-impl-list.c
	(__libc_ifunc_impl_list): Add ifunc test for stpncpy, wcpncpy.
	* wcsmbs/wcpncpy.c: Use WCPNCPY if defined.
	* string/test-stpncpy.c: Add wcpncpy support.
	* wcsmbs/test-wcpncpy.c: New File.
	* wcsmbs/Makefile (strop-tests): Add wcpncpy.
	* benchtests/bench-stpncpy.c: Add wcpncpy support.
	* benchtests/bench-wcpncpy.c: New File.
	* benchtests/Makefile (wcsmbs-bench): Add wcpncpy.
2015-08-26 10:26:21 +02:00
Stefan Liebler d183b96ee6 S390: Optimize strncpy and wcsncpy.
This patch provides optimized versions of strncpy and wcsncpy with the z13
vector instructions.

ChangeLog:

	* sysdeps/s390/multiarch/strncpy-vx.S: New File.
	* sysdeps/s390/multiarch/strncpy.c: Likewise.
	* sysdeps/s390/multiarch/wcsncpy-c.c: Likewise.
	* sysdeps/s390/multiarch/wcsncpy-vx.S: Likewise.
	* sysdeps/s390/multiarch/wcsncpy.c: Likewise.
	* sysdeps/s390/s390-32/multiarch/strncpy.c: Likewise.
	* sysdeps/s390/s390-64/multiarch/strncpy.c: Likewise.
	* sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strncpy and
	wcsncpy functions.
	* wcsmbs/wcsncpy.c: Use WCSNCPY if defined.
	* sysdeps/s390/multiarch/ifunc-impl-list.c
	(__libc_ifunc_impl_list): Add ifunc test for strncpy, wcsncpy.
	* string/test-strncpy.c: Add wcsncpy support.
	* wcsmbs/test-wcsncpy.c: New File.
	* wcsmbs/Makefile (strop-tests): Add wcsncpy.
	* benchtests/bench-strncpy.c: Add wcsncpy support.
	* benchtests/bench-wcsncpy.c: New File.
	* benchtests/Makefile (wcsmbs-bench): Add wcsncpy
2015-08-26 10:26:21 +02:00
Stefan Liebler 8ade3db78d S390: Optimize stpcpy and wcpcpy.
This patch provides optimized versions of stpcpy and wcpcpy with the z13
vector instructions.

ChangeLog:

	* sysdeps/s390/multiarch/stpcpy-c.c: New File.
	* sysdeps/s390/multiarch/stpcpy-vx.S: Likewise.
	* sysdeps/s390/multiarch/stpcpy.c: Likewise.
	* sysdeps/s390/multiarch/wcpcpy-c.c: Likewise.
	* sysdeps/s390/multiarch/wcpcpy-vx.S: Likewise.
	* sysdeps/s390/multiarch/wcpcpy.c: Likewise.
	* sysdeps/s390/multiarch/Makefile (sysdep_routines): Add stpcpy and
	wcpcpy functions.
	* string/stpcpy.c: Use STPCPY if defined.
	* wcsmbs/wcpcpy.c: Use WCPCPY if defined.
	* sysdeps/s390/multiarch/ifunc-impl-list.c
	(__libc_ifunc_impl_list): Add ifunc test for stpcpy, wcpcpy.
	* string/test-stpcpy.c: Add wcpcpy support.
	* wcsmbs/test-wcpcpy.c: New File.
	* wcsmbs/Makefile (strop-tests): Add wcpcpy.
	* benchtests/bench-stpcpy.c: Add wcpcpy support.
	* benchtests/bench-wcpcpy.c: New File.
	* benchtests/Makefile (wcsmbs-bench): Add wcpcpy.
2015-08-26 10:26:21 +02:00
Stefan Liebler fcf40ebe26 S390: Optimize strnlen and wcsnlen.
This patch provides optimized versions of strnlen and wcsnlen with the z13
vector instructions.

ChangeLog:

	* sysdeps/s390/multiarch/strnlen-c.c: New File.
	* sysdeps/s390/multiarch/strnlen-vx.S: Likewise.
	* sysdeps/s390/multiarch/strnlen.c: Likewise.
	* sysdeps/s390/multiarch/wcsnlen-c.c: Likewise.
	* sysdeps/s390/multiarch/wcsnlen-vx.S: Likewise.
	* sysdeps/s390/multiarch/wcsnlen.c: Likewise.
	* sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strnlen and
	wcsnlen functions.
	* sysdeps/s390/multiarch/ifunc-impl-list.c
	(__libc_ifunc_impl_list): Add ifunc test for strnlen, wcsnlen.
	* wcsmbs/wcsnlen.c: Use WCSNLEN if defined.
	* string/test-strnlen.c: Add wcsnlen support.
	* wcsmbs/test-wcsnlen.c: New File.
	* wcsmbs/Makefile (strop-tests): Add wcsnlen.
	* benchtests/bench-strnlen.c: Add wcsnlen support.
	* benchtests/bench-wcsnlen.c: New File.
	* benchtests/Makefile (wcsmbs-bench): Add wcsnlen.
2015-08-26 10:26:20 +02:00
Daniel Marjamäki aeb47bbc06 Updated __nonnull annotations for wcscat, wcsncat, wcscmp and wcsncmp [BZ #18265]
This patch adds __nonnull annotations for wcscat, wcsncat, wcscmp and wcsncmp.

These added annotations match the annoations for strcat, strncat, strcmp, strncmp in glibc.
2015-08-05 04:43:42 -04:00
Joseph Myers 2f44ee08db Fix regcomp wcscoll, wcscmp namespace (bug 18497).
regcomp brings in references to wcscoll, which isn't in all the
standards that contain regcomp.  In turn, wcscoll brings in references
to wcscmp, also not in all those standards.  This patch fixes this by
making those functions into weak aliases of __wcscoll and __wcscmp and
calling those names instead as needed.

Tested for x86_64 and x86 (testsuite, and that disassembly of
installed shared libraries is unchanged by the patch).

	[BZ #18497]
	* wcsmbs/wcscmp.c [!WCSCMP] (WCSCMP): Define as __wcscmp instead
	of wcscmp.
	(wcscmp): Define as weak alias of WCSCMP.
	* wcsmbs/wcscoll.c (STRCOLL): Define as __wcscoll instead of
	wcscoll.
	(USE_HIDDEN_DEF): Define.
	[!USE_IN_EXTENDED_LOCALE_MODEL] (wcscoll): Define as weak alias of
	__wcscoll.  Don't use libc_hidden_weak.
	* wcsmbs/wcscoll_l.c (STRCMP): Define as __wcscmp instead of
	wcscmp.
	* sysdeps/i386/i686/multiarch/wcscmp-c.c
	[SHARED] (libc_hidden_def): Define __GI___wcscmp instead of
	__GI_wcscmp.
	(weak_alias): Undefine and redefine.
	* sysdeps/i386/i686/multiarch/wcscmp.S (wcscmp): Rename to
	__wcscmp and define as weak alias of __wcscmp.
	* sysdeps/x86_64/wcscmp.S (wcscmp): Likewise.
	* include/wchar.h (__wcscmp): Declare.  Use libc_hidden_proto.
	(__wcscoll): Likewise.
	(wcscmp): Don't use libc_hidden_proto.
	(wcscoll): Likewise.
	* posix/regcomp.c (build_range_exp): Call __wcscoll instead of
	wcscoll.
	* posix/regexec.c (check_node_accept_bytes): Likewise.
	* conform/Makefile (test-xfail-XPG3/regex.h/linknamespace): Remove
	variable.
	(test-xfail-XPG4/regex.h/linknamespace): Likewise.
	(test-xfail-POSIX/regex.h/linknamespace): Likewise.
2015-06-09 21:07:30 +00:00
Joseph Myers aca6ea6586 Fix fnmatch wmemchr namespace (bug 18468).
fnmatch brings in references to wmemchr, which isn't in all the
standards that contain fnmatch, resulting in linknamespace test
failures.  This patch fixes this in the usual way, making wmemchr into
a weak alias for __wmemchr.

Tested for x86_64 and x86 (testsuite, and that disassembly of
installed shared libraries is unchanged by the patch).

	[BZ #18468]
	* wcsmbs/wmemchr.c (wmemchr): Rename to __wmemchr and define as
	weak alias of __wmemchr.  Use libc_hidden_weak.
	* include/wchar.h (__wmemchr): Declare.  Use libc_hidden_proto.
	* posix/fnmatch.c [HANDLE_MULTIBYTE] (MEMCHR): Use __wmemchr
	instead of wmemchr.
2015-06-03 13:57:40 +00:00
Leonhard Holz f13c2a8dff Improve strcoll with strdiff.
This patch improves strcoll hot case by finding first byte that
mismatches. That is in likely case enough to determine comparison
result.
2015-05-12 11:37:52 +02:00
Daniel Marjamäki a6ab6ccda3 Add __nonnull attribute to wcscpy and wcsncpy [BZ#18265] 2015-05-05 17:24:38 +02:00
Adhemerval Zanella fb78612a96 powerpc: Fix __wcschr static build
This patch fix the static build for strftime, which uses __wcschr.
Current powerpc32 implementation defines the __wcschr be an alias to
__wcschr_ppc32 and current implementation misses the correct alias for
static build.

It also changes the default wcschr.c logic so a IFUNC implementation
should just define WCSCHR and undefine the required alias/internal
definitions.
2015-04-15 16:01:48 -03:00
Stefan Liebler 920a0395ba Use correct signedness in wcsncmp
[BZ #18206]
	* wcsmbs/wcsncmp.c (wcsncmp): Compare as wchar_t, not wint_t.
	  Use signed comparision instead of substraction to avoid
	  overflow bug.
	* localedata/tests-mbwc/tst_wcsncmp.c (tst_wcsncmp):
	  Take the sign of ret.
	* localedata/tests-mbwc/dat_wcsncmp.c (tst_wcsncmp_loc):
	  Do not expect precise return values. Only the sign matters.
	* wcsmbs/Makefile (strop-tests): Add wcsncmp.
	* wcsmbs/test-wcsncmp.c: New File.
	* string/test-strncmp.c: Add wcsncmp support.
2015-04-13 21:25:04 +02:00
Ondřej Bílka 9781a37002 Handle mblen return code when n is zero. 2015-04-03 15:47:12 +02:00
Leonhard Holz d35273f274 Remove unused definitions 2015-02-11 12:50:53 +01:00
Joseph Myers b168057aaa Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
Joseph Myers 2cfbdb9a27 Fix strftime wcschr namespace (bug 17634).
Use of strftime, a C90 function, ends up bringing in wcschr, which is
not a C90 function.  Although not a conformance bug (C90 reserves
wcs*), this is still contrary to glibc practice of avoiding relying on
those reservations; this patch arranges for the internal uses to use
__wcschr instead, with wcschr being a weak alias.  This is more
complicated than some such patches because of the various IFUNC
definitions of wcschr (which include code redefining libc_hidden_def
in a way that involves creating __GI_wcschr manually and so also needs
to create __GI___wcschr after the change of internal uses to use
__wcschr).

Tested for x86_64 and 32-bit x86 (testsuite, and that disassembly of
installed shared libraries is unchanged by the patch).

2014-12-10  Joseph Myers  <joseph@codesourcery.com>
	    Adhemerval Zanella  <azanella@linux.vnet.ibm.com>

	[BZ #17634]
	* wcsmbs/wcschr.c [!WCSCHR] (wcschr): Define as __wcschr.
	Undefine after defining function.  Define as weak alias of
	__wcschr.  Use libc_hidden_weak.
	* include/wchar.h (__wcschr): Declare.  Use libc_hidden_proto.
	* sysdeps/i386/i686/multiarch/wcschr-c.c [IS_IN (libc) && SHARED]
	(libc_hidden_def): Also define __GI___wcschr alias.
	* sysdeps/i386/i686/multiarch/wcschr.S (wcschr): Rename to
	__wcschr and define as weak alias of __wcschr.
	* sysdeps/powerpc/power6/wcschr.c [!WCSCHR] (WCSCHR): Define as
	__wcschr.
	[!WCSCHR] (DEFAULT_WCSCHR): Define.
	[DEFAULT_WCSCHR] (__wcschr): Use libc_hidden_def.
	[DEFAULT_WCSCHR] (wcschr): Define as weak alias of __wcschr.  Use
	libc_hidden_weak.  Do not use libc_hidden_def.
	* sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-ppc32.c
	[IS_IN (libc) && SHARED] (libc_hidden_def): Also define
	__GI___wcschr alias.
	* sysdeps/powerpc/powerpc32/power4/multiarch/wcschr.c
	[IS_IN (libc)] (wcschr): Define as macro expanding to
	__redirect_wcschr.
	[IS_IN (libc)] (__wcschr_ppc): Use __redirect_wcschr in typeof.
	[IS_IN (libc)] (__wcschr_power6): Likewise.
	[IS_IN (libc)] (__wcschr_power7): Likewise.
	[IS_IN (libc)] (__libc_wcschr): New.  Define with libc_ifunc
	instead of wcschr.
	[IS_IN (libc)] (wcschr): Undefine and define as weak alias of
	__libc_wcschr.
	[!IS_IN (libc)] (libc_hidden_def): Do not undefine and redefine.
	* sysdeps/powerpc/powerpc64/multiarch/wcschr.c (wcschr): Rename to
	__wcschr and define as weak alias of __wcschr.  Use
	libc_hidden_builtin_def.
	* sysdeps/x86_64/wcschr.S (wcschr): Rename to __wcschr and define
	as weak alias of __wcschr.  Use libc_hidden_weak.
	* time/alt_digit.c (_nl_get_walt_digit): Use __wcschr instead of
	wcschr.
	* time/era.c (_nl_init_era_entries): Likewise.
	* conform/Makefile (test-xfail-ISO/time.h/linknamespace): Remove
	variable.
	(test-xfail-XPG3/time.h/linknamespace): Likewise.
	(test-xfail-XPG4/time.h/linknamespace): Likewise.
2014-12-10 16:59:02 +00:00
Joseph Myers bd5dadac87 Remove TEST_IFUNC, tests-ifunc and *-ifunc.c tests.
TEST_IFUNC is only tested in two headers, bench-string.h and
test-string.h, after it gets defined by those headers, and it never
gets undefined.

Thus no defines of TEST_IFUNC are needed, and the *-ifunc.c tests that
just define TEST_IFUNC and include other tests are also redundant, as
is the code to remove $(tests-ifunc) and $(xtests-ifunc) conditionally
from tests and xtests.  This patch removes the useless defines and
tests of TEST_IFUNC and the associated useless tests and makefile
code.  It thereby fixes a series of warnings
"../string/test-string.h:21:0: warning: "TEST_IFUNC" redefined" where
test-string.h defines TEST_IFUNC to empty, other files define it to 1
and this produces warnings.

Tested for x86_64.

	* debug/test-stpcpy_chk-ifunc.c: Remove file.
	* debug/test-strcpy_chk-ifunc.c: Likewise.
	* wcsmbs/test-wcschr-ifunc.c: Likewise.
	* wcsmbs/test-wcscmp-ifunc.c: Likewise.
	* wcsmbs/test-wcscpy-ifunc.c: Likewise.
	* wcsmbs/test-wcslen-ifunc.c: Likewise.
	* wcsmbs/test-wcsrchr-ifunc.c: Likewise.
	* wcsmbs/test-wmemcmp-ifunc.c: Likewise.
	* Rules [$(multi-arch) = no] (tests): Do not filter out
	$(tests-ifunc).
	[$(multi-arch) = no] (xtests): Do not filter out $(xtests-ifunc).
	* debug/Makefile (tests-ifunc): Remove variable.
	(tests): Do not add $(tests-ifunc).
	* wcsmbs/Makefile (tests-ifunc): Remove variable.
	(tests): Do not add $(tests-ifunc).
	* benchtests/bench-string.h (TEST_IFUNC): Remove macro.
	[TEST_IFUNC]: Remove conditionals.
	* string/test-string.h (TEST_IFUNC): Remove macro.
	[TEST_IFUNC]: Remove conditionals.
2014-11-26 12:53:36 +00:00
Joseph Myers 01cad84e19 Fix __printf_fp wmemset namespace (bug 17574).
__printf_fp calls wmemset, but that is not an ISO C90 function.  This
patch fixes it to call a new __wmemset name instead (with wmemset
being a weak alias).

Tested for x86_64 (testsuite, and that disassembly of installed shared
libraries is unchanged by the patch).

	[BZ #17574]
	* wcsmbs/wmemset.c (wmemset): Rename to __wmemset and define as
	weak alias of __wmemset.  Use libc_hidden_weak.
	(__wmemset): Use libc_hidden_def.
	* include/wchar.h (__wmemset): Declare.  Use libc_hidden_proto.
	* stdio-common/printf_fp.c (___printf_fp): Call __wmemset instead
	of wmemset.
2014-11-12 22:38:11 +00:00
Arjun Shankar 29955b5d96 Modify several tests to use test-skeleton.c
This patch modifies several test cases to use test-skeleton.c.
It was generated by a bash script written for this purpose and
thus excludes several other tests which I deemed worth a visual
inspection before making the change.

I intend to follow up with individual patches to the tests
skipped by the script.

The script itself resides at http://git.io/WODAmg and should
reproduce this very patch when run against master.

ChangeLog:

2014-10-30  Arjun Shankar  <arjun.is@lostca.se>

	* catgets/test-gencat.c: Use test-skeleton.c.
	* catgets/tst-catgets.c: Likewise.
	* csu/tst-empty.c: Likewise.
	* elf/tst-audit2.c: Likewise.
	* elf/tst-global1.c: Likewise.
	* elf/tst-pathopt.c: Likewise.
	* elf/tst-piemod1.c: Likewise.
	* elf/tst-tls10.c: Likewise.
	* elf/tst-tls11.c: Likewise.
	* elf/tst-tls12.c: Likewise.
	* gnulib/tst-gcc.c: Likewise.
	* iconvdata/tst-e2big.c: Likewise.
	* iconvdata/tst-loading.c: Likewise.
	* iconv/tst-iconv1.c: Likewise.
	* iconv/tst-iconv2.c: Likewise.
	* inet/test-inet6_opt.c: Likewise.
	* inet/tst-gethnm.c: Likewise.
	* inet/tst-network.c: Likewise.
	* inet/tst-ntoa.c: Likewise.
	* intl/tst-codeset.c: Likewise.
	* intl/tst-gettext2.c: Likewise.
	* intl/tst-gettext3.c: Likewise.
	* intl/tst-ngettext.c: Likewise.
	* intl/tst-translit.c: Likewise.
	* io/test-stat.c: Likewise.
	* libio/test-fmemopen.c: Likewise.
	* libio/tst-freopen.c: Likewise.
	* libio/tst-sscanf.c: Likewise.
	* libio/tst-ungetwc1.c: Likewise.
	* libio/tst-ungetwc2.c: Likewise.
	* libio/tst-widetext.c: Likewise.
	* localedata/tst-ctype.c: Likewise.
	* localedata/tst-digits.c: Likewise.
	* localedata/tst-leaks.c: Likewise.
	* localedata/tst-mbswcs1.c: Likewise.
	* localedata/tst-mbswcs2.c: Likewise.
	* localedata/tst-mbswcs3.c: Likewise.
	* localedata/tst-mbswcs4.c: Likewise.
	* localedata/tst-mbswcs5.c: Likewise.
	* localedata/tst-setlocale.c: Likewise.
	* localedata/tst-trans.c: Likewise.
	* localedata/tst-wctype.c: Likewise.
	* localedata/tst-xlocale1.c: Likewise.
	* login/tst-grantpt.c: Likewise.
	* malloc/tst-calloc.c: Likewise.
	* malloc/tst-malloc.c: Likewise.
	* malloc/tst-mallocstate.c: Likewise.
	* malloc/tst-mcheck.c: Likewise.
	* malloc/tst-mtrace.c: Likewise.
	* malloc/tst-obstack.c: Likewise.
	* math/atest-exp2.c: Likewise.
	* math/atest-exp.c: Likewise.
	* math/atest-sincos.c: Likewise.
	* math/test-matherr.c: Likewise.
	* math/test-misc.c: Likewise.
	* math/test-powl.c: Likewise.
	* math/tst-definitions.c: Likewise.
	* misc/tst-dirname.c: Likewise.
	* misc/tst-efgcvt.c: Likewise.
	* misc/tst-fdset.c: Likewise.
	* misc/tst-hsearch.c: Likewise.
	* misc/tst-mntent2.c: Likewise.
	* nptl/tst-sem7.c: Likewise.
	* nptl/tst-sem8.c: Likewise.
	* nptl/tst-sem9.c: Likewise.
	* nss/test-netdb.c: Likewise.
	* posix/tst-fnmatch.c: Likewise.
	* posix/tst-getlogin.c: Likewise.
	* posix/tst-gnuglob.c: Likewise.
	* posix/tst-mmap.c: Likewise.
	* pwd/tst-getpw.c: Likewise.
	* resolv/tst-inet_ntop.c: Likewise.
	* rt/tst-timer.c: Likewise.
	* stdio-common/test-fseek.c: Likewise.
	* stdio-common/test-popen.c: Likewise.
	* stdio-common/test-vfprintf.c: Likewise.
	* stdio-common/tst-cookie.c: Likewise.
	* stdio-common/tst-fileno.c: Likewise.
	* stdio-common/tst-gets.c: Likewise.
	* stdio-common/tst-obprintf.c: Likewise.
	* stdio-common/tst-perror.c: Likewise.
	* stdio-common/tst-sprintf2.c: Likewise.
	* stdio-common/tst-sprintf3.c: Likewise.
	* stdio-common/tst-sprintf.c: Likewise.
	* stdio-common/tst-swprintf.c: Likewise.
	* stdio-common/tst-tmpnam.c: Likewise.
	* stdio-common/tst-unbputc.c: Likewise.
	* stdio-common/tst-wc-printf.c: Likewise.
	* stdlib/tst-environ.c: Likewise.
	* stdlib/tst-fmtmsg.c: Likewise.
	* stdlib/tst-limits.c: Likewise.
	* stdlib/tst-rand48-2.c: Likewise.
	* stdlib/tst-rand48.c: Likewise.
	* stdlib/tst-random2.c: Likewise.
	* stdlib/tst-random.c: Likewise.
	* stdlib/tst-strtol.c: Likewise.
	* stdlib/tst-strtoll.c: Likewise.
	* stdlib/tst-tls-atexit.c: Likewise.
	* stdlib/tst-xpg-basename.c: Likewise.
	* string/test-ffs.c: Likewise.
	* string/tst-bswap.c: Likewise.
	* string/tst-inlcall.c: Likewise.
	* string/tst-strtok.c: Likewise.
	* string/tst-strxfrm.c: Likewise.
	* sysdeps/x86_64/tst-audit10.c: Likewise.
	* sysdeps/x86_64/tst-audit3.c: Likewise.
	* sysdeps/x86_64/tst-audit4.c: Likewise.
	* sysdeps/x86_64/tst-audit5.c: Likewise.
	* time/tst-ftime_l.c: Likewise.
	* time/tst-getdate.c: Likewise.
	* time/tst-mktime3.c: Likewise.
	* time/tst-mktime.c: Likewise.
	* time/tst-posixtz.c: Likewise.
	* time/tst-strptime2.c: Likewise.
	* time/tst-strptime3.c: Likewise.
	* wcsmbs/tst-btowc.c: Likewise.
	* wcsmbs/tst-mbrtowc.c: Likewise.
	* wcsmbs/tst-mbsrtowcs.c: Likewise.
	* wcsmbs/tst-wchar-h.c: Likewise.
	* wcsmbs/tst-wcpncpy.c: Likewise.
	* wcsmbs/tst-wcrtomb.c: Likewise.
	* wcsmbs/tst-wcsnlen.c: Likewise.
	* wcsmbs/tst-wcstof.c: Likewise.
2014-11-05 15:24:08 +05:30
Florian Weimer ba7b4d294b Complete the removal of __gconv_translit_find
Prior to the 2.20 release, the function was just changed to fail
unconditionally, in commit a1a6a401ab.
This commit removes the function completely, including gconv bits
which depend on it.

This changes the gconv ABI, which is not a public interface.
2014-09-12 09:17:32 +02:00
Joseph Myers 2bf1804182 Include LOCPATH in default test environment.
Tests run using the default $(make-test-out) automatically get
GCONV_PATH and LC_ALL set, whether or not those environment variables
are actually needed for the individual test.  However, they do not get
LOCPATH set, meaning that a large number of tests have -ENV settings
just to set LOCPATH.

This patch moves LOCPATH into the default environment used for all
tests, on the principle that like GCONV_PATH any settings needed to
use files associated with the newly built library, rather than any old
installed files, are appropriate to use by default.

A further motivation is that various tests using .sh files also set
some combination of LC_ALL, GCONV_PATH and LOCPATH.  Preferably .sh
files should also use the default environment with any additions
required for the individual test.  Now, it was suggested in
<https://sourceware.org/ml/libc-alpha/2014-05/msg00715.html> that
various Makefile variables used in testing should be derived by
composing the -before-env and -after-env variables used when explicit
environment settings are required.  With such a change, it's also
natural for those variables to include the default settings (via some
intermediate makefile variable also used in make-test-out).

Because some .sh files only set variables that correspond to the
default settings, or a subset thereof, and this applies to more of the
.sh files once LOCPATH is in the default settings, doing so reduces
the size of a revised version of
<https://sourceware.org/ml/libc-alpha/2014-05/msg00596.html>: scripts
only needing the (expanded) default settings will not need to receive
the separate -before-env and -after-env variables, only the single
variable they do at present.  So moving LOCPATH into the default
settings can reduce churn caused by subsequent patches.

Tested x86_64 and x86.

	* Rules (make-test-out): Include
	LOCPATH=$(common-objpfx)localedata in default environment.
	* debug/Makefile (tst-chk1-ENV): Remove variable.
	(tst-chk2-ENV): Likewise.
	(tst-chk3-ENV): Likewise.
	(tst-chk4-ENV): Likewise.
	(tst-chk5-ENV): Likewise.
	(tst-chk6-ENV): Likewise.
	(tst-lfschk1-ENV): Likewise.
	(tst-lfschk2-ENV): Likewise.
	(tst-lfschk3-ENV): Likewise.
	(tst-lfschk4-ENV): Likewise.
	(tst-lfschk5-ENV): Likewise.
	(tst-lfschk6-ENV): Likewise.
	* iconvdata/Makefile (bug-iconv6-ENV): Likewise.
	(tst-iconv7-ENV): Likewise.
	* intl/Makefile (LOCPATH-ENV): Likewise.
	(tst-codeset-ENV): Likewise.
	(tst-gettext3-ENV): Likewise.
	(tst-gettext5-ENV): Likewise.
	* libio/Makefile (tst-widetext-ENV): Don't set LOCPATH.
	(tst-fopenloc-ENV): Likewise.
	(tst-fgetws-ENV): Remove variable.
	(tst-ungetwc1-ENV): Likewise.
	(tst-ungetwc2-ENV): Likewise.
	(bug-ungetwc2-ENV): Likewise.
	(tst-swscanf-ENV): Likewise.
	(bug-ftell-ENV): Likewise.
	(tst-fgetwc-ENV): Likewise.
	(tst-fseek-ENV): Likewise.
	(tst-ftell-partial-wide-ENV): Likewise.
	(tst-ftell-active-handler-ENV): Likewise.
	(tst-ftell-append-ENV): Likewise.
	* posix/Makefile (tst-fnmatch-ENV): Likewise.
	(tst-regexloc-ENV): Likewise.
	(bug-regex1-ENV): Likewise.
	(tst-regex-ENV): Likewise.
	(tst-regex2-ENV): Likewise.
	(bug-regex5-ENV): Likewise.
	(bug-regex6-ENV): Likewise.
	(bug-regex17-ENV): Likewise.
	(bug-regex18-ENV): Likewise.
	(bug-regex19-ENV): Likewise.
	(bug-regex20-ENV): Likewise.
	(bug-regex22-ENV): Likewise.
	(bug-regex23-ENV): Likewise.
	(bug-regex25-ENV): Likewise.
	(bug-regex26-ENV): Likewise.
	(bug-regex30-ENV): Likewise.
	(bug-regex32-ENV): Likewise.
	(bug-regex33-ENV): Likewise.
	(bug-regex34-ENV): Likewise.
	(bug-regex35-ENV): Likewise.
	(tst-rxspencer-ENV): Likewise.
	(tst-rxspencer-no-utf8-ENV): Likewise.
	* stdio-common/Makefile (tst-sprintf-ENV): Likewise.
	(tst-sscanf-ENV): Likewise.
	(tst-swprintf-ENV): Likewise.
	(tst-swscanf-ENV): Likewise.
	(test-vfprintf-ENV): Likewise.
	(scanf13-ENV): Likewise.
	(bug14-ENV): Likewise.
	(tst-grouping-ENV): Likewise.
	* stdlib/Makefile (tst-strtod-ENV): Likewise.
	(tst-strtod3-ENV): Likewise.
	(tst-strtod4-ENV): Likewise.
	(tst-strtod5-ENV): Likewise.
	(testmb2-ENV): Likewise./
	* string/Makefile (tst-strxfrm-ENV): Likewise.
	(tst-strxfrm2-ENV): Likewise.
	(bug-strcoll1-ENV): Likewise.
	(test-strcasecmp-ENV): Likewise.
	(test-strncasecmp-ENV): Likewise.
	* time/Makefile (tst-strptime-ENV): Likewise.
	(tst-ftime_l-ENV): Likewise.
	* wcsmbs/Makefile (tst-btowc-ENV): Likewise.
	(tst-mbrtowc-ENV): Likewise.
	(tst-wcrtomb-ENV): Likewise.
	(tst-mbrtowc2-ENV): Likewise.
	(tst-c16c32-1-ENV): Likewise.
	(tst-mbsnrtowcs-ENV): Likewise.

localedata/ChangeLog:
	* Makefile (TEST_MBWC_ENV): Remove variable.
	(tst_iswalnum-ENV): Likewise.
	(tst_iswalpha-ENV): Likewise.
	(tst_iswcntrl-ENV): Likewise.
	(tst_iswctype-ENV): Likewise.
	(tst_iswdigit-ENV): Likewise.
	(tst_iswgraph-ENV): Likewise.
	(tst_iswlower-ENV): Likewise.
	(tst_iswprint-ENV): Likewise.
	(tst_iswpunct-ENV): Likewise.
	(tst_iswspace-ENV): Likewise.
	(tst_iswupper-ENV): Likewise.
	(tst_iswxdigit-ENV): Likewise.
	(tst_mblen-ENV): Likewise.
	(tst_mbrlen-ENV): Likewise.
	(tst_mbrtowc-ENV): Likewise.
	(tst_mbsrtowcs-ENV): Likewise.
	(tst_mbstowcs-ENV): Likewise.
	(tst_mbtowc-ENV): Likewise.
	(tst_strcoll-ENV): Likewise.
	(tst_strfmon-ENV): Likewise.
	(tst_strxfrm-ENV): Likewise.
	(tst_swscanf-ENV): Likewise.
	(tst_towctrans-ENV): Likewise.
	(tst_towlower-ENV): Likewise.
	(tst_towupper-ENV): Likewise.
	(tst_wcrtomb-ENV): Likewise.
	(tst_wcscat-ENV): Likewise.
	(tst_wcschr-ENV): Likewise.
	(tst_wcscmp-ENV): Likewise.
	(tst_wcscoll-ENV): Likewise.
	(tst_wcscpy-ENV): Likewise.
	(tst_wcscspn-ENV): Likewise.
	(tst_wcslen-ENV): Likewise.
	(tst_wcsncat-ENV): Likewise.
	(tst_wcsncmp-ENV): Likewise.
	(tst_wcsncpy-ENV): Likewise.
	(tst_wcspbrk-ENV): Likewise.
	(tst_wcsrtombs-ENV): Likewise.
	(tst_wcsspn-ENV): Likewise.
	(tst_wcsstr-ENV): Likewise.
	(tst_wcstod-ENV): Likewise.
	(tst_wcstok-ENV): Likewise.
	(tst_wcstombs-ENV): Likewise.
	(tst_wcswidth-ENV): Likewise.
	(tst_wcsxfrm-ENV): Likewise.
	(tst_wctob-ENV): Likewise.
	(tst_wctomb-ENV): Likewise.
	(tst_wctrans-ENV): Likewise.
	(tst_wctype-ENV): Likewise.
	(tst_wcwidth-ENV): Likewise.
	(tst-digits-ENV): Likewise.
	(tst-mbswcs6-ENV): Likewise.
	(tst-xlocale1-ENV): Likewise.
	(tst-xlocale2-ENV): Likewise.
	(tst-strfmon1-ENV): Likewise.
	(tst-strptime-ENV): Likewise.
	(tst-setlocale-ENV): Don't set LOCPATH.
	(bug-iconv-trans-ENV): Remove variable.
	(tst-sscanf-ENV): Likewise.
	(tst-leaks-ENV): Don't set LOCPATH.
	(bug-setlocale1-ENV): Remove variable.
	(bug-setlocale1-static-ENV): Likewise.
	(tst-setlocale2-ENV): Likewise.
2014-06-04 23:37:25 +00:00
Joseph Myers a5f891ac8d Consistently include Makeconfig after defining subdir.
In <https://sourceware.org/ml/libc-alpha/2014-01/msg00196.html> I
noted it was necessary to add includes of Makeconfig early in various
subdirectory makefiles for the tests-special variable settings added
by that patch to be conditional on configuration information.  No-one
commented on the general question there of whether Makeconfig should
always be included immediately after the definition of subdir.

This patch implements that early inclusion of Makeconfig in each
directory (which is a lot easier than consistent placement of includes
of Rules).  Includes are added if needed, or moved up if already
present.  Subdirectory "all:" targets are removed, since Makeconfig
provides one.

There is potential for further cleanups I haven't done.  Rules and
Makerules have code such as

ifneq   "$(findstring env,$(origin headers))" ""
headers :=
endif

to override to empty any value of various variables that came from the
environment.  I think there is a case for Makeconfig setting all the
subdirectory variables (other than subdir) to empty to ensure no
outside value is going to take effect if a subdirectory fails to
define a variable.  (A list of such variables, possibly out of date
and incomplete, is in manual/maint.texi.)  Rules and Makerules would
give errors if Makeconfig hadn't already been included, instead of
including it themselves.  The special code to override values coming
from the environment would then be obsolete and could be removed.

Tested x86_64, including that installed binaries are identical before
and after the patch.

	* argp/Makefile: Include Makeconfig immediately after defining
	subdir.
	* assert/Makefile: Likewise.
	* benchtests/Makefile: Likewise.
	* catgets/Makefile: Likewise.
	* conform/Makefile: Likewise.
	* crypt/Makefile: Likewise.
	* csu/Makefile: Likewise.
	(all): Remove target.
	* ctype/Makefile: Include Makeconfig immediately after defining
	subdir.
	* debug/Makefile: Likewise.
	* dirent/Makefile: Likewise.
	* dlfcn/Makefile: Likewise.
	* gmon/Makefile: Likewise.
	* gnulib/Makefile: Likewise.
	* grp/Makefile: Likewise.
	* gshadow/Makefile: Likewise.
	* hesiod/Makefile: Likewise.
	* hurd/Makefile: Likewise.
	(all): Remove target.
	* iconvdata/Makefile: Include Makeconfig immediately after
	defining subdir.
	* inet/Makefile: Likewise.
	* intl/Makefile: Likewise.
	* io/Makefile: Likewise.
	* libio/Makefile: Likewise.
	(all): Remove target.
	* locale/Makefile: Include Makeconfig immediately after defining
	subdir.
	* login/Makefile: Likewise.
	* mach/Makefile: Likewise.
	(all): Remove target.
	* malloc/Makefile: Include Makeconfig immediately after defining
	subdir.
	(all): Remove target.
	* manual/Makefile: Include Makeconfig immediately after defining
	subdir.
	* math/Makefile: Likewise.
	* misc/Makefile: Likewise.
	* nis/Makefile: Likewise.
	* nss/Makefile: Likewise.
	* po/Makefile: Likewise.
	(all): Remove target.
	* posix/Makefile: Include Makeconfig immediately after defining
	subdir.
	* pwd/Makefile: Likewise.
	* resolv/Makefile: Likewise.
	* resource/Makefile: Likewise.
	* rt/Makefile: Likewise.
	* setjmp/Makefile: Likewise.
	* shadow/Makefile: Likewise.
	* signal/Makefile: Likewise.
	* socket/Makefile: Likewise.
	* soft-fp/Makefile: Likewise.
	* stdio-common/Makefile: Likewise.
	* stdlib/Makefile: Likewise.
	* streams/Makefile: Likewise.
	* string/Makefile: Likewise.
	* sunrpc/Makefile: Likewise.
	(all): Remove target.
	* sysvipc/Makefile: Include Makeconfig immediately after defining
	subdir.
	* termios/Makefile: Likewise.
	* time/Makefile: Likewise.
	* timezone/Makefile: Likewise.
	(all): Remove target.
	* wcsmbs/Makefile: Include Makeconfig immediately after defining
	subdir.
	* wctype/Makefile: Likewise.

libidn/ChangeLog:
	* Makefile: Include Makeconfig immediately after defining subdir.

localedata/ChangeLog:
	* Makefile: Include Makeconfig immediately after defining subdir.
	(all): Remove target.

nptl/ChangeLog:
	* Makefile: Include Makeconfig immediately after defining subdir.

nptl_db/ChangeLog:
	* Makefile: Include Makeconfig immediately after defining subdir.
2014-02-26 23:12:03 +00:00
Ondřej Bílka a1ffb40e32 Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
Allan McRae d4697bc93d Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
Adhemerval Zanella 93be09e725 PowerPC: multiarch wcscpy for PowerPC32 2013-12-06 05:47:02 -06:00
Adhemerval Zanella bb04e529f6 PowerPC: multiarch wcsrchr for PowerPC32 2013-12-06 05:47:02 -06:00
Joseph Myers 2e09a79ada Avoid use of "register" as optimization hint. 2013-06-07 22:24:35 +00:00
Ryan S. Arnold e054f49430 Add #include <stdint.h> for uint[32|64]_t usage (except installed headers). 2013-05-16 11:32:54 -05:00
Andreas Jaeger f238fd190b Sort Versions files 2013-02-17 16:34:04 +01:00
Joseph Myers fed0faa1c6 Remove __GNUC__ conditions for "long long" from string.h and wchar.h. 2013-01-10 16:44:59 +00:00
Joseph Myers 568035b787 Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
Joseph Myers f4cf5f2d8b Add script to update copyright notices and reformat some to facilitate its use. 2013-01-01 16:29:10 +00:00
H.J. Lu 228cfb018a Add wcsmbs IFUNC tests 2012-10-19 22:13:34 -07:00
Roland McGrath c75ccd4c3a Clean up definition of _LIBC_REENTRANT and _IO_MTSAFE_IO. 2012-08-17 09:35:15 -07:00
Mike Frysinger fed806c3af tests: move -D_FORTIFY_SOURCE to CPPFLAGS
The -D_FORTIFY_SOURCE flags are being added to the test-specific CFLAGS
values when they should be the test-specific CPPFLAGS values.  Otherwise
the values don't override the user-specified CPPFLAGS and might end up
breaking the tests.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-05-31 14:31:08 -04:00
Andreas Jaeger 5fefb43629 [BZ #13691], Revert breakage of iconv() converter for TCVN-5712.
* iconvdata/tcvn5712-1.c (BODY for FROM_LOOP): Don't consider
	inptr and inend for must_buffer_ch.
	* wcsmbs/tst-mbsnrtowcs.c: Remove file.
	* wcsmbs/Makefile (tests): Remove tst-mbsnrtowcs.
	* stdio-common/Makefile (tests): Remove bug15.
	(bug15-ENV): Remove macro.
	* stdio-common/bug15.c: Remove, we do not support vi_VN.TCVN5712-1
	anymore.

localedata:
	* SUPPORTED: Remove vi_VN.TCVN/TCVN5712-1.
	* tst-strptime.c: Remove, we do not support vi_VN.TCVN5712-1
	anymore.
	* Makefile (LOCALES): Remove vi_VN.TCVN5712-1 from list.
	(tests): Remove tst-strptime.
2012-05-21 20:41:36 +02:00
Marek Polacek 5ac3ea17df Fix attributes for fortify functions. 2012-04-29 15:34:20 +02:00
Tulio Magno Quites Machado Filho e64d2de526 Fix a bug when converting strings with 1 character using TCVN5712-1
It isn't necessary to buffer the last character of strings. This can cause a
bug with strings that have 1 character between 0x0041 and 0x01b0.

	[BZ #13691]
	* iconvdata/tcvn5712-1.c (FROM_LOOP): Fix a bug when converting strings
	with only 1 character between 0x0041 and 0x01b0.
	* wcsmbs/Makefile (tests): Add tst-mbsnrtowcs.
	* wcsmbs/tst-mbsnrtowcs.c: New file.
2012-03-30 10:43:43 +02:00
Ulrich Drepper a4300c7a4d Remove distribute variable from Makefiles 2012-03-07 05:17:13 -05:00
Paul Eggert 59ba27a63a Replace FSF snail mail address with URLs. 2012-02-09 23:18:22 +00:00
Joseph Myers f1d4aa75ea Use newly built locales for tst-c16c32-1. 2012-01-24 22:25:42 +00:00
Ulrich Drepper d220b11777 Fix version check in uchar.h 2012-01-21 15:20:14 -05:00
Ulrich Drepper d3ed722566 Simplify char16_t implementation 2012-01-08 07:19:21 -05:00
Ulrich Drepper a784e50247 Remove pre-ISO C support
No more __const.
2012-01-07 23:57:22 -05:00
Ulrich Drepper 9954432e30 More char16_t and char32_t support
It works now for UTF-8 locales
2012-01-07 10:52:53 -05:00
Joseph Myers 8ecd6b2a12 Fix C11 header changes for C++. 2012-01-06 18:11:50 +00:00
Ulrich Drepper d1863a4e95 Typo in test for C11-capable compiler 2012-01-03 08:01:45 -05:00
Ulrich Drepper db6af3ebf4 Add uchar.h support, part 1
c16 support for locales other than the C locale is still missing.
2012-01-01 07:17:22 -05:00
Ulrich Drepper 0c023bb722 Start of uchar.h work 2012-01-01 07:17:22 -05:00
Ulrich Drepper dadebdaeeb Add missing restrict in mbrtowc declaration 2012-01-01 07:17:21 -05:00
Ulrich Drepper 1d3e4b618a Optimized wcschr and wcscpy for x86-64 and x86-32 2011-12-17 14:39:23 -05:00
Ulrich Drepper 5b330a2d90 Add tests for wcsrchr and wcscpy 2011-12-17 14:14:58 -05:00
Andreas Schwab 1f1e194720 Use correct signedness in default implementations of wcscmp and wmemcmp 2011-10-25 15:26:29 +02:00
Andreas Schwab a201fbcf9c Fix lost wcslen symbol 2011-10-24 12:03:33 +02:00
Liubov Dmitrieva fc2ee42abe Add optimized wcslen and strnlen for x86-32 2011-10-23 15:17:23 -04:00
Liubov Dmitrieva 2d09f82f8a Add wcschr test cases 2011-10-23 14:14:26 -04:00
Liubov Dmitrieva 619fcccaa3 Add wcslen test cases 2011-10-23 14:11:50 -04:00
Liubov Dmitrieva 95584d3b33 Fix signedness in wcscmp comparison 2011-10-23 13:34:15 -04:00
Andreas Schwab b468825a05 Fix lost wmemcmp symbol 2011-10-15 20:44:10 +02:00
Liubov Dmitrieva be13f7bff6 Optimized memcmp and wmemcmp for x86-64 and x86-32 2011-10-15 11:10:08 -04:00
Ulrich Drepper 762011fe9f Move wide char tests to wcsmbs directory 2011-09-08 18:01:07 -04:00
Ulrich Drepper 1b48c53782 Add x86-32 optimized wcscmp 2011-09-05 13:53:27 -04:00
Ulrich Drepper 8593482f5e Fix visibility of declarations of wcpcpy and wcpncpy. 2011-04-01 18:36:07 -04:00
Ulrich Drepper 4c1423edfb Fix typos in comments. 2011-04-01 10:39:30 -04:00
Jakub Jelinek c6e13027ab Remove __restrict quals from wmemcmp prototype. 2011-03-10 13:04:08 -05:00
Andreas Schwab dbb0472f05 Declare wcpcpy and wcpncpy only under _GNU_SOURCE 2010-12-10 09:16:12 -05:00
Andreas Schwab 4f1972374a Fix use of restrict in wchar.h 2010-12-10 09:15:01 -05:00
Ulrich Drepper 45db99c7d0 Fix handling of tail bytes of buffer in SSE2/SSSE3 x86-64 version strn{,case}cmp 2010-10-03 22:10:30 -04:00
Jakub Jelinek f32f28695d Fix a couple of __REDIRECT () __THROW occurrences
This patch fixes some cases which fail to parse with C++.
2010-06-14 08:18:26 -07:00
Ulrich Drepper 9ac9129d49 Unify wint_t handling in wchar.h and wctype.h.
Fix a few typos in the process.
2010-03-24 06:59:02 -07:00
Ulrich Drepper f095bb7204 Add support for XPG7 testing.
The header conformance testing code needed extending for XPG7.  This
exposed a few bugs in the headers.  There are more changes to come.
2010-01-09 10:56:41 -08:00
Andreas Schwab ff6ff38db2 Remove redundant .gitignore files. 2009-05-16 10:18:34 +02:00
Jim Meyering 2e180a2622 rename each .cvsignore file to .gitignore 2009-05-15 18:13:37 +02:00
Ulrich Drepper 481f9ecae0 * wcsmbs/wcsatcliff.c (MEMCHR): Define. 2009-04-07 14:56:48 +00:00
Ulrich Drepper 6cbe890a9d * wctype/wctype.h: The *_l functions are in POSIX 2008.
* wcsmbs/wchar.h: mbsnrtowcs, open_wmemstream, wcpcpy, wcpncpy,
	wcscasecmp, wcsdup, wcsncasecmp, wcsnlen, wcsnrtombs,
	wcscasecmp_l, wcsncasecmp_l, wcscoll_l, and wcsxfrm_l.
	* sysdeps/mach/hurd/bits/posix_opt.h: Reset value of macros from
	200112L to 200809L.
	* sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
	* posix/getconf.c (vars): Add _SC_THREAD_ROBUST_PRIO_INHERIT and
	_SC_THREAD_ROBUST_PRIO_PROTECT entries.
	* bits/confname.h: Add _SC_THREAD_ROBUST_PRIO_INHERIT and
	_SC_THREAD_ROBUST_PRIO_PROTECT.
	* posix/unistd.h: fexecve is in POSIX 2008.
	* time/time.h: strftime_l is in POSIX 2008.
	* io/sys/stat.h: futimens is in POSIX 2008.
	* string/strings.h: strcasecmp_l and strncasecmp_l are in POSIX 2008.
	* string/string.h: stpcpy, stpncpy, strndup, strnlen, strsignal,
	strcoll_l, strerror_l, and strxfrm_l are in POSIX 2008.
	* stdlib/stdlib.h: mkdtemp is in POSIX 2008.
2009-02-26 16:53:30 +00:00
Ulrich Drepper d8387c7b7b Jakub Jelinek <jakub@redhat.com>
* string.h: Define correct C++ prototypes for gcc 4.4.
	* wchar.h: Likewise.

2009-01-29  Ulrich Drepper  <drepper@redhat.com>
2009-01-29 18:36:39 +00:00
Ulrich Drepper 720981169b * wcsmbs/wcsnrtombs.c (__wcsnrtombs): Create temporary state object
if no output is written.
2009-01-02 19:28:55 +00:00
Ulrich Drepper 0f2ae55cf7 [BZ #9694]
* wcsmbs/wchar.h: Move undefs for local __need_* constants to the
	very end.
2008-12-29 23:01:38 +00:00
Ulrich Drepper bf93cd3b8d [BZ #9677]
2008-12-21  Bruno Haible  <bruno@clisp.org>
	[BZ #9677]
	* wcsmbs/mbsnrtowcs.c (__mbsnrtowcs): Create temporary state object
	if no output is written.
2008-12-26 19:02:29 +00:00
Ulrich Drepper 91e32540c4 [BZ #5443]
2008-04-11  Jakub Jelinek  <jakub@redhat.com>
	[BZ #5443]
	* time/era.c: Transform __libc_setlocale_lock into rwlock.
	* time/alt_digit.c: Likewise.
	* wcsmbs/wcsmbsload.c: Likewise.
2008-04-11 08:20:04 +00:00
Ulrich Drepper b4354cf420 [BZ #5424, BZ #5428, BZ #5451]
2007-12-08  Ulrich Drepper  <drepper@redhat.com>
	[BZ #5424]
	* stdio-common/vfprintf.c: Do not overflow when adding to done.
	* stdio-common/Makefile (tests): Add bug22.
	* stdio-common/bug22.c: New file.

	[BZ #5451]
	* time/getdate.c: Fix filling in default values.
	* time/bug-getdate1.c: New file.
	* time/Makefile: Add rules to build and run bug-getdate1.

	* iconvdata/ebcdic-is-friss.c: Use 8bit-gap instead of 8bit-generic.
	* iconvdata/ebcdic-es.c: Likewise.
	* iconvdata/ebcdic-es-a.c: Likewise.
	* iconvdata/ebcdic-uk.c: Likewise.
	* iconvdata/iso8859-16.c: Likewise.
	* iconvdata/viscii.c: Likewise.
	* iconvdata/iso8859-9e.c: Likewise.
	* iconvdata/Makefile: Adjust appropriately.

	[BZ #5428]
	* wcsmbs/wchar.h: Unconditionally undefine __need_mbstate and
	__need_wint_t.

	* iconvdata/gconv-modules: Likewise.
2007-12-10 01:43:40 +00:00
Ulrich Drepper a912a4f843 Define __need_FILE also for __USE_XOPEN2K.
* wcsmbs/wchar.h: Define __need_file also for __USE_XOPEN2K.
2007-11-26 22:50:59 +00:00
Ulrich Drepper bb27a6ebf7 [BZ #2633]
* wcsmbs/wchar.h: Move many C99 functions into std namespace.
2007-10-07 20:30:24 +00:00
Ulrich Drepper ac97dec17a * misc/sys/cdefs.h (__REDIRECT_LDBL, __REDIRECT_NTH_LDBL): New macros.
* wcsmbs/bits/wchar2.h (__swprintf_alias, __vswprintf_alias): Use
	__REDIRECT_NTH_LDBL macro rather than __REDIRECT_NTH.
2007-10-03 18:27:30 +00:00
Ulrich Drepper d6cd6bf4de * misc/sys/cdefs.h (__warndecl, __errordecl): For GCC 4.3+ define
with __warning__/__error__ attributes.
	(__warnattr): Define.
	* stdlib/bits/stdlib.h (__realpath_chk_warn, __ptsname_r_chk_warn,
	__mbstowcs_chk_warn, __wcstombs_chk_warn): New aliases with
	__warnattr.
	(realpath, ptsname_r, mbstowcs, wcstombs): Call __*_chk_warn instead
	of __*_chk if compile time detectable overflow is found.
	* libio/bits/stdio2.h (__fgets_chk_warn, __fread_chk_warn,
	__fgets_unlocked_chk_warn, __fread_unlocked_chk_warn): New aliases
	with __warnattr.
	(fgets, fread, fgets_unlocked, fread_unlocked): Call __*_chk_warn
	instead of __*_chk if compile time detectable overflow is found.
	(__gets_alias): Rename to...
	(__gets_warn): ... this.  Add __warnattr.
	(gets): Call __gets_warn instead of __gets_alias.
	* socket/bits/socket2.h (__recv_chk_warn, __recvfrom_chk_warn): New
	aliases with __warnattr.
	(recv, recvfrom): Call __*_chk_warn instead of __*_chk if compile
	time detectable overflow is found.
	* posix/bits/unistd.h (__read_chk_warn, __pread_chk_warn,
	__pread64_chk_warn, __readlink_chk_warn, __readlinkat_chk_warn,
	__getcwd_chk_warn, __confstr_chk_warn, __getgroups_chk_warn,
	__ttyname_r_chk_warn, __getlogin_r_chk_warn, __gethostname_chk_warn,
	__getdomainname_chk_warn): New aliases with __warnattr.
	(read, pread, pread64, readlink, readlinkat, getcwd, confstr,
	getgroups, ttyname_r, getlogin_r, gethostname, getdomainname): Call
	__*_chk_warn instead of __*_chk if compile time detectable overflow
	is found.
	(__getgroups_chk): Rename argument to __listlen from listlen.
	(__getwd_alias): Rename to...
	(__getwd_warn): ... this.  Add __warnattr.
	(getwd): Call __getwd_warn instead of __getwd_alias.
	* wcsmbs/bits/wchar2.h (__wmemcpy_chk_warn, __wmemmove_chk_warn,
	__wmempcpy_chk_warn, __wmemset_chk_warn, __wcsncpy_chk_warn,
	__wcpncpy_chk_warn, __fgetws_chk_warn, __fgetws_unlocked_chk_warn,
	__mbsrtowcs_chk_warn, __wcsrtombs_chk_warn, __mbsnrtowcs_chk_warn,
	__wcsnrtombs_chk_warn): New aliases with __warnattr.
	(wmemcpy, wmemmove, wmempcpy, wmemset, mbsrtowcs, wcsrtombs,
	mbsnrtowcs, wcsnrtombs): Call __*_chk_warn instead of __*_chk if
	compile time detectable overflow is found.
	(wcsncpy, wcpncpy): Likewise.  For constant __n fix check whether
	to use __*_chk or not.
	(fgetws, fgetws_unlocked): Divide __bos by sizeof (wchar_t), both
	in comparisons which function should be called and in __*_chk*
	arguments.  Call __*_chk_warn instead of __*_chk if compile time
	detectable overflow is found.
	(swprintf, vswprintf): Divide __bos by sizeof (wchar_t) in
	__*_chk argument.
	* debug/tst-chk1.c (do_test): Add a few more tests.
2007-09-26 20:45:18 +00:00
Ulrich Drepper 9cc198f65b [BZ #4963]
* wcsmbs/wcsnlen.c: Don't reference before checking the length.
	* string/stratcliff.c: Make usable to test wide char functions.
	* wcsmbs/wcsatcliff.c: New file.
	* wcsmbs/Makefiel (tests): Add wcsatcliff.
2007-09-23 18:27:55 +00:00
Ulrich Drepper 874aa52349 * include/stdio.h (__isoc99_fscanf, __isoc99_scanf,
__isoc99_sscanf, __isoc99_vscanf): New prototypes.
	(__isoc99_vsscanf, __isoc99_vfscanf): New prototypes, add
	libc_hidden_proto.
	* include/wchar.h (__isoc99_fwscanf, __isoc99_wscanf,
	__isoc99_swscanf, __isoc99_vwscanf): New prototypes.
	(__isoc99_vswscanf, __isoc99_vfwscanf): New prototypes,
	add libc_hidden_proto.
	* libio/stdio.h (fscanf, scanf, sscanf, vfscanf, vscanf,
	vsscanf): Redirect to __isoc99_* if strict ISO C99 or POSIX
	conformance requested.
	* wcsmbs/wchar.h (fwscanf, wscanf, swscanf, vfwscanf, vwscanf,
	vswscanf): Redirect to __isoc99_* if strict ISO C99 or POSIX
	conformance requested.
	* libio/bits/stdio-ldbl.h (fscanf, scanf, sscanf, vfscanf, vscanf,
	vsscanf): Redirect to __nldbl___isoc99_* if strict ISO C99 or POSIX
	conformance requested.
	* wcsmbs/bits/wchar-ldbl.h (fwscanf, wscanf, swscanf, vfwscanf,
	vwscanf, vswscanf): Redirect to __nldbl___isoc99_* if strict
	ISO C99 or POSIX conformance requested.
	* stdio-common/Versions (libc): Export __isoc99_scanf@@GLIBC_2.7,
	__isoc99_vscanf@@GLIBC_2.7, __isoc99_fscanf@@GLIBC_2.7,
	__isoc99_vfscanf@@GLIBC_2.7, __isoc99_sscanf@@GLIBC_2.7
	and __isoc99_vsscanf@@GLIBC_2.7.
	* stdio-common/Makefile (routines): Add isoc99_scanf, isoc99_vscanf,
	isoc99_fscanf, isoc99_vfscanf, isoc99_sscanf and isoc99_vsscanf.
	(tests): Add scanf14.
	(CFLAGS-vfprintf.c, CFLAGS-fprintf.c, CFLAGS-printf.c,
	CFLAGS-vfwprintf.c, CFLAGS-vfscanf.c, CFLAGS-vfwscanf.c,
	CFLAGS-fscanf.c, CFLAGS-scanf.c, CFLAGS-isoc99_vfscanf.c,
	CFLAGS-isoc99_vscanf.c, CFLAGS-isoc99_fscanf.c,
	CFLAGS-isoc99_scanf.c): Add $(exceptions).
	(CFLAGS-scanf15.c): Add various -I paths to prevent the compiler
	from using internal headers.
	* wcsmbs/Versions (libc): Export __isoc99_wscanf@@GLIBC_2.7,
	__isoc99_vwscanf@@GLIBC_2.7, __isoc99_fwscanf@@GLIBC_2.7,
	__isoc99_vfwscanf@@GLIBC_2.7, __isoc99_swscanf@@GLIBC_2.7
	and __isoc99_vswscanf@@GLIBC_2.7.
	* wcsmbs/Makefile (routines): Add isoc99_wscanf, isoc99_vwscanf,
	isoc99_fwscanf, isoc99_vfwscanf, isoc99_swscanf and isoc99_vswscanf.
	(CFLAGS-isoc99_wscanf.c, CFLAGS-isoc99_fwscanf.c,
	CFLAGS-isoc99_vwscanf.c, CFLAGS-isoc99_vfwscanf.c): Add $(exceptions).
	(CPPFLAGS): Add -D_IO_MTSAFE_IO if needed.
	* stdio-common/isoc99_scanf.c: New file.
	* stdio-common/isoc99_vsscanf.c: New file.
	* stdio-common/isoc99_vscanf.c: New file.
	* stdio-common/isoc99_vfscanf.c: New file.
	* stdio-common/isoc99_fscanf.c: New file.
	* stdio-common/isoc99_sscanf.c: New file.
	* wcsmbs/isoc99_fwscanf.c: New file.
	* wcsmbs/isoc99_vswscanf.c: New file.
	* wcsmbs/isoc99_swscanf.c: New file.
	* wcsmbs/isoc99_wscanf.c: New file.
	* wcsmbs/isoc99_vwscanf.c: New file.
	* wcsmbs/isoc99_vfwscanf.c: New file.
	* libio/libio.h (_IO_FLAGS2_SCANF_STD): Define.
	* libio/libioP.h (_IO_acquire_lock_clear_flags2_fct): Also
	clear _IO_FLAGS2_SCANF_STD bit from _flags2.
	* stdio-common/vfscanf.c (_IO_vfscanf_internal): Don't
	handle %as, %aS and %a[ if _IO_FLAGS2_SCANF_STD is set in _flags2.
	* stdio-common/scanf14.c: New test.
	* stdio-common/scanf15.c: New test.
	* sysdeps/ieee754/ldbl-opt/Makefile (libnldbl-calls): Add
	isoc99_scanf, isoc99_fscanf, isoc99_sscanf,
	isoc99_vscanf, isoc99_vfscanf, isoc99_vsscanf,
	isoc99_wscanf, isoc99_fwscanf, isoc99_swscanf,
	isoc99_vwscanf, isoc99_vfwscanf and isoc99_vswscanf.
	* sysdeps/ieee754/ldbl-opt/Versions (libc): Export
	__nldbl___isoc99_scanf@@GLIBC_2.7,
	__nldbl___isoc99_fscanf@@GLIBC_2.7,
	__nldbl___isoc99_sscanf@@GLIBC_2.7,
	__nldbl___isoc99_vscanf@@GLIBC_2.7,
	__nldbl___isoc99_vfscanf@@GLIBC_2.7,
	__nldbl___isoc99_vsscanf@@GLIBC_2.7,
	__nldbl___isoc99_wscanf@@GLIBC_2.7,
	__nldbl___isoc99_fwscanf@@GLIBC_2.7,
	__nldbl___isoc99_swscanf@@GLIBC_2.7,
	__nldbl___isoc99_vwscanf@@GLIBC_2.7,
	__nldbl___isoc99_vfwscanf@@GLIBC_2.7
	and __nldbl___isoc99_vswscanf@@GLIBC_2.7.
	* sysdeps/ieee754/ldbl-opt/nldbl-compat.h (__isoc99_scanf,
	__isoc99_fscanf, __isoc99_sscanf, __isoc99_vscanf,
	__isoc99_vfscanf, __isoc99_vsscanf, __isoc99_wscanf,
	__isoc99_fwscanf, __isoc99_swscanf, __isoc99_vwscanf,
	__isoc99_vfwscanf, __isoc99_vswscanf): Add NLDBL_DECL.
	* sysdeps/ieee754/ldbl-opt/nldbl-compat.c
	(__nldbl___isoc99_scanf, __nldbl___isoc99_fscanf,
	__nldbl___isoc99_sscanf, __nldbl___isoc99_vscanf,
	__nldbl___isoc99_vfscanf, __nldbl___isoc99_vsscanf,
	__nldbl___isoc99_wscanf, __nldbl___isoc99_fwscanf,
	__nldbl___isoc99_swscanf, __nldbl___isoc99_vwscanf,
	__nldbl___isoc99_vfwscanf, __nldbl___isoc99_vswscanf): New
	functions.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_swscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vwscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_wscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_scanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_sscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vsscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fwscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfwscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vswscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fscanf.c: New file.

	* stdio-common/Makefile (tests): Add scanf13.
	(scanf13-ENV): New.
	* stdio-common/vfscanf.c (_IO_vfscanf_internal): Handle
	m modifier followed by l.
	(STRING_ARG): Add width argument.
	(_IO_vfscanf_internal) <case L_('c')>: Handle %mc.
	<case L_('C')>: Handle %mlc and %mC.
	<case L_('s'), case L_('S'), case L_('[')>: Adjust STRING_ARG
	arguments.
	* stdio-common/scanf13.c: New test.

	* libio/libioP.h (_IO_acquire_lock_clear_flags2_fct): Clear
	the _IO_FLAGS2_FORTIFY bit from _flags2 rather than _flags.

	type and __THROW marker of splice, vmsplice, and tee.
2007-09-18 19:04:01 +00:00
Ulrich Drepper de1c3ebb59 * misc/sys/cdefs.h (__va_arg_pack): Define for GCC 4.3+.
* misc/bits/syslog.h (syslog): When __va_arg_pack is defined,
	implement as __extern_always_inline function.
	(vsyslog): Define as __extern_always_inline function unconditionally.
	* libio/bits/stdio2.h (sprintf, snprintf, printf, fprintf):
	When __va_arg_pack is defined, implement as __extern_always_inline
	functions.
	(vsprintf, vsnprintf, vprintf, vfprintf): Define as
	__extern_always_inline functions unconditionally.
	* libio/bits/stdio.h (vprintf): Ifdef out the inline when
	bits/stdio2.h will be included.
	* wcsmbs/bits/wchar2.h (__swprintf_alias): New redirect.
	(swprintf, wprintf, fwprintf): When __va_arg_pack is defined,
	implement as __extern_always_inline functions.
	(vswprintf, vwprintf, vfwprintf): Define as
	__extern_always_inline functions unconditionally.
	* debug/tst-chk1.c (do_test): Enable remaining tests for C++.

2007-09-03  Jakub Jelinek  <jakub@redhat.com>

	* misc/sys/cdefs.h (__extern_inline, __extern_always_inline): Only
	define in C++ for GCC 4.3+, in C++ always use __gnu_inline__
	attribute.
	* include/features.h (__USE_EXTERN_INLINES): Define only when
	__extern_inline is defined.
	* stdlib/stdlib.h: Include bits/stdlib.h when __extern_always_inline
	is defined instead of when not __cplusplus.
	* misc/sys/syslog.h: Include bits/syslog.h when __extern_always_inline
	is defined instead of when not __cplusplus.
	* socket/sys/socket.h: Include bits/socket2.h when
	__extern_always_inline is defined instead of when not __cplusplus.
	* libio/stdio.h: Include bits/stdio2.h when __extern_always_inline
	is defined instead of when not __cplusplus.
	* posix/unistd.h: Include bits/unistd.h when __extern_always_inline
	is defined instead of when not __cplusplus.
	* string/string.h: Include bits/string3.h when __extern_always_inline
	is defined instead of when not __cplusplus.
	* wcsmbs/wchar.h: Include bits/wchar2.h when __extern_always_inline
	is defined instead of when not __cplusplus.
	(btowc, wctob): Don't guard the inlines with ifndef __cplusplus.
	* io/fcntl.h: Don't include bits/fcntl2.h if __extern_always_inline
	is not defined.
	* misc/bits/syslog-ldbl.h: Guard *_chk stuff with
	defined __extern_always_inline instead of !defined __cplusplus.
	* libio/bits/stdio-ldbl.h: Likewise.
	* wcsmbs/bits/wchar-ldbl.h: Likewise.
	* misc/bits/syslog.h (syslog): Don't define for C++.
	(vsyslog): Use __extern_always_inline function for C++ instead of
	a macro.
	* libio/bits/stdio.h (__STDIO_INLINE): Define to __extern_inline
	whenever that macro is defined.
	(vprintf): Don't provide the inline for C++.
	(fread_unlocked, fwrite_unlocked): Don't define the macros for C++.
	* libio/bits/stdio2.h (sprintf, snprintf, printf, fprintf): Don't
	define the macros for C++.
	(vsprintf, vsnprintf, vprintf, vfprintf): Define as
	__extern_always_inline functions for C++.
	* io/sys/stat.h (stat, lstat, fstat, fstatat, mknod, mknodat,
	stat64, lstat64, fstat64, fstatat64): Don't define if not
	__USE_EXTERN_INLINES.
	* wcsmbs/bits/wchar2.h: Fix #error message.
	(swprintf, wprintf, fwprintf): Don't define the macros for C++.
	(vswprintf, vwprintf, vfwprintf): Define using
	__extern_always_inline functions for C++.
	* string/bits/string3.h: Don't #undef macros if __cplusplus.
	(memcpy, memmove, mempcpy, memset, bcopy, bzero, strcpy, stpcpy,
	strncpy, strcat, strncat): Define as __extern_always_inline
	functions instead of macros for C++.
	* math/bits/cmathcalls.h: Guard __extern_inline routines with
	defined __extern_inline.
	* sysdeps/alpha/fpu/bits/mathinline.h (__MATH_INLINE): Define
	to __extern_inline whenever that macro is defined.
	* sysdeps/ia64/fpu/bits/mathinline.h (__MATH_INLINE): Likewise.
	* sysdeps/i386/fpu/bits/mathinline.h (__MATH_INLINE): Likewise.
	* sysdeps/i386/i486/bits/string.h (__STRING_INLINE): Likewise.
	* sysdeps/s390/bits/string.h (__STRING_INLINE): Likewise.
	* sysdeps/s390/fpu/bits/mathinline.h (__MATH_INLINE): Likewise.
	* sysdeps/powerpc/fpu/bits/mathinline.h (__MATH_INLINE): Likewise.
	* sysdeps/x86_64/fpu/bits/mathinline.h (__MATH_INLINE): Likewise.
	* sysdeps/sparc/fpu/bits/mathinline.h (__MATH_INLINE): Likewise.
	* sysdeps/unix/sysv/linux/sys/sysmacros.h (gnu_dev_major,
	gnu_dev_minor, gnu_dev_makedev): Remove __extern_inline from
	prototypes.  Only provide __extern_inline routines if
	__USE_EXTERN_INLINES.
	* debug/Makefile: Add rules to build and run tst-{,lfs}chk{4,5,6}
	tests.
	* debug/tst-chk1.c (do_prepare, do_test): Allow compilation as C++.
	For now avoid some *printf tests in C++.  Skip all testing
	if __USE_FORTIFY_LEVEL is defined, but __extern_always_inline macro
	is not.
	* debug/tst-chk4.cc: New file.
	* debug/tst-chk5.cc: New file.
	* debug/tst-chk6.cc: New file.
	* debug/tst-lfschk4.cc: New file.
	* debug/tst-lfschk5.cc: New file.
	* debug/tst-lfschk6.cc: New file.
	* include/wchar.h (__vfwprintf_chk, __vswprintf_chk): Avoid
	prototypes in C++.
	* include/stdio.h (__sprintf_chk, __snprintf_chk, __vsprintf_chk,
	__vsnprintf_chk, __printf_chk, __fprintf_chk, __vprintf_chk,
	__vfprintf_chk, __fgets_unlocked_chk, __fgets_chk): Likewise.
2007-09-15 02:38:04 +00:00
Jakub Jelinek 18915760ad * stdlib/bits/stdlib-ldbl.h (__strtold_internal): Remove.
* wcsmbs/bits/wchar-ldbl.h (__wcstold_internal): Remove.
	* stdlib/bits/stdlib-ldbl.h (__strtold_internal): Remove.
	* wcsmbs/bits/wchar-ldbl.h (__wcstold_internal): Remove.
2007-08-16 19:33:54 +00:00
Ulrich Drepper 9b2e9577b2 * sysdeps/unix/dirstream.h (struct __dirstream): Move lock member
to fill a hole on 64-bit platforms.

	* stdlib/stdlib.h: Remove __strto*_internal prototypes and strto*
	inline functions.
	* include/stdlib.h: Add __strto*_internal prototypes here.
	* wcsmbs/wchar.h: Remove __wcsto*_internal prototypes and wcsto*
	inline functions.
	* include/wchar.h: Add __wcsto*_internal prototypes.
	* sysdeps/generic/inttypes.h: No need to protect the declaration
	of the __strto*_internal and __wcsto*_internal members here.
2007-08-03 02:43:06 +00:00
Ulrich Drepper 7b503bcc13 * iconv/gconv_int.h (__GCONV_NULCONV): New internal only error code.
* iconv/gconv_cache.c (__gconv_lookup_cache): Return __GCONV_NULCONV
	if from and to charsets are the same.
	* iconv/gconv_db.c (__gconv_find_transform): Likewise.
	* intl/dcigettext.c (_nl_find_msg): Return NULL even if __gconv_open
	returns __GCONV_NOCONV, but not for __GCONV_NULCONV.

2007-07-17  Jakub Jelinek  <jakub@redhat.com>

	* wcsmbs/wchar.h: Only define wint_t if __need_wint_t.
	Don't define wint_t when __need_mbstate_t unless it
	is necessary.
	(__mbstate_t): Use __WINT_TYPE__ rather than wint_t
	in the typedef if possible.
	* wctype/wctype.h (wint_t): Define by including
	wchar.h with __need_wint_t instead of including stddef.h
	with __need_wint_t and as fallback definining it ourselves.
	* iconv/gconv.h (__need_wint_t): Define before including
	wchar.h.
	* sysdeps/gnu/_G_config.h: Don't include gconv.h if not _LIBC
	or _GLIBCPP_USE_WCHAR_T.
	(__need_wchar_t): Don't define
	if not _LIBC or _GLIBCPP_USE_WCHAR_T.
	(__need_wint_t): Don't define before including stddef.h,
	define before including wchar.h only if _LIBC or
	_GLIBCPP_USE_WCHAR_T.
	(_G_iconv_t): Don't define if not _LIBC or _GLIBCPP_USE_WCHAR_T.
	* sysdeps/mach/hurd/_G_config.h: Likewise.
	* sysdeps/generic/_G_config.h: Likewise.
	* libio/libio.h (__wunderflow, __wuflow, __woverflow): Only
	prototype if _LIBC or _GLIBCPP_USE_WCHAR_T.
	(_IO_getwc_unlocked, _IO_putwc_unlocked): Only define
	if _LIBC or _GLIBCPP_USE_WCHAR_T.
2007-07-28 19:02:07 +00:00
Ulrich Drepper 087722b854 * include/features.h (__USE_ISOC95): New define.
* wcsmbs/wchar.h (fwprintf, fwscanf, wprintf, wscanf, swprintf,
	swscanf, vfwprintf, vwprintf, vswprintf, fwide): Define even
	for -std=iso9899:199409.
	* CONFORMANCE: Remove comments about unsupported AMD1.
2007-07-19 17:28:06 +00:00
Ulrich Drepper b037a293a4 * configure.in (libc_cv_gnu89_inline): Test for -fgnu89-inline.
* config.make.in (gnu89-inline-CFLAGS): New variable.
	* Makeconfig (CFLAGS): Use $(gnu89-inline-CFLAGS) together with
	-std=gnu99.
	* misc/sys/cdefs.h (__extern_inline, __extern_always_inline): Define.
	* argp/argp.h: Use it.
	* bits/mathinline.h: Likewise.
	* bits/sigset.h: Likewise.
	* bits/string.h: Likewise.
	* ctype/ctype.h: Likewise.
	* hurd/hurd.h: Likewise.
	* hurd/hurd/fd.h: Likewise.
	* hurd/hurd/port.h: Likewise.
	* hurd/hurd/signal.h: Likewise.
	* hurd/hurd/threadvar.h: Likewise.
	* hurd/hurd/userlink.h: Likewise.
	* io/sys/stat.h: Likewise.
	* libio/bits/stdio.h: Likewise.
	* libio/bits/stdio2.h: Likewise.
	* mach/lock-intern.h: Likewise.
	* mach/mach/mig_support.h: Likewise.
	* math/bits/cmathcalls.h: Likewise.
	* posix/bits/unistd.h: Likewise.
	* socket/bits/socket2.h: Likewise.
	* stdlib/bits/stdlib.h: Likewise.
	* stdlib/stdlib.h: Likewise.
	* string/argz.h: Likewise.
	* string/bits/string2.h: Likewise.
	* string/bits/string3.h: Likewise.
	* sysdeps/alpha/fpu/bits/mathinline.h: Likewise.
	* sysdeps/generic/inttypes.h: Likewise.
	* sysdeps/generic/machine-lock.h: Likewise.
	* sysdeps/generic/machine-sp.h: Likewise.
	* sysdeps/i386/fpu/bits/mathinline.h: Likewise.
	* sysdeps/i386/i486/bits/string.h: Likewise.
	* sysdeps/ia64/fpu/bits/mathinline.h: Likewise.
	* sysdeps/mach/alpha/machine-lock.h: Likewise.
	* sysdeps/mach/alpha/machine-sp.h: Likewise.
	* sysdeps/mach/i386/machine-lock.h: Likewise.
	* sysdeps/mach/powerpc/machine-lock.h: Likewise.
	* sysdeps/mach/powerpc/machine-sp.h: Likewise.
	* sysdeps/powerpc/fpu/bits/mathinline.h: Likewise.
	* sysdeps/s390/bits/string.h: Likewise.
	* sysdeps/s390/fpu/bits/mathinline.h: Likewise.
	* sysdeps/sparc/fpu/bits/mathinline.h: Likewise.
	* sysdeps/unix/bsd/bsd4.4/bits/socket.h: Likewise.
	* sysdeps/unix/sysv/linux/bits/sigset.h: Likewise.
	* sysdeps/unix/sysv/linux/bits/socket.h: Likewise.
	* sysdeps/unix/sysv/linux/sys/sysmacros.h: Likewise.
	* sysdeps/x86_64/fpu/bits/mathinline.h: Likewise.
	* wcsmbs/bits/wchar2.h: Likewise.
	* wcsmbs/wchar.h: Likewise.
	* stdlib/gmp.h: Likewise.  Include <features.h> to get
	__extern_inline definition.

	* locale/programs/ld-ctype.c (find_translit): Return NULL if ctype is
	NULL.
2007-03-17 17:04:28 +00:00
Ulrich Drepper 2e0e802af0 [BZ #2648]
* locales/pl_PL: Fix currency_symbol and its placement.
2007-02-17 18:58:25 +00:00
Ulrich Drepper 9e6e344e69 * wcsmbs/wchar.h (wcstoll): Fix comment, function returns value of
type `long long int', not `long int'.
	(wcstoq): Likewise.
2007-01-19 22:59:32 +00:00
Ulrich Drepper 1c31aa7979 * libio/stdio.h: Move open_wmemstream prototype to ...
* wcsmbs/wchar.h: ... here.
2006-09-27 15:57:56 +00:00