diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-09-18 19:57:24 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2007-09-18 19:57:24 +0000 |
commit | 7913ba4d91b848ec4e5698c59d43198a3ef9215d (patch) | |
tree | afc73f6e0376ae6d07526c5efa9e941641ce1f6d /sysdeps | |
parent | cedf9b89dd3b436ff7fad4c75d3f288ee4cd4ecd (diff) | |
download | glibc-7913ba4d91b848ec4e5698c59d43198a3ef9215d.tar glibc-7913ba4d91b848ec4e5698c59d43198a3ef9215d.tar.gz glibc-7913ba4d91b848ec4e5698c59d43198a3ef9215d.tar.bz2 glibc-7913ba4d91b848ec4e5698c59d43198a3ef9215d.zip |
Updated to fedora-glibc-20070918T1931cvs/fedora-glibc-2_6_90-14
Diffstat (limited to 'sysdeps')
47 files changed, 431 insertions, 100 deletions
diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h index 250171eeb4..5378a181c6 100644 --- a/sysdeps/alpha/fpu/bits/mathinline.h +++ b/sysdeps/alpha/fpu/bits/mathinline.h @@ -23,7 +23,7 @@ # error "Never use <bits/mathinline.h> directly; include <math.h> instead." #endif -#ifdef __cplusplus +#ifndef __extern_inline # define __MATH_INLINE __inline #else # define __MATH_INLINE __extern_inline diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index aefd105f0a..147bffb96f 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -845,7 +845,9 @@ enum DL_LOOKUP_ADD_DEPENDENCY = 1, /* Return most recent version instead of default version for unversioned lookup. */ - DL_LOOKUP_RETURN_NEWEST = 2 + DL_LOOKUP_RETURN_NEWEST = 2, + /* Set if dl_lookup* called with GSCOPE lock held. */ + DL_LOOKUP_GSCOPE_LOCK = 4, }; /* Lookup versioned symbol. */ diff --git a/sysdeps/i386/fpu/bits/mathinline.h b/sysdeps/i386/fpu/bits/mathinline.h index a0f630e240..a786cc69cd 100644 --- a/sysdeps/i386/fpu/bits/mathinline.h +++ b/sysdeps/i386/fpu/bits/mathinline.h @@ -23,7 +23,7 @@ # error "Never use <bits/mathinline.h> directly; include <math.h> instead." #endif -#ifdef __cplusplus +#ifndef __extern_inline # define __MATH_INLINE __inline #else # define __MATH_INLINE __extern_inline diff --git a/sysdeps/i386/i486/bits/string.h b/sysdeps/i386/i486/bits/string.h index 2db9abc9e4..cf5f4847fa 100644 --- a/sysdeps/i386/i486/bits/string.h +++ b/sysdeps/i386/i486/bits/string.h @@ -32,7 +32,7 @@ && defined __GNUC__ && __GNUC__ >= 2 && !__BOUNDED_POINTERS__ #ifndef __STRING_INLINE -# ifdef __cplusplus +# ifndef __extern_inline # define __STRING_INLINE inline # else # define __STRING_INLINE __extern_inline diff --git a/sysdeps/i386/i586/memcpy.S b/sysdeps/i386/i586/memcpy.S index 6ab457fc55..677a7e6204 100644 --- a/sysdeps/i386/i586/memcpy.S +++ b/sysdeps/i386/i586/memcpy.S @@ -35,6 +35,13 @@ #define LEN SRC+PTR_SIZE .text +#if defined PIC && !defined NOT_IN_libc +ENTRY (__memcpy_chk) + movl 12(%esp), %eax + cmpl %eax, 16(%esp) + jb HIDDEN_JUMPTARGET (__chk_fail) +END (__memcpy_chk) +#endif ENTRY (BP_SYM (memcpy)) ENTER diff --git a/sysdeps/i386/i586/mempcpy.S b/sysdeps/i386/i586/mempcpy.S index 0c9520e3b4..f492be7ca0 100644 --- a/sysdeps/i386/i586/mempcpy.S +++ b/sysdeps/i386/i586/mempcpy.S @@ -1,4 +1,5 @@ #define memcpy __mempcpy +#define __memcpy_chk __mempcpy_chk #include <sysdeps/i386/i586/memcpy.S> libc_hidden_def (BP_SYM (__mempcpy)) diff --git a/sysdeps/i386/i586/memset.S b/sysdeps/i386/i586/memset.S index c21e9f7a71..3295b48e71 100644 --- a/sysdeps/i386/i586/memset.S +++ b/sysdeps/i386/i586/memset.S @@ -38,6 +38,13 @@ #endif .text +#if defined PIC && !defined NOT_IN_libc && !BZERO_P +ENTRY (__memset_chk) + movl 12(%esp), %eax + cmpl %eax, 16(%esp) + jb HIDDEN_JUMPTARGET (__chk_fail) +END (__memset_chk) +#endif ENTRY (BP_SYM (memset)) ENTER diff --git a/sysdeps/ia64/fpu/bits/mathinline.h b/sysdeps/ia64/fpu/bits/mathinline.h index 1e90257182..cd90b06d3a 100644 --- a/sysdeps/ia64/fpu/bits/mathinline.h +++ b/sysdeps/ia64/fpu/bits/mathinline.h @@ -21,7 +21,7 @@ # error "Never use <bits/mathinline.h> directly; include <math.h> instead." #endif -#ifdef __cplusplus +#ifndef __extern_inline # define __MATH_INLINE __inline #else # define __MATH_INLINE __extern_inline diff --git a/sysdeps/ieee754/ldbl-opt/Makefile b/sysdeps/ieee754/ldbl-opt/Makefile index 7f7bc3ce33..ce2d2d5d1d 100644 --- a/sysdeps/ieee754/ldbl-opt/Makefile +++ b/sysdeps/ieee754/ldbl-opt/Makefile @@ -35,7 +35,11 @@ libnldbl-calls = asprintf dprintf fprintf fscanf fwprintf fwscanf iovfscanf \ jn yn ilogb remquo lrint lround llrint llround nexttowardf \ nexttoward conj cacos cacosh casin catan catanh ccos ccosh \ casinh cexp clog cproj csin csinh csqrt ctan ctanh cpow \ - cabs carg cimag creal clog10 + cabs carg cimag creal clog10 \ + isoc99_scanf isoc99_fscanf isoc99_sscanf \ + isoc99_vscanf isoc99_vfscanf isoc99_vsscanf \ + isoc99_wscanf isoc99_fwscanf isoc99_swscanf \ + isoc99_vwscanf isoc99_vfwscanf isoc99_vswscanf libnldbl-routines = $(libnldbl-calls:%=nldbl-%) libnldbl-inhibit-o = $(object-suffixes) libnldbl-static-only-routines = $(libnldbl-routines) diff --git a/sysdeps/ieee754/ldbl-opt/Versions b/sysdeps/ieee754/ldbl-opt/Versions index d22b18ec89..74fb3383ab 100644 --- a/sysdeps/ieee754/ldbl-opt/Versions +++ b/sysdeps/ieee754/ldbl-opt/Versions @@ -65,6 +65,14 @@ libc { __nldbl___swprintf_chk; __nldbl___vswprintf_chk; __nldbl___fwprintf_chk; __nldbl___wprintf_chk; __nldbl___vfwprintf_chk; __nldbl___vwprintf_chk; } + GLIBC_2.7 { + __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; + } } libm { NLDBL_VERSION { diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-compat.c b/sysdeps/ieee754/ldbl-opt/nldbl-compat.c index f82c5f60bb..b87f3bc476 100644 --- a/sysdeps/ieee754/ldbl-opt/nldbl-compat.c +++ b/sysdeps/ieee754/ldbl-opt/nldbl-compat.c @@ -1,5 +1,5 @@ /* *printf* family compatibility routines for IEEE double as long double - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@cygnus.com>, 2006. @@ -50,6 +50,10 @@ libc_hidden_proto (__nldbl___vsprintf_chk) libc_hidden_proto (__nldbl___vswprintf_chk) libc_hidden_proto (__nldbl___vstrfmon) libc_hidden_proto (__nldbl___vstrfmon_l) +libc_hidden_proto (__nldbl___isoc99_vsscanf) +libc_hidden_proto (__nldbl___isoc99_vfscanf) +libc_hidden_proto (__nldbl___isoc99_vswscanf) +libc_hidden_proto (__nldbl___isoc99_vfwscanf) static void __nldbl_cleanup (void *arg) @@ -782,6 +786,153 @@ __nldbl_vsyslog (int pri, const char *fmt, va_list ap) __nldbl___vsyslog_chk (pri, -1, fmt, ap); } +int +attribute_compat_text_section +__nldbl___isoc99_vfscanf (FILE *s, const char *fmt, va_list ap) +{ + int res; + set_no_long_double (); + res = __isoc99_vfscanf (s, fmt, ap); + clear_no_long_double (); + return res; +} +libc_hidden_def (__nldbl___isoc99_vfscanf) + +int +attribute_compat_text_section +__nldbl___isoc99_sscanf (const char *s, const char *fmt, ...) +{ + va_list arg; + int done; + + va_start (arg, fmt); + done = __nldbl___isoc99_vsscanf (s, fmt, arg); + va_end (arg); + + return done; +} + +int +attribute_compat_text_section +__nldbl___isoc99_vsscanf (const char *string, const char *fmt, va_list ap) +{ + int res; + __no_long_double = 1; + res = __isoc99_vsscanf (string, fmt, ap); + __no_long_double = 0; + return res; +} +libc_hidden_def (__nldbl___isoc99_vsscanf) + +int +attribute_compat_text_section +__nldbl___isoc99_vscanf (const char *fmt, va_list ap) +{ + return __nldbl___isoc99_vfscanf (stdin, fmt, ap); +} + +int +attribute_compat_text_section +__nldbl___isoc99_fscanf (FILE *stream, const char *fmt, ...) +{ + va_list arg; + int done; + + va_start (arg, fmt); + done = __nldbl___isoc99_vfscanf (stream, fmt, arg); + va_end (arg); + + return done; +} + +int +attribute_compat_text_section +__nldbl___isoc99_scanf (const char *fmt, ...) +{ + va_list arg; + int done; + + va_start (arg, fmt); + done = __nldbl___isoc99_vfscanf (stdin, fmt, arg); + va_end (arg); + + return done; +} + +int +attribute_compat_text_section +__nldbl___isoc99_vfwscanf (FILE *s, const wchar_t *fmt, va_list ap) +{ + int res; + set_no_long_double (); + res = __isoc99_vfwscanf (s, fmt, ap); + clear_no_long_double (); + return res; +} +libc_hidden_def (__nldbl___isoc99_vfwscanf) + +int +attribute_compat_text_section +__nldbl___isoc99_swscanf (const wchar_t *s, const wchar_t *fmt, ...) +{ + va_list arg; + int done; + + va_start (arg, fmt); + done = __nldbl___isoc99_vswscanf (s, fmt, arg); + va_end (arg); + + return done; +} + +int +attribute_compat_text_section +__nldbl___isoc99_vswscanf (const wchar_t *string, const wchar_t *fmt, + va_list ap) +{ + int res; + __no_long_double = 1; + res = __isoc99_vswscanf (string, fmt, ap); + __no_long_double = 0; + return res; +} +libc_hidden_def (__nldbl___isoc99_vswscanf) + +int +attribute_compat_text_section +__nldbl___isoc99_vwscanf (const wchar_t *fmt, va_list ap) +{ + return __nldbl___isoc99_vfwscanf (stdin, fmt, ap); +} + +int +attribute_compat_text_section +__nldbl___isoc99_fwscanf (FILE *stream, const wchar_t *fmt, ...) +{ + va_list arg; + int done; + + va_start (arg, fmt); + done = __nldbl___isoc99_vfwscanf (stream, fmt, arg); + va_end (arg); + + return done; +} + +int +attribute_compat_text_section +__nldbl___isoc99_wscanf (const wchar_t *fmt, ...) +{ + va_list arg; + int done; + + va_start (arg, fmt); + done = __nldbl___isoc99_vfwscanf (stdin, fmt, arg); + va_end (arg); + + return done; +} + #if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0) compat_symbol (libc, __nldbl__IO_printf, _IO_printf, GLIBC_2_0); compat_symbol (libc, __nldbl__IO_sprintf, _IO_sprintf, GLIBC_2_0); diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-compat.h b/sysdeps/ieee754/ldbl-opt/nldbl-compat.h index c0461000f0..c7824583d6 100644 --- a/sysdeps/ieee754/ldbl-opt/nldbl-compat.h +++ b/sysdeps/ieee754/ldbl-opt/nldbl-compat.h @@ -1,5 +1,5 @@ /* Prototypes for compatibility double == long double entry points. - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@cygnus.com>, 2006. @@ -61,6 +61,18 @@ NLDBL_DECL (qecvt); NLDBL_DECL (qfcvt); NLDBL_DECL (qgcvt); NLDBL_DECL (__vstrfmon_l); +NLDBL_DECL (__isoc99_scanf); +NLDBL_DECL (__isoc99_fscanf); +NLDBL_DECL (__isoc99_sscanf); +NLDBL_DECL (__isoc99_vscanf); +NLDBL_DECL (__isoc99_vfscanf); +NLDBL_DECL (__isoc99_vsscanf); +NLDBL_DECL (__isoc99_wscanf); +NLDBL_DECL (__isoc99_fwscanf); +NLDBL_DECL (__isoc99_swscanf); +NLDBL_DECL (__isoc99_vwscanf); +NLDBL_DECL (__isoc99_vfwscanf); +NLDBL_DECL (__isoc99_vswscanf); /* This one does not exist in the normal interface, only __nldbl___vstrfmon really exists. */ diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fscanf.c b/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fscanf.c new file mode 100644 index 0000000000..1d736668a4 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fscanf.c @@ -0,0 +1,15 @@ +#include "nldbl-compat.h" + +int +attribute_hidden +__isoc99_fscanf (FILE *stream, const char *fmt, ...) +{ + va_list arg; + int done; + + va_start (arg, fmt); + done = __nldbl___isoc99_vfscanf (stream, fmt, arg); + va_end (arg); + + return done; +} diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fwscanf.c b/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fwscanf.c new file mode 100644 index 0000000000..dbea1512cf --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fwscanf.c @@ -0,0 +1,15 @@ +#include "nldbl-compat.h" + +int +attribute_hidden +__isoc99_fwscanf (FILE *stream, const wchar_t *fmt, ...) +{ + va_list arg; + int done; + + va_start (arg, fmt); + done = __nldbl___isoc99_vfwscanf (stream, fmt, arg); + va_end (arg); + + return done; +} diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_scanf.c b/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_scanf.c new file mode 100644 index 0000000000..ec2ec53291 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_scanf.c @@ -0,0 +1,15 @@ +#include "nldbl-compat.h" + +int +attribute_hidden +__isoc99_scanf (const char *fmt, ...) +{ + va_list arg; + int done; + + va_start (arg, fmt); + done = __nldbl___isoc99_vfscanf (stdin, fmt, arg); + va_end (arg); + + return done; +} diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_sscanf.c b/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_sscanf.c new file mode 100644 index 0000000000..52e1bd5d2a --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_sscanf.c @@ -0,0 +1,15 @@ +#include "nldbl-compat.h" + +int +attribute_hidden +__isoc99_sscanf (const char *s, const char *fmt, ...) +{ + va_list arg; + int done; + + va_start (arg, fmt); + done = __nldbl___isoc99_vsscanf (s, fmt, arg); + va_end (arg); + + return done; +} diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_swscanf.c b/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_swscanf.c new file mode 100644 index 0000000000..927d024923 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_swscanf.c @@ -0,0 +1,15 @@ +#include "nldbl-compat.h" + +int +attribute_hidden +__isoc99_swscanf (const wchar_t *s, const wchar_t *fmt, ...) +{ + va_list arg; + int done; + + va_start (arg, fmt); + done = __nldbl___isoc99_vswscanf (s, fmt, arg); + va_end (arg); + + return done; +} diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfscanf.c b/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfscanf.c new file mode 100644 index 0000000000..55556c375c --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfscanf.c @@ -0,0 +1,8 @@ +#include "nldbl-compat.h" + +int +attribute_hidden +__isoc99_vfscanf (FILE *s, const char *fmt, va_list ap) +{ + return __nldbl___isoc99_vfscanf (s, fmt, ap); +} diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfwscanf.c b/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfwscanf.c new file mode 100644 index 0000000000..4fd54cb176 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfwscanf.c @@ -0,0 +1,8 @@ +#include "nldbl-compat.h" + +int +attribute_hidden +__isoc99_vfwscanf (FILE *s, const wchar_t *fmt, va_list ap) +{ + return __nldbl___isoc99_vfwscanf (s, fmt, ap); +} diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vscanf.c b/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vscanf.c new file mode 100644 index 0000000000..6284c9339b --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vscanf.c @@ -0,0 +1,8 @@ +#include "nldbl-compat.h" + +int +attribute_hidden +__isoc99_vscanf (const char *fmt, va_list ap) +{ + return __nldbl___isoc99_vfscanf (stdin, fmt, ap); +} diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vsscanf.c b/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vsscanf.c new file mode 100644 index 0000000000..0c19032b15 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vsscanf.c @@ -0,0 +1,8 @@ +#include "nldbl-compat.h" + +int +attribute_hidden +__isoc99_vsscanf (const char *string, const char *fmt, va_list ap) +{ + return __nldbl___isoc99_vsscanf (string, fmt, ap); +} diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vswscanf.c b/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vswscanf.c new file mode 100644 index 0000000000..5f34221b62 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vswscanf.c @@ -0,0 +1,8 @@ +#include "nldbl-compat.h" + +int +attribute_hidden +__isoc99_vswscanf (const wchar_t *string, const wchar_t *fmt, va_list ap) +{ + return __nldbl___isoc99_vswscanf (string, fmt, ap); +} diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vwscanf.c b/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vwscanf.c new file mode 100644 index 0000000000..a8a76ff54b --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vwscanf.c @@ -0,0 +1,8 @@ +#include "nldbl-compat.h" + +int +attribute_hidden +__isoc99_vwscanf (const wchar_t *fmt, va_list ap) +{ + return __nldbl___isoc99_vfwscanf (stdin, fmt, ap); +} diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_wscanf.c b/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_wscanf.c new file mode 100644 index 0000000000..fc2f6f8598 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_wscanf.c @@ -0,0 +1,15 @@ +#include "nldbl-compat.h" + +int +attribute_hidden +__isoc99_wscanf (const wchar_t *fmt, ...) +{ + va_list arg; + int done; + + va_start (arg, fmt); + done = __nldbl___isoc99_vfwscanf (stdin, fmt, arg); + va_end (arg); + + return done; +} diff --git a/sysdeps/mach/hurd/bits/ioctls.h b/sysdeps/mach/hurd/bits/ioctls.h index 9e0b18e451..c9d313519c 100644 --- a/sysdeps/mach/hurd/bits/ioctls.h +++ b/sysdeps/mach/hurd/bits/ioctls.h @@ -295,6 +295,7 @@ enum __ioctl_datum { IOC_8, IOC_16, IOC_32, IOC_64 }; #define TAB0 0x00000000 #define TAB1 0x00000400 /* tty 37 */ #define TAB2 0x00000800 +#define TAB3 0x00000c00 #define XTABS 0x00000c00 /* expand tabs on output */ #define CRDLY 0x00003000 /* \r delay */ #define CRDELAY CRDLY /* traditional BSD name */ diff --git a/sysdeps/powerpc/fpu/bits/mathinline.h b/sysdeps/powerpc/fpu/bits/mathinline.h index 6c01fa436c..4d4612dac0 100644 --- a/sysdeps/powerpc/fpu/bits/mathinline.h +++ b/sysdeps/powerpc/fpu/bits/mathinline.h @@ -22,7 +22,7 @@ # error "Never use <bits/mathinline.h> directly; include <math.h> instead." #endif -#ifdef __cplusplus +#ifndef __extern_inline # define __MATH_INLINE __inline #else # define __MATH_INLINE __extern_inline diff --git a/sysdeps/s390/bits/string.h b/sysdeps/s390/bits/string.h index e16c7cb829..87550c5f67 100644 --- a/sysdeps/s390/bits/string.h +++ b/sysdeps/s390/bits/string.h @@ -31,7 +31,7 @@ && defined __GNUC__ && __GNUC__ >= 2 #ifndef __STRING_INLINE -# ifdef __cplusplus +# ifndef __extern_inline # define __STRING_INLINE inline # else # define __STRING_INLINE __extern_inline diff --git a/sysdeps/s390/fpu/bits/mathinline.h b/sysdeps/s390/fpu/bits/mathinline.h index 06a6368450..03af01c2b1 100644 --- a/sysdeps/s390/fpu/bits/mathinline.h +++ b/sysdeps/s390/fpu/bits/mathinline.h @@ -21,7 +21,7 @@ # error "Never use <bits/mathinline.h> directly; include <math.h> instead." #endif -#ifdef __cplusplus +#ifndef __extern_inline # define __MATH_INLINE __inline #else # define __MATH_INLINE __extern_inline diff --git a/sysdeps/sparc/fpu/bits/mathinline.h b/sysdeps/sparc/fpu/bits/mathinline.h index 16ad22e666..d3ff44c5a9 100644 --- a/sysdeps/sparc/fpu/bits/mathinline.h +++ b/sysdeps/sparc/fpu/bits/mathinline.h @@ -128,7 +128,7 @@ #if (!defined __NO_MATH_INLINES || defined __LIBC_INTERNAL_MATH_INLINES) && defined __OPTIMIZE__ -# ifdef __cplusplus +# ifndef __extern_inline # define __MATH_INLINE __inline # else # define __MATH_INLINE __extern_inline diff --git a/sysdeps/sparc/sparc32/elf/start.S b/sysdeps/sparc/sparc32/elf/start.S index 702dd755e6..85adb7322f 100644 --- a/sysdeps/sparc/sparc32/elf/start.S +++ b/sysdeps/sparc/sparc32/elf/start.S @@ -1,5 +1,5 @@ /* Startup code for elf32-sparc - Copyright (C) 1997, 1998, 2002, 2004 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2002, 2004, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson <richard@gnu.ai.mit.edu>, 1997. @@ -48,8 +48,6 @@ .global _start .type _start,#function _start: - cfi_startproc - #ifdef SHARED sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %l7 call .LLGETPC0 @@ -60,7 +58,6 @@ _start: drop their arguments. */ mov %g0, %fp sub %sp, 6*4, %sp - cfi_adjust_cfa_offset(6*4) /* Extract the arguments and environment as encoded on the stack. The argument info starts after one register window (16 words) past the SP. */ @@ -93,8 +90,6 @@ _start: /* Die very horribly if exit returns. */ unimp - cfi_endproc - .size _start, .-_start /* Define a symbol for the first piece of initialized data. */ diff --git a/sysdeps/sparc/sparc64/elf/start.S b/sysdeps/sparc/sparc64/elf/start.S index df44cae068..650d3d3048 100644 --- a/sysdeps/sparc/sparc64/elf/start.S +++ b/sysdeps/sparc/sparc64/elf/start.S @@ -1,5 +1,5 @@ /* Startup code for elf64-sparc - Copyright (C) 1997, 1998, 2002, 2004 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2002, 2004, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson <richard@gnu.ai.mit.edu>, 1997. @@ -48,8 +48,6 @@ .global _start .type _start,#function _start: - cfi_startproc - #ifdef SHARED sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %l7 call .LLGETPC0 @@ -60,7 +58,6 @@ _start: drop their arguments. */ mov %g0, %fp sub %sp, 6*8, %sp - cfi_adjust_cfa_offset(6*8) /* Extract the arguments and environment as encoded on the stack. The argument info starts after one register window (16 words) past the SP, @@ -94,8 +91,6 @@ _start: /* Die very horribly if exit returns. */ illtrap 0 - cfi_endproc - .size _start, .-_start /* Define a symbol for the first piece of initialized data. */ diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index b4f49cf633..7c93183ad4 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -213,17 +213,17 @@ extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, /* Splice address range into a pipe. */ -extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count, - unsigned int __flags); +extern ssize_t vmsplice (int __fdout, const struct iovec *__iov, + size_t __count, unsigned int __flags); /* Splice two files together. */ -extern int splice (int __fdin, __off64_t *__offin, int __fdout, - __off64_t *__offout, size_t __len, unsigned int __flags) - __THROW; +extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout, + __off64_t *__offout, size_t __len, + unsigned int __flags); /* In-kernel implementation of tee for pipe buffers. */ -extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags) - __THROW; +extern ssize_t tee (int __fdin, int __fdout, size_t __len, + unsigned int __flags); #endif diff --git a/sysdeps/unix/sysv/linux/check_pf.c b/sysdeps/unix/sysv/linux/check_pf.c index fbe805bf3b..06fb1891f0 100644 --- a/sysdeps/unix/sysv/linux/check_pf.c +++ b/sysdeps/unix/sysv/linux/check_pf.c @@ -38,6 +38,9 @@ #ifndef IFA_F_HOMEADDRESS # define IFA_F_HOMEADDRESS 0 #endif +#ifndef IFA_F_OPTIMISTIC +# define IFA_F_OPTIMISTIC 0 +#endif static int @@ -200,10 +203,13 @@ make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6, if (ifam->ifa_flags & (IFA_F_DEPRECATED | IFA_F_TEMPORARY - | IFA_F_HOMEADDRESS)) + | IFA_F_HOMEADDRESS + | IFA_F_OPTIMISTIC)) { struct in6ailist *newp = alloca (sizeof (*newp)); - newp->info.flags = (((ifam->ifa_flags & IFA_F_DEPRECATED) + newp->info.flags = (((ifam->ifa_flags + & (IFA_F_DEPRECATED + | IFA_F_OPTIMISTIC)) ? in6ai_deprecated : 0) | ((ifam->ifa_flags & IFA_F_TEMPORARY) diff --git a/sysdeps/unix/sysv/linux/dl-osinfo.h b/sysdeps/unix/sysv/linux/dl-osinfo.h index 86c593ee2b..f0600283b6 100644 --- a/sysdeps/unix/sysv/linux/dl-osinfo.h +++ b/sysdeps/unix/sysv/linux/dl-osinfo.h @@ -124,7 +124,7 @@ _dl_discover_osversion (void) version <<= 8; version |= here; - if (*cp++ != '.') + if (*cp++ != '.' || parts == 3) /* Another part following? */ break; } diff --git a/sysdeps/unix/sysv/linux/i386/bits/fcntl.h b/sysdeps/unix/sysv/linux/i386/bits/fcntl.h index 83ca3c2861..1ad51ad6b0 100644 --- a/sysdeps/unix/sysv/linux/i386/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/i386/bits/fcntl.h @@ -221,17 +221,17 @@ extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, /* Splice address range into a pipe. */ -extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count, - unsigned int __flags); +extern ssize_t vmsplice (int __fdout, const struct iovec *__iov, + size_t __count, unsigned int __flags); /* Splice two files together. */ -extern int splice (int __fdin, __off64_t *__offin, int __fdout, - __off64_t *__offout, size_t __len, unsigned int __flags) - __THROW; +extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout, + __off64_t *__offout, size_t __len, + unsigned int __flags); /* In-kernel implementation of tee for pipe buffers. */ -extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags) - __THROW; +extern ssize_t tee (int __fdin, int __fdout, size_t __len, + unsigned int __flags); #endif diff --git a/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h b/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h index 8fa96e4e26..69bc39f692 100644 --- a/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h @@ -215,17 +215,17 @@ extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, /* Splice address range into a pipe. */ -extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count, - unsigned int __flags); +extern ssize_t vmsplice (int __fdout, const struct iovec *__iov, + size_t __count, unsigned int __flags); /* Splice two files together. */ -extern int splice (int __fdin, __off64_t *__offin, int __fdout, - __off64_t *__offout, size_t __len, unsigned int __flags) - __THROW; +extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout, + __off64_t *__offout, size_t __len, + unsigned int __flags); /* In-kernel implementation of tee for pipe buffers. */ -extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags) - __THROW; +extern ssize_t tee (int __fdin, int __fdout, size_t __len, + unsigned int __flags); #endif diff --git a/sysdeps/unix/sysv/linux/mq_open.c b/sysdeps/unix/sysv/linux/mq_open.c index eac6e01238..6330fee4e7 100644 --- a/sysdeps/unix/sysv/linux/mq_open.c +++ b/sysdeps/unix/sysv/linux/mq_open.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,6 +20,7 @@ #include <mqueue.h> #include <stdarg.h> #include <stddef.h> +#include <stdio.h> #include <sysdep.h> #ifdef __NR_mq_open @@ -32,7 +33,7 @@ attributes. If the fourth argument is NULL, default attributes are used. */ mqd_t -mq_open (const char *name, int oflag, ...) +__mq_open (const char *name, int oflag, ...) { if (name[0] != '/') { @@ -54,7 +55,16 @@ mq_open (const char *name, int oflag, ...) return INLINE_SYSCALL (mq_open, 4, name + 1, oflag, mode, attr); } +strong_alias (__mq_open, mq_open); +mqd_t +__mq_open_2 (const char *name, int oflag) +{ + if (oflag & O_CREAT) + __fortify_fail ("invalid mq_open call: O_CREAT without mode and attr"); + + return __mq_open (name, oflag); +} #else # include <rt/mq_open.c> #endif diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h index 68015dbca3..0ad99b5eae 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h @@ -221,17 +221,17 @@ extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, /* Splice address range into a pipe. */ -extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count, - unsigned int __flags); +extern ssize_t vmsplice (int __fdout, const struct iovec *__iov, + size_t __count, unsigned int __flags); /* Splice two files together. */ -extern int splice (int __fdin, __off64_t *__offin, int __fdout, - __off64_t *__offout, size_t __len, unsigned int __flags) - __THROW; +extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout, + __off64_t *__offout, size_t __len, + unsigned int __flags); /* In-kernel implementation of tee for pipe buffers. */ -extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags) - __THROW; +extern ssize_t tee (int __fdin, int __fdout, size_t __len, + unsigned int __flags); #endif diff --git a/sysdeps/unix/sysv/linux/s390/bits/fcntl.h b/sysdeps/unix/sysv/linux/s390/bits/fcntl.h index 848568532f..c26e0e7710 100644 --- a/sysdeps/unix/sysv/linux/s390/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/s390/bits/fcntl.h @@ -241,17 +241,17 @@ extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, /* Splice address range into a pipe. */ -extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count, - unsigned int __flags); +extern ssize_t vmsplice (int __fdout, const struct iovec *__iov, + size_t __count, unsigned int __flags); /* Splice two files together. */ -extern int splice (int __fdin, __off64_t *__offin, int __fdout, - __off64_t *__offout, size_t __len, unsigned int __flags) - __THROW; +extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout, + __off64_t *__offout, size_t __len, + unsigned int __flags); /* In-kernel implementation of tee for pipe buffers. */ -extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags) - __THROW; +extern ssize_t tee (int __fdin, int __fdout, size_t __len, + unsigned int __flags); #endif diff --git a/sysdeps/unix/sysv/linux/sh/bits/fcntl.h b/sysdeps/unix/sysv/linux/sh/bits/fcntl.h index 83ca3c2861..1ad51ad6b0 100644 --- a/sysdeps/unix/sysv/linux/sh/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/sh/bits/fcntl.h @@ -221,17 +221,17 @@ extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, /* Splice address range into a pipe. */ -extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count, - unsigned int __flags); +extern ssize_t vmsplice (int __fdout, const struct iovec *__iov, + size_t __count, unsigned int __flags); /* Splice two files together. */ -extern int splice (int __fdin, __off64_t *__offin, int __fdout, - __off64_t *__offout, size_t __len, unsigned int __flags) - __THROW; +extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout, + __off64_t *__offout, size_t __len, + unsigned int __flags); /* In-kernel implementation of tee for pipe buffers. */ -extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags) - __THROW; +extern ssize_t tee (int __fdin, int __fdout, size_t __len, + unsigned int __flags); #endif diff --git a/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h b/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h index 2307a2353d..ebfeb605ae 100644 --- a/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h @@ -240,17 +240,17 @@ extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, /* Splice address range into a pipe. */ -extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count, - unsigned int __flags); +extern ssize_t vmsplice (int __fdout, const struct iovec *__iov, + size_t __count, unsigned int __flags); /* Splice two files together. */ -extern int splice (int __fdin, __off64_t *__offin, int __fdout, - __off64_t *__offout, size_t __len, unsigned int __flags) - __THROW; +extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout, + __off64_t *__offout, size_t __len, + unsigned int __flags); /* In-kernel implementation of tee for pipe buffers. */ -extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags) - __THROW; +extern ssize_t tee (int __fdin, int __fdout, size_t __len, + unsigned int __flags); #endif diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/clone.S b/sysdeps/unix/sysv/linux/sparc/sparc32/clone.S index a64d8e519b..b623bfb8de 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/clone.S +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/clone.S @@ -82,8 +82,6 @@ END(__clone) .type __thread_start,@function __thread_start: - cfi_startproc - #ifdef RESET_PID sethi %hi(CLONE_THREAD), %l0 andcc %g4, %l0, %g0 @@ -104,8 +102,6 @@ __thread_start: call HIDDEN_JUMPTARGET(_exit),0 nop - cfi_endproc - .size __thread_start, .-__thread_start weak_alias (__clone, clone) diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/clone.S b/sysdeps/unix/sysv/linux/sparc/sparc64/clone.S index 2bbbd80202..9d101e239b 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/clone.S +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/clone.S @@ -78,7 +78,6 @@ END(__clone) .type __thread_start,@function __thread_start: - cfi_startproc #ifdef RESET_PID sethi %hi(CLONE_THREAD), %l0 andcc %g4, %l0, %g0 @@ -97,7 +96,6 @@ __thread_start: mov %g3,%o0 call HIDDEN_JUMPTARGET(_exit),0 nop - cfi_endproc .size __thread_start, .-__thread_start diff --git a/sysdeps/unix/sysv/linux/sys/sysmacros.h b/sysdeps/unix/sysv/linux/sys/sysmacros.h index e59672980e..92b3a19d4f 100644 --- a/sysdeps/unix/sysv/linux/sys/sysmacros.h +++ b/sysdeps/unix/sysv/linux/sys/sysmacros.h @@ -28,17 +28,17 @@ they need. */ #ifdef __GLIBC_HAVE_LONG_LONG __extension__ -__extern_inline unsigned int gnu_dev_major (unsigned long long int __dev) +extern unsigned int gnu_dev_major (unsigned long long int __dev) __THROW; __extension__ -__extern_inline unsigned int gnu_dev_minor (unsigned long long int __dev) +extern unsigned int gnu_dev_minor (unsigned long long int __dev) __THROW; __extension__ -__extern_inline unsigned long long int gnu_dev_makedev (unsigned int __major, - unsigned int __minor) +extern unsigned long long int gnu_dev_makedev (unsigned int __major, + unsigned int __minor) __THROW; -# if defined __GNUC__ && __GNUC__ >= 2 +# if defined __GNUC__ && __GNUC__ >= 2 && defined __USE_EXTERN_INLINES __extension__ __extern_inline unsigned int __NTH (gnu_dev_major (unsigned long long int __dev)) { diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list index 7e5cc70507..e304a78ea8 100644 --- a/sysdeps/unix/sysv/linux/syscalls.list +++ b/sysdeps/unix/sysv/linux/syscalls.list @@ -66,14 +66,14 @@ setfsgid EXTRA setfsgid i:i setfsgid setfsuid EXTRA setfsuid i:i setfsuid setpgid - setpgid i:ii __setpgid setpgid sigaltstack - sigaltstack i:PP __sigaltstack sigaltstack -splice EXTRA splice i:iPiPii splice +splice EXTRA splice Ci:iPiPii splice sysinfo EXTRA sysinfo i:p sysinfo swapon - swapon i:si __swapon swapon swapoff - swapoff i:s __swapoff swapoff -tee EXTRA tee i:iiii tee +tee EXTRA tee Ci:iiii tee unshare EXTRA unshare i:i unshare uselib EXTRA uselib i:s uselib -vmsplice EXTRA vmsplice i:iPii vmsplice +vmsplice EXTRA vmsplice Ci:iPii vmsplice wait4 - wait4 i:iWiP __wait4 wait4 chown - chown i:sii __libc_chown __chown chown diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h b/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h index a918a0725b..f1fd3c4e41 100644 --- a/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h @@ -235,17 +235,17 @@ extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, /* Splice address range into a pipe. */ -extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count, - unsigned int __flags); +extern ssize_t vmsplice (int __fdout, const struct iovec *__iov, + size_t __count, unsigned int __flags); /* Splice two files together. */ -extern int splice (int __fdin, __off64_t *__offin, int __fdout, - __off64_t *__offout, size_t __len, unsigned int __flags) - __THROW; +extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout, + __off64_t *__offout, size_t __len, + unsigned int __flags); /* In-kernel implementation of tee for pipe buffers. */ -extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags) - __THROW; +extern ssize_t tee (int __fdin, int __fdout, size_t __len, + unsigned int __flags); #endif diff --git a/sysdeps/x86_64/fpu/bits/mathinline.h b/sysdeps/x86_64/fpu/bits/mathinline.h index d08a9b033b..e8a919fe92 100644 --- a/sysdeps/x86_64/fpu/bits/mathinline.h +++ b/sysdeps/x86_64/fpu/bits/mathinline.h @@ -22,7 +22,7 @@ # error "Never use <bits/mathinline.h> directly; include <math.h> instead." #endif -#ifdef __cplusplus +#ifndef __extern_inline # define __MATH_INLINE __inline #else # define __MATH_INLINE __extern_inline |