Commit Graph

8 Commits

Author SHA1 Message Date
Ulrich Drepper f9a906e786 * stdlib/bits/stdlib.h (mbstowcs): Divide __bos (__dst) by
sizeof (wchar_t) rather than multiplying __len by sizeof (wchar_t).
	Pass __bos (__dst) / sizeof (wchar_t) to the *_chk routine.
	* wcsmbs/bits/wchar2.h (mbsrtowcs, mbsnrtowcs): Likewise.
	* debug/mbsnrtowcs_chk.c (__mbsnrtowcs_chk): Don't multiply
	len by sizeof (wchar_t).
	* debug/mbsrtowcs_chk.c (__mbsrtowcs_chk): Likewise.
	* debug/mbstowcs_chk.c (__mbstowcs_chk): Likewise.
	Fix type of SRC argument.  Pass &SRC rather than SRC to
	__mbsrtowcs.
	* debug/wcstombs_chk.c (__wcstombs_chk): Pass &SRC rather than SRC
	to __wcsrtombs.
	* debug/tst-chk1.c: Include assert.h.
	(do_test): Change enough array from VLA into a fixed size array.
	Assert that MB_CUR_MAX is <= sizeof (enough).  Use FAIL () macro
	instead of print error details.  Add several new tests.
	Kill some unused variable warnings.
2005-08-22 15:13:39 +00:00
Ulrich Drepper dc4bb1c2be * posix/bits/unistd.h (confstr, getgroups, ttyname_r, gethostname,
getdomainname): Add __NTH.
	* stdlib/bits/stdlib.h (ptsname_r, wctomb, mbstowcs, wcstombs):
	Likewise.
	(realpath): Likewise.  Use __const instead of const.  Add __restrict
	keywords.
	* socket/bits/socket2.h (recvfrom): Add __restrict keyword to __buf.
	* wcsmbs/bits/wchar2.h (wmemcpy, wmemmove, wmempcpy, wmemset,
	wcscpy, wcpcpy, wcsncpy, wcpncpy, wcscat, wcsncat, vswprintf, wcrtomb,
	mbsrtowcs, wcsrtombs, mbsnrtowcs, wcsnrtombs): Add __NTH.
	* string/bits/string3.h (__memset_ichk): Likewise.
	(__memcpy_ichk, __memmove_ichk, __mempcpy_ichk, __strcpy_ichk,
	__stpcpy_ichk, __strncpy_ichk, stpncpy, __strcat_ichk,
	__strncat_ichk): Likewise.  Use __const instead of const.
	(__stpncpy_chk): Use __const instead of const.
	(__stpncpy_alias): Use __REDIRECT_NTH instead of __REDIRECT.

2005-08-08  Ulrich Drepper  <drepper@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>

	* nscd/mem.c (BLOCK_ALIGN_LOG, BLOCK_ALIGN, BLOCK_ALIGN_M1): Move
	definitions to...
	* nscd/nscd.h (BLOCK_ALIGN_LOG, BLOCK_ALIGN, BLOCK_ALIGN_M1): ...here.
	* nscd/connections.c (usekey): New enum.
	(check_use, verify_persistent_db): New functions.
	(nscd_init): If persistent database is corrupted, unlink it and
	recreate rather than falling back to non-persistent database.
	Call verify_persistent_db.  Avoid overflows in total computation.

2005-08-08  Ulrich Drepper  <drepper@redhat.com>

	* iconvdata/utf-16.c (PREPARE_LOOP): Minor cleanups to make code
	better readable.  Avoid passing var to loop function, it's not
	necessary at all.
2005-08-08 19:04:11 +00:00
Ulrich Drepper 02ca3541ce * debug/mbstowcs_chk.c: New file.
* debug/wcstombs_chk.c: New file.
	* debug/Makefile (routines): Add mbstowcs_chk and wcstombs_chk.
	* debug/Versions: Add __mbstowcs_chk and __wcstombs_chk.
	* stdlib/bits/stdlib.h: Add definitions for mbstowcs and wcstombs.

	* wcsmbs/bits/wchar2.h (mbsrtowcs): Pretty printing.

	* string/test-memset.c (test_main): Use negative byte value in
2005-07-25 21:41:45 +00:00
Ulrich Drepper 0396de518e Fix typo. 2005-07-18 20:53:13 +00:00
Ulrich Drepper 5c08f24cb8 * stdlib/bits/stdlib.h: Use __REDIRECT_NTH instead of __REDIRECT
* wcsmbs/bits/wchar2.h: Likewise.
2005-07-16 05:59:07 +00:00
Ulrich Drepper b799f91ddd * stdlib/bits/stdlib.h: New file.
* stdlib/stdlib.h: Include <bits/stdlib.h> if fortification is
	requested.
	* Makefile (headers): Add bits/stdlib.h.
	* include/bits/stdlib.h: New file.
	* debug/Depend: New file.
	* debug/ptsname_r_chk.c: New file.
	* debug/realpath_chk.c: New file.
	* debug/wctomb_chk.c: New file.
	* debug/Makefile (routines): Add ptsname_r_chk, realpath_chk, and
	wctomb_chk.
	* debug/Versions: Export __ptsname_r_chk, __realpath_chk, and
	__wctomb_chk.
	* debug/tst-chk1.c: Add tests for __ptsname_r_chk, __realpath_chk, and
	__wctomb_chk.
2005-07-13 06:09:58 +00:00
Ulrich Drepper a334319f65 (CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4. 2004-12-22 20:10:10 +00:00
Jakub Jelinek 0ecb606cb6 2.5-18.1 2007-07-12 18:26:36 +00:00