diff --git a/lib/libc/glibc/LICENSES b/lib/libc/glibc/LICENSES index 0e3a9fe39b..530893b1dc 100644 --- a/lib/libc/glibc/LICENSES +++ b/lib/libc/glibc/LICENSES @@ -246,7 +246,7 @@ Collected from libdes and modified for SECURE RPC by Martin Kuck 1994 This file is distributed under the terms of the GNU Lesser General Public License, version 2.1 or later - see the file COPYING.LIB for details. If you did not receive a copy of the license with this program, please -see to obtain a copy. +see to obtain a copy. The file inet/rcmd.c is under a UCB copyright and the following: @@ -388,4 +388,4 @@ Copyright 2001 by Stephen L. Moshier You should have received a copy of the GNU Lesser General Public License along with this library; if not, see - . */ + . */ diff --git a/lib/libc/glibc/bits/byteswap.h b/lib/libc/glibc/bits/byteswap.h index 83731c9eab..ccf613a9f6 100644 --- a/lib/libc/glibc/bits/byteswap.h +++ b/lib/libc/glibc/bits/byteswap.h @@ -1,5 +1,5 @@ /* Macros and inline functions to swap the order of bytes in integer values. - Copyright (C) 1997-2019 Free Software Foundation, Inc. + Copyright (C) 1997-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #if !defined _BYTESWAP_H && !defined _NETINET_IN_H && !defined _ENDIAN_H # error "Never use directly; include instead." diff --git a/lib/libc/glibc/bits/floatn-common.h b/lib/libc/glibc/bits/floatn-common.h index 980bfdaf89..6aa5ba12e4 100644 --- a/lib/libc/glibc/bits/floatn-common.h +++ b/lib/libc/glibc/bits/floatn-common.h @@ -1,6 +1,6 @@ /* Macros to control TS 18661-3 glibc features where the same definitions are appropriate for all platforms. - Copyright (C) 2017-2019 Free Software Foundation, Inc. + Copyright (C) 2017-2020 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 @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_FLOATN_COMMON_H #define _BITS_FLOATN_COMMON_H diff --git a/lib/libc/glibc/bits/libc-header-start.h b/lib/libc/glibc/bits/libc-header-start.h index 72efab29f2..b872a417be 100644 --- a/lib/libc/glibc/bits/libc-header-start.h +++ b/lib/libc/glibc/bits/libc-header-start.h @@ -1,5 +1,5 @@ /* Handle feature test macros at the start of a header. - Copyright (C) 2016-2019 Free Software Foundation, Inc. + Copyright (C) 2016-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* This header is internal to glibc and should not be included outside of glibc headers. Headers including it must define @@ -43,22 +43,38 @@ #endif /* ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__ - macro. */ + macro. Most but not all symbols enabled by that macro in TS + 18661-1 are enabled unconditionally in C2X; the symbols in Annex F + still require that macro in C2X. */ #undef __GLIBC_USE_IEC_60559_BFP_EXT #if defined __USE_GNU || defined __STDC_WANT_IEC_60559_BFP_EXT__ # define __GLIBC_USE_IEC_60559_BFP_EXT 1 #else # define __GLIBC_USE_IEC_60559_BFP_EXT 0 #endif +#undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X +#if __GLIBC_USE (IEC_60559_BFP_EXT) || __GLIBC_USE (ISOC2X) +# define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1 +#else +# define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 0 +#endif /* ISO/IEC TS 18661-4:2015 defines the - __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. */ + __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction + functions, the symbols from this TS are enabled unconditionally in + C2X. */ #undef __GLIBC_USE_IEC_60559_FUNCS_EXT #if defined __USE_GNU || defined __STDC_WANT_IEC_60559_FUNCS_EXT__ # define __GLIBC_USE_IEC_60559_FUNCS_EXT 1 #else # define __GLIBC_USE_IEC_60559_FUNCS_EXT 0 #endif +#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X +#if __GLIBC_USE (IEC_60559_FUNCS_EXT) || __GLIBC_USE (ISOC2X) +# define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1 +#else +# define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 0 +#endif /* ISO/IEC TS 18661-3:2015 defines the __STDC_WANT_IEC_60559_TYPES_EXT__ macro. */ diff --git a/lib/libc/glibc/bits/long-double.h b/lib/libc/glibc/bits/long-double.h index ed36d97cc9..6e16447e65 100644 --- a/lib/libc/glibc/bits/long-double.h +++ b/lib/libc/glibc/bits/long-double.h @@ -1,5 +1,5 @@ /* Properties of long double type. - Copyright (C) 2016-2019 Free Software Foundation, Inc. + Copyright (C) 2016-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* This header is included by . @@ -37,3 +37,4 @@ #ifndef __NO_LONG_DOUBLE_MATH # define __NO_LONG_DOUBLE_MATH 1 #endif +#define __LONG_DOUBLE_USES_FLOAT128 0 diff --git a/lib/libc/glibc/bits/select.h b/lib/libc/glibc/bits/select.h index 71b771f7c9..14ea12f437 100644 --- a/lib/libc/glibc/bits/select.h +++ b/lib/libc/glibc/bits/select.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2019 Free Software Foundation, Inc. +/* Copyright (C) 1997-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_SELECT_H # error "Never use directly; include instead." diff --git a/lib/libc/glibc/bits/signum-generic.h b/lib/libc/glibc/bits/signum-generic.h index 6fbbf20a31..504e5fb8c8 100644 --- a/lib/libc/glibc/bits/signum-generic.h +++ b/lib/libc/glibc/bits/signum-generic.h @@ -1,5 +1,5 @@ /* Signal number constants. Generic template. - Copyright (C) 1991-2019 Free Software Foundation, Inc. + Copyright (C) 1991-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_SIGNUM_GENERIC_H #define _BITS_SIGNUM_GENERIC_H 1 diff --git a/lib/libc/glibc/bits/stat.h b/lib/libc/glibc/bits/stat.h index c8d0665c3e..d6497c9aa7 100644 --- a/lib/libc/glibc/bits/stat.h +++ b/lib/libc/glibc/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2019 Free Software Foundation, Inc. +/* Copyright (C) 1992-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include directly; use instead." diff --git a/lib/libc/glibc/bits/stdint-intn.h b/lib/libc/glibc/bits/stdint-intn.h index fc7b43fc04..9e7bbc97ba 100644 --- a/lib/libc/glibc/bits/stdint-intn.h +++ b/lib/libc/glibc/bits/stdint-intn.h @@ -1,5 +1,5 @@ /* Define intN_t types. - Copyright (C) 2017-2019 Free Software Foundation, Inc. + Copyright (C) 2017-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_STDINT_INTN_H #define _BITS_STDINT_INTN_H 1 diff --git a/lib/libc/glibc/bits/stdlib-bsearch.h b/lib/libc/glibc/bits/stdlib-bsearch.h index 60bb70c2d2..2f248a6937 100644 --- a/lib/libc/glibc/bits/stdlib-bsearch.h +++ b/lib/libc/glibc/bits/stdlib-bsearch.h @@ -1,5 +1,5 @@ /* Perform binary search - inline version. - Copyright (C) 1991-2019 Free Software Foundation, Inc. + Copyright (C) 1991-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ __extern_inline void * bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size, diff --git a/lib/libc/glibc/bits/time64.h b/lib/libc/glibc/bits/time64.h index c0f8a24d8a..42f21fc86e 100644 --- a/lib/libc/glibc/bits/time64.h +++ b/lib/libc/glibc/bits/time64.h @@ -1,5 +1,5 @@ /* bits/time64.h -- underlying types for __time64_t. Generic version. - Copyright (C) 2018-2019 Free Software Foundation, Inc. + Copyright (C) 2018-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_TYPES_H # error "Never include directly; use instead." diff --git a/lib/libc/glibc/bits/timesize.h b/lib/libc/glibc/bits/timesize.h index 242334e4d8..71bf755069 100644 --- a/lib/libc/glibc/bits/timesize.h +++ b/lib/libc/glibc/bits/timesize.h @@ -1,5 +1,5 @@ /* Bit size of the time_t type at glibc build time, general case. - Copyright (C) 2018-2019 Free Software Foundation, Inc. + Copyright (C) 2018-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include diff --git a/lib/libc/glibc/bits/types/struct_sched_param.h b/lib/libc/glibc/bits/types/struct_sched_param.h index 8bf92c0fb0..db228a8d0a 100644 --- a/lib/libc/glibc/bits/types/struct_sched_param.h +++ b/lib/libc/glibc/bits/types/struct_sched_param.h @@ -1,5 +1,5 @@ /* Sched parameter structure. Generic version. - Copyright (C) 1996-2019 Free Software Foundation, Inc. + Copyright (C) 1996-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_TYPES_STRUCT_SCHED_PARAM #define _BITS_TYPES_STRUCT_SCHED_PARAM 1 diff --git a/lib/libc/glibc/bits/typesizes.h b/lib/libc/glibc/bits/typesizes.h index 41c8924336..014c9aab21 100644 --- a/lib/libc/glibc/bits/typesizes.h +++ b/lib/libc/glibc/bits/typesizes.h @@ -1,5 +1,5 @@ /* bits/typesizes.h -- underlying types for *_t. Generic version. - Copyright (C) 2002-2019 Free Software Foundation, Inc. + Copyright (C) 2002-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_TYPES_H # error "Never include directly; use instead." @@ -72,8 +72,13 @@ /* And for rlim_t and rlim64_t. */ # define __RLIM_T_MATCHES_RLIM64_T 1 + +/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */ +# define __STATFS_MATCHES_STATFS64 1 #else # define __RLIM_T_MATCHES_RLIM64_T 0 + +# define __STATFS_MATCHES_STATFS64 0 #endif /* Number of descriptors that can fit in an `fd_set'. */ diff --git a/lib/libc/glibc/bits/uintn-identity.h b/lib/libc/glibc/bits/uintn-identity.h index 23824f9f77..f2fc48b63d 100644 --- a/lib/libc/glibc/bits/uintn-identity.h +++ b/lib/libc/glibc/bits/uintn-identity.h @@ -1,5 +1,5 @@ /* Inline functions to return unsigned integer values unchanged. - Copyright (C) 2017-2019 Free Software Foundation, Inc. + Copyright (C) 2017-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #if !defined _NETINET_IN_H && !defined _ENDIAN_H # error "Never use directly; include or instead." diff --git a/lib/libc/glibc/bits/waitflags.h b/lib/libc/glibc/bits/waitflags.h index 45d8fb0164..a2f9646b22 100644 --- a/lib/libc/glibc/bits/waitflags.h +++ b/lib/libc/glibc/bits/waitflags.h @@ -1,5 +1,5 @@ /* Definitions of flag bits for `waitpid' et al. - Copyright (C) 1992-2019 Free Software Foundation, Inc. + Copyright (C) 1992-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #if !defined _SYS_WAIT_H && !defined _STDLIB_H # error "Never include directly; use instead." diff --git a/lib/libc/glibc/bits/waitstatus.h b/lib/libc/glibc/bits/waitstatus.h index 9d08786c04..66d88a0be6 100644 --- a/lib/libc/glibc/bits/waitstatus.h +++ b/lib/libc/glibc/bits/waitstatus.h @@ -1,5 +1,5 @@ /* Definitions of status bits for `wait' et al. - Copyright (C) 1992-2019 Free Software Foundation, Inc. + Copyright (C) 1992-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #if !defined _SYS_WAIT_H && !defined _STDLIB_H # error "Never include directly; use instead." diff --git a/lib/libc/glibc/csu/abi-note.S b/lib/libc/glibc/csu/abi-note.S index fa1f014a88..2b4b5f8824 100644 --- a/lib/libc/glibc/csu/abi-note.S +++ b/lib/libc/glibc/csu/abi-note.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support. - Copyright (C) 1997-2019 Free Software Foundation, Inc. + Copyright (C) 1997-2020 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 @@ -23,7 +23,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* Define an ELF note identifying the operating-system ABI that the executable was created for. The ELF note information identifies a diff --git a/lib/libc/glibc/csu/elf-init.c b/lib/libc/glibc/csu/elf-init.c index 9d192dfca0..b713c8b0fb 100644 --- a/lib/libc/glibc/csu/elf-init.c +++ b/lib/libc/glibc/csu/elf-init.c @@ -1,5 +1,5 @@ /* Startup support for ELF initializers/finalizers in the main executable. - Copyright (C) 2002-2019 Free Software Foundation, Inc. + Copyright (C) 2002-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include diff --git a/lib/libc/glibc/debug/stack_chk_fail_local.c b/lib/libc/glibc/debug/stack_chk_fail_local.c index ae5aa181a3..5d6dc84e6b 100644 --- a/lib/libc/glibc/debug/stack_chk_fail_local.c +++ b/lib/libc/glibc/debug/stack_chk_fail_local.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2019 Free Software Foundation, Inc. +/* Copyright (C) 2005-2020 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 @@ -30,7 +30,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include diff --git a/lib/libc/glibc/elf/elf.h b/lib/libc/glibc/elf/elf.h index 7c6d6094ed..2549a177d6 100644 --- a/lib/libc/glibc/elf/elf.h +++ b/lib/libc/glibc/elf/elf.h @@ -1,5 +1,5 @@ /* This file defines standard ELF types, structures, and macros. - Copyright (C) 1995-2019 Free Software Foundation, Inc. + Copyright (C) 1995-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _ELF_H #define _ELF_H 1 @@ -1715,6 +1715,7 @@ typedef struct #define SHT_MIPS_EH_REGION 0x70000027 #define SHT_MIPS_XLATE_OLD 0x70000028 #define SHT_MIPS_PDR_EXCEPTION 0x70000029 +#define SHT_MIPS_XHASH 0x7000002b /* Legal values for sh_flags field of Elf32_Shdr. */ @@ -1962,7 +1963,9 @@ typedef struct in a PIE as it stores a relative offset from the address of the tag rather than an absolute address. */ #define DT_MIPS_RLD_MAP_REL 0x70000035 -#define DT_MIPS_NUM 0x36 +/* GNU-style hash table with xlat. */ +#define DT_MIPS_XHASH 0x70000036 +#define DT_MIPS_NUM 0x37 /* Legal values for DT_MIPS_FLAGS Elf32_Dyn entry. */ diff --git a/lib/libc/glibc/include/bits/endian.h b/lib/libc/glibc/include/bits/endian.h new file mode 100644 index 0000000000..ad614f1c1a --- /dev/null +++ b/lib/libc/glibc/include/bits/endian.h @@ -0,0 +1 @@ +#include diff --git a/lib/libc/glibc/include/features.h b/lib/libc/glibc/include/features.h index bf47d881dd..b6ff1e9b7b 100644 --- a/lib/libc/glibc/include/features.h +++ b/lib/libc/glibc/include/features.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2019 Free Software Foundation, Inc. +/* Copyright (C) 1991-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _FEATURES_H #define _FEATURES_H 1 @@ -24,6 +24,7 @@ __STRICT_ANSI__ ISO Standard C. _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. + _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. __STDC_WANT_LIB_EXT2__ Extensions to ISO C99 from TR 27431-2:2010. __STDC_WANT_IEC_60559_BFP_EXT__ @@ -139,6 +140,7 @@ #undef __USE_GNU #undef __USE_FORTIFY_LEVEL #undef __KERNEL_STRICT_NAMES +#undef __GLIBC_USE_ISOC2X #undef __GLIBC_USE_DEPRECATED_GETS #undef __GLIBC_USE_DEPRECATED_SCANF @@ -195,6 +197,8 @@ # define _ISOC99_SOURCE 1 # undef _ISOC11_SOURCE # define _ISOC11_SOURCE 1 +# undef _ISOC2X_SOURCE +# define _ISOC2X_SOURCE 1 # undef _POSIX_SOURCE # define _POSIX_SOURCE 1 # undef _POSIX_C_SOURCE @@ -216,26 +220,37 @@ #if (defined _DEFAULT_SOURCE \ || (!defined __STRICT_ANSI__ \ && !defined _ISOC99_SOURCE && !defined _ISOC11_SOURCE \ + && !defined _ISOC2X_SOURCE \ && !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE \ && !defined _XOPEN_SOURCE)) # undef _DEFAULT_SOURCE # define _DEFAULT_SOURCE 1 #endif +/* This is to enable the ISO C2X extension. */ +#if (defined _ISOC2X_SOURCE \ + || (defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L)) +# define __GLIBC_USE_ISOC2X 1 +#else +# define __GLIBC_USE_ISOC2X 0 +#endif + /* This is to enable the ISO C11 extension. */ -#if (defined _ISOC11_SOURCE \ +#if (defined _ISOC11_SOURCE || defined _ISOC2X_SOURCE \ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L)) # define __USE_ISOC11 1 #endif /* This is to enable the ISO C99 extension. */ -#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \ +#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \ + || defined _ISOC2X_SOURCE \ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) # define __USE_ISOC99 1 #endif /* This is to enable the ISO C90 Amendment 1:1995 extension. */ -#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \ +#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \ + || defined _ISOC2X_SOURCE \ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199409L)) # define __USE_ISOC95 1 #endif @@ -439,7 +454,7 @@ /* Major and minor version number of the GNU C library package. Use these macros to test for features in specific releases. */ #define __GLIBC__ 2 -#define __GLIBC_MINOR__ 30 +#define __GLIBC_MINOR__ 31 #define __GLIBC_PREREQ(maj, min) \ ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min)) diff --git a/lib/libc/glibc/include/libc-pointer-arith.h b/lib/libc/glibc/include/libc-pointer-arith.h index c5390a9be4..b4d716c727 100644 --- a/lib/libc/glibc/include/libc-pointer-arith.h +++ b/lib/libc/glibc/include/libc-pointer-arith.h @@ -1,5 +1,5 @@ /* Helper macros for pointer arithmetic. - Copyright (C) 2012-2019 Free Software Foundation, Inc. + Copyright (C) 2012-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _LIBC_POINTER_ARITH_H #define _LIBC_POINTER_ARITH_H 1 diff --git a/lib/libc/glibc/include/libc-symbols.h b/lib/libc/glibc/include/libc-symbols.h index b68ec4b7f5..685e20fdc0 100644 --- a/lib/libc/glibc/include/libc-symbols.h +++ b/lib/libc/glibc/include/libc-symbols.h @@ -1,6 +1,6 @@ /* Support macros for making weak and strong aliases for symbols, and for using symbol sets and linker warnings with GNU ld. - Copyright (C) 1995-2019 Free Software Foundation, Inc. + Copyright (C) 1995-2020 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 @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _LIBC_SYMBOLS_H #define _LIBC_SYMBOLS_H 1 diff --git a/lib/libc/glibc/include/stap-probe.h b/lib/libc/glibc/include/stap-probe.h index 85f41c9162..3c24ac640e 100644 --- a/lib/libc/glibc/include/stap-probe.h +++ b/lib/libc/glibc/include/stap-probe.h @@ -1,5 +1,5 @@ /* Macros for defining Systemtap static probe points. - Copyright (C) 2012-2019 Free Software Foundation, Inc. + Copyright (C) 2012-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _STAP_PROBE_H #define _STAP_PROBE_H 1 diff --git a/lib/libc/glibc/include/stdc-predef.h b/lib/libc/glibc/include/stdc-predef.h index 5cc5eef22f..eaf0a6aea8 100644 --- a/lib/libc/glibc/include/stdc-predef.h +++ b/lib/libc/glibc/include/stdc-predef.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2019 Free Software Foundation, Inc. +/* Copyright (C) 1991-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _STDC_PREDEF_H #define _STDC_PREDEF_H 1 diff --git a/lib/libc/glibc/include/stdlib.h b/lib/libc/glibc/include/stdlib.h index 114e12d255..1fab78aa16 100644 --- a/lib/libc/glibc/include/stdlib.h +++ b/lib/libc/glibc/include/stdlib.h @@ -202,9 +202,12 @@ libc_hidden_proto (____strtoll_l_internal) libc_hidden_proto (____strtoul_l_internal) libc_hidden_proto (____strtoull_l_internal) +#include libc_hidden_proto (strtof) libc_hidden_proto (strtod) +#if __LONG_DOUBLE_USES_FLOAT128 == 0 libc_hidden_proto (strtold) +#endif libc_hidden_proto (strtol) libc_hidden_proto (strtoll) libc_hidden_proto (strtoul) diff --git a/lib/libc/glibc/io/bits/statx.h b/lib/libc/glibc/io/bits/statx.h index b3147bfa8a..e63e6988c2 100644 --- a/lib/libc/glibc/io/bits/statx.h +++ b/lib/libc/glibc/io/bits/statx.h @@ -1,5 +1,5 @@ /* statx-related definitions and declarations. Generic version. - Copyright (C) 2018-2019 Free Software Foundation, Inc. + Copyright (C) 2018-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* This interface is based on in Linux. */ diff --git a/lib/libc/glibc/io/fstat.c b/lib/libc/glibc/io/fstat.c index a25c108966..6ce077dc4a 100644 --- a/lib/libc/glibc/io/fstat.c +++ b/lib/libc/glibc/io/fstat.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2019 Free Software Foundation, Inc. +/* Copyright (C) 1996-2020 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 @@ -30,7 +30,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include diff --git a/lib/libc/glibc/io/fstat64.c b/lib/libc/glibc/io/fstat64.c index 9cc796c168..c4dd3acd60 100644 --- a/lib/libc/glibc/io/fstat64.c +++ b/lib/libc/glibc/io/fstat64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2019 Free Software Foundation, Inc. +/* Copyright (C) 1996-2020 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 @@ -30,7 +30,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include diff --git a/lib/libc/glibc/io/fstatat.c b/lib/libc/glibc/io/fstatat.c index 57786b97ac..edc773487a 100644 --- a/lib/libc/glibc/io/fstatat.c +++ b/lib/libc/glibc/io/fstatat.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2019 Free Software Foundation, Inc. +/* Copyright (C) 2005-2020 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 @@ -30,7 +30,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include diff --git a/lib/libc/glibc/io/fstatat64.c b/lib/libc/glibc/io/fstatat64.c index 602ae9ebcc..b57133bd90 100644 --- a/lib/libc/glibc/io/fstatat64.c +++ b/lib/libc/glibc/io/fstatat64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2019 Free Software Foundation, Inc. +/* Copyright (C) 2005-2020 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 @@ -30,7 +30,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include diff --git a/lib/libc/glibc/io/lstat.c b/lib/libc/glibc/io/lstat.c index 5c191376ee..7134741106 100644 --- a/lib/libc/glibc/io/lstat.c +++ b/lib/libc/glibc/io/lstat.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2019 Free Software Foundation, Inc. +/* Copyright (C) 1996-2020 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 @@ -30,7 +30,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include diff --git a/lib/libc/glibc/io/lstat64.c b/lib/libc/glibc/io/lstat64.c index 52591eea92..a890da71a8 100644 --- a/lib/libc/glibc/io/lstat64.c +++ b/lib/libc/glibc/io/lstat64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2019 Free Software Foundation, Inc. +/* Copyright (C) 1996-2020 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 @@ -30,7 +30,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include diff --git a/lib/libc/glibc/io/mknod.c b/lib/libc/glibc/io/mknod.c index ca86d74e99..ac96829230 100644 --- a/lib/libc/glibc/io/mknod.c +++ b/lib/libc/glibc/io/mknod.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2019 Free Software Foundation, Inc. +/* Copyright (C) 1995-2020 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 @@ -30,7 +30,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include diff --git a/lib/libc/glibc/io/mknodat.c b/lib/libc/glibc/io/mknodat.c index dfe5935aa1..65c9f1aa9c 100644 --- a/lib/libc/glibc/io/mknodat.c +++ b/lib/libc/glibc/io/mknodat.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2019 Free Software Foundation, Inc. +/* Copyright (C) 1995-2020 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 @@ -30,7 +30,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include diff --git a/lib/libc/glibc/io/stat.c b/lib/libc/glibc/io/stat.c index bb59add17a..8c3cd877c8 100644 --- a/lib/libc/glibc/io/stat.c +++ b/lib/libc/glibc/io/stat.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2019 Free Software Foundation, Inc. +/* Copyright (C) 1996-2020 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 @@ -30,7 +30,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include diff --git a/lib/libc/glibc/io/stat64.c b/lib/libc/glibc/io/stat64.c index 1a00582294..8b6b662f3a 100644 --- a/lib/libc/glibc/io/stat64.c +++ b/lib/libc/glibc/io/stat64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2019 Free Software Foundation, Inc. +/* Copyright (C) 1996-2020 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 @@ -30,7 +30,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include diff --git a/lib/libc/glibc/io/sys/stat.h b/lib/libc/glibc/io/sys/stat.h index 2de5eb65d9..ce014d03a5 100644 --- a/lib/libc/glibc/io/sys/stat.h +++ b/lib/libc/glibc/io/sys/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2019 Free Software Foundation, Inc. +/* Copyright (C) 1991-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * POSIX Standard: 5.6 File Characteristics diff --git a/lib/libc/glibc/locale/bits/types/__locale_t.h b/lib/libc/glibc/locale/bits/types/__locale_t.h index 028dd05d0e..53e9a9c41d 100644 --- a/lib/libc/glibc/locale/bits/types/__locale_t.h +++ b/lib/libc/glibc/locale/bits/types/__locale_t.h @@ -1,5 +1,5 @@ /* Definition of struct __locale_struct and __locale_t. - Copyright (C) 1997-2019 Free Software Foundation, Inc. + Copyright (C) 1997-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_TYPES___LOCALE_T_H #define _BITS_TYPES___LOCALE_T_H 1 diff --git a/lib/libc/glibc/locale/bits/types/locale_t.h b/lib/libc/glibc/locale/bits/types/locale_t.h index fb1e14e84b..6156631d75 100644 --- a/lib/libc/glibc/locale/bits/types/locale_t.h +++ b/lib/libc/glibc/locale/bits/types/locale_t.h @@ -1,5 +1,5 @@ /* Definition of locale_t. - Copyright (C) 2017-2019 Free Software Foundation, Inc. + Copyright (C) 2017-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_TYPES_LOCALE_T_H #define _BITS_TYPES_LOCALE_T_H 1 diff --git a/lib/libc/glibc/misc/sys/cdefs.h b/lib/libc/glibc/misc/sys/cdefs.h index f1bd994a10..ff7144f3f3 100644 --- a/lib/libc/glibc/misc/sys/cdefs.h +++ b/lib/libc/glibc/misc/sys/cdefs.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2019 Free Software Foundation, Inc. +/* Copyright (C) 1992-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_CDEFS_H #define _SYS_CDEFS_H 1 @@ -412,14 +412,6 @@ # define __glibc_has_attribute(attr) 0 #endif -#ifdef __has_include -/* Do not use a function-like macro, so that __has_include can inhibit - macro expansion. */ -# define __glibc_has_include __has_include -#else -# define __glibc_has_include(header) 0 -#endif - #if (!defined _Noreturn \ && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \ && !__GNUC_PREREQ (4,7)) diff --git a/lib/libc/glibc/misc/sys/select.h b/lib/libc/glibc/misc/sys/select.h index 8b10702bdc..29d011c2d5 100644 --- a/lib/libc/glibc/misc/sys/select.h +++ b/lib/libc/glibc/misc/sys/select.h @@ -1,5 +1,5 @@ /* `fd_set' type and related macros, and `select'/`pselect' declarations. - Copyright (C) 1996-2019 Free Software Foundation, Inc. + Copyright (C) 1996-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* POSIX 1003.1g: 6.2 Select from File Descriptor Sets */ diff --git a/lib/libc/glibc/nptl/pthread_atfork.c b/lib/libc/glibc/nptl/pthread_atfork.c index 70a2273513..bfb4af9053 100644 --- a/lib/libc/glibc/nptl/pthread_atfork.c +++ b/lib/libc/glibc/nptl/pthread_atfork.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2019 Free Software Foundation, Inc. +/* Copyright (C) 2002-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -31,18 +31,17 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ extern int __pthread_atfork (void (*prepare) (void), void (*parent) (void), - void (*child) (void)); + void (*child) (void)); extern int __register_atfork (void (*__prepare) (void), - void (*__parent) (void), - void (*__child) (void), - void *dso_handle); + void (*__parent) (void), + void (*__child) (void), + void *dso_handle); libc_hidden_proto (__register_atfork) extern void *__dso_handle __attribute__ ((__visibility__ ("hidden"))); - /* Hide the symbol so that no definition but the one locally in the executable or DSO is used. */ int diff --git a/lib/libc/glibc/posix/bits/cpu-set.h b/lib/libc/glibc/posix/bits/cpu-set.h index b0bfe7963a..427a59975f 100644 --- a/lib/libc/glibc/posix/bits/cpu-set.h +++ b/lib/libc/glibc/posix/bits/cpu-set.h @@ -1,6 +1,6 @@ /* Definition of the cpu_set_t structure used by the POSIX 1003.1b-1993 scheduling interface. - Copyright (C) 1996-2019 Free Software Foundation, Inc. + Copyright (C) 1996-2020 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 @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_CPU_SET_H #define _BITS_CPU_SET_H 1 diff --git a/lib/libc/glibc/posix/bits/types.h b/lib/libc/glibc/posix/bits/types.h index cb737caff0..adba926b45 100644 --- a/lib/libc/glibc/posix/bits/types.h +++ b/lib/libc/glibc/posix/bits/types.h @@ -1,5 +1,5 @@ /* bits/types.h -- definitions of __*_t types underlying *_t types. - Copyright (C) 2002-2019 Free Software Foundation, Inc. + Copyright (C) 2002-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * Never include this file directly; use instead. diff --git a/lib/libc/glibc/posix/sys/types.h b/lib/libc/glibc/posix/sys/types.h index 0e37b1ce6a..c9241e40b4 100644 --- a/lib/libc/glibc/posix/sys/types.h +++ b/lib/libc/glibc/posix/sys/types.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2019 Free Software Foundation, Inc. +/* Copyright (C) 1991-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * POSIX Standard: 2.6 Primitive System Data Types diff --git a/lib/libc/glibc/signal/signal.h b/lib/libc/glibc/signal/signal.h index 4c0de7f6ce..40825e95ec 100644 --- a/lib/libc/glibc/signal/signal.h +++ b/lib/libc/glibc/signal/signal.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2019 Free Software Foundation, Inc. +/* Copyright (C) 1991-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * ISO C99 Standard: 7.14 Signal handling diff --git a/lib/libc/glibc/stdlib/alloca.h b/lib/libc/glibc/stdlib/alloca.h index ff85901357..bd44688720 100644 --- a/lib/libc/glibc/stdlib/alloca.h +++ b/lib/libc/glibc/stdlib/alloca.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2019 Free Software Foundation, Inc. +/* Copyright (C) 1992-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _ALLOCA_H #define _ALLOCA_H 1 diff --git a/lib/libc/glibc/stdlib/at_quick_exit.c b/lib/libc/glibc/stdlib/at_quick_exit.c index 6b89428f30..5176f5e5fd 100644 --- a/lib/libc/glibc/stdlib/at_quick_exit.c +++ b/lib/libc/glibc/stdlib/at_quick_exit.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2019 Free Software Foundation, Inc. +/* Copyright (C) 1991-2020 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 @@ -30,7 +30,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ extern void *__dso_handle __attribute__ ((__visibility__ ("hidden"))); extern int __cxa_at_quick_exit (void (*func) (void *), void *d); diff --git a/lib/libc/glibc/stdlib/atexit.c b/lib/libc/glibc/stdlib/atexit.c index fcfab843ef..181101de38 100644 --- a/lib/libc/glibc/stdlib/atexit.c +++ b/lib/libc/glibc/stdlib/atexit.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2019 Free Software Foundation, Inc. +/* Copyright (C) 1991-2020 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 @@ -30,7 +30,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ extern int __cxa_atexit (void (*func) (void *), void *arg, void *d); libc_hidden_proto (__cxa_atexit); diff --git a/lib/libc/glibc/stdlib/bits/stdlib-float.h b/lib/libc/glibc/stdlib/bits/stdlib-float.h index b6f4877cf6..4a414ae66c 100644 --- a/lib/libc/glibc/stdlib/bits/stdlib-float.h +++ b/lib/libc/glibc/stdlib/bits/stdlib-float.h @@ -1,5 +1,5 @@ /* Floating-point inline functions for stdlib.h. - Copyright (C) 2012-2019 Free Software Foundation, Inc. + Copyright (C) 2012-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _STDLIB_H # error "Never use directly; include instead." diff --git a/lib/libc/glibc/stdlib/exit.h b/lib/libc/glibc/stdlib/exit.h index 6fab49c94f..6010828148 100644 --- a/lib/libc/glibc/stdlib/exit.h +++ b/lib/libc/glibc/stdlib/exit.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2019 Free Software Foundation, Inc. +/* Copyright (C) 1991-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _EXIT_H #define _EXIT_H 1 diff --git a/lib/libc/glibc/stdlib/stdlib.h b/lib/libc/glibc/stdlib/stdlib.h index a9fd989d39..e3470631e1 100644 --- a/lib/libc/glibc/stdlib/stdlib.h +++ b/lib/libc/glibc/stdlib/stdlib.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2019 Free Software Foundation, Inc. +/* Copyright (C) 1991-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * ISO C99 Standard: 7.20 General utilities @@ -208,7 +208,7 @@ extern unsigned long long int strtoull (const char *__restrict __nptr, #endif /* ISO C99 or use MISC. */ /* Convert a floating-point number to a string. */ -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) extern int strfromd (char *__dest, size_t __size, const char *__format, double __f) __THROW __nonnull ((3)); diff --git a/lib/libc/glibc/string/bits/endian.h b/lib/libc/glibc/string/bits/endian.h new file mode 100644 index 0000000000..1892b999d1 --- /dev/null +++ b/lib/libc/glibc/string/bits/endian.h @@ -0,0 +1,49 @@ +/* Endian macros for string.h functions + Copyright (C) 1992-2020 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 + . */ + +#ifndef _BITS_ENDIAN_H +#define _BITS_ENDIAN_H 1 + +/* Definitions for byte order, according to significance of bytes, + from low addresses to high addresses. The value is what you get by + putting '4' in the most significant byte, '3' in the second most + significant byte, '2' in the second least significant byte, and '1' + in the least significant byte, and then writing down one digit for + each byte, starting with the byte at the lowest address at the left, + and proceeding to the byte with the highest address at the right. */ + +#define __LITTLE_ENDIAN 1234 +#define __BIG_ENDIAN 4321 +#define __PDP_ENDIAN 3412 + +/* This file defines `__BYTE_ORDER' for the particular machine. */ +#include + +/* Some machines may need to use a different endianness for floating point + values. */ +#ifndef __FLOAT_WORD_ORDER +# define __FLOAT_WORD_ORDER __BYTE_ORDER +#endif + +#if __BYTE_ORDER == __LITTLE_ENDIAN +# define __LONG_LONG_PAIR(HI, LO) LO, HI +#elif __BYTE_ORDER == __BIG_ENDIAN +# define __LONG_LONG_PAIR(HI, LO) HI, LO +#endif + +#endif /* bits/endian.h */ diff --git a/lib/libc/glibc/string/endian.h b/lib/libc/glibc/string/endian.h index e62b735625..0256ee4446 100644 --- a/lib/libc/glibc/string/endian.h +++ b/lib/libc/glibc/string/endian.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2019 Free Software Foundation, Inc. +/* Copyright (C) 1992-2020 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 @@ -13,48 +13,23 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _ENDIAN_H #define _ENDIAN_H 1 #include -/* Definitions for byte order, according to significance of bytes, - from low addresses to high addresses. The value is what you get by - putting '4' in the most significant byte, '3' in the second most - significant byte, '2' in the second least significant byte, and '1' - in the least significant byte, and then writing down one digit for - each byte, starting with the byte at the lowest address at the left, - and proceeding to the byte with the highest address at the right. */ - -#define __LITTLE_ENDIAN 1234 -#define __BIG_ENDIAN 4321 -#define __PDP_ENDIAN 3412 - -/* This file defines `__BYTE_ORDER' for the particular machine. */ +/* Get the definitions of __*_ENDIAN, __BYTE_ORDER, and __FLOAT_WORD_ORDER. */ #include -/* Some machines may need to use a different endianness for floating point - values. */ -#ifndef __FLOAT_WORD_ORDER -# define __FLOAT_WORD_ORDER __BYTE_ORDER -#endif - -#ifdef __USE_MISC +#ifdef __USE_MISC # define LITTLE_ENDIAN __LITTLE_ENDIAN # define BIG_ENDIAN __BIG_ENDIAN # define PDP_ENDIAN __PDP_ENDIAN # define BYTE_ORDER __BYTE_ORDER #endif -#if __BYTE_ORDER == __LITTLE_ENDIAN -# define __LONG_LONG_PAIR(HI, LO) LO, HI -#elif __BYTE_ORDER == __BIG_ENDIAN -# define __LONG_LONG_PAIR(HI, LO) HI, LO -#endif - - #if defined __USE_MISC && !defined __ASSEMBLER__ /* Conversion interfaces. */ # include diff --git a/lib/libc/glibc/sysdeps/aarch64/bits/endian.h b/lib/libc/glibc/sysdeps/aarch64/bits/endian.h deleted file mode 100644 index c0a40e082a..0000000000 --- a/lib/libc/glibc/sysdeps/aarch64/bits/endian.h +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (C) 1997-2019 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 - . */ - -#ifndef _ENDIAN_H -# error "Never use directly; include instead." -#endif - -/* AArch64 can be either big or little endian. */ -#ifdef __AARCH64EB__ -# define __BYTE_ORDER __BIG_ENDIAN -#else -# define __BYTE_ORDER __LITTLE_ENDIAN -#endif - -#define __FLOAT_WORD_ORDER __BYTE_ORDER diff --git a/lib/libc/glibc/sysdeps/aarch64/bits/endianness.h b/lib/libc/glibc/sysdeps/aarch64/bits/endianness.h new file mode 100644 index 0000000000..300ebc8f9c --- /dev/null +++ b/lib/libc/glibc/sysdeps/aarch64/bits/endianness.h @@ -0,0 +1,15 @@ +#ifndef _BITS_ENDIANNESS_H +#define _BITS_ENDIANNESS_H 1 + +#ifndef _BITS_ENDIAN_H +# error "Never use directly; include instead." +#endif + +/* AArch64 has selectable endianness. */ +#ifdef __AARCH64EB__ +# define __BYTE_ORDER __BIG_ENDIAN +#else +# define __BYTE_ORDER __LITTLE_ENDIAN +#endif + +#endif /* bits/endianness.h */ diff --git a/lib/libc/glibc/sysdeps/aarch64/crti.S b/lib/libc/glibc/sysdeps/aarch64/crti.S index d4e7dfcf5c..1728eac37a 100644 --- a/lib/libc/glibc/sysdeps/aarch64/crti.S +++ b/lib/libc/glibc/sysdeps/aarch64/crti.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for AArch64. - Copyright (C) 1995-2019 Free Software Foundation, Inc. + Copyright (C) 1995-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -32,7 +32,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* crti.S puts a function prologue at the beginning of the .init and .fini sections and defines global symbols for those addresses, so diff --git a/lib/libc/glibc/sysdeps/aarch64/crtn.S b/lib/libc/glibc/sysdeps/aarch64/crtn.S index 363f752460..c3e97cc449 100644 --- a/lib/libc/glibc/sysdeps/aarch64/crtn.S +++ b/lib/libc/glibc/sysdeps/aarch64/crtn.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for AArch64. - Copyright (C) 1995-2019 Free Software Foundation, Inc. + Copyright (C) 1995-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -32,7 +32,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* crtn.S puts function epilogues in the .init and .fini sections corresponding to the prologues in crti.S. */ diff --git a/lib/libc/glibc/sysdeps/aarch64/dl-sysdep.h b/lib/libc/glibc/sysdeps/aarch64/dl-sysdep.h index 0db7125fbe..a4403d5f0d 100644 --- a/lib/libc/glibc/sysdeps/aarch64/dl-sysdep.h +++ b/lib/libc/glibc/sysdeps/aarch64/dl-sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2019 Free Software Foundation, Inc. +/* Copyright (C) 2002-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include_next diff --git a/lib/libc/glibc/sysdeps/aarch64/nptl/bits/pthreadtypes-arch.h b/lib/libc/glibc/sysdeps/aarch64/nptl/bits/pthreadtypes-arch.h index 8a2a5155db..b0816653d6 100644 --- a/lib/libc/glibc/sysdeps/aarch64/nptl/bits/pthreadtypes-arch.h +++ b/lib/libc/glibc/sysdeps/aarch64/nptl/bits/pthreadtypes-arch.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2019 Free Software Foundation, Inc. +/* Copyright (C) 2002-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -14,12 +14,12 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_PTHREADTYPES_ARCH_H #define _BITS_PTHREADTYPES_ARCH_H 1 -#include +#include #ifdef __ILP32__ # define __SIZEOF_PTHREAD_ATTR_T 32 @@ -41,31 +41,7 @@ #define __SIZEOF_PTHREAD_COND_T 48 #define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 -/* Definitions for internal mutex struct. */ -#define __PTHREAD_COMPAT_PADDING_MID -#define __PTHREAD_COMPAT_PADDING_END -#define __PTHREAD_MUTEX_LOCK_ELISION 0 -#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 0 -#define __PTHREAD_MUTEX_USE_UNION 0 - #define __LOCK_ALIGNMENT #define __ONCE_ALIGNMENT -struct __pthread_rwlock_arch_t -{ - unsigned int __readers; - unsigned int __writers; - unsigned int __wrphase_futex; - unsigned int __writers_futex; - unsigned int __pad3; - unsigned int __pad4; - int __cur_writer; - int __shared; - unsigned long int __pad1; - unsigned long int __pad2; - unsigned int __flags; -}; - -#define __PTHREAD_RWLOCK_ELISION_EXTRA 0 - #endif /* bits/pthreadtypes.h */ diff --git a/lib/libc/glibc/sysdeps/aarch64/start.S b/lib/libc/glibc/sysdeps/aarch64/start.S index f5e9b9c223..d96cf57e2d 100644 --- a/lib/libc/glibc/sysdeps/aarch64/start.S +++ b/lib/libc/glibc/sysdeps/aarch64/start.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2019 Free Software Foundation, Inc. +/* Copyright (C) 1995-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #include diff --git a/lib/libc/glibc/sysdeps/aarch64/sysdep.h b/lib/libc/glibc/sysdeps/aarch64/sysdep.h index d3ff685895..604c489170 100644 --- a/lib/libc/glibc/sysdeps/aarch64/sysdep.h +++ b/lib/libc/glibc/sysdeps/aarch64/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2019 Free Software Foundation, Inc. +/* Copyright (C) 1997-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _AARCH64_SYSDEP_H #define _AARCH64_SYSDEP_H diff --git a/lib/libc/glibc/sysdeps/alpha/bits/endian.h b/lib/libc/glibc/sysdeps/alpha/bits/endian.h deleted file mode 100644 index 8a16e14e24..0000000000 --- a/lib/libc/glibc/sysdeps/alpha/bits/endian.h +++ /dev/null @@ -1,7 +0,0 @@ -/* Alpha is little-endian. */ - -#ifndef _ENDIAN_H -# error "Never use directly; include instead." -#endif - -#define __BYTE_ORDER __LITTLE_ENDIAN diff --git a/lib/libc/glibc/sysdeps/alpha/bits/endianness.h b/lib/libc/glibc/sysdeps/alpha/bits/endianness.h new file mode 100644 index 0000000000..69f9a147f6 --- /dev/null +++ b/lib/libc/glibc/sysdeps/alpha/bits/endianness.h @@ -0,0 +1,11 @@ +#ifndef _BITS_ENDIANNESS_H +#define _BITS_ENDIANNESS_H 1 + +#ifndef _BITS_ENDIAN_H +# error "Never use directly; include instead." +#endif + +/* Alpha is little-endian. */ +#define __BYTE_ORDER __LITTLE_ENDIAN + +#endif /* bits/endianness.h */ diff --git a/lib/libc/glibc/sysdeps/alpha/crti.S b/lib/libc/glibc/sysdeps/alpha/crti.S index 05b62a147d..da47441d10 100644 --- a/lib/libc/glibc/sysdeps/alpha/crti.S +++ b/lib/libc/glibc/sysdeps/alpha/crti.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for Alpha. - Copyright (C) 2001-2019 Free Software Foundation, Inc. + Copyright (C) 2001-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ /* crti.S puts a function prologue at the beginning of the .init and .fini sections and defines global symbols for those addresses, so diff --git a/lib/libc/glibc/sysdeps/alpha/crtn.S b/lib/libc/glibc/sysdeps/alpha/crtn.S index cdb4d1c54d..eda2394bd2 100644 --- a/lib/libc/glibc/sysdeps/alpha/crtn.S +++ b/lib/libc/glibc/sysdeps/alpha/crtn.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for Alpha. - Copyright (C) 2001-2019 Free Software Foundation, Inc. + Copyright (C) 2001-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ /* crtn.S puts function epilogues in the .init and .fini sections corresponding to the prologues in crti.S. */ diff --git a/lib/libc/glibc/sysdeps/alpha/dl-sysdep.h b/lib/libc/glibc/sysdeps/alpha/dl-sysdep.h index f8c0029002..2d3edc7998 100644 --- a/lib/libc/glibc/sysdeps/alpha/dl-sysdep.h +++ b/lib/libc/glibc/sysdeps/alpha/dl-sysdep.h @@ -1,5 +1,5 @@ /* System-specific settings for dynamic linker code. Alpha version. - Copyright (C) 2002-2019 Free Software Foundation, Inc. + Copyright (C) 2002-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #include_next diff --git a/lib/libc/glibc/sysdeps/alpha/start.S b/lib/libc/glibc/sysdeps/alpha/start.S index 85e4156010..a59898c4c0 100644 --- a/lib/libc/glibc/sysdeps/alpha/start.S +++ b/lib/libc/glibc/sysdeps/alpha/start.S @@ -1,5 +1,5 @@ /* Startup code for Alpha/ELF. - Copyright (C) 1993-2019 Free Software Foundation, Inc. + Copyright (C) 1993-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson @@ -32,7 +32,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #include diff --git a/lib/libc/glibc/sysdeps/arm/bits/endian.h b/lib/libc/glibc/sysdeps/arm/bits/endian.h deleted file mode 100644 index f49f6ab1c9..0000000000 --- a/lib/libc/glibc/sysdeps/arm/bits/endian.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef _ENDIAN_H -# error "Never use directly; include instead." -#endif - -/* ARM can be either big or little endian. */ -#ifdef __ARMEB__ -#define __BYTE_ORDER __BIG_ENDIAN -#else -#define __BYTE_ORDER __LITTLE_ENDIAN -#endif diff --git a/lib/libc/glibc/sysdeps/arm/bits/endianness.h b/lib/libc/glibc/sysdeps/arm/bits/endianness.h new file mode 100644 index 0000000000..2d671fff66 --- /dev/null +++ b/lib/libc/glibc/sysdeps/arm/bits/endianness.h @@ -0,0 +1,15 @@ +#ifndef _BITS_ENDIANNESS_H +#define _BITS_ENDIANNESS_H 1 + +#ifndef _BITS_ENDIAN_H +# error "Never use directly; include instead." +#endif + +/* ARM has selectable endianness. */ +#ifdef __ARMEB__ +#define __BYTE_ORDER __BIG_ENDIAN +#else +#define __BYTE_ORDER __LITTLE_ENDIAN +#endif + +#endif /* bits/endianness.h */ diff --git a/lib/libc/glibc/sysdeps/arm/crti.S b/lib/libc/glibc/sysdeps/arm/crti.S index 26dbba66a3..8169783267 100644 --- a/lib/libc/glibc/sysdeps/arm/crti.S +++ b/lib/libc/glibc/sysdeps/arm/crti.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for ARM. - Copyright (C) 1995-2019 Free Software Foundation, Inc. + Copyright (C) 1995-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ /* crti.S puts a function prologue at the beginning of the .init and .fini sections and defines global symbols for those addresses, so diff --git a/lib/libc/glibc/sysdeps/arm/crtn.S b/lib/libc/glibc/sysdeps/arm/crtn.S index 8f91c8d88b..d60f9f05de 100644 --- a/lib/libc/glibc/sysdeps/arm/crtn.S +++ b/lib/libc/glibc/sysdeps/arm/crtn.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for ARM. - Copyright (C) 1995-2019 Free Software Foundation, Inc. + Copyright (C) 1995-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ /* Always build .init and .fini sections in ARM mode. */ #define NO_THUMB diff --git a/lib/libc/glibc/sysdeps/arm/dl-sysdep.h b/lib/libc/glibc/sysdeps/arm/dl-sysdep.h index 0cdb5efb07..6acfd62f01 100644 --- a/lib/libc/glibc/sysdeps/arm/dl-sysdep.h +++ b/lib/libc/glibc/sysdeps/arm/dl-sysdep.h @@ -1,5 +1,5 @@ /* System-specific settings for dynamic linker code. Alpha version. - Copyright (C) 2002-2019 Free Software Foundation, Inc. + Copyright (C) 2002-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #include_next diff --git a/lib/libc/glibc/sysdeps/arm/start.S b/lib/libc/glibc/sysdeps/arm/start.S index a05f8a4651..2ff56179d2 100644 --- a/lib/libc/glibc/sysdeps/arm/start.S +++ b/lib/libc/glibc/sysdeps/arm/start.S @@ -1,5 +1,5 @@ /* Startup code for ARM & ELF - Copyright (C) 1995-2019 Free Software Foundation, Inc. + Copyright (C) 1995-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ /* This is the canonical entry point, usually the first thing in the text segment. diff --git a/lib/libc/glibc/sysdeps/arm/sysdep.h b/lib/libc/glibc/sysdeps/arm/sysdep.h index b283ce9600..5fff50dbfa 100644 --- a/lib/libc/glibc/sysdeps/arm/sysdep.h +++ b/lib/libc/glibc/sysdeps/arm/sysdep.h @@ -1,5 +1,5 @@ /* Assembler macros for ARM. - Copyright (C) 1997-2019 Free Software Foundation, Inc. + Copyright (C) 1997-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #include #include diff --git a/lib/libc/glibc/sysdeps/generic/dl-dtprocnum.h b/lib/libc/glibc/sysdeps/generic/dl-dtprocnum.h index 086b405310..27fc351f4f 100644 --- a/lib/libc/glibc/sysdeps/generic/dl-dtprocnum.h +++ b/lib/libc/glibc/sysdeps/generic/dl-dtprocnum.h @@ -1,5 +1,5 @@ /* Configuration of lookup functions. - Copyright (C) 2000-2019 Free Software Foundation, Inc. + Copyright (C) 2000-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* Number of extra dynamic section entries for this architecture. By default there are none. */ diff --git a/lib/libc/glibc/sysdeps/generic/dl-sysdep.h b/lib/libc/glibc/sysdeps/generic/dl-sysdep.h index 34fbffe22d..d9e998dfc0 100644 --- a/lib/libc/glibc/sysdeps/generic/dl-sysdep.h +++ b/lib/libc/glibc/sysdeps/generic/dl-sysdep.h @@ -1,5 +1,5 @@ /* System-specific settings for dynamic linker code. Generic version. - Copyright (C) 2002-2019 Free Software Foundation, Inc. + Copyright (C) 2002-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* No multiple inclusion protection need here because it's just macros. We don't want to use _DL_SYSDEP_H in case we are #include_next'd. */ diff --git a/lib/libc/glibc/sysdeps/generic/dwarf2.h b/lib/libc/glibc/sysdeps/generic/dwarf2.h index 79f2c1c09b..4c7de0d873 100644 --- a/lib/libc/glibc/sysdeps/generic/dwarf2.h +++ b/lib/libc/glibc/sysdeps/generic/dwarf2.h @@ -1,6 +1,6 @@ /* Declarations and definitions of codes relating to the DWARF2 symbolic debugging information format. - Copyright (C) 1992-2019 Free Software Foundation, Inc. + Copyright (C) 1992-2020 Free Software Foundation, Inc. Contributed by Gary Funck (gary@intrepid.com). Derived from the DWARF 1 implementation written by Ron Guilmette (rfg@monkeys.com). @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _DWARF2_H #define _DWARF2_H 1 diff --git a/lib/libc/glibc/sysdeps/generic/libc-lock.h b/lib/libc/glibc/sysdeps/generic/libc-lock.h index 9752ba1b6f..7f184f942d 100644 --- a/lib/libc/glibc/sysdeps/generic/libc-lock.h +++ b/lib/libc/glibc/sysdeps/generic/libc-lock.h @@ -1,5 +1,5 @@ /* libc-internal interface for mutex locks. Stub version. - Copyright (C) 1996-2019 Free Software Foundation, Inc. + Copyright (C) 1996-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _LIBC_LOCK_H #define _LIBC_LOCK_H 1 diff --git a/lib/libc/glibc/sysdeps/generic/single-thread.h b/lib/libc/glibc/sysdeps/generic/single-thread.h index 0a1520ec49..41673c0e06 100644 --- a/lib/libc/glibc/sysdeps/generic/single-thread.h +++ b/lib/libc/glibc/sysdeps/generic/single-thread.h @@ -1,5 +1,5 @@ /* Single thread optimization, generic version. - Copyright (C) 2019 Free Software Foundation, Inc. + Copyright (C) 2019-2020 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 @@ -14,11 +14,12 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SINGLE_THREAD_H #define _SINGLE_THREAD_H #define SINGLE_THREAD_P (0) +#define RTLD_SINGLE_THREAD_P (0) #endif /* _SINGLE_THREAD_H */ diff --git a/lib/libc/glibc/sysdeps/generic/sysdep.h b/lib/libc/glibc/sysdeps/generic/sysdep.h index 6580929669..2788092112 100644 --- a/lib/libc/glibc/sysdeps/generic/sysdep.h +++ b/lib/libc/glibc/sysdeps/generic/sysdep.h @@ -1,5 +1,5 @@ /* Generic asm macros used on many machines. - Copyright (C) 1991-2019 Free Software Foundation, Inc. + Copyright (C) 1991-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef C_LABEL diff --git a/lib/libc/glibc/sysdeps/generic/tls.h b/lib/libc/glibc/sysdeps/generic/tls.h index 270adef3e1..646427ff74 100644 --- a/lib/libc/glibc/sysdeps/generic/tls.h +++ b/lib/libc/glibc/sysdeps/generic/tls.h @@ -1,5 +1,5 @@ /* Definition for thread-local data handling. Generic version. - Copyright (C) 2002-2019 Free Software Foundation, Inc. + Copyright (C) 2002-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* An architecture-specific version of this file has to defined a number of symbols: diff --git a/lib/libc/glibc/sysdeps/hppa/bits/endian.h b/lib/libc/glibc/sysdeps/hppa/bits/endian.h deleted file mode 100644 index 585db0c0fa..0000000000 --- a/lib/libc/glibc/sysdeps/hppa/bits/endian.h +++ /dev/null @@ -1,7 +0,0 @@ -/* hppa1.1 big-endian. */ - -#ifndef _ENDIAN_H -# error "Never use directly; include instead." -#endif - -#define __BYTE_ORDER __BIG_ENDIAN diff --git a/lib/libc/glibc/sysdeps/hppa/bits/endianness.h b/lib/libc/glibc/sysdeps/hppa/bits/endianness.h new file mode 100644 index 0000000000..96fd5ae5ef --- /dev/null +++ b/lib/libc/glibc/sysdeps/hppa/bits/endianness.h @@ -0,0 +1,11 @@ +#ifndef _BITS_ENDIANNESS_H +#define _BITS_ENDIANNESS_H 1 + +#ifndef _BITS_ENDIAN_H +# error "Never use directly; include instead." +#endif + +/* HP-PA is big-endian. */ +#define __BYTE_ORDER __BIG_ENDIAN + +#endif /* bits/endianness.h */ diff --git a/lib/libc/glibc/sysdeps/hppa/crti.S b/lib/libc/glibc/sysdeps/hppa/crti.S index 8daa5865b3..b3b0c38e52 100644 --- a/lib/libc/glibc/sysdeps/hppa/crti.S +++ b/lib/libc/glibc/sysdeps/hppa/crti.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for HPPA - Copyright (C) 2000-2019 Free Software Foundation, Inc. + Copyright (C) 2000-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ /* crti.S puts a function prologue at the beginning of the .init and .fini sections and defines global symbols for those addresses, so diff --git a/lib/libc/glibc/sysdeps/hppa/crtn.S b/lib/libc/glibc/sysdeps/hppa/crtn.S index ad00a5285f..e2c0cba7e2 100644 --- a/lib/libc/glibc/sysdeps/hppa/crtn.S +++ b/lib/libc/glibc/sysdeps/hppa/crtn.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for HPPA - Copyright (C) 2000-2019 Free Software Foundation, Inc. + Copyright (C) 2000-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #include diff --git a/lib/libc/glibc/sysdeps/hppa/nptl/bits/pthreadtypes-arch.h b/lib/libc/glibc/sysdeps/hppa/nptl/bits/pthreadtypes-arch.h index 5d74f63187..20151dc763 100644 --- a/lib/libc/glibc/sysdeps/hppa/nptl/bits/pthreadtypes-arch.h +++ b/lib/libc/glibc/sysdeps/hppa/nptl/bits/pthreadtypes-arch.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2019 Free Software Foundation, Inc. +/* Copyright (C) 2005-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #ifndef _BITS_PTHREADTYPES_ARCH_H #define _BITS_PTHREADTYPES_ARCH_H 1 @@ -40,52 +40,7 @@ #define __SIZEOF_PTHREAD_RWLOCK_T 64 #define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 -/* The old 4-word 16-byte aligned lock. This is initalized - to all ones by the Linuxthreads PTHREAD_MUTEX_INITIALIZER. - Unused in NPTL. */ -#define __PTHREAD_COMPAT_PADDING_MID int __compat_padding[4]; -/* Two more words are left before the NPTL - pthread_mutex_t is larger than Linuxthreads. */ -#define __PTHREAD_COMPAT_PADDING_END int __reserved[2]; -#define __PTHREAD_MUTEX_LOCK_ELISION 0 -#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 1 -#define __PTHREAD_MUTEX_USE_UNION 1 - #define __LOCK_ALIGNMENT __attribute__ ((__aligned__(16))) #define __ONCE_ALIGNMENT -struct __pthread_rwlock_arch_t -{ - /* In the old Linuxthreads pthread_rwlock_t, this is the - start of the 4-word 16-byte aligned lock structure. The - next four words are all set to 1 by the Linuxthreads - PTHREAD_RWLOCK_INITIALIZER. We ignore them in NPTL. */ - int __compat_padding[4] __attribute__ ((__aligned__(16))); - unsigned int __readers; - unsigned int __writers; - unsigned int __wrphase_futex; - unsigned int __writers_futex; - unsigned int __pad3; - unsigned int __pad4; - int __cur_writer; - /* An unused word, reserved for future use. It was added - to maintain the location of the flags from the Linuxthreads - layout of this structure. */ - int __reserved1; - /* FLAGS must stay at this position in the structure to maintain - binary compatibility. */ - unsigned char __pad2; - unsigned char __pad1; - unsigned char __shared; - unsigned char __flags; - /* The NPTL pthread_rwlock_t is 4 words smaller than the - Linuxthreads version. One word is in the middle of the - structure, the other three are at the end. */ - int __reserved2; - int __reserved3; - int __reserved4; -}; - -#define __PTHREAD_RWLOCK_ELISION_EXTRA 0 - #endif /* bits/pthreadtypes.h */ diff --git a/lib/libc/glibc/sysdeps/hppa/start.S b/lib/libc/glibc/sysdeps/hppa/start.S index 00c84494fc..c725f002dc 100644 --- a/lib/libc/glibc/sysdeps/hppa/start.S +++ b/lib/libc/glibc/sysdeps/hppa/start.S @@ -1,5 +1,5 @@ /* ELF startup code for HPPA. - Copyright (C) 2002-2019 Free Software Foundation, Inc. + Copyright (C) 2002-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ .import main, code .import $global$, data diff --git a/lib/libc/glibc/sysdeps/hppa/sysdep.h b/lib/libc/glibc/sysdeps/hppa/sysdep.h index a38a921f4f..72e72bbc06 100644 --- a/lib/libc/glibc/sysdeps/hppa/sysdep.h +++ b/lib/libc/glibc/sysdeps/hppa/sysdep.h @@ -1,5 +1,5 @@ /* Assembler macros for HP/PA. - Copyright (C) 1999-2019 Free Software Foundation, Inc. + Copyright (C) 1999-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, , August 1999. @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #include diff --git a/lib/libc/glibc/sysdeps/htl/bits/pthread.h b/lib/libc/glibc/sysdeps/htl/bits/pthread.h index 5ecb634d1c..bedb815108 100644 --- a/lib/libc/glibc/sysdeps/htl/bits/pthread.h +++ b/lib/libc/glibc/sysdeps/htl/bits/pthread.h @@ -1,5 +1,5 @@ /* Pthread data structures. Generic version. - Copyright (C) 2002-2019 Free Software Foundation, Inc. + Copyright (C) 2002-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_PTHREAD_H #define _BITS_PTHREAD_H 1 diff --git a/lib/libc/glibc/sysdeps/htl/bits/thread-shared-types.h b/lib/libc/glibc/sysdeps/htl/bits/thread-shared-types.h index e5fa702f55..c280f2e182 100644 --- a/lib/libc/glibc/sysdeps/htl/bits/thread-shared-types.h +++ b/lib/libc/glibc/sysdeps/htl/bits/thread-shared-types.h @@ -1,5 +1,5 @@ /* Common threading primitives definitions for both POSIX and C11. - Copyright (C) 2017-2019 Free Software Foundation, Inc. + Copyright (C) 2017-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _THREAD_SHARED_TYPES_H #define _THREAD_SHARED_TYPES_H 1 diff --git a/lib/libc/glibc/sysdeps/htl/libc-lockP.h b/lib/libc/glibc/sysdeps/htl/libc-lockP.h index 85d8610269..4ba3930a13 100644 --- a/lib/libc/glibc/sysdeps/htl/libc-lockP.h +++ b/lib/libc/glibc/sysdeps/htl/libc-lockP.h @@ -1,5 +1,5 @@ /* Private libc-internal interface for mutex locks. - Copyright (C) 2015-2019 Free Software Foundation, Inc. + Copyright (C) 2015-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; see the file COPYING.LIB. If - not, see . */ + not, see . */ #ifndef _BITS_LIBC_LOCKP_H #define _BITS_LIBC_LOCKP_H 1 @@ -112,6 +112,8 @@ extern int __pthread_rwlock_unlock (pthread_rwlock_t *__rwlock); extern int __pthread_key_create (pthread_key_t *__key, void (*__destr_function) (void *)); +extern int __pthread_key_delete (pthread_key_t __key); + extern int __pthread_setspecific (pthread_key_t __key, const void *__pointer); diff --git a/lib/libc/glibc/sysdeps/htl/pthread.h b/lib/libc/glibc/sysdeps/htl/pthread.h index a8205519f2..3216860493 100644 --- a/lib/libc/glibc/sysdeps/htl/pthread.h +++ b/lib/libc/glibc/sysdeps/htl/pthread.h @@ -1,5 +1,5 @@ /* Posix threads. Hurd version. - Copyright (C) 2000-2019 Free Software Foundation, Inc. + Copyright (C) 2000-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * POSIX Threads Extension: ??? diff --git a/lib/libc/glibc/sysdeps/i386/crti.S b/lib/libc/glibc/sysdeps/i386/crti.S index 65357682a0..f86ff63967 100644 --- a/lib/libc/glibc/sysdeps/i386/crti.S +++ b/lib/libc/glibc/sysdeps/i386/crti.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for x86. - Copyright (C) 1995-2019 Free Software Foundation, Inc. + Copyright (C) 1995-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* crti.S puts a function prologue at the beginning of the .init and .fini sections and defines global symbols for those addresses, so diff --git a/lib/libc/glibc/sysdeps/i386/crtn.S b/lib/libc/glibc/sysdeps/i386/crtn.S index e7921af6d2..727390605a 100644 --- a/lib/libc/glibc/sysdeps/i386/crtn.S +++ b/lib/libc/glibc/sysdeps/i386/crtn.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for x86. - Copyright (C) 1995-2019 Free Software Foundation, Inc. + Copyright (C) 1995-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* crtn.S puts function epilogues in the .init and .fini sections corresponding to the prologues in crti.S. */ diff --git a/lib/libc/glibc/sysdeps/i386/htl/bits/pthreadtypes-arch.h b/lib/libc/glibc/sysdeps/i386/htl/bits/pthreadtypes-arch.h index 60f524fb74..17568fb536 100644 --- a/lib/libc/glibc/sysdeps/i386/htl/bits/pthreadtypes-arch.h +++ b/lib/libc/glibc/sysdeps/i386/htl/bits/pthreadtypes-arch.h @@ -1,5 +1,5 @@ /* Machine-specific pthread type layouts. Hurd i386 version. - Copyright (C) 2002-2019 Free Software Foundation, Inc. + Copyright (C) 2002-2020 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 @@ -14,9 +14,23 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_PTHREADTYPES_ARCH_H #define _BITS_PTHREADTYPES_ARCH_H 1 +#define __SIZEOF_PTHREAD_MUTEX_T 32 +#define __SIZEOF_PTHREAD_ATTR_T 32 +#define __SIZEOF_PTHREAD_RWLOCK_T 28 +#define __SIZEOF_PTHREAD_BARRIER_T 24 +#define __SIZEOF_PTHREAD_MUTEXATTR_T 16 +#define __SIZEOF_PTHREAD_COND_T 20 +#define __SIZEOF_PTHREAD_CONDATTR_T 8 +#define __SIZEOF_PTHREAD_RWLOCKATTR_T 4 +#define __SIZEOF_PTHREAD_BARRIERATTR_T 4 +#define __SIZEOF_PTHREAD_ONCE_T 8 + +#define __LOCK_ALIGNMENT +#define __ONCE_ALIGNMENT + #endif /* bits/pthreadtypes.h */ diff --git a/lib/libc/glibc/sysdeps/i386/start.S b/lib/libc/glibc/sysdeps/i386/start.S index 202a5763f7..c57b25f055 100644 --- a/lib/libc/glibc/sysdeps/i386/start.S +++ b/lib/libc/glibc/sysdeps/i386/start.S @@ -1,5 +1,5 @@ /* Startup code compliant to the ELF i386 ABI. - Copyright (C) 1995-2019 Free Software Foundation, Inc. + Copyright (C) 1995-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* This is the canonical entry point, usually the first thing in the text segment. The SVR4/i386 ABI (pages 3-31, 3-32) says that when the entry diff --git a/lib/libc/glibc/sysdeps/i386/symbol-hacks.h b/lib/libc/glibc/sysdeps/i386/symbol-hacks.h index a55e5ea90d..679002ba35 100644 --- a/lib/libc/glibc/sysdeps/i386/symbol-hacks.h +++ b/lib/libc/glibc/sysdeps/i386/symbol-hacks.h @@ -1,5 +1,5 @@ /* Hacks needed for symbol manipulation. i386 version. - Copyright (C) 2017-2019 Free Software Foundation, Inc. + Copyright (C) 2017-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include diff --git a/lib/libc/glibc/sysdeps/i386/sysdep.h b/lib/libc/glibc/sysdeps/i386/sysdep.h index 749b55b077..b4bcd8fb6c 100644 --- a/lib/libc/glibc/sysdeps/i386/sysdep.h +++ b/lib/libc/glibc/sysdeps/i386/sysdep.h @@ -1,5 +1,5 @@ /* Assembler macros for i386. - Copyright (C) 1991-2019 Free Software Foundation, Inc. + Copyright (C) 1991-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include diff --git a/lib/libc/glibc/sysdeps/ia64/crti.S b/lib/libc/glibc/sysdeps/ia64/crti.S index 05b3bc913f..167e6533b6 100644 --- a/lib/libc/glibc/sysdeps/ia64/crti.S +++ b/lib/libc/glibc/sysdeps/ia64/crti.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for IA64. - Copyright (C) 2000-2019 Free Software Foundation, Inc. + Copyright (C) 2000-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ /* crti.S puts a function prologue at the beginning of the .init and .fini sections and defines global symbols for those addresses, so diff --git a/lib/libc/glibc/sysdeps/ia64/crtn.S b/lib/libc/glibc/sysdeps/ia64/crtn.S index cd22953f0b..c99cf283a6 100644 --- a/lib/libc/glibc/sysdeps/ia64/crtn.S +++ b/lib/libc/glibc/sysdeps/ia64/crtn.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for ARM. - Copyright (C) 2000-2019 Free Software Foundation, Inc. + Copyright (C) 2000-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #include #undef ret diff --git a/lib/libc/glibc/sysdeps/ia64/dl-dtprocnum.h b/lib/libc/glibc/sysdeps/ia64/dl-dtprocnum.h index 17b5476c30..6280720537 100644 --- a/lib/libc/glibc/sysdeps/ia64/dl-dtprocnum.h +++ b/lib/libc/glibc/sysdeps/ia64/dl-dtprocnum.h @@ -1,5 +1,5 @@ /* Configuration of lookup functions. IA-64 version. - Copyright (C) 2000-2019 Free Software Foundation, Inc. + Copyright (C) 2000-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* Number of extra dynamic section entries for this architecture. By default there are none. */ diff --git a/lib/libc/glibc/sysdeps/ia64/dl-sysdep.h b/lib/libc/glibc/sysdeps/ia64/dl-sysdep.h index d827aee5c7..7ad1076ddc 100644 --- a/lib/libc/glibc/sysdeps/ia64/dl-sysdep.h +++ b/lib/libc/glibc/sysdeps/ia64/dl-sysdep.h @@ -1,5 +1,5 @@ /* System-specific settings for dynamic linker code. IA-64 version. - Copyright (C) 2002-2019 Free Software Foundation, Inc. + Copyright (C) 2002-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include_next diff --git a/lib/libc/glibc/sysdeps/ia64/start.S b/lib/libc/glibc/sysdeps/ia64/start.S index 0ddc06ef57..18c8962b6e 100644 --- a/lib/libc/glibc/sysdeps/ia64/start.S +++ b/lib/libc/glibc/sysdeps/ia64/start.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1999-2019 Free Software Foundation, Inc. +/* Copyright (C) 1999-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Jes Sorensen, , April 1999. @@ -31,11 +31,10 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include -#include #include /* diff --git a/lib/libc/glibc/sysdeps/ia64/sysdep.h b/lib/libc/glibc/sysdeps/ia64/sysdep.h index 29181e7686..1627807de8 100644 --- a/lib/libc/glibc/sysdeps/ia64/sysdep.h +++ b/lib/libc/glibc/sysdeps/ia64/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2019 Free Software Foundation, Inc. +/* Copyright (C) 2000-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger-Tang @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include diff --git a/lib/libc/glibc/sysdeps/m68k/bits/endian.h b/lib/libc/glibc/sysdeps/m68k/bits/endian.h deleted file mode 100644 index bf4ecb60a4..0000000000 --- a/lib/libc/glibc/sysdeps/m68k/bits/endian.h +++ /dev/null @@ -1,7 +0,0 @@ -/* m68k is big-endian. */ - -#ifndef _ENDIAN_H -# error "Never use directly; include instead." -#endif - -#define __BYTE_ORDER __BIG_ENDIAN diff --git a/lib/libc/glibc/sysdeps/m68k/bits/endianness.h b/lib/libc/glibc/sysdeps/m68k/bits/endianness.h new file mode 100644 index 0000000000..7e5f0d2969 --- /dev/null +++ b/lib/libc/glibc/sysdeps/m68k/bits/endianness.h @@ -0,0 +1,11 @@ +#ifndef _BITS_ENDIANNESS_H +#define _BITS_ENDIANNESS_H 1 + +#ifndef _BITS_ENDIAN_H +# error "Never use directly; include instead." +#endif + +/* m68k is big-endian. */ +#define __BYTE_ORDER __BIG_ENDIAN + +#endif /* bits/endianness.h */ diff --git a/lib/libc/glibc/sysdeps/m68k/coldfire/sysdep.h b/lib/libc/glibc/sysdeps/m68k/coldfire/sysdep.h index 90c2833a19..04bbcbc71e 100644 --- a/lib/libc/glibc/sysdeps/m68k/coldfire/sysdep.h +++ b/lib/libc/glibc/sysdeps/m68k/coldfire/sysdep.h @@ -1,5 +1,5 @@ /* Assembler macros for Coldfire. - Copyright (C) 1998-2019 Free Software Foundation, Inc. + Copyright (C) 1998-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #include diff --git a/lib/libc/glibc/sysdeps/m68k/crti.S b/lib/libc/glibc/sysdeps/m68k/crti.S index f6a9377324..54391c4c7c 100644 --- a/lib/libc/glibc/sysdeps/m68k/crti.S +++ b/lib/libc/glibc/sysdeps/m68k/crti.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for m68k. - Copyright (C) 2012-2019 Free Software Foundation, Inc. + Copyright (C) 2012-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ /* crti.S puts a function prologue at the beginning of the .init and .fini sections and defines global symbols for those addresses, so diff --git a/lib/libc/glibc/sysdeps/m68k/crtn.S b/lib/libc/glibc/sysdeps/m68k/crtn.S index dffa96f404..6721d54cae 100644 --- a/lib/libc/glibc/sysdeps/m68k/crtn.S +++ b/lib/libc/glibc/sysdeps/m68k/crtn.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for m68k. - Copyright (C) 2012-2019 Free Software Foundation, Inc. + Copyright (C) 2012-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ /* crtn.S puts function epilogues in the .init and .fini sections corresponding to the prologues in crti.S. */ diff --git a/lib/libc/glibc/sysdeps/m68k/m680x0/sysdep.h b/lib/libc/glibc/sysdeps/m68k/m680x0/sysdep.h index e426cfdb70..0e2e6d0f77 100644 --- a/lib/libc/glibc/sysdeps/m68k/m680x0/sysdep.h +++ b/lib/libc/glibc/sysdeps/m68k/m680x0/sysdep.h @@ -1,5 +1,5 @@ /* Assembler macros for m680x0. - Copyright (C) 2010-2019 Free Software Foundation, Inc. + Copyright (C) 2010-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #include diff --git a/lib/libc/glibc/sysdeps/m68k/nptl/bits/pthreadtypes-arch.h b/lib/libc/glibc/sysdeps/m68k/nptl/bits/pthreadtypes-arch.h index 731cdec69a..b45265a47e 100644 --- a/lib/libc/glibc/sysdeps/m68k/nptl/bits/pthreadtypes-arch.h +++ b/lib/libc/glibc/sysdeps/m68k/nptl/bits/pthreadtypes-arch.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2019 Free Software Foundation, Inc. +/* Copyright (C) 2010-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Maxim Kuvyrkov , 2010. @@ -14,12 +14,12 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #ifndef _BITS_PTHREADTYPES_ARCH_H #define _BITS_PTHREADTYPES_ARCH_H 1 -#include +#include #define __SIZEOF_PTHREAD_ATTR_T 36 #define __SIZEOF_PTHREAD_MUTEX_T 24 @@ -31,33 +31,7 @@ #define __SIZEOF_PTHREAD_BARRIER_T 20 #define __SIZEOF_PTHREAD_BARRIERATTR_T 4 -/* Data structure for mutex handling. */ -#define __PTHREAD_COMPAT_PADDING_MID -#define __PTHREAD_COMPAT_PADDING_END -#define __PTHREAD_MUTEX_LOCK_ELISION 0 -#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 1 -#define __PTHREAD_MUTEX_USE_UNION 1 - #define __LOCK_ALIGNMENT __attribute__ ((__aligned__ (4))) #define __ONCE_ALIGNMENT __attribute__ ((__aligned__ (4))) -struct __pthread_rwlock_arch_t -{ - unsigned int __readers __attribute__ ((__aligned__ (4))); - unsigned int __writers; - unsigned int __wrphase_futex; - unsigned int __writers_futex; - unsigned int __pad3; - unsigned int __pad4; - unsigned char __pad1; - unsigned char __pad2; - unsigned char __shared; - /* FLAGS must stay at this position in the structure to maintain - binary compatibility. */ - unsigned char __flags; - int __cur_writer; -}; - -#define __PTHREAD_RWLOCK_ELISION_EXTRA 0 - #endif /* bits/pthreadtypes.h */ diff --git a/lib/libc/glibc/sysdeps/m68k/start.S b/lib/libc/glibc/sysdeps/m68k/start.S index 05fd964ab6..f69a6502e6 100644 --- a/lib/libc/glibc/sysdeps/m68k/start.S +++ b/lib/libc/glibc/sysdeps/m68k/start.S @@ -1,5 +1,5 @@ /* Startup code compliant to the ELF m68k ABI. - Copyright (C) 1996-2019 Free Software Foundation, Inc. + Copyright (C) 1996-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ /* This is the canonical entry point, usually the first thing in the text segment. The SVR4/m68k ABI says that when the entry point runs, diff --git a/lib/libc/glibc/sysdeps/m68k/symbol-hacks.h b/lib/libc/glibc/sysdeps/m68k/symbol-hacks.h index 72eff097cf..f561ae560c 100644 --- a/lib/libc/glibc/sysdeps/m68k/symbol-hacks.h +++ b/lib/libc/glibc/sysdeps/m68k/symbol-hacks.h @@ -1,5 +1,5 @@ /* Hacks needed for symbol manipulation. m68k version. - Copyright (C) 2017-2019 Free Software Foundation, Inc. + Copyright (C) 2017-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include diff --git a/lib/libc/glibc/sysdeps/m68k/sysdep.h b/lib/libc/glibc/sysdeps/m68k/sysdep.h index 8543458447..9a1c4b7fcf 100644 --- a/lib/libc/glibc/sysdeps/m68k/sysdep.h +++ b/lib/libc/glibc/sysdeps/m68k/sysdep.h @@ -1,5 +1,5 @@ /* Assembler macros for m68k. - Copyright (C) 1998-2019 Free Software Foundation, Inc. + Copyright (C) 1998-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #include diff --git a/lib/libc/glibc/sysdeps/mach/hurd/bits/stat.h b/lib/libc/glibc/sysdeps/mach/hurd/bits/stat.h index 0044493ff3..bcb8fb747f 100644 --- a/lib/libc/glibc/sysdeps/mach/hurd/bits/stat.h +++ b/lib/libc/glibc/sysdeps/mach/hurd/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2019 Free Software Foundation, Inc. +/* Copyright (C) 1992-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include directly; use instead." diff --git a/lib/libc/glibc/sysdeps/mach/hurd/bits/typesizes.h b/lib/libc/glibc/sysdeps/mach/hurd/bits/typesizes.h index 6bd9b43599..b429379d7d 100644 --- a/lib/libc/glibc/sysdeps/mach/hurd/bits/typesizes.h +++ b/lib/libc/glibc/sysdeps/mach/hurd/bits/typesizes.h @@ -1,5 +1,5 @@ /* bits/typesizes.h -- underlying types for *_t. Hurd version. - Copyright (C) 2002-2019 Free Software Foundation, Inc. + Copyright (C) 2002-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_TYPES_H # error "Never include directly; use instead." @@ -64,5 +64,9 @@ /* Number of descriptors that can fit in an `fd_set'. */ #define __FD_SETSIZE 256 +/* Tell the libc code that fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and + fsfilcnt64_t are not the same type for all ABI purposes. */ +# define __STATFS_MATCHES_STATFS64 0 + #endif /* bits/typesizes.h */ diff --git a/lib/libc/glibc/sysdeps/mach/hurd/dl-sysdep.h b/lib/libc/glibc/sysdeps/mach/hurd/dl-sysdep.h index 6f329f53a9..1fe3964103 100644 --- a/lib/libc/glibc/sysdeps/mach/hurd/dl-sysdep.h +++ b/lib/libc/glibc/sysdeps/mach/hurd/dl-sysdep.h @@ -1,5 +1,5 @@ /* System-specific settings for dynamic linker code. Hurd version. - Copyright (C) 2002-2019 Free Software Foundation, Inc. + Copyright (C) 2002-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* The private errno doesn't make sense on the Hurd. errno is always the thread-local slot shared with libc, and it matters to share the cell diff --git a/lib/libc/glibc/sysdeps/mach/hurd/kernel-features.h b/lib/libc/glibc/sysdeps/mach/hurd/kernel-features.h index 2c9c0acda2..eb2e20f33d 100644 --- a/lib/libc/glibc/sysdeps/mach/hurd/kernel-features.h +++ b/lib/libc/glibc/sysdeps/mach/hurd/kernel-features.h @@ -1,5 +1,5 @@ /* Set flags signalling availability of certain operating system features. - Copyright (C) 2012-2019 Free Software Foundation, Inc. + Copyright (C) 2012-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* This file can define __ASSUME_* macros checked by certain source files. Almost none of these are used outside of sysdeps/unix/sysv/linux code. diff --git a/lib/libc/glibc/sysdeps/mach/i386/sysdep.h b/lib/libc/glibc/sysdeps/mach/i386/sysdep.h index d55e4fcea8..e849f120f9 100644 --- a/lib/libc/glibc/sysdeps/mach/i386/sysdep.h +++ b/lib/libc/glibc/sysdeps/mach/i386/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2019 Free Software Foundation, Inc. +/* Copyright (C) 1991-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _MACH_I386_SYSDEP_H #define _MACH_I386_SYSDEP_H 1 diff --git a/lib/libc/glibc/sysdeps/mach/libc-lock.h b/lib/libc/glibc/sysdeps/mach/libc-lock.h index e768973aca..e04dcc445d 100644 --- a/lib/libc/glibc/sysdeps/mach/libc-lock.h +++ b/lib/libc/glibc/sysdeps/mach/libc-lock.h @@ -1,5 +1,5 @@ /* libc-internal interface for mutex locks. Mach cthreads version. - Copyright (C) 1996-2019 Free Software Foundation, Inc. + Copyright (C) 1996-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _LIBC_LOCK_H #define _LIBC_LOCK_H 1 diff --git a/lib/libc/glibc/sysdeps/mach/sysdep.h b/lib/libc/glibc/sysdeps/mach/sysdep.h index fccfdb33e3..ba65015253 100644 --- a/lib/libc/glibc/sysdeps/mach/sysdep.h +++ b/lib/libc/glibc/sysdeps/mach/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1994-2019 Free Software Foundation, Inc. +/* Copyright (C) 1994-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifdef __ASSEMBLER__ diff --git a/lib/libc/glibc/sysdeps/microblaze/bits/endian.h b/lib/libc/glibc/sysdeps/microblaze/bits/endian.h deleted file mode 100644 index 3650f3d564..0000000000 --- a/lib/libc/glibc/sysdeps/microblaze/bits/endian.h +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (C) 1997-2019 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 - . */ - -#ifndef _ENDIAN_H -# error "Never use directly; include instead." -#endif - -/* MicroBlaze can be either big or little endian. */ -#ifdef _BIG_ENDIAN -# define __BYTE_ORDER __BIG_ENDIAN -# define __FLOAT_WORD_ORDER __BIG_ENDIAN -#else -# define __BYTE_ORDER __LITTLE_ENDIAN -# define __FLOAT_WORD_ORDER __LITTLE_ENDIAN -#endif diff --git a/lib/libc/glibc/sysdeps/microblaze/bits/endianness.h b/lib/libc/glibc/sysdeps/microblaze/bits/endianness.h new file mode 100644 index 0000000000..c4bb7e5f2e --- /dev/null +++ b/lib/libc/glibc/sysdeps/microblaze/bits/endianness.h @@ -0,0 +1,15 @@ +#ifndef _BITS_ENDIANNESS_H +#define _BITS_ENDIANNESS_H 1 + +#ifndef _BITS_ENDIAN_H +# error "Never use directly; include instead." +#endif + +/* MicroBlaze has selectable endianness. */ +#ifdef _BIG_ENDIAN +# define __BYTE_ORDER __BIG_ENDIAN +#else +# define __BYTE_ORDER __LITTLE_ENDIAN +#endif + +#endif /* bits/endianness.h */ diff --git a/lib/libc/glibc/sysdeps/microblaze/crti.S b/lib/libc/glibc/sysdeps/microblaze/crti.S index 2a884ad103..1b44887639 100644 --- a/lib/libc/glibc/sysdeps/microblaze/crti.S +++ b/lib/libc/glibc/sysdeps/microblaze/crti.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for MicroBlaze. - Copyright (C) 2012-2019 Free Software Foundation, Inc. + Copyright (C) 2012-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* crti.S puts a function prologue at the beginning of the .init and .fini sections and defines global symbols for those addresses, so diff --git a/lib/libc/glibc/sysdeps/microblaze/crtn.S b/lib/libc/glibc/sysdeps/microblaze/crtn.S index a6f0875a00..1e00328f92 100644 --- a/lib/libc/glibc/sysdeps/microblaze/crtn.S +++ b/lib/libc/glibc/sysdeps/microblaze/crtn.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for MicroBlaze. - Copyright (C) 1995-2019 Free Software Foundation, Inc. + Copyright (C) 1995-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* crtn.S puts function epilogues in the .init and .fini sections corresponding to the prologues in crti.S. */ diff --git a/lib/libc/glibc/sysdeps/microblaze/start.S b/lib/libc/glibc/sysdeps/microblaze/start.S index 0b60dab16a..55d15d6308 100644 --- a/lib/libc/glibc/sysdeps/microblaze/start.S +++ b/lib/libc/glibc/sysdeps/microblaze/start.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2019 Free Software Foundation, Inc. +/* Copyright (C) 1995-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ .text .globl _start diff --git a/lib/libc/glibc/sysdeps/microblaze/sysdep.h b/lib/libc/glibc/sysdeps/microblaze/sysdep.h index baefe7a028..f597a8135b 100644 --- a/lib/libc/glibc/sysdeps/microblaze/sysdep.h +++ b/lib/libc/glibc/sysdeps/microblaze/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2019 Free Software Foundation, Inc. +/* Copyright (C) 1997-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include diff --git a/lib/libc/glibc/sysdeps/mips/bits/endian.h b/lib/libc/glibc/sysdeps/mips/bits/endian.h deleted file mode 100644 index 126059799d..0000000000 --- a/lib/libc/glibc/sysdeps/mips/bits/endian.h +++ /dev/null @@ -1,15 +0,0 @@ -/* The MIPS architecture has selectable endianness. - It exists in both little and big endian flavours and we - want to be able to share the installed header files between - both, so we define __BYTE_ORDER based on GCC's predefines. */ - -#ifndef _ENDIAN_H -# error "Never use directly; include instead." -#endif - -#ifdef __MIPSEB -# define __BYTE_ORDER __BIG_ENDIAN -#endif -#ifdef __MIPSEL -# define __BYTE_ORDER __LITTLE_ENDIAN -#endif diff --git a/lib/libc/glibc/sysdeps/mips/bits/endianness.h b/lib/libc/glibc/sysdeps/mips/bits/endianness.h new file mode 100644 index 0000000000..09e138b89b --- /dev/null +++ b/lib/libc/glibc/sysdeps/mips/bits/endianness.h @@ -0,0 +1,16 @@ +#ifndef _BITS_ENDIANNESS_H +#define _BITS_ENDIANNESS_H 1 + +#ifndef _BITS_ENDIAN_H +# error "Never use directly; include instead." +#endif + +/* MIPS has selectable endianness. */ +#ifdef __MIPSEB +# define __BYTE_ORDER __BIG_ENDIAN +#endif +#ifdef __MIPSEL +# define __BYTE_ORDER __LITTLE_ENDIAN +#endif + +#endif /* bits/endianness.h */ diff --git a/lib/libc/glibc/sysdeps/mips/dl-dtprocnum.h b/lib/libc/glibc/sysdeps/mips/dl-dtprocnum.h index 3b490a34aa..acef635092 100644 --- a/lib/libc/glibc/sysdeps/mips/dl-dtprocnum.h +++ b/lib/libc/glibc/sysdeps/mips/dl-dtprocnum.h @@ -1,5 +1,5 @@ /* Configuration of lookup functions. MIPS version. - Copyright (C) 2000-2019 Free Software Foundation, Inc. + Copyright (C) 2000-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ /* Number of extra dynamic section entries for this architecture. By default there are none. */ diff --git a/lib/libc/glibc/sysdeps/mips/mips32/crti.S b/lib/libc/glibc/sysdeps/mips/mips32/crti.S index 7bdb9d1260..417b07a896 100644 --- a/lib/libc/glibc/sysdeps/mips/mips32/crti.S +++ b/lib/libc/glibc/sysdeps/mips/mips32/crti.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for MIPS (o32). - Copyright (C) 1995-2019 Free Software Foundation, Inc. + Copyright (C) 1995-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ /* crti.S puts a function prologue at the beginning of the .init and .fini sections and defines global symbols for those addresses, so diff --git a/lib/libc/glibc/sysdeps/mips/mips32/crtn.S b/lib/libc/glibc/sysdeps/mips/mips32/crtn.S index 0c110c00e6..78ab58a68a 100644 --- a/lib/libc/glibc/sysdeps/mips/mips32/crtn.S +++ b/lib/libc/glibc/sysdeps/mips/mips32/crtn.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for MIPS (o32). - Copyright (C) 1995-2019 Free Software Foundation, Inc. + Copyright (C) 1995-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ /* crtn.S puts function epilogues in the .init and .fini sections corresponding to the prologues in crti.S. */ diff --git a/lib/libc/glibc/sysdeps/mips/mips64/n32/crti.S b/lib/libc/glibc/sysdeps/mips/mips64/n32/crti.S index 5a6b1a0088..22dad81963 100644 --- a/lib/libc/glibc/sysdeps/mips/mips64/n32/crti.S +++ b/lib/libc/glibc/sysdeps/mips/mips64/n32/crti.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for MIPS (n32). - Copyright (C) 1995-2019 Free Software Foundation, Inc. + Copyright (C) 1995-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ /* crti.S puts a function prologue at the beginning of the .init and .fini sections and defines global symbols for those addresses, so diff --git a/lib/libc/glibc/sysdeps/mips/mips64/n32/crtn.S b/lib/libc/glibc/sysdeps/mips/mips64/n32/crtn.S index fad316e27f..1ba6b73c09 100644 --- a/lib/libc/glibc/sysdeps/mips/mips64/n32/crtn.S +++ b/lib/libc/glibc/sysdeps/mips/mips64/n32/crtn.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for MIPS (n32). - Copyright (C) 1995-2019 Free Software Foundation, Inc. + Copyright (C) 1995-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ /* crtn.S puts function epilogues in the .init and .fini sections corresponding to the prologues in crti.S. */ diff --git a/lib/libc/glibc/sysdeps/mips/mips64/n64/crti.S b/lib/libc/glibc/sysdeps/mips/mips64/n64/crti.S index 43c49abc1d..85edb784b4 100644 --- a/lib/libc/glibc/sysdeps/mips/mips64/n64/crti.S +++ b/lib/libc/glibc/sysdeps/mips/mips64/n64/crti.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for MIPS (n64). - Copyright (C) 1995-2019 Free Software Foundation, Inc. + Copyright (C) 1995-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ /* crti.S puts a function prologue at the beginning of the .init and .fini sections and defines global symbols for those addresses, so diff --git a/lib/libc/glibc/sysdeps/mips/mips64/n64/crtn.S b/lib/libc/glibc/sysdeps/mips/mips64/n64/crtn.S index d6870d18b2..c337602c69 100644 --- a/lib/libc/glibc/sysdeps/mips/mips64/n64/crtn.S +++ b/lib/libc/glibc/sysdeps/mips/mips64/n64/crtn.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for MIPS (n64). - Copyright (C) 1995-2019 Free Software Foundation, Inc. + Copyright (C) 1995-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ /* crtn.S puts function epilogues in the .init and .fini sections corresponding to the prologues in crti.S. */ diff --git a/lib/libc/glibc/sysdeps/mips/nptl/bits/pthreadtypes-arch.h b/lib/libc/glibc/sysdeps/mips/nptl/bits/pthreadtypes-arch.h index bebee00258..ce50110dd2 100644 --- a/lib/libc/glibc/sysdeps/mips/nptl/bits/pthreadtypes-arch.h +++ b/lib/libc/glibc/sysdeps/mips/nptl/bits/pthreadtypes-arch.h @@ -1,5 +1,5 @@ /* Machine-specific pthread type layouts. MIPS version. - Copyright (C) 2005-2019 Free Software Foundation, Inc. + Copyright (C) 2005-2020 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 @@ -14,12 +14,12 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #ifndef _BITS_PTHREADTYPES_ARCH_H #define _BITS_PTHREADTYPES_ARCH_H 1 -#include +#include #if _MIPS_SIM == _ABI64 # define __SIZEOF_PTHREAD_ATTR_T 56 @@ -38,52 +38,7 @@ #define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 #define __SIZEOF_PTHREAD_BARRIERATTR_T 4 -/* Data structure for mutex handling. */ -#define __PTHREAD_COMPAT_PADDING_MID -#define __PTHREAD_COMPAT_PADDING_END -#define __PTHREAD_MUTEX_LOCK_ELISION 0 -#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND (_MIPS_SIM != _ABI64) -#define __PTHREAD_MUTEX_USE_UNION (_MIPS_SIM != _ABI64) - #define __LOCK_ALIGNMENT #define __ONCE_ALIGNMENT -struct __pthread_rwlock_arch_t -{ - unsigned int __readers; - unsigned int __writers; - unsigned int __wrphase_futex; - unsigned int __writers_futex; - unsigned int __pad3; - unsigned int __pad4; -#if _MIPS_SIM == _ABI64 - int __cur_writer; - int __shared; - unsigned long int __pad1; - unsigned long int __pad2; - /* FLAGS must stay at this position in the structure to maintain - binary compatibility. */ - unsigned int __flags; -# else -# if __BYTE_ORDER == __BIG_ENDIAN - unsigned char __pad1; - unsigned char __pad2; - unsigned char __shared; - /* FLAGS must stay at this position in the structure to maintain - binary compatibility. */ - unsigned char __flags; -# else - /* FLAGS must stay at this position in the structure to maintain - binary compatibility. */ - unsigned char __flags; - unsigned char __shared; - unsigned char __pad1; - unsigned char __pad2; -# endif - int __cur_writer; -#endif -}; - -#define __PTHREAD_RWLOCK_ELISION_EXTRA 0 - #endif /* bits/pthreadtypes.h */ diff --git a/lib/libc/glibc/sysdeps/mips/start.S b/lib/libc/glibc/sysdeps/mips/start.S index 8638e5b545..fabc8080df 100644 --- a/lib/libc/glibc/sysdeps/mips/start.S +++ b/lib/libc/glibc/sysdeps/mips/start.S @@ -1,5 +1,5 @@ /* Startup code compliant to the ELF Mips ABI. - Copyright (C) 1995-2019 Free Software Foundation, Inc. + Copyright (C) 1995-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #define __ASSEMBLY__ 1 #include diff --git a/lib/libc/glibc/sysdeps/nptl/bits/pthreadtypes.h b/lib/libc/glibc/sysdeps/nptl/bits/pthreadtypes.h index 1b2a174060..ac65027463 100644 --- a/lib/libc/glibc/sysdeps/nptl/bits/pthreadtypes.h +++ b/lib/libc/glibc/sysdeps/nptl/bits/pthreadtypes.h @@ -1,5 +1,5 @@ /* Declaration of common pthread types for all architectures. - Copyright (C) 2017-2019 Free Software Foundation, Inc. + Copyright (C) 2017-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_PTHREADTYPES_COMMON_H # define _BITS_PTHREADTYPES_COMMON_H 1 diff --git a/lib/libc/glibc/sysdeps/nptl/bits/thread-shared-types.h b/lib/libc/glibc/sysdeps/nptl/bits/thread-shared-types.h index aec0a121d0..fd08b6916a 100644 --- a/lib/libc/glibc/sysdeps/nptl/bits/thread-shared-types.h +++ b/lib/libc/glibc/sysdeps/nptl/bits/thread-shared-types.h @@ -1,5 +1,5 @@ /* Common threading primitives definitions for both POSIX and C11. - Copyright (C) 2017-2019 Free Software Foundation, Inc. + Copyright (C) 2017-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _THREAD_SHARED_TYPES_H #define _THREAD_SHARED_TYPES_H 1 @@ -32,36 +32,6 @@ __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. - Also, the following macros must be define for internal pthread_mutex_t - struct definitions (struct __pthread_mutex_s): - - __PTHREAD_COMPAT_PADDING_MID - any additional members after 'kind' - and before '__spin' (for 64 bits) or - '__nusers' (for 32 bits). - __PTHREAD_COMPAT_PADDING_END - any additional members at the end of - the internal structure. - __PTHREAD_MUTEX_LOCK_ELISION - 1 if the architecture supports lock - elision or 0 otherwise. - __PTHREAD_MUTEX_NUSERS_AFTER_KIND - control where to put __nusers. The - preferred value for new architectures - is 0. - __PTHREAD_MUTEX_USE_UNION - control whether internal __spins and - __list will be place inside a union for - linuxthreads compatibility. - The preferred value for new architectures - is 0. - - For a new port the preferred values for the required defines are: - - #define __PTHREAD_COMPAT_PADDING_MID - #define __PTHREAD_COMPAT_PADDING_END - #define __PTHREAD_MUTEX_LOCK_ELISION 0 - #define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 0 - #define __PTHREAD_MUTEX_USE_UNION 0 - - __PTHREAD_MUTEX_LOCK_ELISION can be set to 1 if the hardware plans to - eventually support lock elision using transactional memory. - The additional macro defines any constraint for the lock alignment inside the thread structures: @@ -69,101 +39,52 @@ Same idea but for the once locking primitive: - __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. */ - And finally the internal pthread_rwlock_t (struct __pthread_rwlock_arch_t) - must be defined. - */ #include + /* Common definition of pthread_mutex_t. */ -#if !__PTHREAD_MUTEX_USE_UNION typedef struct __pthread_internal_list { struct __pthread_internal_list *__prev; struct __pthread_internal_list *__next; } __pthread_list_t; -#else + typedef struct __pthread_internal_slist { struct __pthread_internal_slist *__next; } __pthread_slist_t; -#endif -/* Lock elision support. */ -#if __PTHREAD_MUTEX_LOCK_ELISION -# if !__PTHREAD_MUTEX_USE_UNION -# define __PTHREAD_SPINS_DATA \ - short __spins; \ - short __elision -# define __PTHREAD_SPINS 0, 0 -# else -# define __PTHREAD_SPINS_DATA \ - struct \ - { \ - short __espins; \ - short __eelision; \ - } __elision_data -# define __PTHREAD_SPINS { 0, 0 } -# define __spins __elision_data.__espins -# define __elision __elision_data.__eelision -# endif -#else -# define __PTHREAD_SPINS_DATA int __spins -/* Mutex __spins initializer used by PTHREAD_MUTEX_INITIALIZER. */ -# define __PTHREAD_SPINS 0 -#endif +/* Arch-specific mutex definitions. A generic implementation is provided + by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture + can override it by defining: -struct __pthread_mutex_s -{ - int __lock __LOCK_ALIGNMENT; - unsigned int __count; - int __owner; -#if !__PTHREAD_MUTEX_NUSERS_AFTER_KIND - unsigned int __nusers; -#endif - /* KIND must stay at this position in the structure to maintain - binary compatibility with static initializers. + 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t + definition). It should contains at least the internal members + defined in the generic version. - Concurrency notes: - The __kind of a mutex is initialized either by the static - PTHREAD_MUTEX_INITIALIZER or by a call to pthread_mutex_init. + 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with + atomic operations. - After a mutex has been initialized, the __kind of a mutex is usually not - changed. BUT it can be set to -1 in pthread_mutex_destroy or elision can - be enabled. This is done concurrently in the pthread_mutex_*lock functions - by using the macro FORCE_ELISION. This macro is only defined for - architectures which supports lock elision. + 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization. + It should initialize the mutex internal flag. */ - For elision, there are the flags PTHREAD_MUTEX_ELISION_NP and - PTHREAD_MUTEX_NO_ELISION_NP which can be set in addition to the already set - type of a mutex. - Before a mutex is initialized, only PTHREAD_MUTEX_NO_ELISION_NP can be set - with pthread_mutexattr_settype. - After a mutex has been initialized, the functions pthread_mutex_*lock can - enable elision - if the mutex-type and the machine supports it - by setting - the flag PTHREAD_MUTEX_ELISION_NP. This is done concurrently. Afterwards - the lock / unlock functions are using specific elision code-paths. */ - int __kind; - __PTHREAD_COMPAT_PADDING_MID -#if __PTHREAD_MUTEX_NUSERS_AFTER_KIND - unsigned int __nusers; -#endif -#if !__PTHREAD_MUTEX_USE_UNION - __PTHREAD_SPINS_DATA; - __pthread_list_t __list; -# define __PTHREAD_MUTEX_HAVE_PREV 1 -#else - __extension__ union - { - __PTHREAD_SPINS_DATA; - __pthread_slist_t __list; - }; -# define __PTHREAD_MUTEX_HAVE_PREV 0 -#endif - __PTHREAD_COMPAT_PADDING_END -}; +#include + +/* Arch-sepecific read-write lock definitions. A generic implementation is + provided by struct_rwlock.h. If required, an architecture can override it + by defining: + + 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition). + It should contain at least the internal members defined in the + generic version. + + 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization. + It should initialize the rwlock internal type. */ + +#include /* Common definition of pthread_cond_t. */ diff --git a/lib/libc/glibc/sysdeps/nptl/libc-lock.h b/lib/libc/glibc/sysdeps/nptl/libc-lock.h index a1fe9a766b..bfeee32eaf 100644 --- a/lib/libc/glibc/sysdeps/nptl/libc-lock.h +++ b/lib/libc/glibc/sysdeps/nptl/libc-lock.h @@ -1,5 +1,5 @@ /* libc-internal interface for mutex locks. NPTL version. - Copyright (C) 1996-2019 Free Software Foundation, Inc. + Copyright (C) 1996-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; see the file COPYING.LIB. If - not, see . */ + not, see . */ #ifndef _LIBC_LOCK_H #define _LIBC_LOCK_H 1 diff --git a/lib/libc/glibc/sysdeps/nptl/libc-lockP.h b/lib/libc/glibc/sysdeps/nptl/libc-lockP.h index 07d583f11a..86d903dddc 100644 --- a/lib/libc/glibc/sysdeps/nptl/libc-lockP.h +++ b/lib/libc/glibc/sysdeps/nptl/libc-lockP.h @@ -1,5 +1,5 @@ /* Private libc-internal interface for mutex locks. NPTL version. - Copyright (C) 1996-2019 Free Software Foundation, Inc. + Copyright (C) 1996-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; see the file COPYING.LIB. If - not, see . */ + not, see . */ #ifndef _LIBC_LOCKP_H #define _LIBC_LOCKP_H 1 diff --git a/lib/libc/glibc/sysdeps/nptl/pthread.h b/lib/libc/glibc/sysdeps/nptl/pthread.h index a767d6f180..44dd707896 100644 --- a/lib/libc/glibc/sysdeps/nptl/pthread.h +++ b/lib/libc/glibc/sysdeps/nptl/pthread.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2019 Free Software Foundation, Inc. +/* Copyright (C) 2002-2020 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 @@ -13,16 +13,16 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _PTHREAD_H #define _PTHREAD_H 1 #include -#include #include #include +#include #include #include #include @@ -83,30 +83,15 @@ enum #endif -#if __PTHREAD_MUTEX_HAVE_PREV -# define PTHREAD_MUTEX_INITIALIZER \ - { { 0, 0, 0, 0, 0, __PTHREAD_SPINS, { 0, 0 } } } -# ifdef __USE_GNU -# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \ - { { 0, 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, __PTHREAD_SPINS, { 0, 0 } } } -# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \ - { { 0, 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, __PTHREAD_SPINS, { 0, 0 } } } -# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \ - { { 0, 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, __PTHREAD_SPINS, { 0, 0 } } } - -# endif -#else -# define PTHREAD_MUTEX_INITIALIZER \ - { { 0, 0, 0, 0, 0, { __PTHREAD_SPINS } } } -# ifdef __USE_GNU -# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \ - { { 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, { __PTHREAD_SPINS } } } -# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \ - { { 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, 0, { __PTHREAD_SPINS } } } -# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \ - { { 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, 0, { __PTHREAD_SPINS } } } - -# endif +#define PTHREAD_MUTEX_INITIALIZER \ + { { __PTHREAD_MUTEX_INITIALIZER (PTHREAD_MUTEX_TIMED_NP) } } +#ifdef __USE_GNU +# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \ + { { __PTHREAD_MUTEX_INITIALIZER (PTHREAD_MUTEX_RECURSIVE_NP) } } +# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \ + { { __PTHREAD_MUTEX_INITIALIZER (PTHREAD_MUTEX_ERRORCHECK_NP) } } +# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \ + { { __PTHREAD_MUTEX_INITIALIZER (PTHREAD_MUTEX_ADAPTIVE_NP) } } #endif @@ -120,34 +105,13 @@ enum PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP }; -/* Define __PTHREAD_RWLOCK_INT_FLAGS_SHARED to 1 if pthread_rwlock_t - has the shared field. All 64-bit architectures have the shared field - in pthread_rwlock_t. */ -#ifndef __PTHREAD_RWLOCK_INT_FLAGS_SHARED -# if __WORDSIZE == 64 -# define __PTHREAD_RWLOCK_INT_FLAGS_SHARED 1 -# endif -#endif /* Read-write lock initializers. */ # define PTHREAD_RWLOCK_INITIALIZER \ - { { 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, 0 } } + { { __PTHREAD_RWLOCK_INITIALIZER (PTHREAD_RWLOCK_DEFAULT_NP) } } # ifdef __USE_GNU -# ifdef __PTHREAD_RWLOCK_INT_FLAGS_SHARED -# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \ - { { 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, \ - PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP } } -# else -# if __BYTE_ORDER == __LITTLE_ENDIAN -# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \ - { { 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, \ - 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, 0 } } -# else -# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \ - { { 0, 0, 0, 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,\ - 0 } } -# endif -# endif +# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \ + { { __PTHREAD_RWLOCK_INITIALIZER (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP) } } # endif #endif /* Unix98 or XOpen2K */ @@ -263,6 +227,17 @@ extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __THROW; __THROW. */ extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, const struct timespec *__abstime); + +/* Make calling thread wait for termination of the thread TH, but only + until TIMEOUT measured against the clock specified by CLOCKID. The + exit status of the thread is stored in *THREAD_RETURN, if + THREAD_RETURN is not NULL. + + This function is a cancellation point and therefore not marked with + __THROW. */ +extern int pthread_clockjoin_np (pthread_t __th, void **__thread_return, + clockid_t __clockid, + const struct timespec *__abstime); #endif /* Indicate that the thread TH is never to be joined with PTHREAD_JOIN. diff --git a/lib/libc/glibc/sysdeps/powerpc/bits/endian.h b/lib/libc/glibc/sysdeps/powerpc/bits/endian.h deleted file mode 100644 index cd8ae4fc50..0000000000 --- a/lib/libc/glibc/sysdeps/powerpc/bits/endian.h +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (C) 1997-2019 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 - . */ - -/* PowerPC can be little or big endian. Hopefully gcc will know... */ - -#ifndef _ENDIAN_H -# error "Never use directly; include instead." -#endif - -#if defined __BIG_ENDIAN__ || defined _BIG_ENDIAN -# if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN -# error Both BIG_ENDIAN and LITTLE_ENDIAN defined! -# endif -# define __BYTE_ORDER __BIG_ENDIAN -#else -# if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN -# define __BYTE_ORDER __LITTLE_ENDIAN -# else -# warning Cannot determine current byte order, assuming big-endian. -# define __BYTE_ORDER __BIG_ENDIAN -# endif -#endif diff --git a/lib/libc/glibc/sysdeps/powerpc/bits/endianness.h b/lib/libc/glibc/sysdeps/powerpc/bits/endianness.h new file mode 100644 index 0000000000..3e7735237e --- /dev/null +++ b/lib/libc/glibc/sysdeps/powerpc/bits/endianness.h @@ -0,0 +1,16 @@ +#ifndef _BITS_ENDIANNESS_H +#define _BITS_ENDIANNESS_H 1 + +#ifndef _BITS_ENDIAN_H +# error "Never use directly; include instead." +#endif + +/* PowerPC has selectable endianness. */ +#if defined __BIG_ENDIAN__ || defined _BIG_ENDIAN +# define __BYTE_ORDER __BIG_ENDIAN +#endif +#if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN +# define __BYTE_ORDER __LITTLE_ENDIAN +#endif + +#endif /* bits/endianness.h */ diff --git a/lib/libc/glibc/sysdeps/powerpc/powerpc32/crti.S b/lib/libc/glibc/sysdeps/powerpc/powerpc32/crti.S index 6c54dcb7b0..4d1082035e 100644 --- a/lib/libc/glibc/sysdeps/powerpc/powerpc32/crti.S +++ b/lib/libc/glibc/sysdeps/powerpc/powerpc32/crti.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for PowerPC. - Copyright (C) 2012-2019 Free Software Foundation, Inc. + Copyright (C) 2012-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* crti.S puts a function prologue at the beginning of the .init and .fini sections and defines global symbols for those addresses, so diff --git a/lib/libc/glibc/sysdeps/powerpc/powerpc32/crtn.S b/lib/libc/glibc/sysdeps/powerpc/powerpc32/crtn.S index aa933c9bb5..630a3b9e35 100644 --- a/lib/libc/glibc/sysdeps/powerpc/powerpc32/crtn.S +++ b/lib/libc/glibc/sysdeps/powerpc/powerpc32/crtn.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for PowerPC. - Copyright (C) 2012-2019 Free Software Foundation, Inc. + Copyright (C) 2012-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* crtn.S puts function epilogues in the .init and .fini sections corresponding to the prologues in crti.S. */ diff --git a/lib/libc/glibc/sysdeps/powerpc/powerpc32/start.S b/lib/libc/glibc/sysdeps/powerpc/powerpc32/start.S index 172fb5a56b..b7b9a133a2 100644 --- a/lib/libc/glibc/sysdeps/powerpc/powerpc32/start.S +++ b/lib/libc/glibc/sysdeps/powerpc/powerpc32/start.S @@ -1,5 +1,5 @@ /* Startup code for programs linked with GNU libc. - Copyright (C) 1998-2019 Free Software Foundation, Inc. + Copyright (C) 1998-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include diff --git a/lib/libc/glibc/sysdeps/powerpc/powerpc32/symbol-hacks.h b/lib/libc/glibc/sysdeps/powerpc/powerpc32/symbol-hacks.h index 1937c5082b..3b03e12629 100644 --- a/lib/libc/glibc/sysdeps/powerpc/powerpc32/symbol-hacks.h +++ b/lib/libc/glibc/sysdeps/powerpc/powerpc32/symbol-hacks.h @@ -1,5 +1,5 @@ /* Hacks needed for symbol manipulation. powerpc version. - Copyright (C) 2017-2019 Free Software Foundation, Inc. + Copyright (C) 2017-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include diff --git a/lib/libc/glibc/sysdeps/powerpc/powerpc32/sysdep.h b/lib/libc/glibc/sysdeps/powerpc/powerpc32/sysdep.h index 0d431f56cd..2ba009e919 100644 --- a/lib/libc/glibc/sysdeps/powerpc/powerpc32/sysdep.h +++ b/lib/libc/glibc/sysdeps/powerpc/powerpc32/sysdep.h @@ -1,5 +1,5 @@ /* Assembly macros for 32-bit PowerPC. - Copyright (C) 1999-2019 Free Software Foundation, Inc. + Copyright (C) 1999-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include @@ -157,4 +157,30 @@ GOT_LABEL: ; \ /* Label in text section. */ #define C_TEXT(name) name +/* Read the value of member from rtld_global_ro. */ +#ifdef PIC +# ifdef SHARED +# if IS_IN (rtld) +/* Inside ld.so we use the local alias to avoid runtime GOT + relocations. */ +# define __GLRO(rOUT, rGOT, member, offset) \ + lwz rOUT,_rtld_local_ro@got(rGOT); \ + lwz rOUT,offset(rOUT) +# else +# define __GLRO(rOUT, rGOT, member, offset) \ + lwz rOUT,_rtld_global_ro@got(rGOT); \ + lwz rOUT,offset(rOUT) +# endif +# else +# define __GLRO(rOUT, rGOT, member, offset) \ + lwz rOUT,member@got(rGOT); \ + lwz rOUT,0(rOUT) +# endif +#else +/* Position-dependent code does not require access to the GOT. */ +# define __GLRO(rOUT, rGOT, member, offset) \ + lis rOUT,(member+LOWORD)@ha; \ + lwz rOUT,(member+LOWORD)@l(rOUT) +#endif /* PIC */ + #endif /* __ASSEMBLER__ */ diff --git a/lib/libc/glibc/sysdeps/powerpc/powerpc64/crti.S b/lib/libc/glibc/sysdeps/powerpc/powerpc64/crti.S index 52e294dcbd..9d334e2817 100644 --- a/lib/libc/glibc/sysdeps/powerpc/powerpc64/crti.S +++ b/lib/libc/glibc/sysdeps/powerpc/powerpc64/crti.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for PowerPC64. - Copyright (C) 2012-2019 Free Software Foundation, Inc. + Copyright (C) 2012-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* crti.S puts a function prologue at the beginning of the .init and .fini sections and defines global symbols for those addresses, so diff --git a/lib/libc/glibc/sysdeps/powerpc/powerpc64/crtn.S b/lib/libc/glibc/sysdeps/powerpc/powerpc64/crtn.S index 32ace21c5b..677beecdaf 100644 --- a/lib/libc/glibc/sysdeps/powerpc/powerpc64/crtn.S +++ b/lib/libc/glibc/sysdeps/powerpc/powerpc64/crtn.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for PowerPC64. - Copyright (C) 2012-2019 Free Software Foundation, Inc. + Copyright (C) 2012-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* crtn.S puts function epilogues in the .init and .fini sections corresponding to the prologues in crti.S. */ diff --git a/lib/libc/glibc/sysdeps/powerpc/powerpc64/dl-dtprocnum.h b/lib/libc/glibc/sysdeps/powerpc/powerpc64/dl-dtprocnum.h index b6756e6a4c..289bcc7aa9 100644 --- a/lib/libc/glibc/sysdeps/powerpc/powerpc64/dl-dtprocnum.h +++ b/lib/libc/glibc/sysdeps/powerpc/powerpc64/dl-dtprocnum.h @@ -1,5 +1,5 @@ /* Configuration of lookup functions. PowerPC64 version. - Copyright (C) 2002-2019 Free Software Foundation, Inc. + Copyright (C) 2002-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* Number of extra dynamic section entries for this architecture. By default there are none. */ diff --git a/lib/libc/glibc/sysdeps/powerpc/powerpc64/start.S b/lib/libc/glibc/sysdeps/powerpc/powerpc64/start.S index 55fae68ad6..94bf771e83 100644 --- a/lib/libc/glibc/sysdeps/powerpc/powerpc64/start.S +++ b/lib/libc/glibc/sysdeps/powerpc/powerpc64/start.S @@ -1,5 +1,5 @@ /* Startup code for programs linked with GNU libc. PowerPC64 version. - Copyright (C) 1998-2019 Free Software Foundation, Inc. + Copyright (C) 1998-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include diff --git a/lib/libc/glibc/sysdeps/powerpc/powerpc64/sysdep.h b/lib/libc/glibc/sysdeps/powerpc/powerpc64/sysdep.h index 08772d34a2..d6616ac905 100644 --- a/lib/libc/glibc/sysdeps/powerpc/powerpc64/sysdep.h +++ b/lib/libc/glibc/sysdeps/powerpc/powerpc64/sysdep.h @@ -1,5 +1,5 @@ /* Assembly macros for 64-bit PowerPC. - Copyright (C) 2002-2019 Free Software Foundation, Inc. + Copyright (C) 2002-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include @@ -342,6 +342,30 @@ LT_LABELSUFFIX(name,_name_end): ; \ #define PSEUDO_END_ERRVAL(name) \ END (name) +#ifdef SHARED +# if IS_IN (rtld) + /* Inside ld.so we use the local alias to avoid runtime GOT + relocations. */ +# define __GLRO_DEF(var) \ +.LC__ ## var: \ + .tc _rtld_local_ro[TC],_rtld_local_ro +# else +# define __GLRO_DEF(var) \ +.LC__ ## var: \ + .tc _rtld_global_ro[TC],_rtld_global_ro +# endif +# define __GLRO(rOUT, var, offset) \ + ld rOUT,.LC__ ## var@toc(r2); \ + lwz rOUT,offset(rOUT) +#else +# define __GLRO_DEF(var) \ +.LC__ ## var: \ + .tc _ ## var[TC],_ ## var +# define __GLRO(rOUT, var, offset) \ + ld rOUT,.LC__ ## var@toc(r2); \ + lwz rOUT,0(rOUT) +#endif + #else /* !__ASSEMBLER__ */ #if _CALL_ELF != 2 diff --git a/lib/libc/glibc/sysdeps/powerpc/sysdep.h b/lib/libc/glibc/sysdeps/powerpc/sysdep.h index 78f1155b02..e67b2a64ee 100644 --- a/lib/libc/glibc/sysdeps/powerpc/sysdep.h +++ b/lib/libc/glibc/sysdeps/powerpc/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999-2019 Free Software Foundation, Inc. +/* Copyright (C) 1999-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * Powerpc Feature masks for the Aux Vector Hardware Capabilities (AT_HWCAP). diff --git a/lib/libc/glibc/sysdeps/riscv/bits/endian.h b/lib/libc/glibc/sysdeps/riscv/bits/endian.h deleted file mode 100644 index 4aaf559d4f..0000000000 --- a/lib/libc/glibc/sysdeps/riscv/bits/endian.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef _ENDIAN_H -# error "Never use directly; include instead." -#endif - -#define __BYTE_ORDER __LITTLE_ENDIAN diff --git a/lib/libc/glibc/sysdeps/riscv/bits/endianness.h b/lib/libc/glibc/sysdeps/riscv/bits/endianness.h new file mode 100644 index 0000000000..952d08595a --- /dev/null +++ b/lib/libc/glibc/sysdeps/riscv/bits/endianness.h @@ -0,0 +1,11 @@ +#ifndef _BITS_ENDIANNESS_H +#define _BITS_ENDIANNESS_H 1 + +#ifndef _BITS_ENDIAN_H +# error "Never use directly; include instead." +#endif + +/* RISC-V is little-endian. */ +#define __BYTE_ORDER __LITTLE_ENDIAN + +#endif /* bits/endianness.h */ diff --git a/lib/libc/glibc/sysdeps/riscv/nptl/bits/pthreadtypes-arch.h b/lib/libc/glibc/sysdeps/riscv/nptl/bits/pthreadtypes-arch.h index e3fecc3208..c3c72d6c10 100644 --- a/lib/libc/glibc/sysdeps/riscv/nptl/bits/pthreadtypes-arch.h +++ b/lib/libc/glibc/sysdeps/riscv/nptl/bits/pthreadtypes-arch.h @@ -1,5 +1,5 @@ /* Machine-specific pthread type layouts. RISC-V version. - Copyright (C) 2011-2019 Free Software Foundation, Inc. + Copyright (C) 2011-2020 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 @@ -14,12 +14,12 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #ifndef _BITS_PTHREADTYPES_ARCH_H #define _BITS_PTHREADTYPES_ARCH_H 1 -#include +#include #if __riscv_xlen == 64 # define __SIZEOF_PTHREAD_ATTR_T 56 @@ -35,34 +35,7 @@ # error "rv32i-based systems are not supported" #endif -#define __PTHREAD_COMPAT_PADDING_MID -#define __PTHREAD_COMPAT_PADDING_END -#define __PTHREAD_MUTEX_LOCK_ELISION 0 -#define __PTHREAD_MUTEX_USE_UNION 0 -#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 0 - #define __LOCK_ALIGNMENT #define __ONCE_ALIGNMENT -/* There is a lot of padding in this structure. While it's not strictly - necessary on RISC-V, we're going to leave it in to be on the safe side in - case it's needed in the future. Most other architectures have the padding, - so this gives us the same extensibility as everyone else has. */ -struct __pthread_rwlock_arch_t -{ - unsigned int __readers; - unsigned int __writers; - unsigned int __wrphase_futex; - unsigned int __writers_futex; - unsigned int __pad3; - unsigned int __pad4; - int __cur_writer; - int __shared; - unsigned long int __pad1; - unsigned long int __pad2; - unsigned int __flags; -}; - -#define __PTHREAD_RWLOCK_ELISION_EXTRA 0 - #endif /* bits/pthreadtypes.h */ diff --git a/lib/libc/glibc/sysdeps/riscv/start.S b/lib/libc/glibc/sysdeps/riscv/start.S index e2fb99d8ed..09511b1ef8 100644 --- a/lib/libc/glibc/sysdeps/riscv/start.S +++ b/lib/libc/glibc/sysdeps/riscv/start.S @@ -1,5 +1,5 @@ /* Startup code compliant to the ELF RISC-V ABI. - Copyright (C) 1995-2019 Free Software Foundation, Inc. + Copyright (C) 1995-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #define __ASSEMBLY__ 1 #include @@ -47,7 +47,7 @@ ENTRY (ENTRY_POINT) .cfi_label to force starting the FDE. */ .cfi_label .Ldummy cfi_undefined (ra) - call .Lload_gp + call load_gp mv a5, a0 /* rtld_fini. */ /* main may be in a shared library. */ la a0, main @@ -68,7 +68,7 @@ END (ENTRY_POINT) needs to be initialized before calling __libc_start_main in that case. So we redundantly initialize it at the beginning of _start. */ -.Lload_gp: +load_gp: .option push .option norelax lla gp, __global_pointer$ @@ -76,7 +76,7 @@ END (ENTRY_POINT) ret .section .preinit_array,"aw" - .dc.a .Lload_gp + .dc.a load_gp /* Define a symbol for the first piece of initialized data. */ .data diff --git a/lib/libc/glibc/sysdeps/s390/bits/endian.h b/lib/libc/glibc/sysdeps/s390/bits/endian.h deleted file mode 100644 index ac27f0119a..0000000000 --- a/lib/libc/glibc/sysdeps/s390/bits/endian.h +++ /dev/null @@ -1,7 +0,0 @@ -/* s390 is big-endian */ - -#ifndef _ENDIAN_H -# error "Never use directly; include instead." -#endif - -#define __BYTE_ORDER __BIG_ENDIAN diff --git a/lib/libc/glibc/sysdeps/s390/bits/endianness.h b/lib/libc/glibc/sysdeps/s390/bits/endianness.h new file mode 100644 index 0000000000..c2d34e1c3e --- /dev/null +++ b/lib/libc/glibc/sysdeps/s390/bits/endianness.h @@ -0,0 +1,11 @@ +#ifndef _BITS_ENDIANNESS_H +#define _BITS_ENDIANNESS_H 1 + +#ifndef _BITS_ENDIAN_H +# error "Never use directly; include instead." +#endif + +/* S/390 is big-endian. */ +#define __BYTE_ORDER __BIG_ENDIAN + +#endif /* bits/endianness.h */ diff --git a/lib/libc/glibc/sysdeps/s390/s390-32/crti.S b/lib/libc/glibc/sysdeps/s390/s390-32/crti.S index 372adb5df6..07f901753a 100644 --- a/lib/libc/glibc/sysdeps/s390/s390-32/crti.S +++ b/lib/libc/glibc/sysdeps/s390/s390-32/crti.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for S/390. - Copyright (C) 2000-2019 Free Software Foundation, Inc. + Copyright (C) 2000-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* crti.S puts a function prologue at the beginning of the .init and .fini sections and defines global symbols for those addresses, so diff --git a/lib/libc/glibc/sysdeps/s390/s390-32/crtn.S b/lib/libc/glibc/sysdeps/s390/s390-32/crtn.S index c912cb3553..66f9085a3f 100644 --- a/lib/libc/glibc/sysdeps/s390/s390-32/crtn.S +++ b/lib/libc/glibc/sysdeps/s390/s390-32/crtn.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for S/390. - Copyright (C) 2000-2019 Free Software Foundation, Inc. + Copyright (C) 2000-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* crtn.S puts function epilogues in the .init and .fini sections corresponding to the prologues in crti.S. */ diff --git a/lib/libc/glibc/sysdeps/s390/s390-32/dl-sysdep.h b/lib/libc/glibc/sysdeps/s390/s390-32/dl-sysdep.h index b6d66939ef..2ff5c0101f 100644 --- a/lib/libc/glibc/sysdeps/s390/s390-32/dl-sysdep.h +++ b/lib/libc/glibc/sysdeps/s390/s390-32/dl-sysdep.h @@ -1,5 +1,5 @@ /* System-specific settings for dynamic linker code. S/390 version. - Copyright (C) 2014-2019 Free Software Foundation, Inc. + Copyright (C) 2014-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #include_next diff --git a/lib/libc/glibc/sysdeps/s390/s390-32/start.S b/lib/libc/glibc/sysdeps/s390/s390-32/start.S index c5bef71cec..af9dccfb9d 100644 --- a/lib/libc/glibc/sysdeps/s390/s390-32/start.S +++ b/lib/libc/glibc/sysdeps/s390/s390-32/start.S @@ -1,5 +1,5 @@ /* Startup code compliant to the ELF s390 ABI. - Copyright (C) 2000-2019 Free Software Foundation, Inc. + Copyright (C) 2000-2020 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of the GNU C Library. @@ -32,7 +32,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include diff --git a/lib/libc/glibc/sysdeps/s390/s390-32/symbol-hacks.h b/lib/libc/glibc/sysdeps/s390/s390-32/symbol-hacks.h index e58e60728a..71691597db 100644 --- a/lib/libc/glibc/sysdeps/s390/s390-32/symbol-hacks.h +++ b/lib/libc/glibc/sysdeps/s390/s390-32/symbol-hacks.h @@ -1,5 +1,5 @@ /* Hacks needed for symbol manipulation. s390 version. - Copyright (C) 2017-2019 Free Software Foundation, Inc. + Copyright (C) 2017-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include diff --git a/lib/libc/glibc/sysdeps/s390/s390-32/sysdep.h b/lib/libc/glibc/sysdeps/s390/s390-32/sysdep.h index 4a441e1204..3e41e6fbc2 100644 --- a/lib/libc/glibc/sysdeps/s390/s390-32/sysdep.h +++ b/lib/libc/glibc/sysdeps/s390/s390-32/sysdep.h @@ -1,5 +1,5 @@ /* Assembler macros for s390. - Copyright (C) 2000-2019 Free Software Foundation, Inc. + Copyright (C) 2000-2020 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of the GNU C Library. @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include diff --git a/lib/libc/glibc/sysdeps/s390/s390-64/crti.S b/lib/libc/glibc/sysdeps/s390/s390-64/crti.S index c03b292007..e135874343 100644 --- a/lib/libc/glibc/sysdeps/s390/s390-64/crti.S +++ b/lib/libc/glibc/sysdeps/s390/s390-64/crti.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for 64 bit S/390. - Copyright (C) 2001-2019 Free Software Foundation, Inc. + Copyright (C) 2001-2020 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of the GNU C Library. @@ -32,7 +32,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* crti.S puts a function prologue at the beginning of the .init and .fini sections and defines global symbols for those addresses, so diff --git a/lib/libc/glibc/sysdeps/s390/s390-64/crtn.S b/lib/libc/glibc/sysdeps/s390/s390-64/crtn.S index 34e14112ac..2cd0d24250 100644 --- a/lib/libc/glibc/sysdeps/s390/s390-64/crtn.S +++ b/lib/libc/glibc/sysdeps/s390/s390-64/crtn.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for 64 bit S/390. - Copyright (C) 2001-2019 Free Software Foundation, Inc. + Copyright (C) 2001-2020 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of the GNU C Library. @@ -32,7 +32,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* crtn.S puts function epilogues in the .init and .fini sections corresponding to the prologues in crti.S. */ diff --git a/lib/libc/glibc/sysdeps/s390/s390-64/start.S b/lib/libc/glibc/sysdeps/s390/s390-64/start.S index 1a632f2dc7..02ed4aad51 100644 --- a/lib/libc/glibc/sysdeps/s390/s390-64/start.S +++ b/lib/libc/glibc/sysdeps/s390/s390-64/start.S @@ -1,5 +1,5 @@ /* Startup code compliant to the 64 bit S/390 ELF ABI. - Copyright (C) 2001-2019 Free Software Foundation, Inc. + Copyright (C) 2001-2020 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of the GNU C Library. @@ -32,7 +32,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include diff --git a/lib/libc/glibc/sysdeps/s390/s390-64/sysdep.h b/lib/libc/glibc/sysdeps/s390/s390-64/sysdep.h index 0531fa5823..2da2b0049e 100644 --- a/lib/libc/glibc/sysdeps/s390/s390-64/sysdep.h +++ b/lib/libc/glibc/sysdeps/s390/s390-64/sysdep.h @@ -1,5 +1,5 @@ /* Assembler macros for 64 bit S/390. - Copyright (C) 2001-2019 Free Software Foundation, Inc. + Copyright (C) 2001-2020 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of the GNU C Library. @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include diff --git a/lib/libc/glibc/sysdeps/sh/bits/endian.h b/lib/libc/glibc/sysdeps/sh/bits/endian.h deleted file mode 100644 index 1fef1ff938..0000000000 --- a/lib/libc/glibc/sysdeps/sh/bits/endian.h +++ /dev/null @@ -1,13 +0,0 @@ -/* SH is bi-endian but with a big-endian FPU. */ - -#ifndef _ENDIAN_H -# error "Never use directly; include instead." -#endif - -#ifdef __LITTLE_ENDIAN__ -#define __BYTE_ORDER __LITTLE_ENDIAN -#define __FLOAT_WORD_ORDER __LITTLE_ENDIAN -#else -#define __BYTE_ORDER __BIG_ENDIAN -#define __FLOAT_WORD_ORDER __BIG_ENDIAN -#endif diff --git a/lib/libc/glibc/sysdeps/sh/bits/endianness.h b/lib/libc/glibc/sysdeps/sh/bits/endianness.h new file mode 100644 index 0000000000..45c7c83a63 --- /dev/null +++ b/lib/libc/glibc/sysdeps/sh/bits/endianness.h @@ -0,0 +1,15 @@ +#ifndef _BITS_ENDIANNESS_H +#define _BITS_ENDIANNESS_H 1 + +#ifndef _BITS_ENDIAN_H +# error "Never use directly; include instead." +#endif + +/* SH has selectable endianness. */ +#ifdef __LITTLE_ENDIAN__ +#define __BYTE_ORDER __LITTLE_ENDIAN +#else +#define __BYTE_ORDER __BIG_ENDIAN +#endif + +#endif /* bits/endianness.h */ diff --git a/lib/libc/glibc/sysdeps/sh/crti.S b/lib/libc/glibc/sysdeps/sh/crti.S index 611762c9ee..67ff55ae6c 100644 --- a/lib/libc/glibc/sysdeps/sh/crti.S +++ b/lib/libc/glibc/sysdeps/sh/crti.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for SH. - Copyright (C) 2000-2019 Free Software Foundation, Inc. + Copyright (C) 2000-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* crti.S puts a function prologue at the beginning of the .init and .fini sections and defines global symbols for those addresses, so diff --git a/lib/libc/glibc/sysdeps/sh/crtn.S b/lib/libc/glibc/sysdeps/sh/crtn.S index 75cc6c2389..aa3d326a7d 100644 --- a/lib/libc/glibc/sysdeps/sh/crtn.S +++ b/lib/libc/glibc/sysdeps/sh/crtn.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for SH. - Copyright (C) 2000-2019 Free Software Foundation, Inc. + Copyright (C) 2000-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* crtn.S puts function epilogues in the .init and .fini sections corresponding to the prologues in crti.S. */ diff --git a/lib/libc/glibc/sysdeps/sh/start.S b/lib/libc/glibc/sysdeps/sh/start.S index d3ef53a63b..433f67a259 100644 --- a/lib/libc/glibc/sysdeps/sh/start.S +++ b/lib/libc/glibc/sysdeps/sh/start.S @@ -1,5 +1,5 @@ /* Startup code for SH & ELF. - Copyright (C) 1999-2019 Free Software Foundation, Inc. + Copyright (C) 1999-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* This is the canonical entry point, usually the first thing in the text segment. diff --git a/lib/libc/glibc/sysdeps/sh/sysdep.h b/lib/libc/glibc/sysdeps/sh/sysdep.h index 51700d61ce..cf83bab024 100644 --- a/lib/libc/glibc/sysdeps/sh/sysdep.h +++ b/lib/libc/glibc/sysdeps/sh/sysdep.h @@ -1,5 +1,5 @@ /* Assembler macros for SH. - Copyright (C) 1999-2019 Free Software Foundation, Inc. + Copyright (C) 1999-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include diff --git a/lib/libc/glibc/sysdeps/sparc/bits/endian.h b/lib/libc/glibc/sysdeps/sparc/bits/endianness.h similarity index 56% rename from lib/libc/glibc/sysdeps/sparc/bits/endian.h rename to lib/libc/glibc/sysdeps/sparc/bits/endianness.h index 8acfdf5df6..0b6f5bf8b2 100644 --- a/lib/libc/glibc/sysdeps/sparc/bits/endian.h +++ b/lib/libc/glibc/sysdeps/sparc/bits/endianness.h @@ -1,12 +1,16 @@ -/* Sparc is big-endian, but v9 supports endian conversion on loads/stores - and GCC supports such a mode. Be prepared. */ +#ifndef _BITS_ENDIANNESS_H +#define _BITS_ENDIANNESS_H 1 -#ifndef _ENDIAN_H -# error "Never use directly; include instead." +#ifndef _BITS_ENDIAN_H +# error "Never use directly; include instead." #endif +/* Sparc is big-endian, but v9 supports endian conversion on loads/stores + and GCC supports such a mode. Be prepared. */ #ifdef __LITTLE_ENDIAN__ # define __BYTE_ORDER __LITTLE_ENDIAN #else # define __BYTE_ORDER __BIG_ENDIAN #endif + +#endif /* bits/endianness.h */ diff --git a/lib/libc/glibc/sysdeps/sparc/crti.S b/lib/libc/glibc/sysdeps/sparc/crti.S index 3211d4c34a..9a30eab7ee 100644 --- a/lib/libc/glibc/sysdeps/sparc/crti.S +++ b/lib/libc/glibc/sysdeps/sparc/crti.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for sparc. - Copyright (C) 1995-2019 Free Software Foundation, Inc. + Copyright (C) 1995-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* crti.S puts a function prologue at the beginning of the .init and .fini sections and defines global symbols for those addresses, so diff --git a/lib/libc/glibc/sysdeps/sparc/crtn.S b/lib/libc/glibc/sysdeps/sparc/crtn.S index 31191dfcec..9a88188c44 100644 --- a/lib/libc/glibc/sysdeps/sparc/crtn.S +++ b/lib/libc/glibc/sysdeps/sparc/crtn.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for sparc. - Copyright (C) 1995-2019 Free Software Foundation, Inc. + Copyright (C) 1995-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* crtn.S puts function epilogues in the .init and .fini sections corresponding to the prologues in crti.S. */ diff --git a/lib/libc/glibc/sysdeps/sparc/dl-dtprocnum.h b/lib/libc/glibc/sysdeps/sparc/dl-dtprocnum.h index 280ff03e58..1094529229 100644 --- a/lib/libc/glibc/sysdeps/sparc/dl-dtprocnum.h +++ b/lib/libc/glibc/sysdeps/sparc/dl-dtprocnum.h @@ -1,5 +1,5 @@ /* Configuration of lookup functions. SPARC version. - Copyright (C) 2000-2019 Free Software Foundation, Inc. + Copyright (C) 2000-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* Number of extra dynamic section entries for this architecture. By default there are none. */ diff --git a/lib/libc/glibc/sysdeps/sparc/dl-sysdep.h b/lib/libc/glibc/sysdeps/sparc/dl-sysdep.h index 1d5e0eb7fd..5dfd3e314b 100644 --- a/lib/libc/glibc/sysdeps/sparc/dl-sysdep.h +++ b/lib/libc/glibc/sysdeps/sparc/dl-sysdep.h @@ -1,5 +1,5 @@ /* System-specific settings for dynamic linker code. SPARC version. - Copyright (C) 2002-2019 Free Software Foundation, Inc. + Copyright (C) 2002-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include_next diff --git a/lib/libc/glibc/sysdeps/sparc/sparc32/start.S b/lib/libc/glibc/sysdeps/sparc/sparc32/start.S index 7372d1a024..5afc3f6e89 100644 --- a/lib/libc/glibc/sysdeps/sparc/sparc32/start.S +++ b/lib/libc/glibc/sysdeps/sparc/sparc32/start.S @@ -1,5 +1,5 @@ /* Startup code for elf32-sparc - Copyright (C) 1997-2019 Free Software Foundation, Inc. + Copyright (C) 1997-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1997. @@ -32,7 +32,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include diff --git a/lib/libc/glibc/sysdeps/sparc/sparc64/start.S b/lib/libc/glibc/sysdeps/sparc/sparc64/start.S index cfccea154c..8167a3363d 100644 --- a/lib/libc/glibc/sysdeps/sparc/sparc64/start.S +++ b/lib/libc/glibc/sysdeps/sparc/sparc64/start.S @@ -1,5 +1,5 @@ /* Startup code for elf64-sparc - Copyright (C) 1997-2019 Free Software Foundation, Inc. + Copyright (C) 1997-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1997. @@ -32,7 +32,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include diff --git a/lib/libc/glibc/sysdeps/sparc/sysdep.h b/lib/libc/glibc/sysdeps/sparc/sysdep.h index 31a8addebc..d0541d5492 100644 --- a/lib/libc/glibc/sysdeps/sparc/sysdep.h +++ b/lib/libc/glibc/sysdeps/sparc/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2019 Free Software Foundation, Inc. +/* Copyright (C) 2011-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #define _SYSDEPS_SYSDEP_H 1 #include diff --git a/lib/libc/glibc/sysdeps/unix/alpha/sysdep.h b/lib/libc/glibc/sysdeps/unix/alpha/sysdep.h index dcd4c79be5..74db6b02b2 100644 --- a/lib/libc/glibc/sysdeps/unix/alpha/sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/alpha/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2019 Free Software Foundation, Inc. +/* Copyright (C) 1992-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #include #include /* Defines RTLD_PRIVATE_ERRNO. */ diff --git a/lib/libc/glibc/sysdeps/unix/arm/sysdep.h b/lib/libc/glibc/sysdeps/unix/arm/sysdep.h index 7d619d70a3..ee5e374cd1 100644 --- a/lib/libc/glibc/sysdeps/unix/arm/sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/arm/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2019 Free Software Foundation, Inc. +/* Copyright (C) 1997-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #include #include diff --git a/lib/libc/glibc/sysdeps/unix/i386/sysdep.h b/lib/libc/glibc/sysdeps/unix/i386/sysdep.h index 2e438d2be8..11ffec94d6 100644 --- a/lib/libc/glibc/sysdeps/unix/i386/sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/i386/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2019 Free Software Foundation, Inc. +/* Copyright (C) 1991-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include #include diff --git a/lib/libc/glibc/sysdeps/unix/mips/mips32/sysdep.h b/lib/libc/glibc/sysdeps/unix/mips/mips32/sysdep.h index 15d84187ef..b09367347e 100644 --- a/lib/libc/glibc/sysdeps/unix/mips/mips32/sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/mips/mips32/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2019 Free Software Foundation, Inc. +/* Copyright (C) 1992-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #include diff --git a/lib/libc/glibc/sysdeps/unix/mips/mips64/n32/sysdep.h b/lib/libc/glibc/sysdeps/unix/mips/mips64/n32/sysdep.h index c89b892640..65ce7c5406 100644 --- a/lib/libc/glibc/sysdeps/unix/mips/mips64/n32/sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/mips/mips64/n32/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2019 Free Software Foundation, Inc. +/* Copyright (C) 1992-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Alexandre Oliva . @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #include diff --git a/lib/libc/glibc/sysdeps/unix/mips/mips64/n64/sysdep.h b/lib/libc/glibc/sysdeps/unix/mips/mips64/n64/sysdep.h index 8a48bb69c7..3d8b254017 100644 --- a/lib/libc/glibc/sysdeps/unix/mips/mips64/n64/sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/mips/mips64/n64/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2019 Free Software Foundation, Inc. +/* Copyright (C) 1992-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Alexandre Oliva . @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #include diff --git a/lib/libc/glibc/sysdeps/unix/mips/sysdep.h b/lib/libc/glibc/sysdeps/unix/mips/sysdep.h index dd47f05e4e..7b162e9aa5 100644 --- a/lib/libc/glibc/sysdeps/unix/mips/sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/mips/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2019 Free Software Foundation, Inc. +/* Copyright (C) 1992-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #include #include diff --git a/lib/libc/glibc/sysdeps/unix/powerpc/sysdep.h b/lib/libc/glibc/sysdeps/unix/powerpc/sysdep.h index 7cc6e47414..ec698f27e5 100644 --- a/lib/libc/glibc/sysdeps/unix/powerpc/sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/powerpc/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2019 Free Software Foundation, Inc. +/* Copyright (C) 1991-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include #include diff --git a/lib/libc/glibc/sysdeps/unix/sh/sysdep.h b/lib/libc/glibc/sysdeps/unix/sh/sysdep.h index 6d8da94049..9a294d1654 100644 --- a/lib/libc/glibc/sysdeps/unix/sh/sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/sh/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999-2019 Free Software Foundation, Inc. +/* Copyright (C) 1999-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include #include diff --git a/lib/libc/glibc/sysdeps/unix/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysdep.h index 6e503d7688..c2f1bd3c63 100644 --- a/lib/libc/glibc/sysdeps/unix/sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2019 Free Software Foundation, Inc. +/* Copyright (C) 1991-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include #include diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/aarch64/kernel-features.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/aarch64/kernel-features.h index d2a67e33b1..5f301bed6c 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/aarch64/kernel-features.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/aarch64/kernel-features.h @@ -1,6 +1,6 @@ /* Set flags signalling availability of kernel features based on given kernel version number. AArch64 version. - Copyright (C) 2018-2019 Free Software Foundation, Inc. + Copyright (C) 2018-2020 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 @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include_next diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/aarch64/sys/elf.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/aarch64/sys/elf.h index bcddff1827..2aa8dc77df 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/aarch64/sys/elf.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/aarch64/sys/elf.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2019 Free Software Foundation, Inc. +/* Copyright (C) 1996-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_ELF_H #define _SYS_ELF_H 1 diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/aarch64/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/aarch64/sysdep.h index 935c507f8c..00b8e241c8 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/aarch64/sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/aarch64/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2019 Free Software Foundation, Inc. +/* Copyright (C) 2005-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -14,14 +14,11 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _LINUX_AARCH64_SYSDEP_H #define _LINUX_AARCH64_SYSDEP_H 1 -/* Always enable vsyscalls on aarch64 */ -#define ALWAYS_USE_VSYSCALL 1 - #include #include #include @@ -154,11 +151,18 @@ #else /* not __ASSEMBLER__ */ +# ifdef __LP64__ +# define VDSO_NAME "LINUX_2.6.39" +# define VDSO_HASH 123718537 +# else +# define VDSO_NAME "LINUX_4.9" +# define VDSO_HASH 61765625 +# endif /* List of system calls which are supported as vsyscalls. */ -# define HAVE_CLOCK_GETRES_VSYSCALL 1 -# define HAVE_CLOCK_GETTIME_VSYSCALL 1 -# define HAVE_GETTIMEOFDAY_VSYSCALL 1 +# define HAVE_CLOCK_GETRES64_VSYSCALL "__kernel_clock_getres" +# define HAVE_CLOCK_GETTIME64_VSYSCALL "__kernel_clock_gettime" +# define HAVE_GETTIMEOFDAY_VSYSCALL "__kernel_gettimeofday" /* Previously AArch64 used the generic version without the libc_hidden_def which lead in a non existent __send symbol in libc.so. */ diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/alpha/bits/stat.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/alpha/bits/stat.h index 4f0cef3cdf..0064ca09ff 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/alpha/bits/stat.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/alpha/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2019 Free Software Foundation, Inc. +/* Copyright (C) 1996-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include directly; use instead." diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h index cde275defd..30356ba6d6 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h @@ -1,5 +1,5 @@ /* bits/typesizes.h -- underlying types for *_t. Linux/Alpha version. - Copyright (C) 2002-2019 Free Software Foundation, Inc. + Copyright (C) 2002-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #ifndef _BITS_TYPES_H # error "Never include directly; use instead." @@ -69,6 +69,9 @@ /* And for __rlim_t and __rlim64_t. */ #define __RLIM_T_MATCHES_RLIM64_T 1 +/* Not for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */ +# define __STATFS_MATCHES_STATFS64 0 + /* Number of descriptors that can fit in an `fd_set'. */ #define __FD_SETSIZE 1024 diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/alpha/kernel-features.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/alpha/kernel-features.h index 81f6c3633a..5f003e634a 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/alpha/kernel-features.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/alpha/kernel-features.h @@ -1,6 +1,6 @@ /* Set flags signalling availability of kernel features based on given kernel version number. - Copyright (C) 2010-2019 Free Software Foundation, Inc. + Copyright (C) 2010-2020 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 @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #ifndef _KERNEL_FEATURES_H #define _KERNEL_FEATURES_H 1 @@ -28,11 +28,6 @@ # define __ASSUME_STATFS64 0 #endif -/* Alpha used to define SysV ipc shmat syscall with a different name. */ -#ifndef __NR_shmat -# define __NR_shmat __NR_osf_shmat -#endif - #define __ASSUME_RECV_SYSCALL 1 #define __ASSUME_SEND_SYSCALL 1 @@ -52,4 +47,7 @@ # undef __ASSUME_STATX #endif +/* Alpha requires old sysvipc even being a 64-bit architecture. */ +#undef __ASSUME_SYSVIPC_DEFAULT_IPC_64 + #endif /* _KERNEL_FEATURES_H */ diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/alpha/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/alpha/sysdep.h index d61d4df550..f8c9e589ec 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/alpha/sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/alpha/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2019 Free Software Foundation, Inc. +/* Copyright (C) 1992-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, , August 1995. @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #ifndef _LINUX_ALPHA_SYSDEP_H #define _LINUX_ALPHA_SYSDEP_H 1 @@ -37,41 +37,6 @@ #undef SYS_ify #define SYS_ify(syscall_name) __NR_##syscall_name -/* Define some aliases to make automatic syscall generation work - properly. The SYS_* variants are for the benefit of the files in - sysdeps/unix. */ -#define __NR_getpid __NR_getxpid -#define __NR_getuid __NR_getxuid -#define __NR_getgid __NR_getxgid -#define SYS_getpid __NR_getxpid -#define SYS_getuid __NR_getxuid -#define SYS_getgid __NR_getxgid - -/* - * Some syscalls no Linux program should know about: - */ -#define __NR_osf_sigprocmask 48 -#ifndef __NR_osf_shmat -# define __NR_osf_shmat 209 -#endif -#define __NR_osf_getsysinfo 256 -#define __NR_osf_setsysinfo 257 - -/* Help old kernel headers where particular syscalls are not available. */ -#ifndef __NR_semtimedop -# define __NR_semtimedop 423 -#endif - -/* This is a kludge to make syscalls.list find these under the names - pread and pwrite, since some kernel headers define those names - and some define the *64 names for the same system calls. */ -#if !defined __NR_pread && defined __NR_pread64 -# define __NR_pread __NR_pread64 -#endif -#if !defined __NR_pwrite && defined __NR_pwrite64 -# define __NR_pwrite __NR_pwrite64 -#endif - #define SINGLE_THREAD_BY_GLOBAL 1 #endif /* _LINUX_ALPHA_SYSDEP_H */ diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/arm/kernel-features.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/arm/kernel-features.h index 4220adff37..a148a4dc8c 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/arm/kernel-features.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/arm/kernel-features.h @@ -1,6 +1,6 @@ /* Set flags signalling availability of kernel features based on given kernel version number. - Copyright (C) 2006-2019 Free Software Foundation, Inc. + Copyright (C) 2006-2020 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 @@ -15,8 +15,9 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ +#include #include_next /* The ARM kernel before 3.14.3 may or may not support @@ -49,3 +50,9 @@ #undef __ASSUME_CLONE_DEFAULT #define __ASSUME_CLONE_BACKWARDS 1 + +#if __BYTE_ORDER == __BIG_ENDIAN +# define __ASSUME_SYSVIPC_BROKEN_MODE_T +#endif + +#undef __ASSUME_SYSVIPC_DEFAULT_IPC_64 diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/arm/sys/elf.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/arm/sys/elf.h index e6b31aff0b..591e0d8a88 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/arm/sys/elf.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/arm/sys/elf.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2019 Free Software Foundation, Inc. +/* Copyright (C) 1996-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #ifndef _SYS_ELF_H #define _SYS_ELF_H 1 diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/arm/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/arm/sysdep.h index 9b4ed8d6a5..0c5f498583 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2019 Free Software Foundation, Inc. +/* Copyright (C) 1992-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, , August 1995. ARM changes by Philip Blundell, , May 1997. @@ -15,14 +15,11 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #ifndef _LINUX_ARM_SYSDEP_H #define _LINUX_ARM_SYSDEP_H 1 -/* Always enable vsyscalls on arm */ -#define ALWAYS_USE_VSYSCALL 1 - /* There is some commonality. */ #include #include @@ -380,10 +377,6 @@ __local_syscall_error: \ #define INTERNAL_SYSCALL(name, err, nr, args...) \ INTERNAL_SYSCALL_RAW(SYS_ify(name), err, nr, args) -#undef INTERNAL_SYSCALL_ARM -#define INTERNAL_SYSCALL_ARM(name, err, nr, args...) \ - INTERNAL_SYSCALL_RAW(__ARM_NR_##name, err, nr, args) - #undef INTERNAL_SYSCALL_ERROR_P #define INTERNAL_SYSCALL_ERROR_P(val, err) \ ((unsigned int) (val) >= 0xfffff001u) @@ -391,9 +384,13 @@ __local_syscall_error: \ #undef INTERNAL_SYSCALL_ERRNO #define INTERNAL_SYSCALL_ERRNO(val, err) (-(val)) +#define VDSO_NAME "LINUX_2.6" +#define VDSO_HASH 61765110 + /* List of system calls which are supported as vsyscalls. */ -#define HAVE_CLOCK_GETTIME_VSYSCALL 1 -#define HAVE_GETTIMEOFDAY_VSYSCALL 1 +#define HAVE_CLOCK_GETTIME_VSYSCALL "__vdso_clock_gettime" +#define HAVE_CLOCK_GETTIME64_VSYSCALL "__vdso_clock_gettime64" +#define HAVE_GETTIMEOFDAY_VSYSCALL "__vdso_gettimeofday" #define LOAD_ARGS_0() #define ASM_ARGS_0 diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/bits/stat.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/bits/stat.h index 7946fe2d51..240628a6f4 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/bits/stat.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2019 Free Software Foundation, Inc. +/* Copyright (C) 1992-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include directly; use instead." diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/bits/timex.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/bits/timex.h index bb272e8b19..9adb0bcc60 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/bits/timex.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/bits/timex.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2019 Free Software Foundation, Inc. +/* Copyright (C) 1995-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_TIMEX_H #define _BITS_TIMEX_H 1 diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/dl-sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/dl-sysdep.h index 4239db0ae9..8ed45503e7 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/dl-sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/dl-sysdep.h @@ -1,5 +1,5 @@ /* System-specific settings for dynamic linker code. Linux version. - Copyright (C) 2005-2019 Free Software Foundation, Inc. + Copyright (C) 2005-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include_next diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/generic/bits/stat.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/generic/bits/stat.h index e5c2650104..8d0980f0f5 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/generic/bits/stat.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/generic/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2019 Free Software Foundation, Inc. +/* Copyright (C) 2011-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Chris Metcalf , 2011. @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include directly; use instead." @@ -23,7 +23,7 @@ #ifndef _BITS_STAT_H #define _BITS_STAT_H 1 -#include +#include #include /* 64-bit libc uses the kernel's 'struct stat', accessed via the @@ -42,7 +42,10 @@ #if defined __USE_FILE_OFFSET64 # define __field64(type, type64, name) type64 name -#elif __WORDSIZE == 64 +#elif __WORDSIZE == 64 || defined __INO_T_MATCHES_INO64_T +# if defined __INO_T_MATCHES_INO64_T && !defined __OFF_T_MATCHES_OFF64_T +# error "ino_t and off_t must both be the same type" +# endif # define __field64(type, type64, name) type name #elif __BYTE_ORDER == __LITTLE_ENDIAN # define __field64(type, type64, name) \ diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/generic/bits/typesizes.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/generic/bits/typesizes.h index 3ef1281c8a..a916dea047 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/generic/bits/typesizes.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/generic/bits/typesizes.h @@ -1,5 +1,5 @@ /* bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI. - Copyright (C) 2011-2019 Free Software Foundation, Inc. + Copyright (C) 2011-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Chris Metcalf , 2011. @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #ifndef _BITS_TYPES_H # error "Never include directly; use instead." @@ -73,10 +73,14 @@ /* And for __rlim_t and __rlim64_t. */ # define __RLIM_T_MATCHES_RLIM64_T 1 + +/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */ +# define __STATFS_MATCHES_STATFS64 1 #else # define __RLIM_T_MATCHES_RLIM64_T 0 -#endif +# define __STATFS_MATCHES_STATFS64 0 +#endif /* Number of descriptors that can fit in an `fd_set'. */ #define __FD_SETSIZE 1024 diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/generic/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/generic/sysdep.h index 8f2c310722..23defce7c3 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/generic/sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/generic/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2019 Free Software Foundation, Inc. +/* Copyright (C) 2011-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Chris Metcalf , 2011. @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #include #include diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/hppa/kernel-features.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/hppa/kernel-features.h index b6af135c2e..8548b5c258 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/hppa/kernel-features.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/hppa/kernel-features.h @@ -1,6 +1,6 @@ /* Set flags signalling availability of kernel features based on given kernel version number. - Copyright (C) 2006-2019 Free Software Foundation, Inc. + Copyright (C) 2006-2020 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 @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ /* Support for the utimes syscall was added in 3.14. */ diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/hppa/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/hppa/sysdep.h index 9bff30d56d..6c34189eca 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/hppa/sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/hppa/sysdep.h @@ -1,5 +1,5 @@ /* Assembler macros for PA-RISC. - Copyright (C) 1999-2019 Free Software Foundation, Inc. + Copyright (C) 1999-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, , August 1999. Linux/PA-RISC changes by Philipp Rumpf, , March 2000. @@ -16,7 +16,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #ifndef _LINUX_HPPA_SYSDEP_H #define _LINUX_HPPA_SYSDEP_H 1 diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/i386/dl-sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/i386/dl-sysdep.h index f8d7c0cf7b..03ba2922d7 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/i386/dl-sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/i386/dl-sysdep.h @@ -1,5 +1,5 @@ /* System-specific settings for dynamic linker code. i386 version. - Copyright (C) 2002-2019 Free Software Foundation, Inc. + Copyright (C) 2002-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _LINUX_I386_DL_SYSDEP_H diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/i386/kernel-features.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/i386/kernel-features.h index 3ac725b5a2..64202a1e84 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/i386/kernel-features.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/i386/kernel-features.h @@ -1,6 +1,6 @@ /* Set flags signalling availability of kernel features based on given kernel version number. i386 version. - Copyright (C) 1999-2019 Free Software Foundation, Inc. + Copyright (C) 1999-2020 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 @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* Direct socketcalls available with kernel 4.3. */ #if __LINUX_KERNEL_VERSION >= 0x040300 @@ -43,8 +43,11 @@ # undef __ASSUME_SENDTO_SYSCALL #endif -/* i686 only supports ipc syscall. */ -#undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS +/* i686 only supports ipc syscall before 5.1. */ +#if __LINUX_KERNEL_VERSION < 0x050100 +# undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS +# undef __ASSUME_SYSVIPC_DEFAULT_IPC_64 +#endif #undef __ASSUME_CLONE_DEFAULT #define __ASSUME_CLONE_BACKWARDS 1 diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/i386/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/i386/sysdep.h index 0be10744ff..4aa7bb496a 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/i386/sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/i386/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2019 Free Software Foundation, Inc. +/* Copyright (C) 1992-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, , August 1995. @@ -14,14 +14,11 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _LINUX_I386_SYSDEP_H #define _LINUX_I386_SYSDEP_H 1 -/* Always enable vsyscalls on i386 */ -#define ALWAYS_USE_VSYSCALL 1 - /* There is some commonality. */ #include #include @@ -312,9 +309,15 @@ struct libc_do_syscall_args #define INLINE_SYSCALL_ERROR_RETURN_VALUE(resultvar) \ __syscall_error (-(resultvar)) +# define VDSO_NAME "LINUX_2.6" +# define VDSO_HASH 61765110 + /* List of system calls which are supported as vsyscalls. */ -# define HAVE_CLOCK_GETTIME_VSYSCALL 1 -# define HAVE_GETTIMEOFDAY_VSYSCALL 1 +# define HAVE_CLOCK_GETTIME_VSYSCALL "__vdso_clock_gettime" +# define HAVE_CLOCK_GETTIME64_VSYSCALL "__vdso_clock_gettime64" +# define HAVE_GETTIMEOFDAY_VSYSCALL "__vdso_gettimeofday" +# define HAVE_TIME_VSYSCALL "__vdso_time" +# define HAVE_CLOCK_GETRES_VSYSCALL "__vdso_clock_getres" /* Define a macro which expands inline into the wrapper code for a system call. This use is for internal calls that do not need to handle errors diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/ia64/bits/endian.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/ia64/bits/endian.h deleted file mode 100644 index 98a5e23991..0000000000 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/ia64/bits/endian.h +++ /dev/null @@ -1,7 +0,0 @@ -/* Linux/ia64 is little-endian. */ - -#ifndef _ENDIAN_H -# error "Never use directly; include instead." -#endif - -#define __BYTE_ORDER __LITTLE_ENDIAN diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/ia64/bits/stat.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/ia64/bits/stat.h index 76672a8146..608e988ae6 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/ia64/bits/stat.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/ia64/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999-2019 Free Software Foundation, Inc. +/* Copyright (C) 1999-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include directly; use instead." diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/ia64/dl-sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/ia64/dl-sysdep.h index d514a10c5b..78fa6dd2c9 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/ia64/dl-sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/ia64/dl-sysdep.h @@ -1,5 +1,5 @@ /* System-specific settings for dynamic linker code. IA-64 version. - Copyright (C) 2003-2019 Free Software Foundation, Inc. + Copyright (C) 2003-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _LINUX_IA64_DL_SYSDEP_H #define _LINUX_IA64_DL_SYSDEP_H 1 diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/ia64/kernel-features.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/ia64/kernel-features.h index 333947931d..2376d14e52 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/ia64/kernel-features.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/ia64/kernel-features.h @@ -1,6 +1,6 @@ /* Set flags signalling availability of kernel features based on given kernel version number. - Copyright (C) 2010-2019 Free Software Foundation, Inc. + Copyright (C) 2010-2020 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 @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #ifndef _KERNEL_FEATURES_H #define _KERNEL_FEATURES_H 1 diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/ia64/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/ia64/sysdep.h index 3328502efe..59442c50e9 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/ia64/sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/ia64/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999-2019 Free Software Foundation, Inc. +/* Copyright (C) 1999-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Jes Sorensen, , April 1999. Based on code originally written by David Mosberger-Tang @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _LINUX_IA64_SYSDEP_H #define _LINUX_IA64_SYSDEP_H 1 @@ -25,6 +25,7 @@ #include #include #include +#include /* In order to get __set_errno() definition in INLINE_SYSCALL. */ #ifndef __ASSEMBLER__ @@ -45,16 +46,6 @@ #undef SYS_ify #define SYS_ify(syscall_name) __NR_##syscall_name -/* This is a kludge to make syscalls.list find these under the names - pread and pwrite, since some kernel headers define those names - and some define the *64 names for the same system calls. */ -#if !defined __NR_pread && defined __NR_pread64 -# define __NR_pread __NR_pread64 -#endif -#if !defined __NR_pwrite && defined __NR_pwrite64 -# define __NR_pwrite __NR_pwrite64 -#endif - /* This is to help the old kernel headers where __NR_semtimedop is not available. */ #ifndef __NR_semtimedop @@ -115,7 +106,7 @@ #define DO_CALL_VIA_BREAK(num) \ mov r15=num; \ - break __BREAK_SYSCALL + break __IA64_BREAK_SYSCALL #ifdef IA64_USE_NEW_STUB # ifdef SHARED @@ -229,7 +220,7 @@ register long _r15 asm ("r15") = name; \ long _retval; \ LOAD_REGS_##nr \ - __asm __volatile (BREAK_INSN (__BREAK_SYSCALL) \ + __asm __volatile (BREAK_INSN (__IA64_BREAK_SYSCALL) \ : "=r" (_r8), "=r" (_r10), "=r" (_r15) \ ASM_OUTARGS_##nr \ : "2" (_r15) ASM_ARGS_##nr \ diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/include/bits/syscall.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/include/bits/syscall.h deleted file mode 100644 index 3e60262486..0000000000 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/include/bits/syscall.h +++ /dev/null @@ -1,3 +0,0 @@ -/* The real bits/syscall.h is generated during the build, in - $(objdir)/misc/bits. */ -#include diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/include/sys/timex.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/include/sys/timex.h index 575d2a1cb0..319d566608 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/include/sys/timex.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/include/sys/timex.h @@ -1,5 +1,5 @@ /* Internal declarations for sys/timex.h. - Copyright (C) 2014-2019 Free Software Foundation, Inc. + Copyright (C) 2014-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _INCLUDE_SYS_TIMEX_H #define _INCLUDE_SYS_TIMEX_H 1 diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/kernel-features.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/kernel-features.h index 1518bb5228..32533e94cf 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/kernel-features.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/kernel-features.h @@ -1,6 +1,6 @@ /* Set flags signalling availability of kernel features based on given kernel version number. - Copyright (C) 1999-2019 Free Software Foundation, Inc. + Copyright (C) 1999-2020 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 @@ -15,11 +15,16 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* This file must not contain any C code. At least it must be protected to allow using the file also in assembler files. */ +#ifndef _LINUX_KERNEL_FEATURES_H +#define _LINUX_KERNEL_FEATURES_H 1 + +#include + #ifndef __LINUX_KERNEL_VERSION /* We assume the worst; all kernels should be supported. */ # define __LINUX_KERNEL_VERSION 0 @@ -80,6 +85,17 @@ /* Support for SysV IPC through wired syscalls. All supported architectures either support ipc syscall and/or all the ipc correspondent syscalls. */ #define __ASSUME_DIRECT_SYSVIPC_SYSCALLS 1 +/* The generic default __IPC_64 value is 0x0, however some architectures + require a different value of 0x100. */ +#define __ASSUME_SYSVIPC_DEFAULT_IPC_64 1 + +/* All supported architectures reserve a 32-bit for MODE field in sysvipc + ipc_perm. However, some kernel ABI interfaces still expect a 16-bit + field. This is only an issue if arch-defined IPC_PERM padding is on a + wrong position regarding endianness. In this case, the IPC control + routines (msgctl, semctl, and semtctl) requires to shift the value to + correct place. + The ABIs that requires it define __ASSUME_SYSVIPC_BROKEN_MODE_T. */ /* Support for p{read,write}v2 was added in 4.6. However Linux default implementation does not assume the __ASSUME_* and instead use a fallback @@ -139,3 +155,63 @@ */ #define __ASSUME_CLONE_DEFAULT 1 + +/* Support for 64-bit time_t in the system call interface. When this + flag is set, the kernel provides a version of each of these system + calls that accepts 64-bit time_t: + + clock_adjtime(64) + clock_gettime(64) + clock_settime(64) + clock_getres(_time64) + clock_nanosleep(_time64) + futex(_time64) + mq_timedreceive(_time64) + mq_timedsend(_time64) + ppoll(_time64) + pselect6(_time64) + rt_sigtimedwait(_time64) + sched_rr_get_interval(_time64) + timer_gettime(64) + timer_settime(64) + timerfd_gettime(64) + timerfd_settime(64) + utimensat(_time64) + + On architectures where time_t has historically been 64 bits, + only the 64-bit version of each system call exists, and there + are no suffixes on the __NR_ constants. + + On architectures where time_t has historically been 32 bits, + both 32-bit and 64-bit versions of each system call may exist, + depending on the kernel version. When the 64-bit version exists, + there is a '64' or '_time64' suffix on the name of its __NR_ + constant, as shown above. + + This flag is always set for Linux 5.1 and later. Prior to that + version, it is set only for some CPU architectures and ABIs: + + - __WORDSIZE == 64 - all supported architectures where pointers + are 64 bits also have always had 64-bit time_t. + + - __WORDSIZE == 32 && __SYSCALL_WORDSIZE == 64 - this describes + only one supported configuration, x86's 'x32' subarchitecture, + where pointers are 32 bits but time_t has always been 64 bits. + + __ASSUME_TIME64_SYSCALLS being set does not mean __TIMESIZE is 64, + and __TIMESIZE equal to 64 does not mean __ASSUME_TIME64_SYSCALLS + is set. All four cases are possible. */ + +#if __LINUX_KERNEL_VERSION >= 0x050100 \ + || __WORDSIZE == 64 \ + || (defined __SYSCALL_WORDSIZE && __SYSCALL_WORDSIZE == 64) +# define __ASSUME_TIME64_SYSCALLS 1 +#endif + +/* Linux waitid prior kernel 5.4 does not support waiting for the current + process group. */ +#if __LINUX_KERNEL_VERSION >= 0x050400 +# define __ASSUME_WAITID_PID0_P_PGID +#endif + +#endif /* kernel-features.h */ diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/bits/stat.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/bits/stat.h index 7a537e807c..453dcac709 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/bits/stat.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2019 Free Software Foundation, Inc. +/* Copyright (C) 1992-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include directly; use instead." diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h index 0aa224b7d6..d641ee844c 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2019 Free Software Foundation, Inc. +/* Copyright (C) 2010-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #ifndef _LINUX_M68K_COLDFIRE_SYSDEP_H #define _LINUX_M68K_COLDFIRE_SYSDEP_H 1 diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/kernel-features.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/kernel-features.h index 1976724362..4cdaf93e6d 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/kernel-features.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/kernel-features.h @@ -1,6 +1,6 @@ /* Set flags signalling availability of kernel features based on given kernel version number. - Copyright (C) 2008-2019 Free Software Foundation, Inc. + Copyright (C) 2008-2020 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 @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ /* Direct socketcalls available with kernel 4.3. */ #if __LINUX_KERNEL_VERSION >= 0x040300 @@ -50,5 +50,9 @@ # undef __ASSUME_SET_ROBUST_LIST #endif -/* m68k only supports ipc syscall. */ -#undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS +/* m68k only supports ipc syscall before 5.1. */ +#if __LINUX_KERNEL_VERSION < 0x050100 +# undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS +# undef __ASSUME_SYSVIPC_DEFAULT_IPC_64 +#endif +#define __ASSUME_SYSVIPC_BROKEN_MODE_T diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h index cfb0756e1a..dc468053f1 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2019 Free Software Foundation, Inc. +/* Copyright (C) 2010-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #ifndef _LINUX_M68K_M680X0_SYSDEP_H #define _LINUX_M68K_M680X0_SYSDEP_H 1 diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/sysdep.h index cd88bd6f7f..5cd35fffcf 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2019 Free Software Foundation, Inc. +/* Copyright (C) 1996-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Andreas Schwab, , December 1995. @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #include #include diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/microblaze/bits/stat.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/microblaze/bits/stat.h index 3af82656c6..c5817e5b77 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/microblaze/bits/stat.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/microblaze/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2019 Free Software Foundation, Inc. +/* Copyright (C) 1997-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include directly; use instead." diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/microblaze/kernel-features.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/microblaze/kernel-features.h index a787409295..def8408014 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/microblaze/kernel-features.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/microblaze/kernel-features.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2019 Free Software Foundation, Inc. +/* Copyright (C) 2011-2020 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 @@ -13,8 +13,9 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ +#include /* All supported kernel versions for MicroBlaze have these syscalls. */ #define __ASSUME_SOCKET_SYSCALL 1 @@ -67,3 +68,8 @@ #undef __ASSUME_CLONE_DEFAULT #define __ASSUME_CLONE_BACKWARDS3 + +#if __BYTE_ORDER == __BIG_ENDIAN +# define __ASSUME_SYSVIPC_BROKEN_MODE_T +#endif +#undef __ASSUME_SYSVIPC_DEFAULT_IPC_64 diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/microblaze/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/microblaze/sysdep.h index 1228d0c576..ed873d9dd4 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/microblaze/sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/microblaze/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2019 Free Software Foundation, Inc. +/* Copyright (C) 2000-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _LINUX_MICROBLAZE_SYSDEP_H #define _LINUX_MICROBLAZE_SYSDEP_H 1 diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/bits/stat.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/bits/stat.h index 14b10b37c0..b0e6726655 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/bits/stat.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2019 Free Software Foundation, Inc. +/* Copyright (C) 1992-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include directly; use instead." diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/kernel-features.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/kernel-features.h index c341c3fa10..a9862f92b7 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/kernel-features.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/kernel-features.h @@ -1,6 +1,6 @@ /* Set flags signalling availability of kernel features based on given kernel version number. - Copyright (C) 1999-2019 Free Software Foundation, Inc. + Copyright (C) 1999-2020 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 @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #include @@ -31,8 +31,12 @@ pairs to start with an even-number register. */ #if _MIPS_SIM == _ABIO32 # define __ASSUME_ALIGNED_REGISTER_PAIRS 1 -/* mips32 only supports ipc syscall. */ -# undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS +/* mips32 only supports ipc syscall before 5.1. */ +# if __LINUX_KERNEL_VERSION < 0x050100 +# undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS +# undef __ASSUME_SYSVIPC_DEFAULT_IPC_64 +# else +# endif /* The o32 MIPS fadvise64 syscall behaves as fadvise64_64. */ # define __ASSUME_FADVISE64_AS_64_64 1 @@ -40,6 +44,8 @@ /* mips32 support wire-up network syscalls. */ # define __ASSUME_RECV_SYSCALL 1 # define __ASSUME_SEND_SYSCALL 1 +#else +# undef __ASSUME_SYSVIPC_DEFAULT_IPC_64 #endif /* Define that mips64-n32 is a ILP32 ABI to set the correct interface to diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h index 5a2704e3e8..beefcf284b 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2019 Free Software Foundation, Inc. +/* Copyright (C) 2000-2020 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 @@ -13,15 +13,13 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #ifndef _LINUX_MIPS_MIPS32_SYSDEP_H #define _LINUX_MIPS_MIPS32_SYSDEP_H 1 -/* Always enable vsyscalls on mips32. */ -#define ALWAYS_USE_VSYSCALL 1 - /* There is some commonality. */ +#include #include #include @@ -348,24 +346,13 @@ libc_hidden_proto (__mips_syscall7, nomips16) _sc_ret.reg.v0; \ }) -#define __SYSCALL_CLOBBERS "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", \ - "$14", "$15", "$24", "$25", "hi", "lo", "memory" - -/* Standard MIPS syscalls have an error flag, and return a positive errno - when the error flag is set. Emulate this behaviour for vsyscalls so that - the INTERNAL_SYSCALL_{ERROR_P,ERRNO} macros work correctly. */ -#define INTERNAL_VSYSCALL_CALL(funcptr, err, nr, args...) \ - ({ \ - long _ret = funcptr (args); \ - err = ((unsigned long) (_ret) >= (unsigned long) -4095L); \ - if (err) \ - _ret = -_ret; \ - _ret; \ - }) - -/* List of system calls which are supported as vsyscalls. */ -#define HAVE_CLOCK_GETTIME_VSYSCALL 1 -#define HAVE_GETTIMEOFDAY_VSYSCALL 1 +#if __mips_isa_rev >= 6 +# define __SYSCALL_CLOBBERS "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", \ + "$14", "$15", "$24", "$25", "memory" +#else +# define __SYSCALL_CLOBBERS "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", \ + "$14", "$15", "$24", "$25", "hi", "lo", "memory" +#endif #endif /* __ASSEMBLER__ */ diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h index a4f3547030..f96636538a 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2019 Free Software Foundation, Inc. +/* Copyright (C) 2000-2020 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 @@ -13,15 +13,13 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #ifndef _LINUX_MIPS_SYSDEP_H #define _LINUX_MIPS_SYSDEP_H 1 -/* Always enable vsyscalls on n32. */ -#define ALWAYS_USE_VSYSCALL 1 - /* There is some commonality. */ +#include #include #include @@ -296,24 +294,13 @@ _sys_result; \ }) -#define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", \ - "$14", "$15", "$24", "$25", "hi", "lo", "memory" - -/* Standard MIPS syscalls have an error flag, and return a positive errno - when the error flag is set. Emulate this behaviour for vsyscalls so that - the INTERNAL_SYSCALL_{ERROR_P,ERRNO} macros work correctly. */ -#define INTERNAL_VSYSCALL_CALL(funcptr, err, nr, args...) \ - ({ \ - long _ret = funcptr (args); \ - err = ((unsigned long) (_ret) >= (unsigned long) -4095L); \ - if (err) \ - _ret = -_ret; \ - _ret; \ - }) - -/* List of system calls which are supported as vsyscalls. */ -#define HAVE_CLOCK_GETTIME_VSYSCALL 1 -#define HAVE_GETTIMEOFDAY_VSYSCALL 1 +#if __mips_isa_rev >= 6 +# define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", \ + "$14", "$15", "$24", "$25", "memory" +#else +# define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", \ + "$14", "$15", "$24", "$25", "hi", "lo", "memory" +#endif #endif /* __ASSEMBLER__ */ diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h index 5b4d27757d..9d30291f84 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2019 Free Software Foundation, Inc. +/* Copyright (C) 2000-2020 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 @@ -13,15 +13,13 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #ifndef _LINUX_MIPS_SYSDEP_H #define _LINUX_MIPS_SYSDEP_H 1 -/* Always enable vsyscalls on n64. */ -#define ALWAYS_USE_VSYSCALL 1 - /* There is some commonality. */ +#include #include #include @@ -292,24 +290,13 @@ _sys_result; \ }) -#define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", \ - "$14", "$15", "$24", "$25", "hi", "lo", "memory" - -/* Standard MIPS syscalls have an error flag, and return a positive errno - when the error flag is set. Emulate this behaviour for vsyscalls so that - the INTERNAL_SYSCALL_{ERROR_P,ERRNO} macros work correctly. */ -#define INTERNAL_VSYSCALL_CALL(funcptr, err, nr, args...) \ - ({ \ - long _ret = funcptr (args); \ - err = ((unsigned long) (_ret) >= (unsigned long) -4095L); \ - if (err) \ - _ret = -_ret; \ - _ret; \ - }) - -/* List of system calls which are supported as vsyscalls. */ -#define HAVE_CLOCK_GETTIME_VSYSCALL 1 -#define HAVE_GETTIMEOFDAY_VSYSCALL 1 +#if __mips_isa_rev >= 6 +# define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", \ + "$14", "$15", "$24", "$25", "memory" +#else +# define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", \ + "$14", "$15", "$24", "$25", "hi", "lo", "memory" +#endif #endif /* __ASSEMBLER__ */ diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/bits/stat.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/bits/stat.h index 06c49b7b3f..61781bd902 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/bits/stat.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2019 Free Software Foundation, Inc. +/* Copyright (C) 1992-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include directly; use instead." diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/kernel-features.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/kernel-features.h index 413a185db3..a18a2ee97f 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/kernel-features.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/kernel-features.h @@ -1,6 +1,6 @@ /* Set flags signalling availability of kernel features based on given kernel version number. PowerPC version. - Copyright (C) 1999-2019 Free Software Foundation, Inc. + Copyright (C) 1999-2020 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 @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* New syscalls added for PowerPC in 2.6.37. */ #define __ASSUME_SOCKET_SYSCALL 1 @@ -44,8 +44,11 @@ #include_next -/* powerpc only supports ipc syscall. */ -#undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS +/* powerpc only supports ipc syscall before 5.1. */ +#if __LINUX_KERNEL_VERSION < 0x050100 +# undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS +# undef __ASSUME_SYSVIPC_DEFAULT_IPC_64 +#endif #undef __ASSUME_CLONE_DEFAULT #define __ASSUME_CLONE_BACKWARDS 1 diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h index bdbab8e41b..725dfafde8 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2019 Free Software Foundation, Inc. +/* Copyright (C) 1992-2020 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 @@ -13,14 +13,12 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _LINUX_POWERPC_SYSDEP_H #define _LINUX_POWERPC_SYSDEP_H 1 -/* Always enable vsyscalls on powerpc32 */ -#define ALWAYS_USE_VSYSCALL 1 - +#include #include #include #include @@ -43,7 +41,7 @@ function call, with the exception of LR (which is needed for the "sc; bnslr+" sequence) and CR (where only CR0.SO is clobbered to signal an error return status). */ -# define INTERNAL_VSYSCALL_CALL_TYPE(funcptr, err, nr, type, args...) \ +# define INTERNAL_VSYSCALL_CALL_TYPE(funcptr, err, type, nr, args...) \ ({ \ register void *r0 __asm__ ("r0"); \ register long int r3 __asm__ ("r3"); \ @@ -71,7 +69,7 @@ }) #define INTERNAL_VSYSCALL_CALL(funcptr, err, nr, args...) \ - INTERNAL_VSYSCALL_CALL_TYPE(funcptr, err, nr, long int, args) + INTERNAL_VSYSCALL_CALL_TYPE(funcptr, err, long int, nr, args) # undef INLINE_SYSCALL # define INLINE_SYSCALL(name, nr, args...) \ @@ -133,26 +131,6 @@ # undef INTERNAL_SYSCALL_ERRNO # define INTERNAL_SYSCALL_ERRNO(val, err) (val) -# define INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK(name, err, type, nr, args...) \ - ({ \ - type sc_ret = ENOSYS; \ - \ - __typeof (__vdso_##name) vdsop = __vdso_##name; \ - PTR_DEMANGLE (vdsop); \ - if (vdsop != NULL) \ - sc_ret = \ - INTERNAL_VSYSCALL_CALL_TYPE (vdsop, err, nr, type, ##args); \ - else \ - err = 1 << 28; \ - sc_ret; \ - }) - -/* List of system calls which are supported as vsyscalls. */ -# define HAVE_CLOCK_GETRES_VSYSCALL 1 -# define HAVE_CLOCK_GETTIME_VSYSCALL 1 -# define HAVE_GETCPU_VSYSCALL 1 - - # define LOADARGS_0(name, dummy) \ r0 = name # define LOADARGS_1(name, __arg1) \ diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h index 294517e3f3..ee7f43653d 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2019 Free Software Foundation, Inc. +/* Copyright (C) 1992-2020 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 @@ -13,16 +13,14 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* Alan Modra rewrote the INLINE_SYSCALL macro */ #ifndef _LINUX_POWERPC_SYSDEP_H #define _LINUX_POWERPC_SYSDEP_H 1 -/* Always enable vsyscalls on powerpc64 */ -#define ALWAYS_USE_VSYSCALL 1 - +#include #include #include #include @@ -47,27 +45,6 @@ #endif /* __ASSEMBLER__ */ -/* This version is for internal uses when there is no desire - to set errno */ -#define INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK(name, err, type, nr, args...) \ - ({ \ - type sc_ret = ENOSYS; \ - \ - __typeof (__vdso_##name) vdsop = __vdso_##name; \ - PTR_DEMANGLE (vdsop); \ - if (vdsop != NULL) \ - sc_ret = \ - INTERNAL_VSYSCALL_CALL_TYPE (vdsop, err, type, nr, ##args); \ - else \ - err = 1 << 28; \ - sc_ret; \ - }) - -/* List of system calls which are supported as vsyscalls. */ -#define HAVE_CLOCK_GETRES_VSYSCALL 1 -#define HAVE_CLOCK_GETTIME_VSYSCALL 1 -#define HAVE_GETCPU_VSYSCALL 1 - /* Define a macro which expands inline into the wrapper code for a system call. This use is for internal calls that do not need to handle errors normally. It will never touch errno. This returns just what the kernel @@ -101,10 +78,9 @@ #define INTERNAL_VSYSCALL_CALL(funcptr, err, nr, args...) \ INTERNAL_VSYSCALL_CALL_TYPE(funcptr, err, long int, nr, args) -#undef INLINE_SYSCALL - /* This version is for kernels that implement system calls that behave like function calls as far as register saving. */ +#undef INLINE_SYSCALL #define INLINE_SYSCALL(name, nr, args...) \ ({ \ INTERNAL_SYSCALL_DECL (sc_err); \ diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/riscv/kernel-features.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/riscv/kernel-features.h index a958750bbc..65feee4890 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/riscv/kernel-features.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/riscv/kernel-features.h @@ -1,6 +1,6 @@ /* Set flags signalling availability of kernel features based on given kernel version number. RISC-V version. - Copyright (C) 2018-2019 Free Software Foundation, Inc. + Copyright (C) 2018-2020 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 @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include_next diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/riscv/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/riscv/sysdep.h index 5470ea3d2a..201bf9a91b 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/riscv/sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/riscv/sysdep.h @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - . */ + . */ #ifndef _LINUX_RISCV_SYSDEP_H #define _LINUX_RISCV_SYSDEP_H 1 @@ -121,11 +121,14 @@ #ifndef __ASSEMBLER__ +# define VDSO_NAME "LINUX_4.15" +# define VDSO_HASH 182943605 + /* List of system calls which are supported as vsyscalls. */ -# define HAVE_CLOCK_GETRES_VSYSCALL 1 -# define HAVE_CLOCK_GETTIME_VSYSCALL 1 -# define HAVE_GETTIMEOFDAY_VSYSCALL 1 -# define HAVE_GETCPU_VSYSCALL 1 +# define HAVE_CLOCK_GETRES64_VSYSCALL "__vdso_clock_getres" +# define HAVE_CLOCK_GETTIME64_VSYSCALL "__vdso_clock_gettime" +# define HAVE_GETTIMEOFDAY_VSYSCALL "__vdso_gettimeofday" +# define HAVE_GETCPU_VSYSCALL "__vdso_getcpu" /* Define a macro which expands into the inline wrapper code for a system call. */ diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/bits/stat.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/bits/stat.h index 7c3e7db171..b383a98692 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/bits/stat.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2019 Free Software Foundation, Inc. +/* Copyright (C) 2000-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include directly; use instead." diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/bits/typesizes.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/bits/typesizes.h index e42105700a..45f70184ea 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/bits/typesizes.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/bits/typesizes.h @@ -1,5 +1,5 @@ /* bits/typesizes.h -- underlying types for *_t. Linux/s390 version. - Copyright (C) 2003-2019 Free Software Foundation, Inc. + Copyright (C) 2003-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_TYPES_H # error "Never include directly; use instead." @@ -78,8 +78,13 @@ /* And for __rlim_t and __rlim64_t. */ # define __RLIM_T_MATCHES_RLIM64_T 1 + +/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */ +# define __STATFS_MATCHES_STATFS64 1 #else # define __RLIM_T_MATCHES_RLIM64_T 0 + +# define __STATFS_MATCHES_STATFS64 0 #endif /* Number of descriptors that can fit in an `fd_set'. */ diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/kernel-features.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/kernel-features.h index 8fdf38c454..831d0ab7d5 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/kernel-features.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/kernel-features.h @@ -1,6 +1,6 @@ /* Set flags signalling availability of kernel features based on given kernel version number. S/390 version. - Copyright (C) 1999-2019 Free Software Foundation, Inc. + Copyright (C) 1999-2020 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 @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* Direct socketcalls available with kernel 4.3. */ #if __LINUX_KERNEL_VERSION >= 0x040300 @@ -45,8 +45,14 @@ # undef __ASSUME_SENDTO_SYSCALL #endif -/* s390 only supports ipc syscall. */ -#undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS +/* s390 only supports ipc syscall before 5.1. */ +#if __LINUX_KERNEL_VERSION < 0x050100 +# undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS +# undef __ASSUME_SYSVIPC_DEFAULT_IPC_64 +#endif +#ifndef __s390x__ +# define __ASSUME_SYSVIPC_BROKEN_MODE_T +#endif #undef __ASSUME_CLONE_DEFAULT #define __ASSUME_CLONE_BACKWARDS2 diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h index 640fb52de1..f52b8b8735 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2019 Free Software Foundation, Inc. +/* Copyright (C) 2000-2020 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of the GNU C Library. @@ -14,13 +14,14 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _LINUX_S390_SYSDEP_H #define _LINUX_S390_SYSDEP_H #include #include +#include #include #include /* For RTLD_PRIVATE_ERRNO. */ #include @@ -271,12 +272,6 @@ #define ASMFMT_5 , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5), "d" (gpr6) #define ASMFMT_6 , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5), "d" (gpr6), "d" (gpr7) -/* List of system calls which are supported as vsyscalls. */ -#define HAVE_CLOCK_GETRES_VSYSCALL 1 -#define HAVE_CLOCK_GETTIME_VSYSCALL 1 -#define HAVE_GETTIMEOFDAY_VSYSCALL 1 -#define HAVE_GETCPU_VSYSCALL 1 - /* Pointer mangling support. */ #if IS_IN (rtld) /* We cannot use the thread descriptor because in ld.so we use setjmp diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h index 9a9834c750..9ff4479dc3 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h @@ -1,5 +1,5 @@ /* Assembler macros for 64 bit S/390. - Copyright (C) 2001-2019 Free Software Foundation, Inc. + Copyright (C) 2001-2020 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of the GNU C Library. @@ -15,13 +15,14 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _LINUX_S390_SYSDEP_H #define _LINUX_S390_SYSDEP_H #include #include +#include #include #include /* For RTLD_PRIVATE_ERRNO. */ #include @@ -277,12 +278,6 @@ #define ASMFMT_5 , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5), "d" (gpr6) #define ASMFMT_6 , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5), "d" (gpr6), "d" (gpr7) -/* List of system calls which are supported as vsyscalls. */ -#define HAVE_CLOCK_GETRES_VSYSCALL 1 -#define HAVE_CLOCK_GETTIME_VSYSCALL 1 -#define HAVE_GETTIMEOFDAY_VSYSCALL 1 -#define HAVE_GETCPU_VSYSCALL 1 - #define SINGLE_THREAD_BY_GLOBAL 1 /* Pointer mangling support. */ diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/sys/elf.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/sys/elf.h index ecbfd6e30f..4955e37b75 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/sys/elf.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/s390/sys/elf.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2019 Free Software Foundation, Inc. +/* Copyright (C) 2000-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_ELF_H #define _SYS_ELF_H 1 diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/sh/kernel-features.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/sh/kernel-features.h index 0f287fbf85..5bac608a11 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/sh/kernel-features.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/sh/kernel-features.h @@ -1,6 +1,6 @@ /* Set flags signalling availability of kernel features based on given kernel version number. SH version. - Copyright (C) 1999-2019 Free Software Foundation, Inc. + Copyright (C) 1999-2020 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 @@ -15,11 +15,13 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef __KERNEL_FEATURES_SH__ # define __KERNEL_FEATURES_SH__ +#include + /* These syscalls were added for SH in 2.6.37. */ #define __ASSUME_SOCKET_SYSCALL 1 #define __ASSUME_BIND_SYSCALL 1 @@ -41,8 +43,14 @@ before the offset. */ #define __ASSUME_PRW_DUMMY_ARG 1 -/* sh only supports ipc syscall. */ -#undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS +/* sh only supports ipc syscall before 5.1. */ +#if __LINUX_KERNEL_VERSION < 0x050100 +# undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS +# undef __ASSUME_SYSVIPC_DEFAULT_IPC_64 +#endif +#if __BYTE_ORDER == __BIG_ENDIAN +# define __ASSUME_SYSVIPC_BROKEN_MODE_T +#endif /* Support for several syscalls was added in 4.8. */ #if __LINUX_KERNEL_VERSION < 0x040800 diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/sh/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/sh/sysdep.h index cbfef3a4d9..703b042f4f 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/sh/sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/sh/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2019 Free Software Foundation, Inc. +/* Copyright (C) 1992-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, , August 1995. Changed by Kaz Kojima, . @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _LINUX_SH_SYSDEP_H #define _LINUX_SH_SYSDEP_H 1 diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/single-thread.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/single-thread.h index 2c972f37b3..cc71def780 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/single-thread.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/single-thread.h @@ -1,5 +1,5 @@ /* Single thread optimization, Linux version. - Copyright (C) 2019 Free Software Foundation, Inc. + Copyright (C) 2019-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SINGLE_THREAD_H #define _SINGLE_THREAD_H diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/bits/stat.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/bits/stat.h index 3c5031a44d..7379f2232d 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/bits/stat.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2019 Free Software Foundation, Inc. +/* Copyright (C) 1992-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include directly; use instead." diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h index 115cc1995b..1f3bbc8002 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h @@ -1,5 +1,5 @@ /* bits/typesizes.h -- underlying types for *_t. Linux/SPARC version. - Copyright (C) 2002-2019 Free Software Foundation, Inc. + Copyright (C) 2002-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_TYPES_H # error "Never include directly; use instead." @@ -72,8 +72,13 @@ /* And for __rlim_t and __rlim64_t. */ # define __RLIM_T_MATCHES_RLIM64_T 1 + +/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */ +# define __STATFS_MATCHES_STATFS64 1 #else # define __RLIM_T_MATCHES_RLIM64_T 0 + +# define __STATFS_MATCHES_STATFS64 0 #endif /* Number of descriptors that can fit in an `fd_set'. */ diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/kernel-features.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/kernel-features.h index f441bd811d..ea642120e9 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/kernel-features.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/kernel-features.h @@ -1,6 +1,6 @@ /* Set flags signalling availability of kernel features based on given kernel version number. SPARC version. - Copyright (C) 1999-2019 Free Software Foundation, Inc. + Copyright (C) 1999-2020 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 @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include_next @@ -58,8 +58,13 @@ # undef __NR_pause #endif -/* sparc only supports ipc syscall. */ -#undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS +/* sparc only supports ipc syscall before 5.1. */ +#if __LINUX_KERNEL_VERSION < 0x050100 +# undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS +# if !defined __arch64__ +# undef __ASSUME_SYSVIPC_DEFAULT_IPC_64 +# endif +#endif /* Support for the renameat2 syscall was added in 3.16. */ #if __LINUX_KERNEL_VERSION < 0x031000 diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h index 6c07e43331..8461261674 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2019 Free Software Foundation, Inc. +/* Copyright (C) 1997-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Miguel de Icaza , January 1997. @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _LINUX_SPARC32_SYSDEP_H #define _LINUX_SPARC32_SYSDEP_H 1 diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h index fda761838b..b9a4c75cbd 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2019 Free Software Foundation, Inc. +/* Copyright (C) 1997-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1997. @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _LINUX_SPARC64_SYSDEP_H #define _LINUX_SPARC64_SYSDEP_H 1 @@ -29,16 +29,6 @@ #undef SYS_ify #define SYS_ify(syscall_name) __NR_##syscall_name -/* This is a kludge to make syscalls.list find these under the names - pread and pwrite, since some kernel headers define those names - and some define the *64 names for the same system calls. */ -#if !defined __NR_pread && defined __NR_pread64 -# define __NR_pread __NR_pread64 -#endif -#if !defined __NR_pwrite && defined __NR_pwrite64 -# define __NR_pwrite __NR_pwrite64 -#endif - #ifdef __ASSEMBLER__ #define LOADSYSCALL(x) mov __NR_##x, %g1 diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sysdep.h index 981b2a26b7..0c32780d9c 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2019 Free Software Foundation, Inc. +/* Copyright (C) 2000-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek , 2000. @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _LINUX_SPARC_SYSDEP_H #define _LINUX_SPARC_SYSDEP_H 1 @@ -41,9 +41,16 @@ _ret; \ }) +# define VDSO_NAME "LINUX_2.6" +# define VDSO_HASH 61765110 + /* List of system calls which are supported as vsyscalls. */ -# define HAVE_CLOCK_GETTIME_VSYSCALL 1 -# define HAVE_GETTIMEOFDAY_VSYSCALL 1 +# ifdef __arch64__ +# define HAVE_CLOCK_GETTIME64_VSYSCALL "__vdso_clock_gettime" +# else +# define HAVE_CLOCK_GETTIME_VSYSCALL "__vdso_clock_gettime" +# endif +# define HAVE_GETTIMEOFDAY_VSYSCALL "__vdso_gettimeofday" #undef INLINE_SYSCALL #define INLINE_SYSCALL(name, nr, args...) \ diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/sys/syscall.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/sys/syscall.h index c0fc63b736..aa89a74e6b 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/sys/syscall.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/sys/syscall.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2019 Free Software Foundation, Inc. +/* Copyright (C) 1995-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYSCALL_H #define _SYSCALL_H 1 @@ -23,12 +23,9 @@ from the kernel sources. */ #include -#ifndef _LIBC -/* The Linux kernel header file defines macros `__NR_', but some - programs expect the traditional form `SYS_'. So in building libc - we scan the kernel's list and produce with macros for - all the `SYS_' names. */ -# include -#endif +/* The Linux kernel header file defines macros __NR_*, but some + programs expect the traditional form SYS_*. + defines SYS_* macros for __NR_* macros of known names. */ +#include #endif diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/sys/timex.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/sys/timex.h index c71ace1d3d..6979b86b72 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/sys/timex.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/sys/timex.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2019 Free Software Foundation, Inc. +/* Copyright (C) 1995-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_TIMEX_H #define _SYS_TIMEX_H 1 diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/sysdep.h index f94cfa2fa9..c7f3e54d37 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2019 Free Software Foundation, Inc. +/* Copyright (C) 2015-2020 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 @@ -13,18 +13,11 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include #include -/* By default only shared builds use vdso. */ -#ifndef ALWAYS_USE_VSYSCALL -#define ALWAYS_USE_VSYSCALL 0 -#endif - -#define USE_VSYSCALL (defined (SHARED) || ALWAYS_USE_VSYSCALL) - /* Set error number and return -1. A target may choose to return the internal function, __syscall_error, which sets errno and returns -1. We use -1l, instead of -1, so that it can be casted to (void *). */ diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/x86/bits/stat.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/x86/bits/stat.h index d074b15237..25dec69dda 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/x86/bits/stat.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/x86/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999-2019 Free Software Foundation, Inc. +/* Copyright (C) 1999-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include directly; use instead." diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/x86/bits/typesizes.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/x86/bits/typesizes.h index 18d2c63b0a..d084145597 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/x86/bits/typesizes.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/x86/bits/typesizes.h @@ -1,5 +1,5 @@ /* bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version. - Copyright (C) 2012-2019 Free Software Foundation, Inc. + Copyright (C) 2012-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_TYPES_H # error "Never include directly; use instead." @@ -84,8 +84,13 @@ /* And for __rlim_t and __rlim64_t. */ # define __RLIM_T_MATCHES_RLIM64_T 1 + +/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */ +# define __STATFS_MATCHES_STATFS64 1 #else # define __RLIM_T_MATCHES_RLIM64_T 0 + +# define __STATFS_MATCHES_STATFS64 0 #endif /* Number of descriptors that can fit in an `fd_set'. */ diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/x86/sys/elf.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/x86/sys/elf.h index 0e876daa3b..799e0c2792 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/x86/sys/elf.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/x86/sys/elf.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2019 Free Software Foundation, Inc. +/* Copyright (C) 1998-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_ELF_H #define _SYS_ELF_H 1 diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/x86_64/kernel-features.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/x86_64/kernel-features.h index 26280f57ec..80ff5684a7 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/x86_64/kernel-features.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/x86_64/kernel-features.h @@ -1,6 +1,6 @@ /* Set flags signalling availability of kernel features based on given kernel version number. x86-64 version. - Copyright (C) 1999-2019 Free Software Foundation, Inc. + Copyright (C) 1999-2020 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 @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* Define that x32 is a ILP32 ABI to set the correct interface to pass 64-bits values through syscalls. */ diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/x86_64/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/x86_64/sysdep.h index b88c46b589..c2eb37e575 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/x86_64/sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/x86_64/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2019 Free Software Foundation, Inc. +/* Copyright (C) 2001-2020 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 @@ -13,14 +13,11 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _LINUX_X86_64_SYSDEP_H #define _LINUX_X86_64_SYSDEP_H 1 -/* Always enable vsyscalls on x86_64 */ -#define ALWAYS_USE_VSYSCALL 1 - /* There is some commonality. */ #include #include @@ -36,16 +33,6 @@ #undef SYS_ify #define SYS_ify(syscall_name) __NR_##syscall_name -/* This is a kludge to make syscalls.list find these under the names - pread and pwrite, since some kernel headers define those names - and some define the *64 names for the same system calls. */ -#if !defined __NR_pread && defined __NR_pread64 -# define __NR_pread __NR_pread64 -#endif -#if !defined __NR_pwrite && defined __NR_pwrite64 -# define __NR_pwrite __NR_pwrite64 -#endif - /* This is to help the old kernel headers where __NR_semtimedop is not available. */ #ifndef __NR_semtimedop @@ -373,10 +360,15 @@ # undef INTERNAL_SYSCALL_ERRNO # define INTERNAL_SYSCALL_ERRNO(val, err) (-(val)) +# define VDSO_NAME "LINUX_2.6" +# define VDSO_HASH 61765110 + /* List of system calls which are supported as vsyscalls. */ -# define HAVE_CLOCK_GETTIME_VSYSCALL 1 -# define HAVE_GETTIMEOFDAY_VSYSCALL 1 -# define HAVE_GETCPU_VSYSCALL 1 +# define HAVE_CLOCK_GETTIME64_VSYSCALL "__vdso_clock_gettime" +# define HAVE_GETTIMEOFDAY_VSYSCALL "__vdso_gettimeofday" +# define HAVE_TIME_VSYSCALL "__vdso_time" +# define HAVE_GETCPU_VSYSCALL "__vdso_getcpu" +# define HAVE_CLOCK_GETRES64_VSYSCALL "__vdso_clock_getres" # define SINGLE_THREAD_BY_GLOBAL 1 diff --git a/lib/libc/glibc/sysdeps/unix/sysv/linux/x86_64/x32/sysdep.h b/lib/libc/glibc/sysdeps/unix/sysv/linux/x86_64/x32/sysdep.h index 1401f2ddec..5bf9eed80b 100644 --- a/lib/libc/glibc/sysdeps/unix/sysv/linux/x86_64/x32/sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/sysv/linux/x86_64/x32/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2012-2019 Free Software Foundation, Inc. +/* Copyright (C) 2012-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _LINUX_X32_SYSDEP_H #define _LINUX_X32_SYSDEP_H 1 diff --git a/lib/libc/glibc/sysdeps/unix/x86_64/sysdep.h b/lib/libc/glibc/sysdeps/unix/x86_64/sysdep.h index e901cb31b7..c549dce4db 100644 --- a/lib/libc/glibc/sysdeps/unix/x86_64/sysdep.h +++ b/lib/libc/glibc/sysdeps/unix/x86_64/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2019 Free Software Foundation, Inc. +/* Copyright (C) 1991-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include #include diff --git a/lib/libc/glibc/sysdeps/wordsize-32/divdi3-symbol-hacks.h b/lib/libc/glibc/sysdeps/wordsize-32/divdi3-symbol-hacks.h index bf00d03893..4d8187b570 100644 --- a/lib/libc/glibc/sysdeps/wordsize-32/divdi3-symbol-hacks.h +++ b/lib/libc/glibc/sysdeps/wordsize-32/divdi3-symbol-hacks.h @@ -1,5 +1,5 @@ /* Hacks needed for divdi3 symbol manipulation. - Copyright (C) 2004-2019 Free Software Foundation, Inc. + Copyright (C) 2004-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* A very dirty trick: gcc emits references to __divdi3, __udivdi3, __moddi3, and __umoddi3. These functions are exported and diff --git a/lib/libc/glibc/sysdeps/x86/bits/endian.h b/lib/libc/glibc/sysdeps/x86/bits/endian.h deleted file mode 100644 index 5a56c726f7..0000000000 --- a/lib/libc/glibc/sysdeps/x86/bits/endian.h +++ /dev/null @@ -1,7 +0,0 @@ -/* i386/x86_64 are little-endian. */ - -#ifndef _ENDIAN_H -# error "Never use directly; include instead." -#endif - -#define __BYTE_ORDER __LITTLE_ENDIAN diff --git a/lib/libc/glibc/sysdeps/x86/bits/endianness.h b/lib/libc/glibc/sysdeps/x86/bits/endianness.h new file mode 100644 index 0000000000..962a9ae4d6 --- /dev/null +++ b/lib/libc/glibc/sysdeps/x86/bits/endianness.h @@ -0,0 +1,11 @@ +#ifndef _BITS_ENDIANNESS_H +#define _BITS_ENDIANNESS_H 1 + +#ifndef _BITS_ENDIAN_H +# error "Never use directly; include instead." +#endif + +/* i386/x86_64 are little-endian. */ +#define __BYTE_ORDER __LITTLE_ENDIAN + +#endif /* bits/endianness.h */ diff --git a/lib/libc/glibc/sysdeps/x86/bits/select.h b/lib/libc/glibc/sysdeps/x86/bits/select.h index 1da802af06..b2e3ac800a 100644 --- a/lib/libc/glibc/sysdeps/x86/bits/select.h +++ b/lib/libc/glibc/sysdeps/x86/bits/select.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2019 Free Software Foundation, Inc. +/* Copyright (C) 1997-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_SELECT_H # error "Never use directly; include instead." diff --git a/lib/libc/glibc/sysdeps/x86/nptl/bits/pthreadtypes-arch.h b/lib/libc/glibc/sysdeps/x86/nptl/bits/pthreadtypes-arch.h index 4eac75bcc1..399d4868a9 100644 --- a/lib/libc/glibc/sysdeps/x86/nptl/bits/pthreadtypes-arch.h +++ b/lib/libc/glibc/sysdeps/x86/nptl/bits/pthreadtypes-arch.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2019 Free Software Foundation, Inc. +/* Copyright (C) 2002-2020 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_PTHREADTYPES_ARCH_H #define _BITS_PTHREADTYPES_ARCH_H 1 @@ -24,20 +24,17 @@ # if __WORDSIZE == 64 # define __SIZEOF_PTHREAD_MUTEX_T 40 # define __SIZEOF_PTHREAD_ATTR_T 56 -# define __SIZEOF_PTHREAD_MUTEX_T 40 # define __SIZEOF_PTHREAD_RWLOCK_T 56 # define __SIZEOF_PTHREAD_BARRIER_T 32 # else # define __SIZEOF_PTHREAD_MUTEX_T 32 # define __SIZEOF_PTHREAD_ATTR_T 32 -# define __SIZEOF_PTHREAD_MUTEX_T 32 # define __SIZEOF_PTHREAD_RWLOCK_T 44 # define __SIZEOF_PTHREAD_BARRIER_T 20 # endif #else # define __SIZEOF_PTHREAD_MUTEX_T 24 # define __SIZEOF_PTHREAD_ATTR_T 36 -# define __SIZEOF_PTHREAD_MUTEX_T 24 # define __SIZEOF_PTHREAD_RWLOCK_T 32 # define __SIZEOF_PTHREAD_BARRIER_T 20 #endif @@ -47,57 +44,9 @@ #define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 #define __SIZEOF_PTHREAD_BARRIERATTR_T 4 -/* Definitions for internal mutex struct. */ -#define __PTHREAD_COMPAT_PADDING_MID -#define __PTHREAD_COMPAT_PADDING_END -#define __PTHREAD_MUTEX_LOCK_ELISION 1 -#ifdef __x86_64__ -# define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 0 -# define __PTHREAD_MUTEX_USE_UNION 0 -#else -# define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 1 -# define __PTHREAD_MUTEX_USE_UNION 1 -#endif - #define __LOCK_ALIGNMENT #define __ONCE_ALIGNMENT -struct __pthread_rwlock_arch_t -{ - unsigned int __readers; - unsigned int __writers; - unsigned int __wrphase_futex; - unsigned int __writers_futex; - unsigned int __pad3; - unsigned int __pad4; -#ifdef __x86_64__ - int __cur_writer; - int __shared; - signed char __rwelision; -# ifdef __ILP32__ - unsigned char __pad1[3]; -# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0 } -# else - unsigned char __pad1[7]; -# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0, 0, 0, 0, 0 } -# endif - unsigned long int __pad2; - /* FLAGS must stay at this position in the structure to maintain - binary compatibility. */ - unsigned int __flags; -# define __PTHREAD_RWLOCK_INT_FLAGS_SHARED 1 -#else - /* FLAGS must stay at this position in the structure to maintain - binary compatibility. */ - unsigned char __flags; - unsigned char __shared; - signed char __rwelision; -# define __PTHREAD_RWLOCK_ELISION_EXTRA 0 - unsigned char __pad2; - int __cur_writer; -#endif -}; - #ifndef __x86_64__ /* Extra attributes for the cleanup functions. */ # define __cleanup_fct_attribute __attribute__ ((__regparm__ (1))) diff --git a/lib/libc/glibc/sysdeps/x86/sysdep.h b/lib/libc/glibc/sysdeps/x86/sysdep.h index d6c1c960d3..f5039bc1b2 100644 --- a/lib/libc/glibc/sysdeps/x86/sysdep.h +++ b/lib/libc/glibc/sysdeps/x86/sysdep.h @@ -1,5 +1,5 @@ /* Assembler macros for x86. - Copyright (C) 2017-2019 Free Software Foundation, Inc. + Copyright (C) 2017-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _X86_SYSDEP_H #define _X86_SYSDEP_H 1 diff --git a/lib/libc/glibc/sysdeps/x86_64/crti.S b/lib/libc/glibc/sysdeps/x86_64/crti.S index 45f2d9fc30..c2f1cc3c95 100644 --- a/lib/libc/glibc/sysdeps/x86_64/crti.S +++ b/lib/libc/glibc/sysdeps/x86_64/crti.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for x86-64. - Copyright (C) 2012-2019 Free Software Foundation, Inc. + Copyright (C) 2012-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* crti.S puts a function prologue at the beginning of the .init and .fini sections and defines global symbols for those addresses, so diff --git a/lib/libc/glibc/sysdeps/x86_64/crtn.S b/lib/libc/glibc/sysdeps/x86_64/crtn.S index 544efb431c..5fa457d511 100644 --- a/lib/libc/glibc/sysdeps/x86_64/crtn.S +++ b/lib/libc/glibc/sysdeps/x86_64/crtn.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for x86-64. - Copyright (C) 2012-2019 Free Software Foundation, Inc. + Copyright (C) 2012-2020 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 @@ -31,7 +31,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* crtn.S puts function epilogues in the .init and .fini sections corresponding to the prologues in crti.S. */ diff --git a/lib/libc/glibc/sysdeps/x86_64/start.S b/lib/libc/glibc/sysdeps/x86_64/start.S index 24d59159a9..7477b632f7 100644 --- a/lib/libc/glibc/sysdeps/x86_64/start.S +++ b/lib/libc/glibc/sysdeps/x86_64/start.S @@ -1,5 +1,5 @@ /* Startup code compliant to the ELF x86-64 ABI. - Copyright (C) 2001-2019 Free Software Foundation, Inc. + Copyright (C) 2001-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 2001. @@ -32,7 +32,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* This is the canonical entry point, usually the first thing in the text segment. The SVR4/i386 ABI (pages 3-31, 3-32) says that when the entry diff --git a/lib/libc/glibc/sysdeps/x86_64/sysdep.h b/lib/libc/glibc/sysdeps/x86_64/sysdep.h index 7b64be935b..0b73674f68 100644 --- a/lib/libc/glibc/sysdeps/x86_64/sysdep.h +++ b/lib/libc/glibc/sysdeps/x86_64/sysdep.h @@ -1,5 +1,5 @@ /* Assembler macros for x86-64. - Copyright (C) 2001-2019 Free Software Foundation, Inc. + Copyright (C) 2001-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _X86_64_SYSDEP_H #define _X86_64_SYSDEP_H 1 diff --git a/lib/libc/glibc/sysdeps/x86_64/x32/sysdep.h b/lib/libc/glibc/sysdeps/x86_64/x32/sysdep.h index 34fa04afa3..6498b22b07 100644 --- a/lib/libc/glibc/sysdeps/x86_64/x32/sysdep.h +++ b/lib/libc/glibc/sysdeps/x86_64/x32/sysdep.h @@ -1,5 +1,5 @@ /* Assembler macros for x32. - Copyright (C) 2012-2019 Free Software Foundation, Inc. + Copyright (C) 2012-2020 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include diff --git a/lib/libc/glibc/time/bits/types/struct_timespec.h b/lib/libc/glibc/time/bits/types/struct_timespec.h index 5b77c52b4f..d11c69cfd3 100644 --- a/lib/libc/glibc/time/bits/types/struct_timespec.h +++ b/lib/libc/glibc/time/bits/types/struct_timespec.h @@ -3,13 +3,26 @@ #define _STRUCT_TIMESPEC 1 #include +#include /* POSIX.1b structure for a time value. This is like a `struct timeval' but has nanoseconds instead of microseconds. */ struct timespec { __time_t tv_sec; /* Seconds. */ +#if __WORDSIZE == 64 \ + || (defined __SYSCALL_WORDSIZE && __SYSCALL_WORDSIZE == 64) \ + || __TIMESIZE == 32 __syscall_slong_t tv_nsec; /* Nanoseconds. */ +#else +# if __BYTE_ORDER == __BIG_ENDIAN + int: 32; /* Padding. */ + long int tv_nsec; /* Nanoseconds. */ +# else + long int tv_nsec; /* Nanoseconds. */ + int: 32; /* Padding. */ +# endif +#endif }; #endif