diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-10-09 19:53:22 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-10-09 19:53:22 +0200 |
commit | 4ae2edab603c553a1fddb87f90f662f2ae23cc11 (patch) | |
tree | 7d599ac41df4ec63f7352d8637c46277012ce965 /sysdeps/generic | |
parent | 5cb1a5819a3ab6687d772cccdb507b9812feaa01 (diff) | |
parent | 7bb5f8a836b916d6ebf7b6921b136e99cea2442d (diff) |
Merge commit 'refs/top-bases/t/tls' into t/tls
Diffstat (limited to 'sysdeps/generic')
104 files changed, 678 insertions, 145 deletions
diff --git a/sysdeps/generic/Makefile b/sysdeps/generic/Makefile index ed269f3454..f68ac6893c 100644 --- a/sysdeps/generic/Makefile +++ b/sysdeps/generic/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1992-2015 Free Software Foundation, Inc. +# Copyright (C) 1992-2016 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 diff --git a/sysdeps/generic/_itoa.h b/sysdeps/generic/_itoa.h index 632e24c34f..462cc09529 100644 --- a/sysdeps/generic/_itoa.h +++ b/sysdeps/generic/_itoa.h @@ -1,5 +1,5 @@ /* Internal function for converting integers to ASCII. - Copyright (C) 1994-2015 Free Software Foundation, Inc. + Copyright (C) 1994-2016 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 @@ -42,7 +42,7 @@ Use upper case letters iff UPPER_CASE is nonzero. */ extern char *_itoa (unsigned long long int value, char *buflim, - unsigned int base, int upper_case); + unsigned int base, int upper_case) attribute_hidden; extern const char _itoa_upper_digits[]; extern const char _itoa_lower_digits[]; @@ -53,7 +53,8 @@ hidden_proto (_itoa_lower_digits) #if IS_IN (libc) extern char *_itoa_word (_ITOA_WORD_TYPE value, char *buflim, - unsigned int base, int upper_case); + unsigned int base, + int upper_case) attribute_hidden; #else static inline char * __attribute__ ((unused, always_inline)) _itoa_word (_ITOA_WORD_TYPE value, char *buflim, diff --git a/sysdeps/generic/abort-instr.h b/sysdeps/generic/abort-instr.h index 4ee8609872..7e96e11e7f 100644 --- a/sysdeps/generic/abort-instr.h +++ b/sysdeps/generic/abort-instr.h @@ -1,5 +1,5 @@ /* Magic instruction to crash quickly and reliably. Generic/stub version. - Copyright (C) 2014-2015 Free Software Foundation, Inc. + Copyright (C) 2014-2016 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 diff --git a/sysdeps/generic/aio_misc.h b/sysdeps/generic/aio_misc.h index 49aa08e707..56f872fc48 100644 --- a/sysdeps/generic/aio_misc.h +++ b/sysdeps/generic/aio_misc.h @@ -1,5 +1,5 @@ /* Internal declarations for <aio.h> functions implementation. Stub version. - Copyright (C) 2001-2015 Free Software Foundation, Inc. + Copyright (C) 2001-2016 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 diff --git a/sysdeps/generic/atomic-machine.h b/sysdeps/generic/atomic-machine.h new file mode 100644 index 0000000000..6c04ad54a4 --- /dev/null +++ b/sysdeps/generic/atomic-machine.h @@ -0,0 +1,42 @@ +/* Copyright (C) 2003-2016 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@redhat.com>, 2003. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _ATOMIC_MACHINE_H +#define _ATOMIC_MACHINE_H 1 + +/* We have by default no support for atomic operations. So define + them non-atomic. If this is a problem somebody will have to come + up with real definitions. */ + +/* The only basic operation needed is compare and exchange. */ +#define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \ + ({ __typeof (mem) __gmemp = (mem); \ + __typeof (*mem) __gret = *__gmemp; \ + __typeof (*mem) __gnewval = (newval); \ + \ + if (__gret == (oldval)) \ + *__gmemp = __gnewval; \ + __gret; }) + +#define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \ + ({ __typeof (mem) __gmemp = (mem); \ + __typeof (*mem) __gnewval = (newval); \ + \ + *__gmemp == (oldval) ? (*__gmemp = __gnewval, 0) : 1; }) + +#endif /* atomic-machine.h */ diff --git a/sysdeps/generic/bits/hwcap.h b/sysdeps/generic/bits/hwcap.h index 3912113a02..39839ff27b 100644 --- a/sysdeps/generic/bits/hwcap.h +++ b/sysdeps/generic/bits/hwcap.h @@ -1,5 +1,5 @@ /* Defines for bits in AT_HWCAP. - Copyright (C) 2012-2015 Free Software Foundation, Inc. + Copyright (C) 2012-2016 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 diff --git a/sysdeps/generic/device-nrs.h b/sysdeps/generic/device-nrs.h index 9f36369ac7..236d821c81 100644 --- a/sysdeps/generic/device-nrs.h +++ b/sysdeps/generic/device-nrs.h @@ -1,5 +1,5 @@ /* Device numbers of devices used in the implementation. Generic version. - Copyright (C) 2000-2015 Free Software Foundation, Inc. + Copyright (C) 2000-2016 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 diff --git a/sysdeps/generic/dirstream.h b/sysdeps/generic/dirstream.h index 1524c6ac58..b41bbdc023 100644 --- a/sysdeps/generic/dirstream.h +++ b/sysdeps/generic/dirstream.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1993-2015 Free Software Foundation, Inc. +/* Copyright (C) 1993-2016 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 diff --git a/sysdeps/generic/dl-cache.h b/sysdeps/generic/dl-cache.h index 4b49869c63..eb2f900ae5 100644 --- a/sysdeps/generic/dl-cache.h +++ b/sysdeps/generic/dl-cache.h @@ -1,5 +1,5 @@ /* Support for reading /etc/ld.so.cache files written by Linux ldconfig. - Copyright (C) 1999-2015 Free Software Foundation, Inc. + Copyright (C) 1999-2016 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 @@ -101,4 +101,4 @@ struct cache_file_new & (~(__alignof__ (struct cache_file_new) - 1))) extern int _dl_cache_libcmp (const char *p1, const char *p2) - internal_function; + internal_function attribute_hidden; diff --git a/sysdeps/generic/dl-dtprocnum.h b/sysdeps/generic/dl-dtprocnum.h index a41c594210..35d00529b4 100644 --- a/sysdeps/generic/dl-dtprocnum.h +++ b/sysdeps/generic/dl-dtprocnum.h @@ -1,5 +1,5 @@ /* Configuration of lookup functions. - Copyright (C) 2000-2015 Free Software Foundation, Inc. + Copyright (C) 2000-2016 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 diff --git a/sysdeps/generic/dl-fileid.h b/sysdeps/generic/dl-fileid.h index 2cbd21dcbe..7cfeefaff7 100644 --- a/sysdeps/generic/dl-fileid.h +++ b/sysdeps/generic/dl-fileid.h @@ -1,5 +1,5 @@ /* File identity for the dynamic linker. Stub version. - Copyright (C) 2015 Free Software Foundation, Inc. + Copyright (C) 2015-2016 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 diff --git a/sysdeps/generic/dl-fptr.h b/sysdeps/generic/dl-fptr.h index 3f16e8ea60..df0abba642 100644 --- a/sysdeps/generic/dl-fptr.h +++ b/sysdeps/generic/dl-fptr.h @@ -1,5 +1,5 @@ /* Function descriptors. Generic version. - Copyright (C) 1995-2015 Free Software Foundation, Inc. + Copyright (C) 1995-2016 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 diff --git a/sysdeps/generic/dl-hash.h b/sysdeps/generic/dl-hash.h index 6ee5d1a668..6f2c408a42 100644 --- a/sysdeps/generic/dl-hash.h +++ b/sysdeps/generic/dl-hash.h @@ -1,5 +1,5 @@ /* Compute hash value for given string according to ELF standard. - Copyright (C) 1995-2015 Free Software Foundation, Inc. + Copyright (C) 1995-2016 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 diff --git a/sysdeps/generic/dl-irel.h b/sysdeps/generic/dl-irel.h index 2c3f031779..411943c6a6 100644 --- a/sysdeps/generic/dl-irel.h +++ b/sysdeps/generic/dl-irel.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF indirect relocation inline functions. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 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 diff --git a/sysdeps/generic/dl-librecon.h b/sysdeps/generic/dl-librecon.h index 41952e0bf3..2f617177a7 100644 --- a/sysdeps/generic/dl-librecon.h +++ b/sysdeps/generic/dl-librecon.h @@ -1,5 +1,5 @@ /* Optional code to distinguish library flavours. - Copyright (C) 1998-2015 Free Software Foundation, Inc. + Copyright (C) 1998-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. diff --git a/sysdeps/generic/dl-lookupcfg.h b/sysdeps/generic/dl-lookupcfg.h index a75093eaee..3ac1f46869 100644 --- a/sysdeps/generic/dl-lookupcfg.h +++ b/sysdeps/generic/dl-lookupcfg.h @@ -1,5 +1,5 @@ /* Configuration of lookup functions. - Copyright (C) 2002-2015 Free Software Foundation, Inc. + Copyright (C) 2002-2016 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 diff --git a/sysdeps/generic/dl-machine.h b/sysdeps/generic/dl-machine.h index 0731f37200..041c99e221 100644 --- a/sysdeps/generic/dl-machine.h +++ b/sysdeps/generic/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. Stub version. - Copyright (C) 1995-2015 Free Software Foundation, Inc. + Copyright (C) 1995-2016 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 diff --git a/sysdeps/generic/dl-mman.h b/sysdeps/generic/dl-mman.h new file mode 100644 index 0000000000..66ffdb2e42 --- /dev/null +++ b/sysdeps/generic/dl-mman.h @@ -0,0 +1,22 @@ +/* Functions with hidden attribute internal to ld.so, which are declared + in include/sys/mman.h. Generic version. + Copyright (C) 2015-2016 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +extern __typeof (__mmap) __mmap attribute_hidden; +extern __typeof (__mprotect) __mprotect attribute_hidden; +extern __typeof (__munmap) __munmap attribute_hidden; diff --git a/sysdeps/generic/dl-osinfo.h b/sysdeps/generic/dl-osinfo.h index 53c4ce7d06..2489e7b6d8 100644 --- a/sysdeps/generic/dl-osinfo.h +++ b/sysdeps/generic/dl-osinfo.h @@ -1,5 +1,5 @@ /* Operating system specific code for generic dynamic loader functions. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 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 diff --git a/sysdeps/generic/dl-procinfo.h b/sysdeps/generic/dl-procinfo.h index 66e52dd1ba..578a350627 100644 --- a/sysdeps/generic/dl-procinfo.h +++ b/sysdeps/generic/dl-procinfo.h @@ -1,5 +1,5 @@ /* Stub version of processor capability information handling macros. - Copyright (C) 1998-2015 Free Software Foundation, Inc. + Copyright (C) 1998-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. diff --git a/sysdeps/generic/dl-sysdep.h b/sysdeps/generic/dl-sysdep.h index 3c522ade0b..df36113253 100644 --- a/sysdeps/generic/dl-sysdep.h +++ b/sysdeps/generic/dl-sysdep.h @@ -1,5 +1,5 @@ /* System-specific settings for dynamic linker code. Generic version. - Copyright (C) 2002-2015 Free Software Foundation, Inc. + Copyright (C) 2002-2016 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 diff --git a/sysdeps/generic/dl-unistd.h b/sysdeps/generic/dl-unistd.h new file mode 100644 index 0000000000..df6376e01f --- /dev/null +++ b/sysdeps/generic/dl-unistd.h @@ -0,0 +1,30 @@ +/* Functions with hidden attribute internal to ld.so, which are declared + in include/unistd.h. Generic version. + Copyright (C) 2015-2016 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +extern __typeof (__access) __access attribute_hidden; +extern __typeof (__brk) __brk attribute_hidden; +extern __typeof (__close) __close attribute_hidden; +extern __typeof (__getcwd) __getcwd attribute_hidden; +extern __typeof (__getpid) __getpid attribute_hidden; +extern __typeof (__libc_read) __libc_read attribute_hidden; +extern __typeof (__libc_write) __libc_write attribute_hidden; +extern __typeof (__lseek) __lseek attribute_hidden; +extern __typeof (__profil) __profil attribute_hidden; +extern __typeof (__read) __read attribute_hidden; +extern __typeof (__sbrk) __sbrk attribute_hidden; diff --git a/sysdeps/generic/dwarf2.h b/sysdeps/generic/dwarf2.h index b714c172cf..027a012c0c 100644 --- a/sysdeps/generic/dwarf2.h +++ b/sysdeps/generic/dwarf2.h @@ -1,6 +1,6 @@ /* Declarations and definitions of codes relating to the DWARF2 symbolic debugging information format. - Copyright (C) 1992-2015 Free Software Foundation, Inc. + Copyright (C) 1992-2016 Free Software Foundation, Inc. Contributed by Gary Funck (gary@intrepid.com). Derived from the DWARF 1 implementation written by Ron Guilmette (rfg@monkeys.com). diff --git a/sysdeps/generic/elide.h b/sysdeps/generic/elide.h index 80a3a039aa..39e28924bf 100644 --- a/sysdeps/generic/elide.h +++ b/sysdeps/generic/elide.h @@ -1,5 +1,5 @@ /* elide.h: Fallback noop lock elision support. - Copyright (C) 2014-2015 Free Software Foundation, Inc. + Copyright (C) 2014-2016 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 diff --git a/sysdeps/generic/eloop-threshold.h b/sysdeps/generic/eloop-threshold.h index 00acc43104..9dd2fdd840 100644 --- a/sysdeps/generic/eloop-threshold.h +++ b/sysdeps/generic/eloop-threshold.h @@ -1,5 +1,5 @@ /* Threshold at which to diagnose ELOOP. Generic version. - Copyright (C) 2012-2015 Free Software Foundation, Inc. + Copyright (C) 2012-2016 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 diff --git a/sysdeps/generic/exit-thread.h b/sysdeps/generic/exit-thread.h index 787029a8de..10c5aa4adf 100644 --- a/sysdeps/generic/exit-thread.h +++ b/sysdeps/generic/exit-thread.h @@ -1,5 +1,5 @@ /* Call to terminate the current thread. Stub version. - Copyright (C) 2014-2015 Free Software Foundation, Inc. + Copyright (C) 2014-2016 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 diff --git a/sysdeps/generic/fd_to_filename.h b/sysdeps/generic/fd_to_filename.h index d2c291fe76..61d4a3cec6 100644 --- a/sysdeps/generic/fd_to_filename.h +++ b/sysdeps/generic/fd_to_filename.h @@ -1,5 +1,5 @@ /* Query filename corresponding to an open FD. Generic version. - Copyright (C) 2001-2015 Free Software Foundation, Inc. + Copyright (C) 2001-2016 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 diff --git a/sysdeps/generic/fips-private.h b/sysdeps/generic/fips-private.h index 81cc97705b..25a3e210bf 100644 --- a/sysdeps/generic/fips-private.h +++ b/sysdeps/generic/fips-private.h @@ -1,5 +1,5 @@ /* Dummy implementation of FIPS compliance status test. - Copyright (C) 2012-2015 Free Software Foundation, Inc. + Copyright (C) 2012-2016 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 diff --git a/sysdeps/generic/fix-fp-int-convert-overflow.h b/sysdeps/generic/fix-fp-int-convert-overflow.h new file mode 100644 index 0000000000..fb681147c0 --- /dev/null +++ b/sysdeps/generic/fix-fp-int-convert-overflow.h @@ -0,0 +1,33 @@ +/* Fix for conversion of floating point to integer overflow. Generic version. + Copyright (C) 2015-2016 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef FIX_FP_INT_CONVERT_OVERFLOW_H +#define FIX_FP_INT_CONVERT_OVERFLOW_H 1 + +/* Define these macros to 1 to workaround conversions of out-of-range + floating-point numbers to integer types failing to raise the + "invalid" exception, or raising spurious "inexact" or other + exceptions. */ +#define FIX_FLT_LONG_CONVERT_OVERFLOW 0 +#define FIX_FLT_LLONG_CONVERT_OVERFLOW 0 +#define FIX_DBL_LONG_CONVERT_OVERFLOW 0 +#define FIX_DBL_LLONG_CONVERT_OVERFLOW 0 +#define FIX_LDBL_LONG_CONVERT_OVERFLOW 0 +#define FIX_LDBL_LLONG_CONVERT_OVERFLOW 0 + +#endif /* fix-fp-int-convert-overflow.h */ diff --git a/sysdeps/generic/fix-int-fp-convert-zero.h b/sysdeps/generic/fix-int-fp-convert-zero.h new file mode 100644 index 0000000000..01414aa00a --- /dev/null +++ b/sysdeps/generic/fix-int-fp-convert-zero.h @@ -0,0 +1,27 @@ +/* Fix for conversion of integer 0 to floating point. Generic version. + Copyright (C) 2015-2016 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef FIX_INT_FP_CONVERT_ZERO_H +#define FIX_INT_FP_CONVERT_ZERO_H 1 + +/* Define this macro to 1 to work around conversions of integer 0 to + floating point returning -0 instead of the correct +0 in some + rounding modes. */ +#define FIX_INT_FP_CONVERT_ZERO 0 + +#endif /* fix-int-fp-convert-zero.h */ diff --git a/sysdeps/generic/fpu_control.h b/sysdeps/generic/fpu_control.h index 48e4460983..297288f3a7 100644 --- a/sysdeps/generic/fpu_control.h +++ b/sysdeps/generic/fpu_control.h @@ -1,5 +1,5 @@ /* FPU control word definitions. Stub version. - Copyright (C) 1996-2015 Free Software Foundation, Inc. + Copyright (C) 1996-2016 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 diff --git a/sysdeps/generic/frame.h b/sysdeps/generic/frame.h index 4e9dcd1cd5..958dcc0495 100644 --- a/sysdeps/generic/frame.h +++ b/sysdeps/generic/frame.h @@ -1,5 +1,5 @@ /* Definition of stack frame structure. Generic version. - Copyright (C) 2000-2015 Free Software Foundation, Inc. + Copyright (C) 2000-2016 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 diff --git a/sysdeps/generic/framestate.c b/sysdeps/generic/framestate.c index 8612a1ddc7..2f10ce7559 100644 --- a/sysdeps/generic/framestate.c +++ b/sysdeps/generic/framestate.c @@ -1,5 +1,5 @@ /* __frame_state_for unwinder helper function wrapper. - Copyright (C) 2001-2015 Free Software Foundation, Inc. + Copyright (C) 2001-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2001. diff --git a/sysdeps/generic/gcc-compat.h b/sysdeps/generic/gcc-compat.h index 199f648932..d776614119 100644 --- a/sysdeps/generic/gcc-compat.h +++ b/sysdeps/generic/gcc-compat.h @@ -1,5 +1,5 @@ /* Macros for checking required GCC compatibility. Generic version. - Copyright (C) 2014-2015 Free Software Foundation, Inc. + Copyright (C) 2014-2016 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 diff --git a/sysdeps/generic/gccframe.h b/sysdeps/generic/gccframe.h index 2954b7accb..33c60b0cf3 100644 --- a/sysdeps/generic/gccframe.h +++ b/sysdeps/generic/gccframe.h @@ -1,5 +1,5 @@ /* Definition of object in frame unwind info. Generic version. - Copyright (C) 2000-2015 Free Software Foundation, Inc. + Copyright (C) 2000-2016 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 diff --git a/sysdeps/generic/get-rounding-mode.h b/sysdeps/generic/get-rounding-mode.h index d09bb78a36..4a58e6a5a5 100644 --- a/sysdeps/generic/get-rounding-mode.h +++ b/sysdeps/generic/get-rounding-mode.h @@ -1,5 +1,5 @@ /* Determine floating-point rounding mode within libc. Generic version. - Copyright (C) 2012-2015 Free Software Foundation, Inc. + Copyright (C) 2012-2016 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 diff --git a/sysdeps/generic/gmp-mparam.h b/sysdeps/generic/gmp-mparam.h index a9c4abf517..baf1560400 100644 --- a/sysdeps/generic/gmp-mparam.h +++ b/sysdeps/generic/gmp-mparam.h @@ -1,5 +1,5 @@ /* gmp-mparam.h -- Compiler/machine parameter header file. -Copyright (C) 1991-2015 Free Software Foundation, Inc. +Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU MP Library. diff --git a/sysdeps/generic/hp-timing-common.h b/sysdeps/generic/hp-timing-common.h index 1e3e9b50a5..257cdd3e55 100644 --- a/sysdeps/generic/hp-timing-common.h +++ b/sysdeps/generic/hp-timing-common.h @@ -1,5 +1,5 @@ /* High precision, low overhead timing functions. Generic version. - Copyright (C) 1998-2015 Free Software Foundation, Inc. + Copyright (C) 1998-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. diff --git a/sysdeps/generic/hp-timing.h b/sysdeps/generic/hp-timing.h index 142fa62a77..6ca7f7d03f 100644 --- a/sysdeps/generic/hp-timing.h +++ b/sysdeps/generic/hp-timing.h @@ -1,5 +1,5 @@ /* High precision, low overhead timing functions. Generic version. - Copyright (C) 1998-2015 Free Software Foundation, Inc. + Copyright (C) 1998-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. diff --git a/sysdeps/generic/ifreq.h b/sysdeps/generic/ifreq.h index 8e83287486..5ff0ef8805 100644 --- a/sysdeps/generic/ifreq.h +++ b/sysdeps/generic/ifreq.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999-2015 Free Software Foundation, Inc. +/* Copyright (C) 1999-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger <aj@suse.de>. diff --git a/sysdeps/generic/inttypes.h b/sysdeps/generic/inttypes.h index 4559c176e5..1207bf2e73 100644 --- a/sysdeps/generic/inttypes.h +++ b/sysdeps/generic/inttypes.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2015 Free Software Foundation, Inc. +/* Copyright (C) 1997-2016 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 diff --git a/sysdeps/generic/ld.abilist b/sysdeps/generic/ld.abilist index ca9b8479ce..e69de29bb2 100644 --- a/sysdeps/generic/ld.abilist +++ b/sysdeps/generic/ld.abilist @@ -1,2 +0,0 @@ -# This is a placeholder file. This configuration needs its own -# sysdeps/.../ld.abilist file to make the test pass. diff --git a/sysdeps/generic/ldconfig.h b/sysdeps/generic/ldconfig.h index f6028373b3..07600b7596 100644 --- a/sysdeps/generic/ldconfig.h +++ b/sysdeps/generic/ldconfig.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999-2015 Free Software Foundation, Inc. +/* Copyright (C) 1999-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger <aj@suse.de>, 1999. diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index 7a0fe8dbe4..2733ac8268 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -1,5 +1,5 @@ /* Run-time dynamic linker data structures for loaded ELF shared objects. - Copyright (C) 1995-2015 Free Software Foundation, Inc. + Copyright (C) 1995-2016 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 @@ -35,7 +35,7 @@ #include <link.h> #include <dl-lookupcfg.h> #include <dl-sysdep.h> -#include <bits/libc-lock.h> +#include <libc-lock.h> #include <hp-timing.h> #include <tls.h> @@ -235,11 +235,11 @@ struct audit_ifaces /* Test whether given NAME matches any of the names of the given object. */ extern int _dl_name_match_p (const char *__name, const struct link_map *__map) - internal_function; + internal_function attribute_hidden; /* Compute next higher prime number. */ extern unsigned long int _dl_higher_prime_number (unsigned long int n) - internal_function; + internal_function attribute_hidden; /* Function used as argument for `_dl_receive_error' function. The arguments are the error code, error string, and the objname the @@ -592,9 +592,6 @@ struct rtld_global_ro /* List of auditing interfaces. */ struct audit_ifaces *_dl_audit; unsigned int _dl_naudit; - - /* 0 if internal pointer values should not be guarded, 1 if they should. */ - EXTERN int _dl_pointer_guard; }; # define __rtld_global_attribute__ # if IS_IN (rtld) @@ -688,7 +685,7 @@ extern void _dl_debug_printf (const char *fmt, ...) interpreted as for a `printf' call. All the lines buf the first start with a tag showing the PID. */ extern void _dl_debug_printf_c (const char *fmt, ...) - __attribute__ ((__format__ (__printf__, 1, 2))); + __attribute__ ((__format__ (__printf__, 1, 2))) attribute_hidden; /* Write a message on the specified descriptor FD. The parameters are @@ -731,7 +728,7 @@ extern void _dl_signal_error (int errcode, const char *object, _dl_receive_error. */ extern void _dl_signal_cerror (int errcode, const char *object, const char *occation, const char *errstring) - internal_function; + internal_function attribute_hidden; /* Call OPERATE, receiving errors from `dl_signal_cerror'. Unlike `_dl_catch_error' the operation is resumed after the OPERATE @@ -739,8 +736,20 @@ extern void _dl_signal_cerror (int errcode, const char *object, ARGS is passed as argument to OPERATE. */ extern void _dl_receive_error (receiver_fct fct, void (*operate) (void *), void *args) - internal_function; + internal_function attribute_hidden; +/* Call OPERATE, catching errors from `dl_signal_error'. If there is no + error, *ERRSTRING is set to null. If there is an error, *ERRSTRING is + set to a string constructed from the strings passed to _dl_signal_error, + and the error code passed is the return value and *OBJNAME is set to + the object name which experienced the problems. ERRSTRING if nonzero + points to a malloc'ed string which the caller has to free after use. + ARGS is passed as argument to OPERATE. MALLOCEDP is set to true only + if the returned string is allocated using the libc's malloc. */ +extern int _dl_catch_error (const char **objname, const char **errstring, + bool *mallocedp, void (*operate) (void *), + void *args) + internal_function attribute_hidden; /* Open the shared object NAME and map in its segments. LOADER's DT_RPATH is used in searching for NAME. @@ -838,24 +847,25 @@ extern void _dl_protect_relro (struct link_map *map) PLT is nonzero if this was a PLT reloc; it just affects the message. */ extern void _dl_reloc_bad_type (struct link_map *map, unsigned int type, int plt) - internal_function __attribute__ ((__noreturn__)); + internal_function attribute_hidden __attribute__ ((__noreturn__)); /* Resolve conflicts if prelinking. */ extern void _dl_resolve_conflicts (struct link_map *l, ElfW(Rela) *conflict, - ElfW(Rela) *conflictend); + ElfW(Rela) *conflictend) + attribute_hidden; /* Check the version dependencies of all objects available through MAP. If VERBOSE print some more diagnostics. */ extern int _dl_check_all_versions (struct link_map *map, int verbose, int trace_mode) - internal_function; + internal_function attribute_hidden; /* Check the version dependencies for MAP. If VERBOSE print some more diagnostics. */ extern int _dl_check_map_versions (struct link_map *map, int verbose, int trace_mode) - internal_function; + internal_function attribute_hidden; /* Initialize the object in SCOPE by calling the constructors with ARGC, ARGV, and ENV as the parameters. */ @@ -869,7 +879,7 @@ extern void _dl_fini (void) internal_function; /* Sort array MAPS according to dependencies of the contained objects. */ extern void _dl_sort_fini (struct link_map **maps, size_t nmaps, char *used, Lmid_t ns) - internal_function; + internal_function attribute_hidden; /* The dynamic linker calls this function before and having changing any shared object mappings. The `r_state' member of `struct r_debug' @@ -882,10 +892,11 @@ rtld_hidden_proto (_dl_debug_state) argument is the run-time load address of the dynamic linker, to be put in the `r_ldbase' member. Returns the address of the structure. */ extern struct r_debug *_dl_debug_initialize (ElfW(Addr) ldbase, Lmid_t ns) - internal_function; + internal_function attribute_hidden; /* Initialize the basic data structure for the search paths. */ -extern void _dl_init_paths (const char *library_path) internal_function; +extern void _dl_init_paths (const char *library_path) + internal_function attribute_hidden; /* Gather the information needed to install the profiling tables and start the timers. */ @@ -901,23 +912,25 @@ rtld_hidden_proto (_dl_mcount) extern void _dl_mcount_wrapper (void *selfpc); /* Show the members of the auxiliary array passed up from the kernel. */ -extern void _dl_show_auxv (void) internal_function; +extern void _dl_show_auxv (void) + internal_function attribute_hidden; /* Return all environment variables starting with `LD_', one after the other. */ -extern char *_dl_next_ld_env_entry (char ***position) internal_function; +extern char *_dl_next_ld_env_entry (char ***position) + internal_function attribute_hidden; /* Return an array with the names of the important hardware capabilities. */ extern const struct r_strlenpair *_dl_important_hwcaps (const char *platform, size_t paltform_len, size_t *sz, size_t *max_capstrlen) - internal_function; + internal_function attribute_hidden; /* Look up NAME in ld.so.cache and return the file name stored there, or null if none is found. Caller must free returned string. */ extern char *_dl_load_cache_lookup (const char *name) - internal_function; + internal_function attribute_hidden; /* If the system does not support MAP_COPY we cannot leave the file open all the time since this would create problems when the file is replaced. @@ -1017,7 +1030,8 @@ extern void _dl_add_to_slotinfo (struct link_map *l) attribute_hidden; /* Update slot information data for at least the generation of the module with the given index. */ -extern struct link_map *_dl_update_slotinfo (unsigned long int req_modid); +extern struct link_map *_dl_update_slotinfo (unsigned long int req_modid) + attribute_hidden; /* Look up the module's TLS block as for __tls_get_addr, but never touch anything. Return null if it's not allocated yet. */ @@ -1027,7 +1041,8 @@ extern int _dl_addr_inside_object (struct link_map *l, const ElfW(Addr) addr) internal_function attribute_hidden; /* Show show of an object. */ -extern void _dl_show_scope (struct link_map *new, int from); +extern void _dl_show_scope (struct link_map *new, int from) + attribute_hidden; extern struct link_map *_dl_find_dso_for_object (const ElfW(Addr) addr) internal_function; diff --git a/sysdeps/generic/libBrokenLocale.abilist b/sysdeps/generic/libBrokenLocale.abilist index 2e069e14b9..e69de29bb2 100644 --- a/sysdeps/generic/libBrokenLocale.abilist +++ b/sysdeps/generic/libBrokenLocale.abilist @@ -1,2 +0,0 @@ -# This is a placeholder file. This configuration needs its own -# sysdeps/.../libBrokenLocale.abilist file to make the test pass. diff --git a/sysdeps/generic/libanl.abilist b/sysdeps/generic/libanl.abilist index c407ab305d..e69de29bb2 100644 --- a/sysdeps/generic/libanl.abilist +++ b/sysdeps/generic/libanl.abilist @@ -1,2 +0,0 @@ -# This is a placeholder file. This configuration needs its own -# sysdeps/.../libanl.abilist file to make the test pass. diff --git a/sysdeps/generic/libc-lock.h b/sysdeps/generic/libc-lock.h new file mode 100644 index 0000000000..d5a541e209 --- /dev/null +++ b/sysdeps/generic/libc-lock.h @@ -0,0 +1,140 @@ +/* libc-internal interface for mutex locks. Stub version. + Copyright (C) 1996-2016 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _LIBC_LOCK_H +#define _LIBC_LOCK_H 1 + + +/* Define a lock variable NAME with storage class CLASS. The lock must be + initialized with __libc_lock_init before it can be used (or define it + with __libc_lock_define_initialized, below). Use `extern' for CLASS to + declare a lock defined in another module. In public structure + definitions you must use a pointer to the lock structure (i.e., NAME + begins with a `*'), because its storage size will not be known outside + of libc. */ +#define __libc_lock_define(CLASS,NAME) +#define __libc_lock_define_recursive(CLASS,NAME) +#define __rtld_lock_define_recursive(CLASS,NAME) +#define __libc_rwlock_define(CLASS,NAME) + +/* Define an initialized lock variable NAME with storage class CLASS. */ +#define __libc_lock_define_initialized(CLASS,NAME) +#define __libc_rwlock_define_initialized(CLASS,NAME) + +/* Define an initialized recursive lock variable NAME with storage + class CLASS. */ +#define __libc_lock_define_initialized_recursive(CLASS,NAME) +#define __rtld_lock_define_initialized_recursive(CLASS,NAME) + +/* Initialize the named lock variable, leaving it in a consistent, unlocked + state. */ +#define __libc_lock_init(NAME) +#define __rtld_lock_initialize(NAME) +#define __libc_rwlock_init(NAME) + +/* Same as last but this time we initialize a recursive mutex. */ +#define __libc_lock_init_recursive(NAME) + +/* Finalize the named lock variable, which must be locked. It cannot be + used again until __libc_lock_init is called again on it. This must be + called on a lock variable before the containing storage is reused. */ +#define __libc_lock_fini(NAME) +#define __libc_rwlock_fini(NAME) + +/* Finalize recursive named lock. */ +#define __libc_lock_fini_recursive(NAME) + +/* Lock the named lock variable. */ +#define __libc_lock_lock(NAME) +#define __libc_rwlock_rdlock(NAME) +#define __libc_rwlock_wrlock(NAME) + +/* Lock the recursive named lock variable. */ +#define __libc_lock_lock_recursive(NAME) +#define __rtld_lock_lock_recursive(NAME) + +/* Try to lock the named lock variable. */ +#define __libc_lock_trylock(NAME) 0 +#define __libc_rwlock_tryrdlock(NAME) 0 +#define __libc_rwlock_trywrlock(NAME) 0 + +/* Try to lock the recursive named lock variable. */ +#define __libc_lock_trylock_recursive(NAME) 0 + +/* Unlock the named lock variable. */ +#define __libc_lock_unlock(NAME) +#define __libc_rwlock_unlock(NAME) + +/* Unlock the recursive named lock variable. */ +#define __libc_lock_unlock_recursive(NAME) +#define __rtld_lock_unlock_recursive(NAME) + + +/* Define once control variable. */ +#define __libc_once_define(CLASS, NAME) CLASS int NAME = 0 + +/* Call handler iff the first call. */ +#define __libc_once(ONCE_CONTROL, INIT_FUNCTION) \ + do { \ + if ((ONCE_CONTROL) == 0) { \ + INIT_FUNCTION (); \ + (ONCE_CONTROL) = 1; \ + } \ + } while (0) + +/* Get once control variable. */ +#define __libc_once_get(ONCE_CONTROL) \ + ((ONCE_CONTROL) == 1) + +/* Start a critical region with a cleanup function */ +#define __libc_cleanup_region_start(DOIT, FCT, ARG) \ +{ \ + typeof (***(FCT)) *__save_FCT = (DOIT) ? (FCT) : 0; \ + typeof (ARG) __save_ARG = ARG; \ + /* close brace is in __libc_cleanup_region_end below. */ + +/* End a critical region started with __libc_cleanup_region_start. */ +#define __libc_cleanup_region_end(DOIT) \ + if ((DOIT) && __save_FCT != 0) \ + (*__save_FCT)(__save_ARG); \ +} + +/* Sometimes we have to exit the block in the middle. */ +#define __libc_cleanup_end(DOIT) \ + if ((DOIT) && __save_FCT != 0) \ + (*__save_FCT)(__save_ARG); \ + +#define __libc_cleanup_push(fct, arg) __libc_cleanup_region_start (1, fct, arg) +#define __libc_cleanup_pop(execute) __libc_cleanup_region_end (execute) + +/* We need portable names for some of the functions. */ +#define __libc_mutex_unlock + +/* Type for key of thread specific data. */ +typedef int __libc_key_t; + +/* Create key for thread specific data. */ +#define __libc_key_create(KEY,DEST) ((void) (KEY), (void) (DEST), -1) + +/* Set thread-specific data associated with KEY to VAL. */ +#define __libc_setspecific(KEY,VAL) ((void) (KEY), (void) (VAL)) + +/* Get thread-specific data associated with KEY. */ +#define __libc_getspecific(KEY) ((void) (KEY), (void *) 0) + +#endif /* libc-lock.h */ diff --git a/sysdeps/generic/libc-mmap.h b/sysdeps/generic/libc-mmap.h index c17ff07890..e2e0ca36b9 100644 --- a/sysdeps/generic/libc-mmap.h +++ b/sysdeps/generic/libc-mmap.h @@ -1,5 +1,5 @@ /* Internal logic for dealing with mmap quirks. - Copyright (C) 2013-2015 Free Software Foundation, Inc. + Copyright (C) 2013-2016 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 diff --git a/sysdeps/generic/libc-tsd.h b/sysdeps/generic/libc-tsd.h new file mode 100644 index 0000000000..eef55ef3ad --- /dev/null +++ b/sysdeps/generic/libc-tsd.h @@ -0,0 +1,60 @@ +/* libc-internal interface for thread-specific data. Stub or TLS version. + Copyright (C) 1998-2016 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _GENERIC_LIBC_TSD_H +#define _GENERIC_LIBC_TSD_H 1 + +/* This file defines the following macros for accessing a small fixed + set of thread-specific `void *' data used only internally by libc. + + __libc_tsd_define(CLASS, TYPE, KEY) -- Define or declare a datum with TYPE + for KEY. CLASS can be `static' for + keys used in only one source file, + empty for global definitions, or + `extern' for global declarations. + __libc_tsd_address(TYPE, KEY) -- Return the `TYPE *' pointing to + the current thread's datum for KEY. + __libc_tsd_get(TYPE, KEY) -- Return the `TYPE' datum for KEY. + __libc_tsd_set(TYPE, KEY, VALUE) -- Set the datum for KEY to VALUE. + + The set of available KEY's will usually be provided as an enum, + and contains (at least): + _LIBC_TSD_KEY_MALLOC + _LIBC_TSD_KEY_DL_ERROR + _LIBC_TSD_KEY_RPC_VARS + All uses must be the literal _LIBC_TSD_* name in the __libc_tsd_* macros. + Some implementations may not provide any enum at all and instead + using string pasting in the macros. */ + +#include <tls.h> + +/* When full support for __thread variables is available, this interface is + just a trivial wrapper for it. Without TLS, this is the generic/stub + implementation for wholly single-threaded systems. + + We don't define an enum for the possible key values, because the KEYs + translate directly into variables by macro magic. */ + +#define __libc_tsd_define(CLASS, TYPE, KEY) \ + CLASS __thread TYPE __libc_tsd_##KEY attribute_tls_model_ie; + +#define __libc_tsd_address(TYPE, KEY) (&__libc_tsd_##KEY) +#define __libc_tsd_get(TYPE, KEY) (__libc_tsd_##KEY) +#define __libc_tsd_set(TYPE, KEY, VALUE) (__libc_tsd_##KEY = (VALUE)) + +#endif /* libc-tsd.h */ diff --git a/sysdeps/generic/libc.abilist b/sysdeps/generic/libc.abilist index ff6e8f68e8..e69de29bb2 100644 --- a/sysdeps/generic/libc.abilist +++ b/sysdeps/generic/libc.abilist @@ -1,2 +0,0 @@ -# This is a placeholder file. This configuration needs its own -# sysdeps/.../libc.abilist file to make the test pass. diff --git a/sysdeps/generic/libcrypt.abilist b/sysdeps/generic/libcrypt.abilist index 418d399ecb..e69de29bb2 100644 --- a/sysdeps/generic/libcrypt.abilist +++ b/sysdeps/generic/libcrypt.abilist @@ -1,2 +0,0 @@ -# This is a placeholder file. This configuration needs its own -# sysdeps/.../libcrypt.abilist file to make the test pass. diff --git a/sysdeps/generic/libdl.abilist b/sysdeps/generic/libdl.abilist index 95735046e3..e69de29bb2 100644 --- a/sysdeps/generic/libdl.abilist +++ b/sysdeps/generic/libdl.abilist @@ -1,2 +0,0 @@ -# This is a placeholder file. This configuration needs its own -# sysdeps/.../libdl.abilist file to make the test pass. diff --git a/sysdeps/generic/libm.abilist b/sysdeps/generic/libm.abilist index de8edb1d76..e69de29bb2 100644 --- a/sysdeps/generic/libm.abilist +++ b/sysdeps/generic/libm.abilist @@ -1,2 +0,0 @@ -# This is a placeholder file. This configuration needs its own -# sysdeps/.../libm.abilist file to make the test pass. diff --git a/sysdeps/generic/libpthread.abilist b/sysdeps/generic/libpthread.abilist index 0e38d32190..e69de29bb2 100644 --- a/sysdeps/generic/libpthread.abilist +++ b/sysdeps/generic/libpthread.abilist @@ -1,2 +0,0 @@ -# This is a placeholder file. This configuration needs its own -# sysdeps/.../libpthread.abilist file to make the test pass. diff --git a/sysdeps/generic/libresolv.abilist b/sysdeps/generic/libresolv.abilist index 97dde6ae50..e69de29bb2 100644 --- a/sysdeps/generic/libresolv.abilist +++ b/sysdeps/generic/libresolv.abilist @@ -1,2 +0,0 @@ -# This is a placeholder file. This configuration needs its own -# sysdeps/.../libresolv.abilist file to make the test pass. diff --git a/sysdeps/generic/librt.abilist b/sysdeps/generic/librt.abilist index 01f32b37dc..e69de29bb2 100644 --- a/sysdeps/generic/librt.abilist +++ b/sysdeps/generic/librt.abilist @@ -1,2 +0,0 @@ -# This is a placeholder file. This configuration needs its own -# sysdeps/.../librt.abilist file to make the test pass. diff --git a/sysdeps/generic/linkmap.h b/sysdeps/generic/linkmap.h new file mode 100644 index 0000000000..470b4d3e5f --- /dev/null +++ b/sysdeps/generic/linkmap.h @@ -0,0 +1,4 @@ +struct link_map_machine + { + /* empty by default */ + }; diff --git a/sysdeps/generic/machine-gmon.h b/sysdeps/generic/machine-gmon.h index ba1c7d0c0a..0bacaa95be 100644 --- a/sysdeps/generic/machine-gmon.h +++ b/sysdeps/generic/machine-gmon.h @@ -1,5 +1,5 @@ /* Machine-dependent definitions for profiling support. Generic GCC 2 version. - Copyright (C) 1996-2015 Free Software Foundation, Inc. + Copyright (C) 1996-2016 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 diff --git a/sysdeps/generic/machine-lock.h b/sysdeps/generic/machine-lock.h index a050f8f52e..8497a7273e 100644 --- a/sysdeps/generic/machine-lock.h +++ b/sysdeps/generic/machine-lock.h @@ -1,5 +1,5 @@ /* Machine-specific definition for spin locks. Stub version. - Copyright (C) 1994-2015 Free Software Foundation, Inc. + Copyright (C) 1994-2016 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 diff --git a/sysdeps/generic/machine-sp.h b/sysdeps/generic/machine-sp.h index a6e17df016..f7d84492f1 100644 --- a/sysdeps/generic/machine-sp.h +++ b/sysdeps/generic/machine-sp.h @@ -1,5 +1,5 @@ /* Machine-specific function to return the stack pointer. Stub version. - Copyright (C) 1994-2015 Free Software Foundation, Inc. + Copyright (C) 1994-2016 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 diff --git a/sysdeps/generic/malloc-machine.h b/sysdeps/generic/malloc-machine.h index 10f6e72eb2..1ed2d50a20 100644 --- a/sysdeps/generic/malloc-machine.h +++ b/sysdeps/generic/malloc-machine.h @@ -1,6 +1,6 @@ /* Basic platform-independent macro definitions for mutexes, thread-specific data and parameters for malloc. - Copyright (C) 2003-2015 Free Software Foundation, Inc. + Copyright (C) 2003-2016 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 @@ -38,14 +38,6 @@ typedef int mutex_t; # define mutex_lock(m) ({ *(m) = 1; 0; }) # define mutex_trylock(m) (*(m) ? 1 : ((*(m) = 1), 0)) # define mutex_unlock(m) (*(m) = 0) -# define MUTEX_INITIALIZER (0) - -typedef void *tsd_key_t; -# define tsd_key_create(key, destr) do {} while(0) -# define tsd_setspecific(key, data) ((key) = (data)) -# define tsd_getspecific(key, vptr) (vptr = (key)) - -# define thread_atfork(prepare, parent, child) do {} while(0) #endif /* !defined mutex_init */ diff --git a/sysdeps/generic/malloc-sysdep.h b/sysdeps/generic/malloc-sysdep.h index a6f6489441..09b70ae9dc 100644 --- a/sysdeps/generic/malloc-sysdep.h +++ b/sysdeps/generic/malloc-sysdep.h @@ -1,5 +1,5 @@ /* System-specific malloc support functions. Generic version. - Copyright (C) 2012-2015 Free Software Foundation, Inc. + Copyright (C) 2012-2016 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 diff --git a/sysdeps/generic/math-tests-arch.h b/sysdeps/generic/math-tests-arch.h index fb086d9d78..47f14ba9fb 100644 --- a/sysdeps/generic/math-tests-arch.h +++ b/sysdeps/generic/math-tests-arch.h @@ -1,5 +1,5 @@ /* Runtime architecture check for math tests. - Copyright (C) 2014-2015 Free Software Foundation, Inc. + Copyright (C) 2014-2016 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 diff --git a/sysdeps/generic/math-tests.h b/sysdeps/generic/math-tests.h index b92623f7cd..9393229a36 100644 --- a/sysdeps/generic/math-tests.h +++ b/sysdeps/generic/math-tests.h @@ -1,5 +1,5 @@ /* Configuration for math tests. Generic version. - Copyright (C) 2013-2015 Free Software Foundation, Inc. + Copyright (C) 2013-2016 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 diff --git a/sysdeps/generic/math_private.h b/sysdeps/generic/math_private.h index 0ab547d82f..cf1865dac8 100644 --- a/sysdeps/generic/math_private.h +++ b/sysdeps/generic/math_private.h @@ -20,6 +20,7 @@ #include <stdint.h> #include <sys/types.h> #include <fenv.h> +#include <float.h> #include <get-rounding-mode.h> /* The original fdlibm code used statements like: @@ -364,8 +365,8 @@ extern double __slowpow (double __x, double __y, double __z); extern void __docos (double __x, double __dx, double __v[]); /* Return X^2 + Y^2 - 1, computed without large cancellation error. - It is given that 1 > X >= Y >= epsilon / 2, and that either X >= - 0.75 or Y >= 0.5. */ + It is given that 1 > X >= Y >= epsilon / 2, and that X^2 + Y^2 >= + 0.5. */ extern float __x2y2m1f (float x, float y); extern double __x2y2m1 (double x, double y); extern long double __x2y2m1l (long double x, long double y); @@ -382,6 +383,22 @@ extern double __gamma_product (double x, double x_eps, int n, double *eps); extern long double __gamma_productl (long double x, long double x_eps, int n, long double *eps); +/* Compute lgamma of a negative argument X, if it is in a range + (depending on the floating-point format) for which expansion around + zeros is used, setting *SIGNGAMP accordingly. */ +extern float __lgamma_negf (float x, int *signgamp); +extern double __lgamma_neg (double x, int *signgamp); +extern long double __lgamma_negl (long double x, int *signgamp); + +/* Compute the product of 1 + (T / (X + X_EPS)), 1 + (T / (X + X_EPS + + 1)), ..., 1 + (T / (X + X_EPS + N - 1)), minus 1. X is such that + all the values X + 1, ..., X + N - 1 are exactly representable, and + X_EPS / X is small enough that factors quadratic in it can be + neglected. */ +extern double __lgamma_product (double t, double x, double x_eps, int n); +extern long double __lgamma_productl (long double t, long double x, + long double x_eps, int n); + #ifndef math_opt_barrier # define math_opt_barrier(x) \ ({ __typeof (x) __x = (x); __asm ("" : "+m" (__x)); __x; }) @@ -389,6 +406,81 @@ extern long double __gamma_productl (long double x, long double x_eps, ({ __typeof (x) __x = (x); __asm __volatile__ ("" : : "m" (__x)); }) #endif +/* math_narrow_eval reduces its floating-point argument to the range + and precision of its semantic type. (The original evaluation may + still occur with excess range and precision, so the result may be + affected by double rounding.) */ +#if FLT_EVAL_METHOD == 0 +# define math_narrow_eval(x) (x) +#else +# if FLT_EVAL_METHOD == 1 +# define excess_precision(type) __builtin_types_compatible_p (type, float) +# else +# define excess_precision(type) (__builtin_types_compatible_p (type, float) \ + || __builtin_types_compatible_p (type, \ + double)) +# endif +# define math_narrow_eval(x) \ + ({ \ + __typeof (x) math_narrow_eval_tmp = (x); \ + if (excess_precision (__typeof (math_narrow_eval_tmp))) \ + __asm__ ("" : "+m" (math_narrow_eval_tmp)); \ + math_narrow_eval_tmp; \ + }) +#endif + +#define fabs_tg(x) __builtin_choose_expr \ + (__builtin_types_compatible_p (__typeof (x), float), \ + __builtin_fabsf (x), \ + __builtin_choose_expr \ + (__builtin_types_compatible_p (__typeof (x), double), \ + __builtin_fabs (x), __builtin_fabsl (x))) +#define min_of_type(type) __builtin_choose_expr \ + (__builtin_types_compatible_p (type, float), \ + FLT_MIN, \ + __builtin_choose_expr \ + (__builtin_types_compatible_p (type, double), \ + DBL_MIN, LDBL_MIN)) + +/* If X (which is not a NaN) is subnormal, force an underflow + exception. */ +#define math_check_force_underflow(x) \ + do \ + { \ + __typeof (x) force_underflow_tmp = (x); \ + if (fabs_tg (force_underflow_tmp) \ + < min_of_type (__typeof (force_underflow_tmp))) \ + { \ + __typeof (force_underflow_tmp) force_underflow_tmp2 \ + = force_underflow_tmp * force_underflow_tmp; \ + math_force_eval (force_underflow_tmp2); \ + } \ + } \ + while (0) +/* Likewise, but X is also known to be nonnegative. */ +#define math_check_force_underflow_nonneg(x) \ + do \ + { \ + __typeof (x) force_underflow_tmp = (x); \ + if (force_underflow_tmp \ + < min_of_type (__typeof (force_underflow_tmp))) \ + { \ + __typeof (force_underflow_tmp) force_underflow_tmp2 \ + = force_underflow_tmp * force_underflow_tmp; \ + math_force_eval (force_underflow_tmp2); \ + } \ + } \ + while (0) +/* Likewise, for both real and imaginary parts of a complex + result. */ +#define math_check_force_underflow_complex(x) \ + do \ + { \ + __typeof (x) force_underflow_complex_tmp = (x); \ + math_check_force_underflow (__real__ force_underflow_complex_tmp); \ + math_check_force_underflow (__imag__ force_underflow_complex_tmp); \ + } \ + while (0) /* The standards only specify one variant of the fenv.h interfaces. But at least for some architectures we can be more efficient if we diff --git a/sysdeps/generic/memcopy.h b/sysdeps/generic/memcopy.h index e6bc6e4758..fe9aa60857 100644 --- a/sysdeps/generic/memcopy.h +++ b/sysdeps/generic/memcopy.h @@ -1,5 +1,5 @@ /* memcopy.h -- definitions for memory copy functions. Generic C version. - Copyright (C) 1991-2015 Free Software Foundation, Inc. + Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Torbjorn Granlund (tege@sics.se). @@ -111,8 +111,10 @@ typedef unsigned char byte; the assumption that DST_BP is aligned on an OPSIZ multiple. If not all bytes could be easily copied, store remaining number of bytes in NBYTES_LEFT, otherwise store 0. */ -extern void _wordcopy_fwd_aligned (long int, long int, size_t) __THROW; -extern void _wordcopy_fwd_dest_aligned (long int, long int, size_t) __THROW; +extern void _wordcopy_fwd_aligned (long int, long int, size_t) + attribute_hidden __THROW; +extern void _wordcopy_fwd_dest_aligned (long int, long int, size_t) + attribute_hidden __THROW; #define WORD_COPY_FWD(dst_bp, src_bp, nbytes_left, nbytes) \ do \ { \ @@ -131,8 +133,10 @@ extern void _wordcopy_fwd_dest_aligned (long int, long int, size_t) __THROW; DST_END_PTR is aligned on an OPSIZ multiple. If not all bytes could be easily copied, store remaining number of bytes in NBYTES_REMAINING, otherwise store 0. */ -extern void _wordcopy_bwd_aligned (long int, long int, size_t) __THROW; -extern void _wordcopy_bwd_dest_aligned (long int, long int, size_t) __THROW; +extern void _wordcopy_bwd_aligned (long int, long int, size_t) + attribute_hidden __THROW; +extern void _wordcopy_bwd_dest_aligned (long int, long int, size_t) + attribute_hidden __THROW; #define WORD_COPY_BWD(dst_ep, src_ep, nbytes_left, nbytes) \ do \ { \ diff --git a/sysdeps/generic/memusage.h b/sysdeps/generic/memusage.h index 775bd18b58..a8dbd2359f 100644 --- a/sysdeps/generic/memusage.h +++ b/sysdeps/generic/memusage.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2015 Free Software Foundation, Inc. +/* Copyright (C) 2000-2016 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 diff --git a/sysdeps/generic/net/if.h b/sysdeps/generic/net/if.h index 2346bdab50..6ddd86342a 100644 --- a/sysdeps/generic/net/if.h +++ b/sysdeps/generic/net/if.h @@ -1,5 +1,5 @@ /* net/if.h -- declarations for inquiring about network interfaces - Copyright (C) 2000-2015 Free Software Foundation, Inc. + Copyright (C) 2000-2016 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 diff --git a/sysdeps/generic/netinet/if_ether.h b/sysdeps/generic/netinet/if_ether.h index 54dbf47ef8..c106a41c82 100644 --- a/sysdeps/generic/netinet/if_ether.h +++ b/sysdeps/generic/netinet/if_ether.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2015 Free Software Foundation, Inc. +/* Copyright (C) 1996-2016 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 diff --git a/sysdeps/generic/netinet/in_systm.h b/sysdeps/generic/netinet/in_systm.h index d12df7a527..41704ee40a 100644 --- a/sysdeps/generic/netinet/in_systm.h +++ b/sysdeps/generic/netinet/in_systm.h @@ -1,5 +1,5 @@ /* System specific type definitions for networking code. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 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 diff --git a/sysdeps/generic/netinet/ip.h b/sysdeps/generic/netinet/ip.h index 97ed63ce7a..557a460d71 100644 --- a/sysdeps/generic/netinet/ip.h +++ b/sysdeps/generic/netinet/ip.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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 diff --git a/sysdeps/generic/nfs/nfs.h b/sysdeps/generic/nfs/nfs.h index c8aa74ad10..6e1d64c4b5 100644 --- a/sysdeps/generic/nfs/nfs.h +++ b/sysdeps/generic/nfs/nfs.h @@ -1,5 +1,5 @@ /* <nfs/nfs.h> -- ill-specified NFS-related definitions - Copyright (C) 1999-2015 Free Software Foundation, Inc. + Copyright (C) 1999-2016 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 diff --git a/sysdeps/generic/not-cancel.h b/sysdeps/generic/not-cancel.h index af1e052bf6..d703bb228f 100644 --- a/sysdeps/generic/not-cancel.h +++ b/sysdeps/generic/not-cancel.h @@ -1,5 +1,5 @@ /* Uncancelable versions of cancelable interfaces. Generic version. - Copyright (C) 2003-2015 Free Software Foundation, Inc. + Copyright (C) 2003-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2003. diff --git a/sysdeps/generic/nscd-types.h b/sysdeps/generic/nscd-types.h index 53fc776eae..3874f3339f 100644 --- a/sysdeps/generic/nscd-types.h +++ b/sysdeps/generic/nscd-types.h @@ -1,5 +1,5 @@ /* Types for the NSCD implementation. Generic version. - Copyright (c) 2000-2015 Free Software Foundation, Inc. + Copyright (c) 2000-2016 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 diff --git a/sysdeps/generic/pagecopy.h b/sysdeps/generic/pagecopy.h index b29d93e728..6ab29ce91d 100644 --- a/sysdeps/generic/pagecopy.h +++ b/sysdeps/generic/pagecopy.h @@ -1,5 +1,5 @@ /* Macros for copying by pages; used in memcpy, memmove. - Copyright (C) 1995-2015 Free Software Foundation, Inc. + Copyright (C) 1995-2016 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 diff --git a/sysdeps/generic/profil-counter.h b/sysdeps/generic/profil-counter.h index 813afa83ec..514245888a 100644 --- a/sysdeps/generic/profil-counter.h +++ b/sysdeps/generic/profil-counter.h @@ -1,5 +1,5 @@ /* Machine-dependent SIGPROF signal handler. "Generic" version w/ sigcontext - Copyright (C) 1996-2015 Free Software Foundation, Inc. + Copyright (C) 1996-2016 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 diff --git a/sysdeps/generic/pty-private.h b/sysdeps/generic/pty-private.h index b07fbcca98..955e77f106 100644 --- a/sysdeps/generic/pty-private.h +++ b/sysdeps/generic/pty-private.h @@ -1,5 +1,5 @@ /* Internal defenitions and declarations for pseudo terminal functions. - Copyright (C) 1998-2015 Free Software Foundation, Inc. + Copyright (C) 1998-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Zack Weinberg <zack@rabi.phys.columbia.edu>, 1998. diff --git a/sysdeps/generic/register-dump.h b/sysdeps/generic/register-dump.h index 1d00c5861d..831dbc53db 100644 --- a/sysdeps/generic/register-dump.h +++ b/sysdeps/generic/register-dump.h @@ -1,5 +1,5 @@ /* Dump registers. - Copyright (C) 1998-2015 Free Software Foundation, Inc. + Copyright (C) 1998-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. diff --git a/sysdeps/generic/safe-fatal.h b/sysdeps/generic/safe-fatal.h index 526dd32ef3..22ab3560ea 100644 --- a/sysdeps/generic/safe-fatal.h +++ b/sysdeps/generic/safe-fatal.h @@ -1,5 +1,5 @@ /* Crash the process immediately, without possibility of deadlock. Generic. - Copyright (C) 2014-2015 Free Software Foundation, Inc. + Copyright (C) 2014-2016 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 diff --git a/sysdeps/generic/sigcontextinfo.h b/sysdeps/generic/sigcontextinfo.h index 3265b981df..035986dd1b 100644 --- a/sysdeps/generic/sigcontextinfo.h +++ b/sysdeps/generic/sigcontextinfo.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2015 Free Software Foundation, Inc. +/* Copyright (C) 1998-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. diff --git a/sysdeps/generic/siglist.h b/sysdeps/generic/siglist.h index 3305ccc7f7..49b86eaf90 100644 --- a/sysdeps/generic/siglist.h +++ b/sysdeps/generic/siglist.h @@ -1,5 +1,5 @@ /* Canonical list of all signal names. - Copyright (C) 1996-2015 Free Software Foundation, Inc. + Copyright (C) 1996-2016 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 diff --git a/sysdeps/generic/sigset-cvt-mask.h b/sysdeps/generic/sigset-cvt-mask.h index 5d781e3203..78a8fa5896 100644 --- a/sysdeps/generic/sigset-cvt-mask.h +++ b/sysdeps/generic/sigset-cvt-mask.h @@ -1,6 +1,6 @@ /* Convert between lowlevel sigmask and libc representation of sigset_t. Generic version. - Copyright (C) 1998-2015 Free Software Foundation, Inc. + Copyright (C) 1998-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Joe Keane <jgk@jgk.org>. diff --git a/sysdeps/generic/stackinfo.h b/sysdeps/generic/stackinfo.h index 368868f5df..d510c59c74 100644 --- a/sysdeps/generic/stackinfo.h +++ b/sysdeps/generic/stackinfo.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999-2015 Free Software Foundation, Inc. +/* Copyright (C) 1999-2016 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 diff --git a/sysdeps/generic/stdint.h b/sysdeps/generic/stdint.h index 5c9f0ffd11..442762728b 100644 --- a/sysdeps/generic/stdint.h +++ b/sysdeps/generic/stdint.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2015 Free Software Foundation, Inc. +/* Copyright (C) 1997-2016 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 diff --git a/sysdeps/generic/stdio-lock.h b/sysdeps/generic/stdio-lock.h new file mode 100644 index 0000000000..69090a1409 --- /dev/null +++ b/sysdeps/generic/stdio-lock.h @@ -0,0 +1,70 @@ +/* Thread package specific definitions of stream lock type. Generic version. + Copyright (C) 2000-2016 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _STDIO_LOCK_H +#define _STDIO_LOCK_H 1 + +#include <libc-lock.h> + +__libc_lock_define_recursive (typedef, _IO_lock_t) + +/* We need recursive (counting) mutexes. */ +#ifdef _LIBC_LOCK_RECURSIVE_INITIALIZER +# define _IO_lock_initializer _LIBC_LOCK_RECURSIVE_INITIALIZER +#elif _IO_MTSAFE_IO + #error libio needs recursive mutexes for _IO_MTSAFE_IO +#endif + +#define _IO_lock_init(_name) __libc_lock_init_recursive (_name) +#define _IO_lock_fini(_name) __libc_lock_fini_recursive (_name) +#define _IO_lock_lock(_name) __libc_lock_lock_recursive (_name) +#define _IO_lock_trylock(_name) __libc_lock_trylock_recursive (_name) +#define _IO_lock_unlock(_name) __libc_lock_unlock_recursive (_name) + + +#define _IO_cleanup_region_start(_fct, _fp) \ + __libc_cleanup_region_start (((_fp)->_flags & _IO_USER_LOCK) == 0, _fct, _fp) +#define _IO_cleanup_region_start_noarg(_fct) \ + __libc_cleanup_region_start (1, _fct, NULL) +#define _IO_cleanup_region_end(_doit) \ + __libc_cleanup_region_end (_doit) + +#if defined _LIBC && IS_IN (libc) + +# ifdef __EXCEPTIONS +# define _IO_acquire_lock(_fp) \ + do { \ + _IO_FILE *_IO_acquire_lock_file \ + __attribute__((cleanup (_IO_acquire_lock_fct))) \ + = (_fp); \ + _IO_flockfile (_IO_acquire_lock_file); +# define _IO_acquire_lock_clear_flags2(_fp) \ + do { \ + _IO_FILE *_IO_acquire_lock_file \ + __attribute__((cleanup (_IO_acquire_lock_clear_flags2_fct))) \ + = (_fp); \ + _IO_flockfile (_IO_acquire_lock_file); +# else +# define _IO_acquire_lock(_fp) _IO_acquire_lock_needs_exceptions_enabled +# define _IO_acquire_lock_clear_flags2(_fp) _IO_acquire_lock (_fp) +# endif +# define _IO_release_lock(_fp) ; } while (0) + +#endif + +#endif /* stdio-lock.h */ diff --git a/sysdeps/generic/string_private.h b/sysdeps/generic/string_private.h new file mode 100644 index 0000000000..c880aae4f2 --- /dev/null +++ b/sysdeps/generic/string_private.h @@ -0,0 +1,21 @@ +/* Define _STRING_ARCH_unaligned. Generic version. + Copyright (C) 2016 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +/* Define to 1 if architecture can access unaligned multi-byte + variables. */ +#define _STRING_ARCH_unaligned 0 diff --git a/sysdeps/generic/sys/ptrace.h b/sysdeps/generic/sys/ptrace.h index 53992e8c50..baf4f7a440 100644 --- a/sysdeps/generic/sys/ptrace.h +++ b/sysdeps/generic/sys/ptrace.h @@ -1,5 +1,5 @@ /* `ptrace' debugger support interface. Generic version; constants are common. - Copyright (C) 1991-2015 Free Software Foundation, Inc. + Copyright (C) 1991-2016 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 diff --git a/sysdeps/generic/sys/swap.h b/sysdeps/generic/sys/swap.h index 62423b91f2..40cdea89bc 100644 --- a/sysdeps/generic/sys/swap.h +++ b/sysdeps/generic/sys/swap.h @@ -1,5 +1,5 @@ /* Calls to enable and disable swapping on specified locations. Unix version. - Copyright (C) 1996-2015 Free Software Foundation, Inc. + Copyright (C) 1996-2016 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 diff --git a/sysdeps/generic/sys/sysinfo.h b/sysdeps/generic/sys/sysinfo.h index a0bb271ab0..5c1a8c662c 100644 --- a/sysdeps/generic/sys/sysinfo.h +++ b/sysdeps/generic/sys/sysinfo.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2015 Free Software Foundation, Inc. +/* Copyright (C) 1996-2016 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 diff --git a/sysdeps/generic/sys/sysmacros.h b/sysdeps/generic/sys/sysmacros.h index 06e5d70e90..4cc59616fb 100644 --- a/sysdeps/generic/sys/sysmacros.h +++ b/sysdeps/generic/sys/sysmacros.h @@ -1,5 +1,5 @@ /* Definitions of macros to access `dev_t' values. - Copyright (C) 1996-2015 Free Software Foundation, Inc. + Copyright (C) 1996-2016 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 diff --git a/sysdeps/generic/sys/ucontext.h b/sysdeps/generic/sys/ucontext.h index d9e9295f78..f08cec04cc 100644 --- a/sysdeps/generic/sys/ucontext.h +++ b/sysdeps/generic/sys/ucontext.h @@ -1,5 +1,5 @@ /* Data structures for user-level context switching. Generic version. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 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 diff --git a/sysdeps/generic/sysdep.h b/sysdeps/generic/sysdep.h index 89ce421048..4c45702628 100644 --- a/sysdeps/generic/sysdep.h +++ b/sysdeps/generic/sysdep.h @@ -1,5 +1,5 @@ /* Generic asm macros used on many machines. - Copyright (C) 1991-2015 Free Software Foundation, Inc. + Copyright (C) 1991-2016 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 diff --git a/sysdeps/generic/thread_state.h b/sysdeps/generic/thread_state.h index cf3cdf0596..b168e20246 100644 --- a/sysdeps/generic/thread_state.h +++ b/sysdeps/generic/thread_state.h @@ -1,5 +1,5 @@ /* Mach thread state definitions for machine-independent code. Stub version. - Copyright (C) 1994-2015 Free Software Foundation, Inc. + Copyright (C) 1994-2016 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 diff --git a/sysdeps/generic/tininess.h b/sysdeps/generic/tininess.h index a8d4bb66ee..2d459dcce1 100644 --- a/sysdeps/generic/tininess.h +++ b/sysdeps/generic/tininess.h @@ -1,6 +1,6 @@ /* Specify architecture-specific rules for determining tininess of floating-point results. Generic version. - Copyright (C) 2012-2015 Free Software Foundation, Inc. + Copyright (C) 2012-2016 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 diff --git a/sysdeps/generic/tls.h b/sysdeps/generic/tls.h index dcbadbb860..5126a50198 100644 --- a/sysdeps/generic/tls.h +++ b/sysdeps/generic/tls.h @@ -1,5 +1,5 @@ /* Definition for thread-local data handling. Generic version. - Copyright (C) 2002-2015 Free Software Foundation, Inc. + Copyright (C) 2002-2016 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 diff --git a/sysdeps/generic/tst-stack-align.h b/sysdeps/generic/tst-stack-align.h index b18116af18..372509adef 100644 --- a/sysdeps/generic/tst-stack-align.h +++ b/sysdeps/generic/tst-stack-align.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003-2015 Free Software Foundation, Inc. +/* Copyright (C) 2003-2016 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 diff --git a/sysdeps/generic/unwind-dw2-fde-glibc.c b/sysdeps/generic/unwind-dw2-fde-glibc.c index e02d0dfca1..e09fd4ce4b 100644 --- a/sysdeps/generic/unwind-dw2-fde-glibc.c +++ b/sysdeps/generic/unwind-dw2-fde-glibc.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2015 Free Software Foundation, Inc. +/* Copyright (C) 2001-2016 Free Software Foundation, Inc. Contributed by Jakub Jelinek <jakub@redhat.com>. This file is part of the GNU C Library. diff --git a/sysdeps/generic/unwind-dw2-fde.c b/sysdeps/generic/unwind-dw2-fde.c index 1da37ab508..6a64cbd254 100644 --- a/sysdeps/generic/unwind-dw2-fde.c +++ b/sysdeps/generic/unwind-dw2-fde.c @@ -1,5 +1,5 @@ /* Subroutines needed for unwinding stack frames for exception handling. */ -/* Copyright (C) 1997-2015 Free Software Foundation, Inc. +/* Copyright (C) 1997-2016 Free Software Foundation, Inc. Contributed by Jason Merrill <jason@cygnus.com>. This file is part of the GNU C Library. @@ -27,7 +27,7 @@ #ifdef _LIBC #include <stdlib.h> #include <string.h> -#include <bits/libc-lock.h> +#include <libc-lock.h> #include <dwarf2.h> #include <unwind.h> #define NO_BASE_OF_ENCODED_VALUE diff --git a/sysdeps/generic/unwind-dw2-fde.h b/sysdeps/generic/unwind-dw2-fde.h index 66aa084d40..9b55e73e77 100644 --- a/sysdeps/generic/unwind-dw2-fde.h +++ b/sysdeps/generic/unwind-dw2-fde.h @@ -1,5 +1,5 @@ /* Subroutines needed for unwinding stack frames for exception handling. */ -/* Copyright (C) 1997-2015 Free Software Foundation, Inc. +/* Copyright (C) 1997-2016 Free Software Foundation, Inc. Contributed by Jason Merrill <jason@cygnus.com>. This file is part of the GNU C Library. diff --git a/sysdeps/generic/unwind-dw2.c b/sysdeps/generic/unwind-dw2.c index 4107d8bf44..b6bb5fa1d9 100644 --- a/sysdeps/generic/unwind-dw2.c +++ b/sysdeps/generic/unwind-dw2.c @@ -1,5 +1,5 @@ /* DWARF2 exception handling and frame unwind runtime interface routines. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/sysdeps/generic/unwind-pe.h b/sysdeps/generic/unwind-pe.h index e3d2485e95..c3a98ab816 100644 --- a/sysdeps/generic/unwind-pe.h +++ b/sysdeps/generic/unwind-pe.h @@ -1,5 +1,5 @@ /* Exception handling and frame unwind runtime interface routines. - Copyright (C) 2001-2015 Free Software Foundation, Inc. + Copyright (C) 2001-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/sysdeps/generic/unwind-resume.h b/sysdeps/generic/unwind-resume.h index 74c1a517e9..fd6e80cef8 100644 --- a/sysdeps/generic/unwind-resume.h +++ b/sysdeps/generic/unwind-resume.h @@ -1,5 +1,5 @@ /* Definitions for unwind-resume.c. Generic version. - Copyright (C) 2015 Free Software Foundation, Inc. + Copyright (C) 2015-2016 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 diff --git a/sysdeps/generic/unwind.h b/sysdeps/generic/unwind.h index 41b6aecd62..23325468ad 100644 --- a/sysdeps/generic/unwind.h +++ b/sysdeps/generic/unwind.h @@ -1,5 +1,5 @@ /* Exception handling and frame unwind runtime interface routines. - Copyright (C) 2001-2015 Free Software Foundation, Inc. + Copyright (C) 2001-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -31,8 +31,8 @@ extern "C" { /* @@@ The IA-64 ABI uses uint64 throughout. Most places this is inefficient for 32-bit and smaller machines. */ -typedef unsigned _Unwind_Word __attribute__((__mode__(__word__))); -typedef signed _Unwind_Sword __attribute__((__mode__(__word__))); +typedef unsigned _Unwind_Word __attribute__((__mode__(__unwind_word__))); +typedef signed _Unwind_Sword __attribute__((__mode__(__unwind_word__))); #if defined(__ia64__) && defined(__hpux__) typedef unsigned _Unwind_Ptr __attribute__((__mode__(__word__))); #else diff --git a/sysdeps/generic/utmp-equal.h b/sysdeps/generic/utmp-equal.h index 79dc037345..0eeedbbcf4 100644 --- a/sysdeps/generic/utmp-equal.h +++ b/sysdeps/generic/utmp-equal.h @@ -1,5 +1,5 @@ /* Helper function for utmp functions to see if two entries are equal. - Copyright (C) 1996-2015 Free Software Foundation, Inc. + Copyright (C) 1996-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com> and Paul Janzen <pcj@primenet.com>, 1996. |