Age | Commit message (Collapse) | Author |
|
Conflicts:
hurd/hurdsocket.h
sysdeps/mach/hurd/errno-loc.c
|
|
'refs/remotes/savannah/top-bases/tschwinge/Roger_Whittaker' into refs/top-bases/tschwinge/Roger_Whittaker
Conflicts:
Versions.def
|
|
to handle EX->SH atomically, and not only SH->EX
|
|
|
|
[BZ 15846] As discussed in the recent thread on my $EXEC_ORIGIN patch
and in BZ 15846, getauxval() presently has no unambiguous way of
reporting an error condition. It currently returns zero on error, but
this may also be a valid result for some auxv entries. As there is no
clear invalid result for all current and future auxv entries, this patch
sets errno (following a suggestion in the BZ entry).
This version of the patch also adds documentation and tests for the
value-not-found conditions in getauxval().
|
|
|
|
Use the __gnu_inline__ attribute in _FORTIFY_SOURCE's __extern_always_inline
macro whenever the compiler supports it. Previously this macro only included
the __gnu_inline__ attribute in C++ mode for gcc >= 4.3. However,
__gnu_inline__ semantics are always desired for the __extern_always_inline
functions, and are available in g++ 4.2 (and some releases of g++ 4.1, and
also in Clang, which claims to be g++ 4.2).
This change stops g++-4.2 from emitting weak definitions for the fortify
wrapper functions if they can't be inlined, and also improves Clang
compatibility.
|
|
Since we want to use this in installed headers, move it to the installed
sys/cdefs.h. This requires a slight tweaking of the name (add trailing
underscores).
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[BZ #14188]
This fixes compilation of programs using pthread_cleanup_push built
with non-gcc compilers and older gcc compilers.
|
|
* misc/sys/auxv.h: Include <sys/cdefs.h>.
(getauxval): Use unsigned long int.
|
|
|
|
|
|
|
|
No more __const.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
As reported in http://bugzilla.redhat.com/533063 , preadv/pwritev prototypes
are wrong on 32-bit arches with -D_FILE_OFFSET_BITS=64 and as I've just
found, fallocate is wrong too.
The problem is that only off_t is remapped to the 64-bit type transparently,
__off_t is not.
|
|
gcc 4.4 is more picky. And the x86-64 version of <bits/select.h>
contained a now unnecessary asm optimization. Remove it.
|
|
* sysdeps/unix/sysv/linux/pwritev.c: Likewise.
2009-04-23 Jakub Jelinek <jakub@redhat.com>
* sysdeps/posix/pwritev.c (PWRITEV): Fix up comment. Copy
data from vector to temporary buffer and call PWRITEV after it
instead of vice versa.
* sysdeps/posix/preadv.c: Fix up comment.
* misc/preadv.c: Likewise.
* misc/preadv64.c: Likewise.
* misc/pwritev.c: Likewise.
* misc/pwritev64.c: Likewise.
* misc/sys/uio.h (preadv, pwritev, preadv64, pwritev64): Likewise.
2009-04-23 Ulrich Drepper <drepper@redhat.com>
|
|
* misc/Versions: Export preadv, preadv64, pwritev, pwritev64 for
GLIBC_2.10.
* misc/sys/uio.h: Declare preadv, preadv64, pwritev, pwritev64.
* sysdeps/unix/sysv/linux/kernel-features.h: Add entries for preadv
and pwritev.
* misc/preadv.c: New file.
* misc/preadv64.c: New file.
* misc/pwritev.c: New file.
* misc/pwritev64.c: New file.
* sysdeps/posx/preadv.c: New file.
* sysdeps/posx/preadv64.c: New file.
* sysdeps/posx/pwritev.c: New file.
* sysdeps/posx/pwritev64.c: New file.
* sysdeps/unix/sysv/linux/preadv.c: New file.
* sysdeps/unix/sysv/linux/preadv64.c: New file.
* sysdeps/unix/sysv/linux/pwritev.c: New file.
* sysdeps/unix/sysv/linux/pwritev64.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/preadv64.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/pwritev64.c: New file.
|
|
attribute also for non-C99 inline semantics variant.
2009-03-02 Richard Guenther <rguenther@suse.de>
* misc/sys/cdefs.h (__extern_always_inline): Add __artificial__
attribute also for non-C99 inline semantics variant.
|
|
* misc/sys/queue.h: Add STAILQ_CONCAT and TAILQ_CONCAT definitions.
Patch by Roy Marples <roy@marples.name>.
|
|
* wcsmbs/bits/wchar2.h (__swprintf_alias, __vswprintf_alias): Use
__REDIRECT_NTH_LDBL macro rather than __REDIRECT_NTH.
|
|
* misc/sys/cdefs.h (__extern_always_inline): For GCC 4.3+
add __artificial__ attribute.
|
|
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.
|
|
|
|
modifier. Patch by Jakub Jelinek.
|
|
* rt/Makefile (headers): Add bits/mqueue2.h.
* rt/mqueue.h: Include bits/mqueue2.h if -D_FORTIFY_SOURCE=2,
optimizing with GCC and __va_arg_pack_len is defined.
* rt/bits/mqueue2.h: New file.
* rt/mq_open.c (__mq_open): Renamed from mq_open.
(mq_open): New strong_alias.
(__mq_open_2): New function.
* sysdeps/unix/sysv/linux/mq_open.c (__mq_open): Renamed from mq_open.
(mq_open): New strong_alias.
(__mq_open_2): New function.
* debug/Versions (libc): Export __fortify_fail@@GLIBC_PRIVATE.
* Versions.def (librt): Add GLIBC_2.7 version.
* debug/fortify_fail.c (__fortify_fail): Add libc_hidden_def.
* include/stdio.h (__fortify_fail): Add libc_hidden_proto.
* misc/sys/cdefs.h (__errordecl, __va_arg_pack_len): Define.
* io/fcntl.h: Include bits/fcntl2.h when __va_arg_pack_len
is defined rather than when not C++.
* io/bits/fcntl2.h (__open_alias, __open64_alias, __openat_alias,
__openat64_alias): New redirects.
(__open_too_many_args, __open_missing_mode, __open64_too_many_args,
__open64_missing_mode, __openat_too_many_args, __openat_missing_mode,
__openat64_too_many_args, __openat64_missing_mode): New __errordecls.
(open, open64, openat, openat64): Rewrite as __extern_always_inline
functions instead of function-like macros.
|
|
* 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.
|
|
* 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.
|
|
..
[BZ #3189, #3188]
(mremap): Likewise.
|
|
2006-09-09 Ulrich Drepper <drepper@redhat.com>
[BZ #3189]
* misc/sys/mman.h (remap_file_pages): Make available for _GNU_SOURCE.
|
|
|
|
2006-05-01 Ulrich Drepper <drepper@redhat.com>
[BZ #2517]
* misc/sys/queue.h: Update to more recent version.
|
|
* sysdeps/unix/sysv/linux/i386/fchownat.c: Diddle code so that "fail"
label is always used.
[BZ #2172]
* bits/syslog-path.h: New file.
* misc/Makefile (headers): Add it.
* misc/sys/syslog.h: Include it.
(_PATH_LOG): Macro removed.
From Robert Millan <robertmh@gnu.org>.
|
|
(NLDBL_DECL): Rewritten.
Remove __THROW from NLDBL_DECL uses.
Use NLDBL_DECL for __vstrfmon, __vstrfmon_l.
* sysdeps/ieee754/ldbl-opt/nldbl-asinh.c: Restore attribute_hidden.
2006-01-14 Jakub Jelinek <jakub@redhat.com>
* misc/sys/cdefs.h (__LDBL_REDIR1_DECL): Define.
(__LDBL_REDIR_DECL): Stringize __nldbl and name.
* stdlib/bits/monetary-ldbl.h: Remove pastos from wchar-ldbl.h.
(strfmon, strfmon_l): Add __LDBL_REDIR_DECL.
* stdlib/bits/stdlib-ldbl.h (strtold, strtold_l, __strtold_internal,
qecvt, qfcvt, qgcvt, qecvt_r, qfcvt_r): Use __LDBL_REDIR1_DECL
instead of __LDBL_REDIR_DECL.
* wcsmbs/bits/wchar-ldbl.h: Remove stale #if.
(__LDBL_REDIR_WCHAR): Remove.
(fwprintf, wprintf, swprintf, vfwprintf, vwprintf, vswprintf,
fwscanf, wscanf, swscanf, vfwscanf, vwscanf, vswscanf): Use
__LDBL_REDIR_DECL instead of __LDBL_REDIR_WCHAR.
(wcstold, wcstold_l, __wcstold_internal): Add __LDBL_REDIR1_DECL.
* wcsmbs/wchar.h: Include bits/wchar-ldbl.h after bits/wchar2.h
instead of before it.
(wcstold inline): Move #ifndef __LDBL_COMPAT before
extern keyword.
* libio/bits/stdio-ldbl.h (__snprintf_chk, __vsnprintf_chk): Add
__LDBL_REDIR_DECL.
* misc/bits/syslog-ldbl.h (vsyslog): Protect with #ifdef __USE_BSD.
(__syslog_chk, __vsyslog_chk): Add __LDBL_REDIR_DECL.
2006-01-14 Roland McGrath <roland@redhat.com>
|