Commit Graph

377 Commits

Author SHA1 Message Date
Ulrich Drepper c306d80735 (strfry): Make result more random. 2007-05-08 03:27:35 +00:00
Ulrich Drepper 965cba048c * elf/dl-open.c (dl_open_worker): Declare l in 2 different
smaller scopes.
	* elf/dl-dst.h (DL_DST_REQ_STATIC): Add l as macro argument.
	(DL_DST_REQUIRED): Adjust user.

	* include/dlfcn.h (struct link_map): New forward decl.

	* inet/getnameinfo.c: Include stddef.h.
	(getnameinfo): Use offsetof.

	* time/tst-mktime2.c (do_test): Don't rely on signed wrap.

	* stdio-common/vfprintf.c (_itoa): Undef before redefining.

	* string/strerror_l.c: Include stdlib.h.
2007-03-17 17:09:13 +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 4a44ce79c6 * sysdeps/unix/sysv/linux/i386/sysdep.h (PTR_MANGLE): Roll value before
returning.
	(PTR_DEMANGLE): Real definition now that it's not the same as
	PRT_MANGLE anymore.
	* sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise.

	* string/strerror_l.c: New file.
	* string/Makefile (routines): Add strerror_l.
	* string/string.h: Declare strerror_l.
	* string/Versions: Export strerror_l for GLIBC_2.6.

	* nscd/connections.c (nscd_run): Don't define MAXKEYLEN here.
2007-02-01 16:14:15 +00:00
Ulrich Drepper df859a0c15 * posix/execvp.c: Include alloca.h.
(allocate_scripts_argv): Renamed to...
	(scripts_argv): ... this.  Don't allocate buffer here nor count
	arguments.
	(execvp): Use alloca if possible.
	* posix/Makefile: Add rules to build and run tst-vfork3 test.
	* posix/tst-vfork3.c: New test.

2007-01-03  Ulrich Drepper  <drepper@redhat.com>

	* string/Makefile (tst-strxfrm2-ENV): Define.
	* stdlib/Makefile (tst-strtod3-ENV): Define.
2007-01-03 23:02:17 +00:00
Ulrich Drepper 52a33795d3 * string/strxfrm_l.c (STRXFRM): Fix trailing \1 optimization
if N is one bigger than return value.
	* string/tst-strxfrm2.c (do_test): Also test strxfrm with l1 + 1
	and l1 last arguments, if buf is defined, verify the return value
	equals to strlen (buf) and verify no byte beyond passed length
	is modified.
2006-11-10 15:20:59 +00:00
Ulrich Drepper 2f334ad5c3 * string/Makefile (tests): Add tst-strxfrm2.
* string/tst-strxfrm2.c: New file.

	* string/strxfrm_l.c (STRXFRM): Do the trailing \1 removal
	optimization even if needed > n.
2006-11-09 20:20:23 +00:00
Ulrich Drepper 59776aef0b [BZ #2751]
2006-05-15  Mike Frysinger  <vapier@gentoo.org>
	[BZ #2751]
	* string/strchr.c: Add cast to avoid warning.
2006-08-22 06:47:33 +00:00
Ulrich Drepper 4259230fd1 * intl/dcigettext.c (DCIGETTEXT): If _nl_find_msg returns -1 don't
look further, return original strings.
	(_nl_find_msg): Do not return found translation if the conversion
	failed.  Either signal the string is unusable or that something went
	wrong and the original should be used.

2006-06-21  Ulrich Drepper  <drepper@redhat.com>

	* string/_strerror.c (__strerror_r): Add __builtin_expect.
2006-06-22 23:59:32 +00:00
Ulrich Drepper 9009e8f814 * string/Makefile (tests): Add bug-envz1.
* string/bug-enz1.c: New file.
2006-06-04 16:36:04 +00:00
Ulrich Drepper fdc02996d4 [BZ #2703]
2006-06-02  Ryan S. Arnold  <rsa@us.ibm.com>
	[BZ #2703]
	* string/envz.c (envz_strip): Correct erroneously reversed src
	and dest parameters to memmove() invocation.
2006-06-04 04:35:55 +00:00
Ulrich Drepper 400cc70af5 * io/ftw.c (open_dir_stream): Return right away if REALLOC fails.
[Coverity CID 229, 230]

	* argp/argp-help.c (hol_entry_help): Handle STATE==NULL in ARG and
	DGETTEXT calls.
	(hol_help): Likewise.  [Coverity CID 226, 227]

	* string/argz-replace.c (__argz_replace): Unconditionally call
	free on SRC.  [Coverity CID 225]

	* nis/nis_creategroup.c (nis_creategroup): No need to duplicate
	the return value of __nis_default_owner and __nis_default_group,
	it has been especially allocated.  [Coverity CID 224]
2006-05-10 06:39:15 +00:00
Roland McGrath 359157a5a7 [BZ #2508]
2006-04-04  Roland McGrath  <roland@redhat.com>
	* string/Makefile (CFLAGS-inl-tester.c): New variable.
	(CFLAGS-tst-inlcall.c): Likewise.

	[BZ #2508]
	* nscd/Makefile ($(objpfx)nscd_stat.o: sysincludes): Move setting
	inside [$(have-selinux) = yes].
	($(objpfx)selinux.o: sysincludes): Likewise.

	* iconvdata/Makefile (generate-8bit-table): Use LC_ALL=C.
	(generate-8bit-gap-table): Likewise.
	($(objpfx)iso8859-7jp.stmp): Likewise.
	Reported by S.Çağlar Onur <caglar@uludag.org.tr>.
2006-04-04 08:40:47 +00:00
Roland McGrath 24d58fb41d * string/tester.c (test_strnlen): New function.
(test_strchr): Call it.
	(test_strncat): Test lengths where the sign bit is set.
	(test_strncmp): Likewise.
2006-02-20 21:48:49 +00:00
Ulrich Drepper bc795d0b30 [BZ #2126]
* sysdeps/i386/i686/strtok.S: Store pointer to NUL byte if NULL is
	returned.
	* sysdeps/i386/strtok.S: Likewise.
	* sysdeps/x86_64/strtok.S: Likewise.
	* string/Makefile (tests): Add bug-strtok1.
	* string/bug-strtok1.c: New file.
2006-01-10 00:25:07 +00:00
Roland McGrath 0317eaecb1 * posix/tst-execle1.c (do_test): Add a const.
* posix/tst-execle2.c (do_test): Likewise.

	* posix/transbug.c (run_test): Add some casts.
	* posix/bug-regex22.c (main): Likewise.
	* posix/bug-regex5.c (main): Likewise.
	* wcsmbs/tst-mbsrtowcs.c (main): Likewise.
	* string/test-strspn.c (do_test, do_random_tests): Likewise.
	* string/test-strrchr.c (do_test, do_random_tests): Likewise.
	* string/test-strlen.c (do_random_tests): Likewise.
	* string/test-strpbrk.c (do_test, do_random_tests): Likewise.
	* string/test-strcmp.c (do_random_tests): Likewise.
	* string/test-strchr.c (do_test, do_random_tests): Likewise.
	* string/test-strcat.c (do_test, do_random_tests): Likewise.
	* string/test-strncpy.c (do_random_tests): Likewise.
	* string/test-strcpy.c (do_test, do_random_tests): Likewise.
	* string/test-memccpy.c (do_test): Likewise.
	* string/test-memmove.c (do_test, do_random_tests): Likewise.
	* string/test-memcpy.c (do_test, do_random_tests): Likewise.
	* string/test-memcmp.c (do_test, do_random_tests): Likewise.
	* string/test-memchr.c (do_test, do_random_tests): Likewise.
	* dlfcn/bug-atexit1.c (do_test): Fix up prototype in cast.
	* stdio-common/tst-fgets.c (do_test): Add a cast.
	* iconvdata/bug-iconv4.c (xiconv): Add a cast.

	* locale/programs/simple-hash.c (insert_entry_2): Remove useless casts.

	* resolv/herror.c (herror): Remove unused extern decl.

	* libio/obprintf.c: Include "strfile.h".

	* elf/order2mod2.c (init): Cast ignored value to void.

	* stdio-common/tstdiomisc.c: If FLT_EVAL_METHOD is 2, use long
2005-12-27 22:50:12 +00:00
Ulrich Drepper 9d13fb2413 Moved to csu/errno-loc.c. 2005-12-14 15:06:39 +00:00
Ulrich Drepper b6ab06cef4 2005-12-13 Ulrich Drepper <drepper@redhat.com> 2005-12-14 08:43:25 +00:00
Ulrich Drepper 8f84d93108 [BZ #1877]
2005-11-17  Steven Munroe  <sjmunroe@us.ibm.com>
	[BZ #1877]
	* string/test-strncmp.c (do_test_limit): Handle zero length and
	non-zero align values.
	(test_main): Correct do_test_limit tests for 64-bit.

2005-11-15  Steven Munroe  <sjmunroe@us.ibm.com>

	* sysdeps/powerpc/sysdep.h (PPC_FEATURE_HAS_SPE,
	PPC_FEATURE_HAS_EFP_SINGLE, PPC_FEATURE_HAS_EFP_DOUBLE,
	PPC_FEATURE_NO_TB, PPC_FEATURE_POWER4, PPC_FEATURE_POWER5,
	PPC_FEATURE_POWER5_PLUS, PPC_FEATURE_CELL, PPC_FEATURE_970):
	Define to match 2.6.15 kernel.

	* sysdeps/powerpc/fpu/e_sqrt.c: Remove dl-procinfo.h include.
	* sysdeps/powerpc/fpu/e_sqrtf.c: Likewise.
	* sysdeps/powerpc/fpu/w_sqrtf.c: Likewise.
2005-11-18 00:12:44 +00:00
Ulrich Drepper 8ce9ea74cc [BZ #1877]
2005-11-17  Steven Munroe  <sjmunroe@us.ibm.com>
	[BZ #1877]
	* string/test-strncmp.c (do_test_limit): New function.
	(do_test) Add cast to eliminate compiler warnings.
	(do_random_tests) Add cast to eliminate compiler warnings.
	(test_main) Add do_test_limit tests.
	* sysdeps/powerpc/powerpc32/strncmp.S: Test length before unaligned
	load.
	* sysdeps/powerpc/powerpc64/strncmp.S: Likewise.
2005-11-17 21:19:33 +00:00
Ulrich Drepper 57d44131d8 * configure.in: Remove gnu_ld definition and everything using it.
* config.h.in: Remove HAVE_GNU_LD.
	* csu/Makefile: Remove use of gnu-ld.
	* csu/munch.awk: Removed.
	* csu/munch-tmpl.c: Removed.
	* include/libc-symbols.h: Remove use of HAVE_GNU_LD.
	* posix/execl.c: Likewise.
	* posix/execv.c: Likewise.
	* stdio-common/psignal.c: Likewise.
	* stdlib/exit.c: Likewise.
	* string/strsignal.c: Likewise.
	* string/tester.c: Likewise.
	* sysdeps/generic/errlist.c: Likewise.
	* sysdeps/generic/getenv.c: Likewise.
	* sysdeps/generic/getgroups.c: Likewise.
	* sysdeps/generic/init-posix.c: Likewise.
	* sysdeps/posix/gettimeofday.c: Likewise.
	* sysdeps/posix/system.c: Likewise.
	* sysdeps/unix/bsd/init-posix.c: Likewise.
	* sysdeps/unix/bsd/ulimit.c: Likewise.
	* sysdeps/unix/bsd/sun/m68k/brk.S: Likewise.
	* sysdeps/unix/bsd/sun/m68k/sethostid.S: Likewise.
	* sysdeps/unix/bsd/sun/sparc/sethostid.S: Likewise.
	* sysdeps/unix/i386/brk.S: Likewise.
	* sysdeps/unix/sparc/brk.S: Likewise.
2005-11-06 02:06:06 +00:00
Ulrich Drepper bc3a45cef8 [BZ #968]
* string/strxfrm_l.c (STRXFRM): Fix exit conditions of two loops.
2005-10-15 20:51:49 +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 09987e425c * string/test-memset.c (test_main): Use negative byte value is
test.
2005-07-25 01:40:59 +00:00
Ulrich Drepper c158fc76d9 (do_one_test): Compare effect of call, not only return value.
Add a few cassts to avoid warnings.
2005-07-24 23:06:44 +00:00
Ulrich Drepper c2d526774a Pretty printing. 2005-07-15 14:48:49 +00:00
Ulrich Drepper 8215c9ecf2 * wcsmbs/bits/wchar2.h: New file.
* include/bits/wchar2.h: New file.
	* wcsmbs/wchar.h: Include <bits/wchar2.h> if fortification is
	requested.
	* wcsmbs/wcsncpy.c: Add __wcsncpy alias.
	* string/bits/string3.h: Add fortified stpncpy definitions.
	* sysdeps/generic/stpncpy_chk.c: New file.
	* libio/vswprintf.c: Move _IO_wstrnfile definition to strfile.h.
	Export _IO_wstrn_jumps.
	* libio/strfile.h: Define _IO_wstrnfile and declare _IO_wstrn_jumps.
	* include/wchar.h: Declare __wcsncpy and __vswprintf_chk.
	* debug/fgetws_chk.c: New file.
	* debug/fgetws_u_chk.c: New file.
	* debug/fwprintf_chk.c: New file.
	* debug/swprintf_chk.c: New file.
	* debug/vfwprintf_chk.c: New file.
	* debug/vswprintf_chk.c: New file.
	* debug/vwprintf_chk.c: New file.
	* debug/wcpcpy_chk.c: New file.
	* debug/wcpncpy_chk.c: New file.
	* debug/wcscat_chk.c: New file.
	* debug/wcscpy_chk.c: New file.
	* debug/wcsncat_chk.c: New file.
	* debug/wcsncpy_chk.c: New file.
	* debug/wmemcpy_chk.c: New file.
	* debug/wmemmove_chk.c: New file.
	* debug/wmempcpy_chk.c: New file.
	* debug/wmemset_chk.c: New file.
	* debug/wprintf_chk.c: New file.
	* debug/tst-chk1.c: Add tests for new functions.
	* debug/Versions: Export new functions.
	* debug/Makefile (routines): Add new functions.
2005-07-15 10:32:45 +00:00
Ulrich Drepper 806bc96abb * stdlib/random_r.c (__initstate_r): Don't use non-existing state.
* string/tst-strfry.c: New file.
	* string/Makefile (tests): Add tst-strfry.
2005-04-12 15:29:07 +00:00
Ulrich Drepper 88764ae26a [BZ #779]
2005-03-10  Jakub Jelinek  <jakub@redhat.com>
	* math/test-misc.c (main): Add some more tests.

2005-03-17  Jakub Jelinek  <jakub@redhat.com>

	* posix/regcomp.c (re_compile_fastmap_iter): Fix check for failed
	__wcrtomb.  Check return values of other __wcrtomb calls.
	* posix/regex_internal.c (build_wcs_buffer, re_string_skip_chars):
	Change mbclen type to size_t.
	(build_wcs_upper_buffer): Change mbclen and mbcdlen type to size_t.
	Handle mb chars whose upper case doesn't have multibyte representation
	in locale's charset.

2005-03-15  Jakub Jelinek  <jakub@redhat.com>

	* malloc/malloc.c (_int_icalloc, _int_icomalloc, iALLOc,
	public_iCALLOc, public_iCALLOc, public_iCOMALLOc): Protect with
	#ifndef _LIBC.

	[BZ #779]
	* malloc/malloc.c (public_mTRIm): Initialize malloc if not yet
	initialized.

2005-03-10  Jakub Jelinek  <jakub@redhat.com>

	* misc/sys/cdefs.h (__always_inline): Define.
	* posix/bits/unistd.h (read, pread, pread64, readlink, getcwd, getwd):
	Use __always_inline instead of __inline.
	* socket/bits/socket2.h (recv, recvfrom): Likewise.
	* libio/bits/stdio2.h (gets, fgets, fgets_unlocked): Likewise.
	* string/bits/string3.h (__memcpy_ichk, __memmove_ichk, __mempcpy_ichk,
	__memset_ichk, __strcpy_ichk, __stpcpy_ichk, __strncpy_ichk,
	__strcat_ichk, __strncat_ichk): Use __always_inline instead of
	__inline__ __attribute__ ((__always_inline__)).

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

	* debug/tst-chk1.c: Include sys/socket.h and sys/un.h.
	(do_test): Add new tests for recv, recvfrom, getcwd, getwd and
	readlink.  Add some more tests for read, pread, pread64, fgets and
	fgets_unlocked.

	* posix/bits/unistd.h (read, pread, pread64, readlink,
	getcwd, getwd): Change macros into extern inline functions.
	(__read_alias, __pread_alias, __pread64_alias, __readlink_alias,
	__getcwd_alias, __getwd_alias): New prototypes.
	* socket/bits/socket2.h (recv, recvfrom): Change macros into
	extern inline functions.
	(__recv_alias, __recvfrom_alias): New prototypes.
	* libio/bits/stdio2.h (gets, fgets, fgets_unlocked): Change macros
	into extern inline functions.
	(__gets_alias, __fgets_alias, __fgets_unlocked_alias): New prototypes.

	* debug/pread_chk.c (__pread_chk): Fix order of arguments passed
	to __pread.
	* debug/pread64_chk.c (__pread64_chk): Fix order of arguments passed
	to __pread64.
2005-03-19 00:28:51 +00:00
Roland McGrath 61995d3ed9 * include/libc-symbols.h (__hidden_proto): Remove bogus declaration
of internal.
	(__hidden_def1, __hidden_dot_def1): Remove.
	(__hidden_def2, __hidden_def3): Remove.
	(__hidden_ver1): New.
	(hidden_ver, hidden_def, hidden_weak): Use it.
	(hidden_data_ver, hidden_data_ver, hidden_data_weak): Use non-data
	version of the macro.

	* include/wchar.h (__wcscoll): Remove.
	* wcsmbs/wcscoll.c: Define wcscoll directly instead of via __wcscoll.
	* string/strcoll.c: Don't issue libc_hidden_def STRCOLL redefined.
2005-03-17 21:06:39 +00:00
Ulrich Drepper 61062f5630 * posix/bits/unistd.h: Avoid calling __*_chk variants if we can
determine the call will never trigger a failure.

	* sysdeps/i386/i686/memset_chk.S: Remove alias and warning.
	* sysdeps/x86_64/memset_chk.S: Likewise.

2005-02-24  Roland McGrath  <roland@redhat.com>

	* debug/Versions (libc: GLIBC_2.4): Remove
	__memset_zero_constant_len_parameter.
	* sysdeps/generic/memset_chk.c: Remove alias and warning.
	* misc/sys/cdefs.h (__warndecl): New macro.
	* debug/warning-nop.c: New file.
	* string/bits/string3.h (memset): Call __warn_memset_zero_len with no
	arguments, instead of calling __memset_zero_constant_len_parameter.
	Use __warndecl for __warn_memset_zero_len.
	* debug/Makefile (routines): Add $(static-only-routines).
	(static-only-routines): New variable.
2005-03-01 00:35:23 +00:00
Ulrich Drepper 553cc5f9ad * sysdeps/unix/sysv/linux/libc_fatal.c: Print backtrace and memory
map if requested.
	* debug/chk_fail.c: Request backtrace and memory map dump.

	* Versions.def: Add GLIBC_2.4 for libc.
	* debug/fgets_chk.c: New file.
	* debug/fgets_u_chk.c: New file.
	* debug/getcwd_chk.c: New file.
	* debug/getwd_chk.c: New file.
	* debug/readlink_chk.c: New file.
	* debug/read_chk.c: New file.
	* debug/pread_chk.c: New file.
	* debug/pread64_chk.c: New file.
	* debug/recv_chk.c: New file.
	* debug/recvfrom_chk.c: New file.
	* debug/Versions: Add all new functions with version GLIBC_2.4.
	* debug/Makefile (routines): Add fgets_chk, fgets_u_chk, read_chk,
	pread_chk, pread64_chk, recv_chk, recvfrom_chk, readlink_chk,
	getwd_chk, and getcwd_chk.  Plus appropriate CFLAGS definitions.
	* debug/tst-chk1.c: Add more tests.
	* libio/bits/stdio2.h: Add macros for fgets and fgets_unlocked.
	* include/stdio.h: Declare __fgets_chk and __fgets_unlocked_chk.
	* posix/unistd.h: Include <bits/unistd.h> for fortification.
	* posix/bits/unistd.h: New file.
	* posix/Makefile (headers): Add bits/unistd.h.
	* socket/sys/socket.h: Include <bits/socket2.h> for fortification.
	* socket/bits/socket2.h: New file.
	* socket/Makefile (headers): Add bits/socket2.h.

	* string/bits/string3.h: Extend memset macro to check for zero 3rd
	parameter and use __memset_zero_constant_len_parameter in that case.
	* sysdeps/generic/memset_chk.c: Add
	__memset_zero_constant_len_parameter alias and linker warning.
	* debug/Versions: Add __memset_zero_constant_len_parameter to libc
	with version GLIBC_2.4.

	* sysdeps/generic/bits/types.h: Don't unnecessarily use __extension__
	in __STD_TYPE definition.

2005-02-21  Jakub Jelinek  <jakub@redhat.com>

	* malloc/malloc.c (malloc_printerr): If MALLOC_CHECK_={5,7}, print
	the error message rather than program name.

2005-02-21  Ulrich Drepper  <drepper@redhat.com>
2005-02-21 23:14:10 +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
Ulrich Drepper b5cc329c4f 2004-10-15 Jakub Jelinek <jakub@redhat.com>
* elf/dl-minimal.c (__chk_fail): New.  Add rtld_hidden_def.
	* sysdeps/unix/sysv/linux/readonly-area.c: New file.
	* sysdeps/i386/i686/memmove.S (__memmove_chk): Add checking
	routine.
	* sysdeps/i386/i686/memcpy.S (__memcpy_chk): Likewise.
	* sysdeps/i386/i686/mempcpy.S (__mempcpy_chk): Likewise.
	* sysdeps/i386/i686/memset.S (__memset_chk): Likewise.
	* sysdeps/i386/i686/memmove-chk.S: New file.
	* sysdeps/i386/i686/memcpy-chk.S: Likewise.
	* sysdeps/i386/i686/mempcpy-chk.S: Likewise.
	* sysdeps/i386/i686/memset-chk.S: Likewise.
	* sysdeps/generic/strcat-chk.c (__strcat_chk): Don't __chk_fail
	if exactly fitting into buffer.
	* sysdeps/generic/strncat-chk.c (__strncat_chk): Likewise.
	* sysdeps/generic/readonly-area.c: New file.
	* sysdeps/generic/strncpy-chk.c (__strncpy_chk): Only test
	destlen once.
	* sysdeps/x86_64/memset.S (__memset_chk): Add checking routine.
	* sysdeps/x86_64/memcpy.S (__memcpy_chk): Likewise.
	* sysdeps/x86_64/mempcpy.S (__memcpy_chk): Define to __mempcpy_chk.
	* sysdeps/x86_64/memcpy-chk.S: New file.
	* sysdeps/x86_64/mempcpy-chk.S: Likewise.
	* sysdeps/x86_64/memset-chk.S: Likewise.
	* sysdeps/x86_64/strcpy-chk.S: Likewise.
	* sysdeps/x86_64/stpcpy-chk.S: Likewise.
	* argp/argp-xinl.c (__OPTIMIZE__): Define to 1 instead of nothing.
	* argp/argp-fs-xinl.c (__OPTIMIZE__): Likewise.
	* debug/tst-chk1.c: New test.
	* debug/tst-chk2.c: Likewise.
	* debug/tst-chk3.c: Likewise.
	* debug/test-strcpy_chk.c: Likewise.
	* debug/test-stpcpy_chk.c: Likewise.
	* debug/vsprintf_chk.c (__vsprintf_chk): If flags > 0, request
	_IO_FLAGS2_CHECK_PERCENT_N.  Add libc_hidden_def.
	* debug/Makefile (routines): Add printf_chk, fprintf_chk, vprintf_chk,
	vfprintf_chk, gets_chk and readonly-area.
	(CFLAGS-*_chk.c): Set.
	(tests): Add tst-chk1, tst-chk2, tst-chk3, test-strcpy_chk and
	test-stpcpy_chk.
	* debug/vprintf_chk.c: New file.
	* debug/printf_chk.c: Likewise.
	* debug/vfprintf_chk.c: Likewise.
	* debug/fprintf_chk.c: Likewise.
	* debug/gets_chk.c: Likewise.
	* debug/chk_fail.c (__chk_fail): Add libc_hidden_def.
	* debug/snprintf_chk.c (__snprintf_chk): Fix order of arguments
	passed to __vsnprintf_chk.
	* debug/Versions (libc): Export __printf_chk, __fprintf_chk,
	__vprintf_chk, __vfprintf_chk and __gets_chk @GLIBC_2.3.4.
	* debug/vsnprintf_chk.c (__vsnprintf_chk): Don't call
	__vsnprintf, instead create a temporary file with
	_IO_strn_jumps jumptable.  If flags > 0, request
	_IO_FLAGS2_CHECK_PERCENT_N.  Add libc_hidden_def.
	* libio/Makefile (headers): Add bits/stdio2.h.
	* libio/stdio.h: Include <bits/stdio2.h> if __USE_FORTIFY_LEVEL.
	(sprintf, snprintf, vsprintf, vsnprintf): Remove defines.
	* libio/strfile.h (_IO_strnfile): New type.
	(_IO_strn_jumps): New extern.
	* libio/vsnprintf.c (_IO_strnfile): Remove.
	(_IO_strn_jumps): Remove static.
	* libio/bits/stdio2.h: New file.
	* libio/vswprintf.c (_IO_strnfile): Rename type to...
	(_IO_wstrnfile): ...this.  Adjust all uses.
	* libio/libio.h (_IO_FLAGS2_CHECK_PERCENT_N): Define.
	* stdio-common/vfprintf.c (STR_LEN): Define.
	(vfprintf): Add readonly_format variable.
	Handle _IO_FLAGS2_CHECK_PERCENT_N.
	(buffered_vfprintf): Copy _flags2.
	* include/stdio.h (__sprintf_chk, __snprintf_chk, __vsprintf_chk,
	__vsnprintf_chk, __printf_chk, __fprintf_chk, __vprintf_chk,
	__vfprintf_chk): New prototypes.
	(__vsprintf_chk, __vsnprintf_chk): Add libc_hidden_proto.
	* include/string.h (__memcpy_chk, __memmove_chk, __mempcpy_chk,
	__memset_chk, __strcpy_chk, __stpcpy_chk, __strncpy_chk, __strcat_chk,
	__strncat_chk): New prototypes.
	* include/bits/string3.h: New file.
	* include/sys/cdefs.h (__chk_fail): Add libc_hidden_proto
	and rtld_hidden_proto.
	* string/Makefile (headers): Add bits/string3.h.
	* string/bits/string3.h (bcopy, bzero): New defines.
	(memset, memcpy, memmove, strcpy, strncpy, strcat, strncat): Change
	macros so that inlines are used only if unknown destination size
	or side-effects in destination argument.
	(mempcpy, stpcpy): Likewise.  Protect with #ifdef __USE_GNU.

2004-09-16  Ulrich Drepper  <drepper@redhat.com>

	* debug/Makefile (routines): Add *_chk.
	* debug/Versions (libc): Export __chk_fail, __memcpy_chk,
	__memmove_chk, __mempcpy_chk, __memset_chk, __stpcpy_chk,
	__strcat_chk, __strcpy_chk, __strncat_chk, __strncpy_chk,
	__sprintf_chk, __vsprintf_chk, __snprintf_chk, __vsnprintf_chk
	@GLIBC_2.3.4.
	* debug/chk_fail.c: New file.
	* debug/snprintf_chk.c: Likewise.
	* debug/sprintf_chk.c: Likewise.
	* debug/vsnprintf_chk.c: Likewise.
	* debug/vsprintf_chk.c: Likewise.
	* include/features.h (_FORTIFY_SOURCE): Document, handle.
	(__USE_FORTIFY_LEVEL): Define.
	(__GNUC_PREREQ): Move to earlier location.
	* include/sys/cdefs.h (__chk_fail): New prototype.
	* libio/bits/stdio.h (sprintf, vsprintf, snprintf, vsnprintf):
	Define if __USE_FORTIFY_LEVEL.
	* misc/sys/cdefs.h (__bos, __bos0): Define.
	* string/string.h: Include <bits/string3.h> if __USE_FORTIFY_LEVEL.
	* bits/string/string3.h: New header.
	* sysdeps/generic/memcpy_chk.c: New file.
	* sysdeps/generic/memmove_chk.c: Likewise.
	* sysdeps/generic/mempcpy_chk.c: Likewise.
	* sysdeps/generic/memset_chk.c: Likewise.
	* sysdeps/generic/stpcpy_chk.c: Likewise.
	* sysdeps/generic/strcat_chk.c: Likewise.
	* sysdeps/generic/strcpy_chk.c: Likewise.
	* sysdeps/generic/strncat_chk.c: Likewise.
	* sysdeps/generic/strncpy_chk.c: Likewise.
2004-10-15  Jakub Jelinek  <jakub@redhat.com>

	* elf/dl-minimal.c (__chk_fail): New.  Add rtld_hidden_def.
	* sysdeps/unix/sysv/linux/readonly-area.c: New file.
	* sysdeps/i386/i686/memmove.S (__memmove_chk): Add checking
	routine.
	* sysdeps/i386/i686/memcpy.S (__memcpy_chk): Likewise.
	* sysdeps/i386/i686/mempcpy.S (__mempcpy_chk): Likewise.
	* sysdeps/i386/i686/memset.S (__memset_chk): Likewise.
	* sysdeps/i386/i686/memmove-chk.S: New file.
	* sysdeps/i386/i686/memcpy-chk.S: Likewise.
	* sysdeps/i386/i686/mempcpy-chk.S: Likewise.
	* sysdeps/i386/i686/memset-chk.S: Likewise.
	* sysdeps/generic/strcat-chk.c (__strcat_chk): Don't __chk_fail
	if exactly fitting into buffer.
	* sysdeps/generic/strncat-chk.c (__strncat_chk): Likewise.
	* sysdeps/generic/readonly-area.c: New file.
	* sysdeps/generic/strncpy-chk.c (__strncpy_chk): Only test
	destlen once.
	* sysdeps/x86_64/memset.S (__memset_chk): Add checking routine.
	* sysdeps/x86_64/memcpy.S (__memcpy_chk): Likewise.
	* sysdeps/x86_64/mempcpy.S (__memcpy_chk): Define to __mempcpy_chk.
	* sysdeps/x86_64/memcpy-chk.S: New file.
	* sysdeps/x86_64/mempcpy-chk.S: Likewise.
	* sysdeps/x86_64/memset-chk.S: Likewise.
	* sysdeps/x86_64/strcpy-chk.S: Likewise.
	* sysdeps/x86_64/stpcpy-chk.S: Likewise.
	* argp/argp-xinl.c (__OPTIMIZE__): Define to 1 instead of nothing.
	* argp/argp-fs-xinl.c (__OPTIMIZE__): Likewise.
	* debug/tst-chk1.c: New test.
	* debug/tst-chk2.c: Likewise.
	* debug/tst-chk3.c: Likewise.
	* debug/test-strcpy_chk.c: Likewise.
	* debug/test-stpcpy_chk.c: Likewise.
	* debug/vsprintf_chk.c (__vsprintf_chk): If flags > 0, request
	_IO_FLAGS2_CHECK_PERCENT_N.  Add libc_hidden_def.
	* debug/Makefile (routines): Add printf_chk, fprintf_chk, vprintf_chk,
	vfprintf_chk, gets_chk and readonly-area.
	(CFLAGS-*_chk.c): Set.
	(tests): Add tst-chk1, tst-chk2, tst-chk3, test-strcpy_chk and
	test-stpcpy_chk.
	* debug/vprintf_chk.c: New file.
	* debug/printf_chk.c: Likewise.
	* debug/vfprintf_chk.c: Likewise.
	* debug/fprintf_chk.c: Likewise.
	* debug/gets_chk.c: Likewise.
	* debug/chk_fail.c (__chk_fail): Add libc_hidden_def.
	* debug/snprintf_chk.c (__snprintf_chk): Fix order of arguments
	passed to __vsnprintf_chk.
	* debug/Versions (libc): Export __printf_chk, __fprintf_chk,
	__vprintf_chk, __vfprintf_chk and __gets_chk @GLIBC_2.3.4.
	* debug/vsnprintf_chk.c (__vsnprintf_chk): Don't call
	__vsnprintf, instead create a temporary file with
	_IO_strn_jumps jumptable.  If flags > 0, request
	_IO_FLAGS2_CHECK_PERCENT_N.  Add libc_hidden_def.
	* libio/Makefile (headers): Add bits/stdio2.h.
	* libio/stdio.h: Include <bits/stdio2.h> if __USE_FORTIFY_LEVEL.
	(sprintf, snprintf, vsprintf, vsnprintf): Remove defines.
	* libio/strfile.h (_IO_strnfile): New type.
	(_IO_strn_jumps): New extern.
	* libio/vsnprintf.c (_IO_strnfile): Remove.
	(_IO_strn_jumps): Remove static.
	* libio/bits/stdio2.h: New file.
	* libio/vswprintf.c (_IO_strnfile): Rename type to...
	(_IO_wstrnfile): ...this.  Adjust all uses.
	* libio/libio.h (_IO_FLAGS2_CHECK_PERCENT_N): Define.
	* stdio-common/vfprintf.c (STR_LEN): Define.
	(vfprintf): Add readonly_format variable.
	Handle _IO_FLAGS2_CHECK_PERCENT_N.
	(buffered_vfprintf): Copy _flags2.
	* include/stdio.h (__sprintf_chk, __snprintf_chk, __vsprintf_chk,
	__vsnprintf_chk, __printf_chk, __fprintf_chk, __vprintf_chk,
	__vfprintf_chk): New prototypes.
	(__vsprintf_chk, __vsnprintf_chk): Add libc_hidden_proto.
	* include/string.h (__memcpy_chk, __memmove_chk, __mempcpy_chk,
	__memset_chk, __strcpy_chk, __stpcpy_chk, __strncpy_chk, __strcat_chk,
	__strncat_chk): New prototypes.
	* include/bits/string3.h: New file.
	* include/sys/cdefs.h (__chk_fail): Add libc_hidden_proto
	and rtld_hidden_proto.
	* string/Makefile (headers): Add bits/string3.h.
	* string/bits/string3.h (bcopy, bzero): New defines.
	(memset, memcpy, memmove, strcpy, strncpy, strcat, strncat): Change
	macros so that inlines are used only if unknown destination size
	or side-effects in destination argument.
	(mempcpy, stpcpy): Likewise.  Protect with #ifdef __USE_GNU.

2004-09-16  Ulrich Drepper  <drepper@redhat.com>

	* debug/Makefile (routines): Add *_chk.
	* debug/Versions (libc): Export __chk_fail, __memcpy_chk,
	__memmove_chk, __mempcpy_chk, __memset_chk, __stpcpy_chk,
	__strcat_chk, __strcpy_chk, __strncat_chk, __strncpy_chk,
	__sprintf_chk, __vsprintf_chk, __snprintf_chk, __vsnprintf_chk
	@GLIBC_2.3.4.
	* debug/chk_fail.c: New file.
	* debug/snprintf_chk.c: Likewise.
	* debug/sprintf_chk.c: Likewise.
	* debug/vsnprintf_chk.c: Likewise.
	* debug/vsprintf_chk.c: Likewise.
	* include/features.h (_FORTIFY_SOURCE): Document, handle.
	(__USE_FORTIFY_LEVEL): Define.
	(__GNUC_PREREQ): Move to earlier location.
	* include/sys/cdefs.h (__chk_fail): New prototype.
	* libio/bits/stdio.h (sprintf, vsprintf, snprintf, vsnprintf):
	Define if __USE_FORTIFY_LEVEL.
	* misc/sys/cdefs.h (__bos, __bos0): Define.
	* string/string.h: Include <bits/string3.h> if __USE_FORTIFY_LEVEL.
	* bits/string/string3.h: New header.
	* sysdeps/generic/memcpy_chk.c: New file.
	* sysdeps/generic/memmove_chk.c: Likewise.
	* sysdeps/generic/mempcpy_chk.c: Likewise.
	* sysdeps/generic/memset_chk.c: Likewise.
	* sysdeps/generic/stpcpy_chk.c: Likewise.
	* sysdeps/generic/strcat_chk.c: Likewise.
	* sysdeps/generic/strcpy_chk.c: Likewise.
	* sysdeps/generic/strncat_chk.c: Likewise.
	* sysdeps/generic/strncpy_chk.c: Likewise.
2004-10-18 04:17:19 +00:00
Ulrich Drepper be27d08c05 Update.
2004-09-22  Ulrich Drepper  <drepper@redhat.com>

	* string/string.h: Add __nonnull annotations.
	* stdlib/stdlib.h: Likewise.
2004-09-22 08:20:57 +00:00
Ulrich Drepper f377d02227 Update.
* include/atomic.h: Define atomic_increment_val, atomic_decrement_val,
	and atomic_dealy is not already defined.
	* sysdeps/i386/i486/bits/atomic.h: Define atomic_delay.
	* sysdeps/x86_64/bits/atomic.h: Likewise.

	* miscd/sys/cdefs.h (__NTH): New macro.
	(__THROW): Define using nothrow attribute for C code and gcc >= 3.2.
	(__REDIRECT_NTH): New macro.
	* argp/argp.h: Use __NTH and __REDIRECT_NTH where necessary.
	* ctype/ctype.h: Likewise.
	* dirent/dirent.h: Likewise.
	* io/fcntl.h: Likewise.
	* io/sys/sendfile.h: Likewise.
	* io/sys/stat.h: Likewise.
	* io/sys/statfs.h: Likewise.
	* io/sys/statvfs.h: Likewise.
	* libio/bits/stdio.h: Likewise.
	* misc/sys/mman.h: Likewise.
	* posix/unistd.h: Likewise.
	* resource/sys/resource.h: Likewise.
	* rt/aio.h: Likewise.
	* signal/signal.h: Likewise.
	* stdlib/stdlib.h: Likewise.
	* string/argz.h: Likewise.
	* string/string.h: Likewise.
	* sysdeps/generic/inttypes.h: Likewise.
	* sysdeps/i386/fpu/bits/mathinline.h: Likewise.
	* sysdeps/powerpc/fpu/bits/mathinline.h: Likewise.
	* sysdeps/s390/fpu/bits/mathinline.h: Likewise.
	* sysdeps/x86_64/fpu/bits/mathinline.h: Likewise.
	* sysdeps/unix/sysv/linux/bits/socket.h: Likewise.
	* sysdeps/unix/sysv/linux/bits/sys/sysmacros.h: Likewise.
	* wcsmbs/wchar.h: Likewise.

	* sysdeps/generic/glob.c: Use __PMT isntead of __P where appropriate.

	* resolv/gethnamaddr.c (getanswer): Remove __P use in variable
	definition.

	* io/sys/poll.h: Remove __THROW from poll prototype, it's a
	cancellation point.
2004-09-07 22:33:37 +00:00
Ulrich Drepper 3dbfd8117c Update.
2004-05-27  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/i386/fpu/bits/mathinline.h (__expm1_code): Define using
	__builtin_expm1l for GCC 3.5+.
	(__expl): Define using __builtin_expl for GCC 3.4+.
	(exp, expf, expl): Don't define for GCC 3.4+.
	(tan, tanf, tanl): Don't define for GCC 3.5+.
	(__atan2l): Define using __builtin_atan2l for GCC 3.4+.
	(atan2, atan2f, atan2l): Don't define for GCC 3.4+ or !__FAST_MATH__.
	(fmod, fmodf, fmodl): Don't define for GCC 3.5+ or !__FAST_MATH__.
	(fabsf, fabsl): Only provide if __USE_MISC or __USE_ISOC99.
	(sin, sinf, sinl, cos, cosf, cosl, log, logf, logl): Don't define
	for GCC 3.4+.
	(log10, log10f, log10l, asin, asinf, asinl, acos, acosf, acosl):
	Don't define for GCC 3.5+.
	(atan, atanf, atanl): Don't define for GCC 3.4+ or !__FAST_MATH__.
	(log1p, log1pf, log1pl, logb, logbf, logbl, log2, log2f, log2l): Don't
	define for GCC 3.5+.
	(drem, dremf, dreml): Don't define for GCC 3.5+ or !__FAST_MATH__.
	* sysdeps/sparc/fpu/bits/mathinline.h (sqrt, sqrtf, sqrtl): Don't
	define for GCC 3.2+.

2004-05-27  Jakub Jelinek  <jakub@redhat.com>

	* string/bits/string2.h (__bzero): Define even for GCC 3.0+.
	* sysdeps/alpha/stpcpy.S (stpcpy): Add libc_hidden_builtin_def.
	* sysdeps/alpha/alphaev67/stpcpy.S (stpcpy): Likewise.
	* sysdeps/powerpc/powerpc32/stpcpy.S (stpcpy): Likewise.
	* sysdeps/powerpc/powerpc64/stpcpy.S (stpcpy): Likewise.
	* sysdeps/sparc/sparc32/stpcpy.S (stpcpy): Likewise.
	* sysdeps/sparc/sparc64/stpcpy.S (stpcpy): Likewise.
	* sysdeps/i386/stpcpy.S (stpcpy): Likewise.
	* sysdeps/i386/i586/stpcpy.S (stpcpy): Likewise.
	* sysdeps/generic/stpcpy.c (stpcpy): Likewise.
	* sysdeps/x86_64/stpcpy.S (stpcpy): Likewise.
	* sysdeps/i386/i586/memcpy.S (memcpy): Remove
	libc_hidden_builtin_def if MEMPCPY_P.
	* sysdeps/x86_64/memcpy.S (memcpy): Likewise.
	* sysdeps/i386/i686/mempcpy.S (mempcpy): Add libc_hidden_builtin_def.
	* sysdeps/i386/i586/mempcpy.S (mempcpy): Likewise.
	* sysdeps/generic/mempcpy.c (mempcpy): Likewise.
	* sysdeps/x86_64/mempcpy.S (mempcpy): Likewise.
2004-05-28 06:56:51 +00:00
Ulrich Drepper 4a691b0639 Update.
2004-05-26  Jakub Jelinek  <jakub@redhat.com>

	* include/string.h (mempcpy, stpcpy): Add libc_hidden_builtin_proto.
	* string/bits/string2.h (memset): Disable macro for GCC 3.0+.
	(__mempcpy): Use __builtin_mempcpy for GCC 3.4+.
	(strchr): For GCC 3.2+, only use __rawmemchr if second argument is
	constant '\0' and first argument is not constant.
	(__stpcpy): Use __builtin_stpcpy for GCC 3.4+.
	(strncpy): Remove #ifdef _USE_STRING_ARCH_mempcpy variant.
	For GCC 3.2+ use __builtin_strncpy.
	(strncat): For GCC 3.2+ use __builtin_strncat.
	(strcmp): For GCC 3.2+ use __builtin_strcmp if both arguments are
	constant.
	(strcspn, strspn, strpbrk): For GCC 3.2+, use builtin function
	if both arguments are constant.

2004-05-26  Ulrich Drepper  <drepper@redhat.com>

	* nss/nss_files/files-hosts.c: Fix condition for looking up IPv4
	mapped addresses in gethostbyaddr.
2004-05-26 17:27:20 +00:00
Roland McGrath 6f0b2e1f0f [BZ #130, BZ #131]
2004-04-28  Carlos O'Donell  <carlos@baldric.uwo.ca>
	* sysdeps/unix/sysv/linux/mq_getattr.c: Include <stddef.h>.
	* sysdeps/unix/sysv/linux/mq_notify.c: Likewise.
	* sysdeps/unix/sysv/linux/mq_open.c: Likewise.
	* sysdeps/unix/sysv/linux/mq_receive.c: Likewise.
	* sysdeps/unix/sysv/linux/mq_send.c: Likewise.

	* manual/resource.texi (sched_setaffinity, sched_getaffinity): Fix
	prototypes and description [BZ #131].

	* string/bits/string2.h (strpbrk): Cast NULL to char * [BZ #130].
	Patch by Ed Catmur <ed@catmur.co.uk>.
	* string/tst-inlcall.c (main): Add test for strpbrk.
2004-04-29 21:55:45 +00:00
Ulrich Drepper 5da3d37718 Update.
* sysdeps/powerpc/powerpc64/ffsll.c: New file.

	* sysdeps/powerpc/elf/libc-start.c: No need for a separate
2004-04-04 06:17:27 +00:00
Ulrich Drepper 4e73e1151d Update.
* string/test-ffs.c: Also test ffsl and ffsll.

	* sysdeps/powerpc/ffs.c: Don't define ffsl for ppc64.
2004-04-04 05:53:24 +00:00
Ulrich Drepper 61645263d4 Update.
2004-03-22  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/sparc/sparc32/getpagesize.c
	(__getpagesize): Avoid warning about writing into read-only memory.

	* string/Makefile (routines): Add xpg-strerror.
	* string/string.h (strerror_r): If __USE_XOPEN2K but not __USE_GNU,
	redirect strerror_r to __xpg_strerror_r.
	* string/Versions (libc): Add __xpg_strerror_r@@GLIBC_2.3.4.
	* sysdeps/generic/xpg-strerror.c: New file.
	* sysdeps/mach/xpg-strerror.c: New file.
2004-03-22 19:54:06 +00:00
Ulrich Drepper ccadf7b534 Update.
2004-03-14  Ulrich Drepper  <drepper@redhat.com>

	Make the non-_l functions wrappers around the _l functions.
	* include/monetary.h: Declare __vstrmon_l.
	* include/string.h: Add libc_hidden_proto for __strcoll_l and
	__strxfrm_l.
	* include/time.h: Define ptime_locale_status.  Declare
	__strptime_internal.
	* include/wchar.h: Add libc_hidden_proto for __wcscoll_l and
	__wcsxfrm_l.
	* stdlib/strfmon.c: Move the code to strfmon_l.c.  Add little
	wrapper around __vstrfmon_l.
	* stdlib/strfmon_l.c: Add real implementation.  Split into new
	function __vstrfmon_l to allow calling it from strfmon.
	* stdlib/strtod.c: Move real code to strtod_l.c and add wrapper.
	* stdlib/strtod_l.c: Add real implementation.
	* stdlib/strtof.c: Adjust to changed strtod.c.
	* stdlib/strtof_l.c: Include strtod_l.c now.
	* stdlib/strtold.c: New file.
	* stdlib/strtold_l.c: Removed.
	* string/strcoll.c: Move real code to strcoll_l.c: Add wrapper.
	* string/strcoll_l.c: Add real implementation.
	* string/strxfrm.c: Move real code to strxfrm_l.c: Add wrapper.
	* string/strxfrm_l.c: Add real implementation.
	* sysdeps/generic/strtol.c: Move real implementation to strtol_l.c.
	Add wrappers.
	* sysdeps/generic/strtol_l.c: Add real implementation.
	* sysdeps/generic/strtold.c: Removed.
	* sysdeps/generic/strtold_l.c: New file.
	* sysdeps/generic/strtoll_l.c: Include strtol_l.c now.  Adjust
	#defines.
	* sysdeps/generic/strtoul_l.c: Likewise.
	* sysdeps/generic/strtoull_l.c: Likewise.
	* sysdeps/generic/wcstol_l.c: Likewise.
	* sysdeps/generic/wcstoll_l.c: Likewise.
	* sysdeps/generic/wcstoul_l.c: Likewise.
	* sysdeps/generic/wcstoull_l.c: Likewise.
	* sysdeps/ieee754/ldbl-128/strtold.c: Removed.
	* sysdeps/ieee754/ldbl-128/strtold_l.c: New file.
	* sysdeps/ieee754/ldbl-96/strtold.c: Removed.
	* sysdeps/ieee754/ldbl-96/strtold_l.c: New file.
	* sysdeps/m68k/strtold.c: Removed.
	* sysdeps/m68k/strtold_l.c: New file.
	* time/strftime.c: Move real code to strftime_l.c.  Add wrapper.
	* time/strftime_l.c: Add real implementation.
	* time/strptime.c: Move real code to strptime_l.c.  Add wrapper.
	* time/strptime_l.c: Add real implementation.
	* time/wcsftime.c: Simplify since only wrappers are defined in
	strftime.c.
	* time/wcsftime_l.c: Include strftime_l.c.
	* wcsmbs/wcscoll.c: Simplify since the file is not used by wcscoll_l.c
	anymore.
	* wcsmbs/wcscoll_l.c: Include strcoll_l.c.
	* wcsmbs/wcsxfrm.c: Simplify since the file is not used by wcsxfrm_l.c
	anymore.
	* wcsmbs/wcsxfrm_l.c: Include strxfrm_l.c.
	* wcsmbs/wcstod.c: Prepare to include new strtod.c.
	* wcsmbs/wcstod_l.c: Include strtod_l.c.
	* wcsmbs/wcstof.c: Prepare to include new strtof.c.
	* wcsmbs/wcstof_l.c: Include strtof_l.c.
	* wcsmbs/wcstold.c: Prepare to include new strtold.c.
	* wcsmbs/wcstold_l.c: Include strtold_l.c.

	* locale/uselocale.c: Use _NL_CURRENT_LOCALE instead of __libc_tsd_get.

	* sysdeps/generic/strcasecmp.c: Optimize a bit.  It's better to get
	a reference to the current locale and then use the _l functions.
	* sysdeps/generic/strncase.c: Likewise.
2004-03-14 21:12:06 +00:00
Ulrich Drepper 9a85008727 Update.
* string/test-string.h: Define GLRO.
2004-03-07 09:05:18 +00:00
Ulrich Drepper cd94eda99b Update.
2003-09-10  Jakub Jelinek  <jakub@redhat.com>

	* string/Makefile (strop-tests): Add memccpy.
	* string/test-memccpy.c: New test.
2003-09-10 05:23:33 +00:00
Ulrich Drepper 2036b767dd (main): Check memccpy. 2003-09-09 20:15:17 +00:00
Ulrich Drepper 87865838da Update.
* string/bits/string2.h (__STRING2_COPY_TYPE): Add attribute to
	the type, not to name.
2003-08-20 00:08:24 +00:00
Ulrich Drepper 7329994338 Update.
More cancellation handling fixups.
	* sysdeps/unix/sysv/linux/not-cancel.h: Add waitpid_not_cancel.
	* sysdeps/generic/not-cancel.h: Likewise.
	* catgets/open_catalog.c: Use not-cancelable syscalls.
	* time/Makefile (CFLAGS-getdate.c): Add -fexceptions.
	* sysdeps/unix/sysv/linux/llseek.c: Must not be cancelable.
	* sysdeps/unix/syscalls.list: Don't mark lseek as cancelable.
	* dlfcn/dlfcn.h: Mark dlopen with __THROW again.
	* io/fcntl.h: Don't mark posix_fallocate with __THROW.
	* libio/fileops.c: Use not-cancelable syscalls for fclose.
	* libio/iopopen.c: Use no-cancelable syscalls.
	* libio/stdio.h: Mark popen and pclose with __THROW again.
	* misc/Makefile (CFLAGS-syslog.c): Add -fexceptions.
	* misc/syslog.c: Fix locking and cancellation cleanup handling.
	* posix/unistd.h: Mark ttyname and ttyname_r again with __THROW.
	* stdio-common/Makefile (CFLAGS-tmpfile.c, CFLAGS-tmpfile64.c,
	CFLAGS-tempname.c): Add -fexceptions.
	* stdlib/Makefile (CFLAGS-mkstemp.c): Add -fexceptions.
	* string/string.h: Mark strerror and strerror_r with _THROW again.
	* sysdeps/generic/unwind.inc: New file.  Copied from gcc.
	* sysdeps/generic/unwind-dw2.c: Update from gcc version.  Remove
	#ifs since we now need all the code compiled.
	* sysdeps/posix/spawni.c: Use close_not_cancel instead of close.
	* sysdeps/unix/closedir.c: Use not-cancelable syscalls.
	* sysdeps/unix/opendir.c: Likewise.
2003-07-15 07:52:52 +00:00
Ulrich Drepper 9c7ff11a5c Update.
2003-06-11  Ulrich Drepper  <drepper@redhat.com>

	* time/tzfile.c: Add a couple of __builtin_expect.

	Remove warnings gcc 3.3 shows.
	* argp/argp-help.c (hol_entry_short_iterate): Don't inline.
	* elf/dl-load.c (fillin_rpath): Likewise.
	(add_path): Likewise.
	* elf/dl-version.c (find_needed): Always inline.
	* elf/do-lookup.c (FCT): Don't inline.
	* iconv/Makefile: Extend vpath to intl subdir.
	(iconvconfig-modules): Add hash-string.
	* iconv/gconv_charset.h (strip): Don't inline.
	(upstr): Always inline.
	Move __gconv_compare_alias prototype to...
	* iconv/gconv_int.h: ...here.
	* iconv/gconv_db.c: Don't include gconv_charset.h.
	* iconv/gconv_conf.c (add_alias): Don't inline.
	(insert_module): Likewise.
	* iconv/gconv_simple.c (internal_ucs4_loop): Always inline.
	(internal_ucs4_loop_unaligned): Likewise.
	(internal_ucs4_loop_single): Likewise.
	(ucs4_internal_loop): Likewise.
	(ucs4_internal_loop_unaligned): Likewise.
	(ucs4_internal_loop_single): Likewise.
	(internal_ucs4le_loop): Always inline.
	(internal_ucs4le_loop_unaligned): Likewise.
	(internal_ucs4le_loop_single): Likewise.
	(ucs4le_internal_loop): Likewise.
	(ucs4le_internal_loop_unaligned): Likewise.
	(ucs4le_internal_loop_single): Likewise.
	* iconv/loop.c: Always inline the defined functions.
	* iconvdata/cns11642.h: Likewise.
	* iconvdata/cns11642l1.h: Likewise.
	* iconvdata/euc-kr.c: Likewise.
	* iconvdata/gb2312.h: Likewise.
	* iconvdata/jis0201.h: Likewise.
	* iconvdata/jis0208.h: Likewise.
	* iconvdata/jis0212.h: Likewise.
	* iconvdata/jisx0213.h: Likewise.
	* iconvdata/ksc5601.h: Likewise.
	* iconvdata/utf-7.c (base64): Don't inline.
	* include/libc-symbols.h (symbol_set_first_element): Add cast
	(symbol_set_end_p): Likewise.
	* include/set-hooks (RUN_HOOK): Likewise.
	* inet/Makefile (aux): Add ifreq.
	* intl/Makefile (aux): Add some entries from routines.  Add
	hash-string.
	* intl/hash-string.c: New file.
	* intl/hash-string.h: Remove hash_string definition.  Declare
	__hash_string.
	* iconv/gconv_cache.c (find_module_idx): Adjust hash_string caller.
	* iconv/iconvconfig.c (new_name): Likewise.
	* intl/dcigettext.c (_nl_find_msg): Likewise.
	* intl/loadmsgcat.c (_nl_load_domain): Likewise.
	* io/ftw.c (open_dir_stream): Always inline.
	(process_entry): Don't inline.
	* locale/findlocale.c: Include gconv_int.h.
	* locale/setlocale.c (new_composite_name): Don't inline.
	* locale/weight.h (findidx): Always inline.
	* locale/weightwc.h (findidx): Likewise.
	* locale/programs/linereader.c (lr_ignore_rest): Define here.
	* locale/programs/linereader.h (lr_ignore_rest): Don't define here,
	just declare it.
	(lr_getc): Always inline.
	(lr_ungetc): Likewise.
	* nss/nss_files/files-parse.c (parse_list): Likewise.
	* stdio-common/Makefile (aux): Add printf-parsemb and
	printf-parsewc.
	* stdio-common/_itoa.h (_itoa_word): Always inline.
	(_fitoa_word, _fitoa): Don't define here, only declare.
	* stdio-common/_itoa.c (_iftoa_word): Add here.
	(_fitoa): Likewise.
	* stdio-common/_itowa.h (_itowa_word): Always inline.
	* stdio-common/printf-parse.h (read_int): Don't inline.
	(find_spec): Don't define.
	Declare __find_specmb and __find_specwc.
	(parse_one_spec): Don't define.
	Declare __parse_one_specmb and __parse_one_specwc.
	* stdio-common/printf-parsemb.c: New file.
	* stdio-common/printf-parsewc.c: New file.
	* stdio-common/vfprintf.c: Update calls to find_spec and
	parse_one_spec for new names.
	* stdio-common/printf-prs.c: Likewise.  Define DONT_NEED_READ_INT.
	* stdlib/Makefile (aux): Add grouping and groupingwc.
	* stdlib/grouping.c: New file.
	* stdlib/groupingwc.c: New file.
	* stdlib/grouping.h (correctly_grouped_prefix): Don't define here.
	Just prototype.
	* stdlib/rpmatch.c (try): Don't inline.
	* stdlib/strtod.c (round_and_return): Don't line.
	(str_to_mpn): Likewise.
	(__mpn_lshift_1): Always inline.  Optimize only for constant count.
	Adjust for name change of correctly_grouped_prefix.
	* sysdeps/generic/strtol.c: Adjust for name change of
	correctly_grouped_prefix.
	* string/strxfrm.c (utf8_encode): Don't inline.
	* sysdeps/generic/dl-cache.c: Define _dl_cache_libcmp.
	* sysdeps/generic/dl-cache.h: Just declare _dl_cache_libcmp.
	* sysdeps/generic/ifreq.c: New file.
	* sysdeps/unix/sysv/linux/ifreq.c: New file.
	* sysdeps/generic/ifreq.h (__ifreq): Only declare here.
	* sysdeps/unix/sysv/linux/ifreq.h: Likewise.
	* sysdeps/generic/ldsodefs.h (_dl_name_match_p): Always inline.
	* sysdeps/generic/unwind-dw2-fde.c (start_fde_sort): Don't inline.
	(fde_split): Likewise.
	(fde_merge): Likewise.
	(end_fde_sort): Likewise.
	(init_object): Likewise.
	(binary_search_unencoded_fdes): Likewise.
	(binary_search_single_encoding_fdes): Likewise.
	(binary_search_mixed_encoding_fdes): Likewise.
	* sysdeps/generic/wordexp.c (w_addchar): Don't inline.
	* sysdeps/i386/dl-machine.c (elf_machine_runtime_setup): Always inline.
	* sysdeps/posix/sprofil.c (profil_count): Don't inline.
	* sysdeps/unix/sysv/linux/Makefile [subdir=io] (sysdep_routines):
	Add xstatconv.
	* sysdeps/unix/sysv/linux/xstatconv.h: New file.
	* sysdeps/unix/sysv/linux/xstatconv.c: Don't inline the function.
	Export them.  Prepend __ to name.
	* sysdeps/unix/sysv/linux/Dist: Add xstatconv.h.
	* sysdeps/unix/sysv/linux/fxstat.c: Adjust for name change of
	conversion functions.
	* sysdeps/unix/sysv/linux/fxstat64.c: Likewise.
	* sysdeps/unix/sysv/linux/lxstat.c: Likewise.
	* sysdeps/unix/sysv/linux/lxstat64.c: Likewise.
	* sysdeps/unix/sysv/linux/xstat.c: Likewise.
	* sysdeps/unix/sysv/linux/xstat64.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/fxstat.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/lxstat.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/xstat.c: Likewise.
	* sysdeps/unix/sysv/linux/pathconf.c (__statfs_link_max,
	__statfs_filesize_max, __statfs_symlinks): Define here.  __ prepended
	to name.  Change callers.
	* sysdeps/unix/sysv/linux/pathconf.h (__statfs_link_max,
	__statfs_filesize_max, __statfs_symlinks): Don't define here, just
	declare.
	* sysdeps/unix/sysv/linux/fpathconf.c: Change all callers.
	* time/tzfile.c (decode): Always inline.
	* wcsmbs/wcsnrtombs.c: Change type of inbuf to unsigned char*.
	Remove cast in tomb function call.
	* wcsmbs/wcsrtombs.c Likewise.
	* wcsmbs/wcstob.c: Introduce new temp variable to take pointer in
	tomb function call.
2003-06-11 23:22:36 +00:00