* string/bits/string2.h (__strdup): Cast parameters to calloc to
avoid warning with -Wconversion.
(__strndup): Likewise.
Patch to 50% by Christian Iseli <christian.iseli@licr.org>.
* 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.
* 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.
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.
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>
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.
2002-05-27 Alexandre Oliva <aoliva@redhat.com>
* configure.in (DO_STATIC_NSS): Define if --disable-shared.
2002-05-26 Bruno Haible <bruno@clisp.org>
* iconvdata/iso-2022-jp.c (BODY for TO_LOOP): Avoid running off the
end of the ISO-8859-7 from idx table.
2002-05-27 Ulrich Drepper <drepper@redhat.com>
* manual/lang.texi: Fix FLT_EPSILON description [PR libc/3649].
2002-05-24 David S. Miller <davem@redhat.com>
* string/bits/string2.h (memset): Do not try to optimize when
not _STRING_ARCH_unaligned if GCC will do the right thing.
2002-01-23 Richard Henderson <rth@redhat.com>
* sysdeps/alpha/Makefile (pic-ccflag): New variable.
2002-01-28 Ulrich Drepper <drepper@redhat.com>
* string/strxfrm.c: Allocate one more byte for rulearr and clear
this element [PR libc/2855].
* string/strcoll.c: Handle zero-length arguments specially
[PR libc/2856].
2002-01-23 Jakub Jelinek <jakub@redhat.com>
* string/bits/string2.h (__mempcpy): For gcc 3.0+, don't use
__mempcpy_small but instead use __builtin_memcpy ( , , n) + n for
short lengths and constant src.
(strcpy): Don't optimize for gcc 3.0+.
(__stpcpy): For gcc 3.0+, don't use
__stpcpy_small but instead use __builtin_strcpy (, src) + strlen (src)
for short string literal src.
2002-01-23 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
* sysdeps/unix/sysv/linux/configure.in (libc_cv_gcc_unwind_find_fde):
Set for arm, too.
2001-01-22 Paul Eggert <eggert@twinsun.com>
* manual/llio.texi (Linked Channels, Cleaning Streams):
Make it clearer that a just-opened input stream might need cleaning.
2002-01-21 H.J. Lu <hjl@gnu.org>
* sysdeps/mips/dl-machine.h (ELF_MACHINE_BEFORE_RTLD_RELOC):
Don't use label at end of compound statement.
2001-11-02 Jakub Jelinek <jakub@redhat.com>
* string/bits/string2.h (__strndup): If n is smaller than len, set
len to n + 1.
* string/tester.c (test_strndup): New function.
(main): Call it.
* sunrpc/rpc_main.c: Optimize variable definitions a bit.
2001-10-04 Ben Collins <bcollins@debian.org>
* sysdeps/generic/inttypes.h: Fix typo (define, not defined) in
decleration of __need_wchar_t.
2001-10-03 Jakub Jelinek <jakub@redhat.com>
* string/bits/string2.h (__strsep_g): Add prototype.
(__strsep): Use it.
* string/Versions (__strsep): Remove.
* sysdeps/generic/strsep.c (__strsep_g): Add alias to __strsep.
2001-10-07 Ulrich Drepper <drepper@redhat.com>
* manua/llio.texi: Clarify file references added by mmap.
Patch by Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de>.
2001-07-06 Paul Eggert <eggert@twinsun.com>
* manual/argp.texi: Remove ignored LGPL copyright notice; it's
not appropriate for documentation anyway.
* manual/libc-texinfo.sh: "Library General Public License" ->
"Lesser General Public License".
2001-07-06 Andreas Jaeger <aj@suse.de>
* All files under GPL/LGPL version 2: Place under LGPL version
2.1.
* string/bits/string2.h (strspn): Evaluate first argument if
second is "".
(strpbrk): Likewise.
* sysdeps/i386/i486/bits/string.h: Likewise.
* string/Makefile (tests): Add bug-strspn1 and bug-strpbrk1.
* string/bug-strspn1.c: New file.
* string/bug-strpbrk1.c: New file.
Test cases by Joseph S. Myers <jsm28@cam.ac.uk>.
* string/bits/string2.h (strncat): Terminate string correctly.
* sysdeps/i386/i486/bits/string.h (strncat): Likewise.
* string/Makefile (tests): Add bug-strncat1.
* string/bug-strncat1.c: New file.
Test case by Joseph S. Myers <jsm28@cam.ac.uk>.
2000-10-27 Ben Collins <bcollins@debian.org>
* sysdeps/generic/lockf.c (lockf): Set l_type to F_RDLCK before
calling for F_GETLK.
2000-10-29 Ulrich Drepper <drepper@redhat.com>
2000-05-03 Ulrich Drepper <drepper@redhat.com>
* string/bits/string2.h: Declare __strdup and __strndup if necessary.
Reported by Bruno Haible.
2000-04-29 Bruno Haible <haible@clisp.cons.org>
* manual/arith.texi: Remove @w from @itemize.
2000-01-03 Andreas Jaeger <aj@suse.de>
* include/resolv.h: Remove declarations for __ns_name_ntop and
__ns_name_unpack since those are available in resolv/arpa/nameser.h.
2000-01-03 Andreas Jaeger <aj@suse.de>
* time/tst-strptime.c (test_tm): Add tests for all fields of
struct tm.
2000-01-03 Ulrich Drepper <drepper@cygnus.com>
* string/bits/string2.h (__strsep_g): Don't handle empty __S special.
2000-01-03 Andreas Jaeger <aj@suse.de>
* string/tester.c (test_strsep): Add one more test.
2000-01-03 Philip Blundell <philb@gnu.org>
* string/tester.c (test_mempcpy): New function.
(main): Call it.
(test_memcpy): Test unaligned cases too.
* sysdeps/arm/bits/string.h (_HAVE_STRING_ARCH_mempcpy): Define.
* sysdeps/arm/fpu/bits/mathdef.h: New file.
* nss/Makefile: Add rules to build makedb.
1999-12-17 Ulrich Drepper <drepper@cygnus.com>
* string/bits/string2.h (__strtok_r_1c): Help gcc optimizing string
access.
* locale/programs/ld-collate.c: Implement handling of absolute
ellipsis. Parsing of file and constructing the internal data
structures should now be complete.
(collate_finish): Start adding support to generate the data
structures which are written out to the file.
* intl/dcgettext.c: Rewrite to handle caching of previous results here
instead of in the dcgettext macro.
* intl/libintl.h (dcgettext): Don't define for systems using this
glibc or systems with tsearch.
* sysdeps/generic/mathdef.h: Protect definitions for math.h
against double inclusion.
* sysdeps/alpha/fpu/bits/mathdef.h: Likewise.
* sysdeps/i386/fpu/bits/mathdef.h: Likewise.
* sysdeps/m68k/fpu/bits/mathdef.h: Likewise.
* sysdeps/powerpc/fpu/bits/mathdef.h: Likewise.
* sysdeps/i386/fpu/libm-test-ulps: Add more deltas (are mobile PIIs
that different?).
1999-12-17 Andreas Jaeger <aj@suse.de>
* rt/aio.h (struct aiocb64): Add member __next_prio to sync the
struct with aiocb.
* rt/Makefile (tests): Added tst-aio64.
Added dependency rules for tst-aio64.
* rt/tst-aio64.c: New file, copied from tst-aio.c and changed for
64bit tests.
1999-12-15 Thorsten Kukuk <kukuk@suse.de>
* sysdeps/unix/sysv/linux/alpha/oldgetrlimit64.c: Removed.
* sysdeps/unix/sysv/linux/alpha/oldsetrlimit64.c: Removed.
* sysdeps/unix/sysv/linux/bits/resource.h: Change RLIM_INFINITY back to
old value (signed long).
* sysdeps/unix/sysv/linux/i386/bits/resource.h: New, with unsigned
long RLIM_INFINITY.
* sysdeps/unix/sysv/linux/getrlimit.c: Moved from here to ...
* sysdeps/unix/sysv/linux/i386/getrlimit.c: ... here.
* sysdeps/unix/sysv/linux/getrlimit64.c: Moved from here to ...
* sysdeps/unix/sysv/linux/i386/getrlimit64.c: ... here.
* sysdeps/unix/sysv/linux/oldgetrlimit64.c: Moved from here to ...
* sysdeps/unix/sysv/linux/i386/oldgetrlimit64.c: ... here.
* sysdeps/unix/sysv/linux/oldsetrlimit64.c: Moved from here to ...
* sysdeps/unix/sysv/linux/i386/oldsetrlimit64.c: ... here.
* sysdeps/unix/sysv/linux/setrlimit.c: Moved from here to ...
* sysdeps/unix/sysv/linux/i386/setrlimit.c: ... here.
* sysdeps/unix/sysv/linux/setrlimit64.c: Moved from here to ...
* sysdeps/unix/sysv/linux/i386/setrlimit64.c: ... here.
* sysdeps/unix/sysv/linux/sparc/bits/resource.h: New.
* sysdeps/unix/sysv/linux/sparc/sparc64/oldgetrlimit64.c: Removed.
* sysdeps/unix/sysv/linux/sparc/sparc64/oldsetrlimit64.c: Removed.
1999-12-17 Andreas Jaeger <aj@suse.de>
* elf/ldconfig.c: Add new option -l to manualy link shared
libraries.
(options): Added option.
(parse_opt): Set option.
(main): Handle option.
(manual_link): New function.
1999-12-17 Thorsten Kukuk <kukuk@suse.de>
* string/bits/string2.h: Fix patch from 1999-12-07.
1999-12-16 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/generic/strsep.c: If delim string has only one character
don't run over end of string.
* locale/programs/ld-collate.c (insert_weights): Also update next
pointer of last cursor element.
(insert_value): Return nonzero value if nothing got inserted.
(handle_ellipsis): Don't do anything if to-value cannot be inserted.
1999-12-10 Jakub Jelinek <jakub@redhat.com>
* stdlib/longlong.h (__sparc_v9__): Use %rDIGIT instead of %DIGIT
where appropriate.
1999-12-10 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c (__sigaction):
Copy sa_flags into kernel sigaction structure.
1999-12-14 Andreas Jaeger <aj@suse.de>
* string/tester.c (test_strsep): More tests for access beyond
the final NUL. The first two tests come from PR libc/1486 by
martinea@iro.umontreal.ca.
1999-12-14 Thorsten Kukuk <kukuk@suse.de>
* nis/ypclnt.c: Correct handling of cached client handles.
(__xdr_ypresp_all): Call callback function for errors, too,
like Solaris does.
* nis/nss_compat/compat-grp.c: Make sure errno is always set correct.
* nis/nss_compat/compat-initgroups.c: Likewise.
* nis/nss_compat/compat-spwd.c: Likewise.
* nis/nss_nis/nis-alias.c: Likewise.
* nis/nss_nis/nis-ethers.c: Likewise.
* nis/nss_nis/nis-grp.c: Likewise.
* nis/nss_nis/nis-hosts.c: Likewise.
* nis/nss_nis/nis-netgrp.c: Likewise.
* nis/nss_nis/nis-publickey.c: Likewise.
* nis/nss_nis/nis-service.c: Likewise. Also use services.byservicename
Map if available, optimize query if name/port and protocol is known.
1999-12-07 Jakub Jelinek <jakub@redhat.com>
* string/bits/string2.h (__memset_gc, __mempcpy_small, __strcpy_small,
__stpcpy_small): Cast switch expressions to int to shut up compiler
warnings.
1999-07-26 Jakub Jelinek <jj@ultra.linux.jz>
* string/bits/string2.h (__strcpy_small): Avoid compile time warning.
(__stpcpy_small): Likewise.
Union has no __uc member but __c.
* string/bits/string2.h: Fix aliasing problems.
* sysdeps/i386/i486/bits/string.h: Likewise.
* sysdeps/i386/bits/string.h: Likewise.
1998-12-28 Geoff Keating <geoffk@ozemail.com.au>
* sysdeps/powerpc/dl-machine.c: Handle shared library profiling.
* elf/rtld.c (dl_main): Don't call malloc() between
re-relocating the dynamic linker and running the application's crt0.
1999-07-21 Paul D. Smith <psmith@gnu.org>
* sysdeps/generic/glob.c: Move getlogin{,_r} prototypes below
glob.h to get __P() macro.
* posix/fnmatch.c (internal_fnmatch): Use K&R definition syntax,
not ANSI.
(__strchrnul): This won't exist outside GLIBC, so create one.
1999-07-25 Jakub Jelinek <jj@ultra.linux.cz>
* sysdeps/unix/sysv/linux/sparc/bits/types.h: Always define __qaddr_t.
__ino64_t should be 32bit unsigned type on sparc32.
Define __off64_t to __quad_t instead of __int64_t.
Make __pic_pid_t unsigned on sparc32.
1999-07-25 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* localedata/tst-rpmatch.sh: Use "&" instead of "§" to avoid a bug
in bash 2.03.
1999-07-25 Ulrich Drepper <drepper@cygnus.com>