diff options
1407 files changed, 7709 insertions, 6549 deletions
diff --git a/ci/srht/update_download_page b/ci/srht/update_download_page index 1a721bec80..cd289713db 100755 --- a/ci/srht/update_download_page +++ b/ci/srht/update_download_page @@ -21,7 +21,10 @@ curl --fail -I "$AARCH64_LINUX_JSON_URL" >/dev/null || exit 0 curl --fail -I "$X86_64_LINUX_JSON_URL" >/dev/null || exit 0 curl --fail -I "$X86_64_WINDOWS_JSON_URL" >/dev/null || exit 0 curl --fail -I "$X86_64_MACOS_JSON_URL" >/dev/null || exit 0 -curl --fail -I "$X86_64_FREEBSD_JSON_URL" >/dev/null || exit 0 + +# FreeBSD is dealing with some weird upstream bug right now +# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244549 +#curl --fail -I "$X86_64_FREEBSD_JSON_URL" >/dev/null || exit 0 # Without --user, this gave me: # ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied @@ -63,10 +66,12 @@ export AARCH64_LINUX_TARBALL="$(echo "$AARCH64_LINUX_JSON" | jq .tarball -r)" export AARCH64_LINUX_BYTESIZE="$(echo "$AARCH64_LINUX_JSON" | jq .size -r)" export AARCH64_LINUX_SHASUM="$(echo "$AARCH64_LINUX_JSON" | jq .shasum -r)" -X86_64_FREEBSD_JSON=$(curl --fail "$X86_64_FREEBSD_JSON_URL" || exit 1) -export X86_64_FREEBSD_TARBALL="$(echo "$X86_64_FREEBSD_JSON" | jq .tarball -r)" -export X86_64_FREEBSD_BYTESIZE="$(echo "$X86_64_FREEBSD_JSON" | jq .size -r)" -export X86_64_FREEBSD_SHASUM="$(echo "$X86_64_FREEBSD_JSON" | jq .shasum -r)" +# FreeBSD is dealing with some weird upstream bug right now +# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244549 +#X86_64_FREEBSD_JSON=$(curl --fail "$X86_64_FREEBSD_JSON_URL" || exit 1) +#export X86_64_FREEBSD_TARBALL="$(echo "$X86_64_FREEBSD_JSON" | jq .tarball -r)" +#export X86_64_FREEBSD_BYTESIZE="$(echo "$X86_64_FREEBSD_JSON" | jq .size -r)" +#export X86_64_FREEBSD_SHASUM="$(echo "$X86_64_FREEBSD_JSON" | jq .shasum -r)" git clone https://github.com/ziglang/www.ziglang.org --depth 1 cd www.ziglang.org diff --git a/doc/docgen.zig b/doc/docgen.zig index 5d7f2b7b38..319d9e0035 100644 --- a/doc/docgen.zig +++ b/doc/docgen.zig @@ -50,7 +50,7 @@ pub fn main() !void { var tokenizer = Tokenizer.init(in_file_name, input_file_bytes); var toc = try genToc(allocator, &tokenizer); - try fs.makePath(allocator, tmp_dir_name); + try fs.cwd().makePath(tmp_dir_name); defer fs.deleteTree(tmp_dir_name) catch {}; try genHtml(allocator, &tokenizer, &toc, &buffered_out_stream.stream, zig_exe); diff --git a/doc/langref.html.in b/doc/langref.html.in index 31def074d7..455d07b52f 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -6019,13 +6019,16 @@ pub fn printf(self: *OutStream, arg0: i32, arg1: []const u8) !void { </p> {#code_begin|syntax#} pub fn printValue(self: *OutStream, value: var) !void { - const T = @TypeOf(value); - if (@isInteger(T)) { - return self.printInt(T, value); - } else if (@isFloat(T)) { - return self.printFloat(T, value); - } else { - @compileError("Unable to print type '" ++ @typeName(T) ++ "'"); + switch (@typeInfo(@TypeOf(value))) { + .Int => { + return self.printInt(T, value); + }, + .Float => { + return self.printFloat(T, value); + }, + else => { + @compileError("Unable to print type '" ++ @typeName(T) ++ "'"); + }, } } {#code_end#} 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 <http://www.gnu.org/licenses/> to obtain a copy. +see <https://www.gnu.org/licenses/> 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 <moshier@na-net.ornl.gov> You should have received a copy of the GNU Lesser General Public License along with this library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ diff --git a/lib/libc/glibc/abi.txt b/lib/libc/glibc/abi.txt index c2a19e8c91..089b9c077e 100644 --- a/lib/libc/glibc/abi.txt +++ b/lib/libc/glibc/abi.txt @@ -2735,6 +2735,7 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 29 +41 29 40 29 @@ -3420,22 +3421,22 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 29 -35 -35 -37 -37 -37 -37 -37 -35 -35 -35 -37 -37 -37 -37 -37 -35 +35 41 +35 41 +37 41 +37 41 +37 41 +37 41 +37 41 +35 41 +35 41 +35 41 +37 41 +37 41 +37 41 +37 41 +37 41 +35 41 29 29 29 @@ -4240,7 +4241,7 @@ s390x-linux-gnu 5 5 5 - +11 27 27 @@ -6461,6 +6462,7 @@ s390x-linux-gnu 5 5 5 +41 5 13 40 5 13 @@ -7146,22 +7148,22 @@ s390x-linux-gnu 5 5 12 -35 -35 -37 -37 -37 -37 -37 -35 -35 -35 -37 -37 -37 -37 -37 -35 +35 41 +35 41 +37 41 +37 41 +37 41 +37 41 +37 41 +35 41 +35 41 +35 41 +37 41 +37 41 +37 41 +37 41 +37 41 +35 41 5 12 5 @@ -10187,6 +10189,7 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf 16 16 16 +41 16 40 16 @@ -10872,22 +10875,22 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf 16 16 16 -35 -35 +35 41 +35 41 -37 -37 -37 +37 41 +37 41 +37 41 -35 -35 -35 +35 41 +35 41 +35 41 -37 -37 -37 +37 41 +37 41 +37 41 -35 +35 41 16 16 16 @@ -11692,7 +11695,7 @@ sparc-linux-gnu sparcel-linux-gnu 1 0 0 -3 +3 11 27 27 @@ -13913,6 +13916,7 @@ sparc-linux-gnu sparcel-linux-gnu 5 5 0 +41 0 13 40 0 13 @@ -14598,22 +14602,22 @@ sparc-linux-gnu sparcel-linux-gnu 0 0 12 -35 -35 -37 -37 -37 -37 -37 -35 -35 -35 -37 -37 -37 -37 -37 -35 +35 41 +35 41 +37 41 +37 41 +37 41 +37 41 +37 41 +35 41 +35 41 +35 41 +37 41 +37 41 +37 41 +37 41 +37 41 +35 41 0 12 0 @@ -15418,7 +15422,7 @@ sparcv9-linux-gnu 5 5 5 - +11 27 27 @@ -17639,6 +17643,7 @@ sparcv9-linux-gnu 5 5 5 +41 5 13 40 5 13 @@ -18324,22 +18329,22 @@ sparcv9-linux-gnu 5 5 12 -35 -35 -37 -37 -37 -37 -37 -35 -35 -35 -37 -37 -37 -37 -37 -35 +35 41 +35 41 +37 41 +37 41 +37 41 +37 41 +37 41 +35 41 +35 41 +35 41 +37 41 +37 41 +37 41 +37 41 +37 41 +35 41 5 12 5 @@ -19144,7 +19149,7 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64 5 0 0 - +11 27 27 @@ -21365,6 +21370,7 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64 5 5 0 +41 0 13 40 0 13 @@ -22050,22 +22056,22 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64 0 0 12 -35 -35 -37 -37 -37 -37 -37 -35 -35 -35 -37 -37 -37 -37 -37 -35 +35 41 +35 41 +37 41 +37 41 +37 41 +37 41 +37 41 +35 41 +35 41 +35 41 +37 41 +37 41 +37 41 +37 41 +37 41 +35 41 0 12 0 @@ -22870,7 +22876,7 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32 5 0 0 - +11 27 27 @@ -25091,6 +25097,7 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32 5 5 0 +41 0 13 40 0 13 @@ -25776,22 +25783,22 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32 0 0 12 -35 -35 -37 -37 -37 -37 -37 -35 -35 -35 -37 -37 -37 -37 -37 -35 +35 41 +35 41 +37 41 +37 41 +37 41 +37 41 +37 41 +35 41 +35 41 +35 41 +37 41 +37 41 +37 41 +37 41 +37 41 +35 41 0 12 0 @@ -26596,7 +26603,7 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf 5 0 0 - +11 27 27 @@ -28817,6 +28824,7 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf 5 5 0 +41 0 13 40 0 13 @@ -29502,22 +29510,22 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf 0 0 12 -35 -35 +35 41 +35 41 -37 -37 -37 +37 41 +37 41 +37 41 -35 -35 -35 +35 41 +35 41 +35 41 -37 -37 -37 +37 41 +37 41 +37 41 -35 +35 41 0 12 0 @@ -30322,7 +30330,7 @@ mipsel-linux-gnueabi mips-linux-gnueabi 5 0 0 - +11 27 27 @@ -32543,6 +32551,7 @@ mipsel-linux-gnueabi mips-linux-gnueabi 5 5 0 +41 0 13 40 0 13 @@ -33228,22 +33237,22 @@ mipsel-linux-gnueabi mips-linux-gnueabi 0 0 12 -35 -35 +35 41 +35 41 -37 -37 -37 +37 41 +37 41 +37 41 -35 -35 -35 +35 41 +35 41 +35 41 -37 -37 -37 +37 41 +37 41 +37 41 -35 +35 41 0 12 0 @@ -34048,7 +34057,7 @@ x86_64-linux-gnu 10 10 10 - +11 27 36 27 @@ -36269,6 +36278,7 @@ x86_64-linux-gnu 10 10 10 +41 10 13 40 10 13 @@ -36954,22 +36964,22 @@ x86_64-linux-gnu 10 10 12 -35 -35 -36 -37 -37 -37 -37 -35 -35 -35 -36 -37 -37 -37 -37 -35 +35 41 +35 41 +36 41 +37 41 +37 41 +37 41 +37 41 +35 41 +35 41 +35 41 +36 41 +37 41 +37 41 +37 41 +37 41 +35 41 10 12 10 @@ -38600,11 +38610,11 @@ x86_64-linux-gnux32 28 28 28 -29 28 -29 28 -29 28 -29 28 -29 28 +28 29 +28 29 +28 29 +28 29 +28 29 28 28 28 @@ -39995,6 +40005,7 @@ x86_64-linux-gnux32 28 28 28 +41 28 40 28 @@ -40680,22 +40691,22 @@ x86_64-linux-gnux32 28 28 28 -35 -35 -36 -37 -37 -37 -37 -35 -35 -35 -36 -37 -37 -37 -37 -35 +35 41 +35 41 +36 41 +37 41 +37 41 +37 41 +37 41 +35 41 +35 41 +35 41 +36 41 +37 41 +37 41 +37 41 +37 41 +35 41 28 28 28 @@ -41500,7 +41511,7 @@ i386-linux-gnu 1 0 0 -3 +3 11 27 36 27 @@ -43721,6 +43732,7 @@ i386-linux-gnu 5 5 0 +41 0 13 40 0 13 @@ -44406,22 +44418,22 @@ i386-linux-gnu 0 0 12 -35 -35 -36 -37 -37 -37 -37 -35 -35 -35 -36 -37 -37 -37 -37 -35 +35 41 +35 41 +36 41 +37 41 +37 41 +37 41 +37 41 +35 41 +35 41 +35 41 +36 41 +37 41 +37 41 +37 41 +37 41 +35 41 0 12 0 @@ -47447,6 +47459,7 @@ powerpc64le-linux-gnu 29 29 29 +41 29 40 29 @@ -48132,22 +48145,22 @@ powerpc64le-linux-gnu 29 29 29 -35 -35 -36 -37 -37 -37 -37 -35 -35 -35 -36 -37 -37 -37 -37 -35 +35 41 +35 41 +36 41 +37 41 +37 41 +37 41 +37 41 +35 41 +35 41 +35 41 +36 41 +37 41 +37 41 +37 41 +37 41 +35 41 29 29 29 @@ -51173,6 +51186,7 @@ powerpc64-linux-gnu 12 12 12 +41 12 13 40 12 13 @@ -51858,22 +51872,22 @@ powerpc64-linux-gnu 12 12 12 -35 -35 +35 41 +35 41 -37 -37 -37 +37 41 +37 41 +37 41 -35 -35 -35 +35 41 +35 41 +35 41 -37 -37 -37 +37 41 +37 41 +37 41 -35 +35 41 12 12 12 @@ -52678,7 +52692,7 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf 1 0 0 -3 +3 11 27 27 @@ -54899,6 +54913,7 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf 5 5 0 +41 0 13 40 0 13 @@ -55584,22 +55599,22 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf 0 0 12 -35 -35 +35 41 +35 41 -37 -37 -37 +37 41 +37 41 +37 41 -35 -35 -35 +35 41 +35 41 +35 41 -37 -37 -37 +37 41 +37 41 +37 41 -35 +35 41 0 12 0 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _BYTESWAP_H && !defined _NETINET_IN_H && !defined _ENDIAN_H # error "Never use <bits/byteswap.h> directly; include <byteswap.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* This header is included by <sys/cdefs.h>. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SELECT_H # error "Never use <bits/select.h> directly; include <sys/select.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include <bits/stat.h> directly; use <sys/stat.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ __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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_TYPES_H # error "Never include <bits/time64.h> directly; use <sys/types.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <bits/wordsize.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_TYPES_H # error "Never include <bits/typesizes.h> directly; use <sys/types.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _NETINET_IN_H && !defined _ENDIAN_H # error "Never use <bits/uintn-identity.h> directly; include <netinet/in.h> or <endian.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _SYS_WAIT_H && !defined _STDLIB_H # error "Never include <bits/waitflags.h> directly; use <sys/wait.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _SYS_WAIT_H && !defined _STDLIB_H # error "Never include <bits/waitstatus.h> directly; use <sys/wait.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <stddef.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sys/cdefs.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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/fns.txt b/lib/libc/glibc/fns.txt index 028892f3ea..32dc37ce17 100644 --- a/lib/libc/glibc/fns.txt +++ b/lib/libc/glibc/fns.txt @@ -2734,6 +2734,7 @@ pthread_barrierattr_getpshared pthread pthread_barrierattr_init pthread pthread_barrierattr_setpshared pthread pthread_cancel pthread +pthread_clockjoin_np pthread pthread_cond_broadcast c pthread_cond_clockwait pthread pthread_cond_destroy c 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 <string/bits/endian.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 <sys/sdt.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 <bits/floatn.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* This interface is based on <linux/stat.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sys/stat.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sys/stat.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sys/stat.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sys/stat.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sys/stat.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sys/stat.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sys/types.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sys/types.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sys/stat.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sys/stat.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * POSIX Standard: 5.6 File Characteristics <sys/stat.h> 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 <drepper@cygnus.com>, 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h> */ 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 <drepper@redhat.com>, 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * Never include this file directly; use <sys/types.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * POSIX Standard: 2.6 Primitive System Data Types <sys/types.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * ISO C99 Standard: 7.14 Signal handling <signal.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _STDLIB_H # error "Never use <bits/stdlib-float.h> directly; include <stdlib.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * ISO C99 Standard: 7.20 General utilities <stdlib.h> @@ -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 + <http://www.gnu.org/licenses/>. */ + +#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 <bits/endianness.h> + +/* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _ENDIAN_H #define _ENDIAN_H 1 #include <features.h> -/* 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 <bits/endian.h> -/* 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 <bits/byteswap.h> 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 - <http://www.gnu.org/licenses/>. */ - -#ifndef _ENDIAN_H -# error "Never use <bits/endian.h> directly; include <endian.h> 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 <bits/endianness.h> directly; include <endian.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include_next <dl-sysdep.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_PTHREADTYPES_ARCH_H #define _BITS_PTHREADTYPES_ARCH_H 1 -#include <endian.h> +#include <bits/endian.h> #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdep.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 <bits/endian.h> directly; include <endian.h> 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 <bits/endianness.h> directly; include <endian.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include_next <dl-sysdep.h> 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 <rth@tamu.edu> @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdep.h> 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 <bits/endian.h> directly; include <endian.h> 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 <bits/endianness.h> directly; include <endian.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include_next <dl-sysdep.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdeps/generic/sysdep.h> #include <features.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 <bits/endian.h> directly; include <endian.h> 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 <bits/endianness.h> directly; include <endian.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdep.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ .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, <drepper@cygnus.com>, 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdeps/generic/sysdep.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 <http://www.gnu.org/licenses/>. */ + not, see <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * POSIX Threads Extension: ??? <pthread.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdeps/wordsize-32/divdi3-symbol-hacks.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdeps/x86/sysdep.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdep.h> #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include_next <dl-sysdep.h> 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, <Jes.Sorensen@cern.ch>, 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <asm/unistd.h> #include <asm/fpu.h> /* 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 <davidm@hpl.hp.com> @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdeps/generic/sysdep.h> 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 <bits/endian.h> directly; include <endian.h> 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 <bits/endianness.h> directly; include <endian.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdeps/m68k/sysdep.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdeps/m68k/sysdep.h> 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 <maxim@codesourcery.com>, 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_PTHREADTYPES_ARCH_H #define _BITS_PTHREADTYPES_ARCH_H 1 -#include <endian.h> +#include <bits/endian.h> #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdeps/wordsize-32/divdi3-symbol-hacks.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdeps/generic/sysdep.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include <bits/stat.h> directly; use <sys/stat.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_TYPES_H # error "Never include <bits/typesizes.h> directly; use <sys/types.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ - -#ifndef _ENDIAN_H -# error "Never use <bits/endian.h> directly; include <endian.h> 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 <bits/endianness.h> directly; include <endian.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ .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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdeps/generic/sysdep.h> 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 <bits/endian.h> directly; include <endian.h> 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 <bits/endianness.h> directly; include <endian.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_PTHREADTYPES_ARCH_H #define _BITS_PTHREADTYPES_ARCH_H 1 -#include <endian.h> +#include <bits/endian.h> #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #define __ASSEMBLY__ 1 #include <entry.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 <bits/pthreadtypes-arch.h> + /* 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 - -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. - - Concurrency notes: - The __kind of a mutex is initialized either by the static - PTHREAD_MUTEX_INITIALIZER or by a call to pthread_mutex_init. - - 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. - - 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 -}; + +/* 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: + + 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. + + 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with + atomic operations. + + 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization. + It should initialize the mutex internal flag. */ + +#include <bits/struct_mutex.h> + +/* 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 <bits/struct_rwlock.h> /* 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 <http://www.gnu.org/licenses/>. */ + not, see <https://www.gnu.org/licenses/>. */ #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 <http://www.gnu.org/licenses/>. */ + not, see <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _PTHREAD_H #define _PTHREAD_H 1 #include <features.h> -#include <endian.h> #include <sched.h> #include <time.h> +#include <bits/endian.h> #include <bits/pthreadtypes.h> #include <bits/setjmp.h> #include <bits/wordsize.h> @@ -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 - <http://www.gnu.org/licenses/>. */ - -/* PowerPC can be little or big endian. Hopefully gcc will know... */ - -#ifndef _ENDIAN_H -# error "Never use <bits/endian.h> directly; include <endian.h> 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 <bits/endianness.h> directly; include <endian.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdep.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdeps/wordsize-32/divdi3-symbol-hacks.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdeps/powerpc/sysdep.h> @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdep.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdeps/powerpc/sysdep.h> @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * 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 <bits/endian.h> directly; include <endian.h> 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 <bits/endianness.h> directly; include <endian.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_PTHREADTYPES_ARCH_H #define _BITS_PTHREADTYPES_ARCH_H 1 -#include <endian.h> +#include <bits/endian.h> #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #define __ASSEMBLY__ 1 #include <entry.h> @@ -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 <bits/endian.h> directly; include <endian.h> 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 <bits/endianness.h> directly; include <endian.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include_next <dl-sysdep.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdep.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdeps/wordsize-32/divdi3-symbol-hacks.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdeps/generic/sysdep.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdep.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdeps/generic/sysdep.h> 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 <bits/endian.h> directly; include <endian.h> 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 <bits/endianness.h> directly; include <endian.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdeps/generic/sysdep.h> diff --git a/lib/libc/include/sparc-linux-gnu/bits/endian.h b/lib/libc/glibc/sysdeps/sparc/bits/endianness.h index 1e1dd7a2e0..0b6f5bf8b2 100644 --- a/lib/libc/include/sparc-linux-gnu/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 <bits/endian.h> directly; include <endian.h> instead." +#ifndef _BITS_ENDIAN_H +# error "Never use <bits/endianness.h> directly; include <endian.h> 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
\ No newline at end of file +#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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include_next <dl-sysdep.h> 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 <richard@gnu.ai.mit.edu>, 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdep.h> 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 <richard@gnu.ai.mit.edu>, 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdep.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #define _SYSDEPS_SYSDEP_H 1 #include <bits/hwcap.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdeps/unix/sysdep.h> #include <dl-sysdep.h> /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdeps/unix/sysdep.h> #include <sysdeps/arm/sysdep.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdeps/unix/sysdep.h> #include <sysdeps/i386/sysdep.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdeps/unix/mips/sysdep.h> 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 <aoliva@redhat.com>. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdeps/unix/mips/sysdep.h> 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 <aoliva@redhat.com>. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdeps/unix/mips/sysdep.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sgidefs.h> #include <sysdeps/unix/sysdep.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdeps/unix/sysdep.h> #include <bits/wordsize.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdeps/unix/sysdep.h> #include <sysdeps/sh/sysdep.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdeps/generic/sysdep.h> #include <single-thread.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include_next <kernel-features.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _LINUX_AARCH64_SYSDEP_H #define _LINUX_AARCH64_SYSDEP_H 1 -/* Always enable vsyscalls on aarch64 */ -#define ALWAYS_USE_VSYSCALL 1 - #include <sysdeps/unix/sysdep.h> #include <sysdeps/aarch64/sysdep.h> #include <sysdeps/unix/sysv/linux/generic/sysdep.h> @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include <bits/stat.h> directly; use <sys/stat.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_TYPES_H # error "Never include <bits/typesizes.h> directly; use <sys/types.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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, <drepper@gnu.ai.mit.edu>, 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ +#include <endian.h> #include_next <kernel-features.h> /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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, <drepper@gnu.ai.mit.edu>, August 1995. ARM changes by Philip Blundell, <pjb27@cam.ac.uk>, 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 <sysdeps/unix/sysv/linux/sysdep.h> #include <sysdeps/unix/arm/sysdep.h> @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include <bits/stat.h> directly; use <sys/stat.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include_next <dl-sysdep.h> 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 <cmetcalf@tilera.com>, 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead." @@ -23,7 +23,7 @@ #ifndef _BITS_STAT_H #define _BITS_STAT_H 1 -#include <endian.h> +#include <bits/endian.h> #include <bits/wordsize.h> /* 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 <cmetcalf@tilera.com>, 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_TYPES_H # error "Never include <bits/typesizes.h> directly; use <sys/types.h> 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 <cmetcalf@tilera.com>, 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <bits/wordsize.h> #include <kernel-features.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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, <drepper@cygnus.com>, August 1999. Linux/PA-RISC changes by Philipp Rumpf, <prumpf@tux.org>, 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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, <drepper@gnu.org>, 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 <sysdeps/unix/sysv/linux/sysdep.h> #include <sysdeps/unix/i386/sysdep.h> @@ -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 <bits/endian.h> directly; include <endian.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include <bits/stat.h> directly; use <sys/stat.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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, <Jes.Sorensen@cern.ch>, 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _LINUX_IA64_SYSDEP_H #define _LINUX_IA64_SYSDEP_H 1 @@ -25,6 +25,7 @@ #include <sysdeps/ia64/sysdep.h> #include <dl-sysdep.h> #include <tls.h> +#include <asm/break.h> /* 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 <misc/bits/syscall.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 <bits/wordsize.h> + #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include <bits/stat.h> directly; use <sys/stat.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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, <schwab@issan.informatik.uni-dortmund.de>, 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdeps/unix/sysv/linux/sysdep.h> #include <tls.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include <bits/stat.h> directly; use <sys/stat.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ +#include <endian.h> /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include <bits/stat.h> directly; use <sys/stat.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sgidefs.h> @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 <sysdeps/unix/sysv/linux/mips/sysdep.h> #include <sysdeps/unix/sysv/linux/sysdep.h> #include <sysdeps/unix/mips/mips32/sysdep.h> @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 <sysdeps/unix/sysv/linux/mips/sysdep.h> #include <sysdeps/unix/sysv/linux/sysdep.h> #include <sysdeps/unix/mips/mips64/n32/sysdep.h> @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 <sysdeps/unix/sysv/linux/mips/sysdep.h> #include <sysdeps/unix/sysv/linux/sysdep.h> #include <sysdeps/unix/mips/mips64/n64/sysdep.h> @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include <bits/stat.h> directly; use <sys/stat.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* New syscalls added for PowerPC in 2.6.37. */ #define __ASSUME_SOCKET_SYSCALL 1 @@ -44,8 +44,11 @@ #include_next <kernel-features.h> -/* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _LINUX_POWERPC_SYSDEP_H #define _LINUX_POWERPC_SYSDEP_H 1 -/* Always enable vsyscalls on powerpc32 */ -#define ALWAYS_USE_VSYSCALL 1 - +#include <sysdeps/unix/sysv/linux/powerpc/sysdep.h> #include <sysdeps/unix/sysv/linux/sysdep.h> #include <sysdeps/unix/powerpc/sysdep.h> #include <tls.h> @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* Alan Modra <amodra@bigpond.net.au> 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 <sysdeps/unix/sysv/linux/powerpc/sysdep.h> #include <sysdeps/unix/sysv/linux/sysdep.h> #include <sysdeps/unix/powerpc/sysdep.h> #include <tls.h> @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include_next <kernel-features.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include <bits/stat.h> directly; use <sys/stat.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_TYPES_H # error "Never include <bits/typesizes.h> directly; use <sys/types.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _LINUX_S390_SYSDEP_H #define _LINUX_S390_SYSDEP_H #include <sysdeps/s390/s390-32/sysdep.h> #include <sysdeps/unix/sysdep.h> +#include <sysdeps/unix/sysv/linux/s390/sysdep.h> #include <sysdeps/unix/sysv/linux/sysdep.h> #include <dl-sysdep.h> /* For RTLD_PRIVATE_ERRNO. */ #include <tls.h> @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _LINUX_S390_SYSDEP_H #define _LINUX_S390_SYSDEP_H #include <sysdeps/s390/s390-64/sysdep.h> #include <sysdeps/unix/sysdep.h> +#include <sysdeps/unix/sysv/linux/s390/sysdep.h> #include <sysdeps/unix/sysv/linux/sysdep.h> #include <dl-sysdep.h> /* For RTLD_PRIVATE_ERRNO. */ #include <tls.h> @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef __KERNEL_FEATURES_SH__ # define __KERNEL_FEATURES_SH__ +#include <endian.h> + /* 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, <drepper@gnu.ai.mit.edu>, August 1995. Changed by Kaz Kojima, <kkojima@rr.iij4u.or.jp>. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include <bits/stat.h> directly; use <sys/stat.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_TYPES_H # error "Never include <bits/typesizes.h> directly; use <sys/types.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include_next <kernel-features.h> @@ -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 <miguel@gnu.ai.mit.edu>, 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 <richard@gnu.ai.mit.edu>, 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 <jakub@redhat.com>, 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYSCALL_H #define _SYSCALL_H 1 @@ -23,12 +23,9 @@ from the kernel sources. */ #include <asm/unistd.h> -#ifndef _LIBC -/* The Linux kernel header file defines macros `__NR_<name>', but some - programs expect the traditional form `SYS_<name>'. So in building libc - we scan the kernel's list and produce <bits/syscall.h> with macros for - all the `SYS_' names. */ -# include <bits/syscall.h> -#endif +/* The Linux kernel header file defines macros __NR_*, but some + programs expect the traditional form SYS_*. <bits/syscall.h> + defines SYS_* macros for __NR_* macros of known names. */ +#include <bits/syscall.h> #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <bits/wordsize.h> #include <kernel-features.h> -/* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include <bits/stat.h> directly; use <sys/stat.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_TYPES_H # error "Never include <bits/typesizes.h> directly; use <sys/types.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 <sysdeps/unix/sysv/linux/sysdep.h> #include <sysdeps/unix/x86_64/sysdep.h> @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdeps/unix/sysdep.h> #include <sysdeps/x86_64/sysdep.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 <bits/endian.h> directly; include <endian.h> 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 <bits/endianness.h> directly; include <endian.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SELECT_H # error "Never use <bits/select.h> directly; include <sys/select.h> 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 <aj@suse.de>, 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sysdeps/x86_64/sysdep.h> 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 <bits/types.h> +#include <bits/endian.h> /* 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 diff --git a/lib/libc/glibc/vers.txt b/lib/libc/glibc/vers.txt index a81ba864c4..a76ef9b25d 100644 --- a/lib/libc/glibc/vers.txt +++ b/lib/libc/glibc/vers.txt @@ -39,3 +39,4 @@ GLIBC_2.27 GLIBC_2.28 GLIBC_2.29 GLIBC_2.30 +GLIBC_2.31 diff --git a/lib/libc/include/aarch64-linux-gnu/bits/endian.h b/lib/libc/include/aarch64-linux-gnu/bits/endian.h deleted file mode 100644 index b62d37d773..0000000000 --- a/lib/libc/include/aarch64-linux-gnu/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 - <http://www.gnu.org/licenses/>. */ - -#ifndef _ENDIAN_H -# error "Never use <bits/endian.h> directly; include <endian.h> 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
\ No newline at end of file diff --git a/lib/libc/include/aarch64-linux-gnu/bits/endianness.h b/lib/libc/include/aarch64-linux-gnu/bits/endianness.h new file mode 100644 index 0000000000..5db8061829 --- /dev/null +++ b/lib/libc/include/aarch64-linux-gnu/bits/endianness.h @@ -0,0 +1,15 @@ +#ifndef _BITS_ENDIANNESS_H +#define _BITS_ENDIANNESS_H 1 + +#ifndef _BITS_ENDIAN_H +# error "Never use <bits/endianness.h> directly; include <endian.h> instead." +#endif + +/* AArch64 has selectable endianness. */ +#ifdef __AARCH64EB__ +# define __BYTE_ORDER __BIG_ENDIAN +#else +# define __BYTE_ORDER __LITTLE_ENDIAN +#endif + +#endif /* bits/endianness.h */
\ No newline at end of file diff --git a/lib/libc/include/aarch64-linux-gnu/bits/fcntl.h b/lib/libc/include/aarch64-linux-gnu/bits/fcntl.h index d2dd7e88aa..ccf39f29d3 100644 --- a/lib/libc/include/aarch64-linux-gnu/bits/fcntl.h +++ b/lib/libc/include/aarch64-linux-gnu/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for the AArch64 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. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FCNTL_H # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead." diff --git a/lib/libc/include/aarch64-linux-gnu/bits/fenv.h b/lib/libc/include/aarch64-linux-gnu/bits/fenv.h index 2e080ee28d..de4e9fb758 100644 --- a/lib/libc/include/aarch64-linux-gnu/bits/fenv.h +++ b/lib/libc/include/aarch64-linux-gnu/bits/fenv.h @@ -1,4 +1,4 @@ -/* 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. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FENV_H # error "Never use <bits/fenv.h> directly; include <fenv.h> instead." @@ -73,7 +73,7 @@ fenv_t; # define FE_NOMASK_ENV ((const fenv_t *) -2) #endif -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) /* Type representing floating-point control modes. */ typedef unsigned int femode_t; diff --git a/lib/libc/include/aarch64-linux-gnu/bits/floatn.h b/lib/libc/include/aarch64-linux-gnu/bits/floatn.h index 5e7e3f4d2e..a4045e43a3 100644 --- a/lib/libc/include/aarch64-linux-gnu/bits/floatn.h +++ b/lib/libc/include/aarch64-linux-gnu/bits/floatn.h @@ -1,5 +1,5 @@ /* Macros to control TS 18661-3 glibc features on ldbl-128 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_FLOATN_H #define _BITS_FLOATN_H diff --git a/lib/libc/include/aarch64-linux-gnu/bits/fp-fast.h b/lib/libc/include/aarch64-linux-gnu/bits/fp-fast.h index c502e67c75..0cf198e478 100644 --- a/lib/libc/include/aarch64-linux-gnu/bits/fp-fast.h +++ b/lib/libc/include/aarch64-linux-gnu/bits/fp-fast.h @@ -1,5 +1,5 @@ /* Define FP_FAST_* macros. AArch64 version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _MATH_H # error "Never use <bits/fp-fast.h> directly; include <math.h> instead." diff --git a/lib/libc/include/aarch64-linux-gnu/bits/hwcap.h b/lib/libc/include/aarch64-linux-gnu/bits/hwcap.h index 629784d923..cf38b9d8b7 100644 --- a/lib/libc/include/aarch64-linux-gnu/bits/hwcap.h +++ b/lib/libc/include/aarch64-linux-gnu/bits/hwcap.h @@ -1,5 +1,5 @@ /* Defines for bits in AT_HWCAP. AArch64 Linux version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined (_SYS_AUXV_H) # error "Never include <bits/hwcap.h> directly; use <sys/auxv.h> instead." diff --git a/lib/libc/include/aarch64-linux-gnu/bits/ipc.h b/lib/libc/include/aarch64-linux-gnu/bits/ipc.h deleted file mode 100644 index 6edd48ba78..0000000000 --- a/lib/libc/include/aarch64-linux-gnu/bits/ipc.h +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (C) 1995-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 - <http://www.gnu.org/licenses/>. */ - -#ifndef _SYS_IPC_H -# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead." -#endif - -#include <bits/types.h> - -/* Mode bits for `msgget', `semget', and `shmget'. */ -#define IPC_CREAT 01000 /* Create key if key does not exist. */ -#define IPC_EXCL 02000 /* Fail if key exists. */ -#define IPC_NOWAIT 04000 /* Return error on wait. */ - -/* Control commands for `msgctl', `semctl', and `shmctl'. */ -#define IPC_RMID 0 /* Remove identifier. */ -#define IPC_SET 1 /* Set `ipc_perm' options. */ -#define IPC_STAT 2 /* Get `ipc_perm' options. */ -#ifdef __USE_GNU -# define IPC_INFO 3 /* See ipcs. */ -#endif - -/* Special key values. */ -#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ - - -/* Data structure used to pass permission information to IPC operations. */ -struct ipc_perm - { - __key_t __key; /* Key. */ - __uid_t uid; /* Owner's user ID. */ - __gid_t gid; /* Owner's group ID. */ - __uid_t cuid; /* Creator's user ID. */ - __gid_t cgid; /* Creator's group ID. */ - unsigned int mode; /* Read/write permission. */ - unsigned short int __seq; /* Sequence number. */ - unsigned short int __pad1; - __syscall_ulong_t __glibc_reserved1; - __syscall_ulong_t __glibc_reserved2; - };
\ No newline at end of file diff --git a/lib/libc/include/aarch64-linux-gnu/bits/link.h b/lib/libc/include/aarch64-linux-gnu/bits/link.h index 71f99857bc..bf9953595f 100644 --- a/lib/libc/include/aarch64-linux-gnu/bits/link.h +++ b/lib/libc/include/aarch64-linux-gnu/bits/link.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,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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _LINK_H # error "Never include <bits/link.h> directly; use <link.h> instead." diff --git a/lib/libc/include/aarch64-linux-gnu/bits/local_lim.h b/lib/libc/include/aarch64-linux-gnu/bits/local_lim.h index 738c65bc5a..155d60e416 100644 --- a/lib/libc/include/aarch64-linux-gnu/bits/local_lim.h +++ b/lib/libc/include/aarch64-linux-gnu/bits/local_lim.h @@ -1,5 +1,5 @@ /* Minimum guaranteed maximum values for system limits. Linux version. - 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. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* The kernel header pollutes the namespace with the NR_OPEN symbol and defines LINK_MAX although filesystems have different maxima. A diff --git a/lib/libc/include/aarch64-linux-gnu/bits/long-double.h b/lib/libc/include/aarch64-linux-gnu/bits/long-double.h index 12e30804a4..ce06962796 100644 --- a/lib/libc/include/aarch64-linux-gnu/bits/long-double.h +++ b/lib/libc/include/aarch64-linux-gnu/bits/long-double.h @@ -1,5 +1,5 @@ /* Properties of long double type. ldbl-128 version. - 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,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* long double is distinct from double, so there is nothing to - define here. */
\ No newline at end of file + define here. */ +#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file diff --git a/lib/libc/include/aarch64-linux-gnu/bits/procfs.h b/lib/libc/include/aarch64-linux-gnu/bits/procfs.h index cdc07b27d9..efb589274b 100644 --- a/lib/libc/include/aarch64-linux-gnu/bits/procfs.h +++ b/lib/libc/include/aarch64-linux-gnu/bits/procfs.h @@ -1,5 +1,5 @@ /* Types for registers for sys/procfs.h. AArch64 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. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PROCFS_H # error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead." diff --git a/lib/libc/include/aarch64-linux-gnu/bits/pthreadtypes-arch.h b/lib/libc/include/aarch64-linux-gnu/bits/pthreadtypes-arch.h index ef00f65b66..e64b19346e 100644 --- a/lib/libc/include/aarch64-linux-gnu/bits/pthreadtypes-arch.h +++ b/lib/libc/include/aarch64-linux-gnu/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_PTHREADTYPES_ARCH_H #define _BITS_PTHREADTYPES_ARCH_H 1 -#include <endian.h> +#include <bits/endian.h> #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 */
\ No newline at end of file diff --git a/lib/libc/include/aarch64-linux-gnu/bits/semaphore.h b/lib/libc/include/aarch64-linux-gnu/bits/semaphore.h index a15f480bd0..64a56cc2f9 100644 --- a/lib/libc/include/aarch64-linux-gnu/bits/semaphore.h +++ b/lib/libc/include/aarch64-linux-gnu/bits/semaphore.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SEMAPHORE_H # error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead." diff --git a/lib/libc/include/aarch64-linux-gnu/bits/setjmp.h b/lib/libc/include/aarch64-linux-gnu/bits/setjmp.h index 407f86adc1..2b63e21916 100644 --- a/lib/libc/include/aarch64-linux-gnu/bits/setjmp.h +++ b/lib/libc/include/aarch64-linux-gnu/bits/setjmp.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SETJMP_H #define _BITS_SETJMP_H 1 diff --git a/lib/libc/include/aarch64-linux-gnu/bits/sigstack.h b/lib/libc/include/aarch64-linux-gnu/bits/sigstack.h index 8921d2a88b..7294db7d4c 100644 --- a/lib/libc/include/aarch64-linux-gnu/bits/sigstack.h +++ b/lib/libc/include/aarch64-linux-gnu/bits/sigstack.h @@ -1,5 +1,5 @@ /* sigstack, sigaltstack definitions. - 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; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGSTACK_H #define _BITS_SIGSTACK_H 1 diff --git a/lib/libc/include/aarch64-linux-gnu/bits/stat.h b/lib/libc/include/aarch64-linux-gnu/bits/stat.h index 4f23077263..2df73d11e3 100644 --- a/lib/libc/include/aarch64-linux-gnu/bits/stat.h +++ b/lib/libc/include/aarch64-linux-gnu/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 <cmetcalf@tilera.com>, 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead." @@ -23,7 +23,7 @@ #ifndef _BITS_STAT_H #define _BITS_STAT_H 1 -#include <endian.h> +#include <bits/endian.h> #include <bits/wordsize.h> /* 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/include/aarch64-linux-gnu/bits/statfs.h b/lib/libc/include/aarch64-linux-gnu/bits/statfs.h index 8da970d4a9..61c27388e9 100644 --- a/lib/libc/include/aarch64-linux-gnu/bits/statfs.h +++ b/lib/libc/include/aarch64-linux-gnu/bits/statfs.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 <cmetcalf@tilera.com>, 2011. @@ -14,13 +14,13 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_STATFS_H # error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead." #endif -#include <endian.h> +#include <bits/endian.h> #include <bits/types.h> #include <bits/wordsize.h> @@ -34,7 +34,7 @@ #if defined __USE_FILE_OFFSET64 # define __field64(type, type64, name) type64 name -#elif __WORDSIZE == 64 +#elif __WORDSIZE == 64 || __STATFS_MATCHES_STATFS64 # define __field64(type, type64, name) type name #elif __BYTE_ORDER == __LITTLE_ENDIAN # define __field64(type, type64, name) \ diff --git a/lib/libc/include/powerpc-linux-gnu/bits/endian.h b/lib/libc/include/aarch64-linux-gnu/bits/struct_rwlock.h index f643beb3b5..1f6f86e910 100644 --- a/lib/libc/include/powerpc-linux-gnu/bits/endian.h +++ b/lib/libc/include/aarch64-linux-gnu/bits/struct_rwlock.h @@ -1,4 +1,6 @@ -/* Copyright (C) 1997-2019 Free Software Foundation, Inc. +/* AArch64 internal rwlock struct definitions. + 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 @@ -15,22 +17,25 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -/* PowerPC can be little or big endian. Hopefully gcc will know... */ - -#ifndef _ENDIAN_H -# error "Never use <bits/endian.h> directly; include <endian.h> 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 +#ifndef _RWLOCK_INTERNAL_H +#define _RWLOCK_INTERNAL_H + +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_INITIALIZER(__flags) \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags + #endif
\ No newline at end of file diff --git a/lib/libc/include/aarch64-linux-gnu/bits/typesizes.h b/lib/libc/include/aarch64-linux-gnu/bits/typesizes.h index 8cfcacef57..d9e9b274ac 100644 --- a/lib/libc/include/aarch64-linux-gnu/bits/typesizes.h +++ b/lib/libc/include/aarch64-linux-gnu/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 <cmetcalf@tilera.com>, 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_TYPES_H # error "Never include <bits/typesizes.h> directly; use <sys/types.h> 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/include/aarch64-linux-gnu/bits/wordsize.h b/lib/libc/include/aarch64-linux-gnu/bits/wordsize.h index 52f24f0980..68b28bf2d7 100644 --- a/lib/libc/include/aarch64-linux-gnu/bits/wordsize.h +++ b/lib/libc/include/aarch64-linux-gnu/bits/wordsize.h @@ -1,6 +1,6 @@ /* Determine the wordsize from the preprocessor defines. - 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifdef __LP64__ # define __WORDSIZE 64 diff --git a/lib/libc/include/aarch64-linux-gnu/fpu_control.h b/lib/libc/include/aarch64-linux-gnu/fpu_control.h index eac02cfe26..ba2e530b10 100644 --- a/lib/libc/include/aarch64-linux-gnu/fpu_control.h +++ b/lib/libc/include/aarch64-linux-gnu/fpu_control.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _AARCH64_FPU_CONTROL_H #define _AARCH64_FPU_CONTROL_H diff --git a/lib/libc/include/aarch64-linux-gnu/ieee754.h b/lib/libc/include/aarch64-linux-gnu/ieee754.h index e347e4a6e5..63fa9c5fce 100644 --- a/lib/libc/include/aarch64-linux-gnu/ieee754.h +++ b/lib/libc/include/aarch64-linux-gnu/ieee754.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,14 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _IEEE754_H - #define _IEEE754_H 1 + #include <features.h> -#include <endian.h> +#include <bits/endian.h> __BEGIN_DECLS diff --git a/lib/libc/include/aarch64-linux-gnu/sys/elf.h b/lib/libc/include/aarch64-linux-gnu/sys/elf.h index d7062a3a91..e3e2bac7b2 100644 --- a/lib/libc/include/aarch64-linux-gnu/sys/elf.h +++ b/lib/libc/include/aarch64-linux-gnu/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_ELF_H #define _SYS_ELF_H 1 diff --git a/lib/libc/include/aarch64-linux-gnu/sys/ptrace.h b/lib/libc/include/aarch64-linux-gnu/sys/ptrace.h index 59b06682a9..ce7f6bf7c0 100644 --- a/lib/libc/include/aarch64-linux-gnu/sys/ptrace.h +++ b/lib/libc/include/aarch64-linux-gnu/sys/ptrace.h @@ -1,5 +1,5 @@ /* `ptrace' debugger support interface. Linux/AArch64 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. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PTRACE_H #define _SYS_PTRACE_H 1 @@ -136,8 +136,12 @@ enum __ptrace_request #define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER /* Get seccomp BPF filter metadata. */ - PTRACE_SECCOMP_GET_METADATA = 0x420d + PTRACE_SECCOMP_GET_METADATA = 0x420d, #define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA + + /* Get information about system call. */ + PTRACE_GET_SYSCALL_INFO = 0x420e +#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO }; diff --git a/lib/libc/include/aarch64-linux-gnu/sys/ucontext.h b/lib/libc/include/aarch64-linux-gnu/sys/ucontext.h index 273ba806dd..a3ede3eb97 100644 --- a/lib/libc/include/aarch64-linux-gnu/sys/ucontext.h +++ b/lib/libc/include/aarch64-linux-gnu/sys/ucontext.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. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* System V/AArch64 ABI compliant context switching support. */ diff --git a/lib/libc/include/aarch64-linux-gnu/sys/user.h b/lib/libc/include/aarch64-linux-gnu/sys/user.h index 8daa97548a..ce78f80471 100644 --- a/lib/libc/include/aarch64-linux-gnu/sys/user.h +++ b/lib/libc/include/aarch64-linux-gnu/sys/user.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2009-2019 Free Software Foundation, Inc. +/* Copyright (C) 2009-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_USER_H #define _SYS_USER_H 1 diff --git a/lib/libc/include/aarch64_be-linux-gnu/bits/endian.h b/lib/libc/include/aarch64_be-linux-gnu/bits/endian.h deleted file mode 100644 index b62d37d773..0000000000 --- a/lib/libc/include/aarch64_be-linux-gnu/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 - <http://www.gnu.org/licenses/>. */ - -#ifndef _ENDIAN_H -# error "Never use <bits/endian.h> directly; include <endian.h> 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
\ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-gnu/bits/endianness.h b/lib/libc/include/aarch64_be-linux-gnu/bits/endianness.h new file mode 100644 index 0000000000..5db8061829 --- /dev/null +++ b/lib/libc/include/aarch64_be-linux-gnu/bits/endianness.h @@ -0,0 +1,15 @@ +#ifndef _BITS_ENDIANNESS_H +#define _BITS_ENDIANNESS_H 1 + +#ifndef _BITS_ENDIAN_H +# error "Never use <bits/endianness.h> directly; include <endian.h> instead." +#endif + +/* AArch64 has selectable endianness. */ +#ifdef __AARCH64EB__ +# define __BYTE_ORDER __BIG_ENDIAN +#else +# define __BYTE_ORDER __LITTLE_ENDIAN +#endif + +#endif /* bits/endianness.h */
\ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-gnu/bits/fcntl.h b/lib/libc/include/aarch64_be-linux-gnu/bits/fcntl.h index d2dd7e88aa..ccf39f29d3 100644 --- a/lib/libc/include/aarch64_be-linux-gnu/bits/fcntl.h +++ b/lib/libc/include/aarch64_be-linux-gnu/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for the AArch64 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. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FCNTL_H # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead." diff --git a/lib/libc/include/aarch64_be-linux-gnu/bits/fenv.h b/lib/libc/include/aarch64_be-linux-gnu/bits/fenv.h index 2e080ee28d..de4e9fb758 100644 --- a/lib/libc/include/aarch64_be-linux-gnu/bits/fenv.h +++ b/lib/libc/include/aarch64_be-linux-gnu/bits/fenv.h @@ -1,4 +1,4 @@ -/* 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. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FENV_H # error "Never use <bits/fenv.h> directly; include <fenv.h> instead." @@ -73,7 +73,7 @@ fenv_t; # define FE_NOMASK_ENV ((const fenv_t *) -2) #endif -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) /* Type representing floating-point control modes. */ typedef unsigned int femode_t; diff --git a/lib/libc/include/aarch64_be-linux-gnu/bits/floatn.h b/lib/libc/include/aarch64_be-linux-gnu/bits/floatn.h index 5e7e3f4d2e..a4045e43a3 100644 --- a/lib/libc/include/aarch64_be-linux-gnu/bits/floatn.h +++ b/lib/libc/include/aarch64_be-linux-gnu/bits/floatn.h @@ -1,5 +1,5 @@ /* Macros to control TS 18661-3 glibc features on ldbl-128 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_FLOATN_H #define _BITS_FLOATN_H diff --git a/lib/libc/include/aarch64_be-linux-gnu/bits/fp-fast.h b/lib/libc/include/aarch64_be-linux-gnu/bits/fp-fast.h index c502e67c75..0cf198e478 100644 --- a/lib/libc/include/aarch64_be-linux-gnu/bits/fp-fast.h +++ b/lib/libc/include/aarch64_be-linux-gnu/bits/fp-fast.h @@ -1,5 +1,5 @@ /* Define FP_FAST_* macros. AArch64 version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _MATH_H # error "Never use <bits/fp-fast.h> directly; include <math.h> instead." diff --git a/lib/libc/include/aarch64_be-linux-gnu/bits/hwcap.h b/lib/libc/include/aarch64_be-linux-gnu/bits/hwcap.h index 629784d923..cf38b9d8b7 100644 --- a/lib/libc/include/aarch64_be-linux-gnu/bits/hwcap.h +++ b/lib/libc/include/aarch64_be-linux-gnu/bits/hwcap.h @@ -1,5 +1,5 @@ /* Defines for bits in AT_HWCAP. AArch64 Linux version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined (_SYS_AUXV_H) # error "Never include <bits/hwcap.h> directly; use <sys/auxv.h> instead." diff --git a/lib/libc/include/aarch64_be-linux-gnu/bits/ipc.h b/lib/libc/include/aarch64_be-linux-gnu/bits/ipc.h deleted file mode 100644 index 6edd48ba78..0000000000 --- a/lib/libc/include/aarch64_be-linux-gnu/bits/ipc.h +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (C) 1995-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 - <http://www.gnu.org/licenses/>. */ - -#ifndef _SYS_IPC_H -# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead." -#endif - -#include <bits/types.h> - -/* Mode bits for `msgget', `semget', and `shmget'. */ -#define IPC_CREAT 01000 /* Create key if key does not exist. */ -#define IPC_EXCL 02000 /* Fail if key exists. */ -#define IPC_NOWAIT 04000 /* Return error on wait. */ - -/* Control commands for `msgctl', `semctl', and `shmctl'. */ -#define IPC_RMID 0 /* Remove identifier. */ -#define IPC_SET 1 /* Set `ipc_perm' options. */ -#define IPC_STAT 2 /* Get `ipc_perm' options. */ -#ifdef __USE_GNU -# define IPC_INFO 3 /* See ipcs. */ -#endif - -/* Special key values. */ -#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ - - -/* Data structure used to pass permission information to IPC operations. */ -struct ipc_perm - { - __key_t __key; /* Key. */ - __uid_t uid; /* Owner's user ID. */ - __gid_t gid; /* Owner's group ID. */ - __uid_t cuid; /* Creator's user ID. */ - __gid_t cgid; /* Creator's group ID. */ - unsigned int mode; /* Read/write permission. */ - unsigned short int __seq; /* Sequence number. */ - unsigned short int __pad1; - __syscall_ulong_t __glibc_reserved1; - __syscall_ulong_t __glibc_reserved2; - };
\ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-gnu/bits/link.h b/lib/libc/include/aarch64_be-linux-gnu/bits/link.h index 71f99857bc..bf9953595f 100644 --- a/lib/libc/include/aarch64_be-linux-gnu/bits/link.h +++ b/lib/libc/include/aarch64_be-linux-gnu/bits/link.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,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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _LINK_H # error "Never include <bits/link.h> directly; use <link.h> instead." diff --git a/lib/libc/include/aarch64_be-linux-gnu/bits/local_lim.h b/lib/libc/include/aarch64_be-linux-gnu/bits/local_lim.h index 738c65bc5a..155d60e416 100644 --- a/lib/libc/include/aarch64_be-linux-gnu/bits/local_lim.h +++ b/lib/libc/include/aarch64_be-linux-gnu/bits/local_lim.h @@ -1,5 +1,5 @@ /* Minimum guaranteed maximum values for system limits. Linux version. - 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. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* The kernel header pollutes the namespace with the NR_OPEN symbol and defines LINK_MAX although filesystems have different maxima. A diff --git a/lib/libc/include/aarch64_be-linux-gnu/bits/long-double.h b/lib/libc/include/aarch64_be-linux-gnu/bits/long-double.h index 12e30804a4..ce06962796 100644 --- a/lib/libc/include/aarch64_be-linux-gnu/bits/long-double.h +++ b/lib/libc/include/aarch64_be-linux-gnu/bits/long-double.h @@ -1,5 +1,5 @@ /* Properties of long double type. ldbl-128 version. - 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,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* long double is distinct from double, so there is nothing to - define here. */
\ No newline at end of file + define here. */ +#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-gnu/bits/procfs.h b/lib/libc/include/aarch64_be-linux-gnu/bits/procfs.h index cdc07b27d9..efb589274b 100644 --- a/lib/libc/include/aarch64_be-linux-gnu/bits/procfs.h +++ b/lib/libc/include/aarch64_be-linux-gnu/bits/procfs.h @@ -1,5 +1,5 @@ /* Types for registers for sys/procfs.h. AArch64 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. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PROCFS_H # error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead." diff --git a/lib/libc/include/aarch64_be-linux-gnu/bits/pthreadtypes-arch.h b/lib/libc/include/aarch64_be-linux-gnu/bits/pthreadtypes-arch.h index ef00f65b66..e64b19346e 100644 --- a/lib/libc/include/aarch64_be-linux-gnu/bits/pthreadtypes-arch.h +++ b/lib/libc/include/aarch64_be-linux-gnu/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_PTHREADTYPES_ARCH_H #define _BITS_PTHREADTYPES_ARCH_H 1 -#include <endian.h> +#include <bits/endian.h> #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 */
\ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-gnu/bits/semaphore.h b/lib/libc/include/aarch64_be-linux-gnu/bits/semaphore.h index a15f480bd0..64a56cc2f9 100644 --- a/lib/libc/include/aarch64_be-linux-gnu/bits/semaphore.h +++ b/lib/libc/include/aarch64_be-linux-gnu/bits/semaphore.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SEMAPHORE_H # error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead." diff --git a/lib/libc/include/aarch64_be-linux-gnu/bits/setjmp.h b/lib/libc/include/aarch64_be-linux-gnu/bits/setjmp.h index 407f86adc1..2b63e21916 100644 --- a/lib/libc/include/aarch64_be-linux-gnu/bits/setjmp.h +++ b/lib/libc/include/aarch64_be-linux-gnu/bits/setjmp.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SETJMP_H #define _BITS_SETJMP_H 1 diff --git a/lib/libc/include/aarch64_be-linux-gnu/bits/sigstack.h b/lib/libc/include/aarch64_be-linux-gnu/bits/sigstack.h index 8921d2a88b..7294db7d4c 100644 --- a/lib/libc/include/aarch64_be-linux-gnu/bits/sigstack.h +++ b/lib/libc/include/aarch64_be-linux-gnu/bits/sigstack.h @@ -1,5 +1,5 @@ /* sigstack, sigaltstack definitions. - 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; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGSTACK_H #define _BITS_SIGSTACK_H 1 diff --git a/lib/libc/include/aarch64_be-linux-gnu/bits/stat.h b/lib/libc/include/aarch64_be-linux-gnu/bits/stat.h index 4f23077263..2df73d11e3 100644 --- a/lib/libc/include/aarch64_be-linux-gnu/bits/stat.h +++ b/lib/libc/include/aarch64_be-linux-gnu/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 <cmetcalf@tilera.com>, 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead." @@ -23,7 +23,7 @@ #ifndef _BITS_STAT_H #define _BITS_STAT_H 1 -#include <endian.h> +#include <bits/endian.h> #include <bits/wordsize.h> /* 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/include/aarch64_be-linux-gnu/bits/statfs.h b/lib/libc/include/aarch64_be-linux-gnu/bits/statfs.h index 8da970d4a9..61c27388e9 100644 --- a/lib/libc/include/aarch64_be-linux-gnu/bits/statfs.h +++ b/lib/libc/include/aarch64_be-linux-gnu/bits/statfs.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 <cmetcalf@tilera.com>, 2011. @@ -14,13 +14,13 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_STATFS_H # error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead." #endif -#include <endian.h> +#include <bits/endian.h> #include <bits/types.h> #include <bits/wordsize.h> @@ -34,7 +34,7 @@ #if defined __USE_FILE_OFFSET64 # define __field64(type, type64, name) type64 name -#elif __WORDSIZE == 64 +#elif __WORDSIZE == 64 || __STATFS_MATCHES_STATFS64 # define __field64(type, type64, name) type name #elif __BYTE_ORDER == __LITTLE_ENDIAN # define __field64(type, type64, name) \ diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/endian.h b/lib/libc/include/aarch64_be-linux-gnu/bits/struct_rwlock.h index f643beb3b5..1f6f86e910 100644 --- a/lib/libc/include/powerpc64-linux-gnu/bits/endian.h +++ b/lib/libc/include/aarch64_be-linux-gnu/bits/struct_rwlock.h @@ -1,4 +1,6 @@ -/* Copyright (C) 1997-2019 Free Software Foundation, Inc. +/* AArch64 internal rwlock struct definitions. + 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 @@ -15,22 +17,25 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -/* PowerPC can be little or big endian. Hopefully gcc will know... */ - -#ifndef _ENDIAN_H -# error "Never use <bits/endian.h> directly; include <endian.h> 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 +#ifndef _RWLOCK_INTERNAL_H +#define _RWLOCK_INTERNAL_H + +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_INITIALIZER(__flags) \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags + #endif
\ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-gnu/bits/typesizes.h b/lib/libc/include/aarch64_be-linux-gnu/bits/typesizes.h index 8cfcacef57..d9e9b274ac 100644 --- a/lib/libc/include/aarch64_be-linux-gnu/bits/typesizes.h +++ b/lib/libc/include/aarch64_be-linux-gnu/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 <cmetcalf@tilera.com>, 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_TYPES_H # error "Never include <bits/typesizes.h> directly; use <sys/types.h> 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/include/aarch64_be-linux-gnu/bits/wordsize.h b/lib/libc/include/aarch64_be-linux-gnu/bits/wordsize.h index 52f24f0980..68b28bf2d7 100644 --- a/lib/libc/include/aarch64_be-linux-gnu/bits/wordsize.h +++ b/lib/libc/include/aarch64_be-linux-gnu/bits/wordsize.h @@ -1,6 +1,6 @@ /* Determine the wordsize from the preprocessor defines. - 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifdef __LP64__ # define __WORDSIZE 64 diff --git a/lib/libc/include/aarch64_be-linux-gnu/fpu_control.h b/lib/libc/include/aarch64_be-linux-gnu/fpu_control.h index eac02cfe26..ba2e530b10 100644 --- a/lib/libc/include/aarch64_be-linux-gnu/fpu_control.h +++ b/lib/libc/include/aarch64_be-linux-gnu/fpu_control.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _AARCH64_FPU_CONTROL_H #define _AARCH64_FPU_CONTROL_H diff --git a/lib/libc/include/aarch64_be-linux-gnu/ieee754.h b/lib/libc/include/aarch64_be-linux-gnu/ieee754.h index e347e4a6e5..63fa9c5fce 100644 --- a/lib/libc/include/aarch64_be-linux-gnu/ieee754.h +++ b/lib/libc/include/aarch64_be-linux-gnu/ieee754.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,14 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _IEEE754_H - #define _IEEE754_H 1 + #include <features.h> -#include <endian.h> +#include <bits/endian.h> __BEGIN_DECLS diff --git a/lib/libc/include/aarch64_be-linux-gnu/sys/elf.h b/lib/libc/include/aarch64_be-linux-gnu/sys/elf.h index d7062a3a91..e3e2bac7b2 100644 --- a/lib/libc/include/aarch64_be-linux-gnu/sys/elf.h +++ b/lib/libc/include/aarch64_be-linux-gnu/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_ELF_H #define _SYS_ELF_H 1 diff --git a/lib/libc/include/aarch64_be-linux-gnu/sys/ptrace.h b/lib/libc/include/aarch64_be-linux-gnu/sys/ptrace.h index 59b06682a9..ce7f6bf7c0 100644 --- a/lib/libc/include/aarch64_be-linux-gnu/sys/ptrace.h +++ b/lib/libc/include/aarch64_be-linux-gnu/sys/ptrace.h @@ -1,5 +1,5 @@ /* `ptrace' debugger support interface. Linux/AArch64 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. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PTRACE_H #define _SYS_PTRACE_H 1 @@ -136,8 +136,12 @@ enum __ptrace_request #define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER /* Get seccomp BPF filter metadata. */ - PTRACE_SECCOMP_GET_METADATA = 0x420d + PTRACE_SECCOMP_GET_METADATA = 0x420d, #define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA + + /* Get information about system call. */ + PTRACE_GET_SYSCALL_INFO = 0x420e +#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO }; diff --git a/lib/libc/include/aarch64_be-linux-gnu/sys/ucontext.h b/lib/libc/include/aarch64_be-linux-gnu/sys/ucontext.h index 273ba806dd..a3ede3eb97 100644 --- a/lib/libc/include/aarch64_be-linux-gnu/sys/ucontext.h +++ b/lib/libc/include/aarch64_be-linux-gnu/sys/ucontext.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. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* System V/AArch64 ABI compliant context switching support. */ diff --git a/lib/libc/include/aarch64_be-linux-gnu/sys/user.h b/lib/libc/include/aarch64_be-linux-gnu/sys/user.h index 8daa97548a..ce78f80471 100644 --- a/lib/libc/include/aarch64_be-linux-gnu/sys/user.h +++ b/lib/libc/include/aarch64_be-linux-gnu/sys/user.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2009-2019 Free Software Foundation, Inc. +/* Copyright (C) 2009-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_USER_H #define _SYS_USER_H 1 diff --git a/lib/libc/include/arm-linux-gnueabi/bits/endian.h b/lib/libc/include/arm-linux-gnueabi/bits/endian.h deleted file mode 100644 index 8325d51253..0000000000 --- a/lib/libc/include/arm-linux-gnueabi/bits/endian.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef _ENDIAN_H -# error "Never use <bits/endian.h> directly; include <endian.h> instead." -#endif - -/* ARM can be either big or little endian. */ -#ifdef __ARMEB__ -#define __BYTE_ORDER __BIG_ENDIAN -#else -#define __BYTE_ORDER __LITTLE_ENDIAN -#endif
\ No newline at end of file diff --git a/lib/libc/include/arm-linux-gnueabi/bits/endianness.h b/lib/libc/include/arm-linux-gnueabi/bits/endianness.h new file mode 100644 index 0000000000..8e938abfb9 --- /dev/null +++ b/lib/libc/include/arm-linux-gnueabi/bits/endianness.h @@ -0,0 +1,15 @@ +#ifndef _BITS_ENDIANNESS_H +#define _BITS_ENDIANNESS_H 1 + +#ifndef _BITS_ENDIAN_H +# error "Never use <bits/endianness.h> directly; include <endian.h> instead." +#endif + +/* ARM has selectable endianness. */ +#ifdef __ARMEB__ +#define __BYTE_ORDER __BIG_ENDIAN +#else +#define __BYTE_ORDER __LITTLE_ENDIAN +#endif + +#endif /* bits/endianness.h */
\ No newline at end of file diff --git a/lib/libc/include/arm-linux-gnueabi/bits/fcntl.h b/lib/libc/include/arm-linux-gnueabi/bits/fcntl.h index 77edfb78fb..fdb169449b 100644 --- a/lib/libc/include/arm-linux-gnueabi/bits/fcntl.h +++ b/lib/libc/include/arm-linux-gnueabi/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FCNTL_H # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead." diff --git a/lib/libc/include/arm-linux-gnueabi/bits/fenv.h b/lib/libc/include/arm-linux-gnueabi/bits/fenv.h index b8fbba6258..654776420e 100644 --- a/lib/libc/include/arm-linux-gnueabi/bits/fenv.h +++ b/lib/libc/include/arm-linux-gnueabi/bits/fenv.h @@ -1,4 +1,4 @@ -/* 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FENV_H # error "Never use <bits/fenv.h> directly; include <fenv.h> instead." @@ -81,7 +81,7 @@ fenv_t; # define FE_NOMASK_ENV ((const fenv_t *) -2) #endif -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) /* Type representing floating-point control modes. */ typedef unsigned int femode_t; diff --git a/lib/libc/include/arm-linux-gnueabi/bits/floatn.h b/lib/libc/include/arm-linux-gnueabi/bits/floatn.h index 24852b6800..2900001e82 100644 --- a/lib/libc/include/arm-linux-gnueabi/bits/floatn.h +++ b/lib/libc/include/arm-linux-gnueabi/bits/floatn.h @@ -1,5 +1,5 @@ /* Macros to control TS 18661-3 glibc features. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* Defined to 1 if the current compiler invocation provides a floating-point type with the IEEE 754 binary128 format, and this glibc diff --git a/lib/libc/include/arm-linux-gnueabi/bits/hwcap.h b/lib/libc/include/arm-linux-gnueabi/bits/hwcap.h index a31befca4e..b626008612 100644 --- a/lib/libc/include/arm-linux-gnueabi/bits/hwcap.h +++ b/lib/libc/include/arm-linux-gnueabi/bits/hwcap.h @@ -1,5 +1,5 @@ /* Defines for bits in AT_HWCAP. ARM Linux 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined (_SYS_AUXV_H) && !defined (_LINUX_ARM_SYSDEP_H) # error "Never include <bits/hwcap.h> directly; use <sys/auxv.h> instead." diff --git a/lib/libc/include/arm-linux-gnueabi/bits/link.h b/lib/libc/include/arm-linux-gnueabi/bits/link.h index 5dee177ce6..7ebb2785d6 100644 --- a/lib/libc/include/arm-linux-gnueabi/bits/link.h +++ b/lib/libc/include/arm-linux-gnueabi/bits/link.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _LINK_H # error "Never include <bits/link.h> directly; use <link.h> instead." diff --git a/lib/libc/include/arm-linux-gnueabi/bits/long-double.h b/lib/libc/include/arm-linux-gnueabi/bits/long-double.h index 125807d07a..13e74241e1 100644 --- a/lib/libc/include/arm-linux-gnueabi/bits/long-double.h +++ b/lib/libc/include/arm-linux-gnueabi/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* This header is included by <sys/cdefs.h>. @@ -36,4 +36,5 @@ ABI-compatible with double. */ #ifndef __NO_LONG_DOUBLE_MATH # define __NO_LONG_DOUBLE_MATH 1 -#endif
\ No newline at end of file +#endif +#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file diff --git a/lib/libc/include/arm-linux-gnueabi/bits/procfs-id.h b/lib/libc/include/arm-linux-gnueabi/bits/procfs-id.h index 35582db16f..48da66726b 100644 --- a/lib/libc/include/arm-linux-gnueabi/bits/procfs-id.h +++ b/lib/libc/include/arm-linux-gnueabi/bits/procfs-id.h @@ -1,5 +1,5 @@ /* Types of pr_uid and pr_gid in struct elf_prpsinfo. Arm 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. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PROCFS_H # error "Never include <bits/procfs-id.h> directly; use <sys/procfs.h> instead." diff --git a/lib/libc/include/arm-linux-gnueabi/bits/procfs.h b/lib/libc/include/arm-linux-gnueabi/bits/procfs.h index 3e91a588d8..8a92b69bd4 100644 --- a/lib/libc/include/arm-linux-gnueabi/bits/procfs.h +++ b/lib/libc/include/arm-linux-gnueabi/bits/procfs.h @@ -1,5 +1,5 @@ /* Types for registers for sys/procfs.h. Arm 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PROCFS_H # error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead." diff --git a/lib/libc/include/arm-linux-gnueabi/bits/semaphore.h b/lib/libc/include/arm-linux-gnueabi/bits/semaphore.h index acde20be36..3dd94baf34 100644 --- a/lib/libc/include/arm-linux-gnueabi/bits/semaphore.h +++ b/lib/libc/include/arm-linux-gnueabi/bits/semaphore.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SEMAPHORE_H # error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead." diff --git a/lib/libc/include/arm-linux-gnueabi/bits/setjmp.h b/lib/libc/include/arm-linux-gnueabi/bits/setjmp.h index 2b50cca982..0912578792 100644 --- a/lib/libc/include/arm-linux-gnueabi/bits/setjmp.h +++ b/lib/libc/include/arm-linux-gnueabi/bits/setjmp.h @@ -1,4 +1,4 @@ -/* 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* Define the machine-dependent type `jmp_buf'. ARM EABI version. */ diff --git a/lib/libc/include/arm-linux-gnueabi/bits/shmlba.h b/lib/libc/include/arm-linux-gnueabi/bits/shmlba.h index 53ceb23b31..75efb7ce50 100644 --- a/lib/libc/include/arm-linux-gnueabi/bits/shmlba.h +++ b/lib/libc/include/arm-linux-gnueabi/bits/shmlba.h @@ -1,5 +1,5 @@ /* Define SHMLBA. ARM 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SHM_H # error "Never use <bits/shmlba.h> directly; include <sys/shm.h> instead." diff --git a/lib/libc/include/arm-linux-gnueabi/bits/stat.h b/lib/libc/include/arm-linux-gnueabi/bits/stat.h index 16336f5ec1..f6c3b7a3fa 100644 --- a/lib/libc/include/arm-linux-gnueabi/bits/stat.h +++ b/lib/libc/include/arm-linux-gnueabi/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead." diff --git a/lib/libc/include/arm-linux-gnueabi/bits/struct_rwlock.h b/lib/libc/include/arm-linux-gnueabi/bits/struct_rwlock.h new file mode 100644 index 0000000000..f6c7499dab --- /dev/null +++ b/lib/libc/include/arm-linux-gnueabi/bits/struct_rwlock.h @@ -0,0 +1,61 @@ +/* Default read-write lock implementation struct definitions. + 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef __RWLOCK_INTERNAL_H +#define __RWLOCK_INTERNAL_H + +#include <bits/endian.h> + +/* Generic struct for both POSIX read-write lock. New ports are expected + to use the default layout, however archictetures can redefine it to add + arch-specific extensions (such as lock-elision). The struct have a size + of 32 bytes on both LP32 and LP64 architectures. */ + +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; + /* FLAGS must stay at its position in the structure to maintain + binary compatibility. */ +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned char __pad1; + unsigned char __pad2; + unsigned char __shared; + unsigned char __flags; +#else + unsigned char __flags; + unsigned char __shared; + unsigned char __pad1; + unsigned char __pad2; +#endif + int __cur_writer; +}; + +#if __BYTE_ORDER == __BIG_ENDIAN +# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags, 0 +#else +# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \ + 0, 0, 0, 0, 0, 0, __flags, 0, 0, 0, 0 +#endif + +#endif
\ No newline at end of file diff --git a/lib/libc/include/arm-linux-gnueabi/bits/wordsize.h b/lib/libc/include/arm-linux-gnueabi/bits/wordsize.h index 3485a5acf2..f0838f9108 100644 --- a/lib/libc/include/arm-linux-gnueabi/bits/wordsize.h +++ b/lib/libc/include/arm-linux-gnueabi/bits/wordsize.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #define __WORDSIZE 32 #define __WORDSIZE_TIME64_COMPAT32 0 diff --git a/lib/libc/include/arm-linux-gnueabi/fpu_control.h b/lib/libc/include/arm-linux-gnueabi/fpu_control.h index 9d6c65112e..ad74992218 100644 --- a/lib/libc/include/arm-linux-gnueabi/fpu_control.h +++ b/lib/libc/include/arm-linux-gnueabi/fpu_control.h @@ -1,5 +1,5 @@ /* FPU control word definitions. ARM VFP version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FPU_CONTROL_H #define _FPU_CONTROL_H diff --git a/lib/libc/include/arm-linux-gnueabi/sys/ptrace.h b/lib/libc/include/arm-linux-gnueabi/sys/ptrace.h index 22d2bb12d4..34be509f32 100644 --- a/lib/libc/include/arm-linux-gnueabi/sys/ptrace.h +++ b/lib/libc/include/arm-linux-gnueabi/sys/ptrace.h @@ -1,5 +1,5 @@ /* `ptrace' debugger support interface. Linux/ARM 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. @@ -196,8 +196,12 @@ enum __ptrace_request #define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER /* Get seccomp BPF filter metadata. */ - PTRACE_SECCOMP_GET_METADATA = 0x420d + PTRACE_SECCOMP_GET_METADATA = 0x420d, #define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA + + /* Get information about system call. */ + PTRACE_GET_SYSCALL_INFO = 0x420e +#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO }; diff --git a/lib/libc/include/arm-linux-gnueabi/sys/ucontext.h b/lib/libc/include/arm-linux-gnueabi/sys/ucontext.h index 79b51c3f94..53ffc36a6c 100644 --- a/lib/libc/include/arm-linux-gnueabi/sys/ucontext.h +++ b/lib/libc/include/arm-linux-gnueabi/sys/ucontext.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* System V/ARM ABI compliant context switching support. */ diff --git a/lib/libc/include/arm-linux-gnueabi/sys/user.h b/lib/libc/include/arm-linux-gnueabi/sys/user.h index 4916f5c018..2b901bfba3 100644 --- a/lib/libc/include/arm-linux-gnueabi/sys/user.h +++ b/lib/libc/include/arm-linux-gnueabi/sys/user.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_USER_H #define _SYS_USER_H 1 diff --git a/lib/libc/include/arm-linux-gnueabihf/bits/endian.h b/lib/libc/include/arm-linux-gnueabihf/bits/endian.h deleted file mode 100644 index 8325d51253..0000000000 --- a/lib/libc/include/arm-linux-gnueabihf/bits/endian.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef _ENDIAN_H -# error "Never use <bits/endian.h> directly; include <endian.h> instead." -#endif - -/* ARM can be either big or little endian. */ -#ifdef __ARMEB__ -#define __BYTE_ORDER __BIG_ENDIAN -#else -#define __BYTE_ORDER __LITTLE_ENDIAN -#endif
\ No newline at end of file diff --git a/lib/libc/include/arm-linux-gnueabihf/bits/endianness.h b/lib/libc/include/arm-linux-gnueabihf/bits/endianness.h new file mode 100644 index 0000000000..8e938abfb9 --- /dev/null +++ b/lib/libc/include/arm-linux-gnueabihf/bits/endianness.h @@ -0,0 +1,15 @@ +#ifndef _BITS_ENDIANNESS_H +#define _BITS_ENDIANNESS_H 1 + +#ifndef _BITS_ENDIAN_H +# error "Never use <bits/endianness.h> directly; include <endian.h> instead." +#endif + +/* ARM has selectable endianness. */ +#ifdef __ARMEB__ +#define __BYTE_ORDER __BIG_ENDIAN +#else +#define __BYTE_ORDER __LITTLE_ENDIAN +#endif + +#endif /* bits/endianness.h */
\ No newline at end of file diff --git a/lib/libc/include/arm-linux-gnueabihf/bits/fcntl.h b/lib/libc/include/arm-linux-gnueabihf/bits/fcntl.h index 77edfb78fb..fdb169449b 100644 --- a/lib/libc/include/arm-linux-gnueabihf/bits/fcntl.h +++ b/lib/libc/include/arm-linux-gnueabihf/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FCNTL_H # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead." diff --git a/lib/libc/include/arm-linux-gnueabihf/bits/fenv.h b/lib/libc/include/arm-linux-gnueabihf/bits/fenv.h index b8fbba6258..654776420e 100644 --- a/lib/libc/include/arm-linux-gnueabihf/bits/fenv.h +++ b/lib/libc/include/arm-linux-gnueabihf/bits/fenv.h @@ -1,4 +1,4 @@ -/* 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FENV_H # error "Never use <bits/fenv.h> directly; include <fenv.h> instead." @@ -81,7 +81,7 @@ fenv_t; # define FE_NOMASK_ENV ((const fenv_t *) -2) #endif -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) /* Type representing floating-point control modes. */ typedef unsigned int femode_t; diff --git a/lib/libc/include/arm-linux-gnueabihf/bits/floatn.h b/lib/libc/include/arm-linux-gnueabihf/bits/floatn.h index 24852b6800..2900001e82 100644 --- a/lib/libc/include/arm-linux-gnueabihf/bits/floatn.h +++ b/lib/libc/include/arm-linux-gnueabihf/bits/floatn.h @@ -1,5 +1,5 @@ /* Macros to control TS 18661-3 glibc features. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* Defined to 1 if the current compiler invocation provides a floating-point type with the IEEE 754 binary128 format, and this glibc diff --git a/lib/libc/include/arm-linux-gnueabihf/bits/hwcap.h b/lib/libc/include/arm-linux-gnueabihf/bits/hwcap.h index a31befca4e..b626008612 100644 --- a/lib/libc/include/arm-linux-gnueabihf/bits/hwcap.h +++ b/lib/libc/include/arm-linux-gnueabihf/bits/hwcap.h @@ -1,5 +1,5 @@ /* Defines for bits in AT_HWCAP. ARM Linux 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined (_SYS_AUXV_H) && !defined (_LINUX_ARM_SYSDEP_H) # error "Never include <bits/hwcap.h> directly; use <sys/auxv.h> instead." diff --git a/lib/libc/include/arm-linux-gnueabihf/bits/link.h b/lib/libc/include/arm-linux-gnueabihf/bits/link.h index 5dee177ce6..7ebb2785d6 100644 --- a/lib/libc/include/arm-linux-gnueabihf/bits/link.h +++ b/lib/libc/include/arm-linux-gnueabihf/bits/link.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _LINK_H # error "Never include <bits/link.h> directly; use <link.h> instead." diff --git a/lib/libc/include/arm-linux-gnueabihf/bits/long-double.h b/lib/libc/include/arm-linux-gnueabihf/bits/long-double.h index 125807d07a..13e74241e1 100644 --- a/lib/libc/include/arm-linux-gnueabihf/bits/long-double.h +++ b/lib/libc/include/arm-linux-gnueabihf/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* This header is included by <sys/cdefs.h>. @@ -36,4 +36,5 @@ ABI-compatible with double. */ #ifndef __NO_LONG_DOUBLE_MATH # define __NO_LONG_DOUBLE_MATH 1 -#endif
\ No newline at end of file +#endif +#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file diff --git a/lib/libc/include/arm-linux-gnueabihf/bits/procfs-id.h b/lib/libc/include/arm-linux-gnueabihf/bits/procfs-id.h index 35582db16f..48da66726b 100644 --- a/lib/libc/include/arm-linux-gnueabihf/bits/procfs-id.h +++ b/lib/libc/include/arm-linux-gnueabihf/bits/procfs-id.h @@ -1,5 +1,5 @@ /* Types of pr_uid and pr_gid in struct elf_prpsinfo. Arm 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. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PROCFS_H # error "Never include <bits/procfs-id.h> directly; use <sys/procfs.h> instead." diff --git a/lib/libc/include/arm-linux-gnueabihf/bits/procfs.h b/lib/libc/include/arm-linux-gnueabihf/bits/procfs.h index 3e91a588d8..8a92b69bd4 100644 --- a/lib/libc/include/arm-linux-gnueabihf/bits/procfs.h +++ b/lib/libc/include/arm-linux-gnueabihf/bits/procfs.h @@ -1,5 +1,5 @@ /* Types for registers for sys/procfs.h. Arm 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PROCFS_H # error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead." diff --git a/lib/libc/include/arm-linux-gnueabihf/bits/semaphore.h b/lib/libc/include/arm-linux-gnueabihf/bits/semaphore.h index acde20be36..3dd94baf34 100644 --- a/lib/libc/include/arm-linux-gnueabihf/bits/semaphore.h +++ b/lib/libc/include/arm-linux-gnueabihf/bits/semaphore.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SEMAPHORE_H # error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead." diff --git a/lib/libc/include/arm-linux-gnueabihf/bits/setjmp.h b/lib/libc/include/arm-linux-gnueabihf/bits/setjmp.h index 2b50cca982..0912578792 100644 --- a/lib/libc/include/arm-linux-gnueabihf/bits/setjmp.h +++ b/lib/libc/include/arm-linux-gnueabihf/bits/setjmp.h @@ -1,4 +1,4 @@ -/* 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* Define the machine-dependent type `jmp_buf'. ARM EABI version. */ diff --git a/lib/libc/include/arm-linux-gnueabihf/bits/shmlba.h b/lib/libc/include/arm-linux-gnueabihf/bits/shmlba.h index 53ceb23b31..75efb7ce50 100644 --- a/lib/libc/include/arm-linux-gnueabihf/bits/shmlba.h +++ b/lib/libc/include/arm-linux-gnueabihf/bits/shmlba.h @@ -1,5 +1,5 @@ /* Define SHMLBA. ARM 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SHM_H # error "Never use <bits/shmlba.h> directly; include <sys/shm.h> instead." diff --git a/lib/libc/include/arm-linux-gnueabihf/bits/stat.h b/lib/libc/include/arm-linux-gnueabihf/bits/stat.h index 16336f5ec1..f6c3b7a3fa 100644 --- a/lib/libc/include/arm-linux-gnueabihf/bits/stat.h +++ b/lib/libc/include/arm-linux-gnueabihf/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead." diff --git a/lib/libc/include/arm-linux-gnueabihf/bits/struct_rwlock.h b/lib/libc/include/arm-linux-gnueabihf/bits/struct_rwlock.h new file mode 100644 index 0000000000..f6c7499dab --- /dev/null +++ b/lib/libc/include/arm-linux-gnueabihf/bits/struct_rwlock.h @@ -0,0 +1,61 @@ +/* Default read-write lock implementation struct definitions. + 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef __RWLOCK_INTERNAL_H +#define __RWLOCK_INTERNAL_H + +#include <bits/endian.h> + +/* Generic struct for both POSIX read-write lock. New ports are expected + to use the default layout, however archictetures can redefine it to add + arch-specific extensions (such as lock-elision). The struct have a size + of 32 bytes on both LP32 and LP64 architectures. */ + +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; + /* FLAGS must stay at its position in the structure to maintain + binary compatibility. */ +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned char __pad1; + unsigned char __pad2; + unsigned char __shared; + unsigned char __flags; +#else + unsigned char __flags; + unsigned char __shared; + unsigned char __pad1; + unsigned char __pad2; +#endif + int __cur_writer; +}; + +#if __BYTE_ORDER == __BIG_ENDIAN +# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags, 0 +#else +# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \ + 0, 0, 0, 0, 0, 0, __flags, 0, 0, 0, 0 +#endif + +#endif
\ No newline at end of file diff --git a/lib/libc/include/arm-linux-gnueabihf/bits/wordsize.h b/lib/libc/include/arm-linux-gnueabihf/bits/wordsize.h index 3485a5acf2..f0838f9108 100644 --- a/lib/libc/include/arm-linux-gnueabihf/bits/wordsize.h +++ b/lib/libc/include/arm-linux-gnueabihf/bits/wordsize.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #define __WORDSIZE 32 #define __WORDSIZE_TIME64_COMPAT32 0 diff --git a/lib/libc/include/arm-linux-gnueabihf/fpu_control.h b/lib/libc/include/arm-linux-gnueabihf/fpu_control.h index 9d6c65112e..ad74992218 100644 --- a/lib/libc/include/arm-linux-gnueabihf/fpu_control.h +++ b/lib/libc/include/arm-linux-gnueabihf/fpu_control.h @@ -1,5 +1,5 @@ /* FPU control word definitions. ARM VFP version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FPU_CONTROL_H #define _FPU_CONTROL_H diff --git a/lib/libc/include/arm-linux-gnueabihf/sys/ptrace.h b/lib/libc/include/arm-linux-gnueabihf/sys/ptrace.h index 22d2bb12d4..34be509f32 100644 --- a/lib/libc/include/arm-linux-gnueabihf/sys/ptrace.h +++ b/lib/libc/include/arm-linux-gnueabihf/sys/ptrace.h @@ -1,5 +1,5 @@ /* `ptrace' debugger support interface. Linux/ARM 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. @@ -196,8 +196,12 @@ enum __ptrace_request #define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER /* Get seccomp BPF filter metadata. */ - PTRACE_SECCOMP_GET_METADATA = 0x420d + PTRACE_SECCOMP_GET_METADATA = 0x420d, #define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA + + /* Get information about system call. */ + PTRACE_GET_SYSCALL_INFO = 0x420e +#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO }; diff --git a/lib/libc/include/arm-linux-gnueabihf/sys/ucontext.h b/lib/libc/include/arm-linux-gnueabihf/sys/ucontext.h index 79b51c3f94..53ffc36a6c 100644 --- a/lib/libc/include/arm-linux-gnueabihf/sys/ucontext.h +++ b/lib/libc/include/arm-linux-gnueabihf/sys/ucontext.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* System V/ARM ABI compliant context switching support. */ diff --git a/lib/libc/include/arm-linux-gnueabihf/sys/user.h b/lib/libc/include/arm-linux-gnueabihf/sys/user.h index 4916f5c018..2b901bfba3 100644 --- a/lib/libc/include/arm-linux-gnueabihf/sys/user.h +++ b/lib/libc/include/arm-linux-gnueabihf/sys/user.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_USER_H #define _SYS_USER_H 1 diff --git a/lib/libc/include/armeb-linux-gnueabi/bits/endian.h b/lib/libc/include/armeb-linux-gnueabi/bits/endian.h deleted file mode 100644 index 8325d51253..0000000000 --- a/lib/libc/include/armeb-linux-gnueabi/bits/endian.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef _ENDIAN_H -# error "Never use <bits/endian.h> directly; include <endian.h> instead." -#endif - -/* ARM can be either big or little endian. */ -#ifdef __ARMEB__ -#define __BYTE_ORDER __BIG_ENDIAN -#else -#define __BYTE_ORDER __LITTLE_ENDIAN -#endif
\ No newline at end of file diff --git a/lib/libc/include/armeb-linux-gnueabi/bits/endianness.h b/lib/libc/include/armeb-linux-gnueabi/bits/endianness.h new file mode 100644 index 0000000000..8e938abfb9 --- /dev/null +++ b/lib/libc/include/armeb-linux-gnueabi/bits/endianness.h @@ -0,0 +1,15 @@ +#ifndef _BITS_ENDIANNESS_H +#define _BITS_ENDIANNESS_H 1 + +#ifndef _BITS_ENDIAN_H +# error "Never use <bits/endianness.h> directly; include <endian.h> instead." +#endif + +/* ARM has selectable endianness. */ +#ifdef __ARMEB__ +#define __BYTE_ORDER __BIG_ENDIAN +#else +#define __BYTE_ORDER __LITTLE_ENDIAN +#endif + +#endif /* bits/endianness.h */
\ No newline at end of file diff --git a/lib/libc/include/armeb-linux-gnueabi/bits/fcntl.h b/lib/libc/include/armeb-linux-gnueabi/bits/fcntl.h index 77edfb78fb..fdb169449b 100644 --- a/lib/libc/include/armeb-linux-gnueabi/bits/fcntl.h +++ b/lib/libc/include/armeb-linux-gnueabi/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FCNTL_H # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead." diff --git a/lib/libc/include/armeb-linux-gnueabi/bits/fenv.h b/lib/libc/include/armeb-linux-gnueabi/bits/fenv.h index b8fbba6258..654776420e 100644 --- a/lib/libc/include/armeb-linux-gnueabi/bits/fenv.h +++ b/lib/libc/include/armeb-linux-gnueabi/bits/fenv.h @@ -1,4 +1,4 @@ -/* 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FENV_H # error "Never use <bits/fenv.h> directly; include <fenv.h> instead." @@ -81,7 +81,7 @@ fenv_t; # define FE_NOMASK_ENV ((const fenv_t *) -2) #endif -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) /* Type representing floating-point control modes. */ typedef unsigned int femode_t; diff --git a/lib/libc/include/armeb-linux-gnueabi/bits/floatn.h b/lib/libc/include/armeb-linux-gnueabi/bits/floatn.h index 24852b6800..2900001e82 100644 --- a/lib/libc/include/armeb-linux-gnueabi/bits/floatn.h +++ b/lib/libc/include/armeb-linux-gnueabi/bits/floatn.h @@ -1,5 +1,5 @@ /* Macros to control TS 18661-3 glibc features. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* Defined to 1 if the current compiler invocation provides a floating-point type with the IEEE 754 binary128 format, and this glibc diff --git a/lib/libc/include/armeb-linux-gnueabi/bits/hwcap.h b/lib/libc/include/armeb-linux-gnueabi/bits/hwcap.h index a31befca4e..b626008612 100644 --- a/lib/libc/include/armeb-linux-gnueabi/bits/hwcap.h +++ b/lib/libc/include/armeb-linux-gnueabi/bits/hwcap.h @@ -1,5 +1,5 @@ /* Defines for bits in AT_HWCAP. ARM Linux 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined (_SYS_AUXV_H) && !defined (_LINUX_ARM_SYSDEP_H) # error "Never include <bits/hwcap.h> directly; use <sys/auxv.h> instead." diff --git a/lib/libc/include/armeb-linux-gnueabi/bits/link.h b/lib/libc/include/armeb-linux-gnueabi/bits/link.h index 5dee177ce6..7ebb2785d6 100644 --- a/lib/libc/include/armeb-linux-gnueabi/bits/link.h +++ b/lib/libc/include/armeb-linux-gnueabi/bits/link.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _LINK_H # error "Never include <bits/link.h> directly; use <link.h> instead." diff --git a/lib/libc/include/armeb-linux-gnueabi/bits/long-double.h b/lib/libc/include/armeb-linux-gnueabi/bits/long-double.h index 125807d07a..13e74241e1 100644 --- a/lib/libc/include/armeb-linux-gnueabi/bits/long-double.h +++ b/lib/libc/include/armeb-linux-gnueabi/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* This header is included by <sys/cdefs.h>. @@ -36,4 +36,5 @@ ABI-compatible with double. */ #ifndef __NO_LONG_DOUBLE_MATH # define __NO_LONG_DOUBLE_MATH 1 -#endif
\ No newline at end of file +#endif +#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file diff --git a/lib/libc/include/armeb-linux-gnueabi/bits/procfs-id.h b/lib/libc/include/armeb-linux-gnueabi/bits/procfs-id.h index 35582db16f..48da66726b 100644 --- a/lib/libc/include/armeb-linux-gnueabi/bits/procfs-id.h +++ b/lib/libc/include/armeb-linux-gnueabi/bits/procfs-id.h @@ -1,5 +1,5 @@ /* Types of pr_uid and pr_gid in struct elf_prpsinfo. Arm 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. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PROCFS_H # error "Never include <bits/procfs-id.h> directly; use <sys/procfs.h> instead." diff --git a/lib/libc/include/armeb-linux-gnueabi/bits/procfs.h b/lib/libc/include/armeb-linux-gnueabi/bits/procfs.h index 3e91a588d8..8a92b69bd4 100644 --- a/lib/libc/include/armeb-linux-gnueabi/bits/procfs.h +++ b/lib/libc/include/armeb-linux-gnueabi/bits/procfs.h @@ -1,5 +1,5 @@ /* Types for registers for sys/procfs.h. Arm 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PROCFS_H # error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead." diff --git a/lib/libc/include/armeb-linux-gnueabi/bits/semaphore.h b/lib/libc/include/armeb-linux-gnueabi/bits/semaphore.h index acde20be36..3dd94baf34 100644 --- a/lib/libc/include/armeb-linux-gnueabi/bits/semaphore.h +++ b/lib/libc/include/armeb-linux-gnueabi/bits/semaphore.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SEMAPHORE_H # error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead." diff --git a/lib/libc/include/armeb-linux-gnueabi/bits/setjmp.h b/lib/libc/include/armeb-linux-gnueabi/bits/setjmp.h index 2b50cca982..0912578792 100644 --- a/lib/libc/include/armeb-linux-gnueabi/bits/setjmp.h +++ b/lib/libc/include/armeb-linux-gnueabi/bits/setjmp.h @@ -1,4 +1,4 @@ -/* 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* Define the machine-dependent type `jmp_buf'. ARM EABI version. */ diff --git a/lib/libc/include/armeb-linux-gnueabi/bits/shmlba.h b/lib/libc/include/armeb-linux-gnueabi/bits/shmlba.h index 53ceb23b31..75efb7ce50 100644 --- a/lib/libc/include/armeb-linux-gnueabi/bits/shmlba.h +++ b/lib/libc/include/armeb-linux-gnueabi/bits/shmlba.h @@ -1,5 +1,5 @@ /* Define SHMLBA. ARM 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SHM_H # error "Never use <bits/shmlba.h> directly; include <sys/shm.h> instead." diff --git a/lib/libc/include/armeb-linux-gnueabi/bits/stat.h b/lib/libc/include/armeb-linux-gnueabi/bits/stat.h index 16336f5ec1..f6c3b7a3fa 100644 --- a/lib/libc/include/armeb-linux-gnueabi/bits/stat.h +++ b/lib/libc/include/armeb-linux-gnueabi/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead." diff --git a/lib/libc/include/armeb-linux-gnueabi/bits/struct_rwlock.h b/lib/libc/include/armeb-linux-gnueabi/bits/struct_rwlock.h new file mode 100644 index 0000000000..f6c7499dab --- /dev/null +++ b/lib/libc/include/armeb-linux-gnueabi/bits/struct_rwlock.h @@ -0,0 +1,61 @@ +/* Default read-write lock implementation struct definitions. + 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef __RWLOCK_INTERNAL_H +#define __RWLOCK_INTERNAL_H + +#include <bits/endian.h> + +/* Generic struct for both POSIX read-write lock. New ports are expected + to use the default layout, however archictetures can redefine it to add + arch-specific extensions (such as lock-elision). The struct have a size + of 32 bytes on both LP32 and LP64 architectures. */ + +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; + /* FLAGS must stay at its position in the structure to maintain + binary compatibility. */ +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned char __pad1; + unsigned char __pad2; + unsigned char __shared; + unsigned char __flags; +#else + unsigned char __flags; + unsigned char __shared; + unsigned char __pad1; + unsigned char __pad2; +#endif + int __cur_writer; +}; + +#if __BYTE_ORDER == __BIG_ENDIAN +# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags, 0 +#else +# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \ + 0, 0, 0, 0, 0, 0, __flags, 0, 0, 0, 0 +#endif + +#endif
\ No newline at end of file diff --git a/lib/libc/include/armeb-linux-gnueabi/bits/wordsize.h b/lib/libc/include/armeb-linux-gnueabi/bits/wordsize.h index 3485a5acf2..f0838f9108 100644 --- a/lib/libc/include/armeb-linux-gnueabi/bits/wordsize.h +++ b/lib/libc/include/armeb-linux-gnueabi/bits/wordsize.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #define __WORDSIZE 32 #define __WORDSIZE_TIME64_COMPAT32 0 diff --git a/lib/libc/include/armeb-linux-gnueabi/fpu_control.h b/lib/libc/include/armeb-linux-gnueabi/fpu_control.h index 9d6c65112e..ad74992218 100644 --- a/lib/libc/include/armeb-linux-gnueabi/fpu_control.h +++ b/lib/libc/include/armeb-linux-gnueabi/fpu_control.h @@ -1,5 +1,5 @@ /* FPU control word definitions. ARM VFP version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FPU_CONTROL_H #define _FPU_CONTROL_H diff --git a/lib/libc/include/armeb-linux-gnueabi/sys/ptrace.h b/lib/libc/include/armeb-linux-gnueabi/sys/ptrace.h index 22d2bb12d4..34be509f32 100644 --- a/lib/libc/include/armeb-linux-gnueabi/sys/ptrace.h +++ b/lib/libc/include/armeb-linux-gnueabi/sys/ptrace.h @@ -1,5 +1,5 @@ /* `ptrace' debugger support interface. Linux/ARM 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. @@ -196,8 +196,12 @@ enum __ptrace_request #define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER /* Get seccomp BPF filter metadata. */ - PTRACE_SECCOMP_GET_METADATA = 0x420d + PTRACE_SECCOMP_GET_METADATA = 0x420d, #define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA + + /* Get information about system call. */ + PTRACE_GET_SYSCALL_INFO = 0x420e +#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO }; diff --git a/lib/libc/include/armeb-linux-gnueabi/sys/ucontext.h b/lib/libc/include/armeb-linux-gnueabi/sys/ucontext.h index 79b51c3f94..53ffc36a6c 100644 --- a/lib/libc/include/armeb-linux-gnueabi/sys/ucontext.h +++ b/lib/libc/include/armeb-linux-gnueabi/sys/ucontext.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* System V/ARM ABI compliant context switching support. */ diff --git a/lib/libc/include/armeb-linux-gnueabi/sys/user.h b/lib/libc/include/armeb-linux-gnueabi/sys/user.h index 4916f5c018..2b901bfba3 100644 --- a/lib/libc/include/armeb-linux-gnueabi/sys/user.h +++ b/lib/libc/include/armeb-linux-gnueabi/sys/user.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_USER_H #define _SYS_USER_H 1 diff --git a/lib/libc/include/armeb-linux-gnueabihf/bits/endian.h b/lib/libc/include/armeb-linux-gnueabihf/bits/endian.h deleted file mode 100644 index 8325d51253..0000000000 --- a/lib/libc/include/armeb-linux-gnueabihf/bits/endian.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef _ENDIAN_H -# error "Never use <bits/endian.h> directly; include <endian.h> instead." -#endif - -/* ARM can be either big or little endian. */ -#ifdef __ARMEB__ -#define __BYTE_ORDER __BIG_ENDIAN -#else -#define __BYTE_ORDER __LITTLE_ENDIAN -#endif
\ No newline at end of file diff --git a/lib/libc/include/armeb-linux-gnueabihf/bits/endianness.h b/lib/libc/include/armeb-linux-gnueabihf/bits/endianness.h new file mode 100644 index 0000000000..8e938abfb9 --- /dev/null +++ b/lib/libc/include/armeb-linux-gnueabihf/bits/endianness.h @@ -0,0 +1,15 @@ +#ifndef _BITS_ENDIANNESS_H +#define _BITS_ENDIANNESS_H 1 + +#ifndef _BITS_ENDIAN_H +# error "Never use <bits/endianness.h> directly; include <endian.h> instead." +#endif + +/* ARM has selectable endianness. */ +#ifdef __ARMEB__ +#define __BYTE_ORDER __BIG_ENDIAN +#else +#define __BYTE_ORDER __LITTLE_ENDIAN +#endif + +#endif /* bits/endianness.h */
\ No newline at end of file diff --git a/lib/libc/include/armeb-linux-gnueabihf/bits/fcntl.h b/lib/libc/include/armeb-linux-gnueabihf/bits/fcntl.h index 77edfb78fb..fdb169449b 100644 --- a/lib/libc/include/armeb-linux-gnueabihf/bits/fcntl.h +++ b/lib/libc/include/armeb-linux-gnueabihf/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FCNTL_H # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead." diff --git a/lib/libc/include/armeb-linux-gnueabihf/bits/fenv.h b/lib/libc/include/armeb-linux-gnueabihf/bits/fenv.h index b8fbba6258..654776420e 100644 --- a/lib/libc/include/armeb-linux-gnueabihf/bits/fenv.h +++ b/lib/libc/include/armeb-linux-gnueabihf/bits/fenv.h @@ -1,4 +1,4 @@ -/* 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FENV_H # error "Never use <bits/fenv.h> directly; include <fenv.h> instead." @@ -81,7 +81,7 @@ fenv_t; # define FE_NOMASK_ENV ((const fenv_t *) -2) #endif -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) /* Type representing floating-point control modes. */ typedef unsigned int femode_t; diff --git a/lib/libc/include/armeb-linux-gnueabihf/bits/floatn.h b/lib/libc/include/armeb-linux-gnueabihf/bits/floatn.h index 24852b6800..2900001e82 100644 --- a/lib/libc/include/armeb-linux-gnueabihf/bits/floatn.h +++ b/lib/libc/include/armeb-linux-gnueabihf/bits/floatn.h @@ -1,5 +1,5 @@ /* Macros to control TS 18661-3 glibc features. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* Defined to 1 if the current compiler invocation provides a floating-point type with the IEEE 754 binary128 format, and this glibc diff --git a/lib/libc/include/armeb-linux-gnueabihf/bits/hwcap.h b/lib/libc/include/armeb-linux-gnueabihf/bits/hwcap.h index a31befca4e..b626008612 100644 --- a/lib/libc/include/armeb-linux-gnueabihf/bits/hwcap.h +++ b/lib/libc/include/armeb-linux-gnueabihf/bits/hwcap.h @@ -1,5 +1,5 @@ /* Defines for bits in AT_HWCAP. ARM Linux 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined (_SYS_AUXV_H) && !defined (_LINUX_ARM_SYSDEP_H) # error "Never include <bits/hwcap.h> directly; use <sys/auxv.h> instead." diff --git a/lib/libc/include/armeb-linux-gnueabihf/bits/link.h b/lib/libc/include/armeb-linux-gnueabihf/bits/link.h index 5dee177ce6..7ebb2785d6 100644 --- a/lib/libc/include/armeb-linux-gnueabihf/bits/link.h +++ b/lib/libc/include/armeb-linux-gnueabihf/bits/link.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _LINK_H # error "Never include <bits/link.h> directly; use <link.h> instead." diff --git a/lib/libc/include/armeb-linux-gnueabihf/bits/long-double.h b/lib/libc/include/armeb-linux-gnueabihf/bits/long-double.h index 125807d07a..13e74241e1 100644 --- a/lib/libc/include/armeb-linux-gnueabihf/bits/long-double.h +++ b/lib/libc/include/armeb-linux-gnueabihf/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* This header is included by <sys/cdefs.h>. @@ -36,4 +36,5 @@ ABI-compatible with double. */ #ifndef __NO_LONG_DOUBLE_MATH # define __NO_LONG_DOUBLE_MATH 1 -#endif
\ No newline at end of file +#endif +#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file diff --git a/lib/libc/include/armeb-linux-gnueabihf/bits/procfs-id.h b/lib/libc/include/armeb-linux-gnueabihf/bits/procfs-id.h index 35582db16f..48da66726b 100644 --- a/lib/libc/include/armeb-linux-gnueabihf/bits/procfs-id.h +++ b/lib/libc/include/armeb-linux-gnueabihf/bits/procfs-id.h @@ -1,5 +1,5 @@ /* Types of pr_uid and pr_gid in struct elf_prpsinfo. Arm 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. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PROCFS_H # error "Never include <bits/procfs-id.h> directly; use <sys/procfs.h> instead." diff --git a/lib/libc/include/armeb-linux-gnueabihf/bits/procfs.h b/lib/libc/include/armeb-linux-gnueabihf/bits/procfs.h index 3e91a588d8..8a92b69bd4 100644 --- a/lib/libc/include/armeb-linux-gnueabihf/bits/procfs.h +++ b/lib/libc/include/armeb-linux-gnueabihf/bits/procfs.h @@ -1,5 +1,5 @@ /* Types for registers for sys/procfs.h. Arm 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PROCFS_H # error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead." diff --git a/lib/libc/include/armeb-linux-gnueabihf/bits/semaphore.h b/lib/libc/include/armeb-linux-gnueabihf/bits/semaphore.h index acde20be36..3dd94baf34 100644 --- a/lib/libc/include/armeb-linux-gnueabihf/bits/semaphore.h +++ b/lib/libc/include/armeb-linux-gnueabihf/bits/semaphore.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SEMAPHORE_H # error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead." diff --git a/lib/libc/include/armeb-linux-gnueabihf/bits/setjmp.h b/lib/libc/include/armeb-linux-gnueabihf/bits/setjmp.h index 2b50cca982..0912578792 100644 --- a/lib/libc/include/armeb-linux-gnueabihf/bits/setjmp.h +++ b/lib/libc/include/armeb-linux-gnueabihf/bits/setjmp.h @@ -1,4 +1,4 @@ -/* 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* Define the machine-dependent type `jmp_buf'. ARM EABI version. */ diff --git a/lib/libc/include/armeb-linux-gnueabihf/bits/shmlba.h b/lib/libc/include/armeb-linux-gnueabihf/bits/shmlba.h index 53ceb23b31..75efb7ce50 100644 --- a/lib/libc/include/armeb-linux-gnueabihf/bits/shmlba.h +++ b/lib/libc/include/armeb-linux-gnueabihf/bits/shmlba.h @@ -1,5 +1,5 @@ /* Define SHMLBA. ARM 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SHM_H # error "Never use <bits/shmlba.h> directly; include <sys/shm.h> instead." diff --git a/lib/libc/include/armeb-linux-gnueabihf/bits/stat.h b/lib/libc/include/armeb-linux-gnueabihf/bits/stat.h index 16336f5ec1..f6c3b7a3fa 100644 --- a/lib/libc/include/armeb-linux-gnueabihf/bits/stat.h +++ b/lib/libc/include/armeb-linux-gnueabihf/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead." diff --git a/lib/libc/include/armeb-linux-gnueabihf/bits/struct_rwlock.h b/lib/libc/include/armeb-linux-gnueabihf/bits/struct_rwlock.h new file mode 100644 index 0000000000..f6c7499dab --- /dev/null +++ b/lib/libc/include/armeb-linux-gnueabihf/bits/struct_rwlock.h @@ -0,0 +1,61 @@ +/* Default read-write lock implementation struct definitions. + 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef __RWLOCK_INTERNAL_H +#define __RWLOCK_INTERNAL_H + +#include <bits/endian.h> + +/* Generic struct for both POSIX read-write lock. New ports are expected + to use the default layout, however archictetures can redefine it to add + arch-specific extensions (such as lock-elision). The struct have a size + of 32 bytes on both LP32 and LP64 architectures. */ + +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; + /* FLAGS must stay at its position in the structure to maintain + binary compatibility. */ +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned char __pad1; + unsigned char __pad2; + unsigned char __shared; + unsigned char __flags; +#else + unsigned char __flags; + unsigned char __shared; + unsigned char __pad1; + unsigned char __pad2; +#endif + int __cur_writer; +}; + +#if __BYTE_ORDER == __BIG_ENDIAN +# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags, 0 +#else +# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \ + 0, 0, 0, 0, 0, 0, __flags, 0, 0, 0, 0 +#endif + +#endif
\ No newline at end of file diff --git a/lib/libc/include/armeb-linux-gnueabihf/bits/wordsize.h b/lib/libc/include/armeb-linux-gnueabihf/bits/wordsize.h index 3485a5acf2..f0838f9108 100644 --- a/lib/libc/include/armeb-linux-gnueabihf/bits/wordsize.h +++ b/lib/libc/include/armeb-linux-gnueabihf/bits/wordsize.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #define __WORDSIZE 32 #define __WORDSIZE_TIME64_COMPAT32 0 diff --git a/lib/libc/include/armeb-linux-gnueabihf/fpu_control.h b/lib/libc/include/armeb-linux-gnueabihf/fpu_control.h index 9d6c65112e..ad74992218 100644 --- a/lib/libc/include/armeb-linux-gnueabihf/fpu_control.h +++ b/lib/libc/include/armeb-linux-gnueabihf/fpu_control.h @@ -1,5 +1,5 @@ /* FPU control word definitions. ARM VFP version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FPU_CONTROL_H #define _FPU_CONTROL_H diff --git a/lib/libc/include/armeb-linux-gnueabihf/sys/ptrace.h b/lib/libc/include/armeb-linux-gnueabihf/sys/ptrace.h index 22d2bb12d4..34be509f32 100644 --- a/lib/libc/include/armeb-linux-gnueabihf/sys/ptrace.h +++ b/lib/libc/include/armeb-linux-gnueabihf/sys/ptrace.h @@ -1,5 +1,5 @@ /* `ptrace' debugger support interface. Linux/ARM 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. @@ -196,8 +196,12 @@ enum __ptrace_request #define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER /* Get seccomp BPF filter metadata. */ - PTRACE_SECCOMP_GET_METADATA = 0x420d + PTRACE_SECCOMP_GET_METADATA = 0x420d, #define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA + + /* Get information about system call. */ + PTRACE_GET_SYSCALL_INFO = 0x420e +#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO }; diff --git a/lib/libc/include/armeb-linux-gnueabihf/sys/ucontext.h b/lib/libc/include/armeb-linux-gnueabihf/sys/ucontext.h index 79b51c3f94..53ffc36a6c 100644 --- a/lib/libc/include/armeb-linux-gnueabihf/sys/ucontext.h +++ b/lib/libc/include/armeb-linux-gnueabihf/sys/ucontext.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* System V/ARM ABI compliant context switching support. */ diff --git a/lib/libc/include/armeb-linux-gnueabihf/sys/user.h b/lib/libc/include/armeb-linux-gnueabihf/sys/user.h index 4916f5c018..2b901bfba3 100644 --- a/lib/libc/include/armeb-linux-gnueabihf/sys/user.h +++ b/lib/libc/include/armeb-linux-gnueabihf/sys/user.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_USER_H #define _SYS_USER_H 1 diff --git a/lib/libc/include/generic-glibc/aio.h b/lib/libc/include/generic-glibc/aio.h index ed7b8bb86f..7028917727 100644 --- a/lib/libc/include/generic-glibc/aio.h +++ b/lib/libc/include/generic-glibc/aio.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * ISO/IEC 9945-1:1996 6.7: Asynchronous Input and Output diff --git a/lib/libc/include/generic-glibc/aliases.h b/lib/libc/include/generic-glibc/aliases.h index a671290051..ead8562ace 100644 --- a/lib/libc/include/generic-glibc/aliases.h +++ b/lib/libc/include/generic-glibc/aliases.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _ALIASES_H #define _ALIASES_H 1 diff --git a/lib/libc/include/generic-glibc/alloca.h b/lib/libc/include/generic-glibc/alloca.h index a1b60a3dbd..9e8a986743 100644 --- a/lib/libc/include/generic-glibc/alloca.h +++ b/lib/libc/include/generic-glibc/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _ALLOCA_H #define _ALLOCA_H 1 diff --git a/lib/libc/include/generic-glibc/ar.h b/lib/libc/include/generic-glibc/ar.h index d9aa7daad6..5accd0cf2d 100644 --- a/lib/libc/include/generic-glibc/ar.h +++ b/lib/libc/include/generic-glibc/ar.h @@ -1,5 +1,5 @@ /* Header describing `ar' archive file format. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _AR_H #define _AR_H 1 diff --git a/lib/libc/include/generic-glibc/argp.h b/lib/libc/include/generic-glibc/argp.h index ce61b300f4..0bb8d732f5 100644 --- a/lib/libc/include/generic-glibc/argp.h +++ b/lib/libc/include/generic-glibc/argp.h @@ -1,5 +1,5 @@ /* Hierarchial argument parsing, layered over getopt. - 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. Written by Miles Bader <miles@gnu.ai.mit.edu>. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _ARGP_H #define _ARGP_H diff --git a/lib/libc/include/generic-glibc/argz.h b/lib/libc/include/generic-glibc/argz.h index c880c8bded..d7a265c2a5 100644 --- a/lib/libc/include/generic-glibc/argz.h +++ b/lib/libc/include/generic-glibc/argz.h @@ -1,5 +1,5 @@ /* Routines for dealing with '\0' separated arg vectors. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _ARGZ_H #define _ARGZ_H 1 diff --git a/lib/libc/include/generic-glibc/arpa/inet.h b/lib/libc/include/generic-glibc/arpa/inet.h index 580ec2e668..7b83e763cc 100644 --- a/lib/libc/include/generic-glibc/arpa/inet.h +++ b/lib/libc/include/generic-glibc/arpa/inet.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _ARPA_INET_H #define _ARPA_INET_H 1 diff --git a/lib/libc/include/generic-glibc/assert.h b/lib/libc/include/generic-glibc/assert.h index 0a249c7d7c..14aa2f9e21 100644 --- a/lib/libc/include/generic-glibc/assert.h +++ b/lib/libc/include/generic-glibc/assert.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * ISO C99 Standard: 7.2 Diagnostics <assert.h> diff --git a/lib/libc/include/generic-glibc/bits/argp-ldbl.h b/lib/libc/include/generic-glibc/bits/argp-ldbl.h index 2dc1602b62..2cf222648f 100644 --- a/lib/libc/include/generic-glibc/bits/argp-ldbl.h +++ b/lib/libc/include/generic-glibc/bits/argp-ldbl.h @@ -1,5 +1,5 @@ /* Redirections for argp functions for -mlong-double-64. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _ARGP_H # error "Never include <bits/argp-ldbl.h> directly; use <argp.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/byteswap.h b/lib/libc/include/generic-glibc/bits/byteswap.h index a4052e4506..2c854c625a 100644 --- a/lib/libc/include/generic-glibc/bits/byteswap.h +++ b/lib/libc/include/generic-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _BYTESWAP_H && !defined _NETINET_IN_H && !defined _ENDIAN_H # error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/cmathcalls.h b/lib/libc/include/generic-glibc/bits/cmathcalls.h index 2904cff060..ed604e0fda 100644 --- a/lib/libc/include/generic-glibc/bits/cmathcalls.h +++ b/lib/libc/include/generic-glibc/bits/cmathcalls.h @@ -1,6 +1,6 @@ /* Prototype declarations for complex math functions; helper file for <complex.h>. - 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* NOTE: Because of the special way this file is used by <complex.h>, this file must NOT be protected from multiple inclusion as header files diff --git a/lib/libc/include/generic-glibc/bits/confname.h b/lib/libc/include/generic-glibc/bits/confname.h index 620c912e25..710a92730f 100644 --- a/lib/libc/include/generic-glibc/bits/confname.h +++ b/lib/libc/include/generic-glibc/bits/confname.h @@ -1,5 +1,5 @@ /* `sysconf', `pathconf', and `confstr' NAME values. Generic version. - 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. 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _UNISTD_H # error "Never use <bits/confname.h> directly; include <unistd.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/cpu-set.h b/lib/libc/include/generic-glibc/bits/cpu-set.h index 155f967827..a8bd65bae1 100644 --- a/lib/libc/include/generic-glibc/bits/cpu-set.h +++ b/lib/libc/include/generic-glibc/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_CPU_SET_H #define _BITS_CPU_SET_H 1 diff --git a/lib/libc/include/generic-glibc/bits/dirent.h b/lib/libc/include/generic-glibc/bits/dirent.h index d35853ce22..a18b453fd3 100644 --- a/lib/libc/include/generic-glibc/bits/dirent.h +++ b/lib/libc/include/generic-glibc/bits/dirent.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _DIRENT_H # error "Never use <bits/dirent.h> directly; include <dirent.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/dirent_ext.h b/lib/libc/include/generic-glibc/bits/dirent_ext.h index fd2a6ebfde..f5c3fb34fd 100644 --- a/lib/libc/include/generic-glibc/bits/dirent_ext.h +++ b/lib/libc/include/generic-glibc/bits/dirent_ext.h @@ -1,5 +1,5 @@ /* System-specific extensions of <dirent.h>. 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _DIRENT_H # error "Never include <bits/dirent_ext.h> directly; use <dirent.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/dlfcn.h b/lib/libc/include/generic-glibc/bits/dlfcn.h index 8a4e679bf5..8339ace845 100644 --- a/lib/libc/include/generic-glibc/bits/dlfcn.h +++ b/lib/libc/include/generic-glibc/bits/dlfcn.h @@ -1,5 +1,5 @@ /* System dependent definitions for run-time dynamic loading. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _DLFCN_H # error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/endian.h b/lib/libc/include/generic-glibc/bits/endian.h index 44b05652f1..dae5221e81 100644 --- a/lib/libc/include/generic-glibc/bits/endian.h +++ b/lib/libc/include/generic-glibc/bits/endian.h @@ -1,15 +1,49 @@ -/* 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. */ +/* Endian macros for string.h functions + Copyright (C) 1992-2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. -#ifndef _ENDIAN_H -# error "Never use <bits/endian.h> directly; include <endian.h> instead." + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _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 <bits/endianness.h> + +/* 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 __MIPSEB -# define __BYTE_ORDER __BIG_ENDIAN +#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 -#ifdef __MIPSEL -# define __BYTE_ORDER __LITTLE_ENDIAN -#endif
\ No newline at end of file + +#endif /* bits/endian.h */
\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/endianness.h b/lib/libc/include/generic-glibc/bits/endianness.h new file mode 100644 index 0000000000..5a0a871460 --- /dev/null +++ b/lib/libc/include/generic-glibc/bits/endianness.h @@ -0,0 +1,16 @@ +#ifndef _BITS_ENDIANNESS_H +#define _BITS_ENDIANNESS_H 1 + +#ifndef _BITS_ENDIAN_H +# error "Never use <bits/endianness.h> directly; include <endian.h> 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 */
\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/environments.h b/lib/libc/include/generic-glibc/bits/environments.h index 28a2f5f220..1b5e74a08e 100644 --- a/lib/libc/include/generic-glibc/bits/environments.h +++ b/lib/libc/include/generic-glibc/bits/environments.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _UNISTD_H # error "Never include this file directly. Use <unistd.h> instead" diff --git a/lib/libc/include/generic-glibc/bits/epoll.h b/lib/libc/include/generic-glibc/bits/epoll.h index d20c2e4c0f..6d92d7ce11 100644 --- a/lib/libc/include/generic-glibc/bits/epoll.h +++ b/lib/libc/include/generic-glibc/bits/epoll.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_EPOLL_H # error "Never use <bits/epoll.h> directly; include <sys/epoll.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/err-ldbl.h b/lib/libc/include/generic-glibc/bits/err-ldbl.h index 3f962597a3..7c928e438b 100644 --- a/lib/libc/include/generic-glibc/bits/err-ldbl.h +++ b/lib/libc/include/generic-glibc/bits/err-ldbl.h @@ -1,5 +1,5 @@ /* Redirections for err.h functions for -mlong-double-64. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _ERR_H # error "Never include <bits/err-ldbl.h> directly; use <err.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/errno.h b/lib/libc/include/generic-glibc/bits/errno.h index 301cd0e35e..1bee63136a 100644 --- a/lib/libc/include/generic-glibc/bits/errno.h +++ b/lib/libc/include/generic-glibc/bits/errno.h @@ -1,5 +1,5 @@ /* Error constants. Linux specific 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_ERRNO_H #define _BITS_ERRNO_H 1 diff --git a/lib/libc/include/generic-glibc/bits/error-ldbl.h b/lib/libc/include/generic-glibc/bits/error-ldbl.h index 601c708686..9962b3226e 100644 --- a/lib/libc/include/generic-glibc/bits/error-ldbl.h +++ b/lib/libc/include/generic-glibc/bits/error-ldbl.h @@ -1,5 +1,5 @@ /* Redirections for error.h functions for -mlong-double-64. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _ERROR_H # error "Never include <bits/error-ldbl.h> directly; use <error.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/error.h b/lib/libc/include/generic-glibc/bits/error.h index cf3ef0b0de..3189e24da8 100644 --- a/lib/libc/include/generic-glibc/bits/error.h +++ b/lib/libc/include/generic-glibc/bits/error.h @@ -1,5 +1,5 @@ /* Specializations for error functions. - Copyright (C) 2007-2019 Free Software Foundation, Inc. + Copyright (C) 2007-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _ERROR_H # error "Never include <bits/error.h> directly; use <error.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/eventfd.h b/lib/libc/include/generic-glibc/bits/eventfd.h index 9922a3d99d..0fb055c37c 100644 --- a/lib/libc/include/generic-glibc/bits/eventfd.h +++ b/lib/libc/include/generic-glibc/bits/eventfd.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2019 Free Software Foundation, Inc. +/* Copyright (C) 2007-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_EVENTFD_H # error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/fcntl-linux.h b/lib/libc/include/generic-glibc/bits/fcntl-linux.h index 869be9f8ab..4e3813d8c4 100644 --- a/lib/libc/include/generic-glibc/bits/fcntl-linux.h +++ b/lib/libc/include/generic-glibc/bits/fcntl-linux.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FCNTL_H # error "Never use <bits/fcntl-linux.h> directly; include <fcntl.h> instead." @@ -334,6 +334,11 @@ struct f_owner_ex # define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in the range after performing the write. */ +/* SYNC_FILE_RANGE_WRITE_AND_WAIT ensures all pages in the range are + written to disk before returning. */ +# define SYNC_FILE_RANGE_WRITE_AND_WAIT (SYNC_FILE_RANGE_WRITE \ + | SYNC_FILE_RANGE_WAIT_BEFORE \ + | SYNC_FILE_RANGE_WAIT_AFTER) /* Flags for SPLICE and VMSPLICE. */ # define SPLICE_F_MOVE 1 /* Move pages instead of copying. */ diff --git a/lib/libc/include/generic-glibc/bits/fcntl.h b/lib/libc/include/generic-glibc/bits/fcntl.h index 9a0318a81a..b9fa29e200 100644 --- a/lib/libc/include/generic-glibc/bits/fcntl.h +++ b/lib/libc/include/generic-glibc/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FCNTL_H # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/fcntl2.h b/lib/libc/include/generic-glibc/bits/fcntl2.h index a152158a74..800012c354 100644 --- a/lib/libc/include/generic-glibc/bits/fcntl2.h +++ b/lib/libc/include/generic-glibc/bits/fcntl2.h @@ -1,5 +1,5 @@ /* Checking macros for fcntl functions. - Copyright (C) 2007-2019 Free Software Foundation, Inc. + Copyright (C) 2007-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FCNTL_H # error "Never include <bits/fcntl2.h> directly; use <fcntl.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/fenv.h b/lib/libc/include/generic-glibc/bits/fenv.h index ea132417bf..cdf79211de 100644 --- a/lib/libc/include/generic-glibc/bits/fenv.h +++ b/lib/libc/include/generic-glibc/bits/fenv.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FENV_H # error "Never use <bits/fenv.h> directly; include <fenv.h> instead." @@ -104,7 +104,7 @@ fenv_t; # define FE_NOMASK_ENV ((const fenv_t *) -2) #endif -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) /* Type representing floating-point control modes. */ typedef unsigned int femode_t; diff --git a/lib/libc/include/generic-glibc/bits/floatn-common.h b/lib/libc/include/generic-glibc/bits/floatn-common.h index 9ad81abbfb..9cccf45064 100644 --- a/lib/libc/include/generic-glibc/bits/floatn-common.h +++ b/lib/libc/include/generic-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_FLOATN_COMMON_H #define _BITS_FLOATN_COMMON_H diff --git a/lib/libc/include/generic-glibc/bits/floatn.h b/lib/libc/include/generic-glibc/bits/floatn.h index 10e11d2573..68a17ab2c7 100644 --- a/lib/libc/include/generic-glibc/bits/floatn.h +++ b/lib/libc/include/generic-glibc/bits/floatn.h @@ -1,5 +1,5 @@ /* Macros to control TS 18661-3 glibc features on MIPS 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_FLOATN_H #define _BITS_FLOATN_H diff --git a/lib/libc/include/generic-glibc/bits/flt-eval-method.h b/lib/libc/include/generic-glibc/bits/flt-eval-method.h index 62def2881d..11297d9c17 100644 --- a/lib/libc/include/generic-glibc/bits/flt-eval-method.h +++ b/lib/libc/include/generic-glibc/bits/flt-eval-method.h @@ -1,5 +1,5 @@ /* Define __GLIBC_FLT_EVAL_METHOD. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _MATH_H # error "Never use <bits/flt-eval-method.h> directly; include <math.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/fp-fast.h b/lib/libc/include/generic-glibc/bits/fp-fast.h index 6d7cddf1d2..5fceb7e29a 100644 --- a/lib/libc/include/generic-glibc/bits/fp-fast.h +++ b/lib/libc/include/generic-glibc/bits/fp-fast.h @@ -1,5 +1,5 @@ /* Define FP_FAST_* macros. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _MATH_H # error "Never use <bits/fp-fast.h> directly; include <math.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/fp-logb.h b/lib/libc/include/generic-glibc/bits/fp-logb.h index ffbdcb2edc..efc488bc27 100644 --- a/lib/libc/include/generic-glibc/bits/fp-logb.h +++ b/lib/libc/include/generic-glibc/bits/fp-logb.h @@ -1,5 +1,5 @@ /* Define __FP_LOGB0_IS_MIN and __FP_LOGBNAN_IS_MIN. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _MATH_H # error "Never use <bits/fp-logb.h> directly; include <math.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/getopt_core.h b/lib/libc/include/generic-glibc/bits/getopt_core.h index 5973daf49b..c509e0e328 100644 --- a/lib/libc/include/generic-glibc/bits/getopt_core.h +++ b/lib/libc/include/generic-glibc/bits/getopt_core.h @@ -1,5 +1,5 @@ /* Declarations for getopt (basic, portable features only). - Copyright (C) 1989-2019 Free Software Foundation, Inc. + Copyright (C) 1989-2020 Free Software Foundation, Inc. This file is part of the GNU C Library and is also part of gnulib. Patches to this file should be submitted to both projects. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _GETOPT_CORE_H #define _GETOPT_CORE_H 1 diff --git a/lib/libc/include/generic-glibc/bits/getopt_ext.h b/lib/libc/include/generic-glibc/bits/getopt_ext.h index 648b6004bc..7d6a578db9 100644 --- a/lib/libc/include/generic-glibc/bits/getopt_ext.h +++ b/lib/libc/include/generic-glibc/bits/getopt_ext.h @@ -1,5 +1,5 @@ /* Declarations for getopt (GNU extensions). - Copyright (C) 1989-2019 Free Software Foundation, Inc. + Copyright (C) 1989-2020 Free Software Foundation, Inc. This file is part of the GNU C Library and is also part of gnulib. Patches to this file should be submitted to both projects. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _GETOPT_EXT_H #define _GETOPT_EXT_H 1 diff --git a/lib/libc/include/generic-glibc/bits/getopt_posix.h b/lib/libc/include/generic-glibc/bits/getopt_posix.h index 197a48e4fd..322dc96daf 100644 --- a/lib/libc/include/generic-glibc/bits/getopt_posix.h +++ b/lib/libc/include/generic-glibc/bits/getopt_posix.h @@ -1,5 +1,5 @@ /* Declarations for getopt (POSIX compatibility shim). - Copyright (C) 1989-2019 Free Software Foundation, Inc. + Copyright (C) 1989-2020 Free Software Foundation, Inc. Unlike the bulk of the getopt implementation, this file is NOT part of gnulib. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _GETOPT_POSIX_H #define _GETOPT_POSIX_H 1 diff --git a/lib/libc/include/generic-glibc/bits/hwcap.h b/lib/libc/include/generic-glibc/bits/hwcap.h index 8be095a364..0d01bf6514 100644 --- a/lib/libc/include/generic-glibc/bits/hwcap.h +++ b/lib/libc/include/generic-glibc/bits/hwcap.h @@ -1,5 +1,5 @@ /* Defines for bits in AT_HWCAP. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_AUXV_H # error "Never include <bits/hwcap.h> directly; use <sys/auxv.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/in.h b/lib/libc/include/generic-glibc/bits/in.h index 08757c8eab..654c5adabe 100644 --- a/lib/libc/include/generic-glibc/bits/in.h +++ b/lib/libc/include/generic-glibc/bits/in.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* Linux version. */ diff --git a/lib/libc/include/generic-glibc/bits/indirect-return.h b/lib/libc/include/generic-glibc/bits/indirect-return.h index 5557372427..5a7beddda9 100644 --- a/lib/libc/include/generic-glibc/bits/indirect-return.h +++ b/lib/libc/include/generic-glibc/bits/indirect-return.h @@ -1,5 +1,5 @@ /* Definition of __INDIRECT_RETURN. 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _UCONTEXT_H # error "Never include <bits/indirect-return.h> directly; use <ucontext.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/inotify.h b/lib/libc/include/generic-glibc/bits/inotify.h index 76cd436251..e019e25212 100644 --- a/lib/libc/include/generic-glibc/bits/inotify.h +++ b/lib/libc/include/generic-glibc/bits/inotify.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_INOTIFY_H # error "Never use <bits/inotify.h> directly; include <sys/inotify.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/ioctl-types.h b/lib/libc/include/generic-glibc/bits/ioctl-types.h index 4ac9ac39ed..876311a6ce 100644 --- a/lib/libc/include/generic-glibc/bits/ioctl-types.h +++ b/lib/libc/include/generic-glibc/bits/ioctl-types.h @@ -1,5 +1,5 @@ /* Structure types for pre-termios terminal ioctls. Linux 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_IOCTL_H # error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/ioctls.h b/lib/libc/include/generic-glibc/bits/ioctls.h index 31b6ea7939..790e50b7fa 100644 --- a/lib/libc/include/generic-glibc/bits/ioctls.h +++ b/lib/libc/include/generic-glibc/bits/ioctls.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_IOCTL_H # error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/ipc-perm.h b/lib/libc/include/generic-glibc/bits/ipc-perm.h new file mode 100644 index 0000000000..295a0ea3cf --- /dev/null +++ b/lib/libc/include/generic-glibc/bits/ipc-perm.h @@ -0,0 +1,40 @@ +/* struct ipc_perm definition. + 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _SYS_IPC_H +# error "Never use <bits/ipc-perm.h> directly; include <sys/ipc.h> instead." +#endif + +/* Data structure used to pass permission information to IPC operations. + It follows the kernel ipc64_perm size so the syscall can be made directly + without temporary buffer copy. However, since glibc defines the MODE + field as mode_t per POSIX definition (BZ#18231), it omits the __PAD1 field + (since glibc does not export mode_t as 16-bit for any architecture). */ +struct ipc_perm +{ + __key_t __key; /* Key. */ + __uid_t uid; /* Owner's user ID. */ + __gid_t gid; /* Owner's group ID. */ + __uid_t cuid; /* Creator's user ID. */ + __gid_t cgid; /* Creator's group ID. */ + __mode_t mode; /* Read/write permission. */ + unsigned short int __seq; /* Sequence number. */ + unsigned short int __pad2; + __syscall_ulong_t __glibc_reserved1; + __syscall_ulong_t __glibc_reserved2; +};
\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/ipc.h b/lib/libc/include/generic-glibc/bits/ipc.h index e133bcfa70..714f766b29 100644 --- a/lib/libc/include/generic-glibc/bits/ipc.h +++ b/lib/libc/include/generic-glibc/bits/ipc.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_IPC_H # error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead." @@ -37,19 +37,4 @@ /* Special key values. */ #define IPC_PRIVATE ((__key_t) 0) /* Private key. */ - -/* Data structure used to pass permission information to IPC operations. */ -struct ipc_perm - { - __key_t __key; /* Key. */ - __uid_t uid; /* Owner's user ID. */ - __gid_t gid; /* Owner's group ID. */ - __uid_t cuid; /* Creator's user ID. */ - __gid_t cgid; /* Creator's group ID. */ - unsigned short int mode; /* Read/write permission. */ - unsigned short int __pad1; - unsigned short int __seq; /* Sequence number. */ - unsigned short int __pad2; - __syscall_ulong_t __glibc_reserved1; - __syscall_ulong_t __glibc_reserved2; - };
\ No newline at end of file +#include <bits/ipc-perm.h>
\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/ipctypes.h b/lib/libc/include/generic-glibc/bits/ipctypes.h index 1b09d14f83..2fce70dab0 100644 --- a/lib/libc/include/generic-glibc/bits/ipctypes.h +++ b/lib/libc/include/generic-glibc/bits/ipctypes.h @@ -1,5 +1,5 @@ /* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. Generic. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * Never include <bits/ipctypes.h> directly. diff --git a/lib/libc/include/generic-glibc/bits/iscanonical.h b/lib/libc/include/generic-glibc/bits/iscanonical.h index 3e73628588..446a24d01b 100644 --- a/lib/libc/include/generic-glibc/bits/iscanonical.h +++ b/lib/libc/include/generic-glibc/bits/iscanonical.h @@ -1,5 +1,5 @@ /* Define iscanonical macro. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _MATH_H # error "Never use <bits/iscanonical.h> directly; include <math.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/libc-header-start.h b/lib/libc/include/generic-glibc/bits/libc-header-start.h index 5b216b35c2..ddc705f0f2 100644 --- a/lib/libc/include/generic-glibc/bits/libc-header-start.h +++ b/lib/libc/include/generic-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* 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/include/generic-glibc/bits/libm-simd-decl-stubs.h b/lib/libc/include/generic-glibc/bits/libm-simd-decl-stubs.h index 8fef08aaa4..f49d3ddb62 100644 --- a/lib/libc/include/generic-glibc/bits/libm-simd-decl-stubs.h +++ b/lib/libc/include/generic-glibc/bits/libm-simd-decl-stubs.h @@ -1,5 +1,5 @@ /* Empty definitions required for __MATHCALL_VEC unfolding in mathcalls.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _MATH_H # error "Never include <bits/libm-simd-decl-stubs.h> directly;\ diff --git a/lib/libc/include/generic-glibc/bits/link.h b/lib/libc/include/generic-glibc/bits/link.h index a497f46212..9fc3255bf9 100644 --- a/lib/libc/include/generic-glibc/bits/link.h +++ b/lib/libc/include/generic-glibc/bits/link.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _LINK_H # error "Never include <bits/link.h> directly; use <link.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/local_lim.h b/lib/libc/include/generic-glibc/bits/local_lim.h index 7e7c583b72..c29492034c 100644 --- a/lib/libc/include/generic-glibc/bits/local_lim.h +++ b/lib/libc/include/generic-glibc/bits/local_lim.h @@ -1,5 +1,5 @@ /* Minimum guaranteed maximum values for system limits. Linux version. - 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. 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 <http://www.gnu.org/licenses/>. */ + not, see <https://www.gnu.org/licenses/>. */ /* The kernel header pollutes the namespace with the NR_OPEN symbol and defines LINK_MAX although filesystems have different maxima. A diff --git a/lib/libc/include/generic-glibc/bits/locale.h b/lib/libc/include/generic-glibc/bits/locale.h index 0e95b24b4f..e2b34ee888 100644 --- a/lib/libc/include/generic-glibc/bits/locale.h +++ b/lib/libc/include/generic-glibc/bits/locale.h @@ -1,5 +1,5 @@ /* Definition of locale category symbol values. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _LOCALE_H && !defined _LANGINFO_H # error "Never use <bits/locale.h> directly; include <locale.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/long-double.h b/lib/libc/include/generic-glibc/bits/long-double.h index 25f7f7637a..27339ff440 100644 --- a/lib/libc/include/generic-glibc/bits/long-double.h +++ b/lib/libc/include/generic-glibc/bits/long-double.h @@ -1,5 +1,5 @@ /* Properties of long double type. MIPS version. - 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,10 +14,11 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sgidefs.h> #if !defined __NO_LONG_DOUBLE_MATH && _MIPS_SIM == _ABIO32 # define __NO_LONG_DOUBLE_MATH 1 -#endif
\ No newline at end of file +#endif +#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/math-finite.h b/lib/libc/include/generic-glibc/bits/math-finite.h deleted file mode 100644 index 1e13b849f8..0000000000 --- a/lib/libc/include/generic-glibc/bits/math-finite.h +++ /dev/null @@ -1,197 +0,0 @@ -/* Entry points to finite-math-only compiler runs. - Copyright (C) 2011-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 - <http://www.gnu.org/licenses/>. */ - -#ifndef _MATH_H -# error "Never use <bits/math-finite.h> directly; include <math.h> instead." -#endif - -#define __REDIRFROM(...) __REDIRFROM_X(__VA_ARGS__) - -#define __REDIRTO(...) __REDIRTO_X(__VA_ARGS__) - -#define __MATH_REDIRCALL_X(from, args, to) \ - extern _Mdouble_ __REDIRECT_NTH (from, args, to) -#define __MATH_REDIRCALL(function, reentrant, args) \ - __MATH_REDIRCALL_X \ - (__REDIRFROM (function, reentrant), args, \ - __REDIRTO (function, reentrant)) -#define __MATH_REDIRCALL_2(from, reentrant, args, to) \ - __MATH_REDIRCALL_X \ - (__REDIRFROM (from, reentrant), args, \ - __REDIRTO (to, reentrant)) - -#define __MATH_REDIRCALL_INTERNAL(function, reentrant, args) \ - __MATH_REDIRCALL_X \ - (__REDIRFROM (__CONCAT (__, function), \ - __CONCAT (reentrant, _finite)), \ - args, __REDIRTO (function, _r)) - - -/* acos. */ -__MATH_REDIRCALL (acos, , (_Mdouble_)); - -#if defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 -/* acosh. */ -__MATH_REDIRCALL (acosh, , (_Mdouble_)); -#endif - -/* asin. */ -__MATH_REDIRCALL (asin, , (_Mdouble_)); - -/* atan2. */ -__MATH_REDIRCALL (atan2, , (_Mdouble_, _Mdouble_)); - -#if defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 -/* atanh. */ -__MATH_REDIRCALL (atanh, , (_Mdouble_)); -#endif - -/* cosh. */ -__MATH_REDIRCALL (cosh, , (_Mdouble_)); - -/* exp. */ -__MATH_REDIRCALL (exp, , (_Mdouble_)); - -#if __GLIBC_USE (IEC_60559_FUNCS_EXT) -/* exp10. */ -__MATH_REDIRCALL (exp10, , (_Mdouble_)); -#endif - -#ifdef __USE_ISOC99 -/* exp2. */ -__MATH_REDIRCALL (exp2, , (_Mdouble_)); -#endif - -/* fmod. */ -__MATH_REDIRCALL (fmod, , (_Mdouble_, _Mdouble_)); - -#if defined __USE_XOPEN || defined __USE_ISOC99 -/* hypot. */ -__MATH_REDIRCALL (hypot, , (_Mdouble_, _Mdouble_)); -#endif - -#if (__MATH_DECLARING_DOUBLE && (defined __USE_MISC || defined __USE_XOPEN)) \ - || (!__MATH_DECLARING_DOUBLE && defined __USE_MISC) -/* j0. */ -__MATH_REDIRCALL (j0, , (_Mdouble_)); - -/* y0. */ -__MATH_REDIRCALL (y0, , (_Mdouble_)); - -/* j1. */ -__MATH_REDIRCALL (j1, , (_Mdouble_)); - -/* y1. */ -__MATH_REDIRCALL (y1, , (_Mdouble_)); - -/* jn. */ -__MATH_REDIRCALL (jn, , (int, _Mdouble_)); - -/* yn. */ -__MATH_REDIRCALL (yn, , (int, _Mdouble_)); -#endif - -#ifdef __USE_MISC -/* lgamma_r. */ -__MATH_REDIRCALL (lgamma, _r, (_Mdouble_, int *)); -#endif - -/* Redirect __lgammal_r_finite to __lgamma_r_finite when __NO_LONG_DOUBLE_MATH - is set and to itself otherwise. It also redirects __lgamma_r_finite and - __lgammaf_r_finite to themselves. */ -__MATH_REDIRCALL_INTERNAL (lgamma, _r, (_Mdouble_, int *)); - -#if ((defined __USE_XOPEN || defined __USE_ISOC99) \ - && defined __extern_always_inline) -/* lgamma. */ -__extern_always_inline _Mdouble_ -__NTH (__REDIRFROM (lgamma, ) (_Mdouble_ __d)) -{ -# if defined __USE_MISC || defined __USE_XOPEN - return __REDIRTO (lgamma, _r) (__d, &signgam); -# else - int __local_signgam = 0; - return __REDIRTO (lgamma, _r) (__d, &__local_signgam); -# endif -} -#endif - -#if ((defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_XOPEN2K)) \ - && defined __extern_always_inline) && !__MATH_DECLARING_FLOATN -/* gamma. */ -__extern_always_inline _Mdouble_ -__NTH (__REDIRFROM (gamma, ) (_Mdouble_ __d)) -{ - return __REDIRTO (lgamma, _r) (__d, &signgam); -} -#endif - -/* log. */ -__MATH_REDIRCALL (log, , (_Mdouble_)); - -/* log10. */ -__MATH_REDIRCALL (log10, , (_Mdouble_)); - -#ifdef __USE_ISOC99 -/* log2. */ -__MATH_REDIRCALL (log2, , (_Mdouble_)); -#endif - -/* pow. */ -__MATH_REDIRCALL (pow, , (_Mdouble_, _Mdouble_)); - -#if defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 -/* remainder. */ -__MATH_REDIRCALL (remainder, , (_Mdouble_, _Mdouble_)); -#endif - -#if ((__MATH_DECLARING_DOUBLE \ - && (defined __USE_MISC \ - || (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8))) \ - || (!defined __MATH_DECLARE_LDOUBLE && defined __USE_MISC)) \ - && !__MATH_DECLARING_FLOATN -/* scalb. */ -__MATH_REDIRCALL (scalb, , (_Mdouble_, _Mdouble_)); -#endif - -/* sinh. */ -__MATH_REDIRCALL (sinh, , (_Mdouble_)); - -/* sqrt. */ -__MATH_REDIRCALL (sqrt, , (_Mdouble_)); - -#if defined __USE_ISOC99 && defined __extern_always_inline -/* tgamma. */ -extern _Mdouble_ -__REDIRFROM (__gamma, _r_finite) (_Mdouble_, int *); - -__extern_always_inline _Mdouble_ -__NTH (__REDIRFROM (tgamma, ) (_Mdouble_ __d)) -{ - int __local_signgam = 0; - _Mdouble_ __res = __REDIRTO (gamma, _r) (__d, &__local_signgam); - return __local_signgam < 0 ? -__res : __res; -} -#endif - -#undef __REDIRFROM -#undef __REDIRTO -#undef __MATH_REDIRCALL -#undef __MATH_REDIRCALL_2 -#undef __MATH_REDIRCALL_INTERNAL -#undef __MATH_REDIRCALL_X
\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/math-vector.h b/lib/libc/include/generic-glibc/bits/math-vector.h index ac56919a53..da37ee7bff 100644 --- a/lib/libc/include/generic-glibc/bits/math-vector.h +++ b/lib/libc/include/generic-glibc/bits/math-vector.h @@ -1,5 +1,5 @@ /* Platform-specific SIMD declarations of math functions. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _MATH_H # error "Never include <bits/math-vector.h> directly;\ diff --git a/lib/libc/include/generic-glibc/bits/mathcalls-helper-functions.h b/lib/libc/include/generic-glibc/bits/mathcalls-helper-functions.h index 0f1b06ca57..88ced5d2e1 100644 --- a/lib/libc/include/generic-glibc/bits/mathcalls-helper-functions.h +++ b/lib/libc/include/generic-glibc/bits/mathcalls-helper-functions.h @@ -1,5 +1,5 @@ /* Prototype declarations for math classification macros helpers. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* Classify given number. */ diff --git a/lib/libc/include/generic-glibc/bits/mathcalls-narrow.h b/lib/libc/include/generic-glibc/bits/mathcalls-narrow.h index eb78fad4b5..6943772db8 100644 --- a/lib/libc/include/generic-glibc/bits/mathcalls-narrow.h +++ b/lib/libc/include/generic-glibc/bits/mathcalls-narrow.h @@ -1,5 +1,5 @@ /* Declare functions returning a narrower type. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _MATH_H # error "Never include <bits/mathcalls-narrow.h> directly; include <math.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/mathcalls.h b/lib/libc/include/generic-glibc/bits/mathcalls.h index 82e98a1ba0..e6b009ff27 100644 --- a/lib/libc/include/generic-glibc/bits/mathcalls.h +++ b/lib/libc/include/generic-glibc/bits/mathcalls.h @@ -1,5 +1,5 @@ /* Prototype declarations for math functions; helper file for <math.h>. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* NOTE: Because of the special way this file is used by <math.h>, this file must NOT be protected from multiple inclusion as header files @@ -109,7 +109,7 @@ __MATHCALL (log10,, (_Mdouble_ __x)); /* Break VALUE into integral and fractional parts. */ __MATHCALL (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr)) __nonnull ((2)); -#if __GLIBC_USE (IEC_60559_FUNCS_EXT) +#if __GLIBC_USE (IEC_60559_FUNCS_EXT_C2X) /* Compute exponent to base ten. */ __MATHCALL (exp10,, (_Mdouble_ __x)); #endif @@ -261,7 +261,7 @@ __MATHCALL (nextafter,, (_Mdouble_ __x, _Mdouble_ __y)); __MATHCALL (nexttoward,, (_Mdouble_ __x, long double __y)); # endif -# if __GLIBC_USE (IEC_60559_BFP_EXT) || __MATH_DECLARING_FLOATN +# if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) || __MATH_DECLARING_FLOATN /* Return X - epsilon. */ __MATHCALL (nextdown,, (_Mdouble_ __x)); /* Return X + epsilon. */ @@ -280,7 +280,7 @@ __MATHCALL (scalbn,, (_Mdouble_ __x, int __n)); __MATHDECL (int,ilogb,, (_Mdouble_ __x)); #endif -#if __GLIBC_USE (IEC_60559_BFP_EXT) || __MATH_DECLARING_FLOATN +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) || __MATH_DECLARING_FLOATN /* Like ilogb, but returning long int. */ __MATHDECL (long int, llogb,, (_Mdouble_ __x)); #endif @@ -335,7 +335,7 @@ __MATHCALLX (fmin,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)); __MATHCALL (fma,, (_Mdouble_ __x, _Mdouble_ __y, _Mdouble_ __z)); #endif /* Use ISO C99. */ -#if __GLIBC_USE (IEC_60559_BFP_EXT) || __MATH_DECLARING_FLOATN +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) || __MATH_DECLARING_FLOATN /* Round X to nearest integer value, rounding halfway cases to even. */ __MATHCALLX (roundeven,, (_Mdouble_ __x), (__const__)); @@ -367,16 +367,20 @@ __MATHCALLX (fmaxmag,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)); /* Return value with minimum magnitude. */ __MATHCALLX (fminmag,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)); +/* Canonicalize floating-point representation. */ +__MATHDECL_1 (int, canonicalize,, (_Mdouble_ *__cx, const _Mdouble_ *__x)); +#endif + +#if __GLIBC_USE (IEC_60559_BFP_EXT) || __MATH_DECLARING_FLOATN /* Total order operation. */ -__MATHDECL_1 (int, totalorder,, (_Mdouble_ __x, _Mdouble_ __y)) - __attribute__ ((__const__)); +__MATHDECL_1 (int, totalorder,, (const _Mdouble_ *__x, + const _Mdouble_ *__y)) + __attribute_pure__; /* Total order operation on absolute values. */ -__MATHDECL_1 (int, totalordermag,, (_Mdouble_ __x, _Mdouble_ __y)) - __attribute__ ((__const__)); - -/* Canonicalize floating-point representation. */ -__MATHDECL_1 (int, canonicalize,, (_Mdouble_ *__cx, const _Mdouble_ *__x)); +__MATHDECL_1 (int, totalordermag,, (const _Mdouble_ *__x, + const _Mdouble_ *__y)) + __attribute_pure__; /* Get NaN payload. */ __MATHCALL (getpayload,, (const _Mdouble_ *__x)); diff --git a/lib/libc/include/generic-glibc/bits/mathdef.h b/lib/libc/include/generic-glibc/bits/mathdef.h index c40b7a363e..2b43561f9f 100644 --- a/lib/libc/include/generic-glibc/bits/mathdef.h +++ b/lib/libc/include/generic-glibc/bits/mathdef.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _COMPLEX_H # error "Never use <bits/mathdef.h> directly; include <complex.h> instead" diff --git a/lib/libc/include/generic-glibc/bits/mman-linux.h b/lib/libc/include/generic-glibc/bits/mman-linux.h index 69a90c3a24..a97f10212b 100644 --- a/lib/libc/include/generic-glibc/bits/mman-linux.h +++ b/lib/libc/include/generic-glibc/bits/mman-linux.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux generic version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_MMAN_H # error "Never use <bits/mman-linux.h> directly; include <sys/mman.h> instead." @@ -87,6 +87,8 @@ # define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */ # define MADV_WIPEONFORK 18 /* Zero memory on fork, child only. */ # define MADV_KEEPONFORK 19 /* Undo MADV_WIPEONFORK. */ +# define MADV_COLD 20 /* Deactivate these pages. */ +# define MADV_PAGEOUT 21 /* Reclaim these pages. */ # define MADV_HWPOISON 100 /* Poison a page for testing. */ #endif diff --git a/lib/libc/include/generic-glibc/bits/mman-map-flags-generic.h b/lib/libc/include/generic-glibc/bits/mman-map-flags-generic.h index eee570c7aa..0cd335bd8c 100644 --- a/lib/libc/include/generic-glibc/bits/mman-map-flags-generic.h +++ b/lib/libc/include/generic-glibc/bits/mman-map-flags-generic.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/generic version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_MMAN_H # error "Never use <bits/mman-map-flags-generic.h> directly; include <sys/mman.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/mman-shared.h b/lib/libc/include/generic-glibc/bits/mman-shared.h index 62c1ab9b13..aa6c176fca 100644 --- a/lib/libc/include/generic-glibc/bits/mman-shared.h +++ b/lib/libc/include/generic-glibc/bits/mman-shared.h @@ -1,5 +1,5 @@ /* Memory-mapping-related declarations/definitions, not architecture-specific. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_MMAN_H # error "Never use <bits/mman-shared.h> directly; include <sys/mman.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/mman.h b/lib/libc/include/generic-glibc/bits/mman.h index 6b135d197e..dc24c1d773 100644 --- a/lib/libc/include/generic-glibc/bits/mman.h +++ b/lib/libc/include/generic-glibc/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/generic version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_MMAN_H # error "Never use <bits/mman.h> directly; include <sys/mman.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/monetary-ldbl.h b/lib/libc/include/generic-glibc/bits/monetary-ldbl.h index cd407c5d75..9942df4357 100644 --- a/lib/libc/include/generic-glibc/bits/monetary-ldbl.h +++ b/lib/libc/include/generic-glibc/bits/monetary-ldbl.h @@ -1,5 +1,5 @@ /* -mlong-double-64 compatibility mode for monetary functions. - 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _MONETARY_H # error "Never include <bits/monetary-ldbl.h> directly; use <monetary.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/mqueue.h b/lib/libc/include/generic-glibc/bits/mqueue.h index 5e5b50b304..67b62ab802 100644 --- a/lib/libc/include/generic-glibc/bits/mqueue.h +++ b/lib/libc/include/generic-glibc/bits/mqueue.h @@ -1,4 +1,4 @@ -/* 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _MQUEUE_H # error "Never use <bits/mqueue.h> directly; include <mqueue.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/mqueue2.h b/lib/libc/include/generic-glibc/bits/mqueue2.h index 26c63e0a44..b621163449 100644 --- a/lib/libc/include/generic-glibc/bits/mqueue2.h +++ b/lib/libc/include/generic-glibc/bits/mqueue2.h @@ -1,5 +1,5 @@ /* Checking macros for mq functions. - Copyright (C) 2007-2019 Free Software Foundation, Inc. + Copyright (C) 2007-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FCNTL_H # error "Never include <bits/mqueue2.h> directly; use <mqueue.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/msq-pad.h b/lib/libc/include/generic-glibc/bits/msq-pad.h index 5504b681a4..5cc786f0d3 100644 --- a/lib/libc/include/generic-glibc/bits/msq-pad.h +++ b/lib/libc/include/generic-glibc/bits/msq-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct msqid_ds. 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_MSG_H # error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/msq.h b/lib/libc/include/generic-glibc/bits/msq.h index a3db8baf94..98efc613d1 100644 --- a/lib/libc/include/generic-glibc/bits/msq.h +++ b/lib/libc/include/generic-glibc/bits/msq.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_MSG_H # error "Never use <bits/msq.h> directly; include <sys/msg.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/netdb.h b/lib/libc/include/generic-glibc/bits/netdb.h index 5429eb43a8..58ecfd8814 100644 --- a/lib/libc/include/generic-glibc/bits/netdb.h +++ b/lib/libc/include/generic-glibc/bits/netdb.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _NETDB_H # error "Never include <bits/netdb.h> directly; use <netdb.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/param.h b/lib/libc/include/generic-glibc/bits/param.h index 5e450b4456..c206eb422a 100644 --- a/lib/libc/include/generic-glibc/bits/param.h +++ b/lib/libc/include/generic-glibc/bits/param.h @@ -1,5 +1,5 @@ /* Old-style Unix parameters and limits. Linux version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PARAM_H # error "Never use <bits/param.h> directly; include <sys/param.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/poll.h b/lib/libc/include/generic-glibc/bits/poll.h index 438d3190f9..2a83587069 100644 --- a/lib/libc/include/generic-glibc/bits/poll.h +++ b/lib/libc/include/generic-glibc/bits/poll.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_POLL_H # error "Never use <bits/poll.h> directly; include <sys/poll.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/poll2.h b/lib/libc/include/generic-glibc/bits/poll2.h index 4307e9966d..5306616d95 100644 --- a/lib/libc/include/generic-glibc/bits/poll2.h +++ b/lib/libc/include/generic-glibc/bits/poll2.h @@ -1,5 +1,5 @@ /* Checking macros for poll functions. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_POLL_H # error "Never include <bits/poll2.h> directly; use <sys/poll.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/posix1_lim.h b/lib/libc/include/generic-glibc/bits/posix1_lim.h index f5ca957b4b..d4eae0536a 100644 --- a/lib/libc/include/generic-glibc/bits/posix1_lim.h +++ b/lib/libc/include/generic-glibc/bits/posix1_lim.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * POSIX Standard: 2.9.2 Minimum Values Added to <limits.h> diff --git a/lib/libc/include/generic-glibc/bits/posix2_lim.h b/lib/libc/include/generic-glibc/bits/posix2_lim.h index 8ebd02f92e..35e658e6a8 100644 --- a/lib/libc/include/generic-glibc/bits/posix2_lim.h +++ b/lib/libc/include/generic-glibc/bits/posix2_lim.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * Never include this file directly; include <limits.h> instead. diff --git a/lib/libc/include/generic-glibc/bits/posix_opt.h b/lib/libc/include/generic-glibc/bits/posix_opt.h index 3724ed7f2e..e81fe4a14f 100644 --- a/lib/libc/include/generic-glibc/bits/posix_opt.h +++ b/lib/libc/include/generic-glibc/bits/posix_opt.h @@ -1,5 +1,5 @@ /* Define POSIX options for Linux. - 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 <http://www.gnu.org/licenses/>. */ + not, see <https://www.gnu.org/licenses/>. */ #ifndef _BITS_POSIX_OPT_H #define _BITS_POSIX_OPT_H 1 diff --git a/lib/libc/include/generic-glibc/bits/ppc.h b/lib/libc/include/generic-glibc/bits/ppc.h index 14e7b74272..b2fe880d1f 100644 --- a/lib/libc/include/generic-glibc/bits/ppc.h +++ b/lib/libc/include/generic-glibc/bits/ppc.h @@ -1,5 +1,5 @@ /* Facilities specific to the PowerPC architecture on Linux - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_PPC_H #define _BITS_PPC_H diff --git a/lib/libc/include/generic-glibc/bits/printf-ldbl.h b/lib/libc/include/generic-glibc/bits/printf-ldbl.h index b3a4b5915a..98af417aa3 100644 --- a/lib/libc/include/generic-glibc/bits/printf-ldbl.h +++ b/lib/libc/include/generic-glibc/bits/printf-ldbl.h @@ -1,5 +1,5 @@ /* -mlong-double-64 compatibility mode for <printf.h> functions. - 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _PRINTF_H # error "Never include <bits/printf-ldbl.h> directly; use <printf.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/procfs-extra.h b/lib/libc/include/generic-glibc/bits/procfs-extra.h index c4d6d56f88..732fafb83e 100644 --- a/lib/libc/include/generic-glibc/bits/procfs-extra.h +++ b/lib/libc/include/generic-glibc/bits/procfs-extra.h @@ -1,5 +1,5 @@ /* Extra sys/procfs.h definitions. Generic Linux 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. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PROCFS_H # error "Never include <bits/procfs-extra.h> directly; use <sys/procfs.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/procfs-id.h b/lib/libc/include/generic-glibc/bits/procfs-id.h index 063cda0183..38906b6303 100644 --- a/lib/libc/include/generic-glibc/bits/procfs-id.h +++ b/lib/libc/include/generic-glibc/bits/procfs-id.h @@ -1,5 +1,5 @@ /* Types of pr_uid and pr_gid in struct elf_prpsinfo. Generic Linux 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. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PROCFS_H # error "Never include <bits/procfs-id.h> directly; use <sys/procfs.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/procfs-prregset.h b/lib/libc/include/generic-glibc/bits/procfs-prregset.h index 5284632551..310acb9290 100644 --- a/lib/libc/include/generic-glibc/bits/procfs-prregset.h +++ b/lib/libc/include/generic-glibc/bits/procfs-prregset.h @@ -1,5 +1,5 @@ /* Types of prgregset_t and prfpregset_t. Generic Linux 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. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PROCFS_H # error "Never include <bits/procfs-prregset.h> directly; use <sys/procfs.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/procfs.h b/lib/libc/include/generic-glibc/bits/procfs.h index 2c76f90246..66a5f6726b 100644 --- a/lib/libc/include/generic-glibc/bits/procfs.h +++ b/lib/libc/include/generic-glibc/bits/procfs.h @@ -1,5 +1,5 @@ /* Types for registers for sys/procfs.h. MIPS 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PROCFS_H # error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/pthreadtypes-arch.h b/lib/libc/include/generic-glibc/bits/pthreadtypes-arch.h index 0de6106f34..549deac37b 100644 --- a/lib/libc/include/generic-glibc/bits/pthreadtypes-arch.h +++ b/lib/libc/include/generic-glibc/bits/pthreadtypes-arch.h @@ -1,5 +1,6 @@ -/* Machine-specific pthread type layouts. MIPS version. - Copyright (C) 2005-2019 Free Software Foundation, Inc. +/* Machine-specific pthread type layouts. Generic version. + 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 @@ -13,77 +14,32 @@ 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 + License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #ifndef _BITS_PTHREADTYPES_ARCH_H #define _BITS_PTHREADTYPES_ARCH_H 1 -#include <endian.h> +#include <bits/wordsize.h> -#if _MIPS_SIM == _ABI64 -# define __SIZEOF_PTHREAD_ATTR_T 56 -# define __SIZEOF_PTHREAD_MUTEX_T 40 -# define __SIZEOF_PTHREAD_RWLOCK_T 56 -# define __SIZEOF_PTHREAD_BARRIER_T 32 +#if __WORDSIZE == 64 +# 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_ATTR_T 36 -# define __SIZEOF_PTHREAD_MUTEX_T 24 -# define __SIZEOF_PTHREAD_RWLOCK_T 32 -# define __SIZEOF_PTHREAD_BARRIER_T 20 +# 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 -#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 -#define __SIZEOF_PTHREAD_COND_T 48 -#define __SIZEOF_PTHREAD_CONDATTR_T 4 -#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 __SIZEOF_PTHREAD_MUTEXATTR_T 4 +#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 +#define __SIZEOF_PTHREAD_BARRIERATTR_T 4 +#define __SIZEOF_PTHREAD_COND_T 48 +#define __SIZEOF_PTHREAD_CONDATTR_T 4 #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 */
\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/pthreadtypes.h b/lib/libc/include/generic-glibc/bits/pthreadtypes.h index ba83958e96..7125b6aeb4 100644 --- a/lib/libc/include/generic-glibc/bits/pthreadtypes.h +++ b/lib/libc/include/generic-glibc/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_PTHREADTYPES_COMMON_H # define _BITS_PTHREADTYPES_COMMON_H 1 diff --git a/lib/libc/include/generic-glibc/bits/ptrace-shared.h b/lib/libc/include/generic-glibc/bits/ptrace-shared.h index 98df8f3c4b..3b729fc7e4 100644 --- a/lib/libc/include/generic-glibc/bits/ptrace-shared.h +++ b/lib/libc/include/generic-glibc/bits/ptrace-shared.h @@ -1,6 +1,6 @@ /* `ptrace' debugger support interface. Linux version, not architecture-specific. - 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. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PTRACE_H # error "Never use <bits/ptrace-shared.h> directly; include <sys/ptrace.h> instead." @@ -52,6 +52,15 @@ enum __ptrace_eventcodes PTRACE_EVENT_STOP = 128 }; +/* Type of stop for PTRACE_GET_SYSCALL_INFO. */ +enum __ptrace_get_syscall_info_op +{ + PTRACE_SYSCALL_INFO_NONE = 0, + PTRACE_SYSCALL_INFO_ENTRY = 1, + PTRACE_SYSCALL_INFO_EXIT = 2, + PTRACE_SYSCALL_INFO_SECCOMP = 3 +}; + /* Arguments for PTRACE_PEEKSIGINFO. */ struct __ptrace_peeksiginfo_args { @@ -73,6 +82,44 @@ struct __ptrace_seccomp_metadata __uint64_t flags; /* Output: filter's flags. */ }; +/* Results of PTRACE_GET_SYSCALL_INFO. */ +struct __ptrace_syscall_info +{ + __uint8_t op; /* One of the enum + __ptrace_get_syscall_info_op + values. */ + __uint32_t arch __attribute__ ((__aligned__ (4))); /* AUDIT_ARCH_* + value. */ + __uint64_t instruction_pointer; /* Instruction pointer. */ + __uint64_t stack_pointer; /* Stack pointer. */ + union + { + /* System call number and arguments, for + PTRACE_SYSCALL_INFO_ENTRY. */ + struct + { + __uint64_t nr; + __uint64_t args[6]; + } entry; + /* System call return value and error flag, for + PTRACE_SYSCALL_INFO_EXIT. */ + struct + { + __int64_t rval; + __uint8_t is_error; + } exit; + /* System call number, arguments and SECCOMP_RET_DATA portion of + SECCOMP_RET_TRACE return value, for + PTRACE_SYSCALL_INFO_SECCOMP. */ + struct + { + __uint64_t nr; + __uint64_t args[6]; + __uint32_t ret_data; + } seccomp; + }; +}; + /* Perform process tracing functions. REQUEST is one of the values above, and determines the action to be taken. For all requests except PTRACE_TRACEME, PID specifies the process to be diff --git a/lib/libc/include/generic-glibc/bits/resource.h b/lib/libc/include/generic-glibc/bits/resource.h index 979f6a70cc..6f4ec334ac 100644 --- a/lib/libc/include/generic-glibc/bits/resource.h +++ b/lib/libc/include/generic-glibc/bits/resource.h @@ -1,5 +1,5 @@ /* Bit values & structures for resource limits. Linux version. - 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_RESOURCE_H # error "Never use <bits/resource.h> directly; include <sys/resource.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/sched.h b/lib/libc/include/generic-glibc/bits/sched.h index 7eb5f3d69b..fb1f1b5971 100644 --- a/lib/libc/include/generic-glibc/bits/sched.h +++ b/lib/libc/include/generic-glibc/bits/sched.h @@ -1,6 +1,6 @@ /* Definitions of constants and data structure for 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SCHED_H #define _BITS_SCHED_H 1 @@ -44,6 +44,8 @@ # define CLONE_FS 0x00000200 /* Set if fs info shared between processes. */ # define CLONE_FILES 0x00000400 /* Set if open files shared between processes. */ # define CLONE_SIGHAND 0x00000800 /* Set if signal handlers shared. */ +# define CLONE_PIDFD 0x00001000 /* Set if a pidfd should be placed + in parent. */ # define CLONE_PTRACE 0x00002000 /* Set if tracing continues on the child. */ # define CLONE_VFORK 0x00004000 /* Set if the parent wants the child to wake it up on mm_release. */ diff --git a/lib/libc/include/generic-glibc/bits/select.h b/lib/libc/include/generic-glibc/bits/select.h index fe9398c824..d71b5e4ce2 100644 --- a/lib/libc/include/generic-glibc/bits/select.h +++ b/lib/libc/include/generic-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SELECT_H # error "Never use <bits/select.h> directly; include <sys/select.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/select2.h b/lib/libc/include/generic-glibc/bits/select2.h index 53dd32bad6..052223de2d 100644 --- a/lib/libc/include/generic-glibc/bits/select2.h +++ b/lib/libc/include/generic-glibc/bits/select2.h @@ -1,5 +1,5 @@ /* Checking macros for select functions. - 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,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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SELECT_H # error "Never include <bits/select2.h> directly; use <sys/select.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/sem-pad.h b/lib/libc/include/generic-glibc/bits/sem-pad.h index 8eb3f121aa..92c1bab60a 100644 --- a/lib/libc/include/generic-glibc/bits/sem-pad.h +++ b/lib/libc/include/generic-glibc/bits/sem-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct semid_ds. 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SEM_H # error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/sem.h b/lib/libc/include/generic-glibc/bits/sem.h index a3e4d27e0f..b352aa0cbb 100644 --- a/lib/libc/include/generic-glibc/bits/sem.h +++ b/lib/libc/include/generic-glibc/bits/sem.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SEM_H # error "Never include <bits/sem.h> directly; use <sys/sem.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/semaphore.h b/lib/libc/include/generic-glibc/bits/semaphore.h index dadb5d8d8e..e28b319eb5 100644 --- a/lib/libc/include/generic-glibc/bits/semaphore.h +++ b/lib/libc/include/generic-glibc/bits/semaphore.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SEMAPHORE_H # error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/setjmp.h b/lib/libc/include/generic-glibc/bits/setjmp.h index 8cc70890e6..7fefe88f62 100644 --- a/lib/libc/include/generic-glibc/bits/setjmp.h +++ b/lib/libc/include/generic-glibc/bits/setjmp.h @@ -1,5 +1,5 @@ /* Define the machine-dependent type `jmp_buf'. MIPS version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _MIPS_BITS_SETJMP_H #define _MIPS_BITS_SETJMP_H 1 diff --git a/lib/libc/include/generic-glibc/bits/setjmp2.h b/lib/libc/include/generic-glibc/bits/setjmp2.h index 0d4e20010b..ba46b5ad27 100644 --- a/lib/libc/include/generic-glibc/bits/setjmp2.h +++ b/lib/libc/include/generic-glibc/bits/setjmp2.h @@ -1,5 +1,5 @@ /* Checking macros for setjmp functions. - Copyright (C) 2009-2019 Free Software Foundation, Inc. + Copyright (C) 2009-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SETJMP_H # error "Never include <bits/setjmp2.h> directly; use <setjmp.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/shm-pad.h b/lib/libc/include/generic-glibc/bits/shm-pad.h index 29fc0c3160..e214cd6e6b 100644 --- a/lib/libc/include/generic-glibc/bits/shm-pad.h +++ b/lib/libc/include/generic-glibc/bits/shm-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct shmid_ds. 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SHM_H # error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/shm.h b/lib/libc/include/generic-glibc/bits/shm.h index 67716266d7..97e4d577e0 100644 --- a/lib/libc/include/generic-glibc/bits/shm.h +++ b/lib/libc/include/generic-glibc/bits/shm.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SHM_H # error "Never include <bits/shm.h> directly; use <sys/shm.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/shmlba.h b/lib/libc/include/generic-glibc/bits/shmlba.h index ebe9044b07..796377719d 100644 --- a/lib/libc/include/generic-glibc/bits/shmlba.h +++ b/lib/libc/include/generic-glibc/bits/shmlba.h @@ -1,5 +1,5 @@ /* Define SHMLBA. 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SHM_H # error "Never use <bits/shmlba.h> directly; include <sys/shm.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/sigaction.h b/lib/libc/include/generic-glibc/bits/sigaction.h index 6c825a65b6..33e922806f 100644 --- a/lib/libc/include/generic-glibc/bits/sigaction.h +++ b/lib/libc/include/generic-glibc/bits/sigaction.h @@ -1,5 +1,5 @@ /* The proper definitions for Linux's sigaction. - 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. 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGACTION_H #define _BITS_SIGACTION_H 1 diff --git a/lib/libc/include/generic-glibc/bits/sigcontext.h b/lib/libc/include/generic-glibc/bits/sigcontext.h index 6e04b340f9..4496148619 100644 --- a/lib/libc/include/generic-glibc/bits/sigcontext.h +++ b/lib/libc/include/generic-glibc/bits/sigcontext.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGCONTEXT_H #define _BITS_SIGCONTEXT_H 1 diff --git a/lib/libc/include/generic-glibc/bits/sigevent-consts.h b/lib/libc/include/generic-glibc/bits/sigevent-consts.h index bd3ee34ed8..af2d93c491 100644 --- a/lib/libc/include/generic-glibc/bits/sigevent-consts.h +++ b/lib/libc/include/generic-glibc/bits/sigevent-consts.h @@ -1,5 +1,5 @@ /* sigevent constants. Linux version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGEVENT_CONSTS_H #define _BITS_SIGEVENT_CONSTS_H 1 diff --git a/lib/libc/include/generic-glibc/bits/siginfo-consts.h b/lib/libc/include/generic-glibc/bits/siginfo-consts.h index 84be2420f4..c3ce77428b 100644 --- a/lib/libc/include/generic-glibc/bits/siginfo-consts.h +++ b/lib/libc/include/generic-glibc/bits/siginfo-consts.h @@ -1,5 +1,5 @@ /* siginfo constants. Linux version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGINFO_CONSTS_H #define _BITS_SIGINFO_CONSTS_H 1 diff --git a/lib/libc/include/generic-glibc/bits/signal_ext.h b/lib/libc/include/generic-glibc/bits/signal_ext.h index 1a937faf9b..bbcabd03b6 100644 --- a/lib/libc/include/generic-glibc/bits/signal_ext.h +++ b/lib/libc/include/generic-glibc/bits/signal_ext.h @@ -1,5 +1,5 @@ /* System-specific extensions of <signal.h>, 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SIGNAL_H # error "Never include <bits/signal_ext.h> directly; use <signal.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/signalfd.h b/lib/libc/include/generic-glibc/bits/signalfd.h index ee9044e73e..632c233631 100644 --- a/lib/libc/include/generic-glibc/bits/signalfd.h +++ b/lib/libc/include/generic-glibc/bits/signalfd.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2019 Free Software Foundation, Inc. +/* Copyright (C) 2007-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SIGNALFD_H # error "Never use <bits/signalfd.h> directly; include <sys/signalfd.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/signum-generic.h b/lib/libc/include/generic-glibc/bits/signum-generic.h index 70934ca324..fc31cf9cff 100644 --- a/lib/libc/include/generic-glibc/bits/signum-generic.h +++ b/lib/libc/include/generic-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGNUM_GENERIC_H #define _BITS_SIGNUM_GENERIC_H 1 diff --git a/lib/libc/include/generic-glibc/bits/signum.h b/lib/libc/include/generic-glibc/bits/signum.h index e8b3e40af2..a549ca0204 100644 --- a/lib/libc/include/generic-glibc/bits/signum.h +++ b/lib/libc/include/generic-glibc/bits/signum.h @@ -1,5 +1,5 @@ /* Signal number definitions. Linux version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGNUM_H #define _BITS_SIGNUM_H 1 diff --git a/lib/libc/include/generic-glibc/bits/sigstack.h b/lib/libc/include/generic-glibc/bits/sigstack.h index 21c08359f0..e8cd667816 100644 --- a/lib/libc/include/generic-glibc/bits/sigstack.h +++ b/lib/libc/include/generic-glibc/bits/sigstack.h @@ -1,5 +1,5 @@ /* sigstack, sigaltstack definitions. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGSTACK_H #define _BITS_SIGSTACK_H 1 diff --git a/lib/libc/include/generic-glibc/bits/sigthread.h b/lib/libc/include/generic-glibc/bits/sigthread.h index 6248041ce1..759c294e8f 100644 --- a/lib/libc/include/generic-glibc/bits/sigthread.h +++ b/lib/libc/include/generic-glibc/bits/sigthread.h @@ -1,5 +1,5 @@ /* Signal handling function for threaded programs. - 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; see the file COPYING.LIB. If - not, see <http://www.gnu.org/licenses/>. */ + not, see <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGTHREAD_H #define _BITS_SIGTHREAD_H 1 diff --git a/lib/libc/include/generic-glibc/bits/sockaddr.h b/lib/libc/include/generic-glibc/bits/sockaddr.h index 4ebdab50d5..29d95bec86 100644 --- a/lib/libc/include/generic-glibc/bits/sockaddr.h +++ b/lib/libc/include/generic-glibc/bits/sockaddr.h @@ -1,5 +1,5 @@ /* Definition of struct sockaddr_* common members and sizes, generic version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * Never include this file directly; use <sys/socket.h> instead. diff --git a/lib/libc/include/generic-glibc/bits/socket-constants.h b/lib/libc/include/generic-glibc/bits/socket-constants.h index b5dd49b6df..1781053c77 100644 --- a/lib/libc/include/generic-glibc/bits/socket-constants.h +++ b/lib/libc/include/generic-glibc/bits/socket-constants.h @@ -1,5 +1,5 @@ /* Socket constants which vary among Linux architectures. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SOCKET_H # error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/socket.h b/lib/libc/include/generic-glibc/bits/socket.h index 6702cca140..44ff857923 100644 --- a/lib/libc/include/generic-glibc/bits/socket.h +++ b/lib/libc/include/generic-glibc/bits/socket.h @@ -1,5 +1,5 @@ /* System-specific socket constants and types. Linux 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef __BITS_SOCKET_H #define __BITS_SOCKET_H @@ -169,7 +169,7 @@ typedef __socklen_t socklen_t; #define SOL_XDP 283 /* Maximum queue length specifiable by listen. */ -#define SOMAXCONN 128 +#define SOMAXCONN 4096 /* Get the definition of the macro to define the common sockaddr members. */ #include <bits/sockaddr.h> diff --git a/lib/libc/include/generic-glibc/bits/socket2.h b/lib/libc/include/generic-glibc/bits/socket2.h index db09943be6..1550ff0091 100644 --- a/lib/libc/include/generic-glibc/bits/socket2.h +++ b/lib/libc/include/generic-glibc/bits/socket2.h @@ -1,5 +1,5 @@ /* Checking macros for socket functions. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SOCKET_H # error "Never include <bits/socket2.h> directly; use <sys/socket.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/socket_type.h b/lib/libc/include/generic-glibc/bits/socket_type.h index 8787d66a03..9c444f0d10 100644 --- a/lib/libc/include/generic-glibc/bits/socket_type.h +++ b/lib/libc/include/generic-glibc/bits/socket_type.h @@ -1,5 +1,5 @@ /* Define enum __socket_type for generic Linux. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SOCKET_H # error "Never include <bits/socket_type.h> directly; use <sys/socket.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/ss_flags.h b/lib/libc/include/generic-glibc/bits/ss_flags.h index 31b46a9237..302984b22b 100644 --- a/lib/libc/include/generic-glibc/bits/ss_flags.h +++ b/lib/libc/include/generic-glibc/bits/ss_flags.h @@ -1,5 +1,5 @@ /* ss_flags values for stack_t. Linux 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SS_FLAGS_H #define _BITS_SS_FLAGS_H 1 diff --git a/lib/libc/include/generic-glibc/bits/stab.def b/lib/libc/include/generic-glibc/bits/stab.def index 47cdddfd96..1730bce0ad 100644 --- a/lib/libc/include/generic-glibc/bits/stab.def +++ b/lib/libc/include/generic-glibc/bits/stab.def @@ -1,5 +1,5 @@ /* Table of DBX symbol codes for the GNU system. - Copyright (C) 1988, 1997-2019 Free Software Foundation, Inc. + Copyright (C) 1988, 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* This contains contribution from Cygnus Support. */ diff --git a/lib/libc/include/generic-glibc/bits/stat.h b/lib/libc/include/generic-glibc/bits/stat.h index 7b6aa9487c..b298b3f336 100644 --- a/lib/libc/include/generic-glibc/bits/stat.h +++ b/lib/libc/include/generic-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/statfs.h b/lib/libc/include/generic-glibc/bits/statfs.h index b0f0560789..d4be118bd8 100644 --- a/lib/libc/include/generic-glibc/bits/statfs.h +++ b/lib/libc/include/generic-glibc/bits/statfs.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_STATFS_H # error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/statvfs.h b/lib/libc/include/generic-glibc/bits/statvfs.h index 486c6b13f9..3518719603 100644 --- a/lib/libc/include/generic-glibc/bits/statvfs.h +++ b/lib/libc/include/generic-glibc/bits/statvfs.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_STATVFS_H # error "Never include <bits/statvfs.h> directly; use <sys/statvfs.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/statx-generic.h b/lib/libc/include/generic-glibc/bits/statx-generic.h index f2c2e208b1..e277c97c32 100644 --- a/lib/libc/include/generic-glibc/bits/statx-generic.h +++ b/lib/libc/include/generic-glibc/bits/statx-generic.h @@ -1,5 +1,5 @@ /* Generic statx-related definitions and declarations. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* This interface is based on <linux/stat.h> in Linux. */ diff --git a/lib/libc/include/generic-glibc/bits/statx.h b/lib/libc/include/generic-glibc/bits/statx.h index dbfe1127fe..93333e8df9 100644 --- a/lib/libc/include/generic-glibc/bits/statx.h +++ b/lib/libc/include/generic-glibc/bits/statx.h @@ -1,5 +1,5 @@ /* statx-related definitions and declarations. Linux 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* This interface is based on <linux/stat.h> in Linux. */ @@ -26,11 +26,13 @@ /* Use "" to work around incorrect macro expansion of the __has_include argument (GCC PR 80005). */ -#if __glibc_has_include ("linux/stat.h") -# include "linux/stat.h" -# ifdef STATX_TYPE -# define __statx_timestamp_defined 1 -# define __statx_defined 1 +#ifdef __has_include +# if __has_include ("linux/stat.h") +# include "linux/stat.h" +# ifdef STATX_TYPE +# define __statx_timestamp_defined 1 +# define __statx_defined 1 +# endif # endif #endif diff --git a/lib/libc/include/generic-glibc/bits/stdint-intn.h b/lib/libc/include/generic-glibc/bits/stdint-intn.h index 25d902cdf2..25e6c5f964 100644 --- a/lib/libc/include/generic-glibc/bits/stdint-intn.h +++ b/lib/libc/include/generic-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_STDINT_INTN_H #define _BITS_STDINT_INTN_H 1 diff --git a/lib/libc/include/generic-glibc/bits/stdint-uintn.h b/lib/libc/include/generic-glibc/bits/stdint-uintn.h index 3ce1b861e7..171f824b85 100644 --- a/lib/libc/include/generic-glibc/bits/stdint-uintn.h +++ b/lib/libc/include/generic-glibc/bits/stdint-uintn.h @@ -1,5 +1,5 @@ /* Define uintN_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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_STDINT_UINTN_H #define _BITS_STDINT_UINTN_H 1 diff --git a/lib/libc/include/generic-glibc/bits/stdio-ldbl.h b/lib/libc/include/generic-glibc/bits/stdio-ldbl.h index 4b2a70883f..1e6a0edf64 100644 --- a/lib/libc/include/generic-glibc/bits/stdio-ldbl.h +++ b/lib/libc/include/generic-glibc/bits/stdio-ldbl.h @@ -1,5 +1,5 @@ /* -mlong-double-64 compatibility mode for stdio functions. - 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _STDIO_H # error "Never include <bits/stdio-ldbl.h> directly; use <stdio.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/stdio.h b/lib/libc/include/generic-glibc/bits/stdio.h index 50f3ca058e..656db408de 100644 --- a/lib/libc/include/generic-glibc/bits/stdio.h +++ b/lib/libc/include/generic-glibc/bits/stdio.h @@ -1,5 +1,5 @@ /* Optimizing macros and inline functions for stdio functions. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_STDIO_H #define _BITS_STDIO_H 1 diff --git a/lib/libc/include/generic-glibc/bits/stdio2.h b/lib/libc/include/generic-glibc/bits/stdio2.h index ffb29f23d5..32e4a4b64a 100644 --- a/lib/libc/include/generic-glibc/bits/stdio2.h +++ b/lib/libc/include/generic-glibc/bits/stdio2.h @@ -1,5 +1,5 @@ /* Checking macros for stdio functions. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_STDIO2_H #define _BITS_STDIO2_H 1 diff --git a/lib/libc/include/generic-glibc/bits/stdio_lim.h b/lib/libc/include/generic-glibc/bits/stdio_lim.h index b907b33f57..8e9de1e070 100644 --- a/lib/libc/include/generic-glibc/bits/stdio_lim.h +++ b/lib/libc/include/generic-glibc/bits/stdio_lim.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_STDIO_LIM_H #define _BITS_STDIO_LIM_H 1 diff --git a/lib/libc/include/generic-glibc/bits/stdlib-bsearch.h b/lib/libc/include/generic-glibc/bits/stdlib-bsearch.h index f1253f2031..4c6189dd73 100644 --- a/lib/libc/include/generic-glibc/bits/stdlib-bsearch.h +++ b/lib/libc/include/generic-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ __extern_inline void * bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size, diff --git a/lib/libc/include/generic-glibc/bits/stdlib-float.h b/lib/libc/include/generic-glibc/bits/stdlib-float.h index 05823e3173..e42e0e5d91 100644 --- a/lib/libc/include/generic-glibc/bits/stdlib-float.h +++ b/lib/libc/include/generic-glibc/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _STDLIB_H # error "Never use <bits/stdlib-float.h> directly; include <stdlib.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/stdlib-ldbl.h b/lib/libc/include/generic-glibc/bits/stdlib-ldbl.h index 7260cd5400..b4c4abe997 100644 --- a/lib/libc/include/generic-glibc/bits/stdlib-ldbl.h +++ b/lib/libc/include/generic-glibc/bits/stdlib-ldbl.h @@ -1,5 +1,5 @@ /* -mlong-double-64 compatibility mode for <stdlib.h> functions. - 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _STDLIB_H # error "Never include <bits/stdlib-ldbl.h> directly; use <stdlib.h> instead." @@ -28,7 +28,7 @@ __LDBL_REDIR1_DECL (strtold, strtod) __LDBL_REDIR1_DECL (strtold_l, strtod_l) #endif -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) __LDBL_REDIR1_DECL (strfroml, strfromd) #endif diff --git a/lib/libc/include/generic-glibc/bits/stdlib.h b/lib/libc/include/generic-glibc/bits/stdlib.h index 5ce9d17d41..d6fb14eb32 100644 --- a/lib/libc/include/generic-glibc/bits/stdlib.h +++ b/lib/libc/include/generic-glibc/bits/stdlib.h @@ -1,5 +1,5 @@ /* Checking macros for stdlib functions. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _STDLIB_H # error "Never include <bits/stdlib.h> directly; use <stdlib.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/string_fortified.h b/lib/libc/include/generic-glibc/bits/string_fortified.h index 1e9bd06680..f516808da3 100644 --- a/lib/libc/include/generic-glibc/bits/string_fortified.h +++ b/lib/libc/include/generic-glibc/bits/string_fortified.h @@ -1,4 +1,4 @@ -/* 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_STRING_FORTIFIED_H #define _BITS_STRING_FORTIFIED_H 1 diff --git a/lib/libc/include/generic-glibc/bits/strings_fortified.h b/lib/libc/include/generic-glibc/bits/strings_fortified.h index 77696022f4..fae5c6754d 100644 --- a/lib/libc/include/generic-glibc/bits/strings_fortified.h +++ b/lib/libc/include/generic-glibc/bits/strings_fortified.h @@ -1,5 +1,5 @@ /* Fortify macros for strings.h functions. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef __STRINGS_FORTIFIED # define __STRINGS_FORTIFIED 1 diff --git a/lib/libc/include/generic-glibc/bits/struct_mutex.h b/lib/libc/include/generic-glibc/bits/struct_mutex.h new file mode 100644 index 0000000000..092f4ee080 --- /dev/null +++ b/lib/libc/include/generic-glibc/bits/struct_mutex.h @@ -0,0 +1,84 @@ +/* Default mutex implementation struct definitions. + 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _THREAD_MUTEX_INTERNAL_H +#define _THREAD_MUTEX_INTERNAL_H 1 + +/* Generic struct for both POSIX and C11 mutexes. New ports are expected + to use the default layout, however architecture can redefine it to + add arch-specific extension (such as lock-elision). The struct have + a size of 32 bytes on LP32 and 40 bytes on LP64 architectures. */ + +struct __pthread_mutex_s +{ + int __lock __LOCK_ALIGNMENT; + unsigned int __count; + int __owner; +#if __WORDSIZE == 64 + unsigned int __nusers; +#endif + /* KIND must stay at this position in the structure to maintain + binary compatibility with static initializers. + + Concurrency notes: + The __kind of a mutex is initialized either by the static + PTHREAD_MUTEX_INITIALIZER or by a call to pthread_mutex_init. + + 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. + + 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; +#if __WORDSIZE != 64 + unsigned int __nusers; +#endif +#if __WORDSIZE == 64 + int __spins; + __pthread_list_t __list; +# define __PTHREAD_MUTEX_HAVE_PREV 1 +#else + __extension__ union + { + int __spins; + __pthread_slist_t __list; + }; +# define __PTHREAD_MUTEX_HAVE_PREV 0 +#endif +}; + +#if __PTHREAD_MUTEX_HAVE_PREV == 1 +# define __PTHREAD_MUTEX_INITIALIZER(__kind) \ + 0, 0, 0, 0, __kind, 0, { 0, 0 } +#else +# define __PTHREAD_MUTEX_INITIALIZER(__kind) \ + 0, 0, 0, __kind, 0, { 0 } +#endif + +#endif
\ No newline at end of file diff --git a/lib/libc/include/arm-linux-gnueabihf/bits/pthreadtypes-arch.h b/lib/libc/include/generic-glibc/bits/struct_rwlock.h index c46bf4f3fd..e1e54e75bb 100644 --- a/lib/libc/include/arm-linux-gnueabihf/bits/pthreadtypes-arch.h +++ b/lib/libc/include/generic-glibc/bits/struct_rwlock.h @@ -1,4 +1,5 @@ -/* Copyright (C) 2002-2019 Free Software Foundation, Inc. +/* MIPS internal rwlock struct definitions. + 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 @@ -12,33 +13,11 @@ 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 + License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#ifndef _BITS_PTHREADTYPES_ARCH_H -#define _BITS_PTHREADTYPES_ARCH_H 1 - -#include <endian.h> - -#define __SIZEOF_PTHREAD_ATTR_T 36 -#define __SIZEOF_PTHREAD_MUTEX_T 24 -#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 -#define __SIZEOF_PTHREAD_COND_T 48 -#define __SIZEOF_PTHREAD_CONDATTR_T 4 -#define __SIZEOF_PTHREAD_RWLOCK_T 32 -#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 -#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 -#define __ONCE_ALIGNMENT +#ifndef _RWLOCK_INTERNAL_H +#define _RWLOCK_INTERNAL_H struct __pthread_rwlock_arch_t { @@ -48,24 +27,45 @@ struct __pthread_rwlock_arch_t unsigned int __writers_futex; unsigned int __pad3; unsigned int __pad4; -#if __BYTE_ORDER == __BIG_ENDIAN +#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 +# 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 +# endif int __cur_writer; +#endif }; -#define __PTHREAD_RWLOCK_ELISION_EXTRA 0 +#if _MIPS_SIM == _ABI64 +# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags +#else +# if __BYTE_ORDER == __BIG_ENDIAN +# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags, 0 +# else +# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \ + 0, 0, 0, 0, 0, 0, __flags, 0, 0, 0, 0 +# endif +#endif -#endif /* bits/pthreadtypes.h */
\ No newline at end of file +#endif
\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/sys_errlist.h b/lib/libc/include/generic-glibc/bits/sys_errlist.h index ed5216ef84..ae30302397 100644 --- a/lib/libc/include/generic-glibc/bits/sys_errlist.h +++ b/lib/libc/include/generic-glibc/bits/sys_errlist.h @@ -1,5 +1,5 @@ /* Declare sys_errlist and sys_nerr, or don't. Compatibility (do) 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _STDIO_H # error "Never include <bits/sys_errlist.h> directly; use <stdio.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/syscall.h b/lib/libc/include/generic-glibc/bits/syscall.h index 0fb3664008..a1f9bcb306 100644 --- a/lib/libc/include/generic-glibc/bits/syscall.h +++ b/lib/libc/include/generic-glibc/bits/syscall.h @@ -1,11 +1,11 @@ /* Generated at libc build time from syscall list. */ -/* The system call list corresponds to kernel 5.2. */ +/* The system call list corresponds to kernel 5.4. */ #ifndef _SYSCALL_H # error "Never use <bits/syscall.h> directly; include <sys/syscall.h> instead." #endif -#define __GLIBC_LINUX_VERSION_CODE 328192 +#define __GLIBC_LINUX_VERSION_CODE 328704 #ifdef __NR_FAST_atomic_update # define SYS_FAST_atomic_update __NR_FAST_atomic_update @@ -207,6 +207,10 @@ # define SYS_clone2 __NR_clone2 #endif +#ifdef __NR_clone3 +# define SYS_clone3 __NR_clone3 +#endif + #ifdef __NR_close # define SYS_close __NR_close #endif @@ -1547,6 +1551,10 @@ # define SYS_personality __NR_personality #endif +#ifdef __NR_pidfd_open +# define SYS_pidfd_open __NR_pidfd_open +#endif + #ifdef __NR_pidfd_send_signal # define SYS_pidfd_send_signal __NR_pidfd_send_signal #endif diff --git a/lib/libc/include/generic-glibc/bits/syslog-ldbl.h b/lib/libc/include/generic-glibc/bits/syslog-ldbl.h index 310c8e5914..8f46907bef 100644 --- a/lib/libc/include/generic-glibc/bits/syslog-ldbl.h +++ b/lib/libc/include/generic-glibc/bits/syslog-ldbl.h @@ -1,5 +1,5 @@ /* -mlong-double-64 compatibility mode for syslog functions. - 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SYSLOG_H # error "Never include <bits/syslog-ldbl.h> directly; use <sys/syslog.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/syslog-path.h b/lib/libc/include/generic-glibc/bits/syslog-path.h index d2c7facd41..6f733fa528 100644 --- a/lib/libc/include/generic-glibc/bits/syslog-path.h +++ b/lib/libc/include/generic-glibc/bits/syslog-path.h @@ -1,5 +1,5 @@ /* <bits/syslog-path.h> -- _PATH_LOG definition - 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SYSLOG_H # error "Never include this file directly. Use <sys/syslog.h> instead" diff --git a/lib/libc/include/generic-glibc/bits/syslog.h b/lib/libc/include/generic-glibc/bits/syslog.h index b5d3b1253a..b36025933f 100644 --- a/lib/libc/include/generic-glibc/bits/syslog.h +++ b/lib/libc/include/generic-glibc/bits/syslog.h @@ -1,5 +1,5 @@ /* Checking macros for syslog functions. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SYSLOG_H # error "Never include <bits/syslog.h> directly; use <sys/syslog.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/sysmacros.h b/lib/libc/include/generic-glibc/bits/sysmacros.h index 9826bee454..9f8c82a7e4 100644 --- a/lib/libc/include/generic-glibc/bits/sysmacros.h +++ b/lib/libc/include/generic-glibc/bits/sysmacros.h @@ -1,5 +1,5 @@ /* Definitions of macros to access `dev_t' values. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SYSMACROS_H #define _BITS_SYSMACROS_H 1 diff --git a/lib/libc/include/generic-glibc/bits/termios-baud.h b/lib/libc/include/generic-glibc/bits/termios-baud.h index 0a45696eb0..5a1af58d8d 100644 --- a/lib/libc/include/generic-glibc/bits/termios-baud.h +++ b/lib/libc/include/generic-glibc/bits/termios-baud.h @@ -1,5 +1,5 @@ /* termios baud rate selection definitions. Linux/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,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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-baud.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/termios-c_cc.h b/lib/libc/include/generic-glibc/bits/termios-c_cc.h index d8989f0e57..d3bd2f43d0 100644 --- a/lib/libc/include/generic-glibc/bits/termios-c_cc.h +++ b/lib/libc/include/generic-glibc/bits/termios-c_cc.h @@ -1,5 +1,5 @@ /* termios c_cc symbolic constant definitions. Linux/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,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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios_c_cc.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/termios-c_cflag.h b/lib/libc/include/generic-glibc/bits/termios-c_cflag.h index b89364c194..941ce42cf1 100644 --- a/lib/libc/include/generic-glibc/bits/termios-c_cflag.h +++ b/lib/libc/include/generic-glibc/bits/termios-c_cflag.h @@ -1,5 +1,5 @@ /* termios control mode definitions. Linux/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,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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-c_cflag.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/termios-c_iflag.h b/lib/libc/include/generic-glibc/bits/termios-c_iflag.h index 260a6991bf..a5d02f772d 100644 --- a/lib/libc/include/generic-glibc/bits/termios-c_iflag.h +++ b/lib/libc/include/generic-glibc/bits/termios-c_iflag.h @@ -1,5 +1,5 @@ /* termios input mode definitions. Linux/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,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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-ciflags.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/termios-c_lflag.h b/lib/libc/include/generic-glibc/bits/termios-c_lflag.h index 7283177b37..a8f7c3013a 100644 --- a/lib/libc/include/generic-glibc/bits/termios-c_lflag.h +++ b/lib/libc/include/generic-glibc/bits/termios-c_lflag.h @@ -1,5 +1,5 @@ /* termios local mode definitions. Linux/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,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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-c_lflag.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/termios-c_oflag.h b/lib/libc/include/generic-glibc/bits/termios-c_oflag.h index ea059ffb53..053d357ff4 100644 --- a/lib/libc/include/generic-glibc/bits/termios-c_oflag.h +++ b/lib/libc/include/generic-glibc/bits/termios-c_oflag.h @@ -1,5 +1,5 @@ /* termios output mode definitions. Linux/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,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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-c_oflag.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/termios-misc.h b/lib/libc/include/generic-glibc/bits/termios-misc.h index cb6aa40196..517bc6bd02 100644 --- a/lib/libc/include/generic-glibc/bits/termios-misc.h +++ b/lib/libc/include/generic-glibc/bits/termios-misc.h @@ -1,5 +1,5 @@ /* termios baud platform specific definitions. Linux/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,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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-misc.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/termios-struct.h b/lib/libc/include/generic-glibc/bits/termios-struct.h index d36d804dea..9d95c8c579 100644 --- a/lib/libc/include/generic-glibc/bits/termios-struct.h +++ b/lib/libc/include/generic-glibc/bits/termios-struct.h @@ -1,5 +1,5 @@ /* struct termios definition. Linux/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,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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-struct.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/termios-tcflow.h b/lib/libc/include/generic-glibc/bits/termios-tcflow.h index cff2b50ae3..76d26c48bf 100644 --- a/lib/libc/include/generic-glibc/bits/termios-tcflow.h +++ b/lib/libc/include/generic-glibc/bits/termios-tcflow.h @@ -1,5 +1,5 @@ /* termios tcflag symbolic contants definitions. Linux/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,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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-tcflow.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/termios.h b/lib/libc/include/generic-glibc/bits/termios.h index 0a7b44245a..9dc4df22fe 100644 --- a/lib/libc/include/generic-glibc/bits/termios.h +++ b/lib/libc/include/generic-glibc/bits/termios.h @@ -1,5 +1,5 @@ /* termios type and macro definitions. Linux version. - 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. 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/thread-shared-types.h b/lib/libc/include/generic-glibc/bits/thread-shared-types.h index e29c1693eb..ac0c7f5370 100644 --- a/lib/libc/include/generic-glibc/bits/thread-shared-types.h +++ b/lib/libc/include/generic-glibc/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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 <bits/pthreadtypes-arch.h> + /* 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 - -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. - - Concurrency notes: - The __kind of a mutex is initialized either by the static - PTHREAD_MUTEX_INITIALIZER or by a call to pthread_mutex_init. - - 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. - - 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 -}; + +/* 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: + + 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. + + 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with + atomic operations. + + 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization. + It should initialize the mutex internal flag. */ + +#include <bits/struct_mutex.h> + +/* 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 <bits/struct_rwlock.h> /* Common definition of pthread_cond_t. */ diff --git a/lib/libc/include/generic-glibc/bits/time.h b/lib/libc/include/generic-glibc/bits/time.h index d4e4b39011..f26ca4c52e 100644 --- a/lib/libc/include/generic-glibc/bits/time.h +++ b/lib/libc/include/generic-glibc/bits/time.h @@ -1,5 +1,5 @@ /* System-dependent timing definitions. Linux 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * Never include this file directly; use <time.h> instead. diff --git a/lib/libc/include/generic-glibc/bits/time64.h b/lib/libc/include/generic-glibc/bits/time64.h index 79be9dbdd3..a985244493 100644 --- a/lib/libc/include/generic-glibc/bits/time64.h +++ b/lib/libc/include/generic-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_TYPES_H # error "Never include <bits/time64.h> directly; use <sys/types.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/timerfd.h b/lib/libc/include/generic-glibc/bits/timerfd.h index 5c765a54eb..56def31a3f 100644 --- a/lib/libc/include/generic-glibc/bits/timerfd.h +++ b/lib/libc/include/generic-glibc/bits/timerfd.h @@ -1,4 +1,4 @@ -/* 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_TIMERFD_H # error "Never use <bits/timerfd.h> directly; include <sys/timerfd.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/timesize.h b/lib/libc/include/generic-glibc/bits/timesize.h index 87ca919823..5260dbb5aa 100644 --- a/lib/libc/include/generic-glibc/bits/timesize.h +++ b/lib/libc/include/generic-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <bits/wordsize.h> diff --git a/lib/libc/include/generic-glibc/bits/timex.h b/lib/libc/include/generic-glibc/bits/timex.h index d6b311bd66..2eadd1de42 100644 --- a/lib/libc/include/generic-glibc/bits/timex.h +++ b/lib/libc/include/generic-glibc/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_TIMEX_H #define _BITS_TIMEX_H 1 diff --git a/lib/libc/include/generic-glibc/bits/types.h b/lib/libc/include/generic-glibc/bits/types.h index 3548ed5a4a..26fbc0be67 100644 --- a/lib/libc/include/generic-glibc/bits/types.h +++ b/lib/libc/include/generic-glibc/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * Never include this file directly; use <sys/types.h> instead. diff --git a/lib/libc/include/generic-glibc/bits/types/__locale_t.h b/lib/libc/include/generic-glibc/bits/types/__locale_t.h index e10c17ea45..32601b1906 100644 --- a/lib/libc/include/generic-glibc/bits/types/__locale_t.h +++ b/lib/libc/include/generic-glibc/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 <drepper@cygnus.com>, 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_TYPES___LOCALE_T_H #define _BITS_TYPES___LOCALE_T_H 1 diff --git a/lib/libc/include/generic-glibc/bits/types/__sigval_t.h b/lib/libc/include/generic-glibc/bits/types/__sigval_t.h index 41dbe90169..514e46667b 100644 --- a/lib/libc/include/generic-glibc/bits/types/__sigval_t.h +++ b/lib/libc/include/generic-glibc/bits/types/__sigval_t.h @@ -1,5 +1,5 @@ /* Define __sigval_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. 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef ____sigval_t_defined #define ____sigval_t_defined diff --git a/lib/libc/include/generic-glibc/bits/types/cookie_io_functions_t.h b/lib/libc/include/generic-glibc/bits/types/cookie_io_functions_t.h index 347ed487cf..e96dd46f5e 100644 --- a/lib/libc/include/generic-glibc/bits/types/cookie_io_functions_t.h +++ b/lib/libc/include/generic-glibc/bits/types/cookie_io_functions_t.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef __cookie_io_functions_t_defined #define __cookie_io_functions_t_defined 1 diff --git a/lib/libc/include/generic-glibc/bits/types/error_t.h b/lib/libc/include/generic-glibc/bits/types/error_t.h index 8fcce919c1..ddf3d52bd3 100644 --- a/lib/libc/include/generic-glibc/bits/types/error_t.h +++ b/lib/libc/include/generic-glibc/bits/types/error_t.h @@ -1,5 +1,5 @@ /* Define error_t. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef __error_t_defined # define __error_t_defined 1 diff --git a/lib/libc/include/generic-glibc/bits/types/locale_t.h b/lib/libc/include/generic-glibc/bits/types/locale_t.h index a73720ca8c..8e89ef26ab 100644 --- a/lib/libc/include/generic-glibc/bits/types/locale_t.h +++ b/lib/libc/include/generic-glibc/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_TYPES_LOCALE_T_H #define _BITS_TYPES_LOCALE_T_H 1 diff --git a/lib/libc/include/generic-glibc/bits/types/stack_t.h b/lib/libc/include/generic-glibc/bits/types/stack_t.h index b41fefd5c9..884afcf179 100644 --- a/lib/libc/include/generic-glibc/bits/types/stack_t.h +++ b/lib/libc/include/generic-glibc/bits/types/stack_t.h @@ -1,5 +1,5 @@ /* Define stack_t. Linux 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef __stack_t_defined #define __stack_t_defined 1 diff --git a/lib/libc/include/generic-glibc/bits/types/struct_FILE.h b/lib/libc/include/generic-glibc/bits/types/struct_FILE.h index 88d164686f..57103e93d9 100644 --- a/lib/libc/include/generic-glibc/bits/types/struct_FILE.h +++ b/lib/libc/include/generic-glibc/bits/types/struct_FILE.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef __struct_FILE_defined #define __struct_FILE_defined 1 diff --git a/lib/libc/include/generic-glibc/bits/types/struct_iovec.h b/lib/libc/include/generic-glibc/bits/types/struct_iovec.h index a3937da5e3..4eff4361ac 100644 --- a/lib/libc/include/generic-glibc/bits/types/struct_iovec.h +++ b/lib/libc/include/generic-glibc/bits/types/struct_iovec.h @@ -1,5 +1,5 @@ /* Define struct iovec. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef __iovec_defined #define __iovec_defined 1 diff --git a/lib/libc/include/generic-glibc/bits/types/struct_rusage.h b/lib/libc/include/generic-glibc/bits/types/struct_rusage.h index 9abe8f8d30..2f221efc93 100644 --- a/lib/libc/include/generic-glibc/bits/types/struct_rusage.h +++ b/lib/libc/include/generic-glibc/bits/types/struct_rusage.h @@ -1,5 +1,5 @@ /* Define struct rusage. - 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef __rusage_defined #define __rusage_defined 1 diff --git a/lib/libc/include/generic-glibc/bits/types/struct_sched_param.h b/lib/libc/include/generic-glibc/bits/types/struct_sched_param.h index 3f933d7fed..4bb70691dc 100644 --- a/lib/libc/include/generic-glibc/bits/types/struct_sched_param.h +++ b/lib/libc/include/generic-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_TYPES_STRUCT_SCHED_PARAM #define _BITS_TYPES_STRUCT_SCHED_PARAM 1 diff --git a/lib/libc/include/generic-glibc/bits/types/struct_sigstack.h b/lib/libc/include/generic-glibc/bits/types/struct_sigstack.h index dce240f435..ae11f9aa6a 100644 --- a/lib/libc/include/generic-glibc/bits/types/struct_sigstack.h +++ b/lib/libc/include/generic-glibc/bits/types/struct_sigstack.h @@ -1,5 +1,5 @@ /* Define struct sigstack. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef __sigstack_defined #define __sigstack_defined 1 diff --git a/lib/libc/include/generic-glibc/bits/types/struct_statx.h b/lib/libc/include/generic-glibc/bits/types/struct_statx.h index 52ae740099..37e91e85ec 100644 --- a/lib/libc/include/generic-glibc/bits/types/struct_statx.h +++ b/lib/libc/include/generic-glibc/bits/types/struct_statx.h @@ -1,5 +1,5 @@ /* Definition of the generic version of struct statx. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_STAT_H # error Never include <bits/types/struct_statx.h> directly, include <sys/stat.h> instead. diff --git a/lib/libc/include/generic-glibc/bits/types/struct_statx_timestamp.h b/lib/libc/include/generic-glibc/bits/types/struct_statx_timestamp.h index 786c2b5f9b..129078d44a 100644 --- a/lib/libc/include/generic-glibc/bits/types/struct_statx_timestamp.h +++ b/lib/libc/include/generic-glibc/bits/types/struct_statx_timestamp.h @@ -1,5 +1,5 @@ /* Definition of the generic version of struct statx_timestamp. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_STAT_H # error Never include <bits/types/struct_statx_timestamp.h> directly, include <sys/stat.h> instead. diff --git a/lib/libc/include/generic-glibc/bits/types/struct_timespec.h b/lib/libc/include/generic-glibc/bits/types/struct_timespec.h index 549169d773..3df95ada11 100644 --- a/lib/libc/include/generic-glibc/bits/types/struct_timespec.h +++ b/lib/libc/include/generic-glibc/bits/types/struct_timespec.h @@ -3,13 +3,26 @@ #define _STRUCT_TIMESPEC 1 #include <bits/types.h> +#include <bits/endian.h> /* 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
\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/typesizes.h b/lib/libc/include/generic-glibc/bits/typesizes.h index 3b14877438..571d285ea0 100644 --- a/lib/libc/include/generic-glibc/bits/typesizes.h +++ b/lib/libc/include/generic-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_TYPES_H # error "Never include <bits/typesizes.h> directly; use <sys/types.h> 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/include/generic-glibc/bits/uintn-identity.h b/lib/libc/include/generic-glibc/bits/uintn-identity.h index dab940a94d..c5fa8c5a13 100644 --- a/lib/libc/include/generic-glibc/bits/uintn-identity.h +++ b/lib/libc/include/generic-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _NETINET_IN_H && !defined _ENDIAN_H # error "Never use <bits/uintn-identity.h> directly; include <netinet/in.h> or <endian.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/uio-ext.h b/lib/libc/include/generic-glibc/bits/uio-ext.h index da9a4971b5..5bac34c7cb 100644 --- a/lib/libc/include/generic-glibc/bits/uio-ext.h +++ b/lib/libc/include/generic-glibc/bits/uio-ext.h @@ -1,5 +1,5 @@ /* Operating system-specific extensions to sys/uio.h - Linux 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_UIO_EXT_H #define _BITS_UIO_EXT_H 1 diff --git a/lib/libc/include/generic-glibc/bits/uio_lim.h b/lib/libc/include/generic-glibc/bits/uio_lim.h index b725c44f7b..52da2737ea 100644 --- a/lib/libc/include/generic-glibc/bits/uio_lim.h +++ b/lib/libc/include/generic-glibc/bits/uio_lim.h @@ -1,5 +1,5 @@ /* Implementation limits related to sys/uio.h - Linux 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_UIO_LIM_H #define _BITS_UIO_LIM_H 1 diff --git a/lib/libc/include/generic-glibc/bits/unistd.h b/lib/libc/include/generic-glibc/bits/unistd.h index 45fa1d6a8a..9cad6847f9 100644 --- a/lib/libc/include/generic-glibc/bits/unistd.h +++ b/lib/libc/include/generic-glibc/bits/unistd.h @@ -1,5 +1,5 @@ /* Checking macros for unistd functions. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _UNISTD_H # error "Never include <bits/unistd.h> directly; use <unistd.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/unistd_ext.h b/lib/libc/include/generic-glibc/bits/unistd_ext.h index 4ce5a98207..ab15da337a 100644 --- a/lib/libc/include/generic-glibc/bits/unistd_ext.h +++ b/lib/libc/include/generic-glibc/bits/unistd_ext.h @@ -1,5 +1,5 @@ /* System-specific extensions of <unistd.h>, 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _UNISTD_H # error "Never include <bits/unistd_ext.h> directly; use <unistd.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/utmp.h b/lib/libc/include/generic-glibc/bits/utmp.h index ee3a0dfc43..afb073a7c0 100644 --- a/lib/libc/include/generic-glibc/bits/utmp.h +++ b/lib/libc/include/generic-glibc/bits/utmp.h @@ -1,5 +1,5 @@ -/* The `struct utmp' type, describing entries in the utmp file. GNU version. - Copyright (C) 1993-2019 Free Software Foundation, Inc. +/* The `struct utmp' type, describing entries in the utmp file. + Copyright (C) 1993-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _UTMP_H # error "Never include <bits/utmp.h> directly; use <utmp.h> instead." @@ -61,7 +61,8 @@ struct utmp pid_t ut_pid; /* Process ID of login process. */ char ut_line[UT_LINESIZE] __attribute_nonstring__; /* Devicename. */ - char ut_id[4]; /* Inittab ID. */ + char ut_id[4] + __attribute_nonstring__; /* Inittab ID. */ char ut_user[UT_NAMESIZE] __attribute_nonstring__; /* Username. */ char ut_host[UT_HOSTSIZE] diff --git a/lib/libc/include/generic-glibc/bits/utmpx.h b/lib/libc/include/generic-glibc/bits/utmpx.h index bb8a11ee12..84f0ed6ae4 100644 --- a/lib/libc/include/generic-glibc/bits/utmpx.h +++ b/lib/libc/include/generic-glibc/bits/utmpx.h @@ -1,5 +1,5 @@ /* Structures and definitions for the user accounting database. GNU version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _UTMPX_H # error "Never include <bits/utmpx.h> directly; use <utmpx.h> instead." @@ -56,10 +56,14 @@ struct utmpx { short int ut_type; /* Type of login. */ __pid_t ut_pid; /* Process ID of login process. */ - char ut_line[__UT_LINESIZE]; /* Devicename. */ - char ut_id[4]; /* Inittab ID. */ - char ut_user[__UT_NAMESIZE]; /* Username. */ - char ut_host[__UT_HOSTSIZE]; /* Hostname for remote login. */ + char ut_line[__UT_LINESIZE] + __attribute_nonstring__; /* Devicename. */ + char ut_id[4] + __attribute_nonstring__; /* Inittab ID. */ + char ut_user[__UT_NAMESIZE] + __attribute_nonstring__; /* Username. */ + char ut_host[__UT_HOSTSIZE] + __attribute_nonstring__; /* Hostname for remote login. */ struct __exit_status ut_exit; /* Exit status of a process marked as DEAD_PROCESS. */ diff --git a/lib/libc/include/generic-glibc/bits/utsname.h b/lib/libc/include/generic-glibc/bits/utsname.h index 03d6b3d7d9..9aec7b5b0b 100644 --- a/lib/libc/include/generic-glibc/bits/utsname.h +++ b/lib/libc/include/generic-glibc/bits/utsname.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_UTSNAME_H # error "Never include <bits/utsname.h> directly; use <sys/utsname.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/waitflags.h b/lib/libc/include/generic-glibc/bits/waitflags.h index d7a8d1558f..8df47ef1f4 100644 --- a/lib/libc/include/generic-glibc/bits/waitflags.h +++ b/lib/libc/include/generic-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _SYS_WAIT_H && !defined _STDLIB_H # error "Never include <bits/waitflags.h> directly; use <sys/wait.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/waitstatus.h b/lib/libc/include/generic-glibc/bits/waitstatus.h index c85b9ea5fb..8d5cd9fa89 100644 --- a/lib/libc/include/generic-glibc/bits/waitstatus.h +++ b/lib/libc/include/generic-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _SYS_WAIT_H && !defined _STDLIB_H # error "Never include <bits/waitstatus.h> directly; use <sys/wait.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/wchar-ldbl.h b/lib/libc/include/generic-glibc/bits/wchar-ldbl.h index cf6cdcfc91..3ded0fb11c 100644 --- a/lib/libc/include/generic-glibc/bits/wchar-ldbl.h +++ b/lib/libc/include/generic-glibc/bits/wchar-ldbl.h @@ -1,5 +1,5 @@ /* -mlong-double-64 compatibility mode for <wchar.h> functions. - 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _WCHAR_H # error "Never include <bits/wchar-ldbl.h> directly; use <wchar.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/wchar.h b/lib/libc/include/generic-glibc/bits/wchar.h index 214cd83b48..19a6b96a2e 100644 --- a/lib/libc/include/generic-glibc/bits/wchar.h +++ b/lib/libc/include/generic-glibc/bits/wchar.h @@ -1,5 +1,5 @@ /* wchar_t type related definitions. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_WCHAR_H #define _BITS_WCHAR_H 1 diff --git a/lib/libc/include/generic-glibc/bits/wchar2.h b/lib/libc/include/generic-glibc/bits/wchar2.h index fc915e5cd0..c3d6975342 100644 --- a/lib/libc/include/generic-glibc/bits/wchar2.h +++ b/lib/libc/include/generic-glibc/bits/wchar2.h @@ -1,5 +1,5 @@ /* Checking macros for wchar functions. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _WCHAR_H # error "Never include <bits/wchar2.h> directly; use <wchar.h> instead." diff --git a/lib/libc/include/generic-glibc/bits/wctype-wchar.h b/lib/libc/include/generic-glibc/bits/wctype-wchar.h index 78ccf69a0e..90f3927265 100644 --- a/lib/libc/include/generic-glibc/bits/wctype-wchar.h +++ b/lib/libc/include/generic-glibc/bits/wctype-wchar.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * ISO C99 Standard: 7.25 @@ -42,7 +42,7 @@ typedef unsigned long int wctype_t; endian). We define the bit value interpretations here dependent on the machine's byte order. */ -# include <endian.h> +# include <bits/endian.h> # if __BYTE_ORDER == __BIG_ENDIAN # define _ISwbit(bit) (1 << (bit)) # else /* __BYTE_ORDER == __LITTLE_ENDIAN */ diff --git a/lib/libc/include/generic-glibc/bits/wordsize.h b/lib/libc/include/generic-glibc/bits/wordsize.h index 5ac68ef994..d5ed6b4522 100644 --- a/lib/libc/include/generic-glibc/bits/wordsize.h +++ b/lib/libc/include/generic-glibc/bits/wordsize.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <sgidefs.h> diff --git a/lib/libc/include/generic-glibc/bits/xopen_lim.h b/lib/libc/include/generic-glibc/bits/xopen_lim.h index bfb27a3b58..b3d0958bbd 100644 --- a/lib/libc/include/generic-glibc/bits/xopen_lim.h +++ b/lib/libc/include/generic-glibc/bits/xopen_lim.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * Never include this file directly; use <limits.h> instead. diff --git a/lib/libc/include/generic-glibc/byteswap.h b/lib/libc/include/generic-glibc/byteswap.h index c34d216f83..ab236221f2 100644 --- a/lib/libc/include/generic-glibc/byteswap.h +++ b/lib/libc/include/generic-glibc/byteswap.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BYTESWAP_H #define _BYTESWAP_H 1 diff --git a/lib/libc/include/generic-glibc/complex.h b/lib/libc/include/generic-glibc/complex.h index ab0298b798..3a3de87d1e 100644 --- a/lib/libc/include/generic-glibc/complex.h +++ b/lib/libc/include/generic-glibc/complex.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * ISO C99: 7.3 Complex arithmetic <complex.h> diff --git a/lib/libc/include/generic-glibc/cpio.h b/lib/libc/include/generic-glibc/cpio.h index 1a7ef80162..10c1f91b8f 100644 --- a/lib/libc/include/generic-glibc/cpio.h +++ b/lib/libc/include/generic-glibc/cpio.h @@ -1,6 +1,6 @@ /* Extended cpio format from POSIX.1. This file is part of the GNU C Library. - Copyright (C) 1992-2019 Free Software Foundation, Inc. + Copyright (C) 1992-2020 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU cpio. 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _CPIO_H #define _CPIO_H 1 diff --git a/lib/libc/include/generic-glibc/crypt.h b/lib/libc/include/generic-glibc/crypt.h index 941ab7f2de..a2e9f11432 100644 --- a/lib/libc/include/generic-glibc/crypt.h +++ b/lib/libc/include/generic-glibc/crypt.h @@ -1,7 +1,7 @@ /* * UFC-crypt: ultra fast crypt(3) implementation * - * Copyright (C) 1991-2019 Free Software Foundation, Inc. + * Copyright (C) 1991-2020 Free Software Foundation, Inc. * * The GNU C Library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -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 - * <http://www.gnu.org/licenses/>. + * <https://www.gnu.org/licenses/>. * * @(#)crypt.h 1.5 12/20/96 * diff --git a/lib/libc/include/generic-glibc/ctype.h b/lib/libc/include/generic-glibc/ctype.h index 2f6b7e1c3d..47e7d3a9c3 100644 --- a/lib/libc/include/generic-glibc/ctype.h +++ b/lib/libc/include/generic-glibc/ctype.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * ISO C99 Standard 7.4: Character handling <ctype.h> @@ -36,7 +36,7 @@ __BEGIN_DECLS endian). We define the bit value interpretations here dependent on the machine's byte order. */ -# include <endian.h> +# include <bits/endian.h> # if __BYTE_ORDER == __BIG_ENDIAN # define _ISbit(bit) (1 << (bit)) # else /* __BYTE_ORDER == __LITTLE_ENDIAN */ diff --git a/lib/libc/include/generic-glibc/dirent.h b/lib/libc/include/generic-glibc/dirent.h index a74737d55c..749982ada9 100644 --- a/lib/libc/include/generic-glibc/dirent.h +++ b/lib/libc/include/generic-glibc/dirent.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * POSIX Standard: 5.1.2 Directory Operations <dirent.h> diff --git a/lib/libc/include/generic-glibc/dlfcn.h b/lib/libc/include/generic-glibc/dlfcn.h index 8fb19d4cb3..8154e47d1a 100644 --- a/lib/libc/include/generic-glibc/dlfcn.h +++ b/lib/libc/include/generic-glibc/dlfcn.h @@ -1,5 +1,5 @@ /* User functions for run-time dynamic loading. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _DLFCN_H #define _DLFCN_H 1 diff --git a/lib/libc/include/generic-glibc/elf.h b/lib/libc/include/generic-glibc/elf.h index 70a52f4318..de9cf6e57a 100644 --- a/lib/libc/include/generic-glibc/elf.h +++ b/lib/libc/include/generic-glibc/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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/include/generic-glibc/endian.h b/lib/libc/include/generic-glibc/endian.h index ab72a4ec09..efc23f0df5 100644 --- a/lib/libc/include/generic-glibc/endian.h +++ b/lib/libc/include/generic-glibc/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _ENDIAN_H #define _ENDIAN_H 1 #include <features.h> -/* 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 <bits/endian.h> -/* 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 <bits/byteswap.h> diff --git a/lib/libc/include/generic-glibc/envz.h b/lib/libc/include/generic-glibc/envz.h index 8d885acf1e..6f4e67063f 100644 --- a/lib/libc/include/generic-glibc/envz.h +++ b/lib/libc/include/generic-glibc/envz.h @@ -1,5 +1,5 @@ /* Routines for dealing with '\0' separated environment vectors - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _ENVZ_H #define _ENVZ_H 1 diff --git a/lib/libc/include/generic-glibc/err.h b/lib/libc/include/generic-glibc/err.h index 230d69151a..90cb060734 100644 --- a/lib/libc/include/generic-glibc/err.h +++ b/lib/libc/include/generic-glibc/err.h @@ -1,5 +1,5 @@ /* 4.4BSD utility functions for error messages. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _ERR_H #define _ERR_H 1 diff --git a/lib/libc/include/generic-glibc/errno.h b/lib/libc/include/generic-glibc/errno.h index 38e844ad1c..203c04a9a0 100644 --- a/lib/libc/include/generic-glibc/errno.h +++ b/lib/libc/include/generic-glibc/errno.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * ISO C99 Standard: 7.5 Errors <errno.h> diff --git a/lib/libc/include/generic-glibc/error.h b/lib/libc/include/generic-glibc/error.h index 4762169d11..fa22157daf 100644 --- a/lib/libc/include/generic-glibc/error.h +++ b/lib/libc/include/generic-glibc/error.h @@ -1,5 +1,5 @@ /* Declaration for error-reporting function - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _ERROR_H #define _ERROR_H 1 diff --git a/lib/libc/include/generic-glibc/execinfo.h b/lib/libc/include/generic-glibc/execinfo.h index 84ed135d29..47e9befbc9 100644 --- a/lib/libc/include/generic-glibc/execinfo.h +++ b/lib/libc/include/generic-glibc/execinfo.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _EXECINFO_H #define _EXECINFO_H 1 diff --git a/lib/libc/include/generic-glibc/fcntl.h b/lib/libc/include/generic-glibc/fcntl.h index 131089e8f3..a1cecb55c4 100644 --- a/lib/libc/include/generic-glibc/fcntl.h +++ b/lib/libc/include/generic-glibc/fcntl.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * POSIX Standard: 6.5 File Control Operations <fcntl.h> @@ -161,6 +161,7 @@ typedef __pid_t pid_t; # define AT_STATX_SYNC_AS_STAT 0x0000 # define AT_STATX_FORCE_SYNC 0x2000 # define AT_STATX_DONT_SYNC 0x4000 +# define AT_RECURSIVE 0x8000 /* Apply to the entire subtree. */ # endif # define AT_EACCESS 0x200 /* Test access permitted for effective IDs, not real IDs. */ diff --git a/lib/libc/include/generic-glibc/features.h b/lib/libc/include/generic-glibc/features.h index b95876b732..21e01848fa 100644 --- a/lib/libc/include/generic-glibc/features.h +++ b/lib/libc/include/generic-glibc/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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/include/generic-glibc/fenv.h b/lib/libc/include/generic-glibc/fenv.h index 7d402ffd2e..0df8e06d17 100644 --- a/lib/libc/include/generic-glibc/fenv.h +++ b/lib/libc/include/generic-glibc/fenv.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * ISO C99 7.6: Floating-point environment <fenv.h> @@ -77,7 +77,7 @@ extern int fegetexceptflag (fexcept_t *__flagp, int __excepts) __THROW; /* Raise the supported exceptions represented by EXCEPTS. */ extern int feraiseexcept (int __excepts) __THROW; -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) /* Set the supported exception flags represented by EXCEPTS, without causing enabled traps to be taken. */ extern int fesetexcept (int __excepts) __THROW; @@ -91,7 +91,7 @@ extern int fesetexceptflag (const fexcept_t *__flagp, int __excepts) __THROW; currently set. */ extern int fetestexcept (int __excepts) __THROW; -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) /* Determine which of subset of the exceptions specified by EXCEPTS are set in *FLAGP. */ extern int fetestexceptflag (const fexcept_t *__flagp, int __excepts) __THROW; @@ -130,7 +130,7 @@ extern int feupdateenv (const fenv_t *__envp) __THROW; /* Control modes. */ -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) /* Store the current floating-point control modes in the object pointed to by MODEP. */ extern int fegetmode (femode_t *__modep) __THROW; @@ -147,7 +147,7 @@ extern int fesetmode (const femode_t *__modep) __THROW; /* NaN support. */ -#if (__GLIBC_USE (IEC_60559_BFP_EXT) \ +#if (__GLIBC_USE (IEC_60559_BFP_EXT_C2X) \ && defined FE_INVALID \ && defined __SUPPORT_SNAN__) # define FE_SNANS_ALWAYS_SIGNAL 1 diff --git a/lib/libc/include/generic-glibc/finclude/math-vector-fortran.h b/lib/libc/include/generic-glibc/finclude/math-vector-fortran.h index 2209132e2c..d348de2ba8 100644 --- a/lib/libc/include/generic-glibc/finclude/math-vector-fortran.h +++ b/lib/libc/include/generic-glibc/finclude/math-vector-fortran.h @@ -1,5 +1,5 @@ ! Platform-specific declarations of SIMD math functions for Fortran. -*- f90 -*- -! 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,6 +14,6 @@ ! ! You should have received a copy of the GNU Lesser General Public ! License along with the GNU C Library; if not, see -! <http://www.gnu.org/licenses/>. +! <https://www.gnu.org/licenses/>. ! No SIMD math functions are available for this platform.
\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/fmtmsg.h b/lib/libc/include/generic-glibc/fmtmsg.h index 23a647dff5..d5a747857a 100644 --- a/lib/libc/include/generic-glibc/fmtmsg.h +++ b/lib/libc/include/generic-glibc/fmtmsg.h @@ -1,5 +1,5 @@ /* Message display handling. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef __FMTMSG_H #define __FMTMSG_H 1 diff --git a/lib/libc/include/generic-glibc/fnmatch.h b/lib/libc/include/generic-glibc/fnmatch.h index 82be4e6d2e..a3db95e9ce 100644 --- a/lib/libc/include/generic-glibc/fnmatch.h +++ b/lib/libc/include/generic-glibc/fnmatch.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FNMATCH_H #define _FNMATCH_H 1 diff --git a/lib/libc/include/generic-glibc/fpregdef.h b/lib/libc/include/generic-glibc/fpregdef.h index 81d5bc90ee..5729b54a90 100644 --- a/lib/libc/include/generic-glibc/fpregdef.h +++ b/lib/libc/include/generic-glibc/fpregdef.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FPREGDEF_H #define _FPREGDEF_H diff --git a/lib/libc/include/generic-glibc/fpu_control.h b/lib/libc/include/generic-glibc/fpu_control.h index fd9c1247ed..d5aa21113b 100644 --- a/lib/libc/include/generic-glibc/fpu_control.h +++ b/lib/libc/include/generic-glibc/fpu_control.h @@ -1,7 +1,6 @@ /* FPU control word bits. Mips 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. - Contributed by Olaf Flebbe and Ralf Baechle. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -15,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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FPU_CONTROL_H #define _FPU_CONTROL_H diff --git a/lib/libc/include/generic-glibc/fts.h b/lib/libc/include/generic-glibc/fts.h index 79488cead3..3ae4e30544 100644 --- a/lib/libc/include/generic-glibc/fts.h +++ b/lib/libc/include/generic-glibc/fts.h @@ -1,5 +1,5 @@ /* File tree traversal functions declarations. - 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * Copyright (c) 1989, 1993 diff --git a/lib/libc/include/generic-glibc/ftw.h b/lib/libc/include/generic-glibc/ftw.h index 5bf8022270..498b96a5d0 100644 --- a/lib/libc/include/generic-glibc/ftw.h +++ b/lib/libc/include/generic-glibc/ftw.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * X/Open Portability Guide 4.2: ftw.h diff --git a/lib/libc/include/generic-glibc/gconv.h b/lib/libc/include/generic-glibc/gconv.h index d5500cf7ca..0999ee4ee7 100644 --- a/lib/libc/include/generic-glibc/gconv.h +++ b/lib/libc/include/generic-glibc/gconv.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* This header provides no interface for a user to the internals of the gconv implementation in the libc. Therefore there is no use diff --git a/lib/libc/include/generic-glibc/getopt.h b/lib/libc/include/generic-glibc/getopt.h index 1fdd5e9868..64dde19021 100644 --- a/lib/libc/include/generic-glibc/getopt.h +++ b/lib/libc/include/generic-glibc/getopt.h @@ -1,5 +1,5 @@ /* Declarations for getopt. - Copyright (C) 1989-2019 Free Software Foundation, Inc. + Copyright (C) 1989-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. Unlike the bulk of the getopt implementation, this file is NOT part of gnulib; gnulib also has a getopt.h but it is different. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _GETOPT_H #define _GETOPT_H 1 diff --git a/lib/libc/include/generic-glibc/glob.h b/lib/libc/include/generic-glibc/glob.h index 7455af54d0..1de9742bc0 100644 --- a/lib/libc/include/generic-glibc/glob.h +++ b/lib/libc/include/generic-glibc/glob.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _GLOB_H #define _GLOB_H 1 diff --git a/lib/libc/include/generic-glibc/gnu-versions.h b/lib/libc/include/generic-glibc/gnu-versions.h index 9a096f270a..557411b4c2 100644 --- a/lib/libc/include/generic-glibc/gnu-versions.h +++ b/lib/libc/include/generic-glibc/gnu-versions.h @@ -1,5 +1,5 @@ /* Header with interface version macros for library pieces copied elsewhere. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _GNU_VERSIONS_H #define _GNU_VERSIONS_H 1 diff --git a/lib/libc/include/generic-glibc/gnu/libc-version.h b/lib/libc/include/generic-glibc/gnu/libc-version.h index c44452d4ac..3b0b2c8f37 100644 --- a/lib/libc/include/generic-glibc/gnu/libc-version.h +++ b/lib/libc/include/generic-glibc/gnu/libc-version.h @@ -1,5 +1,5 @@ /* Interface to GNU libc specific functions for version information. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _GNU_LIBC_VERSION_H #define _GNU_LIBC_VERSION_H 1 diff --git a/lib/libc/include/generic-glibc/grp.h b/lib/libc/include/generic-glibc/grp.h index 98248f0ec4..f0edfc67d9 100644 --- a/lib/libc/include/generic-glibc/grp.h +++ b/lib/libc/include/generic-glibc/grp.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * POSIX Standard: 9.2.1 Group Database Access <grp.h> diff --git a/lib/libc/include/generic-glibc/gshadow.h b/lib/libc/include/generic-glibc/gshadow.h index c193898c77..b71866ae13 100644 --- a/lib/libc/include/generic-glibc/gshadow.h +++ b/lib/libc/include/generic-glibc/gshadow.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2009-2019 Free Software Foundation, Inc. +/* Copyright (C) 2009-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* Declaration of types and functions for shadow group suite. */ diff --git a/lib/libc/include/generic-glibc/iconv.h b/lib/libc/include/generic-glibc/iconv.h index 009a0bdae2..cec0ffd235 100644 --- a/lib/libc/include/generic-glibc/iconv.h +++ b/lib/libc/include/generic-glibc/iconv.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _ICONV_H #define _ICONV_H 1 diff --git a/lib/libc/include/generic-glibc/ieee754.h b/lib/libc/include/generic-glibc/ieee754.h index 017e197b75..714f12c300 100644 --- a/lib/libc/include/generic-glibc/ieee754.h +++ b/lib/libc/include/generic-glibc/ieee754.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,14 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _IEEE754_H - #define _IEEE754_H 1 + #include <features.h> -#include <endian.h> +#include <bits/endian.h> __BEGIN_DECLS diff --git a/lib/libc/include/generic-glibc/ifaddrs.h b/lib/libc/include/generic-glibc/ifaddrs.h index 8e3d2a29bd..0cee010fa4 100644 --- a/lib/libc/include/generic-glibc/ifaddrs.h +++ b/lib/libc/include/generic-glibc/ifaddrs.h @@ -1,5 +1,5 @@ /* ifaddrs.h -- declarations for getting network interface addresses - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _IFADDRS_H #define _IFADDRS_H 1 diff --git a/lib/libc/include/generic-glibc/inttypes.h b/lib/libc/include/generic-glibc/inttypes.h index 022f637443..61b4464bb3 100644 --- a/lib/libc/include/generic-glibc/inttypes.h +++ b/lib/libc/include/generic-glibc/inttypes.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * ISO C99: 7.8 Format conversion of integer types <inttypes.h> diff --git a/lib/libc/include/generic-glibc/langinfo.h b/lib/libc/include/generic-glibc/langinfo.h index 21af0ba68c..58136e3c87 100644 --- a/lib/libc/include/generic-glibc/langinfo.h +++ b/lib/libc/include/generic-glibc/langinfo.h @@ -1,5 +1,5 @@ /* Access to locale-dependent parameters. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _LANGINFO_H #define _LANGINFO_H 1 diff --git a/lib/libc/include/generic-glibc/libgen.h b/lib/libc/include/generic-glibc/libgen.h index 756a914c9b..8cab6ad40b 100644 --- a/lib/libc/include/generic-glibc/libgen.h +++ b/lib/libc/include/generic-glibc/libgen.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _LIBGEN_H #define _LIBGEN_H 1 diff --git a/lib/libc/include/generic-glibc/libintl.h b/lib/libc/include/generic-glibc/libintl.h index cd0dadb4c4..ace47b01ab 100644 --- a/lib/libc/include/generic-glibc/libintl.h +++ b/lib/libc/include/generic-glibc/libintl.h @@ -1,5 +1,5 @@ /* Message catalogs for internationalization. - 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. This file is derived from the file libgettext.h in the GNU gettext package. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _LIBINTL_H #define _LIBINTL_H 1 diff --git a/lib/libc/include/generic-glibc/limits.h b/lib/libc/include/generic-glibc/limits.h index 5eb71cbbde..96ad92cc80 100644 --- a/lib/libc/include/generic-glibc/limits.h +++ b/lib/libc/include/generic-glibc/limits.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * ISO C99 Standard: 7.10/5.2.4.2.1 Sizes of integer types <limits.h> @@ -142,7 +142,7 @@ /* The integer width macros are not defined by GCC's <limits.h> before GCC 7, or if _GNU_SOURCE rather than __STDC_WANT_IEC_60559_BFP_EXT__ is used to enable this feature. */ -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) # ifndef CHAR_WIDTH # define CHAR_WIDTH 8 # endif diff --git a/lib/libc/include/generic-glibc/link.h b/lib/libc/include/generic-glibc/link.h index 90cf2730ac..1f4e089dd6 100644 --- a/lib/libc/include/generic-glibc/link.h +++ b/lib/libc/include/generic-glibc/link.h @@ -1,6 +1,6 @@ /* Data structure for communication from the run-time dynamic linker for loaded ELF shared objects. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _LINK_H #define _LINK_H 1 diff --git a/lib/libc/include/generic-glibc/locale.h b/lib/libc/include/generic-glibc/locale.h index 90f1985b11..02ef91c937 100644 --- a/lib/libc/include/generic-glibc/locale.h +++ b/lib/libc/include/generic-glibc/locale.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * ISO C99 Standard: 7.11 Localization <locale.h> diff --git a/lib/libc/include/generic-glibc/malloc.h b/lib/libc/include/generic-glibc/malloc.h index 684e19581d..ebddb55e58 100644 --- a/lib/libc/include/generic-glibc/malloc.h +++ b/lib/libc/include/generic-glibc/malloc.h @@ -1,5 +1,5 @@ /* Prototypes and definition for malloc implementation. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _MALLOC_H #define _MALLOC_H 1 @@ -71,8 +71,7 @@ extern void *valloc (size_t __size) __THROW __attribute_malloc__ /* Equivalent to valloc(minimum-page-that-holds(n)), that is, round up __size to nearest pagesize. */ -extern void *pvalloc (size_t __size) __THROW __attribute_malloc__ - __attribute_alloc_size__ ((1)) __wur; +extern void *pvalloc (size_t __size) __THROW __attribute_malloc__ __wur; /* Underlying allocation function; successive calls should return contiguous pieces of memory. */ diff --git a/lib/libc/include/generic-glibc/math.h b/lib/libc/include/generic-glibc/math.h index a4b822ece8..9b3f228199 100644 --- a/lib/libc/include/generic-glibc/math.h +++ b/lib/libc/include/generic-glibc/math.h @@ -1,5 +1,5 @@ /* Declarations for math functions. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * ISO C99 Standard: 7.12 Mathematics <math.h> @@ -104,7 +104,7 @@ __BEGIN_DECLS # endif #endif /* __USE_ISOC99 */ -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) /* Signaling NaN macros, if supported. */ # if __GNUC_PREREQ (3, 3) # define SNANF (__builtin_nansf ("")) @@ -200,7 +200,7 @@ typedef _Float128x double_t; # define FP_ILOGBNAN 2147483647 # endif #endif -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) # if __WORDSIZE == 32 # define __FP_LONG_MAX 0x7fffffffL # else @@ -232,7 +232,7 @@ typedef _Float128x double_t; #include <bits/fp-fast.h> -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) /* Rounding direction macros for fromfp functions. */ enum { @@ -495,7 +495,7 @@ extern long double __REDIRECT_NTH (nexttowardl, #define __MATHCALL_NARROW(func, redir, nargs) \ __MATHCALL_NARROW_NORMAL (func, nargs) -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) # define _Mret_ float # define _Marg_ double @@ -969,7 +969,7 @@ enum #endif /* Use ISO C99. */ -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) # include <bits/iscanonical.h> /* Return nonzero value if X is a signaling NaN. */ @@ -1245,228 +1245,8 @@ iszero (__T __val) # include <bits/mathinline.h> #endif -/* Define special entry points to use when the compiler got told to - only expect finite results. */ -#if defined __FINITE_MATH_ONLY__ && __FINITE_MATH_ONLY__ > 0 - -/* Include bits/math-finite.h for double. */ -# define _Mdouble_ double -# define __MATH_DECLARING_DOUBLE 1 -# define __MATH_DECLARING_FLOATN 0 -# define __REDIRFROM_X(function, reentrant) \ - function ## reentrant -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## reentrant ## _finite -# include <bits/math-finite.h> -# undef _Mdouble_ -# undef __MATH_DECLARING_DOUBLE -# undef __MATH_DECLARING_FLOATN -# undef __REDIRFROM_X -# undef __REDIRTO_X - -/* When __USE_ISOC99 is defined, include math-finite for float and - long double, as well. */ -# ifdef __USE_ISOC99 - -/* Include bits/math-finite.h for float. */ -# define _Mdouble_ float -# define __MATH_DECLARING_DOUBLE 0 -# define __MATH_DECLARING_FLOATN 0 -# define __REDIRFROM_X(function, reentrant) \ - function ## f ## reentrant -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## f ## reentrant ## _finite -# include <bits/math-finite.h> -# undef _Mdouble_ -# undef __MATH_DECLARING_DOUBLE -# undef __MATH_DECLARING_FLOATN -# undef __REDIRFROM_X -# undef __REDIRTO_X - -/* Include bits/math-finite.h for long double. */ -# ifdef __MATH_DECLARE_LDOUBLE -# define _Mdouble_ long double -# define __MATH_DECLARING_DOUBLE 0 -# define __MATH_DECLARING_FLOATN 0 -# define __REDIRFROM_X(function, reentrant) \ - function ## l ## reentrant -# ifdef __NO_LONG_DOUBLE_MATH -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## reentrant ## _finite -# else -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## l ## reentrant ## _finite -# endif -# include <bits/math-finite.h> -# undef _Mdouble_ -# undef __MATH_DECLARING_DOUBLE -# undef __MATH_DECLARING_FLOATN -# undef __REDIRFROM_X -# undef __REDIRTO_X -# endif - -# endif /* __USE_ISOC99. */ - -/* Include bits/math-finite.h for _FloatN and _FloatNx. */ - -# if (__HAVE_DISTINCT_FLOAT16 || (__HAVE_FLOAT16 && !defined _LIBC)) \ - && __GLIBC_USE (IEC_60559_TYPES_EXT) -# define _Mdouble_ _Float16 -# define __MATH_DECLARING_DOUBLE 0 -# define __MATH_DECLARING_FLOATN 1 -# define __REDIRFROM_X(function, reentrant) \ - function ## f16 ## reentrant -# if __HAVE_DISTINCT_FLOAT16 -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## f16 ## reentrant ## _finite -# else -# error "non-disinct _Float16" -# endif -# include <bits/math-finite.h> -# undef _Mdouble_ -# undef __MATH_DECLARING_DOUBLE -# undef __MATH_DECLARING_FLOATN -# undef __REDIRFROM_X -# undef __REDIRTO_X -# endif - -# if (__HAVE_DISTINCT_FLOAT32 || (__HAVE_FLOAT32 && !defined _LIBC)) \ - && __GLIBC_USE (IEC_60559_TYPES_EXT) -# define _Mdouble_ _Float32 -# define __MATH_DECLARING_DOUBLE 0 -# define __MATH_DECLARING_FLOATN 1 -# define __REDIRFROM_X(function, reentrant) \ - function ## f32 ## reentrant -# if __HAVE_DISTINCT_FLOAT32 -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## f32 ## reentrant ## _finite -# else -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## f ## reentrant ## _finite -# endif -# include <bits/math-finite.h> -# undef _Mdouble_ -# undef __MATH_DECLARING_DOUBLE -# undef __MATH_DECLARING_FLOATN -# undef __REDIRFROM_X -# undef __REDIRTO_X -# endif - -# if (__HAVE_DISTINCT_FLOAT64 || (__HAVE_FLOAT64 && !defined _LIBC)) \ - && __GLIBC_USE (IEC_60559_TYPES_EXT) -# define _Mdouble_ _Float64 -# define __MATH_DECLARING_DOUBLE 0 -# define __MATH_DECLARING_FLOATN 1 -# define __REDIRFROM_X(function, reentrant) \ - function ## f64 ## reentrant -# if __HAVE_DISTINCT_FLOAT64 -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## f64 ## reentrant ## _finite -# else -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## reentrant ## _finite -# endif -# include <bits/math-finite.h> -# undef _Mdouble_ -# undef __MATH_DECLARING_DOUBLE -# undef __MATH_DECLARING_FLOATN -# undef __REDIRFROM_X -# undef __REDIRTO_X -# endif - -# if (__HAVE_DISTINCT_FLOAT128 || (__HAVE_FLOAT128 && !defined _LIBC)) \ - && __GLIBC_USE (IEC_60559_TYPES_EXT) -# define _Mdouble_ _Float128 -# define __MATH_DECLARING_DOUBLE 0 -# define __MATH_DECLARING_FLOATN 1 -# define __REDIRFROM_X(function, reentrant) \ - function ## f128 ## reentrant -# if __HAVE_DISTINCT_FLOAT128 -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## f128 ## reentrant ## _finite -# else -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## l ## reentrant ## _finite -# endif -# include <bits/math-finite.h> -# undef _Mdouble_ -# undef __MATH_DECLARING_DOUBLE -# undef __MATH_DECLARING_FLOATN -# undef __REDIRFROM_X -# undef __REDIRTO_X -# endif - -# if (__HAVE_DISTINCT_FLOAT32X || (__HAVE_FLOAT32X && !defined _LIBC)) \ - && __GLIBC_USE (IEC_60559_TYPES_EXT) -# define _Mdouble_ _Float32x -# define __MATH_DECLARING_DOUBLE 0 -# define __MATH_DECLARING_FLOATN 1 -# define __REDIRFROM_X(function, reentrant) \ - function ## f32x ## reentrant -# if __HAVE_DISTINCT_FLOAT32X -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## f32x ## reentrant ## _finite -# else -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## reentrant ## _finite -# endif -# include <bits/math-finite.h> -# undef _Mdouble_ -# undef __MATH_DECLARING_DOUBLE -# undef __MATH_DECLARING_FLOATN -# undef __REDIRFROM_X -# undef __REDIRTO_X -# endif - -# if (__HAVE_DISTINCT_FLOAT64X || (__HAVE_FLOAT64X && !defined _LIBC)) \ - && __GLIBC_USE (IEC_60559_TYPES_EXT) -# define _Mdouble_ _Float64x -# define __MATH_DECLARING_DOUBLE 0 -# define __MATH_DECLARING_FLOATN 1 -# define __REDIRFROM_X(function, reentrant) \ - function ## f64x ## reentrant -# if __HAVE_DISTINCT_FLOAT64X -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## f64x ## reentrant ## _finite -# elif __HAVE_FLOAT64X_LONG_DOUBLE -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## l ## reentrant ## _finite -# else -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## f128 ## reentrant ## _finite -# endif -# include <bits/math-finite.h> -# undef _Mdouble_ -# undef __MATH_DECLARING_DOUBLE -# undef __MATH_DECLARING_FLOATN -# undef __REDIRFROM_X -# undef __REDIRTO_X -# endif - -# if (__HAVE_DISTINCT_FLOAT128X || (__HAVE_FLOAT128X && !defined _LIBC)) \ - && __GLIBC_USE (IEC_60559_TYPES_EXT) -# define _Mdouble_ _Float128x -# define __MATH_DECLARING_DOUBLE 0 -# define __MATH_DECLARING_FLOATN 1 -# define __REDIRFROM_X(function, reentrant) \ - function ## f128x ## reentrant -# if __HAVE_DISTINCT_FLOAT128X -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## f128x ## reentrant ## _finite -# else -# error "non-disinct _Float128x" -# endif -# include <bits/math-finite.h> -# undef _Mdouble_ -# undef __MATH_DECLARING_DOUBLE -# undef __MATH_DECLARING_FLOATN -# undef __REDIRFROM_X -# undef __REDIRTO_X -# endif - -#endif /* __FINITE_MATH_ONLY__ > 0. */ -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) /* An expression whose type has the widest of the evaluation formats of X and Y (which are of floating-point types). */ # if __FLT_EVAL_METHOD__ == 2 || __FLT_EVAL_METHOD__ > 64 diff --git a/lib/libc/include/generic-glibc/mcheck.h b/lib/libc/include/generic-glibc/mcheck.h index 1feb2df973..9814deb4f3 100644 --- a/lib/libc/include/generic-glibc/mcheck.h +++ b/lib/libc/include/generic-glibc/mcheck.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _MCHECK_H #define _MCHECK_H 1 diff --git a/lib/libc/include/generic-glibc/memory.h b/lib/libc/include/generic-glibc/memory.h index 09a9893564..7b2abf85e4 100644 --- a/lib/libc/include/generic-glibc/memory.h +++ b/lib/libc/include/generic-glibc/memory.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * SVID diff --git a/lib/libc/include/generic-glibc/mntent.h b/lib/libc/include/generic-glibc/mntent.h index ce9129ae3d..d258606765 100644 --- a/lib/libc/include/generic-glibc/mntent.h +++ b/lib/libc/include/generic-glibc/mntent.h @@ -1,5 +1,5 @@ /* Utilities for reading/writing fstab, mtab, etc. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _MNTENT_H #define _MNTENT_H 1 diff --git a/lib/libc/include/generic-glibc/monetary.h b/lib/libc/include/generic-glibc/monetary.h index c226c11e07..d7789d087a 100644 --- a/lib/libc/include/generic-glibc/monetary.h +++ b/lib/libc/include/generic-glibc/monetary.h @@ -1,5 +1,5 @@ /* Header file for monetary value formatting functions. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _MONETARY_H #define _MONETARY_H 1 diff --git a/lib/libc/include/generic-glibc/mqueue.h b/lib/libc/include/generic-glibc/mqueue.h index bb686c7852..9aa3a28bbf 100644 --- a/lib/libc/include/generic-glibc/mqueue.h +++ b/lib/libc/include/generic-glibc/mqueue.h @@ -1,4 +1,4 @@ -/* 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _MQUEUE_H #define _MQUEUE_H 1 diff --git a/lib/libc/include/generic-glibc/net/ethernet.h b/lib/libc/include/generic-glibc/net/ethernet.h index b2cac55c7c..bc4b0d44a7 100644 --- a/lib/libc/include/generic-glibc/net/ethernet.h +++ b/lib/libc/include/generic-glibc/net/ethernet.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* Based on the FreeBSD version of this file. Curiously, that file lacks a copyright in the header. */ diff --git a/lib/libc/include/generic-glibc/net/if.h b/lib/libc/include/generic-glibc/net/if.h index bab1fa605d..799d254b99 100644 --- a/lib/libc/include/generic-glibc/net/if.h +++ b/lib/libc/include/generic-glibc/net/if.h @@ -1,5 +1,5 @@ /* net/if.h -- declarations for inquiring about network interfaces - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _NET_IF_H #define _NET_IF_H 1 diff --git a/lib/libc/include/generic-glibc/net/if_arp.h b/lib/libc/include/generic-glibc/net/if_arp.h index 94da234f01..df31965129 100644 --- a/lib/libc/include/generic-glibc/net/if_arp.h +++ b/lib/libc/include/generic-glibc/net/if_arp.h @@ -1,5 +1,5 @@ /* Definitions for Address Resolution Protocol. - 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 <drepper@cygnus.com>, 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* Based on the 4.4BSD and Linux version of this file. */ diff --git a/lib/libc/include/generic-glibc/net/if_packet.h b/lib/libc/include/generic-glibc/net/if_packet.h index 171360234e..599694a607 100644 --- a/lib/libc/include/generic-glibc/net/if_packet.h +++ b/lib/libc/include/generic-glibc/net/if_packet.h @@ -1,5 +1,5 @@ /* Definitions for use with Linux SOCK_PACKET sockets. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef __IF_PACKET_H #define __IF_PACKET_H diff --git a/lib/libc/include/generic-glibc/net/if_shaper.h b/lib/libc/include/generic-glibc/net/if_shaper.h index be307d1591..09ecbc2880 100644 --- a/lib/libc/include/generic-glibc/net/if_shaper.h +++ b/lib/libc/include/generic-glibc/net/if_shaper.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _NET_IF_SHAPER_H #define _NET_IF_SHAPER_H 1 diff --git a/lib/libc/include/generic-glibc/net/if_slip.h b/lib/libc/include/generic-glibc/net/if_slip.h index 4468bb2e40..ca4571e906 100644 --- a/lib/libc/include/generic-glibc/net/if_slip.h +++ b/lib/libc/include/generic-glibc/net/if_slip.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _NET_IF_SLIP_H #define _NET_IF_SLIP_H 1 diff --git a/lib/libc/include/generic-glibc/net/route.h b/lib/libc/include/generic-glibc/net/route.h index a3fccf0d4d..7e8361b292 100644 --- a/lib/libc/include/generic-glibc/net/route.h +++ b/lib/libc/include/generic-glibc/net/route.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* Based on the 4.4BSD and Linux version of this file. */ diff --git a/lib/libc/include/generic-glibc/netash/ash.h b/lib/libc/include/generic-glibc/netash/ash.h index 32e295ed5f..86d1a0c1b6 100644 --- a/lib/libc/include/generic-glibc/netash/ash.h +++ b/lib/libc/include/generic-glibc/netash/ash.h @@ -1,5 +1,5 @@ /* Definitions for use with Linux AF_ASH sockets. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _NETASH_ASH_H #define _NETASH_ASH_H 1 diff --git a/lib/libc/include/generic-glibc/netatalk/at.h b/lib/libc/include/generic-glibc/netatalk/at.h index 6059953b86..8c4d89817f 100644 --- a/lib/libc/include/generic-glibc/netatalk/at.h +++ b/lib/libc/include/generic-glibc/netatalk/at.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _NETATALK_AT_H #define _NETATALK_AT_H 1 diff --git a/lib/libc/include/generic-glibc/netax25/ax25.h b/lib/libc/include/generic-glibc/netax25/ax25.h index b3bee3f857..c4abe6ee36 100644 --- a/lib/libc/include/generic-glibc/netax25/ax25.h +++ b/lib/libc/include/generic-glibc/netax25/ax25.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _NETAX25_AX25_H #define _NETAX25_AX25_H 1 diff --git a/lib/libc/include/generic-glibc/netdb.h b/lib/libc/include/generic-glibc/netdb.h index b203c3316d..6f0b628d3b 100644 --- a/lib/libc/include/generic-glibc/netdb.h +++ b/lib/libc/include/generic-glibc/netdb.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* All data returned by the network data base library are supplied in host order and returned in network order (suitable for use in diff --git a/lib/libc/include/generic-glibc/neteconet/ec.h b/lib/libc/include/generic-glibc/neteconet/ec.h index 2a18f3c84f..79488deab2 100644 --- a/lib/libc/include/generic-glibc/neteconet/ec.h +++ b/lib/libc/include/generic-glibc/neteconet/ec.h @@ -1,5 +1,5 @@ /* Definitions for use with Linux AF_ECONET sockets. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _NETECONET_EC_H #define _NETECONET_EC_H 1 diff --git a/lib/libc/include/generic-glibc/netinet/ether.h b/lib/libc/include/generic-glibc/netinet/ether.h index 9a8cfd6692..8d89555cfa 100644 --- a/lib/libc/include/generic-glibc/netinet/ether.h +++ b/lib/libc/include/generic-glibc/netinet/ether.h @@ -1,5 +1,5 @@ /* Functions for storing Ethernet addresses in ASCII and mapping to hostnames. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _NETINET_ETHER_H #define _NETINET_ETHER_H 1 diff --git a/lib/libc/include/generic-glibc/netinet/icmp6.h b/lib/libc/include/generic-glibc/netinet/icmp6.h index db162d85e9..0d1da5d26c 100644 --- a/lib/libc/include/generic-glibc/netinet/icmp6.h +++ b/lib/libc/include/generic-glibc/netinet/icmp6.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _NETINET_ICMP6_H #define _NETINET_ICMP6_H 1 diff --git a/lib/libc/include/generic-glibc/netinet/if_ether.h b/lib/libc/include/generic-glibc/netinet/if_ether.h index e8df7b6ac8..7373ee35f3 100644 --- a/lib/libc/include/generic-glibc/netinet/if_ether.h +++ b/lib/libc/include/generic-glibc/netinet/if_ether.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef __NETINET_IF_ETHER_H diff --git a/lib/libc/include/generic-glibc/netinet/if_fddi.h b/lib/libc/include/generic-glibc/netinet/if_fddi.h index 93038b44d0..5f1ecd7504 100644 --- a/lib/libc/include/generic-glibc/netinet/if_fddi.h +++ b/lib/libc/include/generic-glibc/netinet/if_fddi.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _NETINET_IF_FDDI_H #define _NETINET_IF_FDDI_H 1 diff --git a/lib/libc/include/generic-glibc/netinet/if_tr.h b/lib/libc/include/generic-glibc/netinet/if_tr.h index 78d6e95983..33f70bcc7f 100644 --- a/lib/libc/include/generic-glibc/netinet/if_tr.h +++ b/lib/libc/include/generic-glibc/netinet/if_tr.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _NETINET_IF_TR_H #define _NETINET_IF_TR_H 1 diff --git a/lib/libc/include/generic-glibc/netinet/igmp.h b/lib/libc/include/generic-glibc/netinet/igmp.h index 1502d9ab03..eea3f6cdb9 100644 --- a/lib/libc/include/generic-glibc/netinet/igmp.h +++ b/lib/libc/include/generic-glibc/netinet/igmp.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _NETINET_IGMP_H #define _NETINET_IGMP_H 1 diff --git a/lib/libc/include/generic-glibc/netinet/in.h b/lib/libc/include/generic-glibc/netinet/in.h index d02bbd5caf..bcca1ad51e 100644 --- a/lib/libc/include/generic-glibc/netinet/in.h +++ b/lib/libc/include/generic-glibc/netinet/in.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _NETINET_IN_H #define _NETINET_IN_H 1 diff --git a/lib/libc/include/generic-glibc/netinet/in_systm.h b/lib/libc/include/generic-glibc/netinet/in_systm.h index 39e22c836a..d24e9ecbc8 100644 --- a/lib/libc/include/generic-glibc/netinet/in_systm.h +++ b/lib/libc/include/generic-glibc/netinet/in_systm.h @@ -1,5 +1,5 @@ /* System specific type definitions for networking code. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _NETINET_IN_SYSTM_H #define _NETINET_IN_SYSTM_H 1 diff --git a/lib/libc/include/generic-glibc/netinet/ip.h b/lib/libc/include/generic-glibc/netinet/ip.h index 260c6ed6b4..27703025d0 100644 --- a/lib/libc/include/generic-glibc/netinet/ip.h +++ b/lib/libc/include/generic-glibc/netinet/ip.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef __NETINET_IP_H #define __NETINET_IP_H 1 diff --git a/lib/libc/include/generic-glibc/netinet/ip6.h b/lib/libc/include/generic-glibc/netinet/ip6.h index e596a9d442..12ee883e48 100644 --- a/lib/libc/include/generic-glibc/netinet/ip6.h +++ b/lib/libc/include/generic-glibc/netinet/ip6.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _NETINET_IP6_H #define _NETINET_IP6_H 1 diff --git a/lib/libc/include/generic-glibc/netinet/ip_icmp.h b/lib/libc/include/generic-glibc/netinet/ip_icmp.h index fde3a57536..5937dd614b 100644 --- a/lib/libc/include/generic-glibc/netinet/ip_icmp.h +++ b/lib/libc/include/generic-glibc/netinet/ip_icmp.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef __NETINET_IP_ICMP_H #define __NETINET_IP_ICMP_H 1 diff --git a/lib/libc/include/generic-glibc/netinet/tcp.h b/lib/libc/include/generic-glibc/netinet/tcp.h index 8b2fd6e469..ec933410c9 100644 --- a/lib/libc/include/generic-glibc/netinet/tcp.h +++ b/lib/libc/include/generic-glibc/netinet/tcp.h @@ -79,6 +79,7 @@ #define TCP_INQ 36 /* Notify bytes available to read as a cmsg on read. */ #define TCP_CM_INQ TCP_INQ +#define TCP_TX_DELAY 37 /* Delay outgoing packets by XX usec. */ #define TCP_REPAIR_ON 1 #define TCP_REPAIR_OFF 0 diff --git a/lib/libc/include/generic-glibc/netinet/udp.h b/lib/libc/include/generic-glibc/netinet/udp.h index c2c87b3201..50fcbf1e20 100644 --- a/lib/libc/include/generic-glibc/netinet/udp.h +++ b/lib/libc/include/generic-glibc/netinet/udp.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * Copyright (C) 1982, 1986 Regents of the University of California. diff --git a/lib/libc/include/generic-glibc/netipx/ipx.h b/lib/libc/include/generic-glibc/netipx/ipx.h index 61ef23842a..3808131607 100644 --- a/lib/libc/include/generic-glibc/netipx/ipx.h +++ b/lib/libc/include/generic-glibc/netipx/ipx.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef __NETIPX_IPX_H #define __NETIPX_IPX_H 1 diff --git a/lib/libc/include/generic-glibc/netiucv/iucv.h b/lib/libc/include/generic-glibc/netiucv/iucv.h index 6e7a6e924e..05be5b78b0 100644 --- a/lib/libc/include/generic-glibc/netiucv/iucv.h +++ b/lib/libc/include/generic-glibc/netiucv/iucv.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2019 Free Software Foundation, Inc. +/* Copyright (C) 2007-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef __NETIUCV_IUCV_H #define __NETIUCV_IUCV_H 1 diff --git a/lib/libc/include/generic-glibc/netpacket/packet.h b/lib/libc/include/generic-glibc/netpacket/packet.h index ab6f56d704..84866bea75 100644 --- a/lib/libc/include/generic-glibc/netpacket/packet.h +++ b/lib/libc/include/generic-glibc/netpacket/packet.h @@ -1,5 +1,5 @@ /* Definitions for use with Linux AF_PACKET sockets. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef __NETPACKET_PACKET_H #define __NETPACKET_PACKET_H 1 diff --git a/lib/libc/include/generic-glibc/netrom/netrom.h b/lib/libc/include/generic-glibc/netrom/netrom.h index 02ac57cbd2..6852343cd0 100644 --- a/lib/libc/include/generic-glibc/netrom/netrom.h +++ b/lib/libc/include/generic-glibc/netrom/netrom.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _NETROM_NETROM_H #define _NETROM_NETROM_H 1 diff --git a/lib/libc/include/generic-glibc/netrose/rose.h b/lib/libc/include/generic-glibc/netrose/rose.h index 9a1fd4e4e3..411b2dd558 100644 --- a/lib/libc/include/generic-glibc/netrose/rose.h +++ b/lib/libc/include/generic-glibc/netrose/rose.h @@ -1,5 +1,5 @@ /* Definitions for Rose packet radio address family. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* What follows is copied from the 2.1.93 <linux/rose.h>. */ diff --git a/lib/libc/include/generic-glibc/nl_types.h b/lib/libc/include/generic-glibc/nl_types.h index a6959c250f..bd2de64903 100644 --- a/lib/libc/include/generic-glibc/nl_types.h +++ b/lib/libc/include/generic-glibc/nl_types.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _NL_TYPES_H #define _NL_TYPES_H 1 diff --git a/lib/libc/include/generic-glibc/nss.h b/lib/libc/include/generic-glibc/nss.h index 0ab00b3976..d24028cc4f 100644 --- a/lib/libc/include/generic-glibc/nss.h +++ b/lib/libc/include/generic-glibc/nss.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* Define interface to NSS. This is meant for the interface functions and for implementors of new services. */ diff --git a/lib/libc/include/generic-glibc/obstack.h b/lib/libc/include/generic-glibc/obstack.h index 41182e5e76..d1188b9d45 100644 --- a/lib/libc/include/generic-glibc/obstack.h +++ b/lib/libc/include/generic-glibc/obstack.h @@ -1,5 +1,5 @@ /* obstack.h - object stack macros - Copyright (C) 1988-2019 Free Software Foundation, Inc. + Copyright (C) 1988-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* Summary: diff --git a/lib/libc/include/generic-glibc/printf.h b/lib/libc/include/generic-glibc/printf.h index 9d84edb8de..eaf489649e 100644 --- a/lib/libc/include/generic-glibc/printf.h +++ b/lib/libc/include/generic-glibc/printf.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _PRINTF_H diff --git a/lib/libc/include/generic-glibc/proc_service.h b/lib/libc/include/generic-glibc/proc_service.h index 6453259309..ec3c29113f 100644 --- a/lib/libc/include/generic-glibc/proc_service.h +++ b/lib/libc/include/generic-glibc/proc_service.h @@ -1,5 +1,5 @@ /* Callback interface for libthread_db, functions users must define. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _PROC_SERVICE_H #define _PROC_SERVICE_H 1 diff --git a/lib/libc/include/generic-glibc/pthread.h b/lib/libc/include/generic-glibc/pthread.h index 2a93e215c4..b9914a0d45 100644 --- a/lib/libc/include/generic-glibc/pthread.h +++ b/lib/libc/include/generic-glibc/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _PTHREAD_H #define _PTHREAD_H 1 #include <features.h> -#include <endian.h> #include <sched.h> #include <time.h> +#include <bits/endian.h> #include <bits/pthreadtypes.h> #include <bits/setjmp.h> #include <bits/wordsize.h> @@ -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/include/generic-glibc/pty.h b/lib/libc/include/generic-glibc/pty.h index c58f91d871..3de99240b5 100644 --- a/lib/libc/include/generic-glibc/pty.h +++ b/lib/libc/include/generic-glibc/pty.h @@ -1,5 +1,5 @@ /* Functions for pseudo TTY handling. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _PTY_H #define _PTY_H 1 diff --git a/lib/libc/include/generic-glibc/pwd.h b/lib/libc/include/generic-glibc/pwd.h index fc27f27b55..31490f7e54 100644 --- a/lib/libc/include/generic-glibc/pwd.h +++ b/lib/libc/include/generic-glibc/pwd.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * POSIX Standard: 9.2.2 User Database Access <pwd.h> diff --git a/lib/libc/include/generic-glibc/re_comp.h b/lib/libc/include/generic-glibc/re_comp.h index 286d6def40..17d76d286d 100644 --- a/lib/libc/include/generic-glibc/re_comp.h +++ b/lib/libc/include/generic-glibc/re_comp.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _RE_COMP_H #define _RE_COMP_H 1 diff --git a/lib/libc/include/generic-glibc/regdef.h b/lib/libc/include/generic-glibc/regdef.h index 1dda0c1d14..70b10f9878 100644 --- a/lib/libc/include/generic-glibc/regdef.h +++ b/lib/libc/include/generic-glibc/regdef.h @@ -1,6 +1,5 @@ -/* 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. - Contributed by Ralf Baechle <ralf@gnu.org>. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -14,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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _REGDEF_H #define _REGDEF_H diff --git a/lib/libc/include/generic-glibc/regex.h b/lib/libc/include/generic-glibc/regex.h index 07ad6904bd..289d4ee036 100644 --- a/lib/libc/include/generic-glibc/regex.h +++ b/lib/libc/include/generic-glibc/regex.h @@ -1,6 +1,6 @@ /* Definitions for data structures and routines for the regular expression library. - Copyright (C) 1985, 1989-2019 Free Software Foundation, Inc. + Copyright (C) 1985, 1989-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 diff --git a/lib/libc/include/generic-glibc/regexp.h b/lib/libc/include/generic-glibc/regexp.h index a6859a8150..6b9fd00707 100644 --- a/lib/libc/include/generic-glibc/regexp.h +++ b/lib/libc/include/generic-glibc/regexp.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. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _REGEXP_H #define _REGEXP_H 1 diff --git a/lib/libc/include/generic-glibc/resolv.h b/lib/libc/include/generic-glibc/resolv.h index 184e6a0074..55f0916179 100644 --- a/lib/libc/include/generic-glibc/resolv.h +++ b/lib/libc/include/generic-glibc/resolv.h @@ -131,6 +131,7 @@ struct res_sym { #define RES_NOTLDQUERY 0x01000000 /* Do not look up unqualified name as a TLD. */ #define RES_NORELOAD 0x02000000 /* No automatic configuration reload. */ +#define RES_TRUSTAD 0x04000000 /* Request AD bit, keep it in responses. */ #define RES_DEFAULT (RES_RECURSE|RES_DEFNAMES|RES_DNSRCH) diff --git a/lib/libc/include/generic-glibc/sched.h b/lib/libc/include/generic-glibc/sched.h index 6eb7011789..61a8a3d6ca 100644 --- a/lib/libc/include/generic-glibc/sched.h +++ b/lib/libc/include/generic-glibc/sched.h @@ -1,5 +1,5 @@ /* Definitions for POSIX 1003.1b-1993 (aka POSIX.4) 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SCHED_H #define _SCHED_H 1 diff --git a/lib/libc/include/generic-glibc/scsi/scsi.h b/lib/libc/include/generic-glibc/scsi/scsi.h index 7b09167bd3..c46d0aef31 100644 --- a/lib/libc/include/generic-glibc/scsi/scsi.h +++ b/lib/libc/include/generic-glibc/scsi/scsi.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * This header file contains public constants and structures used by diff --git a/lib/libc/include/generic-glibc/scsi/scsi_ioctl.h b/lib/libc/include/generic-glibc/scsi/scsi_ioctl.h index 4943136506..d8e56c5398 100644 --- a/lib/libc/include/generic-glibc/scsi/scsi_ioctl.h +++ b/lib/libc/include/generic-glibc/scsi/scsi_ioctl.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SCSI_IOCTL_H #define _SCSI_IOCTL_H diff --git a/lib/libc/include/generic-glibc/scsi/sg.h b/lib/libc/include/generic-glibc/scsi/sg.h index f6bb1fdee4..4061126ae0 100644 --- a/lib/libc/include/generic-glibc/scsi/sg.h +++ b/lib/libc/include/generic-glibc/scsi/sg.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* History: diff --git a/lib/libc/include/generic-glibc/search.h b/lib/libc/include/generic-glibc/search.h index 8ea7603891..45983e9a32 100644 --- a/lib/libc/include/generic-glibc/search.h +++ b/lib/libc/include/generic-glibc/search.h @@ -1,5 +1,5 @@ /* Declarations for System V style searching functions. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SEARCH_H #define _SEARCH_H 1 diff --git a/lib/libc/include/generic-glibc/semaphore.h b/lib/libc/include/generic-glibc/semaphore.h index 595dec7abd..2ac9a183f2 100644 --- a/lib/libc/include/generic-glibc/semaphore.h +++ b/lib/libc/include/generic-glibc/semaphore.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SEMAPHORE_H #define _SEMAPHORE_H 1 diff --git a/lib/libc/include/generic-glibc/setjmp.h b/lib/libc/include/generic-glibc/setjmp.h index e2e00228fa..0087a1b231 100644 --- a/lib/libc/include/generic-glibc/setjmp.h +++ b/lib/libc/include/generic-glibc/setjmp.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * ISO C99 Standard: 7.13 Nonlocal jumps <setjmp.h> diff --git a/lib/libc/include/generic-glibc/sgidefs.h b/lib/libc/include/generic-glibc/sgidefs.h index a22a208cea..269d4e781e 100644 --- a/lib/libc/include/generic-glibc/sgidefs.h +++ b/lib/libc/include/generic-glibc/sgidefs.h @@ -1,6 +1,5 @@ -/* 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. - Contributed by Ralf Baechle <ralf@gnu.org>. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -14,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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SGIDEFS_H #define _SGIDEFS_H 1 diff --git a/lib/libc/include/generic-glibc/sgtty.h b/lib/libc/include/generic-glibc/sgtty.h index 20b10efaa3..1aec65ced9 100644 --- a/lib/libc/include/generic-glibc/sgtty.h +++ b/lib/libc/include/generic-glibc/sgtty.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SGTTY_H #define _SGTTY_H 1 diff --git a/lib/libc/include/generic-glibc/shadow.h b/lib/libc/include/generic-glibc/shadow.h index 9e7fbd09b5..78f019b70f 100644 --- a/lib/libc/include/generic-glibc/shadow.h +++ b/lib/libc/include/generic-glibc/shadow.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* Declaration of types and functions for "shadow" storage of hashed passphrases. The shadow database is like the user database, but is diff --git a/lib/libc/include/generic-glibc/signal.h b/lib/libc/include/generic-glibc/signal.h index 12999bc8de..7fa19ea215 100644 --- a/lib/libc/include/generic-glibc/signal.h +++ b/lib/libc/include/generic-glibc/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * ISO C99 Standard: 7.14 Signal handling <signal.h> diff --git a/lib/libc/include/generic-glibc/spawn.h b/lib/libc/include/generic-glibc/spawn.h index 4391078604..565b802d26 100644 --- a/lib/libc/include/generic-glibc/spawn.h +++ b/lib/libc/include/generic-glibc/spawn.h @@ -1,5 +1,5 @@ /* Definitions for POSIX spawn interface. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SPAWN_H #define _SPAWN_H 1 diff --git a/lib/libc/include/generic-glibc/stdc-predef.h b/lib/libc/include/generic-glibc/stdc-predef.h index 78afe72d4b..35c821b2c2 100644 --- a/lib/libc/include/generic-glibc/stdc-predef.h +++ b/lib/libc/include/generic-glibc/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _STDC_PREDEF_H #define _STDC_PREDEF_H 1 diff --git a/lib/libc/include/generic-glibc/stdint.h b/lib/libc/include/generic-glibc/stdint.h index 8867249d22..3d1358c219 100644 --- a/lib/libc/include/generic-glibc/stdint.h +++ b/lib/libc/include/generic-glibc/stdint.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * ISO C99: 7.18 Integer types <stdint.h> @@ -273,7 +273,7 @@ typedef __uintmax_t uintmax_t; # define UINTMAX_C(c) c ## ULL # endif -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) # define INT8_WIDTH 8 # define UINT8_WIDTH 8 diff --git a/lib/libc/include/generic-glibc/stdio.h b/lib/libc/include/generic-glibc/stdio.h index 2aee4e206e..7b5485826b 100644 --- a/lib/libc/include/generic-glibc/stdio.h +++ b/lib/libc/include/generic-glibc/stdio.h @@ -1,5 +1,5 @@ /* Define ISO C stdio on top of C++ iostreams. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * ISO C99 Standard: 7.19 Input/output <stdio.h> diff --git a/lib/libc/include/generic-glibc/stdio_ext.h b/lib/libc/include/generic-glibc/stdio_ext.h index dfe1c1167b..bc5282abee 100644 --- a/lib/libc/include/generic-glibc/stdio_ext.h +++ b/lib/libc/include/generic-glibc/stdio_ext.h @@ -1,5 +1,5 @@ /* Functions to access FILE structure internals. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* This header contains the same definitions as the header of the same name on Sun's Solaris OS. */ diff --git a/lib/libc/include/generic-glibc/stdlib.h b/lib/libc/include/generic-glibc/stdlib.h index cfe0bf3318..115bcee92d 100644 --- a/lib/libc/include/generic-glibc/stdlib.h +++ b/lib/libc/include/generic-glibc/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * ISO C99 Standard: 7.20 General utilities <stdlib.h> @@ -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/include/generic-glibc/string.h b/lib/libc/include/generic-glibc/string.h index bd5aa6e740..423cc537ed 100644 --- a/lib/libc/include/generic-glibc/string.h +++ b/lib/libc/include/generic-glibc/string.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * ISO C99 Standard: 7.21 String handling <string.h> @@ -33,7 +33,8 @@ __BEGIN_DECLS #include <stddef.h> /* Tell the caller that we provide correct C++ prototypes. */ -#if defined __cplusplus && __GNUC_PREREQ (4, 4) +#if defined __cplusplus && (__GNUC_PREREQ (4, 4) \ + || __glibc_clang_prereq (3, 5)) # define __CORRECT_ISO_CPP_STRING_H_PROTO #endif @@ -49,7 +50,7 @@ extern void *memmove (void *__dest, const void *__src, size_t __n) /* Copy no more than N bytes of SRC to DEST, stopping when C is found. Return the position in DEST one byte past where C was copied, or NULL if C was not found in the first N bytes of SRC. */ -#if defined __USE_MISC || defined __USE_XOPEN +#if defined __USE_MISC || defined __USE_XOPEN || __GLIBC_USE (ISOC2X) extern void *memccpy (void *__restrict __dest, const void *__restrict __src, int __c, size_t __n) __THROW __nonnull ((1, 2)); @@ -161,7 +162,7 @@ extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n, #endif #if (defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 \ - || __GLIBC_USE (LIB_EXT2)) + || __GLIBC_USE (LIB_EXT2) || __GLIBC_USE (ISOC2X)) /* Duplicate S, returning an identical malloc'd string. */ extern char *strdup (const char *__s) __THROW __attribute_malloc__ __nonnull ((1)); @@ -170,7 +171,7 @@ extern char *strdup (const char *__s) /* Return a malloc'd copy of at most N bytes of STRING. The resultant string is terminated even if no null terminator appears before STRING[N]. */ -#if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2) +#if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2) || __GLIBC_USE (ISOC2X) extern char *strndup (const char *__string, size_t __n) __THROW __attribute_malloc__ __nonnull ((1)); #endif diff --git a/lib/libc/include/generic-glibc/strings.h b/lib/libc/include/generic-glibc/strings.h index 12f1af49cd..4fea1d0242 100644 --- a/lib/libc/include/generic-glibc/strings.h +++ b/lib/libc/include/generic-glibc/strings.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _STRINGS_H #define _STRINGS_H 1 diff --git a/lib/libc/include/generic-glibc/sys/acct.h b/lib/libc/include/generic-glibc/sys/acct.h index cd1bc7ce89..40ba0adb93 100644 --- a/lib/libc/include/generic-glibc/sys/acct.h +++ b/lib/libc/include/generic-glibc/sys/acct.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,14 +13,14 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_ACCT_H #define _SYS_ACCT_H 1 #include <sys/types.h> #include <stdint.h> -#include <endian.h> +#include <bits/endian.h> #include <bits/types/time_t.h> __BEGIN_DECLS diff --git a/lib/libc/include/generic-glibc/sys/asm.h b/lib/libc/include/generic-glibc/sys/asm.h index 42a2a02387..b87759216a 100644 --- a/lib/libc/include/generic-glibc/sys/asm.h +++ b/lib/libc/include/generic-glibc/sys/asm.h @@ -1,6 +1,5 @@ -/* 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 Ralf Baechle <ralf@gnu.org>. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -14,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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_ASM_H #define _SYS_ASM_H diff --git a/lib/libc/include/generic-glibc/sys/auxv.h b/lib/libc/include/generic-glibc/sys/auxv.h index 064ca2841b..e94fc7ce26 100644 --- a/lib/libc/include/generic-glibc/sys/auxv.h +++ b/lib/libc/include/generic-glibc/sys/auxv.h @@ -1,5 +1,5 @@ /* Access to the auxiliary vector. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_AUXV_H #define _SYS_AUXV_H 1 diff --git a/lib/libc/include/generic-glibc/sys/cachectl.h b/lib/libc/include/generic-glibc/sys/cachectl.h index 29fa4fd54c..798a6819da 100644 --- a/lib/libc/include/generic-glibc/sys/cachectl.h +++ b/lib/libc/include/generic-glibc/sys/cachectl.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_CACHECTL_H #define _SYS_CACHECTL_H 1 diff --git a/lib/libc/include/generic-glibc/sys/cdefs.h b/lib/libc/include/generic-glibc/sys/cdefs.h index fad2256537..8d82b634bd 100644 --- a/lib/libc/include/generic-glibc/sys/cdefs.h +++ b/lib/libc/include/generic-glibc/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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/include/generic-glibc/sys/debugreg.h b/lib/libc/include/generic-glibc/sys/debugreg.h index a870a9f3ba..b62d0a1ed0 100644 --- a/lib/libc/include/generic-glibc/sys/debugreg.h +++ b/lib/libc/include/generic-glibc/sys/debugreg.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,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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_DEBUGREG_H #define _SYS_DEBUGREG_H 1 diff --git a/lib/libc/include/generic-glibc/sys/dir.h b/lib/libc/include/generic-glibc/sys/dir.h index 2176d5ec64..6aa2cd8afc 100644 --- a/lib/libc/include/generic-glibc/sys/dir.h +++ b/lib/libc/include/generic-glibc/sys/dir.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_DIR_H #define _SYS_DIR_H 1 diff --git a/lib/libc/include/generic-glibc/sys/elf.h b/lib/libc/include/generic-glibc/sys/elf.h index ea214a1530..134b815f4c 100644 --- a/lib/libc/include/generic-glibc/sys/elf.h +++ b/lib/libc/include/generic-glibc/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_ELF_H #define _SYS_ELF_H 1 diff --git a/lib/libc/include/generic-glibc/sys/epoll.h b/lib/libc/include/generic-glibc/sys/epoll.h index cf4f949fb3..b5cad81b0d 100644 --- a/lib/libc/include/generic-glibc/sys/epoll.h +++ b/lib/libc/include/generic-glibc/sys/epoll.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_EPOLL_H #define _SYS_EPOLL_H 1 diff --git a/lib/libc/include/generic-glibc/sys/eventfd.h b/lib/libc/include/generic-glibc/sys/eventfd.h index 57eb4d0a75..656184d634 100644 --- a/lib/libc/include/generic-glibc/sys/eventfd.h +++ b/lib/libc/include/generic-glibc/sys/eventfd.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2019 Free Software Foundation, Inc. +/* Copyright (C) 2007-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_EVENTFD_H #define _SYS_EVENTFD_H 1 diff --git a/lib/libc/include/generic-glibc/sys/fanotify.h b/lib/libc/include/generic-glibc/sys/fanotify.h index 87d409605b..184c16c3f0 100644 --- a/lib/libc/include/generic-glibc/sys/fanotify.h +++ b/lib/libc/include/generic-glibc/sys/fanotify.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_FANOTIFY_H #define _SYS_FANOTIFY_H 1 diff --git a/lib/libc/include/generic-glibc/sys/file.h b/lib/libc/include/generic-glibc/sys/file.h index 15002e36f5..1de9d6f256 100644 --- a/lib/libc/include/generic-glibc/sys/file.h +++ b/lib/libc/include/generic-glibc/sys/file.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_FILE_H #define _SYS_FILE_H 1 diff --git a/lib/libc/include/generic-glibc/sys/fpregdef.h b/lib/libc/include/generic-glibc/sys/fpregdef.h index 2705ae6953..6f5c97519f 100644 --- a/lib/libc/include/generic-glibc/sys/fpregdef.h +++ b/lib/libc/include/generic-glibc/sys/fpregdef.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_FPREGDEF_H #define _SYS_FPREGDEF_H diff --git a/lib/libc/include/generic-glibc/sys/fsuid.h b/lib/libc/include/generic-glibc/sys/fsuid.h index 374c938c60..14ce7bebc6 100644 --- a/lib/libc/include/generic-glibc/sys/fsuid.h +++ b/lib/libc/include/generic-glibc/sys/fsuid.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_FSUID_H #define _SYS_FSUID_H 1 diff --git a/lib/libc/include/generic-glibc/sys/gmon_out.h b/lib/libc/include/generic-glibc/sys/gmon_out.h index 4955418ae5..9a8f34a2ff 100644 --- a/lib/libc/include/generic-glibc/sys/gmon_out.h +++ b/lib/libc/include/generic-glibc/sys/gmon_out.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. Contributed by David Mosberger <davidm@cs.arizona.edu>. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* This file specifies the format of gmon.out files. It should have as few external dependencies as possible as it is going to be included diff --git a/lib/libc/include/generic-glibc/sys/ifunc.h b/lib/libc/include/generic-glibc/sys/ifunc.h index 06e9a42847..4f1aeda818 100644 --- a/lib/libc/include/generic-glibc/sys/ifunc.h +++ b/lib/libc/include/generic-glibc/sys/ifunc.h @@ -1,5 +1,5 @@ /* Definitions used by AArch64 indirect function resolvers. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_IFUNC_H #define _SYS_IFUNC_H diff --git a/lib/libc/include/generic-glibc/sys/inotify.h b/lib/libc/include/generic-glibc/sys/inotify.h index 9358c4bb21..d175d6c302 100644 --- a/lib/libc/include/generic-glibc/sys/inotify.h +++ b/lib/libc/include/generic-glibc/sys/inotify.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_INOTIFY_H #define _SYS_INOTIFY_H 1 diff --git a/lib/libc/include/generic-glibc/sys/io.h b/lib/libc/include/generic-glibc/sys/io.h index c27e96f4af..06c4abd8c2 100644 --- a/lib/libc/include/generic-glibc/sys/io.h +++ b/lib/libc/include/generic-glibc/sys/io.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_IO_H #define _SYS_IO_H 1 diff --git a/lib/libc/include/generic-glibc/sys/ioctl.h b/lib/libc/include/generic-glibc/sys/ioctl.h index 0eef3b9c76..ba33a3969f 100644 --- a/lib/libc/include/generic-glibc/sys/ioctl.h +++ b/lib/libc/include/generic-glibc/sys/ioctl.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_IOCTL_H #define _SYS_IOCTL_H 1 diff --git a/lib/libc/include/generic-glibc/sys/ipc.h b/lib/libc/include/generic-glibc/sys/ipc.h index 63e917a561..3815ee9809 100644 --- a/lib/libc/include/generic-glibc/sys/ipc.h +++ b/lib/libc/include/generic-glibc/sys/ipc.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_IPC_H #define _SYS_IPC_H 1 diff --git a/lib/libc/include/generic-glibc/sys/kd.h b/lib/libc/include/generic-glibc/sys/kd.h index 5288b63504..322a646e1f 100644 --- a/lib/libc/include/generic-glibc/sys/kd.h +++ b/lib/libc/include/generic-glibc/sys/kd.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_KD_H #define _SYS_KD_H 1 diff --git a/lib/libc/include/generic-glibc/sys/klog.h b/lib/libc/include/generic-glibc/sys/klog.h index 65d63e15a3..ded0fc563c 100644 --- a/lib/libc/include/generic-glibc/sys/klog.h +++ b/lib/libc/include/generic-glibc/sys/klog.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_KLOG_H diff --git a/lib/libc/include/generic-glibc/sys/mman.h b/lib/libc/include/generic-glibc/sys/mman.h index a6ca6b2421..a6c19dba79 100644 --- a/lib/libc/include/generic-glibc/sys/mman.h +++ b/lib/libc/include/generic-glibc/sys/mman.h @@ -1,5 +1,5 @@ /* Definitions for BSD-style memory management. - 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_MMAN_H #define _SYS_MMAN_H 1 diff --git a/lib/libc/include/generic-glibc/sys/mount.h b/lib/libc/include/generic-glibc/sys/mount.h index 0dad8fd43a..7e1e32bb73 100644 --- a/lib/libc/include/generic-glibc/sys/mount.h +++ b/lib/libc/include/generic-glibc/sys/mount.h @@ -1,5 +1,5 @@ /* Header file for mounting/unmount Linux filesystems. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* This is taken from /usr/include/linux/fs.h. */ diff --git a/lib/libc/include/generic-glibc/sys/msg.h b/lib/libc/include/generic-glibc/sys/msg.h index 66dd700aae..d1b4fbe18b 100644 --- a/lib/libc/include/generic-glibc/sys/msg.h +++ b/lib/libc/include/generic-glibc/sys/msg.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_MSG_H #define _SYS_MSG_H diff --git a/lib/libc/include/generic-glibc/sys/mtio.h b/lib/libc/include/generic-glibc/sys/mtio.h index 5e4a217705..6ddb4c80d0 100644 --- a/lib/libc/include/generic-glibc/sys/mtio.h +++ b/lib/libc/include/generic-glibc/sys/mtio.h @@ -1,5 +1,5 @@ /* Structures and definitions for magnetic tape I/O control commands. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* Written by H. Bergman <hennus@cybercomm.nl>. */ diff --git a/lib/libc/include/generic-glibc/sys/param.h b/lib/libc/include/generic-glibc/sys/param.h index dce2138d07..763994015e 100644 --- a/lib/libc/include/generic-glibc/sys/param.h +++ b/lib/libc/include/generic-glibc/sys/param.h @@ -1,5 +1,5 @@ /* Compatibility header for old-style Unix parameters and limits. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PARAM_H #define _SYS_PARAM_H 1 diff --git a/lib/libc/include/generic-glibc/sys/pci.h b/lib/libc/include/generic-glibc/sys/pci.h index 3fa1ec585b..08944792a0 100644 --- a/lib/libc/include/generic-glibc/sys/pci.h +++ b/lib/libc/include/generic-glibc/sys/pci.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PCI_H #define _SYS_PCI_H 1 diff --git a/lib/libc/include/generic-glibc/sys/perm.h b/lib/libc/include/generic-glibc/sys/perm.h index 1caa905489..9bb49a8dec 100644 --- a/lib/libc/include/generic-glibc/sys/perm.h +++ b/lib/libc/include/generic-glibc/sys/perm.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PERM_H diff --git a/lib/libc/include/generic-glibc/sys/personality.h b/lib/libc/include/generic-glibc/sys/personality.h index 7fb977039f..bfb7c50dea 100644 --- a/lib/libc/include/generic-glibc/sys/personality.h +++ b/lib/libc/include/generic-glibc/sys/personality.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* Taken verbatim from Linux 2.6 (include/linux/personality.h). */ diff --git a/lib/libc/include/generic-glibc/sys/platform/ppc.h b/lib/libc/include/generic-glibc/sys/platform/ppc.h index 4697806a1a..235ac48d82 100644 --- a/lib/libc/include/generic-glibc/sys/platform/ppc.h +++ b/lib/libc/include/generic-glibc/sys/platform/ppc.h @@ -1,5 +1,5 @@ /* Facilities specific to the PowerPC architecture - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PLATFORM_PPC_H #define _SYS_PLATFORM_PPC_H 1 diff --git a/lib/libc/include/generic-glibc/sys/poll.h b/lib/libc/include/generic-glibc/sys/poll.h index 31dfc07ce5..7df2e2e464 100644 --- a/lib/libc/include/generic-glibc/sys/poll.h +++ b/lib/libc/include/generic-glibc/sys/poll.h @@ -1,5 +1,5 @@ /* Compatibility definitions for System V `poll' interface. - 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_POLL_H #define _SYS_POLL_H 1 diff --git a/lib/libc/include/generic-glibc/sys/prctl.h b/lib/libc/include/generic-glibc/sys/prctl.h index 994a8bee13..086ebd2828 100644 --- a/lib/libc/include/generic-glibc/sys/prctl.h +++ b/lib/libc/include/generic-glibc/sys/prctl.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PRCTL_H #define _SYS_PRCTL_H 1 diff --git a/lib/libc/include/generic-glibc/sys/procfs.h b/lib/libc/include/generic-glibc/sys/procfs.h index 22f46606d4..f76491c2e4 100644 --- a/lib/libc/include/generic-glibc/sys/procfs.h +++ b/lib/libc/include/generic-glibc/sys/procfs.h @@ -1,5 +1,5 @@ /* Definitions for core files and libthread_db. Generic Linux 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. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PROCFS_H #define _SYS_PROCFS_H 1 diff --git a/lib/libc/include/generic-glibc/sys/profil.h b/lib/libc/include/generic-glibc/sys/profil.h index f4a12d930e..364c88cca4 100644 --- a/lib/libc/include/generic-glibc/sys/profil.h +++ b/lib/libc/include/generic-glibc/sys/profil.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,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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _PROFIL_H #define _PROFIL_H 1 diff --git a/lib/libc/include/generic-glibc/sys/ptrace.h b/lib/libc/include/generic-glibc/sys/ptrace.h index 96798ed23e..b420fa1cbc 100644 --- a/lib/libc/include/generic-glibc/sys/ptrace.h +++ b/lib/libc/include/generic-glibc/sys/ptrace.h @@ -1,5 +1,5 @@ /* `ptrace' debugger support interface. Linux 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. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PTRACE_H #define _SYS_PTRACE_H 1 @@ -166,8 +166,12 @@ enum __ptrace_request #define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER /* Get seccomp BPF filter metadata. */ - PTRACE_SECCOMP_GET_METADATA = 0x420d + PTRACE_SECCOMP_GET_METADATA = 0x420d, #define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA + + /* Get information about system call. */ + PTRACE_GET_SYSCALL_INFO = 0x420e +#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO }; diff --git a/lib/libc/include/generic-glibc/sys/quota.h b/lib/libc/include/generic-glibc/sys/quota.h index ac1bac6f5b..fda0a82f92 100644 --- a/lib/libc/include/generic-glibc/sys/quota.h +++ b/lib/libc/include/generic-glibc/sys/quota.h @@ -1,5 +1,5 @@ /* This just represents the non-kernel parts of <linux/quota.h>. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * Copyright (c) 1982, 1986 Regents of the University of California. diff --git a/lib/libc/include/generic-glibc/sys/random.h b/lib/libc/include/generic-glibc/sys/random.h index 3fb74dea71..1ef7b160db 100644 --- a/lib/libc/include/generic-glibc/sys/random.h +++ b/lib/libc/include/generic-glibc/sys/random.h @@ -1,5 +1,5 @@ /* Interfaces for obtaining random bytes. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_RANDOM_H #define _SYS_RANDOM_H 1 diff --git a/lib/libc/include/generic-glibc/sys/raw.h b/lib/libc/include/generic-glibc/sys/raw.h index e29ecdba86..d6cbab03e2 100644 --- a/lib/libc/include/generic-glibc/sys/raw.h +++ b/lib/libc/include/generic-glibc/sys/raw.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_RAW_H #define _SYS_RAW_H 1 diff --git a/lib/libc/include/generic-glibc/sys/reboot.h b/lib/libc/include/generic-glibc/sys/reboot.h index d70c3e2cd6..f5f4f0ccbb 100644 --- a/lib/libc/include/generic-glibc/sys/reboot.h +++ b/lib/libc/include/generic-glibc/sys/reboot.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* This file should define RB_* macros to be used as flag bits in the argument to the `reboot' system call. */ diff --git a/lib/libc/include/generic-glibc/sys/reg.h b/lib/libc/include/generic-glibc/sys/reg.h index 3f02ddc8e2..f470369646 100644 --- a/lib/libc/include/generic-glibc/sys/reg.h +++ b/lib/libc/include/generic-glibc/sys/reg.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,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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_REG_H #define _SYS_REG_H 1 diff --git a/lib/libc/include/generic-glibc/sys/regdef.h b/lib/libc/include/generic-glibc/sys/regdef.h index d28efcf2b8..a0dd8d1cd9 100644 --- a/lib/libc/include/generic-glibc/sys/regdef.h +++ b/lib/libc/include/generic-glibc/sys/regdef.h @@ -1,6 +1,5 @@ -/* 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 Ralf Baechle <ralf@gnu.org>. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -14,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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_REGDEF_H #define _SYS_REGDEF_H diff --git a/lib/libc/include/generic-glibc/sys/resource.h b/lib/libc/include/generic-glibc/sys/resource.h index c4c495d702..2c03a09032 100644 --- a/lib/libc/include/generic-glibc/sys/resource.h +++ b/lib/libc/include/generic-glibc/sys/resource.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_RESOURCE_H #define _SYS_RESOURCE_H 1 diff --git a/lib/libc/include/generic-glibc/sys/select.h b/lib/libc/include/generic-glibc/sys/select.h index db01e66677..a08b500e77 100644 --- a/lib/libc/include/generic-glibc/sys/select.h +++ b/lib/libc/include/generic-glibc/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h> */ diff --git a/lib/libc/include/generic-glibc/sys/sem.h b/lib/libc/include/generic-glibc/sys/sem.h index c6c07dc22e..dde24cc033 100644 --- a/lib/libc/include/generic-glibc/sys/sem.h +++ b/lib/libc/include/generic-glibc/sys/sem.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SEM_H #define _SYS_SEM_H 1 diff --git a/lib/libc/include/generic-glibc/sys/sendfile.h b/lib/libc/include/generic-glibc/sys/sendfile.h index 108b368650..76d4f4dcc4 100644 --- a/lib/libc/include/generic-glibc/sys/sendfile.h +++ b/lib/libc/include/generic-glibc/sys/sendfile.h @@ -1,5 +1,5 @@ /* sendfile -- copy data directly from one file descriptor to another - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SENDFILE_H #define _SYS_SENDFILE_H 1 diff --git a/lib/libc/include/generic-glibc/sys/shm.h b/lib/libc/include/generic-glibc/sys/shm.h index e59c210931..fdab282b74 100644 --- a/lib/libc/include/generic-glibc/sys/shm.h +++ b/lib/libc/include/generic-glibc/sys/shm.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SHM_H #define _SYS_SHM_H 1 diff --git a/lib/libc/include/generic-glibc/sys/signalfd.h b/lib/libc/include/generic-glibc/sys/signalfd.h index 602c67b858..0f47e089c8 100644 --- a/lib/libc/include/generic-glibc/sys/signalfd.h +++ b/lib/libc/include/generic-glibc/sys/signalfd.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2019 Free Software Foundation, Inc. +/* Copyright (C) 2007-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SIGNALFD_H #define _SYS_SIGNALFD_H 1 diff --git a/lib/libc/include/generic-glibc/sys/socket.h b/lib/libc/include/generic-glibc/sys/socket.h index 01598993a5..36871ba0fe 100644 --- a/lib/libc/include/generic-glibc/sys/socket.h +++ b/lib/libc/include/generic-glibc/sys/socket.h @@ -1,5 +1,5 @@ /* Declarations of socket constants, types, and functions. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SOCKET_H #define _SYS_SOCKET_H 1 diff --git a/lib/libc/include/generic-glibc/sys/stat.h b/lib/libc/include/generic-glibc/sys/stat.h index 1b50da1b47..efb35dc1e5 100644 --- a/lib/libc/include/generic-glibc/sys/stat.h +++ b/lib/libc/include/generic-glibc/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * POSIX Standard: 5.6 File Characteristics <sys/stat.h> diff --git a/lib/libc/include/generic-glibc/sys/statfs.h b/lib/libc/include/generic-glibc/sys/statfs.h index d3c1071f79..98e4d90612 100644 --- a/lib/libc/include/generic-glibc/sys/statfs.h +++ b/lib/libc/include/generic-glibc/sys/statfs.h @@ -1,5 +1,5 @@ /* Definitions for getting information about a filesystem. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_STATFS_H #define _SYS_STATFS_H 1 diff --git a/lib/libc/include/generic-glibc/sys/statvfs.h b/lib/libc/include/generic-glibc/sys/statvfs.h index 5324cfe99a..e5798e4295 100644 --- a/lib/libc/include/generic-glibc/sys/statvfs.h +++ b/lib/libc/include/generic-glibc/sys/statvfs.h @@ -1,5 +1,5 @@ /* Definitions for getting information about a filesystem. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_STATVFS_H #define _SYS_STATVFS_H 1 diff --git a/lib/libc/include/generic-glibc/sys/swap.h b/lib/libc/include/generic-glibc/sys/swap.h index 43558d68a7..a60b3018bd 100644 --- a/lib/libc/include/generic-glibc/sys/swap.h +++ b/lib/libc/include/generic-glibc/sys/swap.h @@ -1,5 +1,5 @@ /* Calls to enable and disable swapping on specified locations. Linux 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SWAP_H diff --git a/lib/libc/include/generic-glibc/sys/syscall.h b/lib/libc/include/generic-glibc/sys/syscall.h index 4d98b1f177..bb77d6427a 100644 --- a/lib/libc/include/generic-glibc/sys/syscall.h +++ b/lib/libc/include/generic-glibc/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYSCALL_H #define _SYSCALL_H 1 @@ -23,12 +23,9 @@ from the kernel sources. */ #include <asm/unistd.h> -#ifndef _LIBC -/* The Linux kernel header file defines macros `__NR_<name>', but some - programs expect the traditional form `SYS_<name>'. So in building libc - we scan the kernel's list and produce <bits/syscall.h> with macros for - all the `SYS_' names. */ -# include <bits/syscall.h> -#endif +/* The Linux kernel header file defines macros __NR_*, but some + programs expect the traditional form SYS_*. <bits/syscall.h> + defines SYS_* macros for __NR_* macros of known names. */ +#include <bits/syscall.h> #endif
\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/sys/sysctl.h b/lib/libc/include/generic-glibc/sys/sysctl.h index 9af38782b6..e8def66c88 100644 --- a/lib/libc/include/generic-glibc/sys/sysctl.h +++ b/lib/libc/include/generic-glibc/sys/sysctl.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SYSCTL_H #define _SYS_SYSCTL_H 1 diff --git a/lib/libc/include/generic-glibc/sys/sysinfo.h b/lib/libc/include/generic-glibc/sys/sysinfo.h index 364684b0ee..fb4e42c494 100644 --- a/lib/libc/include/generic-glibc/sys/sysinfo.h +++ b/lib/libc/include/generic-glibc/sys/sysinfo.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SYSINFO_H #define _SYS_SYSINFO_H 1 diff --git a/lib/libc/include/generic-glibc/sys/sysmacros.h b/lib/libc/include/generic-glibc/sys/sysmacros.h index a623d52fc6..9914343411 100644 --- a/lib/libc/include/generic-glibc/sys/sysmacros.h +++ b/lib/libc/include/generic-glibc/sys/sysmacros.h @@ -1,5 +1,5 @@ /* Definitions of macros to access `dev_t' values. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SYSMACROS_H #define _SYS_SYSMACROS_H 1 diff --git a/lib/libc/include/generic-glibc/sys/sysmips.h b/lib/libc/include/generic-glibc/sys/sysmips.h index fd84d70fe2..c24b8ebccb 100644 --- a/lib/libc/include/generic-glibc/sys/sysmips.h +++ b/lib/libc/include/generic-glibc/sys/sysmips.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SYSMIPS_H #define _SYS_SYSMIPS_H 1 diff --git a/lib/libc/include/generic-glibc/sys/tas.h b/lib/libc/include/generic-glibc/sys/tas.h index 28762068aa..0f8974544a 100644 --- a/lib/libc/include/generic-glibc/sys/tas.h +++ b/lib/libc/include/generic-glibc/sys/tas.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 Maciej W. Rozycki <macro@ds2.pg.gda.pl>, 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_TAS_H #define _SYS_TAS_H 1 diff --git a/lib/libc/include/generic-glibc/sys/time.h b/lib/libc/include/generic-glibc/sys/time.h index a70f3814ac..59a5298c02 100644 --- a/lib/libc/include/generic-glibc/sys/time.h +++ b/lib/libc/include/generic-glibc/sys/time.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_TIME_H #define _SYS_TIME_H 1 @@ -54,23 +54,24 @@ struct timezone int tz_minuteswest; /* Minutes west of GMT. */ int tz_dsttime; /* Nonzero if DST is ever in effect. */ }; - -typedef struct timezone *__restrict __timezone_ptr_t; -#else -typedef void *__restrict __timezone_ptr_t; #endif -/* Get the current time of day and timezone information, - putting it into *TV and *TZ. If TZ is NULL, *TZ is not filled. - Returns 0 on success, -1 on errors. - NOTE: This form of timezone information is obsolete. - Use the functions and variables declared in <time.h> instead. */ +/* Get the current time of day, putting it into *TV. + If TZ is not null, *TZ must be a struct timezone, and both fields + will be set to zero. + Calling this function with a non-null TZ is obsolete; + use localtime etc. instead. + This function itself is semi-obsolete; + most callers should use time or clock_gettime instead. */ extern int gettimeofday (struct timeval *__restrict __tv, - __timezone_ptr_t __tz) __THROW __nonnull ((1)); + void *__restrict __tz) __THROW __nonnull ((1)); #ifdef __USE_MISC /* Set the current time of day and timezone information. - This call is restricted to the super-user. */ + This call is restricted to the super-user. + Setting the timezone in this way is obsolete, but we don't yet + warn about it because it still has some uses for which there is + no alternative. */ extern int settimeofday (const struct timeval *__tv, const struct timezone *__tz) __THROW; diff --git a/lib/libc/include/generic-glibc/sys/timeb.h b/lib/libc/include/generic-glibc/sys/timeb.h index 1a7089f6fd..3134096ea3 100644 --- a/lib/libc/include/generic-glibc/sys/timeb.h +++ b/lib/libc/include/generic-glibc/sys/timeb.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_TIMEB_H #define _SYS_TIMEB_H 1 @@ -36,7 +36,8 @@ struct timeb /* Fill in TIMEBUF with information about the current time. */ -extern int ftime (struct timeb *__timebuf); +extern int ftime (struct timeb *__timebuf) + __nonnull ((1)) __attribute_deprecated__; __END_DECLS diff --git a/lib/libc/include/generic-glibc/sys/timerfd.h b/lib/libc/include/generic-glibc/sys/timerfd.h index 4e535c29b0..8d06ea7450 100644 --- a/lib/libc/include/generic-glibc/sys/timerfd.h +++ b/lib/libc/include/generic-glibc/sys/timerfd.h @@ -1,4 +1,4 @@ -/* 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_TIMERFD_H #define _SYS_TIMERFD_H 1 diff --git a/lib/libc/include/generic-glibc/sys/times.h b/lib/libc/include/generic-glibc/sys/times.h index c64844865b..00cb60f139 100644 --- a/lib/libc/include/generic-glibc/sys/times.h +++ b/lib/libc/include/generic-glibc/sys/times.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * POSIX Standard: 4.5.2 Process Times <sys/times.h> diff --git a/lib/libc/include/generic-glibc/sys/timex.h b/lib/libc/include/generic-glibc/sys/timex.h index e469d8237c..04f8ee5e5c 100644 --- a/lib/libc/include/generic-glibc/sys/timex.h +++ b/lib/libc/include/generic-glibc/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_TIMEX_H #define _SYS_TIMEX_H 1 diff --git a/lib/libc/include/generic-glibc/sys/types.h b/lib/libc/include/generic-glibc/sys/types.h index c7728532fd..d27b28f769 100644 --- a/lib/libc/include/generic-glibc/sys/types.h +++ b/lib/libc/include/generic-glibc/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * POSIX Standard: 2.6 Primitive System Data Types <sys/types.h> diff --git a/lib/libc/include/generic-glibc/sys/ucontext.h b/lib/libc/include/generic-glibc/sys/ucontext.h index de2e9206e8..dfd6641750 100644 --- a/lib/libc/include/generic-glibc/sys/ucontext.h +++ b/lib/libc/include/generic-glibc/sys/ucontext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. +/* 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 modify it under the terms of the GNU Lesser General Public @@ -12,7 +12,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* Don't rely on this, the interface is currently messed up and may need to be broken to be fixed. */ diff --git a/lib/libc/include/generic-glibc/sys/uio.h b/lib/libc/include/generic-glibc/sys/uio.h index 1ed202cb1c..57a7abdd37 100644 --- a/lib/libc/include/generic-glibc/sys/uio.h +++ b/lib/libc/include/generic-glibc/sys/uio.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_UIO_H #define _SYS_UIO_H 1 diff --git a/lib/libc/include/generic-glibc/sys/un.h b/lib/libc/include/generic-glibc/sys/un.h index d29209d0bc..9f8f35dd2f 100644 --- a/lib/libc/include/generic-glibc/sys/un.h +++ b/lib/libc/include/generic-glibc/sys/un.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_UN_H #define _SYS_UN_H 1 diff --git a/lib/libc/include/generic-glibc/sys/user.h b/lib/libc/include/generic-glibc/sys/user.h index 375540a114..bfe83781cd 100644 --- a/lib/libc/include/generic-glibc/sys/user.h +++ b/lib/libc/include/generic-glibc/sys/user.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_USER_H #define _SYS_USER_H 1 diff --git a/lib/libc/include/generic-glibc/sys/utsname.h b/lib/libc/include/generic-glibc/sys/utsname.h index d5bc376107..8ecc09263a 100644 --- a/lib/libc/include/generic-glibc/sys/utsname.h +++ b/lib/libc/include/generic-glibc/sys/utsname.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * POSIX Standard: 4.4 System Identification <sys/utsname.h> diff --git a/lib/libc/include/generic-glibc/sys/vlimit.h b/lib/libc/include/generic-glibc/sys/vlimit.h index ae952be532..a7fd78a61a 100644 --- a/lib/libc/include/generic-glibc/sys/vlimit.h +++ b/lib/libc/include/generic-glibc/sys/vlimit.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_VLIMIT_H #define _SYS_VLIMIT_H 1 diff --git a/lib/libc/include/generic-glibc/sys/vm86.h b/lib/libc/include/generic-glibc/sys/vm86.h index b05aa000d1..dfc5c5311b 100644 --- a/lib/libc/include/generic-glibc/sys/vm86.h +++ b/lib/libc/include/generic-glibc/sys/vm86.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_VM86_H diff --git a/lib/libc/include/generic-glibc/sys/vtimes.h b/lib/libc/include/generic-glibc/sys/vtimes.h index a054f7e3ca..048270d4dd 100644 --- a/lib/libc/include/generic-glibc/sys/vtimes.h +++ b/lib/libc/include/generic-glibc/sys/vtimes.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_VTIMES_H #define _SYS_VTIMES_H 1 diff --git a/lib/libc/include/generic-glibc/sys/wait.h b/lib/libc/include/generic-glibc/sys/wait.h index 8b1487070a..2437614922 100644 --- a/lib/libc/include/generic-glibc/sys/wait.h +++ b/lib/libc/include/generic-glibc/sys/wait.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * POSIX Standard: 3.2.1 Wait for Process Termination <sys/wait.h> diff --git a/lib/libc/include/generic-glibc/sys/xattr.h b/lib/libc/include/generic-glibc/sys/xattr.h index 2e08206dc4..608d956b20 100644 --- a/lib/libc/include/generic-glibc/sys/xattr.h +++ b/lib/libc/include/generic-glibc/sys/xattr.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_XATTR_H #define _SYS_XATTR_H 1 diff --git a/lib/libc/include/generic-glibc/tar.h b/lib/libc/include/generic-glibc/tar.h index 1427bf1722..4b4d5b7e51 100644 --- a/lib/libc/include/generic-glibc/tar.h +++ b/lib/libc/include/generic-glibc/tar.h @@ -1,5 +1,5 @@ /* Extended tar format from POSIX.1. - 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. Written by David J. MacKenzie. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TAR_H #define _TAR_H 1 diff --git a/lib/libc/include/generic-glibc/termios.h b/lib/libc/include/generic-glibc/termios.h index 6f481b0d88..ac8da1c731 100644 --- a/lib/libc/include/generic-glibc/termios.h +++ b/lib/libc/include/generic-glibc/termios.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * POSIX Standard: 7.1-2 General Terminal Interface <termios.h> diff --git a/lib/libc/include/generic-glibc/tgmath.h b/lib/libc/include/generic-glibc/tgmath.h index 3b5c792783..a5daa91c87 100644 --- a/lib/libc/include/generic-glibc/tgmath.h +++ b/lib/libc/include/generic-glibc/tgmath.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * ISO C99 Standard: 7.22 Type-generic math <tgmath.h> @@ -43,6 +43,25 @@ #if __GNUC_PREREQ (2, 7) +/* Certain cases of narrowing macros only need to call a single + function so cannot use __builtin_tgmath and do not need any + complicated logic. */ +# if __HAVE_FLOAT128X +# error "Unsupported _Float128x type for <tgmath.h>." +# endif +# if ((__HAVE_FLOAT64X && !__HAVE_FLOAT128) \ + || (__HAVE_FLOAT128 && !__HAVE_FLOAT64X)) +# error "Unsupported combination of types for <tgmath.h>." +# endif +# define __TGMATH_2_NARROW_D(F, X, Y) \ + (F ## l (X, Y)) +# define __TGMATH_2_NARROW_F64X(F, X, Y) \ + (F ## f128 (X, Y)) +# if !__HAVE_FLOAT128 +# define __TGMATH_2_NARROW_F32X(F, X, Y) \ + (F ## f64 (X, Y)) +# endif + # if __HAVE_BUILTIN_TGMATH # if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT) @@ -94,6 +113,33 @@ # define __TGMATH_2C(F, C, X, Y) __builtin_tgmath (__TGMATH_RCFUNCS (F, C) \ (X), (Y)) +# define __TGMATH_NARROW_FUNCS_F(X) X, X ## l, +# define __TGMATH_NARROW_FUNCS_F16(X) \ + __TG_F32_ARG (X) __TG_F64_ARG (X) __TG_F128_ARG (X) \ + __TG_F32X_ARG (X) __TG_F64X_ARG (X) __TG_F128X_ARG (X) +# define __TGMATH_NARROW_FUNCS_F32(X) \ + __TG_F64_ARG (X) __TG_F128_ARG (X) \ + __TG_F32X_ARG (X) __TG_F64X_ARG (X) __TG_F128X_ARG (X) +# define __TGMATH_NARROW_FUNCS_F64(X) \ + __TG_F128_ARG (X) \ + __TG_F64X_ARG (X) __TG_F128X_ARG (X) +# define __TGMATH_NARROW_FUNCS_F32X(X) \ + __TG_F64X_ARG (X) __TG_F128X_ARG (X) \ + __TG_F64_ARG (X) __TG_F128_ARG (X) + +# define __TGMATH_2_NARROW_F(F, X, Y) \ + __builtin_tgmath (__TGMATH_NARROW_FUNCS_F (F) (X), (Y)) +# define __TGMATH_2_NARROW_F16(F, X, Y) \ + __builtin_tgmath (__TGMATH_NARROW_FUNCS_F16 (F) (X), (Y)) +# define __TGMATH_2_NARROW_F32(F, X, Y) \ + __builtin_tgmath (__TGMATH_NARROW_FUNCS_F32 (F) (X), (Y)) +# define __TGMATH_2_NARROW_F64(F, X, Y) \ + __builtin_tgmath (__TGMATH_NARROW_FUNCS_F64 (F) (X), (Y)) +# if __HAVE_FLOAT128 +# define __TGMATH_2_NARROW_F32X(F, X, Y) \ + __builtin_tgmath (__TGMATH_NARROW_FUNCS_F32X (F) (X), (Y)) +# endif + # else /* !__HAVE_BUILTIN_TGMATH. */ # ifdef __NO_LONG_DOUBLE_MATH @@ -230,8 +276,6 @@ __TGMATH_2 (Fct, (Val1), (Val2)) # define __TGMATH_BINARY_REAL_STD_ONLY(Val1, Val2, Fct) \ __TGMATH_2STD (Fct, (Val1), (Val2)) -# define __TGMATH_BINARY_REAL_RET_ONLY(Val1, Val2, Fct) \ - __TGMATH_2 (Fct, (Val1), (Val2)) # define __TGMATH_TERNARY_FIRST_SECOND_REAL_ONLY(Val1, Val2, Val3, Fct) \ __TGMATH_3 (Fct, (Val1), (Val2), (Val3)) # define __TGMATH_TERNARY_REAL_ONLY(Val1, Val2, Val3, Fct) \ @@ -326,18 +370,6 @@ + (__tgmath_real_type (Val2)) 0)) \ Fct##f (Val1, Val2))) -# define __TGMATH_BINARY_REAL_RET_ONLY(Val1, Val2, Fct) \ - (__extension__ ((sizeof ((Val1) + (Val2)) > sizeof (double) \ - && __builtin_classify_type ((Val1) + (Val2)) == 8) \ - ? __TGMATH_F128 ((Val1) + (Val2), Fct, (Val1, Val2)) \ - __tgml(Fct) (Val1, Val2) \ - : (sizeof (+(Val1)) == sizeof (double) \ - || sizeof (+(Val2)) == sizeof (double) \ - || __builtin_classify_type (Val1) != 8 \ - || __builtin_classify_type (Val2) != 8) \ - ? Fct (Val1, Val2) \ - : Fct##f (Val1, Val2))) - # define __TGMATH_TERNARY_FIRST_SECOND_REAL_ONLY(Val1, Val2, Val3, Fct) \ (__extension__ ((sizeof ((Val1) + (Val2)) > sizeof (double) \ && __builtin_classify_type ((Val1) + (Val2)) == 8) \ @@ -507,6 +539,65 @@ : (__typeof ((__tgmath_complex_type (Val1)) 0 \ + (__tgmath_complex_type (Val2)) 0)) \ Cfct##f (Val1, Val2)))) + +# define __TGMATH_2_NARROW_F(F, X, Y) \ + (__extension__ (sizeof ((__tgmath_real_type (X)) 0 \ + + (__tgmath_real_type (Y)) 0) > sizeof (double) \ + ? F ## l (X, Y) \ + : F (X, Y))) +/* In most cases, these narrowing macro definitions based on sizeof + ensure that the function called has the right argument format, as + for other <tgmath.h> macros for compilers before GCC 8, but may not + have exactly the argument type (among the types with that format) + specified in the standard logic. + + In the case of macros for _Float32x return type, when _Float64x + exists, _Float64 arguments should result in the *f64 function being + called while _Float32x arguments should result in the *f64x + function being called. These cases cannot be distinguished using + sizeof (or at all if the types are typedefs rather than different + types). However, for these functions it is OK (does not affect the + final result) to call a function with any argument format at least + as wide as all the floating-point arguments, unless that affects + rounding of integer arguments. Integer arguments are considered to + have type _Float64, so the *f64 functions are preferred for f32x* + macros when no argument has a wider floating-point type. */ +# if __HAVE_FLOAT64X_LONG_DOUBLE && __HAVE_DISTINCT_FLOAT128 +# define __TGMATH_2_NARROW_F32(F, X, Y) \ + (__extension__ (sizeof ((__tgmath_real_type (X)) 0 \ + + (__tgmath_real_type (Y)) 0) > sizeof (_Float64) \ + ? __TGMATH_F128 ((X) + (Y), F, (X, Y)) \ + F ## f64x (X, Y) \ + : F ## f64 (X, Y))) +# define __TGMATH_2_NARROW_F64(F, X, Y) \ + (__extension__ (sizeof ((__tgmath_real_type (X)) 0 \ + + (__tgmath_real_type (Y)) 0) > sizeof (_Float64) \ + ? __TGMATH_F128 ((X) + (Y), F, (X, Y)) \ + F ## f64x (X, Y) \ + : F ## f128 (X, Y))) +# define __TGMATH_2_NARROW_F32X(F, X, Y) \ + (__extension__ (sizeof ((__tgmath_real_type (X)) 0 \ + + (__tgmath_real_type (Y)) 0) > sizeof (_Float64) \ + ? __TGMATH_F128 ((X) + (Y), F, (X, Y)) \ + F ## f64x (X, Y) \ + : F ## f64 (X, Y))) +# elif __HAVE_FLOAT128 +# define __TGMATH_2_NARROW_F32(F, X, Y) \ + (__extension__ (sizeof ((__tgmath_real_type (X)) 0 \ + + (__tgmath_real_type (Y)) 0) > sizeof (_Float64) \ + ? F ## f128 (X, Y) \ + : F ## f64 (X, Y))) +# define __TGMATH_2_NARROW_F64(F, X, Y) \ + (F ## f128 (X, Y)) +# define __TGMATH_2_NARROW_F32X(F, X, Y) \ + (__extension__ (sizeof ((__tgmath_real_type (X)) 0 \ + + (__tgmath_real_type (Y)) 0) > sizeof (_Float32x) \ + ? F ## f64x (X, Y) \ + : F ## f64 (X, Y))) +# else +# define __TGMATH_2_NARROW_F32(F, X, Y) \ + (F ## f64 (X, Y)) +# endif # endif /* !__HAVE_BUILTIN_TGMATH. */ #else # error "Unsupported compiler; you cannot use <tgmath.h>" @@ -661,7 +752,7 @@ prevailing rounding mode. */ #define rint(Val) __TGMATH_UNARY_REAL_ONLY (Val, rint) -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) /* Return X - epsilon. */ # define nextdown(Val) __TGMATH_UNARY_REAL_ONLY (Val, nextdown) /* Return X + epsilon. */ @@ -706,7 +797,7 @@ #define fma(Val1, Val2, Val3) \ __TGMATH_TERNARY_REAL_ONLY (Val1, Val2, Val3, fma) -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) /* Round X to nearest integer value, rounding halfway cases to even. */ # define roundeven(Val) __TGMATH_UNARY_REAL_ONLY (Val, roundeven) @@ -730,14 +821,6 @@ /* Return value with minimum magnitude. */ # define fminmag(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fminmag) - -/* Total order operation. */ -# define totalorder(Val1, Val2) \ - __TGMATH_BINARY_REAL_RET_ONLY (Val1, Val2, totalorder) - -/* Total order operation on absolute values. */ -# define totalordermag(Val1, Val2) \ - __TGMATH_BINARY_REAL_RET_ONLY (Val1, Val2, totalordermag) #endif @@ -761,4 +844,66 @@ /* Real part of Z. */ #define creal(Val) __TGMATH_UNARY_REAL_IMAG_RET_REAL_SAME (Val, creal) + +/* Narrowing functions. */ + +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) + +/* Add. */ +# define fadd(Val1, Val2) __TGMATH_2_NARROW_F (fadd, Val1, Val2) +# define dadd(Val1, Val2) __TGMATH_2_NARROW_D (dadd, Val1, Val2) + +/* Divide. */ +# define fdiv(Val1, Val2) __TGMATH_2_NARROW_F (fdiv, Val1, Val2) +# define ddiv(Val1, Val2) __TGMATH_2_NARROW_D (ddiv, Val1, Val2) + +/* Multiply. */ +# define fmul(Val1, Val2) __TGMATH_2_NARROW_F (fmul, Val1, Val2) +# define dmul(Val1, Val2) __TGMATH_2_NARROW_D (dmul, Val1, Val2) + +/* Subtract. */ +# define fsub(Val1, Val2) __TGMATH_2_NARROW_F (fsub, Val1, Val2) +# define dsub(Val1, Val2) __TGMATH_2_NARROW_D (dsub, Val1, Val2) + +#endif + +#if __GLIBC_USE (IEC_60559_TYPES_EXT) + +# if __HAVE_FLOAT16 +# define f16add(Val1, Val2) __TGMATH_2_NARROW_F16 (f16add, Val1, Val2) +# define f16div(Val1, Val2) __TGMATH_2_NARROW_F16 (f16div, Val1, Val2) +# define f16mul(Val1, Val2) __TGMATH_2_NARROW_F16 (f16mul, Val1, Val2) +# define f16sub(Val1, Val2) __TGMATH_2_NARROW_F16 (f16sub, Val1, Val2) +# endif + +# if __HAVE_FLOAT32 +# define f32add(Val1, Val2) __TGMATH_2_NARROW_F32 (f32add, Val1, Val2) +# define f32div(Val1, Val2) __TGMATH_2_NARROW_F32 (f32div, Val1, Val2) +# define f32mul(Val1, Val2) __TGMATH_2_NARROW_F32 (f32mul, Val1, Val2) +# define f32sub(Val1, Val2) __TGMATH_2_NARROW_F32 (f32sub, Val1, Val2) +# endif + +# if __HAVE_FLOAT64 && (__HAVE_FLOAT64X || __HAVE_FLOAT128) +# define f64add(Val1, Val2) __TGMATH_2_NARROW_F64 (f64add, Val1, Val2) +# define f64div(Val1, Val2) __TGMATH_2_NARROW_F64 (f64div, Val1, Val2) +# define f64mul(Val1, Val2) __TGMATH_2_NARROW_F64 (f64mul, Val1, Val2) +# define f64sub(Val1, Val2) __TGMATH_2_NARROW_F64 (f64sub, Val1, Val2) +# endif + +# if __HAVE_FLOAT32X +# define f32xadd(Val1, Val2) __TGMATH_2_NARROW_F32X (f32xadd, Val1, Val2) +# define f32xdiv(Val1, Val2) __TGMATH_2_NARROW_F32X (f32xdiv, Val1, Val2) +# define f32xmul(Val1, Val2) __TGMATH_2_NARROW_F32X (f32xmul, Val1, Val2) +# define f32xsub(Val1, Val2) __TGMATH_2_NARROW_F32X (f32xsub, Val1, Val2) +# endif + +# if __HAVE_FLOAT64X && (__HAVE_FLOAT128X || __HAVE_FLOAT128) +# define f64xadd(Val1, Val2) __TGMATH_2_NARROW_F64X (f64xadd, Val1, Val2) +# define f64xdiv(Val1, Val2) __TGMATH_2_NARROW_F64X (f64xdiv, Val1, Val2) +# define f64xmul(Val1, Val2) __TGMATH_2_NARROW_F64X (f64xmul, Val1, Val2) +# define f64xsub(Val1, Val2) __TGMATH_2_NARROW_F64X (f64xsub, Val1, Val2) +# endif + +#endif + #endif /* tgmath.h */
\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/thread_db.h b/lib/libc/include/generic-glibc/thread_db.h index 9b07bc2a7d..e26656953e 100644 --- a/lib/libc/include/generic-glibc/thread_db.h +++ b/lib/libc/include/generic-glibc/thread_db.h @@ -1,5 +1,5 @@ /* thread_db.h -- interface to libthread_db.so library for debugging -lpthread - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _THREAD_DB_H #define _THREAD_DB_H 1 diff --git a/lib/libc/include/generic-glibc/threads.h b/lib/libc/include/generic-glibc/threads.h index e6dd2342b2..212eac67ef 100644 --- a/lib/libc/include/generic-glibc/threads.h +++ b/lib/libc/include/generic-glibc/threads.h @@ -1,5 +1,5 @@ /* ISO C11 Standard: 7.26 - Thread support library <threads.h>. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _THREADS_H #define _THREADS_H 1 diff --git a/lib/libc/include/generic-glibc/time.h b/lib/libc/include/generic-glibc/time.h index 57a7a7b381..afaf50c1d6 100644 --- a/lib/libc/include/generic-glibc/time.h +++ b/lib/libc/include/generic-glibc/time.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * ISO C99 Standard: 7.23 Date and time <time.h> @@ -122,7 +122,7 @@ extern struct tm *gmtime (const time_t *__timer) __THROW; of *TIMER in the local timezone. */ extern struct tm *localtime (const time_t *__timer) __THROW; -#ifdef __USE_POSIX +#if defined __USE_POSIX || __GLIBC_USE (ISOC2X) /* Return the `struct tm' representation of *TIMER in UTC, using *TP to store the result. */ extern struct tm *gmtime_r (const time_t *__restrict __timer, @@ -132,7 +132,7 @@ extern struct tm *gmtime_r (const time_t *__restrict __timer, using *TP to store the result. */ extern struct tm *localtime_r (const time_t *__restrict __timer, struct tm *__restrict __tp) __THROW; -#endif /* POSIX */ +#endif /* POSIX || C2X */ /* Return a string of the form "Day Mon dd hh:mm:ss yyyy\n" that is the representation of TP in this format. */ @@ -141,7 +141,7 @@ extern char *asctime (const struct tm *__tp) __THROW; /* Equivalent to `asctime (localtime (timer))'. */ extern char *ctime (const time_t *__timer) __THROW; -#ifdef __USE_POSIX +#if defined __USE_POSIX || __GLIBC_USE (ISOC2X) /* Reentrant versions of the above functions. */ /* Return in BUF a string of the form "Day Mon dd hh:mm:ss yyyy\n" @@ -152,7 +152,7 @@ extern char *asctime_r (const struct tm *__restrict __tp, /* Equivalent to `asctime_r (localtime_r (timer, *TMP*), buf)'. */ extern char *ctime_r (const time_t *__restrict __timer, char *__restrict __buf) __THROW; -#endif /* POSIX */ +#endif /* POSIX || C2X */ /* Defined in localtime.c. */ @@ -175,12 +175,6 @@ extern int daylight; extern long int timezone; #endif -#ifdef __USE_MISC -/* Set the system time to *WHEN. - This call is restricted to the superuser. */ -extern int stime (const time_t *__when) __THROW; -#endif - /* Nonzero if YEAR is a leap year (every 4 years, except every 100th isn't, and every 400th is). */ diff --git a/lib/libc/include/generic-glibc/uchar.h b/lib/libc/include/generic-glibc/uchar.h index 30b4948623..1d42067d8f 100644 --- a/lib/libc/include/generic-glibc/uchar.h +++ b/lib/libc/include/generic-glibc/uchar.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * ISO C11 Standard: 7.28 diff --git a/lib/libc/include/generic-glibc/ucontext.h b/lib/libc/include/generic-glibc/ucontext.h index b038eb8431..7e1b5a68bf 100644 --- a/lib/libc/include/generic-glibc/ucontext.h +++ b/lib/libc/include/generic-glibc/ucontext.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* System V ABI compliant user-level context switching support. */ diff --git a/lib/libc/include/generic-glibc/ulimit.h b/lib/libc/include/generic-glibc/ulimit.h index b85f09ae30..144e489ee6 100644 --- a/lib/libc/include/generic-glibc/ulimit.h +++ b/lib/libc/include/generic-glibc/ulimit.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _ULIMIT_H #define _ULIMIT_H 1 diff --git a/lib/libc/include/generic-glibc/unistd.h b/lib/libc/include/generic-glibc/unistd.h index 3274b30b57..2decd11b88 100644 --- a/lib/libc/include/generic-glibc/unistd.h +++ b/lib/libc/include/generic-glibc/unistd.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * POSIX Standard: 2.10 Symbolic Constants <unistd.h> diff --git a/lib/libc/include/generic-glibc/utime.h b/lib/libc/include/generic-glibc/utime.h index 23d276a073..675138ca50 100644 --- a/lib/libc/include/generic-glibc/utime.h +++ b/lib/libc/include/generic-glibc/utime.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * POSIX Standard: 5.6.6 Set File Access and Modification Times <utime.h> diff --git a/lib/libc/include/generic-glibc/utmp.h b/lib/libc/include/generic-glibc/utmp.h index ebe1cba7a6..bb62d1e7a1 100644 --- a/lib/libc/include/generic-glibc/utmp.h +++ b/lib/libc/include/generic-glibc/utmp.h @@ -1,4 +1,4 @@ -/* 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. 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _UTMP_H #define _UTMP_H 1 diff --git a/lib/libc/include/generic-glibc/utmpx.h b/lib/libc/include/generic-glibc/utmpx.h index 2860f0e1d9..5a407f1c4e 100644 --- a/lib/libc/include/generic-glibc/utmpx.h +++ b/lib/libc/include/generic-glibc/utmpx.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _UTMPX_H #define _UTMPX_H 1 diff --git a/lib/libc/include/generic-glibc/values.h b/lib/libc/include/generic-glibc/values.h index c383e1adbc..00735b4d3b 100644 --- a/lib/libc/include/generic-glibc/values.h +++ b/lib/libc/include/generic-glibc/values.h @@ -1,5 +1,5 @@ /* Old compatibility names for <limits.h> and <float.h> constants. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* This interface is obsolete. New programs should use <limits.h> and/or <float.h> instead of <values.h>. */ diff --git a/lib/libc/include/generic-glibc/wchar.h b/lib/libc/include/generic-glibc/wchar.h index 42a24c956e..f358a1400f 100644 --- a/lib/libc/include/generic-glibc/wchar.h +++ b/lib/libc/include/generic-glibc/wchar.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * ISO C99 Standard: 7.24 @@ -685,7 +685,8 @@ extern int vswscanf (const wchar_t *__restrict __s, __gnuc_va_list __arg) __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */; -# if !defined __USE_GNU \ +/* Same redirection as above for the v*wscanf family. */ +# if !__GLIBC_USE (DEPRECATED_SCANF) \ && (!defined __LDBL_COMPAT || !defined __REDIRECT) \ && (defined __STRICT_ANSI__ || defined __USE_XOPEN2K) # ifdef __REDIRECT diff --git a/lib/libc/include/generic-glibc/wctype.h b/lib/libc/include/generic-glibc/wctype.h index 38d11e930c..4cd02bcf17 100644 --- a/lib/libc/include/generic-glibc/wctype.h +++ b/lib/libc/include/generic-glibc/wctype.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * ISO C99 Standard: 7.25 diff --git a/lib/libc/include/generic-glibc/wordexp.h b/lib/libc/include/generic-glibc/wordexp.h index b4f270a1ce..fa198fba1f 100644 --- a/lib/libc/include/generic-glibc/wordexp.h +++ b/lib/libc/include/generic-glibc/wordexp.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _WORDEXP_H #define _WORDEXP_H 1 diff --git a/lib/libc/include/i386-linux-gnu/bits/endian.h b/lib/libc/include/i386-linux-gnu/bits/endian.h deleted file mode 100644 index 35c898d0ec..0000000000 --- a/lib/libc/include/i386-linux-gnu/bits/endian.h +++ /dev/null @@ -1,7 +0,0 @@ -/* i386/x86_64 are little-endian. */ - -#ifndef _ENDIAN_H -# error "Never use <bits/endian.h> directly; include <endian.h> instead." -#endif - -#define __BYTE_ORDER __LITTLE_ENDIAN
\ No newline at end of file diff --git a/lib/libc/include/i386-linux-gnu/bits/endianness.h b/lib/libc/include/i386-linux-gnu/bits/endianness.h new file mode 100644 index 0000000000..80180b782e --- /dev/null +++ b/lib/libc/include/i386-linux-gnu/bits/endianness.h @@ -0,0 +1,11 @@ +#ifndef _BITS_ENDIANNESS_H +#define _BITS_ENDIANNESS_H 1 + +#ifndef _BITS_ENDIAN_H +# error "Never use <bits/endianness.h> directly; include <endian.h> instead." +#endif + +/* i386/x86_64 are little-endian. */ +#define __BYTE_ORDER __LITTLE_ENDIAN + +#endif /* bits/endianness.h */
\ No newline at end of file diff --git a/lib/libc/include/i386-linux-gnu/bits/environments.h b/lib/libc/include/i386-linux-gnu/bits/environments.h index 76f12fe085..2b18837e58 100644 --- a/lib/libc/include/i386-linux-gnu/bits/environments.h +++ b/lib/libc/include/i386-linux-gnu/bits/environments.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _UNISTD_H # error "Never include this file directly. Use <unistd.h> instead" diff --git a/lib/libc/include/i386-linux-gnu/bits/epoll.h b/lib/libc/include/i386-linux-gnu/bits/epoll.h index 205d42ad63..5f23749272 100644 --- a/lib/libc/include/i386-linux-gnu/bits/epoll.h +++ b/lib/libc/include/i386-linux-gnu/bits/epoll.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_EPOLL_H # error "Never use <bits/epoll.h> directly; include <sys/epoll.h> instead." diff --git a/lib/libc/include/i386-linux-gnu/bits/fcntl.h b/lib/libc/include/i386-linux-gnu/bits/fcntl.h index d3229a6782..4eb8fa0b6f 100644 --- a/lib/libc/include/i386-linux-gnu/bits/fcntl.h +++ b/lib/libc/include/i386-linux-gnu/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux/x86. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FCNTL_H # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead." diff --git a/lib/libc/include/i386-linux-gnu/bits/fenv.h b/lib/libc/include/i386-linux-gnu/bits/fenv.h index 74151486b4..3164b63556 100644 --- a/lib/libc/include/i386-linux-gnu/bits/fenv.h +++ b/lib/libc/include/i386-linux-gnu/bits/fenv.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FENV_H # error "Never use <bits/fenv.h> directly; include <fenv.h> instead." @@ -101,7 +101,7 @@ fenv_t; # define FE_NOMASK_ENV ((const fenv_t *) -2) #endif -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) /* Type representing floating-point control modes. */ typedef struct { diff --git a/lib/libc/include/i386-linux-gnu/bits/floatn.h b/lib/libc/include/i386-linux-gnu/bits/floatn.h index 1d7ba69ea8..36d64c23ec 100644 --- a/lib/libc/include/i386-linux-gnu/bits/floatn.h +++ b/lib/libc/include/i386-linux-gnu/bits/floatn.h @@ -1,5 +1,5 @@ /* Macros to control TS 18661-3 glibc features on 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_FLOATN_H #define _BITS_FLOATN_H diff --git a/lib/libc/include/i386-linux-gnu/bits/flt-eval-method.h b/lib/libc/include/i386-linux-gnu/bits/flt-eval-method.h index 87e06c4354..9da0307897 100644 --- a/lib/libc/include/i386-linux-gnu/bits/flt-eval-method.h +++ b/lib/libc/include/i386-linux-gnu/bits/flt-eval-method.h @@ -1,5 +1,5 @@ /* Define __GLIBC_FLT_EVAL_METHOD. x86 version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _MATH_H # error "Never use <bits/flt-eval-method.h> directly; include <math.h> instead." diff --git a/lib/libc/include/i386-linux-gnu/bits/fp-logb.h b/lib/libc/include/i386-linux-gnu/bits/fp-logb.h index f3e55ea50c..5f2e2a9f88 100644 --- a/lib/libc/include/i386-linux-gnu/bits/fp-logb.h +++ b/lib/libc/include/i386-linux-gnu/bits/fp-logb.h @@ -1,5 +1,5 @@ /* Define __FP_LOGB0_IS_MIN and __FP_LOGBNAN_IS_MIN. x86 version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _MATH_H # error "Never use <bits/fp-logb.h> directly; include <math.h> instead." diff --git a/lib/libc/include/i386-linux-gnu/bits/indirect-return.h b/lib/libc/include/i386-linux-gnu/bits/indirect-return.h index fd170e8a42..e74139721c 100644 --- a/lib/libc/include/i386-linux-gnu/bits/indirect-return.h +++ b/lib/libc/include/i386-linux-gnu/bits/indirect-return.h @@ -1,5 +1,5 @@ /* Definition of __INDIRECT_RETURN. x86 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _UCONTEXT_H # error "Never include <bits/indirect-return.h> directly; use <ucontext.h> instead." diff --git a/lib/libc/include/i386-linux-gnu/bits/ipctypes.h b/lib/libc/include/i386-linux-gnu/bits/ipctypes.h index 2b471d1e52..7f6bb7662d 100644 --- a/lib/libc/include/i386-linux-gnu/bits/ipctypes.h +++ b/lib/libc/include/i386-linux-gnu/bits/ipctypes.h @@ -1,5 +1,5 @@ /* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_IPC_H # error "Never use <bits/ipctypes.h> directly; include <sys/ipc.h> instead." diff --git a/lib/libc/include/i386-linux-gnu/bits/iscanonical.h b/lib/libc/include/i386-linux-gnu/bits/iscanonical.h index 1fa01edaad..ee0d8720f9 100644 --- a/lib/libc/include/i386-linux-gnu/bits/iscanonical.h +++ b/lib/libc/include/i386-linux-gnu/bits/iscanonical.h @@ -1,5 +1,5 @@ /* Define iscanonical macro. ldbl-96 version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _MATH_H # error "Never use <bits/iscanonical.h> directly; include <math.h> instead." diff --git a/lib/libc/include/i386-linux-gnu/bits/link.h b/lib/libc/include/i386-linux-gnu/bits/link.h index 2724980f6b..68938e8e0c 100644 --- a/lib/libc/include/i386-linux-gnu/bits/link.h +++ b/lib/libc/include/i386-linux-gnu/bits/link.h @@ -1,4 +1,4 @@ -/* 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _LINK_H # error "Never include <bits/link.h> directly; use <link.h> instead." diff --git a/lib/libc/include/i386-linux-gnu/bits/long-double.h b/lib/libc/include/i386-linux-gnu/bits/long-double.h index 6a582416cf..a7bd8fb163 100644 --- a/lib/libc/include/i386-linux-gnu/bits/long-double.h +++ b/lib/libc/include/i386-linux-gnu/bits/long-double.h @@ -1,5 +1,5 @@ /* Properties of long double type. ldbl-96 version. - 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,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* long double is distinct from double, so there is nothing to - define here. */
\ No newline at end of file + define here. */ +#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file diff --git a/lib/libc/include/i386-linux-gnu/bits/math-vector.h b/lib/libc/include/i386-linux-gnu/bits/math-vector.h index 67e2c8aea8..f7571e827d 100644 --- a/lib/libc/include/i386-linux-gnu/bits/math-vector.h +++ b/lib/libc/include/i386-linux-gnu/bits/math-vector.h @@ -1,5 +1,5 @@ /* Platform-specific SIMD declarations of math functions. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _MATH_H # error "Never include <bits/math-vector.h> directly;\ diff --git a/lib/libc/include/i386-linux-gnu/bits/mman.h b/lib/libc/include/i386-linux-gnu/bits/mman.h index 90f3588b6e..4319c54436 100644 --- a/lib/libc/include/i386-linux-gnu/bits/mman.h +++ b/lib/libc/include/i386-linux-gnu/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/x86_64 version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_MMAN_H # error "Never use <bits/mman.h> directly; include <sys/mman.h> instead." diff --git a/lib/libc/include/i386-linux-gnu/bits/procfs-id.h b/lib/libc/include/i386-linux-gnu/bits/procfs-id.h index 79f85bfd44..4f4cefeb4b 100644 --- a/lib/libc/include/i386-linux-gnu/bits/procfs-id.h +++ b/lib/libc/include/i386-linux-gnu/bits/procfs-id.h @@ -1,5 +1,5 @@ /* Types of pr_uid and pr_gid in struct elf_prpsinfo. x86 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. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PROCFS_H # error "Never include <bits/procfs-id.h> directly; use <sys/procfs.h> instead." diff --git a/lib/libc/include/i386-linux-gnu/bits/procfs.h b/lib/libc/include/i386-linux-gnu/bits/procfs.h index ea3cbfe1be..1f4ca5a0f0 100644 --- a/lib/libc/include/i386-linux-gnu/bits/procfs.h +++ b/lib/libc/include/i386-linux-gnu/bits/procfs.h @@ -1,5 +1,5 @@ /* Types for registers for sys/procfs.h. x86 version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PROCFS_H # error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead." diff --git a/lib/libc/include/i386-linux-gnu/bits/pthreadtypes-arch.h b/lib/libc/include/i386-linux-gnu/bits/pthreadtypes-arch.h index 7c5701b0b8..147ce690db 100644 --- a/lib/libc/include/i386-linux-gnu/bits/pthreadtypes-arch.h +++ b/lib/libc/include/i386-linux-gnu/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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/include/i386-linux-gnu/bits/select.h b/lib/libc/include/i386-linux-gnu/bits/select.h index 24d5067c62..959d998266 100644 --- a/lib/libc/include/i386-linux-gnu/bits/select.h +++ b/lib/libc/include/i386-linux-gnu/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SELECT_H # error "Never use <bits/select.h> directly; include <sys/select.h> instead." diff --git a/lib/libc/include/i386-linux-gnu/bits/sem-pad.h b/lib/libc/include/i386-linux-gnu/bits/sem-pad.h index bd8df25ace..10534c61cf 100644 --- a/lib/libc/include/i386-linux-gnu/bits/sem-pad.h +++ b/lib/libc/include/i386-linux-gnu/bits/sem-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct semid_ds. x86 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SEM_H # error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead." diff --git a/lib/libc/include/i386-linux-gnu/bits/semaphore.h b/lib/libc/include/i386-linux-gnu/bits/semaphore.h index c5733e31f4..7f41d9a880 100644 --- a/lib/libc/include/i386-linux-gnu/bits/semaphore.h +++ b/lib/libc/include/i386-linux-gnu/bits/semaphore.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. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SEMAPHORE_H # error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead." diff --git a/lib/libc/include/i386-linux-gnu/bits/setjmp.h b/lib/libc/include/i386-linux-gnu/bits/setjmp.h index aec176f8d2..18d620397d 100644 --- a/lib/libc/include/i386-linux-gnu/bits/setjmp.h +++ b/lib/libc/include/i386-linux-gnu/bits/setjmp.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,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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* Define the machine-dependent type `jmp_buf'. x86-64 version. */ #ifndef _BITS_SETJMP_H diff --git a/lib/libc/include/i386-linux-gnu/bits/sigcontext.h b/lib/libc/include/i386-linux-gnu/bits/sigcontext.h index 481a8a7bb5..7498f87f91 100644 --- a/lib/libc/include/i386-linux-gnu/bits/sigcontext.h +++ b/lib/libc/include/i386-linux-gnu/bits/sigcontext.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGCONTEXT_H #define _BITS_SIGCONTEXT_H 1 diff --git a/lib/libc/include/i386-linux-gnu/bits/stat.h b/lib/libc/include/i386-linux-gnu/bits/stat.h index ee7f88c463..ab5378300a 100644 --- a/lib/libc/include/i386-linux-gnu/bits/stat.h +++ b/lib/libc/include/i386-linux-gnu/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead." diff --git a/lib/libc/include/i386-linux-gnu/bits/struct_mutex.h b/lib/libc/include/i386-linux-gnu/bits/struct_mutex.h new file mode 100644 index 0000000000..44273158be --- /dev/null +++ b/lib/libc/include/i386-linux-gnu/bits/struct_mutex.h @@ -0,0 +1,63 @@ +/* x86 internal mutex struct definitions. + 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _THREAD_MUTEX_INTERNAL_H +#define _THREAD_MUTEX_INTERNAL_H 1 + +struct __pthread_mutex_s +{ + int __lock; + unsigned int __count; + int __owner; +#ifdef __x86_64__ + unsigned int __nusers; +#endif + /* KIND must stay at this position in the structure to maintain + binary compatibility with static initializers. */ + int __kind; +#ifdef __x86_64__ + short __spins; + short __elision; + __pthread_list_t __list; +# define __PTHREAD_MUTEX_HAVE_PREV 1 +#else + unsigned int __nusers; + __extension__ union + { + struct + { + short __espins; + short __eelision; +# define __spins __elision_data.__espins +# define __elision __elision_data.__eelision + } __elision_data; + __pthread_slist_t __list; + }; +# define __PTHREAD_MUTEX_HAVE_PREV 0 +#endif +}; + +#ifdef __x86_64__ +# define __PTHREAD_MUTEX_INITIALIZER(__kind) \ + 0, 0, 0, 0, __kind, 0, 0, { 0, 0 } +#else +# define __PTHREAD_MUTEX_INITIALIZER(__kind) \ + 0, 0, 0, __kind, 0, { { 0, 0 } } +#endif + +#endif
\ No newline at end of file diff --git a/lib/libc/include/armeb-linux-gnueabi/bits/pthreadtypes-arch.h b/lib/libc/include/i386-linux-gnu/bits/struct_rwlock.h index c46bf4f3fd..863b185dc9 100644 --- a/lib/libc/include/armeb-linux-gnueabi/bits/pthreadtypes-arch.h +++ b/lib/libc/include/i386-linux-gnu/bits/struct_rwlock.h @@ -1,4 +1,6 @@ -/* Copyright (C) 2002-2019 Free Software Foundation, Inc. +/* x86 internal rwlock struct definitions. + 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 @@ -12,33 +14,11 @@ 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 + License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#ifndef _BITS_PTHREADTYPES_ARCH_H -#define _BITS_PTHREADTYPES_ARCH_H 1 - -#include <endian.h> - -#define __SIZEOF_PTHREAD_ATTR_T 36 -#define __SIZEOF_PTHREAD_MUTEX_T 24 -#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 -#define __SIZEOF_PTHREAD_COND_T 48 -#define __SIZEOF_PTHREAD_CONDATTR_T 4 -#define __SIZEOF_PTHREAD_RWLOCK_T 32 -#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 -#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 -#define __ONCE_ALIGNMENT +#ifndef _RWLOCK_INTERNAL_H +#define _RWLOCK_INTERNAL_H struct __pthread_rwlock_arch_t { @@ -48,24 +28,38 @@ struct __pthread_rwlock_arch_t unsigned int __writers_futex; unsigned int __pad3; unsigned int __pad4; -#if __BYTE_ORDER == __BIG_ENDIAN - unsigned char __pad1; - unsigned char __pad2; - unsigned char __shared; +#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 char __flags; -#else + unsigned int __flags; +#else /* __x86_64__ */ /* FLAGS must stay at this position in the structure to maintain binary compatibility. */ unsigned char __flags; unsigned char __shared; - unsigned char __pad1; + signed char __rwelision; unsigned char __pad2; -#endif int __cur_writer; +#endif }; -#define __PTHREAD_RWLOCK_ELISION_EXTRA 0 +#ifdef __x86_64__ +# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \ + 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, __flags +#else +# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \ + 0, 0, 0, 0, 0, 0, __flags, 0, 0, 0, 0 +#endif -#endif /* bits/pthreadtypes.h */
\ No newline at end of file +#endif
\ No newline at end of file diff --git a/lib/libc/include/i386-linux-gnu/bits/sysctl.h b/lib/libc/include/i386-linux-gnu/bits/sysctl.h index 6b29199909..5e2b946cdf 100644 --- a/lib/libc/include/i386-linux-gnu/bits/sysctl.h +++ b/lib/libc/include/i386-linux-gnu/bits/sysctl.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if defined __x86_64__ && defined __ILP32__ # error "sysctl system call is unsupported in x32 kernel" diff --git a/lib/libc/include/i386-linux-gnu/bits/timesize.h b/lib/libc/include/i386-linux-gnu/bits/timesize.h index 48fb555234..ae0a502d0d 100644 --- a/lib/libc/include/i386-linux-gnu/bits/timesize.h +++ b/lib/libc/include/i386-linux-gnu/bits/timesize.h @@ -1,5 +1,5 @@ /* Bit size of the time_t type at glibc build time, x86-64 and x32 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if defined __x86_64__ && defined __ILP32__ /* For x32, time is 64-bit even though word size is 32-bit. */ diff --git a/lib/libc/include/i386-linux-gnu/bits/typesizes.h b/lib/libc/include/i386-linux-gnu/bits/typesizes.h index 7c14f5d7f8..7ad60c3f43 100644 --- a/lib/libc/include/i386-linux-gnu/bits/typesizes.h +++ b/lib/libc/include/i386-linux-gnu/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_TYPES_H # error "Never include <bits/typesizes.h> directly; use <sys/types.h> 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/include/i386-linux-gnu/finclude/math-vector-fortran.h b/lib/libc/include/i386-linux-gnu/finclude/math-vector-fortran.h index fc3aa3e3b2..c56f5fc16f 100644 --- a/lib/libc/include/i386-linux-gnu/finclude/math-vector-fortran.h +++ b/lib/libc/include/i386-linux-gnu/finclude/math-vector-fortran.h @@ -1,5 +1,5 @@ ! Platform-specific declarations of SIMD math functions for Fortran. -*- f90 -*- -! 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 -! <http://www.gnu.org/licenses/>. +! <https://www.gnu.org/licenses/>. !GCC$ builtin (cos) attributes simd (notinbranch) if('x86_64') !GCC$ builtin (cosf) attributes simd (notinbranch) if('x86_64') diff --git a/lib/libc/include/i386-linux-gnu/fpu_control.h b/lib/libc/include/i386-linux-gnu/fpu_control.h index 1c06450778..fa0a861923 100644 --- a/lib/libc/include/i386-linux-gnu/fpu_control.h +++ b/lib/libc/include/i386-linux-gnu/fpu_control.h @@ -1,5 +1,5 @@ /* FPU control word bits. x86 version. - 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 Olaf Flebbe. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FPU_CONTROL_H #define _FPU_CONTROL_H 1 diff --git a/lib/libc/include/i386-linux-gnu/sys/elf.h b/lib/libc/include/i386-linux-gnu/sys/elf.h index d8c2c7acc8..d37502689d 100644 --- a/lib/libc/include/i386-linux-gnu/sys/elf.h +++ b/lib/libc/include/i386-linux-gnu/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_ELF_H #define _SYS_ELF_H 1 diff --git a/lib/libc/include/i386-linux-gnu/sys/ptrace.h b/lib/libc/include/i386-linux-gnu/sys/ptrace.h index 1f6c5b50fd..0977a402d7 100644 --- a/lib/libc/include/i386-linux-gnu/sys/ptrace.h +++ b/lib/libc/include/i386-linux-gnu/sys/ptrace.h @@ -1,5 +1,5 @@ /* `ptrace' debugger support interface. Linux/x86 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. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PTRACE_H #define _SYS_PTRACE_H 1 @@ -186,8 +186,12 @@ enum __ptrace_request #define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER /* Get seccomp BPF filter metadata. */ - PTRACE_SECCOMP_GET_METADATA = 0x420d + PTRACE_SECCOMP_GET_METADATA = 0x420d, #define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA + + /* Get information about system call. */ + PTRACE_GET_SYSCALL_INFO = 0x420e +#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO }; diff --git a/lib/libc/include/i386-linux-gnu/sys/ucontext.h b/lib/libc/include/i386-linux-gnu/sys/ucontext.h index 2127a222a9..3244eab7c8 100644 --- a/lib/libc/include/i386-linux-gnu/sys/ucontext.h +++ b/lib/libc/include/i386-linux-gnu/sys/ucontext.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,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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_UCONTEXT_H #define _SYS_UCONTEXT_H 1 diff --git a/lib/libc/include/i386-linux-gnu/sys/user.h b/lib/libc/include/i386-linux-gnu/sys/user.h index 74bd6e393a..fe9d875789 100644 --- a/lib/libc/include/i386-linux-gnu/sys/user.h +++ b/lib/libc/include/i386-linux-gnu/sys/user.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,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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_USER_H #define _SYS_USER_H 1 diff --git a/lib/libc/include/mips-linux-gnu/bits/dlfcn.h b/lib/libc/include/mips-linux-gnu/bits/dlfcn.h index 996be6f45b..f0c7dabbcc 100644 --- a/lib/libc/include/mips-linux-gnu/bits/dlfcn.h +++ b/lib/libc/include/mips-linux-gnu/bits/dlfcn.h @@ -1,5 +1,5 @@ /* System dependent definitions for run-time dynamic loading. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _DLFCN_H # error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead." diff --git a/lib/libc/include/mips-linux-gnu/bits/errno.h b/lib/libc/include/mips-linux-gnu/bits/errno.h index 2d6069ad8a..a508c37d1c 100644 --- a/lib/libc/include/mips-linux-gnu/bits/errno.h +++ b/lib/libc/include/mips-linux-gnu/bits/errno.h @@ -1,5 +1,5 @@ /* Error constants. MIPS/Linux specific 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_ERRNO_H diff --git a/lib/libc/include/mips-linux-gnu/bits/eventfd.h b/lib/libc/include/mips-linux-gnu/bits/eventfd.h index 9ff48c23fb..f1bea57e19 100644 --- a/lib/libc/include/mips-linux-gnu/bits/eventfd.h +++ b/lib/libc/include/mips-linux-gnu/bits/eventfd.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2019 Free Software Foundation, Inc. +/* Copyright (C) 2007-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_EVENTFD_H # error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead." diff --git a/lib/libc/include/mips-linux-gnu/bits/inotify.h b/lib/libc/include/mips-linux-gnu/bits/inotify.h index d063466c30..5025b69e8a 100644 --- a/lib/libc/include/mips-linux-gnu/bits/inotify.h +++ b/lib/libc/include/mips-linux-gnu/bits/inotify.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_INOTIFY_H # error "Never use <bits/inotify.h> directly; include <sys/inotify.h> instead." diff --git a/lib/libc/include/mips-linux-gnu/bits/ioctl-types.h b/lib/libc/include/mips-linux-gnu/bits/ioctl-types.h index bfbdac6f57..064494da76 100644 --- a/lib/libc/include/mips-linux-gnu/bits/ioctl-types.h +++ b/lib/libc/include/mips-linux-gnu/bits/ioctl-types.h @@ -1,5 +1,5 @@ /* Structure types for pre-termios terminal ioctls. Linux/MIPS version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_IOCTL_H # error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead." diff --git a/lib/libc/include/mips-linux-gnu/bits/ipc.h b/lib/libc/include/mips-linux-gnu/bits/ipc.h deleted file mode 100644 index e994ffc9ad..0000000000 --- a/lib/libc/include/mips-linux-gnu/bits/ipc.h +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (C) 1995-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 - <http://www.gnu.org/licenses/>. */ - -#ifndef _SYS_IPC_H -# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead." -#endif - -#include <bits/types.h> - -/* Mode bits for `msgget', `semget', and `shmget'. */ -#define IPC_CREAT 01000 /* Create key if key does not exist. */ -#define IPC_EXCL 02000 /* Fail if key exists. */ -#define IPC_NOWAIT 04000 /* Return error on wait. */ - -/* Control commands for `msgctl', `semctl', and `shmctl'. */ -#define IPC_RMID 0 /* Remove identifier. */ -#define IPC_SET 1 /* Set `ipc_perm' options. */ -#define IPC_STAT 2 /* Get `ipc_perm' options. */ -#ifdef __USE_GNU -# define IPC_INFO 3 /* See ipcs. */ -#endif - -/* Special key values. */ -#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ - - -/* Data structure used to pass permission information to IPC operations. */ -struct ipc_perm - { - __key_t __key; /* Key. */ - unsigned int uid; /* Owner's user ID. */ - unsigned int gid; /* Owner's group ID. */ - unsigned int cuid; /* Creator's user ID. */ - unsigned int cgid; /* Creator's group ID. */ - unsigned int mode; /* Read/write permission. */ - unsigned short int __seq; /* Sequence number. */ - unsigned short int __pad1; - unsigned long int __glibc_reserved1; - unsigned long int __glibc_reserved2; -};
\ No newline at end of file diff --git a/lib/libc/include/mips-linux-gnu/bits/ipctypes.h b/lib/libc/include/mips-linux-gnu/bits/ipctypes.h index ffea8d325c..a40b72c769 100644 --- a/lib/libc/include/mips-linux-gnu/bits/ipctypes.h +++ b/lib/libc/include/mips-linux-gnu/bits/ipctypes.h @@ -1,5 +1,5 @@ /* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. MIPS 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * Never include <bits/ipctypes.h> directly. diff --git a/lib/libc/include/mips-linux-gnu/bits/local_lim.h b/lib/libc/include/mips-linux-gnu/bits/local_lim.h index 96b65eb686..2f7a63a3dd 100644 --- a/lib/libc/include/mips-linux-gnu/bits/local_lim.h +++ b/lib/libc/include/mips-linux-gnu/bits/local_lim.h @@ -1,5 +1,5 @@ /* Minimum guaranteed maximum values for system limits. MIPS Linux version. - 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. 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* The kernel header pollutes the namespace with the NR_OPEN symbol and defines LINK_MAX although filesystems have different maxima. A diff --git a/lib/libc/include/mips-linux-gnu/bits/mman.h b/lib/libc/include/mips-linux-gnu/bits/mman.h index 43c768ab5e..ec9cc654ca 100644 --- a/lib/libc/include/mips-linux-gnu/bits/mman.h +++ b/lib/libc/include/mips-linux-gnu/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/MIPS version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_MMAN_H # error "Never use <bits/mman.h> directly; include <sys/mman.h> instead." diff --git a/lib/libc/include/mips-linux-gnu/bits/msq-pad.h b/lib/libc/include/mips-linux-gnu/bits/msq-pad.h index 2cde6ddf34..132f7815a7 100644 --- a/lib/libc/include/mips-linux-gnu/bits/msq-pad.h +++ b/lib/libc/include/mips-linux-gnu/bits/msq-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct msqid_ds. MIPS 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_MSG_H # error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead." diff --git a/lib/libc/include/mips-linux-gnu/bits/poll.h b/lib/libc/include/mips-linux-gnu/bits/poll.h index 7793460007..e1901823ca 100644 --- a/lib/libc/include/mips-linux-gnu/bits/poll.h +++ b/lib/libc/include/mips-linux-gnu/bits/poll.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_POLL_H # error "Never use <bits/poll.h> directly; include <sys/poll.h> instead." diff --git a/lib/libc/include/mips-linux-gnu/bits/pthreadtypes-arch.h b/lib/libc/include/mips-linux-gnu/bits/pthreadtypes-arch.h new file mode 100644 index 0000000000..6fb6e1c0b0 --- /dev/null +++ b/lib/libc/include/mips-linux-gnu/bits/pthreadtypes-arch.h @@ -0,0 +1,44 @@ +/* Machine-specific pthread type layouts. MIPS version. + 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 + 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 + <https://www.gnu.org/licenses/>. */ + +#ifndef _BITS_PTHREADTYPES_ARCH_H +#define _BITS_PTHREADTYPES_ARCH_H 1 + +#include <bits/endian.h> + +#if _MIPS_SIM == _ABI64 +# 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_ATTR_T 36 +# define __SIZEOF_PTHREAD_MUTEX_T 24 +# define __SIZEOF_PTHREAD_RWLOCK_T 32 +# define __SIZEOF_PTHREAD_BARRIER_T 20 +#endif +#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +#define __SIZEOF_PTHREAD_COND_T 48 +#define __SIZEOF_PTHREAD_CONDATTR_T 4 +#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 +#define __SIZEOF_PTHREAD_BARRIERATTR_T 4 + +#define __LOCK_ALIGNMENT +#define __ONCE_ALIGNMENT + +#endif /* bits/pthreadtypes.h */
\ No newline at end of file diff --git a/lib/libc/include/mips-linux-gnu/bits/resource.h b/lib/libc/include/mips-linux-gnu/bits/resource.h index 2f200b1025..11fc73b49d 100644 --- a/lib/libc/include/mips-linux-gnu/bits/resource.h +++ b/lib/libc/include/mips-linux-gnu/bits/resource.h @@ -1,5 +1,5 @@ /* Bit values & structures for resource limits. Linux/MIPS version. - 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_RESOURCE_H # error "Never use <bits/resource.h> directly; include <sys/resource.h> instead." diff --git a/lib/libc/include/mips-linux-gnu/bits/sem-pad.h b/lib/libc/include/mips-linux-gnu/bits/sem-pad.h index b1810b2080..0638180f08 100644 --- a/lib/libc/include/mips-linux-gnu/bits/sem-pad.h +++ b/lib/libc/include/mips-linux-gnu/bits/sem-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct semid_ds. MIPS 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SEM_H # error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead." diff --git a/lib/libc/include/mips-linux-gnu/bits/shm-pad.h b/lib/libc/include/mips-linux-gnu/bits/shm-pad.h index e672c8c7b0..1c596174a8 100644 --- a/lib/libc/include/mips-linux-gnu/bits/shm-pad.h +++ b/lib/libc/include/mips-linux-gnu/bits/shm-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct shmid_ds. MIPS 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SHM_H # error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead." diff --git a/lib/libc/include/mips-linux-gnu/bits/shmlba.h b/lib/libc/include/mips-linux-gnu/bits/shmlba.h index 9561decd9a..9f61bc9247 100644 --- a/lib/libc/include/mips-linux-gnu/bits/shmlba.h +++ b/lib/libc/include/mips-linux-gnu/bits/shmlba.h @@ -1,5 +1,5 @@ /* Define SHMLBA. MIPS 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SHM_H # error "Never use <bits/shmlba.h> directly; include <sys/shm.h> instead." diff --git a/lib/libc/include/mips-linux-gnu/bits/sigaction.h b/lib/libc/include/mips-linux-gnu/bits/sigaction.h index bbc6004b59..af27d0c0fc 100644 --- a/lib/libc/include/mips-linux-gnu/bits/sigaction.h +++ b/lib/libc/include/mips-linux-gnu/bits/sigaction.h @@ -1,5 +1,5 @@ /* The proper definitions for Linux/MIPS's sigaction. - 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. 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGACTION_H #define _BITS_SIGACTION_H 1 diff --git a/lib/libc/include/mips-linux-gnu/bits/sigcontext.h b/lib/libc/include/mips-linux-gnu/bits/sigcontext.h index 231695c93f..cb51a1980f 100644 --- a/lib/libc/include/mips-linux-gnu/bits/sigcontext.h +++ b/lib/libc/include/mips-linux-gnu/bits/sigcontext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. +/* 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 modify it under the terms of the GNU Lesser General Public @@ -12,7 +12,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGCONTEXT_H #define _BITS_SIGCONTEXT_H 1 diff --git a/lib/libc/include/mips-linux-gnu/bits/signalfd.h b/lib/libc/include/mips-linux-gnu/bits/signalfd.h index a8f5275551..8bc180b1b8 100644 --- a/lib/libc/include/mips-linux-gnu/bits/signalfd.h +++ b/lib/libc/include/mips-linux-gnu/bits/signalfd.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2019 Free Software Foundation, Inc. +/* Copyright (C) 2007-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SIGNALFD_H # error "Never use <bits/signalfd.h> directly; include <sys/signalfd.h> instead." diff --git a/lib/libc/include/mips-linux-gnu/bits/signum.h b/lib/libc/include/mips-linux-gnu/bits/signum.h index e3cd97af8b..e9fa21916b 100644 --- a/lib/libc/include/mips-linux-gnu/bits/signum.h +++ b/lib/libc/include/mips-linux-gnu/bits/signum.h @@ -1,5 +1,5 @@ /* Signal number definitions. Linux/MIPS version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGNUM_H #define _BITS_SIGNUM_H 1 diff --git a/lib/libc/include/mips-linux-gnu/bits/socket-constants.h b/lib/libc/include/mips-linux-gnu/bits/socket-constants.h index cfd1839b98..6ed2492084 100644 --- a/lib/libc/include/mips-linux-gnu/bits/socket-constants.h +++ b/lib/libc/include/mips-linux-gnu/bits/socket-constants.h @@ -1,5 +1,5 @@ /* Socket constants which vary among Linux architectures. Version for MIPS. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SOCKET_H # error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead." diff --git a/lib/libc/include/mips-linux-gnu/bits/socket_type.h b/lib/libc/include/mips-linux-gnu/bits/socket_type.h index 4c976f179e..ad858e116a 100644 --- a/lib/libc/include/mips-linux-gnu/bits/socket_type.h +++ b/lib/libc/include/mips-linux-gnu/bits/socket_type.h @@ -1,5 +1,5 @@ /* Define enum __socket_type for Linux/MIPS. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SOCKET_H # error "Never include <bits/socket_type.h> directly; use <sys/socket.h> instead." diff --git a/lib/libc/include/mips-linux-gnu/bits/statfs.h b/lib/libc/include/mips-linux-gnu/bits/statfs.h index fd0f68d6d7..fad668a7a3 100644 --- a/lib/libc/include/mips-linux-gnu/bits/statfs.h +++ b/lib/libc/include/mips-linux-gnu/bits/statfs.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_STATFS_H # error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead." diff --git a/lib/libc/include/mips-linux-gnu/bits/struct_mutex.h b/lib/libc/include/mips-linux-gnu/bits/struct_mutex.h new file mode 100644 index 0000000000..025ccddc14 --- /dev/null +++ b/lib/libc/include/mips-linux-gnu/bits/struct_mutex.h @@ -0,0 +1,56 @@ +/* MIPS internal mutex struct definitions. + 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _THREAD_MUTEX_INTERNAL_H +#define _THREAD_MUTEX_INTERNAL_H 1 + +struct __pthread_mutex_s +{ + int __lock; + unsigned int __count; + int __owner; +#if _MIPS_SIM == _ABI64 + unsigned int __nusers; +#endif + /* KIND must stay at this position in the structure to maintain + binary compatibility with static initializers. */ + int __kind; +#if _MIPS_SIM == _ABI64 + int __spins; + __pthread_list_t __list; +# define __PTHREAD_MUTEX_HAVE_PREV 1 +#else + unsigned int __nusers; + __extension__ union + { + int __spins; + __pthread_slist_t __list; + }; +# define __PTHREAD_MUTEX_HAVE_PREV 0 +#endif +}; + +#if _MIPS_SIM == _ABI64 +# define __PTHREAD_MUTEX_INITIALIZER(__kind) \ + 0, 0, 0, 0, __kind, 0, { 0, 0 } +#else +# define __PTHREAD_MUTEX_INITIALIZER(__kind) \ + 0, 0, 0, __kind, 0, { 0 } +#endif + +#endif
\ No newline at end of file diff --git a/lib/libc/include/mips-linux-gnu/bits/termios-c_cc.h b/lib/libc/include/mips-linux-gnu/bits/termios-c_cc.h index ed124b8db4..5b5850ca57 100644 --- a/lib/libc/include/mips-linux-gnu/bits/termios-c_cc.h +++ b/lib/libc/include/mips-linux-gnu/bits/termios-c_cc.h @@ -1,5 +1,5 @@ /* termios c_cc symbolic constant definitions. Linux/mips 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-c_cc.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/mips-linux-gnu/bits/termios-c_lflag.h b/lib/libc/include/mips-linux-gnu/bits/termios-c_lflag.h index e5a6773476..cc1f2a0bd5 100644 --- a/lib/libc/include/mips-linux-gnu/bits/termios-c_lflag.h +++ b/lib/libc/include/mips-linux-gnu/bits/termios-c_lflag.h @@ -1,5 +1,5 @@ /* termios local mode definitions. Linux/mips 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-c_lflag.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/mips-linux-gnu/bits/termios-struct.h b/lib/libc/include/mips-linux-gnu/bits/termios-struct.h index 0442c6f354..f046eaaa80 100644 --- a/lib/libc/include/mips-linux-gnu/bits/termios-struct.h +++ b/lib/libc/include/mips-linux-gnu/bits/termios-struct.h @@ -1,5 +1,5 @@ /* struct termios definition. Linux/mips 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-struct.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/mips-linux-gnu/bits/termios-tcflow.h b/lib/libc/include/mips-linux-gnu/bits/termios-tcflow.h index 2c523c3a2a..f21c02a389 100644 --- a/lib/libc/include/mips-linux-gnu/bits/termios-tcflow.h +++ b/lib/libc/include/mips-linux-gnu/bits/termios-tcflow.h @@ -1,5 +1,5 @@ /* termios local mode definitions. Linux/mips 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-tcflow.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/mips-linux-gnu/bits/timerfd.h b/lib/libc/include/mips-linux-gnu/bits/timerfd.h index 005d411617..79ff9d0cc4 100644 --- a/lib/libc/include/mips-linux-gnu/bits/timerfd.h +++ b/lib/libc/include/mips-linux-gnu/bits/timerfd.h @@ -1,4 +1,4 @@ -/* 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_TIMERFD_H # error "Never use <bits/timerfd.h> directly; include <sys/timerfd.h> instead." diff --git a/lib/libc/include/mips-linux-gnu/bits/types/stack_t.h b/lib/libc/include/mips-linux-gnu/bits/types/stack_t.h index b62c348140..03e800bd0c 100644 --- a/lib/libc/include/mips-linux-gnu/bits/types/stack_t.h +++ b/lib/libc/include/mips-linux-gnu/bits/types/stack_t.h @@ -1,5 +1,5 @@ /* Define stack_t. MIPS Linux 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef __stack_t_defined #define __stack_t_defined 1 diff --git a/lib/libc/include/mips-linux-gnu/ieee754.h b/lib/libc/include/mips-linux-gnu/ieee754.h index 600dbce3d8..86baeceab6 100644 --- a/lib/libc/include/mips-linux-gnu/ieee754.h +++ b/lib/libc/include/mips-linux-gnu/ieee754.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,19 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _IEEE754_H - #define _IEEE754_H 1 + #include <features.h> -#include <endian.h> +#include <bits/endian.h> -#include <float.h> +#ifndef __LDBL_MANT_DIG__ +# include <float.h> +# define __LDBL_MANT_DIG__ LDBL_MANT_DIG +#endif __BEGIN_DECLS @@ -127,7 +130,7 @@ union ieee754_double #define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */ -#if LDBL_MANT_DIG == 113 +#if __LDBL_MANT_DIG__ == 113 union ieee854_long_double { @@ -184,7 +187,7 @@ union ieee854_long_double #define IEEE854_LONG_DOUBLE_BIAS 0x3fff /* Added to exponent. */ -#elif LDBL_MANT_DIG == 64 +#elif __LDBL_MANT_DIG__ == 64 union ieee854_long_double { @@ -253,7 +256,7 @@ union ieee854_long_double #define IEEE854_LONG_DOUBLE_BIAS 0x3fff -#elif LDBL_MANT_DIG == 53 +#elif __LDBL_MANT_DIG__ == 53 union ieee854_long_double { @@ -316,7 +319,7 @@ union ieee854_long_double #define IEEE854_LONG_DOUBLE_BIAS 0x3ff /* Added to exponent. */ -#endif /* LDBL_MANT_DIG == 53 */ +#endif /* __LDBL_MANT_DIG__ == 53 */ __END_DECLS diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/dlfcn.h b/lib/libc/include/mips64-linux-gnuabi64/bits/dlfcn.h index 996be6f45b..f0c7dabbcc 100644 --- a/lib/libc/include/mips64-linux-gnuabi64/bits/dlfcn.h +++ b/lib/libc/include/mips64-linux-gnuabi64/bits/dlfcn.h @@ -1,5 +1,5 @@ /* System dependent definitions for run-time dynamic loading. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _DLFCN_H # error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/errno.h b/lib/libc/include/mips64-linux-gnuabi64/bits/errno.h index 2d6069ad8a..a508c37d1c 100644 --- a/lib/libc/include/mips64-linux-gnuabi64/bits/errno.h +++ b/lib/libc/include/mips64-linux-gnuabi64/bits/errno.h @@ -1,5 +1,5 @@ /* Error constants. MIPS/Linux specific 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_ERRNO_H diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/eventfd.h b/lib/libc/include/mips64-linux-gnuabi64/bits/eventfd.h index 9ff48c23fb..f1bea57e19 100644 --- a/lib/libc/include/mips64-linux-gnuabi64/bits/eventfd.h +++ b/lib/libc/include/mips64-linux-gnuabi64/bits/eventfd.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2019 Free Software Foundation, Inc. +/* Copyright (C) 2007-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_EVENTFD_H # error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/inotify.h b/lib/libc/include/mips64-linux-gnuabi64/bits/inotify.h index d063466c30..5025b69e8a 100644 --- a/lib/libc/include/mips64-linux-gnuabi64/bits/inotify.h +++ b/lib/libc/include/mips64-linux-gnuabi64/bits/inotify.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_INOTIFY_H # error "Never use <bits/inotify.h> directly; include <sys/inotify.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/ioctl-types.h b/lib/libc/include/mips64-linux-gnuabi64/bits/ioctl-types.h index bfbdac6f57..064494da76 100644 --- a/lib/libc/include/mips64-linux-gnuabi64/bits/ioctl-types.h +++ b/lib/libc/include/mips64-linux-gnuabi64/bits/ioctl-types.h @@ -1,5 +1,5 @@ /* Structure types for pre-termios terminal ioctls. Linux/MIPS version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_IOCTL_H # error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/ipc.h b/lib/libc/include/mips64-linux-gnuabi64/bits/ipc.h deleted file mode 100644 index e994ffc9ad..0000000000 --- a/lib/libc/include/mips64-linux-gnuabi64/bits/ipc.h +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (C) 1995-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 - <http://www.gnu.org/licenses/>. */ - -#ifndef _SYS_IPC_H -# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead." -#endif - -#include <bits/types.h> - -/* Mode bits for `msgget', `semget', and `shmget'. */ -#define IPC_CREAT 01000 /* Create key if key does not exist. */ -#define IPC_EXCL 02000 /* Fail if key exists. */ -#define IPC_NOWAIT 04000 /* Return error on wait. */ - -/* Control commands for `msgctl', `semctl', and `shmctl'. */ -#define IPC_RMID 0 /* Remove identifier. */ -#define IPC_SET 1 /* Set `ipc_perm' options. */ -#define IPC_STAT 2 /* Get `ipc_perm' options. */ -#ifdef __USE_GNU -# define IPC_INFO 3 /* See ipcs. */ -#endif - -/* Special key values. */ -#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ - - -/* Data structure used to pass permission information to IPC operations. */ -struct ipc_perm - { - __key_t __key; /* Key. */ - unsigned int uid; /* Owner's user ID. */ - unsigned int gid; /* Owner's group ID. */ - unsigned int cuid; /* Creator's user ID. */ - unsigned int cgid; /* Creator's group ID. */ - unsigned int mode; /* Read/write permission. */ - unsigned short int __seq; /* Sequence number. */ - unsigned short int __pad1; - unsigned long int __glibc_reserved1; - unsigned long int __glibc_reserved2; -};
\ No newline at end of file diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/ipctypes.h b/lib/libc/include/mips64-linux-gnuabi64/bits/ipctypes.h index ffea8d325c..a40b72c769 100644 --- a/lib/libc/include/mips64-linux-gnuabi64/bits/ipctypes.h +++ b/lib/libc/include/mips64-linux-gnuabi64/bits/ipctypes.h @@ -1,5 +1,5 @@ /* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. MIPS 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * Never include <bits/ipctypes.h> directly. diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/local_lim.h b/lib/libc/include/mips64-linux-gnuabi64/bits/local_lim.h index 96b65eb686..2f7a63a3dd 100644 --- a/lib/libc/include/mips64-linux-gnuabi64/bits/local_lim.h +++ b/lib/libc/include/mips64-linux-gnuabi64/bits/local_lim.h @@ -1,5 +1,5 @@ /* Minimum guaranteed maximum values for system limits. MIPS Linux version. - 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. 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* The kernel header pollutes the namespace with the NR_OPEN symbol and defines LINK_MAX although filesystems have different maxima. A diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/mman.h b/lib/libc/include/mips64-linux-gnuabi64/bits/mman.h index 43c768ab5e..ec9cc654ca 100644 --- a/lib/libc/include/mips64-linux-gnuabi64/bits/mman.h +++ b/lib/libc/include/mips64-linux-gnuabi64/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/MIPS version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_MMAN_H # error "Never use <bits/mman.h> directly; include <sys/mman.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/msq-pad.h b/lib/libc/include/mips64-linux-gnuabi64/bits/msq-pad.h index 2cde6ddf34..132f7815a7 100644 --- a/lib/libc/include/mips64-linux-gnuabi64/bits/msq-pad.h +++ b/lib/libc/include/mips64-linux-gnuabi64/bits/msq-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct msqid_ds. MIPS 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_MSG_H # error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/poll.h b/lib/libc/include/mips64-linux-gnuabi64/bits/poll.h index 7793460007..e1901823ca 100644 --- a/lib/libc/include/mips64-linux-gnuabi64/bits/poll.h +++ b/lib/libc/include/mips64-linux-gnuabi64/bits/poll.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_POLL_H # error "Never use <bits/poll.h> directly; include <sys/poll.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/pthreadtypes-arch.h b/lib/libc/include/mips64-linux-gnuabi64/bits/pthreadtypes-arch.h new file mode 100644 index 0000000000..6fb6e1c0b0 --- /dev/null +++ b/lib/libc/include/mips64-linux-gnuabi64/bits/pthreadtypes-arch.h @@ -0,0 +1,44 @@ +/* Machine-specific pthread type layouts. MIPS version. + 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 + 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 + <https://www.gnu.org/licenses/>. */ + +#ifndef _BITS_PTHREADTYPES_ARCH_H +#define _BITS_PTHREADTYPES_ARCH_H 1 + +#include <bits/endian.h> + +#if _MIPS_SIM == _ABI64 +# 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_ATTR_T 36 +# define __SIZEOF_PTHREAD_MUTEX_T 24 +# define __SIZEOF_PTHREAD_RWLOCK_T 32 +# define __SIZEOF_PTHREAD_BARRIER_T 20 +#endif +#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +#define __SIZEOF_PTHREAD_COND_T 48 +#define __SIZEOF_PTHREAD_CONDATTR_T 4 +#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 +#define __SIZEOF_PTHREAD_BARRIERATTR_T 4 + +#define __LOCK_ALIGNMENT +#define __ONCE_ALIGNMENT + +#endif /* bits/pthreadtypes.h */
\ No newline at end of file diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/resource.h b/lib/libc/include/mips64-linux-gnuabi64/bits/resource.h index 2f200b1025..11fc73b49d 100644 --- a/lib/libc/include/mips64-linux-gnuabi64/bits/resource.h +++ b/lib/libc/include/mips64-linux-gnuabi64/bits/resource.h @@ -1,5 +1,5 @@ /* Bit values & structures for resource limits. Linux/MIPS version. - 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_RESOURCE_H # error "Never use <bits/resource.h> directly; include <sys/resource.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/sem-pad.h b/lib/libc/include/mips64-linux-gnuabi64/bits/sem-pad.h index b1810b2080..0638180f08 100644 --- a/lib/libc/include/mips64-linux-gnuabi64/bits/sem-pad.h +++ b/lib/libc/include/mips64-linux-gnuabi64/bits/sem-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct semid_ds. MIPS 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SEM_H # error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/shm-pad.h b/lib/libc/include/mips64-linux-gnuabi64/bits/shm-pad.h index e672c8c7b0..1c596174a8 100644 --- a/lib/libc/include/mips64-linux-gnuabi64/bits/shm-pad.h +++ b/lib/libc/include/mips64-linux-gnuabi64/bits/shm-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct shmid_ds. MIPS 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SHM_H # error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/shmlba.h b/lib/libc/include/mips64-linux-gnuabi64/bits/shmlba.h index 9561decd9a..9f61bc9247 100644 --- a/lib/libc/include/mips64-linux-gnuabi64/bits/shmlba.h +++ b/lib/libc/include/mips64-linux-gnuabi64/bits/shmlba.h @@ -1,5 +1,5 @@ /* Define SHMLBA. MIPS 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SHM_H # error "Never use <bits/shmlba.h> directly; include <sys/shm.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/sigaction.h b/lib/libc/include/mips64-linux-gnuabi64/bits/sigaction.h index bbc6004b59..af27d0c0fc 100644 --- a/lib/libc/include/mips64-linux-gnuabi64/bits/sigaction.h +++ b/lib/libc/include/mips64-linux-gnuabi64/bits/sigaction.h @@ -1,5 +1,5 @@ /* The proper definitions for Linux/MIPS's sigaction. - 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. 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGACTION_H #define _BITS_SIGACTION_H 1 diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/sigcontext.h b/lib/libc/include/mips64-linux-gnuabi64/bits/sigcontext.h index 231695c93f..cb51a1980f 100644 --- a/lib/libc/include/mips64-linux-gnuabi64/bits/sigcontext.h +++ b/lib/libc/include/mips64-linux-gnuabi64/bits/sigcontext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. +/* 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 modify it under the terms of the GNU Lesser General Public @@ -12,7 +12,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGCONTEXT_H #define _BITS_SIGCONTEXT_H 1 diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/signalfd.h b/lib/libc/include/mips64-linux-gnuabi64/bits/signalfd.h index a8f5275551..8bc180b1b8 100644 --- a/lib/libc/include/mips64-linux-gnuabi64/bits/signalfd.h +++ b/lib/libc/include/mips64-linux-gnuabi64/bits/signalfd.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2019 Free Software Foundation, Inc. +/* Copyright (C) 2007-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SIGNALFD_H # error "Never use <bits/signalfd.h> directly; include <sys/signalfd.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/signum.h b/lib/libc/include/mips64-linux-gnuabi64/bits/signum.h index e3cd97af8b..e9fa21916b 100644 --- a/lib/libc/include/mips64-linux-gnuabi64/bits/signum.h +++ b/lib/libc/include/mips64-linux-gnuabi64/bits/signum.h @@ -1,5 +1,5 @@ /* Signal number definitions. Linux/MIPS version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGNUM_H #define _BITS_SIGNUM_H 1 diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/socket-constants.h b/lib/libc/include/mips64-linux-gnuabi64/bits/socket-constants.h index cfd1839b98..6ed2492084 100644 --- a/lib/libc/include/mips64-linux-gnuabi64/bits/socket-constants.h +++ b/lib/libc/include/mips64-linux-gnuabi64/bits/socket-constants.h @@ -1,5 +1,5 @@ /* Socket constants which vary among Linux architectures. Version for MIPS. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SOCKET_H # error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/socket_type.h b/lib/libc/include/mips64-linux-gnuabi64/bits/socket_type.h index 4c976f179e..ad858e116a 100644 --- a/lib/libc/include/mips64-linux-gnuabi64/bits/socket_type.h +++ b/lib/libc/include/mips64-linux-gnuabi64/bits/socket_type.h @@ -1,5 +1,5 @@ /* Define enum __socket_type for Linux/MIPS. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SOCKET_H # error "Never include <bits/socket_type.h> directly; use <sys/socket.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/statfs.h b/lib/libc/include/mips64-linux-gnuabi64/bits/statfs.h index fd0f68d6d7..fad668a7a3 100644 --- a/lib/libc/include/mips64-linux-gnuabi64/bits/statfs.h +++ b/lib/libc/include/mips64-linux-gnuabi64/bits/statfs.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_STATFS_H # error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/struct_mutex.h b/lib/libc/include/mips64-linux-gnuabi64/bits/struct_mutex.h new file mode 100644 index 0000000000..025ccddc14 --- /dev/null +++ b/lib/libc/include/mips64-linux-gnuabi64/bits/struct_mutex.h @@ -0,0 +1,56 @@ +/* MIPS internal mutex struct definitions. + 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _THREAD_MUTEX_INTERNAL_H +#define _THREAD_MUTEX_INTERNAL_H 1 + +struct __pthread_mutex_s +{ + int __lock; + unsigned int __count; + int __owner; +#if _MIPS_SIM == _ABI64 + unsigned int __nusers; +#endif + /* KIND must stay at this position in the structure to maintain + binary compatibility with static initializers. */ + int __kind; +#if _MIPS_SIM == _ABI64 + int __spins; + __pthread_list_t __list; +# define __PTHREAD_MUTEX_HAVE_PREV 1 +#else + unsigned int __nusers; + __extension__ union + { + int __spins; + __pthread_slist_t __list; + }; +# define __PTHREAD_MUTEX_HAVE_PREV 0 +#endif +}; + +#if _MIPS_SIM == _ABI64 +# define __PTHREAD_MUTEX_INITIALIZER(__kind) \ + 0, 0, 0, 0, __kind, 0, { 0, 0 } +#else +# define __PTHREAD_MUTEX_INITIALIZER(__kind) \ + 0, 0, 0, __kind, 0, { 0 } +#endif + +#endif
\ No newline at end of file diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/termios-c_cc.h b/lib/libc/include/mips64-linux-gnuabi64/bits/termios-c_cc.h index ed124b8db4..5b5850ca57 100644 --- a/lib/libc/include/mips64-linux-gnuabi64/bits/termios-c_cc.h +++ b/lib/libc/include/mips64-linux-gnuabi64/bits/termios-c_cc.h @@ -1,5 +1,5 @@ /* termios c_cc symbolic constant definitions. Linux/mips 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-c_cc.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/termios-c_lflag.h b/lib/libc/include/mips64-linux-gnuabi64/bits/termios-c_lflag.h index e5a6773476..cc1f2a0bd5 100644 --- a/lib/libc/include/mips64-linux-gnuabi64/bits/termios-c_lflag.h +++ b/lib/libc/include/mips64-linux-gnuabi64/bits/termios-c_lflag.h @@ -1,5 +1,5 @@ /* termios local mode definitions. Linux/mips 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-c_lflag.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/termios-struct.h b/lib/libc/include/mips64-linux-gnuabi64/bits/termios-struct.h index 0442c6f354..f046eaaa80 100644 --- a/lib/libc/include/mips64-linux-gnuabi64/bits/termios-struct.h +++ b/lib/libc/include/mips64-linux-gnuabi64/bits/termios-struct.h @@ -1,5 +1,5 @@ /* struct termios definition. Linux/mips 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-struct.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/termios-tcflow.h b/lib/libc/include/mips64-linux-gnuabi64/bits/termios-tcflow.h index 2c523c3a2a..f21c02a389 100644 --- a/lib/libc/include/mips64-linux-gnuabi64/bits/termios-tcflow.h +++ b/lib/libc/include/mips64-linux-gnuabi64/bits/termios-tcflow.h @@ -1,5 +1,5 @@ /* termios local mode definitions. Linux/mips 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-tcflow.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/timerfd.h b/lib/libc/include/mips64-linux-gnuabi64/bits/timerfd.h index 005d411617..79ff9d0cc4 100644 --- a/lib/libc/include/mips64-linux-gnuabi64/bits/timerfd.h +++ b/lib/libc/include/mips64-linux-gnuabi64/bits/timerfd.h @@ -1,4 +1,4 @@ -/* 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_TIMERFD_H # error "Never use <bits/timerfd.h> directly; include <sys/timerfd.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/types/stack_t.h b/lib/libc/include/mips64-linux-gnuabi64/bits/types/stack_t.h index b62c348140..03e800bd0c 100644 --- a/lib/libc/include/mips64-linux-gnuabi64/bits/types/stack_t.h +++ b/lib/libc/include/mips64-linux-gnuabi64/bits/types/stack_t.h @@ -1,5 +1,5 @@ /* Define stack_t. MIPS Linux 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef __stack_t_defined #define __stack_t_defined 1 diff --git a/lib/libc/include/mips64-linux-gnuabi64/ieee754.h b/lib/libc/include/mips64-linux-gnuabi64/ieee754.h index 600dbce3d8..86baeceab6 100644 --- a/lib/libc/include/mips64-linux-gnuabi64/ieee754.h +++ b/lib/libc/include/mips64-linux-gnuabi64/ieee754.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,19 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _IEEE754_H - #define _IEEE754_H 1 + #include <features.h> -#include <endian.h> +#include <bits/endian.h> -#include <float.h> +#ifndef __LDBL_MANT_DIG__ +# include <float.h> +# define __LDBL_MANT_DIG__ LDBL_MANT_DIG +#endif __BEGIN_DECLS @@ -127,7 +130,7 @@ union ieee754_double #define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */ -#if LDBL_MANT_DIG == 113 +#if __LDBL_MANT_DIG__ == 113 union ieee854_long_double { @@ -184,7 +187,7 @@ union ieee854_long_double #define IEEE854_LONG_DOUBLE_BIAS 0x3fff /* Added to exponent. */ -#elif LDBL_MANT_DIG == 64 +#elif __LDBL_MANT_DIG__ == 64 union ieee854_long_double { @@ -253,7 +256,7 @@ union ieee854_long_double #define IEEE854_LONG_DOUBLE_BIAS 0x3fff -#elif LDBL_MANT_DIG == 53 +#elif __LDBL_MANT_DIG__ == 53 union ieee854_long_double { @@ -316,7 +319,7 @@ union ieee854_long_double #define IEEE854_LONG_DOUBLE_BIAS 0x3ff /* Added to exponent. */ -#endif /* LDBL_MANT_DIG == 53 */ +#endif /* __LDBL_MANT_DIG__ == 53 */ __END_DECLS diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/dlfcn.h b/lib/libc/include/mips64-linux-gnuabin32/bits/dlfcn.h index 996be6f45b..f0c7dabbcc 100644 --- a/lib/libc/include/mips64-linux-gnuabin32/bits/dlfcn.h +++ b/lib/libc/include/mips64-linux-gnuabin32/bits/dlfcn.h @@ -1,5 +1,5 @@ /* System dependent definitions for run-time dynamic loading. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _DLFCN_H # error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/errno.h b/lib/libc/include/mips64-linux-gnuabin32/bits/errno.h index 2d6069ad8a..a508c37d1c 100644 --- a/lib/libc/include/mips64-linux-gnuabin32/bits/errno.h +++ b/lib/libc/include/mips64-linux-gnuabin32/bits/errno.h @@ -1,5 +1,5 @@ /* Error constants. MIPS/Linux specific 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_ERRNO_H diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/eventfd.h b/lib/libc/include/mips64-linux-gnuabin32/bits/eventfd.h index 9ff48c23fb..f1bea57e19 100644 --- a/lib/libc/include/mips64-linux-gnuabin32/bits/eventfd.h +++ b/lib/libc/include/mips64-linux-gnuabin32/bits/eventfd.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2019 Free Software Foundation, Inc. +/* Copyright (C) 2007-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_EVENTFD_H # error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/inotify.h b/lib/libc/include/mips64-linux-gnuabin32/bits/inotify.h index d063466c30..5025b69e8a 100644 --- a/lib/libc/include/mips64-linux-gnuabin32/bits/inotify.h +++ b/lib/libc/include/mips64-linux-gnuabin32/bits/inotify.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_INOTIFY_H # error "Never use <bits/inotify.h> directly; include <sys/inotify.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/ioctl-types.h b/lib/libc/include/mips64-linux-gnuabin32/bits/ioctl-types.h index bfbdac6f57..064494da76 100644 --- a/lib/libc/include/mips64-linux-gnuabin32/bits/ioctl-types.h +++ b/lib/libc/include/mips64-linux-gnuabin32/bits/ioctl-types.h @@ -1,5 +1,5 @@ /* Structure types for pre-termios terminal ioctls. Linux/MIPS version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_IOCTL_H # error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/ipc.h b/lib/libc/include/mips64-linux-gnuabin32/bits/ipc.h deleted file mode 100644 index e994ffc9ad..0000000000 --- a/lib/libc/include/mips64-linux-gnuabin32/bits/ipc.h +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (C) 1995-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 - <http://www.gnu.org/licenses/>. */ - -#ifndef _SYS_IPC_H -# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead." -#endif - -#include <bits/types.h> - -/* Mode bits for `msgget', `semget', and `shmget'. */ -#define IPC_CREAT 01000 /* Create key if key does not exist. */ -#define IPC_EXCL 02000 /* Fail if key exists. */ -#define IPC_NOWAIT 04000 /* Return error on wait. */ - -/* Control commands for `msgctl', `semctl', and `shmctl'. */ -#define IPC_RMID 0 /* Remove identifier. */ -#define IPC_SET 1 /* Set `ipc_perm' options. */ -#define IPC_STAT 2 /* Get `ipc_perm' options. */ -#ifdef __USE_GNU -# define IPC_INFO 3 /* See ipcs. */ -#endif - -/* Special key values. */ -#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ - - -/* Data structure used to pass permission information to IPC operations. */ -struct ipc_perm - { - __key_t __key; /* Key. */ - unsigned int uid; /* Owner's user ID. */ - unsigned int gid; /* Owner's group ID. */ - unsigned int cuid; /* Creator's user ID. */ - unsigned int cgid; /* Creator's group ID. */ - unsigned int mode; /* Read/write permission. */ - unsigned short int __seq; /* Sequence number. */ - unsigned short int __pad1; - unsigned long int __glibc_reserved1; - unsigned long int __glibc_reserved2; -};
\ No newline at end of file diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/ipctypes.h b/lib/libc/include/mips64-linux-gnuabin32/bits/ipctypes.h index ffea8d325c..a40b72c769 100644 --- a/lib/libc/include/mips64-linux-gnuabin32/bits/ipctypes.h +++ b/lib/libc/include/mips64-linux-gnuabin32/bits/ipctypes.h @@ -1,5 +1,5 @@ /* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. MIPS 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * Never include <bits/ipctypes.h> directly. diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/local_lim.h b/lib/libc/include/mips64-linux-gnuabin32/bits/local_lim.h index 96b65eb686..2f7a63a3dd 100644 --- a/lib/libc/include/mips64-linux-gnuabin32/bits/local_lim.h +++ b/lib/libc/include/mips64-linux-gnuabin32/bits/local_lim.h @@ -1,5 +1,5 @@ /* Minimum guaranteed maximum values for system limits. MIPS Linux version. - 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. 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* The kernel header pollutes the namespace with the NR_OPEN symbol and defines LINK_MAX although filesystems have different maxima. A diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/mman.h b/lib/libc/include/mips64-linux-gnuabin32/bits/mman.h index 43c768ab5e..ec9cc654ca 100644 --- a/lib/libc/include/mips64-linux-gnuabin32/bits/mman.h +++ b/lib/libc/include/mips64-linux-gnuabin32/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/MIPS version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_MMAN_H # error "Never use <bits/mman.h> directly; include <sys/mman.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/msq-pad.h b/lib/libc/include/mips64-linux-gnuabin32/bits/msq-pad.h index 2cde6ddf34..132f7815a7 100644 --- a/lib/libc/include/mips64-linux-gnuabin32/bits/msq-pad.h +++ b/lib/libc/include/mips64-linux-gnuabin32/bits/msq-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct msqid_ds. MIPS 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_MSG_H # error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/poll.h b/lib/libc/include/mips64-linux-gnuabin32/bits/poll.h index 7793460007..e1901823ca 100644 --- a/lib/libc/include/mips64-linux-gnuabin32/bits/poll.h +++ b/lib/libc/include/mips64-linux-gnuabin32/bits/poll.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_POLL_H # error "Never use <bits/poll.h> directly; include <sys/poll.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/pthreadtypes-arch.h b/lib/libc/include/mips64-linux-gnuabin32/bits/pthreadtypes-arch.h new file mode 100644 index 0000000000..6fb6e1c0b0 --- /dev/null +++ b/lib/libc/include/mips64-linux-gnuabin32/bits/pthreadtypes-arch.h @@ -0,0 +1,44 @@ +/* Machine-specific pthread type layouts. MIPS version. + 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 + 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 + <https://www.gnu.org/licenses/>. */ + +#ifndef _BITS_PTHREADTYPES_ARCH_H +#define _BITS_PTHREADTYPES_ARCH_H 1 + +#include <bits/endian.h> + +#if _MIPS_SIM == _ABI64 +# 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_ATTR_T 36 +# define __SIZEOF_PTHREAD_MUTEX_T 24 +# define __SIZEOF_PTHREAD_RWLOCK_T 32 +# define __SIZEOF_PTHREAD_BARRIER_T 20 +#endif +#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +#define __SIZEOF_PTHREAD_COND_T 48 +#define __SIZEOF_PTHREAD_CONDATTR_T 4 +#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 +#define __SIZEOF_PTHREAD_BARRIERATTR_T 4 + +#define __LOCK_ALIGNMENT +#define __ONCE_ALIGNMENT + +#endif /* bits/pthreadtypes.h */
\ No newline at end of file diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/resource.h b/lib/libc/include/mips64-linux-gnuabin32/bits/resource.h index 2f200b1025..11fc73b49d 100644 --- a/lib/libc/include/mips64-linux-gnuabin32/bits/resource.h +++ b/lib/libc/include/mips64-linux-gnuabin32/bits/resource.h @@ -1,5 +1,5 @@ /* Bit values & structures for resource limits. Linux/MIPS version. - 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_RESOURCE_H # error "Never use <bits/resource.h> directly; include <sys/resource.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/sem-pad.h b/lib/libc/include/mips64-linux-gnuabin32/bits/sem-pad.h index b1810b2080..0638180f08 100644 --- a/lib/libc/include/mips64-linux-gnuabin32/bits/sem-pad.h +++ b/lib/libc/include/mips64-linux-gnuabin32/bits/sem-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct semid_ds. MIPS 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SEM_H # error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/shm-pad.h b/lib/libc/include/mips64-linux-gnuabin32/bits/shm-pad.h index e672c8c7b0..1c596174a8 100644 --- a/lib/libc/include/mips64-linux-gnuabin32/bits/shm-pad.h +++ b/lib/libc/include/mips64-linux-gnuabin32/bits/shm-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct shmid_ds. MIPS 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SHM_H # error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/shmlba.h b/lib/libc/include/mips64-linux-gnuabin32/bits/shmlba.h index 9561decd9a..9f61bc9247 100644 --- a/lib/libc/include/mips64-linux-gnuabin32/bits/shmlba.h +++ b/lib/libc/include/mips64-linux-gnuabin32/bits/shmlba.h @@ -1,5 +1,5 @@ /* Define SHMLBA. MIPS 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SHM_H # error "Never use <bits/shmlba.h> directly; include <sys/shm.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/sigaction.h b/lib/libc/include/mips64-linux-gnuabin32/bits/sigaction.h index bbc6004b59..af27d0c0fc 100644 --- a/lib/libc/include/mips64-linux-gnuabin32/bits/sigaction.h +++ b/lib/libc/include/mips64-linux-gnuabin32/bits/sigaction.h @@ -1,5 +1,5 @@ /* The proper definitions for Linux/MIPS's sigaction. - 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. 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGACTION_H #define _BITS_SIGACTION_H 1 diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/sigcontext.h b/lib/libc/include/mips64-linux-gnuabin32/bits/sigcontext.h index 231695c93f..cb51a1980f 100644 --- a/lib/libc/include/mips64-linux-gnuabin32/bits/sigcontext.h +++ b/lib/libc/include/mips64-linux-gnuabin32/bits/sigcontext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. +/* 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 modify it under the terms of the GNU Lesser General Public @@ -12,7 +12,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGCONTEXT_H #define _BITS_SIGCONTEXT_H 1 diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/signalfd.h b/lib/libc/include/mips64-linux-gnuabin32/bits/signalfd.h index a8f5275551..8bc180b1b8 100644 --- a/lib/libc/include/mips64-linux-gnuabin32/bits/signalfd.h +++ b/lib/libc/include/mips64-linux-gnuabin32/bits/signalfd.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2019 Free Software Foundation, Inc. +/* Copyright (C) 2007-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SIGNALFD_H # error "Never use <bits/signalfd.h> directly; include <sys/signalfd.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/signum.h b/lib/libc/include/mips64-linux-gnuabin32/bits/signum.h index e3cd97af8b..e9fa21916b 100644 --- a/lib/libc/include/mips64-linux-gnuabin32/bits/signum.h +++ b/lib/libc/include/mips64-linux-gnuabin32/bits/signum.h @@ -1,5 +1,5 @@ /* Signal number definitions. Linux/MIPS version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGNUM_H #define _BITS_SIGNUM_H 1 diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/socket-constants.h b/lib/libc/include/mips64-linux-gnuabin32/bits/socket-constants.h index cfd1839b98..6ed2492084 100644 --- a/lib/libc/include/mips64-linux-gnuabin32/bits/socket-constants.h +++ b/lib/libc/include/mips64-linux-gnuabin32/bits/socket-constants.h @@ -1,5 +1,5 @@ /* Socket constants which vary among Linux architectures. Version for MIPS. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SOCKET_H # error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/socket_type.h b/lib/libc/include/mips64-linux-gnuabin32/bits/socket_type.h index 4c976f179e..ad858e116a 100644 --- a/lib/libc/include/mips64-linux-gnuabin32/bits/socket_type.h +++ b/lib/libc/include/mips64-linux-gnuabin32/bits/socket_type.h @@ -1,5 +1,5 @@ /* Define enum __socket_type for Linux/MIPS. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SOCKET_H # error "Never include <bits/socket_type.h> directly; use <sys/socket.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/statfs.h b/lib/libc/include/mips64-linux-gnuabin32/bits/statfs.h index fd0f68d6d7..fad668a7a3 100644 --- a/lib/libc/include/mips64-linux-gnuabin32/bits/statfs.h +++ b/lib/libc/include/mips64-linux-gnuabin32/bits/statfs.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_STATFS_H # error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/struct_mutex.h b/lib/libc/include/mips64-linux-gnuabin32/bits/struct_mutex.h new file mode 100644 index 0000000000..025ccddc14 --- /dev/null +++ b/lib/libc/include/mips64-linux-gnuabin32/bits/struct_mutex.h @@ -0,0 +1,56 @@ +/* MIPS internal mutex struct definitions. + 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _THREAD_MUTEX_INTERNAL_H +#define _THREAD_MUTEX_INTERNAL_H 1 + +struct __pthread_mutex_s +{ + int __lock; + unsigned int __count; + int __owner; +#if _MIPS_SIM == _ABI64 + unsigned int __nusers; +#endif + /* KIND must stay at this position in the structure to maintain + binary compatibility with static initializers. */ + int __kind; +#if _MIPS_SIM == _ABI64 + int __spins; + __pthread_list_t __list; +# define __PTHREAD_MUTEX_HAVE_PREV 1 +#else + unsigned int __nusers; + __extension__ union + { + int __spins; + __pthread_slist_t __list; + }; +# define __PTHREAD_MUTEX_HAVE_PREV 0 +#endif +}; + +#if _MIPS_SIM == _ABI64 +# define __PTHREAD_MUTEX_INITIALIZER(__kind) \ + 0, 0, 0, 0, __kind, 0, { 0, 0 } +#else +# define __PTHREAD_MUTEX_INITIALIZER(__kind) \ + 0, 0, 0, __kind, 0, { 0 } +#endif + +#endif
\ No newline at end of file diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/termios-c_cc.h b/lib/libc/include/mips64-linux-gnuabin32/bits/termios-c_cc.h index ed124b8db4..5b5850ca57 100644 --- a/lib/libc/include/mips64-linux-gnuabin32/bits/termios-c_cc.h +++ b/lib/libc/include/mips64-linux-gnuabin32/bits/termios-c_cc.h @@ -1,5 +1,5 @@ /* termios c_cc symbolic constant definitions. Linux/mips 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-c_cc.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/termios-c_lflag.h b/lib/libc/include/mips64-linux-gnuabin32/bits/termios-c_lflag.h index e5a6773476..cc1f2a0bd5 100644 --- a/lib/libc/include/mips64-linux-gnuabin32/bits/termios-c_lflag.h +++ b/lib/libc/include/mips64-linux-gnuabin32/bits/termios-c_lflag.h @@ -1,5 +1,5 @@ /* termios local mode definitions. Linux/mips 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-c_lflag.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/termios-struct.h b/lib/libc/include/mips64-linux-gnuabin32/bits/termios-struct.h index 0442c6f354..f046eaaa80 100644 --- a/lib/libc/include/mips64-linux-gnuabin32/bits/termios-struct.h +++ b/lib/libc/include/mips64-linux-gnuabin32/bits/termios-struct.h @@ -1,5 +1,5 @@ /* struct termios definition. Linux/mips 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-struct.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/termios-tcflow.h b/lib/libc/include/mips64-linux-gnuabin32/bits/termios-tcflow.h index 2c523c3a2a..f21c02a389 100644 --- a/lib/libc/include/mips64-linux-gnuabin32/bits/termios-tcflow.h +++ b/lib/libc/include/mips64-linux-gnuabin32/bits/termios-tcflow.h @@ -1,5 +1,5 @@ /* termios local mode definitions. Linux/mips 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-tcflow.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/timerfd.h b/lib/libc/include/mips64-linux-gnuabin32/bits/timerfd.h index 005d411617..79ff9d0cc4 100644 --- a/lib/libc/include/mips64-linux-gnuabin32/bits/timerfd.h +++ b/lib/libc/include/mips64-linux-gnuabin32/bits/timerfd.h @@ -1,4 +1,4 @@ -/* 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_TIMERFD_H # error "Never use <bits/timerfd.h> directly; include <sys/timerfd.h> instead." diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/types/stack_t.h b/lib/libc/include/mips64-linux-gnuabin32/bits/types/stack_t.h index b62c348140..03e800bd0c 100644 --- a/lib/libc/include/mips64-linux-gnuabin32/bits/types/stack_t.h +++ b/lib/libc/include/mips64-linux-gnuabin32/bits/types/stack_t.h @@ -1,5 +1,5 @@ /* Define stack_t. MIPS Linux 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef __stack_t_defined #define __stack_t_defined 1 diff --git a/lib/libc/include/mips64-linux-gnuabin32/ieee754.h b/lib/libc/include/mips64-linux-gnuabin32/ieee754.h index 600dbce3d8..86baeceab6 100644 --- a/lib/libc/include/mips64-linux-gnuabin32/ieee754.h +++ b/lib/libc/include/mips64-linux-gnuabin32/ieee754.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,19 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _IEEE754_H - #define _IEEE754_H 1 + #include <features.h> -#include <endian.h> +#include <bits/endian.h> -#include <float.h> +#ifndef __LDBL_MANT_DIG__ +# include <float.h> +# define __LDBL_MANT_DIG__ LDBL_MANT_DIG +#endif __BEGIN_DECLS @@ -127,7 +130,7 @@ union ieee754_double #define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */ -#if LDBL_MANT_DIG == 113 +#if __LDBL_MANT_DIG__ == 113 union ieee854_long_double { @@ -184,7 +187,7 @@ union ieee854_long_double #define IEEE854_LONG_DOUBLE_BIAS 0x3fff /* Added to exponent. */ -#elif LDBL_MANT_DIG == 64 +#elif __LDBL_MANT_DIG__ == 64 union ieee854_long_double { @@ -253,7 +256,7 @@ union ieee854_long_double #define IEEE854_LONG_DOUBLE_BIAS 0x3fff -#elif LDBL_MANT_DIG == 53 +#elif __LDBL_MANT_DIG__ == 53 union ieee854_long_double { @@ -316,7 +319,7 @@ union ieee854_long_double #define IEEE854_LONG_DOUBLE_BIAS 0x3ff /* Added to exponent. */ -#endif /* LDBL_MANT_DIG == 53 */ +#endif /* __LDBL_MANT_DIG__ == 53 */ __END_DECLS diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/dlfcn.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/dlfcn.h index 996be6f45b..f0c7dabbcc 100644 --- a/lib/libc/include/mips64el-linux-gnuabi64/bits/dlfcn.h +++ b/lib/libc/include/mips64el-linux-gnuabi64/bits/dlfcn.h @@ -1,5 +1,5 @@ /* System dependent definitions for run-time dynamic loading. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _DLFCN_H # error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/errno.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/errno.h index 2d6069ad8a..a508c37d1c 100644 --- a/lib/libc/include/mips64el-linux-gnuabi64/bits/errno.h +++ b/lib/libc/include/mips64el-linux-gnuabi64/bits/errno.h @@ -1,5 +1,5 @@ /* Error constants. MIPS/Linux specific 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_ERRNO_H diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/eventfd.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/eventfd.h index 9ff48c23fb..f1bea57e19 100644 --- a/lib/libc/include/mips64el-linux-gnuabi64/bits/eventfd.h +++ b/lib/libc/include/mips64el-linux-gnuabi64/bits/eventfd.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2019 Free Software Foundation, Inc. +/* Copyright (C) 2007-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_EVENTFD_H # error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/inotify.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/inotify.h index d063466c30..5025b69e8a 100644 --- a/lib/libc/include/mips64el-linux-gnuabi64/bits/inotify.h +++ b/lib/libc/include/mips64el-linux-gnuabi64/bits/inotify.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_INOTIFY_H # error "Never use <bits/inotify.h> directly; include <sys/inotify.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/ioctl-types.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/ioctl-types.h index bfbdac6f57..064494da76 100644 --- a/lib/libc/include/mips64el-linux-gnuabi64/bits/ioctl-types.h +++ b/lib/libc/include/mips64el-linux-gnuabi64/bits/ioctl-types.h @@ -1,5 +1,5 @@ /* Structure types for pre-termios terminal ioctls. Linux/MIPS version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_IOCTL_H # error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/ipc.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/ipc.h deleted file mode 100644 index e994ffc9ad..0000000000 --- a/lib/libc/include/mips64el-linux-gnuabi64/bits/ipc.h +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (C) 1995-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 - <http://www.gnu.org/licenses/>. */ - -#ifndef _SYS_IPC_H -# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead." -#endif - -#include <bits/types.h> - -/* Mode bits for `msgget', `semget', and `shmget'. */ -#define IPC_CREAT 01000 /* Create key if key does not exist. */ -#define IPC_EXCL 02000 /* Fail if key exists. */ -#define IPC_NOWAIT 04000 /* Return error on wait. */ - -/* Control commands for `msgctl', `semctl', and `shmctl'. */ -#define IPC_RMID 0 /* Remove identifier. */ -#define IPC_SET 1 /* Set `ipc_perm' options. */ -#define IPC_STAT 2 /* Get `ipc_perm' options. */ -#ifdef __USE_GNU -# define IPC_INFO 3 /* See ipcs. */ -#endif - -/* Special key values. */ -#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ - - -/* Data structure used to pass permission information to IPC operations. */ -struct ipc_perm - { - __key_t __key; /* Key. */ - unsigned int uid; /* Owner's user ID. */ - unsigned int gid; /* Owner's group ID. */ - unsigned int cuid; /* Creator's user ID. */ - unsigned int cgid; /* Creator's group ID. */ - unsigned int mode; /* Read/write permission. */ - unsigned short int __seq; /* Sequence number. */ - unsigned short int __pad1; - unsigned long int __glibc_reserved1; - unsigned long int __glibc_reserved2; -};
\ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/ipctypes.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/ipctypes.h index ffea8d325c..a40b72c769 100644 --- a/lib/libc/include/mips64el-linux-gnuabi64/bits/ipctypes.h +++ b/lib/libc/include/mips64el-linux-gnuabi64/bits/ipctypes.h @@ -1,5 +1,5 @@ /* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. MIPS 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * Never include <bits/ipctypes.h> directly. diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/local_lim.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/local_lim.h index 96b65eb686..2f7a63a3dd 100644 --- a/lib/libc/include/mips64el-linux-gnuabi64/bits/local_lim.h +++ b/lib/libc/include/mips64el-linux-gnuabi64/bits/local_lim.h @@ -1,5 +1,5 @@ /* Minimum guaranteed maximum values for system limits. MIPS Linux version. - 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. 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* The kernel header pollutes the namespace with the NR_OPEN symbol and defines LINK_MAX although filesystems have different maxima. A diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/mman.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/mman.h index 43c768ab5e..ec9cc654ca 100644 --- a/lib/libc/include/mips64el-linux-gnuabi64/bits/mman.h +++ b/lib/libc/include/mips64el-linux-gnuabi64/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/MIPS version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_MMAN_H # error "Never use <bits/mman.h> directly; include <sys/mman.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/msq-pad.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/msq-pad.h index 2cde6ddf34..132f7815a7 100644 --- a/lib/libc/include/mips64el-linux-gnuabi64/bits/msq-pad.h +++ b/lib/libc/include/mips64el-linux-gnuabi64/bits/msq-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct msqid_ds. MIPS 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_MSG_H # error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/poll.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/poll.h index 7793460007..e1901823ca 100644 --- a/lib/libc/include/mips64el-linux-gnuabi64/bits/poll.h +++ b/lib/libc/include/mips64el-linux-gnuabi64/bits/poll.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_POLL_H # error "Never use <bits/poll.h> directly; include <sys/poll.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/pthreadtypes-arch.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/pthreadtypes-arch.h new file mode 100644 index 0000000000..6fb6e1c0b0 --- /dev/null +++ b/lib/libc/include/mips64el-linux-gnuabi64/bits/pthreadtypes-arch.h @@ -0,0 +1,44 @@ +/* Machine-specific pthread type layouts. MIPS version. + 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 + 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 + <https://www.gnu.org/licenses/>. */ + +#ifndef _BITS_PTHREADTYPES_ARCH_H +#define _BITS_PTHREADTYPES_ARCH_H 1 + +#include <bits/endian.h> + +#if _MIPS_SIM == _ABI64 +# 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_ATTR_T 36 +# define __SIZEOF_PTHREAD_MUTEX_T 24 +# define __SIZEOF_PTHREAD_RWLOCK_T 32 +# define __SIZEOF_PTHREAD_BARRIER_T 20 +#endif +#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +#define __SIZEOF_PTHREAD_COND_T 48 +#define __SIZEOF_PTHREAD_CONDATTR_T 4 +#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 +#define __SIZEOF_PTHREAD_BARRIERATTR_T 4 + +#define __LOCK_ALIGNMENT +#define __ONCE_ALIGNMENT + +#endif /* bits/pthreadtypes.h */
\ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/resource.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/resource.h index 2f200b1025..11fc73b49d 100644 --- a/lib/libc/include/mips64el-linux-gnuabi64/bits/resource.h +++ b/lib/libc/include/mips64el-linux-gnuabi64/bits/resource.h @@ -1,5 +1,5 @@ /* Bit values & structures for resource limits. Linux/MIPS version. - 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_RESOURCE_H # error "Never use <bits/resource.h> directly; include <sys/resource.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/sem-pad.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/sem-pad.h index b1810b2080..0638180f08 100644 --- a/lib/libc/include/mips64el-linux-gnuabi64/bits/sem-pad.h +++ b/lib/libc/include/mips64el-linux-gnuabi64/bits/sem-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct semid_ds. MIPS 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SEM_H # error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/shm-pad.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/shm-pad.h index e672c8c7b0..1c596174a8 100644 --- a/lib/libc/include/mips64el-linux-gnuabi64/bits/shm-pad.h +++ b/lib/libc/include/mips64el-linux-gnuabi64/bits/shm-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct shmid_ds. MIPS 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SHM_H # error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/shmlba.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/shmlba.h index 9561decd9a..9f61bc9247 100644 --- a/lib/libc/include/mips64el-linux-gnuabi64/bits/shmlba.h +++ b/lib/libc/include/mips64el-linux-gnuabi64/bits/shmlba.h @@ -1,5 +1,5 @@ /* Define SHMLBA. MIPS 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SHM_H # error "Never use <bits/shmlba.h> directly; include <sys/shm.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/sigaction.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/sigaction.h index bbc6004b59..af27d0c0fc 100644 --- a/lib/libc/include/mips64el-linux-gnuabi64/bits/sigaction.h +++ b/lib/libc/include/mips64el-linux-gnuabi64/bits/sigaction.h @@ -1,5 +1,5 @@ /* The proper definitions for Linux/MIPS's sigaction. - 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. 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGACTION_H #define _BITS_SIGACTION_H 1 diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/sigcontext.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/sigcontext.h index 231695c93f..cb51a1980f 100644 --- a/lib/libc/include/mips64el-linux-gnuabi64/bits/sigcontext.h +++ b/lib/libc/include/mips64el-linux-gnuabi64/bits/sigcontext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. +/* 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 modify it under the terms of the GNU Lesser General Public @@ -12,7 +12,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGCONTEXT_H #define _BITS_SIGCONTEXT_H 1 diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/signalfd.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/signalfd.h index a8f5275551..8bc180b1b8 100644 --- a/lib/libc/include/mips64el-linux-gnuabi64/bits/signalfd.h +++ b/lib/libc/include/mips64el-linux-gnuabi64/bits/signalfd.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2019 Free Software Foundation, Inc. +/* Copyright (C) 2007-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SIGNALFD_H # error "Never use <bits/signalfd.h> directly; include <sys/signalfd.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/signum.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/signum.h index e3cd97af8b..e9fa21916b 100644 --- a/lib/libc/include/mips64el-linux-gnuabi64/bits/signum.h +++ b/lib/libc/include/mips64el-linux-gnuabi64/bits/signum.h @@ -1,5 +1,5 @@ /* Signal number definitions. Linux/MIPS version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGNUM_H #define _BITS_SIGNUM_H 1 diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/socket-constants.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/socket-constants.h index cfd1839b98..6ed2492084 100644 --- a/lib/libc/include/mips64el-linux-gnuabi64/bits/socket-constants.h +++ b/lib/libc/include/mips64el-linux-gnuabi64/bits/socket-constants.h @@ -1,5 +1,5 @@ /* Socket constants which vary among Linux architectures. Version for MIPS. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SOCKET_H # error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/socket_type.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/socket_type.h index 4c976f179e..ad858e116a 100644 --- a/lib/libc/include/mips64el-linux-gnuabi64/bits/socket_type.h +++ b/lib/libc/include/mips64el-linux-gnuabi64/bits/socket_type.h @@ -1,5 +1,5 @@ /* Define enum __socket_type for Linux/MIPS. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SOCKET_H # error "Never include <bits/socket_type.h> directly; use <sys/socket.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/statfs.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/statfs.h index fd0f68d6d7..fad668a7a3 100644 --- a/lib/libc/include/mips64el-linux-gnuabi64/bits/statfs.h +++ b/lib/libc/include/mips64el-linux-gnuabi64/bits/statfs.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_STATFS_H # error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/struct_mutex.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/struct_mutex.h new file mode 100644 index 0000000000..025ccddc14 --- /dev/null +++ b/lib/libc/include/mips64el-linux-gnuabi64/bits/struct_mutex.h @@ -0,0 +1,56 @@ +/* MIPS internal mutex struct definitions. + 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _THREAD_MUTEX_INTERNAL_H +#define _THREAD_MUTEX_INTERNAL_H 1 + +struct __pthread_mutex_s +{ + int __lock; + unsigned int __count; + int __owner; +#if _MIPS_SIM == _ABI64 + unsigned int __nusers; +#endif + /* KIND must stay at this position in the structure to maintain + binary compatibility with static initializers. */ + int __kind; +#if _MIPS_SIM == _ABI64 + int __spins; + __pthread_list_t __list; +# define __PTHREAD_MUTEX_HAVE_PREV 1 +#else + unsigned int __nusers; + __extension__ union + { + int __spins; + __pthread_slist_t __list; + }; +# define __PTHREAD_MUTEX_HAVE_PREV 0 +#endif +}; + +#if _MIPS_SIM == _ABI64 +# define __PTHREAD_MUTEX_INITIALIZER(__kind) \ + 0, 0, 0, 0, __kind, 0, { 0, 0 } +#else +# define __PTHREAD_MUTEX_INITIALIZER(__kind) \ + 0, 0, 0, __kind, 0, { 0 } +#endif + +#endif
\ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/termios-c_cc.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/termios-c_cc.h index ed124b8db4..5b5850ca57 100644 --- a/lib/libc/include/mips64el-linux-gnuabi64/bits/termios-c_cc.h +++ b/lib/libc/include/mips64el-linux-gnuabi64/bits/termios-c_cc.h @@ -1,5 +1,5 @@ /* termios c_cc symbolic constant definitions. Linux/mips 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-c_cc.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/termios-c_lflag.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/termios-c_lflag.h index e5a6773476..cc1f2a0bd5 100644 --- a/lib/libc/include/mips64el-linux-gnuabi64/bits/termios-c_lflag.h +++ b/lib/libc/include/mips64el-linux-gnuabi64/bits/termios-c_lflag.h @@ -1,5 +1,5 @@ /* termios local mode definitions. Linux/mips 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-c_lflag.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/termios-struct.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/termios-struct.h index 0442c6f354..f046eaaa80 100644 --- a/lib/libc/include/mips64el-linux-gnuabi64/bits/termios-struct.h +++ b/lib/libc/include/mips64el-linux-gnuabi64/bits/termios-struct.h @@ -1,5 +1,5 @@ /* struct termios definition. Linux/mips 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-struct.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/termios-tcflow.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/termios-tcflow.h index 2c523c3a2a..f21c02a389 100644 --- a/lib/libc/include/mips64el-linux-gnuabi64/bits/termios-tcflow.h +++ b/lib/libc/include/mips64el-linux-gnuabi64/bits/termios-tcflow.h @@ -1,5 +1,5 @@ /* termios local mode definitions. Linux/mips 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-tcflow.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/timerfd.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/timerfd.h index 005d411617..79ff9d0cc4 100644 --- a/lib/libc/include/mips64el-linux-gnuabi64/bits/timerfd.h +++ b/lib/libc/include/mips64el-linux-gnuabi64/bits/timerfd.h @@ -1,4 +1,4 @@ -/* 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_TIMERFD_H # error "Never use <bits/timerfd.h> directly; include <sys/timerfd.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/types/stack_t.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/types/stack_t.h index b62c348140..03e800bd0c 100644 --- a/lib/libc/include/mips64el-linux-gnuabi64/bits/types/stack_t.h +++ b/lib/libc/include/mips64el-linux-gnuabi64/bits/types/stack_t.h @@ -1,5 +1,5 @@ /* Define stack_t. MIPS Linux 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef __stack_t_defined #define __stack_t_defined 1 diff --git a/lib/libc/include/mips64el-linux-gnuabi64/ieee754.h b/lib/libc/include/mips64el-linux-gnuabi64/ieee754.h index 600dbce3d8..86baeceab6 100644 --- a/lib/libc/include/mips64el-linux-gnuabi64/ieee754.h +++ b/lib/libc/include/mips64el-linux-gnuabi64/ieee754.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,19 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _IEEE754_H - #define _IEEE754_H 1 + #include <features.h> -#include <endian.h> +#include <bits/endian.h> -#include <float.h> +#ifndef __LDBL_MANT_DIG__ +# include <float.h> +# define __LDBL_MANT_DIG__ LDBL_MANT_DIG +#endif __BEGIN_DECLS @@ -127,7 +130,7 @@ union ieee754_double #define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */ -#if LDBL_MANT_DIG == 113 +#if __LDBL_MANT_DIG__ == 113 union ieee854_long_double { @@ -184,7 +187,7 @@ union ieee854_long_double #define IEEE854_LONG_DOUBLE_BIAS 0x3fff /* Added to exponent. */ -#elif LDBL_MANT_DIG == 64 +#elif __LDBL_MANT_DIG__ == 64 union ieee854_long_double { @@ -253,7 +256,7 @@ union ieee854_long_double #define IEEE854_LONG_DOUBLE_BIAS 0x3fff -#elif LDBL_MANT_DIG == 53 +#elif __LDBL_MANT_DIG__ == 53 union ieee854_long_double { @@ -316,7 +319,7 @@ union ieee854_long_double #define IEEE854_LONG_DOUBLE_BIAS 0x3ff /* Added to exponent. */ -#endif /* LDBL_MANT_DIG == 53 */ +#endif /* __LDBL_MANT_DIG__ == 53 */ __END_DECLS diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/dlfcn.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/dlfcn.h index 996be6f45b..f0c7dabbcc 100644 --- a/lib/libc/include/mips64el-linux-gnuabin32/bits/dlfcn.h +++ b/lib/libc/include/mips64el-linux-gnuabin32/bits/dlfcn.h @@ -1,5 +1,5 @@ /* System dependent definitions for run-time dynamic loading. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _DLFCN_H # error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/errno.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/errno.h index 2d6069ad8a..a508c37d1c 100644 --- a/lib/libc/include/mips64el-linux-gnuabin32/bits/errno.h +++ b/lib/libc/include/mips64el-linux-gnuabin32/bits/errno.h @@ -1,5 +1,5 @@ /* Error constants. MIPS/Linux specific 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_ERRNO_H diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/eventfd.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/eventfd.h index 9ff48c23fb..f1bea57e19 100644 --- a/lib/libc/include/mips64el-linux-gnuabin32/bits/eventfd.h +++ b/lib/libc/include/mips64el-linux-gnuabin32/bits/eventfd.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2019 Free Software Foundation, Inc. +/* Copyright (C) 2007-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_EVENTFD_H # error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/inotify.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/inotify.h index d063466c30..5025b69e8a 100644 --- a/lib/libc/include/mips64el-linux-gnuabin32/bits/inotify.h +++ b/lib/libc/include/mips64el-linux-gnuabin32/bits/inotify.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_INOTIFY_H # error "Never use <bits/inotify.h> directly; include <sys/inotify.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/ioctl-types.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/ioctl-types.h index bfbdac6f57..064494da76 100644 --- a/lib/libc/include/mips64el-linux-gnuabin32/bits/ioctl-types.h +++ b/lib/libc/include/mips64el-linux-gnuabin32/bits/ioctl-types.h @@ -1,5 +1,5 @@ /* Structure types for pre-termios terminal ioctls. Linux/MIPS version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_IOCTL_H # error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/ipc.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/ipc.h deleted file mode 100644 index e994ffc9ad..0000000000 --- a/lib/libc/include/mips64el-linux-gnuabin32/bits/ipc.h +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (C) 1995-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 - <http://www.gnu.org/licenses/>. */ - -#ifndef _SYS_IPC_H -# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead." -#endif - -#include <bits/types.h> - -/* Mode bits for `msgget', `semget', and `shmget'. */ -#define IPC_CREAT 01000 /* Create key if key does not exist. */ -#define IPC_EXCL 02000 /* Fail if key exists. */ -#define IPC_NOWAIT 04000 /* Return error on wait. */ - -/* Control commands for `msgctl', `semctl', and `shmctl'. */ -#define IPC_RMID 0 /* Remove identifier. */ -#define IPC_SET 1 /* Set `ipc_perm' options. */ -#define IPC_STAT 2 /* Get `ipc_perm' options. */ -#ifdef __USE_GNU -# define IPC_INFO 3 /* See ipcs. */ -#endif - -/* Special key values. */ -#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ - - -/* Data structure used to pass permission information to IPC operations. */ -struct ipc_perm - { - __key_t __key; /* Key. */ - unsigned int uid; /* Owner's user ID. */ - unsigned int gid; /* Owner's group ID. */ - unsigned int cuid; /* Creator's user ID. */ - unsigned int cgid; /* Creator's group ID. */ - unsigned int mode; /* Read/write permission. */ - unsigned short int __seq; /* Sequence number. */ - unsigned short int __pad1; - unsigned long int __glibc_reserved1; - unsigned long int __glibc_reserved2; -};
\ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/ipctypes.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/ipctypes.h index ffea8d325c..a40b72c769 100644 --- a/lib/libc/include/mips64el-linux-gnuabin32/bits/ipctypes.h +++ b/lib/libc/include/mips64el-linux-gnuabin32/bits/ipctypes.h @@ -1,5 +1,5 @@ /* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. MIPS 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * Never include <bits/ipctypes.h> directly. diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/local_lim.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/local_lim.h index 96b65eb686..2f7a63a3dd 100644 --- a/lib/libc/include/mips64el-linux-gnuabin32/bits/local_lim.h +++ b/lib/libc/include/mips64el-linux-gnuabin32/bits/local_lim.h @@ -1,5 +1,5 @@ /* Minimum guaranteed maximum values for system limits. MIPS Linux version. - 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. 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* The kernel header pollutes the namespace with the NR_OPEN symbol and defines LINK_MAX although filesystems have different maxima. A diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/mman.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/mman.h index 43c768ab5e..ec9cc654ca 100644 --- a/lib/libc/include/mips64el-linux-gnuabin32/bits/mman.h +++ b/lib/libc/include/mips64el-linux-gnuabin32/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/MIPS version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_MMAN_H # error "Never use <bits/mman.h> directly; include <sys/mman.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/msq-pad.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/msq-pad.h index 2cde6ddf34..132f7815a7 100644 --- a/lib/libc/include/mips64el-linux-gnuabin32/bits/msq-pad.h +++ b/lib/libc/include/mips64el-linux-gnuabin32/bits/msq-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct msqid_ds. MIPS 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_MSG_H # error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/poll.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/poll.h index 7793460007..e1901823ca 100644 --- a/lib/libc/include/mips64el-linux-gnuabin32/bits/poll.h +++ b/lib/libc/include/mips64el-linux-gnuabin32/bits/poll.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_POLL_H # error "Never use <bits/poll.h> directly; include <sys/poll.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/pthreadtypes-arch.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/pthreadtypes-arch.h new file mode 100644 index 0000000000..6fb6e1c0b0 --- /dev/null +++ b/lib/libc/include/mips64el-linux-gnuabin32/bits/pthreadtypes-arch.h @@ -0,0 +1,44 @@ +/* Machine-specific pthread type layouts. MIPS version. + 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 + 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 + <https://www.gnu.org/licenses/>. */ + +#ifndef _BITS_PTHREADTYPES_ARCH_H +#define _BITS_PTHREADTYPES_ARCH_H 1 + +#include <bits/endian.h> + +#if _MIPS_SIM == _ABI64 +# 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_ATTR_T 36 +# define __SIZEOF_PTHREAD_MUTEX_T 24 +# define __SIZEOF_PTHREAD_RWLOCK_T 32 +# define __SIZEOF_PTHREAD_BARRIER_T 20 +#endif +#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +#define __SIZEOF_PTHREAD_COND_T 48 +#define __SIZEOF_PTHREAD_CONDATTR_T 4 +#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 +#define __SIZEOF_PTHREAD_BARRIERATTR_T 4 + +#define __LOCK_ALIGNMENT +#define __ONCE_ALIGNMENT + +#endif /* bits/pthreadtypes.h */
\ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/resource.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/resource.h index 2f200b1025..11fc73b49d 100644 --- a/lib/libc/include/mips64el-linux-gnuabin32/bits/resource.h +++ b/lib/libc/include/mips64el-linux-gnuabin32/bits/resource.h @@ -1,5 +1,5 @@ /* Bit values & structures for resource limits. Linux/MIPS version. - 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_RESOURCE_H # error "Never use <bits/resource.h> directly; include <sys/resource.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/sem-pad.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/sem-pad.h index b1810b2080..0638180f08 100644 --- a/lib/libc/include/mips64el-linux-gnuabin32/bits/sem-pad.h +++ b/lib/libc/include/mips64el-linux-gnuabin32/bits/sem-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct semid_ds. MIPS 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SEM_H # error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/shm-pad.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/shm-pad.h index e672c8c7b0..1c596174a8 100644 --- a/lib/libc/include/mips64el-linux-gnuabin32/bits/shm-pad.h +++ b/lib/libc/include/mips64el-linux-gnuabin32/bits/shm-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct shmid_ds. MIPS 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SHM_H # error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/shmlba.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/shmlba.h index 9561decd9a..9f61bc9247 100644 --- a/lib/libc/include/mips64el-linux-gnuabin32/bits/shmlba.h +++ b/lib/libc/include/mips64el-linux-gnuabin32/bits/shmlba.h @@ -1,5 +1,5 @@ /* Define SHMLBA. MIPS 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SHM_H # error "Never use <bits/shmlba.h> directly; include <sys/shm.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/sigaction.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/sigaction.h index bbc6004b59..af27d0c0fc 100644 --- a/lib/libc/include/mips64el-linux-gnuabin32/bits/sigaction.h +++ b/lib/libc/include/mips64el-linux-gnuabin32/bits/sigaction.h @@ -1,5 +1,5 @@ /* The proper definitions for Linux/MIPS's sigaction. - 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. 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGACTION_H #define _BITS_SIGACTION_H 1 diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/sigcontext.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/sigcontext.h index 231695c93f..cb51a1980f 100644 --- a/lib/libc/include/mips64el-linux-gnuabin32/bits/sigcontext.h +++ b/lib/libc/include/mips64el-linux-gnuabin32/bits/sigcontext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. +/* 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 modify it under the terms of the GNU Lesser General Public @@ -12,7 +12,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGCONTEXT_H #define _BITS_SIGCONTEXT_H 1 diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/signalfd.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/signalfd.h index a8f5275551..8bc180b1b8 100644 --- a/lib/libc/include/mips64el-linux-gnuabin32/bits/signalfd.h +++ b/lib/libc/include/mips64el-linux-gnuabin32/bits/signalfd.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2019 Free Software Foundation, Inc. +/* Copyright (C) 2007-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SIGNALFD_H # error "Never use <bits/signalfd.h> directly; include <sys/signalfd.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/signum.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/signum.h index e3cd97af8b..e9fa21916b 100644 --- a/lib/libc/include/mips64el-linux-gnuabin32/bits/signum.h +++ b/lib/libc/include/mips64el-linux-gnuabin32/bits/signum.h @@ -1,5 +1,5 @@ /* Signal number definitions. Linux/MIPS version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGNUM_H #define _BITS_SIGNUM_H 1 diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/socket-constants.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/socket-constants.h index cfd1839b98..6ed2492084 100644 --- a/lib/libc/include/mips64el-linux-gnuabin32/bits/socket-constants.h +++ b/lib/libc/include/mips64el-linux-gnuabin32/bits/socket-constants.h @@ -1,5 +1,5 @@ /* Socket constants which vary among Linux architectures. Version for MIPS. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SOCKET_H # error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/socket_type.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/socket_type.h index 4c976f179e..ad858e116a 100644 --- a/lib/libc/include/mips64el-linux-gnuabin32/bits/socket_type.h +++ b/lib/libc/include/mips64el-linux-gnuabin32/bits/socket_type.h @@ -1,5 +1,5 @@ /* Define enum __socket_type for Linux/MIPS. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SOCKET_H # error "Never include <bits/socket_type.h> directly; use <sys/socket.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/statfs.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/statfs.h index fd0f68d6d7..fad668a7a3 100644 --- a/lib/libc/include/mips64el-linux-gnuabin32/bits/statfs.h +++ b/lib/libc/include/mips64el-linux-gnuabin32/bits/statfs.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_STATFS_H # error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/struct_mutex.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/struct_mutex.h new file mode 100644 index 0000000000..025ccddc14 --- /dev/null +++ b/lib/libc/include/mips64el-linux-gnuabin32/bits/struct_mutex.h @@ -0,0 +1,56 @@ +/* MIPS internal mutex struct definitions. + 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _THREAD_MUTEX_INTERNAL_H +#define _THREAD_MUTEX_INTERNAL_H 1 + +struct __pthread_mutex_s +{ + int __lock; + unsigned int __count; + int __owner; +#if _MIPS_SIM == _ABI64 + unsigned int __nusers; +#endif + /* KIND must stay at this position in the structure to maintain + binary compatibility with static initializers. */ + int __kind; +#if _MIPS_SIM == _ABI64 + int __spins; + __pthread_list_t __list; +# define __PTHREAD_MUTEX_HAVE_PREV 1 +#else + unsigned int __nusers; + __extension__ union + { + int __spins; + __pthread_slist_t __list; + }; +# define __PTHREAD_MUTEX_HAVE_PREV 0 +#endif +}; + +#if _MIPS_SIM == _ABI64 +# define __PTHREAD_MUTEX_INITIALIZER(__kind) \ + 0, 0, 0, 0, __kind, 0, { 0, 0 } +#else +# define __PTHREAD_MUTEX_INITIALIZER(__kind) \ + 0, 0, 0, __kind, 0, { 0 } +#endif + +#endif
\ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/termios-c_cc.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/termios-c_cc.h index ed124b8db4..5b5850ca57 100644 --- a/lib/libc/include/mips64el-linux-gnuabin32/bits/termios-c_cc.h +++ b/lib/libc/include/mips64el-linux-gnuabin32/bits/termios-c_cc.h @@ -1,5 +1,5 @@ /* termios c_cc symbolic constant definitions. Linux/mips 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-c_cc.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/termios-c_lflag.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/termios-c_lflag.h index e5a6773476..cc1f2a0bd5 100644 --- a/lib/libc/include/mips64el-linux-gnuabin32/bits/termios-c_lflag.h +++ b/lib/libc/include/mips64el-linux-gnuabin32/bits/termios-c_lflag.h @@ -1,5 +1,5 @@ /* termios local mode definitions. Linux/mips 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-c_lflag.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/termios-struct.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/termios-struct.h index 0442c6f354..f046eaaa80 100644 --- a/lib/libc/include/mips64el-linux-gnuabin32/bits/termios-struct.h +++ b/lib/libc/include/mips64el-linux-gnuabin32/bits/termios-struct.h @@ -1,5 +1,5 @@ /* struct termios definition. Linux/mips 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-struct.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/termios-tcflow.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/termios-tcflow.h index 2c523c3a2a..f21c02a389 100644 --- a/lib/libc/include/mips64el-linux-gnuabin32/bits/termios-tcflow.h +++ b/lib/libc/include/mips64el-linux-gnuabin32/bits/termios-tcflow.h @@ -1,5 +1,5 @@ /* termios local mode definitions. Linux/mips 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-tcflow.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/timerfd.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/timerfd.h index 005d411617..79ff9d0cc4 100644 --- a/lib/libc/include/mips64el-linux-gnuabin32/bits/timerfd.h +++ b/lib/libc/include/mips64el-linux-gnuabin32/bits/timerfd.h @@ -1,4 +1,4 @@ -/* 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_TIMERFD_H # error "Never use <bits/timerfd.h> directly; include <sys/timerfd.h> instead." diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/types/stack_t.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/types/stack_t.h index b62c348140..03e800bd0c 100644 --- a/lib/libc/include/mips64el-linux-gnuabin32/bits/types/stack_t.h +++ b/lib/libc/include/mips64el-linux-gnuabin32/bits/types/stack_t.h @@ -1,5 +1,5 @@ /* Define stack_t. MIPS Linux 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef __stack_t_defined #define __stack_t_defined 1 diff --git a/lib/libc/include/mips64el-linux-gnuabin32/ieee754.h b/lib/libc/include/mips64el-linux-gnuabin32/ieee754.h index 600dbce3d8..86baeceab6 100644 --- a/lib/libc/include/mips64el-linux-gnuabin32/ieee754.h +++ b/lib/libc/include/mips64el-linux-gnuabin32/ieee754.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,19 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _IEEE754_H - #define _IEEE754_H 1 + #include <features.h> -#include <endian.h> +#include <bits/endian.h> -#include <float.h> +#ifndef __LDBL_MANT_DIG__ +# include <float.h> +# define __LDBL_MANT_DIG__ LDBL_MANT_DIG +#endif __BEGIN_DECLS @@ -127,7 +130,7 @@ union ieee754_double #define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */ -#if LDBL_MANT_DIG == 113 +#if __LDBL_MANT_DIG__ == 113 union ieee854_long_double { @@ -184,7 +187,7 @@ union ieee854_long_double #define IEEE854_LONG_DOUBLE_BIAS 0x3fff /* Added to exponent. */ -#elif LDBL_MANT_DIG == 64 +#elif __LDBL_MANT_DIG__ == 64 union ieee854_long_double { @@ -253,7 +256,7 @@ union ieee854_long_double #define IEEE854_LONG_DOUBLE_BIAS 0x3fff -#elif LDBL_MANT_DIG == 53 +#elif __LDBL_MANT_DIG__ == 53 union ieee854_long_double { @@ -316,7 +319,7 @@ union ieee854_long_double #define IEEE854_LONG_DOUBLE_BIAS 0x3ff /* Added to exponent. */ -#endif /* LDBL_MANT_DIG == 53 */ +#endif /* __LDBL_MANT_DIG__ == 53 */ __END_DECLS diff --git a/lib/libc/include/mipsel-linux-gnu/bits/dlfcn.h b/lib/libc/include/mipsel-linux-gnu/bits/dlfcn.h index 996be6f45b..f0c7dabbcc 100644 --- a/lib/libc/include/mipsel-linux-gnu/bits/dlfcn.h +++ b/lib/libc/include/mipsel-linux-gnu/bits/dlfcn.h @@ -1,5 +1,5 @@ /* System dependent definitions for run-time dynamic loading. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _DLFCN_H # error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead." diff --git a/lib/libc/include/mipsel-linux-gnu/bits/errno.h b/lib/libc/include/mipsel-linux-gnu/bits/errno.h index 2d6069ad8a..a508c37d1c 100644 --- a/lib/libc/include/mipsel-linux-gnu/bits/errno.h +++ b/lib/libc/include/mipsel-linux-gnu/bits/errno.h @@ -1,5 +1,5 @@ /* Error constants. MIPS/Linux specific 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_ERRNO_H diff --git a/lib/libc/include/mipsel-linux-gnu/bits/eventfd.h b/lib/libc/include/mipsel-linux-gnu/bits/eventfd.h index 9ff48c23fb..f1bea57e19 100644 --- a/lib/libc/include/mipsel-linux-gnu/bits/eventfd.h +++ b/lib/libc/include/mipsel-linux-gnu/bits/eventfd.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2019 Free Software Foundation, Inc. +/* Copyright (C) 2007-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_EVENTFD_H # error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead." diff --git a/lib/libc/include/mipsel-linux-gnu/bits/inotify.h b/lib/libc/include/mipsel-linux-gnu/bits/inotify.h index d063466c30..5025b69e8a 100644 --- a/lib/libc/include/mipsel-linux-gnu/bits/inotify.h +++ b/lib/libc/include/mipsel-linux-gnu/bits/inotify.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_INOTIFY_H # error "Never use <bits/inotify.h> directly; include <sys/inotify.h> instead." diff --git a/lib/libc/include/mipsel-linux-gnu/bits/ioctl-types.h b/lib/libc/include/mipsel-linux-gnu/bits/ioctl-types.h index bfbdac6f57..064494da76 100644 --- a/lib/libc/include/mipsel-linux-gnu/bits/ioctl-types.h +++ b/lib/libc/include/mipsel-linux-gnu/bits/ioctl-types.h @@ -1,5 +1,5 @@ /* Structure types for pre-termios terminal ioctls. Linux/MIPS version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_IOCTL_H # error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead." diff --git a/lib/libc/include/mipsel-linux-gnu/bits/ipc.h b/lib/libc/include/mipsel-linux-gnu/bits/ipc.h deleted file mode 100644 index e994ffc9ad..0000000000 --- a/lib/libc/include/mipsel-linux-gnu/bits/ipc.h +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (C) 1995-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 - <http://www.gnu.org/licenses/>. */ - -#ifndef _SYS_IPC_H -# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead." -#endif - -#include <bits/types.h> - -/* Mode bits for `msgget', `semget', and `shmget'. */ -#define IPC_CREAT 01000 /* Create key if key does not exist. */ -#define IPC_EXCL 02000 /* Fail if key exists. */ -#define IPC_NOWAIT 04000 /* Return error on wait. */ - -/* Control commands for `msgctl', `semctl', and `shmctl'. */ -#define IPC_RMID 0 /* Remove identifier. */ -#define IPC_SET 1 /* Set `ipc_perm' options. */ -#define IPC_STAT 2 /* Get `ipc_perm' options. */ -#ifdef __USE_GNU -# define IPC_INFO 3 /* See ipcs. */ -#endif - -/* Special key values. */ -#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ - - -/* Data structure used to pass permission information to IPC operations. */ -struct ipc_perm - { - __key_t __key; /* Key. */ - unsigned int uid; /* Owner's user ID. */ - unsigned int gid; /* Owner's group ID. */ - unsigned int cuid; /* Creator's user ID. */ - unsigned int cgid; /* Creator's group ID. */ - unsigned int mode; /* Read/write permission. */ - unsigned short int __seq; /* Sequence number. */ - unsigned short int __pad1; - unsigned long int __glibc_reserved1; - unsigned long int __glibc_reserved2; -};
\ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-gnu/bits/ipctypes.h b/lib/libc/include/mipsel-linux-gnu/bits/ipctypes.h index ffea8d325c..a40b72c769 100644 --- a/lib/libc/include/mipsel-linux-gnu/bits/ipctypes.h +++ b/lib/libc/include/mipsel-linux-gnu/bits/ipctypes.h @@ -1,5 +1,5 @@ /* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. MIPS 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* * Never include <bits/ipctypes.h> directly. diff --git a/lib/libc/include/mipsel-linux-gnu/bits/local_lim.h b/lib/libc/include/mipsel-linux-gnu/bits/local_lim.h index 96b65eb686..2f7a63a3dd 100644 --- a/lib/libc/include/mipsel-linux-gnu/bits/local_lim.h +++ b/lib/libc/include/mipsel-linux-gnu/bits/local_lim.h @@ -1,5 +1,5 @@ /* Minimum guaranteed maximum values for system limits. MIPS Linux version. - 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. 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* The kernel header pollutes the namespace with the NR_OPEN symbol and defines LINK_MAX although filesystems have different maxima. A diff --git a/lib/libc/include/mipsel-linux-gnu/bits/mman.h b/lib/libc/include/mipsel-linux-gnu/bits/mman.h index 43c768ab5e..ec9cc654ca 100644 --- a/lib/libc/include/mipsel-linux-gnu/bits/mman.h +++ b/lib/libc/include/mipsel-linux-gnu/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/MIPS version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_MMAN_H # error "Never use <bits/mman.h> directly; include <sys/mman.h> instead." diff --git a/lib/libc/include/mipsel-linux-gnu/bits/msq-pad.h b/lib/libc/include/mipsel-linux-gnu/bits/msq-pad.h index 2cde6ddf34..132f7815a7 100644 --- a/lib/libc/include/mipsel-linux-gnu/bits/msq-pad.h +++ b/lib/libc/include/mipsel-linux-gnu/bits/msq-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct msqid_ds. MIPS 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_MSG_H # error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead." diff --git a/lib/libc/include/mipsel-linux-gnu/bits/poll.h b/lib/libc/include/mipsel-linux-gnu/bits/poll.h index 7793460007..e1901823ca 100644 --- a/lib/libc/include/mipsel-linux-gnu/bits/poll.h +++ b/lib/libc/include/mipsel-linux-gnu/bits/poll.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_POLL_H # error "Never use <bits/poll.h> directly; include <sys/poll.h> instead." diff --git a/lib/libc/include/mipsel-linux-gnu/bits/pthreadtypes-arch.h b/lib/libc/include/mipsel-linux-gnu/bits/pthreadtypes-arch.h new file mode 100644 index 0000000000..6fb6e1c0b0 --- /dev/null +++ b/lib/libc/include/mipsel-linux-gnu/bits/pthreadtypes-arch.h @@ -0,0 +1,44 @@ +/* Machine-specific pthread type layouts. MIPS version. + 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 + 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 + <https://www.gnu.org/licenses/>. */ + +#ifndef _BITS_PTHREADTYPES_ARCH_H +#define _BITS_PTHREADTYPES_ARCH_H 1 + +#include <bits/endian.h> + +#if _MIPS_SIM == _ABI64 +# 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_ATTR_T 36 +# define __SIZEOF_PTHREAD_MUTEX_T 24 +# define __SIZEOF_PTHREAD_RWLOCK_T 32 +# define __SIZEOF_PTHREAD_BARRIER_T 20 +#endif +#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +#define __SIZEOF_PTHREAD_COND_T 48 +#define __SIZEOF_PTHREAD_CONDATTR_T 4 +#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 +#define __SIZEOF_PTHREAD_BARRIERATTR_T 4 + +#define __LOCK_ALIGNMENT +#define __ONCE_ALIGNMENT + +#endif /* bits/pthreadtypes.h */
\ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-gnu/bits/resource.h b/lib/libc/include/mipsel-linux-gnu/bits/resource.h index 2f200b1025..11fc73b49d 100644 --- a/lib/libc/include/mipsel-linux-gnu/bits/resource.h +++ b/lib/libc/include/mipsel-linux-gnu/bits/resource.h @@ -1,5 +1,5 @@ /* Bit values & structures for resource limits. Linux/MIPS version. - 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_RESOURCE_H # error "Never use <bits/resource.h> directly; include <sys/resource.h> instead." diff --git a/lib/libc/include/mipsel-linux-gnu/bits/sem-pad.h b/lib/libc/include/mipsel-linux-gnu/bits/sem-pad.h index b1810b2080..0638180f08 100644 --- a/lib/libc/include/mipsel-linux-gnu/bits/sem-pad.h +++ b/lib/libc/include/mipsel-linux-gnu/bits/sem-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct semid_ds. MIPS 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SEM_H # error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead." diff --git a/lib/libc/include/mipsel-linux-gnu/bits/shm-pad.h b/lib/libc/include/mipsel-linux-gnu/bits/shm-pad.h index e672c8c7b0..1c596174a8 100644 --- a/lib/libc/include/mipsel-linux-gnu/bits/shm-pad.h +++ b/lib/libc/include/mipsel-linux-gnu/bits/shm-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct shmid_ds. MIPS 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SHM_H # error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead." diff --git a/lib/libc/include/mipsel-linux-gnu/bits/shmlba.h b/lib/libc/include/mipsel-linux-gnu/bits/shmlba.h index 9561decd9a..9f61bc9247 100644 --- a/lib/libc/include/mipsel-linux-gnu/bits/shmlba.h +++ b/lib/libc/include/mipsel-linux-gnu/bits/shmlba.h @@ -1,5 +1,5 @@ /* Define SHMLBA. MIPS 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SHM_H # error "Never use <bits/shmlba.h> directly; include <sys/shm.h> instead." diff --git a/lib/libc/include/mipsel-linux-gnu/bits/sigaction.h b/lib/libc/include/mipsel-linux-gnu/bits/sigaction.h index bbc6004b59..af27d0c0fc 100644 --- a/lib/libc/include/mipsel-linux-gnu/bits/sigaction.h +++ b/lib/libc/include/mipsel-linux-gnu/bits/sigaction.h @@ -1,5 +1,5 @@ /* The proper definitions for Linux/MIPS's sigaction. - 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. 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGACTION_H #define _BITS_SIGACTION_H 1 diff --git a/lib/libc/include/mipsel-linux-gnu/bits/sigcontext.h b/lib/libc/include/mipsel-linux-gnu/bits/sigcontext.h index 231695c93f..cb51a1980f 100644 --- a/lib/libc/include/mipsel-linux-gnu/bits/sigcontext.h +++ b/lib/libc/include/mipsel-linux-gnu/bits/sigcontext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. +/* 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 modify it under the terms of the GNU Lesser General Public @@ -12,7 +12,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGCONTEXT_H #define _BITS_SIGCONTEXT_H 1 diff --git a/lib/libc/include/mipsel-linux-gnu/bits/signalfd.h b/lib/libc/include/mipsel-linux-gnu/bits/signalfd.h index a8f5275551..8bc180b1b8 100644 --- a/lib/libc/include/mipsel-linux-gnu/bits/signalfd.h +++ b/lib/libc/include/mipsel-linux-gnu/bits/signalfd.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2019 Free Software Foundation, Inc. +/* Copyright (C) 2007-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SIGNALFD_H # error "Never use <bits/signalfd.h> directly; include <sys/signalfd.h> instead." diff --git a/lib/libc/include/mipsel-linux-gnu/bits/signum.h b/lib/libc/include/mipsel-linux-gnu/bits/signum.h index e3cd97af8b..e9fa21916b 100644 --- a/lib/libc/include/mipsel-linux-gnu/bits/signum.h +++ b/lib/libc/include/mipsel-linux-gnu/bits/signum.h @@ -1,5 +1,5 @@ /* Signal number definitions. Linux/MIPS version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGNUM_H #define _BITS_SIGNUM_H 1 diff --git a/lib/libc/include/mipsel-linux-gnu/bits/socket-constants.h b/lib/libc/include/mipsel-linux-gnu/bits/socket-constants.h index cfd1839b98..6ed2492084 100644 --- a/lib/libc/include/mipsel-linux-gnu/bits/socket-constants.h +++ b/lib/libc/include/mipsel-linux-gnu/bits/socket-constants.h @@ -1,5 +1,5 @@ /* Socket constants which vary among Linux architectures. Version for MIPS. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SOCKET_H # error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead." diff --git a/lib/libc/include/mipsel-linux-gnu/bits/socket_type.h b/lib/libc/include/mipsel-linux-gnu/bits/socket_type.h index 4c976f179e..ad858e116a 100644 --- a/lib/libc/include/mipsel-linux-gnu/bits/socket_type.h +++ b/lib/libc/include/mipsel-linux-gnu/bits/socket_type.h @@ -1,5 +1,5 @@ /* Define enum __socket_type for Linux/MIPS. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SOCKET_H # error "Never include <bits/socket_type.h> directly; use <sys/socket.h> instead." diff --git a/lib/libc/include/mipsel-linux-gnu/bits/statfs.h b/lib/libc/include/mipsel-linux-gnu/bits/statfs.h index fd0f68d6d7..fad668a7a3 100644 --- a/lib/libc/include/mipsel-linux-gnu/bits/statfs.h +++ b/lib/libc/include/mipsel-linux-gnu/bits/statfs.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_STATFS_H # error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead." diff --git a/lib/libc/include/mipsel-linux-gnu/bits/struct_mutex.h b/lib/libc/include/mipsel-linux-gnu/bits/struct_mutex.h new file mode 100644 index 0000000000..025ccddc14 --- /dev/null +++ b/lib/libc/include/mipsel-linux-gnu/bits/struct_mutex.h @@ -0,0 +1,56 @@ +/* MIPS internal mutex struct definitions. + 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _THREAD_MUTEX_INTERNAL_H +#define _THREAD_MUTEX_INTERNAL_H 1 + +struct __pthread_mutex_s +{ + int __lock; + unsigned int __count; + int __owner; +#if _MIPS_SIM == _ABI64 + unsigned int __nusers; +#endif + /* KIND must stay at this position in the structure to maintain + binary compatibility with static initializers. */ + int __kind; +#if _MIPS_SIM == _ABI64 + int __spins; + __pthread_list_t __list; +# define __PTHREAD_MUTEX_HAVE_PREV 1 +#else + unsigned int __nusers; + __extension__ union + { + int __spins; + __pthread_slist_t __list; + }; +# define __PTHREAD_MUTEX_HAVE_PREV 0 +#endif +}; + +#if _MIPS_SIM == _ABI64 +# define __PTHREAD_MUTEX_INITIALIZER(__kind) \ + 0, 0, 0, 0, __kind, 0, { 0, 0 } +#else +# define __PTHREAD_MUTEX_INITIALIZER(__kind) \ + 0, 0, 0, __kind, 0, { 0 } +#endif + +#endif
\ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-gnu/bits/termios-c_cc.h b/lib/libc/include/mipsel-linux-gnu/bits/termios-c_cc.h index ed124b8db4..5b5850ca57 100644 --- a/lib/libc/include/mipsel-linux-gnu/bits/termios-c_cc.h +++ b/lib/libc/include/mipsel-linux-gnu/bits/termios-c_cc.h @@ -1,5 +1,5 @@ /* termios c_cc symbolic constant definitions. Linux/mips 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-c_cc.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/mipsel-linux-gnu/bits/termios-c_lflag.h b/lib/libc/include/mipsel-linux-gnu/bits/termios-c_lflag.h index e5a6773476..cc1f2a0bd5 100644 --- a/lib/libc/include/mipsel-linux-gnu/bits/termios-c_lflag.h +++ b/lib/libc/include/mipsel-linux-gnu/bits/termios-c_lflag.h @@ -1,5 +1,5 @@ /* termios local mode definitions. Linux/mips 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-c_lflag.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/mipsel-linux-gnu/bits/termios-struct.h b/lib/libc/include/mipsel-linux-gnu/bits/termios-struct.h index 0442c6f354..f046eaaa80 100644 --- a/lib/libc/include/mipsel-linux-gnu/bits/termios-struct.h +++ b/lib/libc/include/mipsel-linux-gnu/bits/termios-struct.h @@ -1,5 +1,5 @@ /* struct termios definition. Linux/mips 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-struct.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/mipsel-linux-gnu/bits/termios-tcflow.h b/lib/libc/include/mipsel-linux-gnu/bits/termios-tcflow.h index 2c523c3a2a..f21c02a389 100644 --- a/lib/libc/include/mipsel-linux-gnu/bits/termios-tcflow.h +++ b/lib/libc/include/mipsel-linux-gnu/bits/termios-tcflow.h @@ -1,5 +1,5 @@ /* termios local mode definitions. Linux/mips 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-tcflow.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/mipsel-linux-gnu/bits/timerfd.h b/lib/libc/include/mipsel-linux-gnu/bits/timerfd.h index 005d411617..79ff9d0cc4 100644 --- a/lib/libc/include/mipsel-linux-gnu/bits/timerfd.h +++ b/lib/libc/include/mipsel-linux-gnu/bits/timerfd.h @@ -1,4 +1,4 @@ -/* 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_TIMERFD_H # error "Never use <bits/timerfd.h> directly; include <sys/timerfd.h> instead." diff --git a/lib/libc/include/mipsel-linux-gnu/bits/types/stack_t.h b/lib/libc/include/mipsel-linux-gnu/bits/types/stack_t.h index b62c348140..03e800bd0c 100644 --- a/lib/libc/include/mipsel-linux-gnu/bits/types/stack_t.h +++ b/lib/libc/include/mipsel-linux-gnu/bits/types/stack_t.h @@ -1,5 +1,5 @@ /* Define stack_t. MIPS Linux 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef __stack_t_defined #define __stack_t_defined 1 diff --git a/lib/libc/include/mipsel-linux-gnu/ieee754.h b/lib/libc/include/mipsel-linux-gnu/ieee754.h index 600dbce3d8..86baeceab6 100644 --- a/lib/libc/include/mipsel-linux-gnu/ieee754.h +++ b/lib/libc/include/mipsel-linux-gnu/ieee754.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,19 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _IEEE754_H - #define _IEEE754_H 1 + #include <features.h> -#include <endian.h> +#include <bits/endian.h> -#include <float.h> +#ifndef __LDBL_MANT_DIG__ +# include <float.h> +# define __LDBL_MANT_DIG__ LDBL_MANT_DIG +#endif __BEGIN_DECLS @@ -127,7 +130,7 @@ union ieee754_double #define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */ -#if LDBL_MANT_DIG == 113 +#if __LDBL_MANT_DIG__ == 113 union ieee854_long_double { @@ -184,7 +187,7 @@ union ieee854_long_double #define IEEE854_LONG_DOUBLE_BIAS 0x3fff /* Added to exponent. */ -#elif LDBL_MANT_DIG == 64 +#elif __LDBL_MANT_DIG__ == 64 union ieee854_long_double { @@ -253,7 +256,7 @@ union ieee854_long_double #define IEEE854_LONG_DOUBLE_BIAS 0x3fff -#elif LDBL_MANT_DIG == 53 +#elif __LDBL_MANT_DIG__ == 53 union ieee854_long_double { @@ -316,7 +319,7 @@ union ieee854_long_double #define IEEE854_LONG_DOUBLE_BIAS 0x3ff /* Added to exponent. */ -#endif /* LDBL_MANT_DIG == 53 */ +#endif /* __LDBL_MANT_DIG__ == 53 */ __END_DECLS diff --git a/lib/libc/include/powerpc-linux-gnu/bits/endianness.h b/lib/libc/include/powerpc-linux-gnu/bits/endianness.h new file mode 100644 index 0000000000..91892fa161 --- /dev/null +++ b/lib/libc/include/powerpc-linux-gnu/bits/endianness.h @@ -0,0 +1,16 @@ +#ifndef _BITS_ENDIANNESS_H +#define _BITS_ENDIANNESS_H 1 + +#ifndef _BITS_ENDIAN_H +# error "Never use <bits/endianness.h> directly; include <endian.h> 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 */
\ No newline at end of file diff --git a/lib/libc/include/powerpc-linux-gnu/bits/environments.h b/lib/libc/include/powerpc-linux-gnu/bits/environments.h index 2e1c0bc1de..9134837e15 100644 --- a/lib/libc/include/powerpc-linux-gnu/bits/environments.h +++ b/lib/libc/include/powerpc-linux-gnu/bits/environments.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _UNISTD_H # error "Never include this file directly. Use <unistd.h> instead" diff --git a/lib/libc/include/powerpc-linux-gnu/bits/fcntl.h b/lib/libc/include/powerpc-linux-gnu/bits/fcntl.h index e344ed65a4..e67c6530dd 100644 --- a/lib/libc/include/powerpc-linux-gnu/bits/fcntl.h +++ b/lib/libc/include/powerpc-linux-gnu/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux/PowerPC. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FCNTL_H # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead." diff --git a/lib/libc/include/powerpc-linux-gnu/bits/fenv.h b/lib/libc/include/powerpc-linux-gnu/bits/fenv.h index f59c2a5809..65ef2f98a0 100644 --- a/lib/libc/include/powerpc-linux-gnu/bits/fenv.h +++ b/lib/libc/include/powerpc-linux-gnu/bits/fenv.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FENV_H # error "Never use <bits/fenv.h> directly; include <fenv.h> instead." @@ -170,7 +170,7 @@ extern const fenv_t __fe_nonieee_env; #endif -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) /* Type representing floating-point control modes. */ typedef double femode_t; diff --git a/lib/libc/include/powerpc-linux-gnu/bits/fenvinline.h b/lib/libc/include/powerpc-linux-gnu/bits/fenvinline.h index efb8a356e2..695d3a395d 100644 --- a/lib/libc/include/powerpc-linux-gnu/bits/fenvinline.h +++ b/lib/libc/include/powerpc-linux-gnu/bits/fenvinline.h @@ -1,5 +1,5 @@ /* Inline floating-point environment handling functions for powerpc. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if defined __GNUC__ && !defined _SOFT_FLOAT && !defined __NO_FPRS__ diff --git a/lib/libc/include/powerpc-linux-gnu/bits/floatn.h b/lib/libc/include/powerpc-linux-gnu/bits/floatn.h index 2514b6300e..bec17f1a7c 100644 --- a/lib/libc/include/powerpc-linux-gnu/bits/floatn.h +++ b/lib/libc/include/powerpc-linux-gnu/bits/floatn.h @@ -1,5 +1,5 @@ /* Macros to control TS 18661-3 glibc features on powerpc. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_FLOATN_H #define _BITS_FLOATN_H diff --git a/lib/libc/include/powerpc-linux-gnu/bits/fp-fast.h b/lib/libc/include/powerpc-linux-gnu/bits/fp-fast.h index 09e055f11e..d8f3a7d003 100644 --- a/lib/libc/include/powerpc-linux-gnu/bits/fp-fast.h +++ b/lib/libc/include/powerpc-linux-gnu/bits/fp-fast.h @@ -1,5 +1,5 @@ /* Define FP_FAST_* macros. PowerPC version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _MATH_H # error "Never use <bits/fp-fast.h> directly; include <math.h> instead." diff --git a/lib/libc/include/powerpc-linux-gnu/bits/hwcap.h b/lib/libc/include/powerpc-linux-gnu/bits/hwcap.h index 0d72f34418..335efbd0aa 100644 --- a/lib/libc/include/powerpc-linux-gnu/bits/hwcap.h +++ b/lib/libc/include/powerpc-linux-gnu/bits/hwcap.h @@ -1,5 +1,5 @@ /* Defines for bits in AT_HWCAP and AT_HWCAP2. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined(_SYS_AUXV_H) && !defined(_SYSDEPS_SYSDEP_H) # error "Never include <bits/hwcap.h> directly; use <sys/auxv.h> instead." diff --git a/lib/libc/include/powerpc-linux-gnu/bits/ioctl-types.h b/lib/libc/include/powerpc-linux-gnu/bits/ioctl-types.h index f2b9931899..353daa482e 100644 --- a/lib/libc/include/powerpc-linux-gnu/bits/ioctl-types.h +++ b/lib/libc/include/powerpc-linux-gnu/bits/ioctl-types.h @@ -1,5 +1,5 @@ /* Structure types for pre-termios terminal ioctls. Linux/powerpc 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_IOCTL_H # error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead." diff --git a/lib/libc/include/powerpc-linux-gnu/bits/ipc.h b/lib/libc/include/powerpc-linux-gnu/bits/ipc-perm.h index 7b0f55f7ab..73e3a67f70 100644 --- a/lib/libc/include/powerpc-linux-gnu/bits/ipc.h +++ b/lib/libc/include/powerpc-linux-gnu/bits/ipc-perm.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1995-2019 Free Software Foundation, Inc. +/* struct ipc_perm definition. Linux/powerpc version. + 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,31 +14,12 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_IPC_H -# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead." +# error "Never use <bits/ipc-perm.h> directly; include <sys/ipc.h> instead." #endif -#include <bits/types.h> - -/* Mode bits for `msgget', `semget', and `shmget'. */ -#define IPC_CREAT 01000 /* Create key if key does not exist. */ -#define IPC_EXCL 02000 /* Fail if key exists. */ -#define IPC_NOWAIT 04000 /* Return error on wait. */ - -/* Control commands for `msgctl', `semctl', and `shmctl'. */ -#define IPC_RMID 0 /* Remove identifier. */ -#define IPC_SET 1 /* Set `ipc_perm' options. */ -#define IPC_STAT 2 /* Get `ipc_perm' options. */ -#ifdef __USE_GNU -# define IPC_INFO 3 /* See ipcs. */ -#endif - -/* Special key values. */ -#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ - - /* Data structure used to pass permission information to IPC operations. */ struct ipc_perm { diff --git a/lib/libc/include/powerpc-linux-gnu/bits/iscanonical.h b/lib/libc/include/powerpc-linux-gnu/bits/iscanonical.h index 108d77b411..8818d6fa08 100644 --- a/lib/libc/include/powerpc-linux-gnu/bits/iscanonical.h +++ b/lib/libc/include/powerpc-linux-gnu/bits/iscanonical.h @@ -1,5 +1,5 @@ /* Define iscanonical macro. ldbl-128ibm version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _MATH_H # error "Never use <bits/iscanonical.h> directly; include <math.h> instead." diff --git a/lib/libc/include/powerpc-linux-gnu/bits/link.h b/lib/libc/include/powerpc-linux-gnu/bits/link.h index ca46d5a01b..2bc9350201 100644 --- a/lib/libc/include/powerpc-linux-gnu/bits/link.h +++ b/lib/libc/include/powerpc-linux-gnu/bits/link.h @@ -1,5 +1,5 @@ /* Machine-specific declarations for dynamic linker interface. PowerPC version - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _LINK_H # error "Never include <bits/link.h> directly; use <link.h> instead." diff --git a/lib/libc/include/powerpc-linux-gnu/bits/local_lim.h b/lib/libc/include/powerpc-linux-gnu/bits/local_lim.h index 65261d42b3..2178c8890c 100644 --- a/lib/libc/include/powerpc-linux-gnu/bits/local_lim.h +++ b/lib/libc/include/powerpc-linux-gnu/bits/local_lim.h @@ -1,5 +1,5 @@ /* Minimum guaranteed maximum values for system limits. Linux/PPC version. - 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. 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 <http://www.gnu.org/licenses/>. */ + not, see <https://www.gnu.org/licenses/>. */ /* The kernel header pollutes the namespace with the NR_OPEN symbol and defines LINK_MAX although filesystems have different maxima. A diff --git a/lib/libc/include/powerpc-linux-gnu/bits/long-double.h b/lib/libc/include/powerpc-linux-gnu/bits/long-double.h index 9fe5a6c570..391f7d62fe 100644 --- a/lib/libc/include/powerpc-linux-gnu/bits/long-double.h +++ b/lib/libc/include/powerpc-linux-gnu/bits/long-double.h @@ -1,5 +1,5 @@ /* Properties of long double type. ldbl-opt version. - 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,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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef __NO_LONG_DOUBLE_MATH # define __LONG_DOUBLE_MATH_OPTIONAL 1 # ifndef __LONG_DOUBLE_128__ # define __NO_LONG_DOUBLE_MATH 1 # endif -#endif
\ No newline at end of file +#endif +#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file diff --git a/lib/libc/include/powerpc-linux-gnu/bits/mman.h b/lib/libc/include/powerpc-linux-gnu/bits/mman.h index 9e80948561..40e853fef3 100644 --- a/lib/libc/include/powerpc-linux-gnu/bits/mman.h +++ b/lib/libc/include/powerpc-linux-gnu/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/PowerPC version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_MMAN_H # error "Never use <bits/mman.h> directly; include <sys/mman.h> instead." @@ -36,6 +36,8 @@ # define MAP_NONBLOCK 0x10000 /* Do not block on IO. */ # define MAP_STACK 0x20000 /* Allocation is for a stack. */ # define MAP_HUGETLB 0x40000 /* Create huge page mapping. */ +# define MAP_SYNC 0x80000 /* Perform synchronous page + faults for the mapping. */ # define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap underlying mapping. */ #endif diff --git a/lib/libc/include/powerpc-linux-gnu/bits/msq-pad.h b/lib/libc/include/powerpc-linux-gnu/bits/msq-pad.h index d697bc4d06..c72a8507da 100644 --- a/lib/libc/include/powerpc-linux-gnu/bits/msq-pad.h +++ b/lib/libc/include/powerpc-linux-gnu/bits/msq-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct msqid_ds. PowerPC 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_MSG_H # error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead." diff --git a/lib/libc/include/powerpc-linux-gnu/bits/procfs.h b/lib/libc/include/powerpc-linux-gnu/bits/procfs.h index 793fa8944a..4afb90d85a 100644 --- a/lib/libc/include/powerpc-linux-gnu/bits/procfs.h +++ b/lib/libc/include/powerpc-linux-gnu/bits/procfs.h @@ -1,5 +1,5 @@ /* Types for registers for sys/procfs.h. PowerPC 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PROCFS_H # error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead." diff --git a/lib/libc/include/powerpc-linux-gnu/bits/sem-pad.h b/lib/libc/include/powerpc-linux-gnu/bits/sem-pad.h index 73f7ada00c..e6aca78279 100644 --- a/lib/libc/include/powerpc-linux-gnu/bits/sem-pad.h +++ b/lib/libc/include/powerpc-linux-gnu/bits/sem-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct semid_ds. PowerPC 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SEM_H # error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead." diff --git a/lib/libc/include/powerpc-linux-gnu/bits/semaphore.h b/lib/libc/include/powerpc-linux-gnu/bits/semaphore.h index a8631d1aa3..d8dd45053b 100644 --- a/lib/libc/include/powerpc-linux-gnu/bits/semaphore.h +++ b/lib/libc/include/powerpc-linux-gnu/bits/semaphore.h @@ -1,5 +1,5 @@ /* Machine-specific POSIX semaphore type layouts. PowerPC 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. Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SEMAPHORE_H # error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead." diff --git a/lib/libc/include/powerpc-linux-gnu/bits/setjmp.h b/lib/libc/include/powerpc-linux-gnu/bits/setjmp.h index 1705da061c..b0d5e53478 100644 --- a/lib/libc/include/powerpc-linux-gnu/bits/setjmp.h +++ b/lib/libc/include/powerpc-linux-gnu/bits/setjmp.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* Define the machine-dependent type `jmp_buf'. PowerPC version. */ #ifndef _BITS_SETJMP_H diff --git a/lib/libc/include/powerpc-linux-gnu/bits/shm-pad.h b/lib/libc/include/powerpc-linux-gnu/bits/shm-pad.h index 7cf2c0d72d..950fc7d5b5 100644 --- a/lib/libc/include/powerpc-linux-gnu/bits/shm-pad.h +++ b/lib/libc/include/powerpc-linux-gnu/bits/shm-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct shmid_ds. PowerPC 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SHM_H # error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead." diff --git a/lib/libc/include/powerpc-linux-gnu/bits/sigstack.h b/lib/libc/include/powerpc-linux-gnu/bits/sigstack.h index f3029e811a..7d28d61692 100644 --- a/lib/libc/include/powerpc-linux-gnu/bits/sigstack.h +++ b/lib/libc/include/powerpc-linux-gnu/bits/sigstack.h @@ -1,5 +1,5 @@ /* sigstack, sigaltstack definitions. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGSTACK_H #define _BITS_SIGSTACK_H 1 diff --git a/lib/libc/include/powerpc-linux-gnu/bits/socket-constants.h b/lib/libc/include/powerpc-linux-gnu/bits/socket-constants.h index 705f575fe0..ad54f32304 100644 --- a/lib/libc/include/powerpc-linux-gnu/bits/socket-constants.h +++ b/lib/libc/include/powerpc-linux-gnu/bits/socket-constants.h @@ -1,5 +1,5 @@ /* Socket constants which vary among Linux architectures. Version for POWER. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SOCKET_H # error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead." diff --git a/lib/libc/include/powerpc-linux-gnu/bits/stat.h b/lib/libc/include/powerpc-linux-gnu/bits/stat.h index 38c4d2425c..9daf5a5c56 100644 --- a/lib/libc/include/powerpc-linux-gnu/bits/stat.h +++ b/lib/libc/include/powerpc-linux-gnu/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead." diff --git a/lib/libc/include/powerpc-linux-gnu/bits/struct_mutex.h b/lib/libc/include/powerpc-linux-gnu/bits/struct_mutex.h new file mode 100644 index 0000000000..40b5c891ec --- /dev/null +++ b/lib/libc/include/powerpc-linux-gnu/bits/struct_mutex.h @@ -0,0 +1,63 @@ +/* PowerPC internal mutex struct definitions. + 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _THREAD_MUTEX_INTERNAL_H +#define _THREAD_MUTEX_INTERNAL_H 1 + +struct __pthread_mutex_s +{ + int __lock; + unsigned int __count; + int __owner; +#if __WORDSIZE == 64 + unsigned int __nusers; +#endif + /* KIND must stay at this position in the structure to maintain + binary compatibility with static initializers. */ + int __kind; +#if __WORDSIZE == 64 + short __spins; + short __elision; + __pthread_list_t __list; +# define __PTHREAD_MUTEX_HAVE_PREV 1 +#else + unsigned int __nusers; + __extension__ union + { + struct + { + short __espins; + short __elision; +# define __spins __elision_data.__espins +# define __elision __elision_data.__elision + } __elision_data; + __pthread_slist_t __list; + }; +# define __PTHREAD_MUTEX_HAVE_PREV 0 +#endif +}; + +#if __WORDSIZE == 64 +# define __PTHREAD_MUTEX_INITIALIZER(__kind) \ + 0, 0, 0, 0, __kind, 0, 0, { 0, 0 } +#else +# define __PTHREAD_MUTEX_INITIALIZER(__kind) \ + 0, 0, 0, __kind, 0, { { 0, 0 } } +#endif + +#endif
\ No newline at end of file diff --git a/lib/libc/include/powerpc-linux-gnu/bits/pthreadtypes-arch.h b/lib/libc/include/powerpc-linux-gnu/bits/struct_rwlock.h index 883306d2e8..7ab9afe0ee 100644 --- a/lib/libc/include/powerpc-linux-gnu/bits/pthreadtypes-arch.h +++ b/lib/libc/include/powerpc-linux-gnu/bits/struct_rwlock.h @@ -1,5 +1,6 @@ -/* Machine-specific pthread type layouts. PowerPC version. - Copyright (C) 2003-2019 Free Software Foundation, Inc. +/* PowerPC internal rwlock struct definitions. + 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 @@ -16,37 +17,8 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#ifndef _BITS_PTHREADTYPES_ARCH_H -#define _BITS_PTHREADTYPES_ARCH_H 1 - -#include <bits/wordsize.h> - -#if __WORDSIZE == 64 -# define __SIZEOF_PTHREAD_MUTEX_T 40 -# define __SIZEOF_PTHREAD_ATTR_T 56 -# define __SIZEOF_PTHREAD_RWLOCK_T 56 -# define __SIZEOF_PTHREAD_BARRIER_T 32 -#else -# define __SIZEOF_PTHREAD_MUTEX_T 24 -# define __SIZEOF_PTHREAD_ATTR_T 36 -# define __SIZEOF_PTHREAD_RWLOCK_T 32 -# define __SIZEOF_PTHREAD_BARRIER_T 20 -#endif -#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 -#define __SIZEOF_PTHREAD_COND_T 48 -#define __SIZEOF_PTHREAD_CONDATTR_T 4 -#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 -#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND (__WORDSIZE != 64) -#define __PTHREAD_MUTEX_USE_UNION (__WORDSIZE != 64) - -#define __LOCK_ALIGNMENT -#define __ONCE_ALIGNMENT +#ifndef _RWLOCK_INTERNAL_H +#define _RWLOCK_INTERNAL_H struct __pthread_rwlock_arch_t { @@ -78,4 +50,12 @@ struct __pthread_rwlock_arch_t #endif }; -#endif /* bits/pthreadtypes.h */
\ No newline at end of file +#if __WORDSIZE == 64 +# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \ + 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, __flags +#else +# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \ + 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, 0, __flags, 0 +#endif + +#endif
\ No newline at end of file diff --git a/lib/libc/include/powerpc-linux-gnu/bits/termios-baud.h b/lib/libc/include/powerpc-linux-gnu/bits/termios-baud.h index 98c3cab88c..45a0dd450d 100644 --- a/lib/libc/include/powerpc-linux-gnu/bits/termios-baud.h +++ b/lib/libc/include/powerpc-linux-gnu/bits/termios-baud.h @@ -1,5 +1,5 @@ /* termios baud rate selection definitions. Linux/powerpc 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-baud.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/powerpc-linux-gnu/bits/termios-c_cc.h b/lib/libc/include/powerpc-linux-gnu/bits/termios-c_cc.h index 3b9f240258..f4c30c87d2 100644 --- a/lib/libc/include/powerpc-linux-gnu/bits/termios-c_cc.h +++ b/lib/libc/include/powerpc-linux-gnu/bits/termios-c_cc.h @@ -1,5 +1,5 @@ /* termios c_cc symbolic constant definitions. Linux/powerpc 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-c_cc.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/powerpc-linux-gnu/bits/termios-c_cflag.h b/lib/libc/include/powerpc-linux-gnu/bits/termios-c_cflag.h index 16869a7138..d63f19296f 100644 --- a/lib/libc/include/powerpc-linux-gnu/bits/termios-c_cflag.h +++ b/lib/libc/include/powerpc-linux-gnu/bits/termios-c_cflag.h @@ -1,5 +1,5 @@ /* termios control mode definitions. Linux/powerpc 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-c_cflag.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/powerpc-linux-gnu/bits/termios-c_iflag.h b/lib/libc/include/powerpc-linux-gnu/bits/termios-c_iflag.h index b61f9af030..846bd192c4 100644 --- a/lib/libc/include/powerpc-linux-gnu/bits/termios-c_iflag.h +++ b/lib/libc/include/powerpc-linux-gnu/bits/termios-c_iflag.h @@ -1,5 +1,5 @@ /* termios input mode definitions. Linux/powerpc 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-c_iflags.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/powerpc-linux-gnu/bits/termios-c_lflag.h b/lib/libc/include/powerpc-linux-gnu/bits/termios-c_lflag.h index 2abcbafdf5..aa3d3fe584 100644 --- a/lib/libc/include/powerpc-linux-gnu/bits/termios-c_lflag.h +++ b/lib/libc/include/powerpc-linux-gnu/bits/termios-c_lflag.h @@ -1,5 +1,5 @@ /* termios local mode definitions. Linux/powerpc version. - Copyright (C) 2019i 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-c_lflag.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/powerpc-linux-gnu/bits/termios-c_oflag.h b/lib/libc/include/powerpc-linux-gnu/bits/termios-c_oflag.h index ca06aad4f7..bdac69b5ad 100644 --- a/lib/libc/include/powerpc-linux-gnu/bits/termios-c_oflag.h +++ b/lib/libc/include/powerpc-linux-gnu/bits/termios-c_oflag.h @@ -1,5 +1,5 @@ /* termios output mode definitions. Linux/powerpc 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-c_oflag.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/powerpc-linux-gnu/bits/termios-misc.h b/lib/libc/include/powerpc-linux-gnu/bits/termios-misc.h index 369feac2d0..1053139360 100644 --- a/lib/libc/include/powerpc-linux-gnu/bits/termios-misc.h +++ b/lib/libc/include/powerpc-linux-gnu/bits/termios-misc.h @@ -1,5 +1,5 @@ /* termios baud platform specific definitions. Linux/powerpc 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-misc.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/powerpc-linux-gnu/fpu_control.h b/lib/libc/include/powerpc-linux-gnu/fpu_control.h index db5055a812..06ef01bde1 100644 --- a/lib/libc/include/powerpc-linux-gnu/fpu_control.h +++ b/lib/libc/include/powerpc-linux-gnu/fpu_control.h @@ -1,5 +1,5 @@ /* FPU control word definitions. PowerPC 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FPU_CONTROL_H #define _FPU_CONTROL_H diff --git a/lib/libc/include/powerpc-linux-gnu/ieee754.h b/lib/libc/include/powerpc-linux-gnu/ieee754.h index 918506bc96..dcdca2eb78 100644 --- a/lib/libc/include/powerpc-linux-gnu/ieee754.h +++ b/lib/libc/include/powerpc-linux-gnu/ieee754.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,14 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _IEEE754_H - #define _IEEE754_H 1 + #include <features.h> -#include <endian.h> +#include <bits/endian.h> __BEGIN_DECLS diff --git a/lib/libc/include/powerpc-linux-gnu/sys/ptrace.h b/lib/libc/include/powerpc-linux-gnu/sys/ptrace.h index cf05edb11d..d88fdeb5f4 100644 --- a/lib/libc/include/powerpc-linux-gnu/sys/ptrace.h +++ b/lib/libc/include/powerpc-linux-gnu/sys/ptrace.h @@ -1,5 +1,5 @@ /* `ptrace' debugger support interface. Linux/PowerPC version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PTRACE_H #define _SYS_PTRACE_H 1 @@ -38,6 +38,7 @@ __BEGIN_DECLS # undef PTRACE_GETREGSET # undef PTRACE_GETSIGINFO # undef PTRACE_GETSIGMASK +# undef PTRACE_GET_SYSCALL_INFO # undef PTRACE_GETVRREGS # undef PTRACE_GETVSRREGS # undef PTRACE_INTERRUPT @@ -65,6 +66,10 @@ __BEGIN_DECLS # undef PTRACE_SINGLEBLOCK # undef PTRACE_SINGLESTEP # undef PTRACE_SYSCALL +# undef PTRACE_SYSCALL_INFO_NONE +# undef PTRACE_SYSCALL_INFO_ENTRY +# undef PTRACE_SYSCALL_INFO_EXIT +# undef PTRACE_SYSCALL_INFO_SECCOMP # undef PTRACE_TRACEME #endif @@ -241,8 +246,12 @@ enum __ptrace_request #define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER /* Get seccomp BPF filter metadata. */ - PTRACE_SECCOMP_GET_METADATA = 0x420d + PTRACE_SECCOMP_GET_METADATA = 0x420d, #define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA + + /* Get information about system call. */ + PTRACE_GET_SYSCALL_INFO = 0x420e +#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO }; diff --git a/lib/libc/include/powerpc-linux-gnu/sys/ucontext.h b/lib/libc/include/powerpc-linux-gnu/sys/ucontext.h index 6655e12509..4be8bb5385 100644 --- a/lib/libc/include/powerpc-linux-gnu/sys/ucontext.h +++ b/lib/libc/include/powerpc-linux-gnu/sys/ucontext.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_UCONTEXT_H #define _SYS_UCONTEXT_H 1 @@ -75,12 +75,12 @@ typedef struct * a sigcontext. For older kernel (without Altivec) the sigcontext matches * the mcontext upto but not including the v_regs field. For kernels that * don't set AT_HWCAP or return AT_HWCAP without PPC_FEATURE_HAS_ALTIVEC the - * v_regs field may not exist and should not be referenced. The v_regd field - * can be refernced safely only after verifying that PPC_FEATURE_HAS_ALTIVEC + * v_regs field may not exist and should not be referenced. The v_regs field + * can be referenced safely only after verifying that PPC_FEATURE_HAS_ALTIVEC * is set in AT_HWCAP. */ /* Number of general registers. */ -# define __NGREG 48 /* includes r0-r31, nip, msr, lr, etc. */ +# define __NGREG 48 /* includes r0-r31, nip, msr, lr, etc. */ # define __NFPREG 33 /* includes fp0-fp31 &fpscr. */ # define __NVRREG 34 /* includes v0-v31, vscr, & vrsave in split vectors */ @@ -136,7 +136,7 @@ typedef struct { * either NULL (if this processor does not support the VMX feature) or the * address of the first quadword within the allocated (vmx_reserve) area. * - * The pointer (v_regs) of vector type (elf_vrreg_t) is essentually + * The pointer (v_regs) of vector type (elf_vrreg_t) is essentially * an array of 34 quadword entries. The entries with * indexes 0-31 contain the corresponding vector registers. The entry with * index 32 contains the vscr as the last word (offset 12) within the diff --git a/lib/libc/include/powerpc-linux-gnu/sys/user.h b/lib/libc/include/powerpc-linux-gnu/sys/user.h index 151aa48f53..0003f18811 100644 --- a/lib/libc/include/powerpc-linux-gnu/sys/user.h +++ b/lib/libc/include/powerpc-linux-gnu/sys/user.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_USER_H diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/endianness.h b/lib/libc/include/powerpc64-linux-gnu/bits/endianness.h new file mode 100644 index 0000000000..91892fa161 --- /dev/null +++ b/lib/libc/include/powerpc64-linux-gnu/bits/endianness.h @@ -0,0 +1,16 @@ +#ifndef _BITS_ENDIANNESS_H +#define _BITS_ENDIANNESS_H 1 + +#ifndef _BITS_ENDIAN_H +# error "Never use <bits/endianness.h> directly; include <endian.h> 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 */
\ No newline at end of file diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/environments.h b/lib/libc/include/powerpc64-linux-gnu/bits/environments.h index 2e1c0bc1de..9134837e15 100644 --- a/lib/libc/include/powerpc64-linux-gnu/bits/environments.h +++ b/lib/libc/include/powerpc64-linux-gnu/bits/environments.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _UNISTD_H # error "Never include this file directly. Use <unistd.h> instead" diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/fcntl.h b/lib/libc/include/powerpc64-linux-gnu/bits/fcntl.h index e344ed65a4..e67c6530dd 100644 --- a/lib/libc/include/powerpc64-linux-gnu/bits/fcntl.h +++ b/lib/libc/include/powerpc64-linux-gnu/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux/PowerPC. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FCNTL_H # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead." diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/fenv.h b/lib/libc/include/powerpc64-linux-gnu/bits/fenv.h index f59c2a5809..65ef2f98a0 100644 --- a/lib/libc/include/powerpc64-linux-gnu/bits/fenv.h +++ b/lib/libc/include/powerpc64-linux-gnu/bits/fenv.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FENV_H # error "Never use <bits/fenv.h> directly; include <fenv.h> instead." @@ -170,7 +170,7 @@ extern const fenv_t __fe_nonieee_env; #endif -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) /* Type representing floating-point control modes. */ typedef double femode_t; diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/fenvinline.h b/lib/libc/include/powerpc64-linux-gnu/bits/fenvinline.h index efb8a356e2..695d3a395d 100644 --- a/lib/libc/include/powerpc64-linux-gnu/bits/fenvinline.h +++ b/lib/libc/include/powerpc64-linux-gnu/bits/fenvinline.h @@ -1,5 +1,5 @@ /* Inline floating-point environment handling functions for powerpc. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if defined __GNUC__ && !defined _SOFT_FLOAT && !defined __NO_FPRS__ diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/floatn.h b/lib/libc/include/powerpc64-linux-gnu/bits/floatn.h index 2514b6300e..bec17f1a7c 100644 --- a/lib/libc/include/powerpc64-linux-gnu/bits/floatn.h +++ b/lib/libc/include/powerpc64-linux-gnu/bits/floatn.h @@ -1,5 +1,5 @@ /* Macros to control TS 18661-3 glibc features on powerpc. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_FLOATN_H #define _BITS_FLOATN_H diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/fp-fast.h b/lib/libc/include/powerpc64-linux-gnu/bits/fp-fast.h index 09e055f11e..d8f3a7d003 100644 --- a/lib/libc/include/powerpc64-linux-gnu/bits/fp-fast.h +++ b/lib/libc/include/powerpc64-linux-gnu/bits/fp-fast.h @@ -1,5 +1,5 @@ /* Define FP_FAST_* macros. PowerPC version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _MATH_H # error "Never use <bits/fp-fast.h> directly; include <math.h> instead." diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/hwcap.h b/lib/libc/include/powerpc64-linux-gnu/bits/hwcap.h index 0d72f34418..335efbd0aa 100644 --- a/lib/libc/include/powerpc64-linux-gnu/bits/hwcap.h +++ b/lib/libc/include/powerpc64-linux-gnu/bits/hwcap.h @@ -1,5 +1,5 @@ /* Defines for bits in AT_HWCAP and AT_HWCAP2. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined(_SYS_AUXV_H) && !defined(_SYSDEPS_SYSDEP_H) # error "Never include <bits/hwcap.h> directly; use <sys/auxv.h> instead." diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/ioctl-types.h b/lib/libc/include/powerpc64-linux-gnu/bits/ioctl-types.h index f2b9931899..353daa482e 100644 --- a/lib/libc/include/powerpc64-linux-gnu/bits/ioctl-types.h +++ b/lib/libc/include/powerpc64-linux-gnu/bits/ioctl-types.h @@ -1,5 +1,5 @@ /* Structure types for pre-termios terminal ioctls. Linux/powerpc 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_IOCTL_H # error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead." diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/ipc.h b/lib/libc/include/powerpc64-linux-gnu/bits/ipc-perm.h index 7b0f55f7ab..73e3a67f70 100644 --- a/lib/libc/include/powerpc64-linux-gnu/bits/ipc.h +++ b/lib/libc/include/powerpc64-linux-gnu/bits/ipc-perm.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1995-2019 Free Software Foundation, Inc. +/* struct ipc_perm definition. Linux/powerpc version. + 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,31 +14,12 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_IPC_H -# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead." +# error "Never use <bits/ipc-perm.h> directly; include <sys/ipc.h> instead." #endif -#include <bits/types.h> - -/* Mode bits for `msgget', `semget', and `shmget'. */ -#define IPC_CREAT 01000 /* Create key if key does not exist. */ -#define IPC_EXCL 02000 /* Fail if key exists. */ -#define IPC_NOWAIT 04000 /* Return error on wait. */ - -/* Control commands for `msgctl', `semctl', and `shmctl'. */ -#define IPC_RMID 0 /* Remove identifier. */ -#define IPC_SET 1 /* Set `ipc_perm' options. */ -#define IPC_STAT 2 /* Get `ipc_perm' options. */ -#ifdef __USE_GNU -# define IPC_INFO 3 /* See ipcs. */ -#endif - -/* Special key values. */ -#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ - - /* Data structure used to pass permission information to IPC operations. */ struct ipc_perm { diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/iscanonical.h b/lib/libc/include/powerpc64-linux-gnu/bits/iscanonical.h index 108d77b411..8818d6fa08 100644 --- a/lib/libc/include/powerpc64-linux-gnu/bits/iscanonical.h +++ b/lib/libc/include/powerpc64-linux-gnu/bits/iscanonical.h @@ -1,5 +1,5 @@ /* Define iscanonical macro. ldbl-128ibm version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _MATH_H # error "Never use <bits/iscanonical.h> directly; include <math.h> instead." diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/link.h b/lib/libc/include/powerpc64-linux-gnu/bits/link.h index ca46d5a01b..2bc9350201 100644 --- a/lib/libc/include/powerpc64-linux-gnu/bits/link.h +++ b/lib/libc/include/powerpc64-linux-gnu/bits/link.h @@ -1,5 +1,5 @@ /* Machine-specific declarations for dynamic linker interface. PowerPC version - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _LINK_H # error "Never include <bits/link.h> directly; use <link.h> instead." diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/local_lim.h b/lib/libc/include/powerpc64-linux-gnu/bits/local_lim.h index 65261d42b3..2178c8890c 100644 --- a/lib/libc/include/powerpc64-linux-gnu/bits/local_lim.h +++ b/lib/libc/include/powerpc64-linux-gnu/bits/local_lim.h @@ -1,5 +1,5 @@ /* Minimum guaranteed maximum values for system limits. Linux/PPC version. - 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. 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 <http://www.gnu.org/licenses/>. */ + not, see <https://www.gnu.org/licenses/>. */ /* The kernel header pollutes the namespace with the NR_OPEN symbol and defines LINK_MAX although filesystems have different maxima. A diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/long-double.h b/lib/libc/include/powerpc64-linux-gnu/bits/long-double.h index 9fe5a6c570..391f7d62fe 100644 --- a/lib/libc/include/powerpc64-linux-gnu/bits/long-double.h +++ b/lib/libc/include/powerpc64-linux-gnu/bits/long-double.h @@ -1,5 +1,5 @@ /* Properties of long double type. ldbl-opt version. - 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,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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef __NO_LONG_DOUBLE_MATH # define __LONG_DOUBLE_MATH_OPTIONAL 1 # ifndef __LONG_DOUBLE_128__ # define __NO_LONG_DOUBLE_MATH 1 # endif -#endif
\ No newline at end of file +#endif +#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/mman.h b/lib/libc/include/powerpc64-linux-gnu/bits/mman.h index 9e80948561..40e853fef3 100644 --- a/lib/libc/include/powerpc64-linux-gnu/bits/mman.h +++ b/lib/libc/include/powerpc64-linux-gnu/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/PowerPC version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_MMAN_H # error "Never use <bits/mman.h> directly; include <sys/mman.h> instead." @@ -36,6 +36,8 @@ # define MAP_NONBLOCK 0x10000 /* Do not block on IO. */ # define MAP_STACK 0x20000 /* Allocation is for a stack. */ # define MAP_HUGETLB 0x40000 /* Create huge page mapping. */ +# define MAP_SYNC 0x80000 /* Perform synchronous page + faults for the mapping. */ # define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap underlying mapping. */ #endif diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/msq-pad.h b/lib/libc/include/powerpc64-linux-gnu/bits/msq-pad.h index d697bc4d06..c72a8507da 100644 --- a/lib/libc/include/powerpc64-linux-gnu/bits/msq-pad.h +++ b/lib/libc/include/powerpc64-linux-gnu/bits/msq-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct msqid_ds. PowerPC 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_MSG_H # error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead." diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/procfs.h b/lib/libc/include/powerpc64-linux-gnu/bits/procfs.h index 793fa8944a..4afb90d85a 100644 --- a/lib/libc/include/powerpc64-linux-gnu/bits/procfs.h +++ b/lib/libc/include/powerpc64-linux-gnu/bits/procfs.h @@ -1,5 +1,5 @@ /* Types for registers for sys/procfs.h. PowerPC 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PROCFS_H # error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead." diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/sem-pad.h b/lib/libc/include/powerpc64-linux-gnu/bits/sem-pad.h index 73f7ada00c..e6aca78279 100644 --- a/lib/libc/include/powerpc64-linux-gnu/bits/sem-pad.h +++ b/lib/libc/include/powerpc64-linux-gnu/bits/sem-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct semid_ds. PowerPC 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SEM_H # error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead." diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/semaphore.h b/lib/libc/include/powerpc64-linux-gnu/bits/semaphore.h index a8631d1aa3..d8dd45053b 100644 --- a/lib/libc/include/powerpc64-linux-gnu/bits/semaphore.h +++ b/lib/libc/include/powerpc64-linux-gnu/bits/semaphore.h @@ -1,5 +1,5 @@ /* Machine-specific POSIX semaphore type layouts. PowerPC 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. Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SEMAPHORE_H # error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead." diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/setjmp.h b/lib/libc/include/powerpc64-linux-gnu/bits/setjmp.h index 1705da061c..b0d5e53478 100644 --- a/lib/libc/include/powerpc64-linux-gnu/bits/setjmp.h +++ b/lib/libc/include/powerpc64-linux-gnu/bits/setjmp.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* Define the machine-dependent type `jmp_buf'. PowerPC version. */ #ifndef _BITS_SETJMP_H diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/shm-pad.h b/lib/libc/include/powerpc64-linux-gnu/bits/shm-pad.h index 7cf2c0d72d..950fc7d5b5 100644 --- a/lib/libc/include/powerpc64-linux-gnu/bits/shm-pad.h +++ b/lib/libc/include/powerpc64-linux-gnu/bits/shm-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct shmid_ds. PowerPC 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SHM_H # error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead." diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/sigstack.h b/lib/libc/include/powerpc64-linux-gnu/bits/sigstack.h index f3029e811a..7d28d61692 100644 --- a/lib/libc/include/powerpc64-linux-gnu/bits/sigstack.h +++ b/lib/libc/include/powerpc64-linux-gnu/bits/sigstack.h @@ -1,5 +1,5 @@ /* sigstack, sigaltstack definitions. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGSTACK_H #define _BITS_SIGSTACK_H 1 diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/socket-constants.h b/lib/libc/include/powerpc64-linux-gnu/bits/socket-constants.h index 705f575fe0..ad54f32304 100644 --- a/lib/libc/include/powerpc64-linux-gnu/bits/socket-constants.h +++ b/lib/libc/include/powerpc64-linux-gnu/bits/socket-constants.h @@ -1,5 +1,5 @@ /* Socket constants which vary among Linux architectures. Version for POWER. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SOCKET_H # error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead." diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/stat.h b/lib/libc/include/powerpc64-linux-gnu/bits/stat.h index 38c4d2425c..9daf5a5c56 100644 --- a/lib/libc/include/powerpc64-linux-gnu/bits/stat.h +++ b/lib/libc/include/powerpc64-linux-gnu/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead." diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/struct_mutex.h b/lib/libc/include/powerpc64-linux-gnu/bits/struct_mutex.h new file mode 100644 index 0000000000..40b5c891ec --- /dev/null +++ b/lib/libc/include/powerpc64-linux-gnu/bits/struct_mutex.h @@ -0,0 +1,63 @@ +/* PowerPC internal mutex struct definitions. + 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _THREAD_MUTEX_INTERNAL_H +#define _THREAD_MUTEX_INTERNAL_H 1 + +struct __pthread_mutex_s +{ + int __lock; + unsigned int __count; + int __owner; +#if __WORDSIZE == 64 + unsigned int __nusers; +#endif + /* KIND must stay at this position in the structure to maintain + binary compatibility with static initializers. */ + int __kind; +#if __WORDSIZE == 64 + short __spins; + short __elision; + __pthread_list_t __list; +# define __PTHREAD_MUTEX_HAVE_PREV 1 +#else + unsigned int __nusers; + __extension__ union + { + struct + { + short __espins; + short __elision; +# define __spins __elision_data.__espins +# define __elision __elision_data.__elision + } __elision_data; + __pthread_slist_t __list; + }; +# define __PTHREAD_MUTEX_HAVE_PREV 0 +#endif +}; + +#if __WORDSIZE == 64 +# define __PTHREAD_MUTEX_INITIALIZER(__kind) \ + 0, 0, 0, 0, __kind, 0, 0, { 0, 0 } +#else +# define __PTHREAD_MUTEX_INITIALIZER(__kind) \ + 0, 0, 0, __kind, 0, { { 0, 0 } } +#endif + +#endif
\ No newline at end of file diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/pthreadtypes-arch.h b/lib/libc/include/powerpc64-linux-gnu/bits/struct_rwlock.h index 883306d2e8..7ab9afe0ee 100644 --- a/lib/libc/include/powerpc64-linux-gnu/bits/pthreadtypes-arch.h +++ b/lib/libc/include/powerpc64-linux-gnu/bits/struct_rwlock.h @@ -1,5 +1,6 @@ -/* Machine-specific pthread type layouts. PowerPC version. - Copyright (C) 2003-2019 Free Software Foundation, Inc. +/* PowerPC internal rwlock struct definitions. + 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 @@ -16,37 +17,8 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#ifndef _BITS_PTHREADTYPES_ARCH_H -#define _BITS_PTHREADTYPES_ARCH_H 1 - -#include <bits/wordsize.h> - -#if __WORDSIZE == 64 -# define __SIZEOF_PTHREAD_MUTEX_T 40 -# define __SIZEOF_PTHREAD_ATTR_T 56 -# define __SIZEOF_PTHREAD_RWLOCK_T 56 -# define __SIZEOF_PTHREAD_BARRIER_T 32 -#else -# define __SIZEOF_PTHREAD_MUTEX_T 24 -# define __SIZEOF_PTHREAD_ATTR_T 36 -# define __SIZEOF_PTHREAD_RWLOCK_T 32 -# define __SIZEOF_PTHREAD_BARRIER_T 20 -#endif -#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 -#define __SIZEOF_PTHREAD_COND_T 48 -#define __SIZEOF_PTHREAD_CONDATTR_T 4 -#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 -#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND (__WORDSIZE != 64) -#define __PTHREAD_MUTEX_USE_UNION (__WORDSIZE != 64) - -#define __LOCK_ALIGNMENT -#define __ONCE_ALIGNMENT +#ifndef _RWLOCK_INTERNAL_H +#define _RWLOCK_INTERNAL_H struct __pthread_rwlock_arch_t { @@ -78,4 +50,12 @@ struct __pthread_rwlock_arch_t #endif }; -#endif /* bits/pthreadtypes.h */
\ No newline at end of file +#if __WORDSIZE == 64 +# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \ + 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, __flags +#else +# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \ + 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, 0, __flags, 0 +#endif + +#endif
\ No newline at end of file diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/termios-baud.h b/lib/libc/include/powerpc64-linux-gnu/bits/termios-baud.h index 98c3cab88c..45a0dd450d 100644 --- a/lib/libc/include/powerpc64-linux-gnu/bits/termios-baud.h +++ b/lib/libc/include/powerpc64-linux-gnu/bits/termios-baud.h @@ -1,5 +1,5 @@ /* termios baud rate selection definitions. Linux/powerpc 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-baud.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/termios-c_cc.h b/lib/libc/include/powerpc64-linux-gnu/bits/termios-c_cc.h index 3b9f240258..f4c30c87d2 100644 --- a/lib/libc/include/powerpc64-linux-gnu/bits/termios-c_cc.h +++ b/lib/libc/include/powerpc64-linux-gnu/bits/termios-c_cc.h @@ -1,5 +1,5 @@ /* termios c_cc symbolic constant definitions. Linux/powerpc 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-c_cc.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/termios-c_cflag.h b/lib/libc/include/powerpc64-linux-gnu/bits/termios-c_cflag.h index 16869a7138..d63f19296f 100644 --- a/lib/libc/include/powerpc64-linux-gnu/bits/termios-c_cflag.h +++ b/lib/libc/include/powerpc64-linux-gnu/bits/termios-c_cflag.h @@ -1,5 +1,5 @@ /* termios control mode definitions. Linux/powerpc 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-c_cflag.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/termios-c_iflag.h b/lib/libc/include/powerpc64-linux-gnu/bits/termios-c_iflag.h index b61f9af030..846bd192c4 100644 --- a/lib/libc/include/powerpc64-linux-gnu/bits/termios-c_iflag.h +++ b/lib/libc/include/powerpc64-linux-gnu/bits/termios-c_iflag.h @@ -1,5 +1,5 @@ /* termios input mode definitions. Linux/powerpc 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-c_iflags.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/termios-c_lflag.h b/lib/libc/include/powerpc64-linux-gnu/bits/termios-c_lflag.h index 2abcbafdf5..aa3d3fe584 100644 --- a/lib/libc/include/powerpc64-linux-gnu/bits/termios-c_lflag.h +++ b/lib/libc/include/powerpc64-linux-gnu/bits/termios-c_lflag.h @@ -1,5 +1,5 @@ /* termios local mode definitions. Linux/powerpc version. - Copyright (C) 2019i 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-c_lflag.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/termios-c_oflag.h b/lib/libc/include/powerpc64-linux-gnu/bits/termios-c_oflag.h index ca06aad4f7..bdac69b5ad 100644 --- a/lib/libc/include/powerpc64-linux-gnu/bits/termios-c_oflag.h +++ b/lib/libc/include/powerpc64-linux-gnu/bits/termios-c_oflag.h @@ -1,5 +1,5 @@ /* termios output mode definitions. Linux/powerpc 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-c_oflag.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/termios-misc.h b/lib/libc/include/powerpc64-linux-gnu/bits/termios-misc.h index 369feac2d0..1053139360 100644 --- a/lib/libc/include/powerpc64-linux-gnu/bits/termios-misc.h +++ b/lib/libc/include/powerpc64-linux-gnu/bits/termios-misc.h @@ -1,5 +1,5 @@ /* termios baud platform specific definitions. Linux/powerpc 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-misc.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/powerpc64-linux-gnu/fpu_control.h b/lib/libc/include/powerpc64-linux-gnu/fpu_control.h index db5055a812..06ef01bde1 100644 --- a/lib/libc/include/powerpc64-linux-gnu/fpu_control.h +++ b/lib/libc/include/powerpc64-linux-gnu/fpu_control.h @@ -1,5 +1,5 @@ /* FPU control word definitions. PowerPC 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FPU_CONTROL_H #define _FPU_CONTROL_H diff --git a/lib/libc/include/powerpc64-linux-gnu/ieee754.h b/lib/libc/include/powerpc64-linux-gnu/ieee754.h index 918506bc96..dcdca2eb78 100644 --- a/lib/libc/include/powerpc64-linux-gnu/ieee754.h +++ b/lib/libc/include/powerpc64-linux-gnu/ieee754.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,14 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _IEEE754_H - #define _IEEE754_H 1 + #include <features.h> -#include <endian.h> +#include <bits/endian.h> __BEGIN_DECLS diff --git a/lib/libc/include/powerpc64-linux-gnu/sys/ptrace.h b/lib/libc/include/powerpc64-linux-gnu/sys/ptrace.h index cf05edb11d..d88fdeb5f4 100644 --- a/lib/libc/include/powerpc64-linux-gnu/sys/ptrace.h +++ b/lib/libc/include/powerpc64-linux-gnu/sys/ptrace.h @@ -1,5 +1,5 @@ /* `ptrace' debugger support interface. Linux/PowerPC version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PTRACE_H #define _SYS_PTRACE_H 1 @@ -38,6 +38,7 @@ __BEGIN_DECLS # undef PTRACE_GETREGSET # undef PTRACE_GETSIGINFO # undef PTRACE_GETSIGMASK +# undef PTRACE_GET_SYSCALL_INFO # undef PTRACE_GETVRREGS # undef PTRACE_GETVSRREGS # undef PTRACE_INTERRUPT @@ -65,6 +66,10 @@ __BEGIN_DECLS # undef PTRACE_SINGLEBLOCK # undef PTRACE_SINGLESTEP # undef PTRACE_SYSCALL +# undef PTRACE_SYSCALL_INFO_NONE +# undef PTRACE_SYSCALL_INFO_ENTRY +# undef PTRACE_SYSCALL_INFO_EXIT +# undef PTRACE_SYSCALL_INFO_SECCOMP # undef PTRACE_TRACEME #endif @@ -241,8 +246,12 @@ enum __ptrace_request #define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER /* Get seccomp BPF filter metadata. */ - PTRACE_SECCOMP_GET_METADATA = 0x420d + PTRACE_SECCOMP_GET_METADATA = 0x420d, #define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA + + /* Get information about system call. */ + PTRACE_GET_SYSCALL_INFO = 0x420e +#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO }; diff --git a/lib/libc/include/powerpc64-linux-gnu/sys/ucontext.h b/lib/libc/include/powerpc64-linux-gnu/sys/ucontext.h index 6655e12509..4be8bb5385 100644 --- a/lib/libc/include/powerpc64-linux-gnu/sys/ucontext.h +++ b/lib/libc/include/powerpc64-linux-gnu/sys/ucontext.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_UCONTEXT_H #define _SYS_UCONTEXT_H 1 @@ -75,12 +75,12 @@ typedef struct * a sigcontext. For older kernel (without Altivec) the sigcontext matches * the mcontext upto but not including the v_regs field. For kernels that * don't set AT_HWCAP or return AT_HWCAP without PPC_FEATURE_HAS_ALTIVEC the - * v_regs field may not exist and should not be referenced. The v_regd field - * can be refernced safely only after verifying that PPC_FEATURE_HAS_ALTIVEC + * v_regs field may not exist and should not be referenced. The v_regs field + * can be referenced safely only after verifying that PPC_FEATURE_HAS_ALTIVEC * is set in AT_HWCAP. */ /* Number of general registers. */ -# define __NGREG 48 /* includes r0-r31, nip, msr, lr, etc. */ +# define __NGREG 48 /* includes r0-r31, nip, msr, lr, etc. */ # define __NFPREG 33 /* includes fp0-fp31 &fpscr. */ # define __NVRREG 34 /* includes v0-v31, vscr, & vrsave in split vectors */ @@ -136,7 +136,7 @@ typedef struct { * either NULL (if this processor does not support the VMX feature) or the * address of the first quadword within the allocated (vmx_reserve) area. * - * The pointer (v_regs) of vector type (elf_vrreg_t) is essentually + * The pointer (v_regs) of vector type (elf_vrreg_t) is essentially * an array of 34 quadword entries. The entries with * indexes 0-31 contain the corresponding vector registers. The entry with * index 32 contains the vscr as the last word (offset 12) within the diff --git a/lib/libc/include/powerpc64-linux-gnu/sys/user.h b/lib/libc/include/powerpc64-linux-gnu/sys/user.h index 151aa48f53..0003f18811 100644 --- a/lib/libc/include/powerpc64-linux-gnu/sys/user.h +++ b/lib/libc/include/powerpc64-linux-gnu/sys/user.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_USER_H diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/endian.h b/lib/libc/include/powerpc64le-linux-gnu/bits/endian.h deleted file mode 100644 index f643beb3b5..0000000000 --- a/lib/libc/include/powerpc64le-linux-gnu/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 - <http://www.gnu.org/licenses/>. */ - -/* PowerPC can be little or big endian. Hopefully gcc will know... */ - -#ifndef _ENDIAN_H -# error "Never use <bits/endian.h> directly; include <endian.h> 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
\ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/endianness.h b/lib/libc/include/powerpc64le-linux-gnu/bits/endianness.h new file mode 100644 index 0000000000..91892fa161 --- /dev/null +++ b/lib/libc/include/powerpc64le-linux-gnu/bits/endianness.h @@ -0,0 +1,16 @@ +#ifndef _BITS_ENDIANNESS_H +#define _BITS_ENDIANNESS_H 1 + +#ifndef _BITS_ENDIAN_H +# error "Never use <bits/endianness.h> directly; include <endian.h> 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 */
\ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/environments.h b/lib/libc/include/powerpc64le-linux-gnu/bits/environments.h index 2e1c0bc1de..9134837e15 100644 --- a/lib/libc/include/powerpc64le-linux-gnu/bits/environments.h +++ b/lib/libc/include/powerpc64le-linux-gnu/bits/environments.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _UNISTD_H # error "Never include this file directly. Use <unistd.h> instead" diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/fcntl.h b/lib/libc/include/powerpc64le-linux-gnu/bits/fcntl.h index e344ed65a4..e67c6530dd 100644 --- a/lib/libc/include/powerpc64le-linux-gnu/bits/fcntl.h +++ b/lib/libc/include/powerpc64le-linux-gnu/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux/PowerPC. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FCNTL_H # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead." diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/fenv.h b/lib/libc/include/powerpc64le-linux-gnu/bits/fenv.h index f59c2a5809..65ef2f98a0 100644 --- a/lib/libc/include/powerpc64le-linux-gnu/bits/fenv.h +++ b/lib/libc/include/powerpc64le-linux-gnu/bits/fenv.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FENV_H # error "Never use <bits/fenv.h> directly; include <fenv.h> instead." @@ -170,7 +170,7 @@ extern const fenv_t __fe_nonieee_env; #endif -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) /* Type representing floating-point control modes. */ typedef double femode_t; diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/fenvinline.h b/lib/libc/include/powerpc64le-linux-gnu/bits/fenvinline.h index efb8a356e2..695d3a395d 100644 --- a/lib/libc/include/powerpc64le-linux-gnu/bits/fenvinline.h +++ b/lib/libc/include/powerpc64le-linux-gnu/bits/fenvinline.h @@ -1,5 +1,5 @@ /* Inline floating-point environment handling functions for powerpc. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if defined __GNUC__ && !defined _SOFT_FLOAT && !defined __NO_FPRS__ diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/floatn.h b/lib/libc/include/powerpc64le-linux-gnu/bits/floatn.h index 2514b6300e..bec17f1a7c 100644 --- a/lib/libc/include/powerpc64le-linux-gnu/bits/floatn.h +++ b/lib/libc/include/powerpc64le-linux-gnu/bits/floatn.h @@ -1,5 +1,5 @@ /* Macros to control TS 18661-3 glibc features on powerpc. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_FLOATN_H #define _BITS_FLOATN_H diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/fp-fast.h b/lib/libc/include/powerpc64le-linux-gnu/bits/fp-fast.h index 09e055f11e..d8f3a7d003 100644 --- a/lib/libc/include/powerpc64le-linux-gnu/bits/fp-fast.h +++ b/lib/libc/include/powerpc64le-linux-gnu/bits/fp-fast.h @@ -1,5 +1,5 @@ /* Define FP_FAST_* macros. PowerPC version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _MATH_H # error "Never use <bits/fp-fast.h> directly; include <math.h> instead." diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/hwcap.h b/lib/libc/include/powerpc64le-linux-gnu/bits/hwcap.h index 0d72f34418..335efbd0aa 100644 --- a/lib/libc/include/powerpc64le-linux-gnu/bits/hwcap.h +++ b/lib/libc/include/powerpc64le-linux-gnu/bits/hwcap.h @@ -1,5 +1,5 @@ /* Defines for bits in AT_HWCAP and AT_HWCAP2. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined(_SYS_AUXV_H) && !defined(_SYSDEPS_SYSDEP_H) # error "Never include <bits/hwcap.h> directly; use <sys/auxv.h> instead." diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/ioctl-types.h b/lib/libc/include/powerpc64le-linux-gnu/bits/ioctl-types.h index f2b9931899..353daa482e 100644 --- a/lib/libc/include/powerpc64le-linux-gnu/bits/ioctl-types.h +++ b/lib/libc/include/powerpc64le-linux-gnu/bits/ioctl-types.h @@ -1,5 +1,5 @@ /* Structure types for pre-termios terminal ioctls. Linux/powerpc 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_IOCTL_H # error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead." diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/ipc.h b/lib/libc/include/powerpc64le-linux-gnu/bits/ipc-perm.h index 7b0f55f7ab..73e3a67f70 100644 --- a/lib/libc/include/powerpc64le-linux-gnu/bits/ipc.h +++ b/lib/libc/include/powerpc64le-linux-gnu/bits/ipc-perm.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1995-2019 Free Software Foundation, Inc. +/* struct ipc_perm definition. Linux/powerpc version. + 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,31 +14,12 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_IPC_H -# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead." +# error "Never use <bits/ipc-perm.h> directly; include <sys/ipc.h> instead." #endif -#include <bits/types.h> - -/* Mode bits for `msgget', `semget', and `shmget'. */ -#define IPC_CREAT 01000 /* Create key if key does not exist. */ -#define IPC_EXCL 02000 /* Fail if key exists. */ -#define IPC_NOWAIT 04000 /* Return error on wait. */ - -/* Control commands for `msgctl', `semctl', and `shmctl'. */ -#define IPC_RMID 0 /* Remove identifier. */ -#define IPC_SET 1 /* Set `ipc_perm' options. */ -#define IPC_STAT 2 /* Get `ipc_perm' options. */ -#ifdef __USE_GNU -# define IPC_INFO 3 /* See ipcs. */ -#endif - -/* Special key values. */ -#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ - - /* Data structure used to pass permission information to IPC operations. */ struct ipc_perm { diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/iscanonical.h b/lib/libc/include/powerpc64le-linux-gnu/bits/iscanonical.h index 108d77b411..8818d6fa08 100644 --- a/lib/libc/include/powerpc64le-linux-gnu/bits/iscanonical.h +++ b/lib/libc/include/powerpc64le-linux-gnu/bits/iscanonical.h @@ -1,5 +1,5 @@ /* Define iscanonical macro. ldbl-128ibm version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _MATH_H # error "Never use <bits/iscanonical.h> directly; include <math.h> instead." diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/link.h b/lib/libc/include/powerpc64le-linux-gnu/bits/link.h index ca46d5a01b..2bc9350201 100644 --- a/lib/libc/include/powerpc64le-linux-gnu/bits/link.h +++ b/lib/libc/include/powerpc64le-linux-gnu/bits/link.h @@ -1,5 +1,5 @@ /* Machine-specific declarations for dynamic linker interface. PowerPC version - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _LINK_H # error "Never include <bits/link.h> directly; use <link.h> instead." diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/local_lim.h b/lib/libc/include/powerpc64le-linux-gnu/bits/local_lim.h index 65261d42b3..2178c8890c 100644 --- a/lib/libc/include/powerpc64le-linux-gnu/bits/local_lim.h +++ b/lib/libc/include/powerpc64le-linux-gnu/bits/local_lim.h @@ -1,5 +1,5 @@ /* Minimum guaranteed maximum values for system limits. Linux/PPC version. - 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. 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 <http://www.gnu.org/licenses/>. */ + not, see <https://www.gnu.org/licenses/>. */ /* The kernel header pollutes the namespace with the NR_OPEN symbol and defines LINK_MAX although filesystems have different maxima. A diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/long-double.h b/lib/libc/include/powerpc64le-linux-gnu/bits/long-double.h index 9fe5a6c570..391f7d62fe 100644 --- a/lib/libc/include/powerpc64le-linux-gnu/bits/long-double.h +++ b/lib/libc/include/powerpc64le-linux-gnu/bits/long-double.h @@ -1,5 +1,5 @@ /* Properties of long double type. ldbl-opt version. - 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,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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef __NO_LONG_DOUBLE_MATH # define __LONG_DOUBLE_MATH_OPTIONAL 1 # ifndef __LONG_DOUBLE_128__ # define __NO_LONG_DOUBLE_MATH 1 # endif -#endif
\ No newline at end of file +#endif +#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/mman.h b/lib/libc/include/powerpc64le-linux-gnu/bits/mman.h index 9e80948561..40e853fef3 100644 --- a/lib/libc/include/powerpc64le-linux-gnu/bits/mman.h +++ b/lib/libc/include/powerpc64le-linux-gnu/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/PowerPC version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_MMAN_H # error "Never use <bits/mman.h> directly; include <sys/mman.h> instead." @@ -36,6 +36,8 @@ # define MAP_NONBLOCK 0x10000 /* Do not block on IO. */ # define MAP_STACK 0x20000 /* Allocation is for a stack. */ # define MAP_HUGETLB 0x40000 /* Create huge page mapping. */ +# define MAP_SYNC 0x80000 /* Perform synchronous page + faults for the mapping. */ # define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap underlying mapping. */ #endif diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/msq-pad.h b/lib/libc/include/powerpc64le-linux-gnu/bits/msq-pad.h index d697bc4d06..c72a8507da 100644 --- a/lib/libc/include/powerpc64le-linux-gnu/bits/msq-pad.h +++ b/lib/libc/include/powerpc64le-linux-gnu/bits/msq-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct msqid_ds. PowerPC 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_MSG_H # error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead." diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/procfs.h b/lib/libc/include/powerpc64le-linux-gnu/bits/procfs.h index 793fa8944a..4afb90d85a 100644 --- a/lib/libc/include/powerpc64le-linux-gnu/bits/procfs.h +++ b/lib/libc/include/powerpc64le-linux-gnu/bits/procfs.h @@ -1,5 +1,5 @@ /* Types for registers for sys/procfs.h. PowerPC 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PROCFS_H # error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead." diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/sem-pad.h b/lib/libc/include/powerpc64le-linux-gnu/bits/sem-pad.h index 73f7ada00c..e6aca78279 100644 --- a/lib/libc/include/powerpc64le-linux-gnu/bits/sem-pad.h +++ b/lib/libc/include/powerpc64le-linux-gnu/bits/sem-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct semid_ds. PowerPC 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SEM_H # error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead." diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/semaphore.h b/lib/libc/include/powerpc64le-linux-gnu/bits/semaphore.h index a8631d1aa3..d8dd45053b 100644 --- a/lib/libc/include/powerpc64le-linux-gnu/bits/semaphore.h +++ b/lib/libc/include/powerpc64le-linux-gnu/bits/semaphore.h @@ -1,5 +1,5 @@ /* Machine-specific POSIX semaphore type layouts. PowerPC 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. Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SEMAPHORE_H # error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead." diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/setjmp.h b/lib/libc/include/powerpc64le-linux-gnu/bits/setjmp.h index 1705da061c..b0d5e53478 100644 --- a/lib/libc/include/powerpc64le-linux-gnu/bits/setjmp.h +++ b/lib/libc/include/powerpc64le-linux-gnu/bits/setjmp.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* Define the machine-dependent type `jmp_buf'. PowerPC version. */ #ifndef _BITS_SETJMP_H diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/shm-pad.h b/lib/libc/include/powerpc64le-linux-gnu/bits/shm-pad.h index 7cf2c0d72d..950fc7d5b5 100644 --- a/lib/libc/include/powerpc64le-linux-gnu/bits/shm-pad.h +++ b/lib/libc/include/powerpc64le-linux-gnu/bits/shm-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct shmid_ds. PowerPC 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SHM_H # error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead." diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/sigstack.h b/lib/libc/include/powerpc64le-linux-gnu/bits/sigstack.h index f3029e811a..7d28d61692 100644 --- a/lib/libc/include/powerpc64le-linux-gnu/bits/sigstack.h +++ b/lib/libc/include/powerpc64le-linux-gnu/bits/sigstack.h @@ -1,5 +1,5 @@ /* sigstack, sigaltstack definitions. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGSTACK_H #define _BITS_SIGSTACK_H 1 diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/socket-constants.h b/lib/libc/include/powerpc64le-linux-gnu/bits/socket-constants.h index 705f575fe0..ad54f32304 100644 --- a/lib/libc/include/powerpc64le-linux-gnu/bits/socket-constants.h +++ b/lib/libc/include/powerpc64le-linux-gnu/bits/socket-constants.h @@ -1,5 +1,5 @@ /* Socket constants which vary among Linux architectures. Version for POWER. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SOCKET_H # error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead." diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/stat.h b/lib/libc/include/powerpc64le-linux-gnu/bits/stat.h index 38c4d2425c..9daf5a5c56 100644 --- a/lib/libc/include/powerpc64le-linux-gnu/bits/stat.h +++ b/lib/libc/include/powerpc64le-linux-gnu/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead." diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/struct_mutex.h b/lib/libc/include/powerpc64le-linux-gnu/bits/struct_mutex.h new file mode 100644 index 0000000000..40b5c891ec --- /dev/null +++ b/lib/libc/include/powerpc64le-linux-gnu/bits/struct_mutex.h @@ -0,0 +1,63 @@ +/* PowerPC internal mutex struct definitions. + 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _THREAD_MUTEX_INTERNAL_H +#define _THREAD_MUTEX_INTERNAL_H 1 + +struct __pthread_mutex_s +{ + int __lock; + unsigned int __count; + int __owner; +#if __WORDSIZE == 64 + unsigned int __nusers; +#endif + /* KIND must stay at this position in the structure to maintain + binary compatibility with static initializers. */ + int __kind; +#if __WORDSIZE == 64 + short __spins; + short __elision; + __pthread_list_t __list; +# define __PTHREAD_MUTEX_HAVE_PREV 1 +#else + unsigned int __nusers; + __extension__ union + { + struct + { + short __espins; + short __elision; +# define __spins __elision_data.__espins +# define __elision __elision_data.__elision + } __elision_data; + __pthread_slist_t __list; + }; +# define __PTHREAD_MUTEX_HAVE_PREV 0 +#endif +}; + +#if __WORDSIZE == 64 +# define __PTHREAD_MUTEX_INITIALIZER(__kind) \ + 0, 0, 0, 0, __kind, 0, 0, { 0, 0 } +#else +# define __PTHREAD_MUTEX_INITIALIZER(__kind) \ + 0, 0, 0, __kind, 0, { { 0, 0 } } +#endif + +#endif
\ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/pthreadtypes-arch.h b/lib/libc/include/powerpc64le-linux-gnu/bits/struct_rwlock.h index 883306d2e8..7ab9afe0ee 100644 --- a/lib/libc/include/powerpc64le-linux-gnu/bits/pthreadtypes-arch.h +++ b/lib/libc/include/powerpc64le-linux-gnu/bits/struct_rwlock.h @@ -1,5 +1,6 @@ -/* Machine-specific pthread type layouts. PowerPC version. - Copyright (C) 2003-2019 Free Software Foundation, Inc. +/* PowerPC internal rwlock struct definitions. + 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 @@ -16,37 +17,8 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#ifndef _BITS_PTHREADTYPES_ARCH_H -#define _BITS_PTHREADTYPES_ARCH_H 1 - -#include <bits/wordsize.h> - -#if __WORDSIZE == 64 -# define __SIZEOF_PTHREAD_MUTEX_T 40 -# define __SIZEOF_PTHREAD_ATTR_T 56 -# define __SIZEOF_PTHREAD_RWLOCK_T 56 -# define __SIZEOF_PTHREAD_BARRIER_T 32 -#else -# define __SIZEOF_PTHREAD_MUTEX_T 24 -# define __SIZEOF_PTHREAD_ATTR_T 36 -# define __SIZEOF_PTHREAD_RWLOCK_T 32 -# define __SIZEOF_PTHREAD_BARRIER_T 20 -#endif -#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 -#define __SIZEOF_PTHREAD_COND_T 48 -#define __SIZEOF_PTHREAD_CONDATTR_T 4 -#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 -#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND (__WORDSIZE != 64) -#define __PTHREAD_MUTEX_USE_UNION (__WORDSIZE != 64) - -#define __LOCK_ALIGNMENT -#define __ONCE_ALIGNMENT +#ifndef _RWLOCK_INTERNAL_H +#define _RWLOCK_INTERNAL_H struct __pthread_rwlock_arch_t { @@ -78,4 +50,12 @@ struct __pthread_rwlock_arch_t #endif }; -#endif /* bits/pthreadtypes.h */
\ No newline at end of file +#if __WORDSIZE == 64 +# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \ + 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, __flags +#else +# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \ + 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, 0, __flags, 0 +#endif + +#endif
\ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/termios-baud.h b/lib/libc/include/powerpc64le-linux-gnu/bits/termios-baud.h index 98c3cab88c..45a0dd450d 100644 --- a/lib/libc/include/powerpc64le-linux-gnu/bits/termios-baud.h +++ b/lib/libc/include/powerpc64le-linux-gnu/bits/termios-baud.h @@ -1,5 +1,5 @@ /* termios baud rate selection definitions. Linux/powerpc 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-baud.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/termios-c_cc.h b/lib/libc/include/powerpc64le-linux-gnu/bits/termios-c_cc.h index 3b9f240258..f4c30c87d2 100644 --- a/lib/libc/include/powerpc64le-linux-gnu/bits/termios-c_cc.h +++ b/lib/libc/include/powerpc64le-linux-gnu/bits/termios-c_cc.h @@ -1,5 +1,5 @@ /* termios c_cc symbolic constant definitions. Linux/powerpc 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-c_cc.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/termios-c_cflag.h b/lib/libc/include/powerpc64le-linux-gnu/bits/termios-c_cflag.h index 16869a7138..d63f19296f 100644 --- a/lib/libc/include/powerpc64le-linux-gnu/bits/termios-c_cflag.h +++ b/lib/libc/include/powerpc64le-linux-gnu/bits/termios-c_cflag.h @@ -1,5 +1,5 @@ /* termios control mode definitions. Linux/powerpc 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-c_cflag.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/termios-c_iflag.h b/lib/libc/include/powerpc64le-linux-gnu/bits/termios-c_iflag.h index b61f9af030..846bd192c4 100644 --- a/lib/libc/include/powerpc64le-linux-gnu/bits/termios-c_iflag.h +++ b/lib/libc/include/powerpc64le-linux-gnu/bits/termios-c_iflag.h @@ -1,5 +1,5 @@ /* termios input mode definitions. Linux/powerpc 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-c_iflags.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/termios-c_lflag.h b/lib/libc/include/powerpc64le-linux-gnu/bits/termios-c_lflag.h index 2abcbafdf5..aa3d3fe584 100644 --- a/lib/libc/include/powerpc64le-linux-gnu/bits/termios-c_lflag.h +++ b/lib/libc/include/powerpc64le-linux-gnu/bits/termios-c_lflag.h @@ -1,5 +1,5 @@ /* termios local mode definitions. Linux/powerpc version. - Copyright (C) 2019i 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-c_lflag.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/termios-c_oflag.h b/lib/libc/include/powerpc64le-linux-gnu/bits/termios-c_oflag.h index ca06aad4f7..bdac69b5ad 100644 --- a/lib/libc/include/powerpc64le-linux-gnu/bits/termios-c_oflag.h +++ b/lib/libc/include/powerpc64le-linux-gnu/bits/termios-c_oflag.h @@ -1,5 +1,5 @@ /* termios output mode definitions. Linux/powerpc 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-c_oflag.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/termios-misc.h b/lib/libc/include/powerpc64le-linux-gnu/bits/termios-misc.h index 369feac2d0..1053139360 100644 --- a/lib/libc/include/powerpc64le-linux-gnu/bits/termios-misc.h +++ b/lib/libc/include/powerpc64le-linux-gnu/bits/termios-misc.h @@ -1,5 +1,5 @@ /* termios baud platform specific definitions. Linux/powerpc 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-misc.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/powerpc64le-linux-gnu/fpu_control.h b/lib/libc/include/powerpc64le-linux-gnu/fpu_control.h index db5055a812..06ef01bde1 100644 --- a/lib/libc/include/powerpc64le-linux-gnu/fpu_control.h +++ b/lib/libc/include/powerpc64le-linux-gnu/fpu_control.h @@ -1,5 +1,5 @@ /* FPU control word definitions. PowerPC 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FPU_CONTROL_H #define _FPU_CONTROL_H diff --git a/lib/libc/include/powerpc64le-linux-gnu/ieee754.h b/lib/libc/include/powerpc64le-linux-gnu/ieee754.h index 918506bc96..dcdca2eb78 100644 --- a/lib/libc/include/powerpc64le-linux-gnu/ieee754.h +++ b/lib/libc/include/powerpc64le-linux-gnu/ieee754.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,14 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _IEEE754_H - #define _IEEE754_H 1 + #include <features.h> -#include <endian.h> +#include <bits/endian.h> __BEGIN_DECLS diff --git a/lib/libc/include/powerpc64le-linux-gnu/sys/ptrace.h b/lib/libc/include/powerpc64le-linux-gnu/sys/ptrace.h index cf05edb11d..d88fdeb5f4 100644 --- a/lib/libc/include/powerpc64le-linux-gnu/sys/ptrace.h +++ b/lib/libc/include/powerpc64le-linux-gnu/sys/ptrace.h @@ -1,5 +1,5 @@ /* `ptrace' debugger support interface. Linux/PowerPC version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PTRACE_H #define _SYS_PTRACE_H 1 @@ -38,6 +38,7 @@ __BEGIN_DECLS # undef PTRACE_GETREGSET # undef PTRACE_GETSIGINFO # undef PTRACE_GETSIGMASK +# undef PTRACE_GET_SYSCALL_INFO # undef PTRACE_GETVRREGS # undef PTRACE_GETVSRREGS # undef PTRACE_INTERRUPT @@ -65,6 +66,10 @@ __BEGIN_DECLS # undef PTRACE_SINGLEBLOCK # undef PTRACE_SINGLESTEP # undef PTRACE_SYSCALL +# undef PTRACE_SYSCALL_INFO_NONE +# undef PTRACE_SYSCALL_INFO_ENTRY +# undef PTRACE_SYSCALL_INFO_EXIT +# undef PTRACE_SYSCALL_INFO_SECCOMP # undef PTRACE_TRACEME #endif @@ -241,8 +246,12 @@ enum __ptrace_request #define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER /* Get seccomp BPF filter metadata. */ - PTRACE_SECCOMP_GET_METADATA = 0x420d + PTRACE_SECCOMP_GET_METADATA = 0x420d, #define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA + + /* Get information about system call. */ + PTRACE_GET_SYSCALL_INFO = 0x420e +#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO }; diff --git a/lib/libc/include/powerpc64le-linux-gnu/sys/ucontext.h b/lib/libc/include/powerpc64le-linux-gnu/sys/ucontext.h index 6655e12509..4be8bb5385 100644 --- a/lib/libc/include/powerpc64le-linux-gnu/sys/ucontext.h +++ b/lib/libc/include/powerpc64le-linux-gnu/sys/ucontext.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_UCONTEXT_H #define _SYS_UCONTEXT_H 1 @@ -75,12 +75,12 @@ typedef struct * a sigcontext. For older kernel (without Altivec) the sigcontext matches * the mcontext upto but not including the v_regs field. For kernels that * don't set AT_HWCAP or return AT_HWCAP without PPC_FEATURE_HAS_ALTIVEC the - * v_regs field may not exist and should not be referenced. The v_regd field - * can be refernced safely only after verifying that PPC_FEATURE_HAS_ALTIVEC + * v_regs field may not exist and should not be referenced. The v_regs field + * can be referenced safely only after verifying that PPC_FEATURE_HAS_ALTIVEC * is set in AT_HWCAP. */ /* Number of general registers. */ -# define __NGREG 48 /* includes r0-r31, nip, msr, lr, etc. */ +# define __NGREG 48 /* includes r0-r31, nip, msr, lr, etc. */ # define __NFPREG 33 /* includes fp0-fp31 &fpscr. */ # define __NVRREG 34 /* includes v0-v31, vscr, & vrsave in split vectors */ @@ -136,7 +136,7 @@ typedef struct { * either NULL (if this processor does not support the VMX feature) or the * address of the first quadword within the allocated (vmx_reserve) area. * - * The pointer (v_regs) of vector type (elf_vrreg_t) is essentually + * The pointer (v_regs) of vector type (elf_vrreg_t) is essentially * an array of 34 quadword entries. The entries with * indexes 0-31 contain the corresponding vector registers. The entry with * index 32 contains the vscr as the last word (offset 12) within the diff --git a/lib/libc/include/powerpc64le-linux-gnu/sys/user.h b/lib/libc/include/powerpc64le-linux-gnu/sys/user.h index 151aa48f53..0003f18811 100644 --- a/lib/libc/include/powerpc64le-linux-gnu/sys/user.h +++ b/lib/libc/include/powerpc64le-linux-gnu/sys/user.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_USER_H diff --git a/lib/libc/include/riscv64-linux-gnu/bits/endian.h b/lib/libc/include/riscv64-linux-gnu/bits/endian.h deleted file mode 100644 index ca77ccf806..0000000000 --- a/lib/libc/include/riscv64-linux-gnu/bits/endian.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef _ENDIAN_H -# error "Never use <bits/endian.h> directly; include <endian.h> instead." -#endif - -#define __BYTE_ORDER __LITTLE_ENDIAN
\ No newline at end of file diff --git a/lib/libc/include/riscv64-linux-gnu/bits/endianness.h b/lib/libc/include/riscv64-linux-gnu/bits/endianness.h new file mode 100644 index 0000000000..16a1549ca7 --- /dev/null +++ b/lib/libc/include/riscv64-linux-gnu/bits/endianness.h @@ -0,0 +1,11 @@ +#ifndef _BITS_ENDIANNESS_H +#define _BITS_ENDIANNESS_H 1 + +#ifndef _BITS_ENDIAN_H +# error "Never use <bits/endianness.h> directly; include <endian.h> instead." +#endif + +/* RISC-V is little-endian. */ +#define __BYTE_ORDER __LITTLE_ENDIAN + +#endif /* bits/endianness.h */
\ No newline at end of file diff --git a/lib/libc/include/riscv64-linux-gnu/bits/fcntl.h b/lib/libc/include/riscv64-linux-gnu/bits/fcntl.h index 08c1da6125..c72b6648aa 100644 --- a/lib/libc/include/riscv64-linux-gnu/bits/fcntl.h +++ b/lib/libc/include/riscv64-linux-gnu/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux / RISC-V. - 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. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FCNTL_H # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead." diff --git a/lib/libc/include/riscv64-linux-gnu/bits/fenv.h b/lib/libc/include/riscv64-linux-gnu/bits/fenv.h index f0c7e3ff45..1cfa3ad192 100644 --- a/lib/libc/include/riscv64-linux-gnu/bits/fenv.h +++ b/lib/libc/include/riscv64-linux-gnu/bits/fenv.h @@ -1,5 +1,5 @@ /* Floating point environment, RISC-V 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FENV_H # error "Never use <bits/fenv.h> directly; include <fenv.h> instead." @@ -65,7 +65,7 @@ typedef unsigned int fenv_t; /* If the default argument is used we use this value. */ #define FE_DFL_ENV ((__const fenv_t *) -1) -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) /* Type representing floating-point control modes. */ typedef unsigned int femode_t; diff --git a/lib/libc/include/riscv64-linux-gnu/bits/floatn.h b/lib/libc/include/riscv64-linux-gnu/bits/floatn.h index 5e7e3f4d2e..a4045e43a3 100644 --- a/lib/libc/include/riscv64-linux-gnu/bits/floatn.h +++ b/lib/libc/include/riscv64-linux-gnu/bits/floatn.h @@ -1,5 +1,5 @@ /* Macros to control TS 18661-3 glibc features on ldbl-128 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_FLOATN_H #define _BITS_FLOATN_H diff --git a/lib/libc/include/riscv64-linux-gnu/bits/link.h b/lib/libc/include/riscv64-linux-gnu/bits/link.h index 0e5bab4b0a..5ffe4fc4c4 100644 --- a/lib/libc/include/riscv64-linux-gnu/bits/link.h +++ b/lib/libc/include/riscv64-linux-gnu/bits/link.h @@ -1,5 +1,5 @@ /* Machine-specific declarations for dynamic linker interface. RISC-V 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _LINK_H # error "Never include <bits/link.h> directly; use <link.h> instead." diff --git a/lib/libc/include/riscv64-linux-gnu/bits/long-double.h b/lib/libc/include/riscv64-linux-gnu/bits/long-double.h index 12e30804a4..ce06962796 100644 --- a/lib/libc/include/riscv64-linux-gnu/bits/long-double.h +++ b/lib/libc/include/riscv64-linux-gnu/bits/long-double.h @@ -1,5 +1,5 @@ /* Properties of long double type. ldbl-128 version. - 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,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* long double is distinct from double, so there is nothing to - define here. */
\ No newline at end of file + define here. */ +#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file diff --git a/lib/libc/include/riscv64-linux-gnu/bits/procfs.h b/lib/libc/include/riscv64-linux-gnu/bits/procfs.h index 8625034641..e967fb281d 100644 --- a/lib/libc/include/riscv64-linux-gnu/bits/procfs.h +++ b/lib/libc/include/riscv64-linux-gnu/bits/procfs.h @@ -1,5 +1,5 @@ /* Types for registers for sys/procfs.h. RISC-V 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PROCFS_H # error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead." diff --git a/lib/libc/include/riscv64-linux-gnu/bits/pthreadtypes-arch.h b/lib/libc/include/riscv64-linux-gnu/bits/pthreadtypes-arch.h index 9eb39ee7dc..3bb9234ed1 100644 --- a/lib/libc/include/riscv64-linux-gnu/bits/pthreadtypes-arch.h +++ b/lib/libc/include/riscv64-linux-gnu/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_PTHREADTYPES_ARCH_H #define _BITS_PTHREADTYPES_ARCH_H 1 -#include <endian.h> +#include <bits/endian.h> #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 */
\ No newline at end of file diff --git a/lib/libc/include/riscv64-linux-gnu/bits/semaphore.h b/lib/libc/include/riscv64-linux-gnu/bits/semaphore.h index d9a849248e..7277c658e8 100644 --- a/lib/libc/include/riscv64-linux-gnu/bits/semaphore.h +++ b/lib/libc/include/riscv64-linux-gnu/bits/semaphore.h @@ -1,5 +1,5 @@ /* Machine-specific POSIX semaphore type layouts. RISC-V 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SEMAPHORE_H # error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead." diff --git a/lib/libc/include/riscv64-linux-gnu/bits/setjmp.h b/lib/libc/include/riscv64-linux-gnu/bits/setjmp.h index 8e08e99fa7..9413cc01d2 100644 --- a/lib/libc/include/riscv64-linux-gnu/bits/setjmp.h +++ b/lib/libc/include/riscv64-linux-gnu/bits/setjmp.h @@ -1,5 +1,5 @@ /* Define the machine-dependent type `jmp_buf'. 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,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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _RISCV_BITS_SETJMP_H #define _RISCV_BITS_SETJMP_H diff --git a/lib/libc/include/riscv64-linux-gnu/bits/sigcontext.h b/lib/libc/include/riscv64-linux-gnu/bits/sigcontext.h index 767744f947..65693f5954 100644 --- a/lib/libc/include/riscv64-linux-gnu/bits/sigcontext.h +++ b/lib/libc/include/riscv64-linux-gnu/bits/sigcontext.h @@ -1,5 +1,5 @@ /* Machine-dependent signal context structure for Linux. RISC-V version. - Copyright (C) 1996-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. + 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 modify it under the terms of the GNU Lesser General Public @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGCONTEXT_H #define _BITS_SIGCONTEXT_H 1 diff --git a/lib/libc/include/riscv64-linux-gnu/bits/stat.h b/lib/libc/include/riscv64-linux-gnu/bits/stat.h index 4f23077263..2df73d11e3 100644 --- a/lib/libc/include/riscv64-linux-gnu/bits/stat.h +++ b/lib/libc/include/riscv64-linux-gnu/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 <cmetcalf@tilera.com>, 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead." @@ -23,7 +23,7 @@ #ifndef _BITS_STAT_H #define _BITS_STAT_H 1 -#include <endian.h> +#include <bits/endian.h> #include <bits/wordsize.h> /* 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/include/riscv64-linux-gnu/bits/statfs.h b/lib/libc/include/riscv64-linux-gnu/bits/statfs.h index 8da970d4a9..61c27388e9 100644 --- a/lib/libc/include/riscv64-linux-gnu/bits/statfs.h +++ b/lib/libc/include/riscv64-linux-gnu/bits/statfs.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 <cmetcalf@tilera.com>, 2011. @@ -14,13 +14,13 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_STATFS_H # error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead." #endif -#include <endian.h> +#include <bits/endian.h> #include <bits/types.h> #include <bits/wordsize.h> @@ -34,7 +34,7 @@ #if defined __USE_FILE_OFFSET64 # define __field64(type, type64, name) type64 name -#elif __WORDSIZE == 64 +#elif __WORDSIZE == 64 || __STATFS_MATCHES_STATFS64 # define __field64(type, type64, name) type name #elif __BYTE_ORDER == __LITTLE_ENDIAN # define __field64(type, type64, name) \ diff --git a/lib/libc/include/riscv64-linux-gnu/bits/struct_rwlock.h b/lib/libc/include/riscv64-linux-gnu/bits/struct_rwlock.h new file mode 100644 index 0000000000..46d00e138a --- /dev/null +++ b/lib/libc/include/riscv64-linux-gnu/bits/struct_rwlock.h @@ -0,0 +1,45 @@ +/* RISC-V internal rwlock struct definitions. + 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _RWLOCK_INTERNAL_H +#define _RWLOCK_INTERNAL_H + +/* 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_INITIALIZER(__flags) \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags + +#endif
\ No newline at end of file diff --git a/lib/libc/include/riscv64-linux-gnu/bits/typesizes.h b/lib/libc/include/riscv64-linux-gnu/bits/typesizes.h index 8cfcacef57..d9e9b274ac 100644 --- a/lib/libc/include/riscv64-linux-gnu/bits/typesizes.h +++ b/lib/libc/include/riscv64-linux-gnu/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 <cmetcalf@tilera.com>, 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_TYPES_H # error "Never include <bits/typesizes.h> directly; use <sys/types.h> 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/include/riscv64-linux-gnu/bits/wordsize.h b/lib/libc/include/riscv64-linux-gnu/bits/wordsize.h index db13f746a1..1c5e427762 100644 --- a/lib/libc/include/riscv64-linux-gnu/bits/wordsize.h +++ b/lib/libc/include/riscv64-linux-gnu/bits/wordsize.h @@ -1,5 +1,5 @@ /* Determine the wordsize from the preprocessor defines. RISC-V 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if __riscv_xlen == (__SIZEOF_POINTER__ * 8) # define __WORDSIZE __riscv_xlen diff --git a/lib/libc/include/riscv64-linux-gnu/fpu_control.h b/lib/libc/include/riscv64-linux-gnu/fpu_control.h index 4647e5c877..4aeb6aa44b 100644 --- a/lib/libc/include/riscv64-linux-gnu/fpu_control.h +++ b/lib/libc/include/riscv64-linux-gnu/fpu_control.h @@ -1,5 +1,5 @@ /* FPU control word bits. RISC-V 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FPU_CONTROL_H #define _FPU_CONTROL_H diff --git a/lib/libc/include/riscv64-linux-gnu/ieee754.h b/lib/libc/include/riscv64-linux-gnu/ieee754.h index e347e4a6e5..63fa9c5fce 100644 --- a/lib/libc/include/riscv64-linux-gnu/ieee754.h +++ b/lib/libc/include/riscv64-linux-gnu/ieee754.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,14 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _IEEE754_H - #define _IEEE754_H 1 + #include <features.h> -#include <endian.h> +#include <bits/endian.h> __BEGIN_DECLS diff --git a/lib/libc/include/riscv64-linux-gnu/sys/asm.h b/lib/libc/include/riscv64-linux-gnu/sys/asm.h index c42716a9fe..01c6095c69 100644 --- a/lib/libc/include/riscv64-linux-gnu/sys/asm.h +++ b/lib/libc/include/riscv64-linux-gnu/sys/asm.h @@ -1,5 +1,5 @@ /* Miscellaneous macros. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_ASM_H #define _SYS_ASM_H diff --git a/lib/libc/include/riscv64-linux-gnu/sys/cachectl.h b/lib/libc/include/riscv64-linux-gnu/sys/cachectl.h index bd18c3c657..7d627edf2c 100644 --- a/lib/libc/include/riscv64-linux-gnu/sys/cachectl.h +++ b/lib/libc/include/riscv64-linux-gnu/sys/cachectl.h @@ -1,5 +1,5 @@ /* RISC-V instruction cache flushing interface - 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. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_CACHECTL_H #define _SYS_CACHECTL_H 1 diff --git a/lib/libc/include/riscv64-linux-gnu/sys/ucontext.h b/lib/libc/include/riscv64-linux-gnu/sys/ucontext.h index 5fc777e662..5d7aeabad1 100644 --- a/lib/libc/include/riscv64-linux-gnu/sys/ucontext.h +++ b/lib/libc/include/riscv64-linux-gnu/sys/ucontext.h @@ -1,5 +1,5 @@ /* struct ucontext definition, RISC-V version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* Don't rely on this, the interface is currently messed up and may need to be broken to be fixed. */ diff --git a/lib/libc/include/riscv64-linux-gnu/sys/user.h b/lib/libc/include/riscv64-linux-gnu/sys/user.h index 5dbff3ead6..6e235050f8 100644 --- a/lib/libc/include/riscv64-linux-gnu/sys/user.h +++ b/lib/libc/include/riscv64-linux-gnu/sys/user.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,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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_USER_H #define _SYS_USER_H 1 diff --git a/lib/libc/include/s390x-linux-gnu/bits/elfclass.h b/lib/libc/include/s390x-linux-gnu/bits/elfclass.h index 6c9777de93..524c41cc78 100644 --- a/lib/libc/include/s390x-linux-gnu/bits/elfclass.h +++ b/lib/libc/include/s390x-linux-gnu/bits/elfclass.h @@ -1,4 +1,4 @@ -/* 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. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* This file specifies the native word size of the machine, which indicates the ELF file class used for executables and shared objects on this diff --git a/lib/libc/include/s390x-linux-gnu/bits/endian.h b/lib/libc/include/s390x-linux-gnu/bits/endian.h deleted file mode 100644 index ae6a488342..0000000000 --- a/lib/libc/include/s390x-linux-gnu/bits/endian.h +++ /dev/null @@ -1,7 +0,0 @@ -/* s390 is big-endian */ - -#ifndef _ENDIAN_H -# error "Never use <bits/endian.h> directly; include <endian.h> instead." -#endif - -#define __BYTE_ORDER __BIG_ENDIAN
\ No newline at end of file diff --git a/lib/libc/include/s390x-linux-gnu/bits/endianness.h b/lib/libc/include/s390x-linux-gnu/bits/endianness.h new file mode 100644 index 0000000000..00f80f030e --- /dev/null +++ b/lib/libc/include/s390x-linux-gnu/bits/endianness.h @@ -0,0 +1,11 @@ +#ifndef _BITS_ENDIANNESS_H +#define _BITS_ENDIANNESS_H 1 + +#ifndef _BITS_ENDIAN_H +# error "Never use <bits/endianness.h> directly; include <endian.h> instead." +#endif + +/* S/390 is big-endian. */ +#define __BYTE_ORDER __BIG_ENDIAN + +#endif /* bits/endianness.h */
\ No newline at end of file diff --git a/lib/libc/include/s390x-linux-gnu/bits/environments.h b/lib/libc/include/s390x-linux-gnu/bits/environments.h index 6b6be99ad1..ceb249aa7f 100644 --- a/lib/libc/include/s390x-linux-gnu/bits/environments.h +++ b/lib/libc/include/s390x-linux-gnu/bits/environments.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _UNISTD_H # error "Never include this file directly. Use <unistd.h> instead" diff --git a/lib/libc/include/s390x-linux-gnu/bits/fcntl.h b/lib/libc/include/s390x-linux-gnu/bits/fcntl.h index 5280364236..1e8b1bdde6 100644 --- a/lib/libc/include/s390x-linux-gnu/bits/fcntl.h +++ b/lib/libc/include/s390x-linux-gnu/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FCNTL_H # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead." diff --git a/lib/libc/include/s390x-linux-gnu/bits/fenv.h b/lib/libc/include/s390x-linux-gnu/bits/fenv.h index 8183b9190c..281e760819 100644 --- a/lib/libc/include/s390x-linux-gnu/bits/fenv.h +++ b/lib/libc/include/s390x-linux-gnu/bits/fenv.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 Denis Joseph Barrow <djbarrow@de.ibm.com>. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FENV_H # error "Never use <bits/fenv.h> directly; include <fenv.h> instead." @@ -91,7 +91,7 @@ typedef struct # define FE_NOMASK_ENV ((const fenv_t *) -2) #endif -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) /* Type representing floating-point control modes. */ typedef unsigned int femode_t; diff --git a/lib/libc/include/s390x-linux-gnu/bits/floatn.h b/lib/libc/include/s390x-linux-gnu/bits/floatn.h index 5e7e3f4d2e..a4045e43a3 100644 --- a/lib/libc/include/s390x-linux-gnu/bits/floatn.h +++ b/lib/libc/include/s390x-linux-gnu/bits/floatn.h @@ -1,5 +1,5 @@ /* Macros to control TS 18661-3 glibc features on ldbl-128 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_FLOATN_H #define _BITS_FLOATN_H diff --git a/lib/libc/include/s390x-linux-gnu/bits/flt-eval-method.h b/lib/libc/include/s390x-linux-gnu/bits/flt-eval-method.h index 113d0c95bf..476c45e684 100644 --- a/lib/libc/include/s390x-linux-gnu/bits/flt-eval-method.h +++ b/lib/libc/include/s390x-linux-gnu/bits/flt-eval-method.h @@ -1,5 +1,5 @@ /* Define __GLIBC_FLT_EVAL_METHOD. S/390 version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _MATH_H # error "Never use <bits/flt-eval-method.h> directly; include <math.h> instead." diff --git a/lib/libc/include/s390x-linux-gnu/bits/hwcap.h b/lib/libc/include/s390x-linux-gnu/bits/hwcap.h index 76ab321e19..02ed6bc98c 100644 --- a/lib/libc/include/s390x-linux-gnu/bits/hwcap.h +++ b/lib/libc/include/s390x-linux-gnu/bits/hwcap.h @@ -1,5 +1,5 @@ /* Defines for bits in AT_HWCAP. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_AUXV_H # error "Never include <bits/hwcap.h> directly; use <sys/auxv.h> instead." diff --git a/lib/libc/include/s390x-linux-gnu/bits/ipc.h b/lib/libc/include/s390x-linux-gnu/bits/ipc.h deleted file mode 100644 index 70d5293edc..0000000000 --- a/lib/libc/include/s390x-linux-gnu/bits/ipc.h +++ /dev/null @@ -1,60 +0,0 @@ -/* Copyright (C) 2001-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 - <http://www.gnu.org/licenses/>. */ - -#ifndef _SYS_IPC_H -# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead." -#endif - -#include <bits/types.h> -#include <bits/wordsize.h> - -/* Mode bits for `msgget', `semget', and `shmget'. */ -#define IPC_CREAT 01000 /* Create key if key does not exist. */ -#define IPC_EXCL 02000 /* Fail if key exists. */ -#define IPC_NOWAIT 04000 /* Return error on wait. */ - -/* Control commands for `msgctl', `semctl', and `shmctl'. */ -#define IPC_RMID 0 /* Remove identifier. */ -#define IPC_SET 1 /* Set `ipc_perm' options. */ -#define IPC_STAT 2 /* Get `ipc_perm' options. */ -#ifdef __USE_GNU -#define IPC_INFO 3 /* See ipcs. */ -#endif - -/* Special key values. */ -#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ - - -/* Data structure used to pass permission information to IPC operations. */ -struct ipc_perm - { - __key_t __key; /* Key. */ - __uid_t uid; /* Owner's user ID. */ - __gid_t gid; /* Owner's group ID. */ - __uid_t cuid; /* Creator's user ID. */ - __gid_t cgid; /* Creator's group ID. */ -#if __WORDSIZE == 64 - __mode_t mode; /* Read/write permission. */ -#else - unsigned short int mode; /* Read/write permission. */ - unsigned short int __pad1; -#endif - unsigned short int __seq; /* Sequence number. */ - unsigned short int __pad2; - unsigned long int __glibc_reserved1; - unsigned long int __glibc_reserved2; - };
\ No newline at end of file diff --git a/lib/libc/include/s390x-linux-gnu/bits/link.h b/lib/libc/include/s390x-linux-gnu/bits/link.h index 04d7a5e453..e9497e85b7 100644 --- a/lib/libc/include/s390x-linux-gnu/bits/link.h +++ b/lib/libc/include/s390x-linux-gnu/bits/link.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _LINK_H # error "Never include <bits/link.h> directly; use <link.h> instead." diff --git a/lib/libc/include/s390x-linux-gnu/bits/long-double.h b/lib/libc/include/s390x-linux-gnu/bits/long-double.h index 9fe5a6c570..391f7d62fe 100644 --- a/lib/libc/include/s390x-linux-gnu/bits/long-double.h +++ b/lib/libc/include/s390x-linux-gnu/bits/long-double.h @@ -1,5 +1,5 @@ /* Properties of long double type. ldbl-opt version. - 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,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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef __NO_LONG_DOUBLE_MATH # define __LONG_DOUBLE_MATH_OPTIONAL 1 # ifndef __LONG_DOUBLE_128__ # define __NO_LONG_DOUBLE_MATH 1 # endif -#endif
\ No newline at end of file +#endif +#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file diff --git a/lib/libc/include/s390x-linux-gnu/bits/procfs-extra.h b/lib/libc/include/s390x-linux-gnu/bits/procfs-extra.h index 64ea29c420..b7893aa175 100644 --- a/lib/libc/include/s390x-linux-gnu/bits/procfs-extra.h +++ b/lib/libc/include/s390x-linux-gnu/bits/procfs-extra.h @@ -1,5 +1,5 @@ /* Extra sys/procfs.h definitions. S/390 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PROCFS_H # error "Never include <bits/procfs-extra.h> directly; use <sys/procfs.h> instead." diff --git a/lib/libc/include/s390x-linux-gnu/bits/procfs-id.h b/lib/libc/include/s390x-linux-gnu/bits/procfs-id.h index e891c80b06..16f571fbce 100644 --- a/lib/libc/include/s390x-linux-gnu/bits/procfs-id.h +++ b/lib/libc/include/s390x-linux-gnu/bits/procfs-id.h @@ -1,5 +1,5 @@ /* Types of pr_uid and pr_gid in struct elf_prpsinfo. S/390 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. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PROCFS_H # error "Never include <bits/procfs-id.h> directly; use <sys/procfs.h> instead." diff --git a/lib/libc/include/s390x-linux-gnu/bits/procfs.h b/lib/libc/include/s390x-linux-gnu/bits/procfs.h index 4b1540813a..e992e8cc1b 100644 --- a/lib/libc/include/s390x-linux-gnu/bits/procfs.h +++ b/lib/libc/include/s390x-linux-gnu/bits/procfs.h @@ -1,5 +1,5 @@ /* Types for registers for sys/procfs.h. S/390 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PROCFS_H # error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead." diff --git a/lib/libc/include/s390x-linux-gnu/bits/semaphore.h b/lib/libc/include/s390x-linux-gnu/bits/semaphore.h index ee86f96737..d99eca3d90 100644 --- a/lib/libc/include/s390x-linux-gnu/bits/semaphore.h +++ b/lib/libc/include/s390x-linux-gnu/bits/semaphore.h @@ -1,4 +1,4 @@ -/* 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. Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 2003. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SEMAPHORE_H # error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead." diff --git a/lib/libc/include/s390x-linux-gnu/bits/setjmp.h b/lib/libc/include/s390x-linux-gnu/bits/setjmp.h index 51768deac7..33f1db4708 100644 --- a/lib/libc/include/s390x-linux-gnu/bits/setjmp.h +++ b/lib/libc/include/s390x-linux-gnu/bits/setjmp.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* Define the machine-dependent type `jmp_buf'. IBM s390 version. */ diff --git a/lib/libc/include/s390x-linux-gnu/bits/sigaction.h b/lib/libc/include/s390x-linux-gnu/bits/sigaction.h index 9134fa13a1..9fceeaf6f7 100644 --- a/lib/libc/include/s390x-linux-gnu/bits/sigaction.h +++ b/lib/libc/include/s390x-linux-gnu/bits/sigaction.h @@ -1,5 +1,5 @@ /* Definitions for 31 & 64 bit S/390 sigaction. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGACTION_H #define _BITS_SIGACTION_H 1 diff --git a/lib/libc/include/s390x-linux-gnu/bits/stat.h b/lib/libc/include/s390x-linux-gnu/bits/stat.h index af5edf36d9..ef5b2504fc 100644 --- a/lib/libc/include/s390x-linux-gnu/bits/stat.h +++ b/lib/libc/include/s390x-linux-gnu/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead." diff --git a/lib/libc/include/s390x-linux-gnu/bits/statfs.h b/lib/libc/include/s390x-linux-gnu/bits/statfs.h index 693968e556..d592a33352 100644 --- a/lib/libc/include/s390x-linux-gnu/bits/statfs.h +++ b/lib/libc/include/s390x-linux-gnu/bits/statfs.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_STATFS_H # error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead." diff --git a/lib/libc/include/s390x-linux-gnu/bits/struct_mutex.h b/lib/libc/include/s390x-linux-gnu/bits/struct_mutex.h new file mode 100644 index 0000000000..f81c2fbb3f --- /dev/null +++ b/lib/libc/include/s390x-linux-gnu/bits/struct_mutex.h @@ -0,0 +1,63 @@ +/* S390 internal mutex struct definitions. + 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _THREAD_MUTEX_INTERNAL_H +#define _THREAD_MUTEX_INTERNAL_H 1 + +struct __pthread_mutex_s +{ + int __lock; + unsigned int __count; + int __owner; +#if __WORDSIZE == 64 + unsigned int __nusers; +#endif + /* KIND must stay at this position in the structure to maintain + binary compatibility with static initializers. */ + int __kind; +#if __WORDSIZE == 64 + short __spins; + short __elision; + __pthread_list_t __list; +# define __PTHREAD_MUTEX_HAVE_PREV 1 +#else + unsigned int __nusers; + __extension__ union + { + struct + { + short __espins; + short __elision; + } _d; +# define __spins _d.__espins +# define __elision _d.__elision + __pthread_slist_t __list; + }; +# define __PTHREAD_MUTEX_HAVE_PREV 0 +#endif +}; + +#if __WORDSIZE == 64 +# define __PTHREAD_MUTEX_INITIALIZER(__kind) \ + 0, 0, 0, 0, __kind, 0, 0, { 0, 0 } +#else +# define __PTHREAD_MUTEX_INITIALIZER(__kind) \ + 0, 0, 0, __kind, 0, { { 0, 0 } } +#endif + +#endif
\ No newline at end of file diff --git a/lib/libc/include/s390x-linux-gnu/bits/pthreadtypes-arch.h b/lib/libc/include/s390x-linux-gnu/bits/struct_rwlock.h index f956573147..e0f5109d4f 100644 --- a/lib/libc/include/s390x-linux-gnu/bits/pthreadtypes-arch.h +++ b/lib/libc/include/s390x-linux-gnu/bits/struct_rwlock.h @@ -1,4 +1,6 @@ -/* Copyright (C) 2003-2019 Free Software Foundation, Inc. +/* S390 internal rwlock struct definitions. + 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 @@ -15,37 +17,8 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#ifndef _BITS_PTHREADTYPES_ARCH_H -#define _BITS_PTHREADTYPES_ARCH_H 1 - -#include <bits/wordsize.h> - -#if __WORDSIZE == 64 -# 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_ATTR_T 36 -# define __SIZEOF_PTHREAD_MUTEX_T 24 -# define __SIZEOF_PTHREAD_RWLOCK_T 32 -# define __SIZEOF_PTHREAD_BARRIER_T 20 -#endif -#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 -#define __SIZEOF_PTHREAD_CONDATTR_T 4 -#define __SIZEOF_PTHREAD_COND_T 48 -#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 -#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND (__WORDSIZE != 64) -#define __PTHREAD_MUTEX_USE_UNION (__WORDSIZE != 64) - -#define __LOCK_ALIGNMENT -#define __ONCE_ALIGNMENT +#ifndef _RWLOCK_INTERNAL_H +#define _RWLOCK_INTERNAL_H struct __pthread_rwlock_arch_t { @@ -74,6 +47,12 @@ struct __pthread_rwlock_arch_t #endif }; -#define __PTHREAD_RWLOCK_ELISION_EXTRA 0 +#if __WORDSIZE == 64 +# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags +#else +# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags, 0 +#endif -#endif /* bits/pthreadtypes.h */
\ No newline at end of file +#endif
\ No newline at end of file diff --git a/lib/libc/include/s390x-linux-gnu/bits/typesizes.h b/lib/libc/include/s390x-linux-gnu/bits/typesizes.h index 0db5047dae..d31219c155 100644 --- a/lib/libc/include/s390x-linux-gnu/bits/typesizes.h +++ b/lib/libc/include/s390x-linux-gnu/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_TYPES_H # error "Never include <bits/typesizes.h> directly; use <sys/types.h> 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/include/s390x-linux-gnu/bits/utmp.h b/lib/libc/include/s390x-linux-gnu/bits/utmp.h index 4476231443..e74481f3cf 100644 --- a/lib/libc/include/s390x-linux-gnu/bits/utmp.h +++ b/lib/libc/include/s390x-linux-gnu/bits/utmp.h @@ -1,5 +1,5 @@ /* The `struct utmp' type, describing entries in the utmp file. GNU version. - 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. 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _UTMP_H # error "Never include <bits/utmp.h> directly; use <utmp.h> instead." @@ -61,7 +61,8 @@ struct utmp pid_t ut_pid; /* Process ID of login process. */ char ut_line[UT_LINESIZE] __attribute_nonstring__; /* Devicename. */ - char ut_id[4]; /* Inittab ID. */ + char ut_id[4] + __attribute_nonstring__; /* Inittab ID. */ char ut_user[UT_NAMESIZE] __attribute_nonstring__; /* Username. */ char ut_host[UT_HOSTSIZE] diff --git a/lib/libc/include/s390x-linux-gnu/bits/utmpx.h b/lib/libc/include/s390x-linux-gnu/bits/utmpx.h index d498d9f115..9466c4b530 100644 --- a/lib/libc/include/s390x-linux-gnu/bits/utmpx.h +++ b/lib/libc/include/s390x-linux-gnu/bits/utmpx.h @@ -1,5 +1,5 @@ /* Structures and definitions for the user accounting database. GNU version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _UTMPX_H # error "Never include <bits/utmpx.h> directly; use <utmpx.h> instead." @@ -56,10 +56,14 @@ struct utmpx { short int ut_type; /* Type of login. */ __pid_t ut_pid; /* Process ID of login process. */ - char ut_line[__UT_LINESIZE]; /* Devicename. */ - char ut_id[4]; /* Inittab ID. */ - char ut_user[__UT_NAMESIZE]; /* Username. */ - char ut_host[__UT_HOSTSIZE]; /* Hostname for remote login. */ + char ut_line[__UT_LINESIZE] + __attribute_nonstring__; /* Devicename. */ + char ut_id[4] + __attribute_nonstring__; /* Inittab ID. */ + char ut_user[__UT_NAMESIZE] + __attribute_nonstring__; /* Username. */ + char ut_host[__UT_HOSTSIZE] + __attribute_nonstring__; /* Hostname for remote login. */ struct __exit_status ut_exit; /* Exit status of a process marked as DEAD_PROCESS. */ diff --git a/lib/libc/include/s390x-linux-gnu/fpu_control.h b/lib/libc/include/s390x-linux-gnu/fpu_control.h index 8418548900..3ca492fd63 100644 --- a/lib/libc/include/s390x-linux-gnu/fpu_control.h +++ b/lib/libc/include/s390x-linux-gnu/fpu_control.h @@ -1,5 +1,5 @@ /* FPU control word definitions. Stub version. - Copyright (C) 2000-2019 Free Software Foundation, Inc. + Copyright (C) 2000-2020 Free Software Foundation, Inc. Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com) and Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of the GNU C Library. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FPU_CONTROL_H #define _FPU_CONTROL_H diff --git a/lib/libc/include/s390x-linux-gnu/ieee754.h b/lib/libc/include/s390x-linux-gnu/ieee754.h index e347e4a6e5..63fa9c5fce 100644 --- a/lib/libc/include/s390x-linux-gnu/ieee754.h +++ b/lib/libc/include/s390x-linux-gnu/ieee754.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,14 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _IEEE754_H - #define _IEEE754_H 1 + #include <features.h> -#include <endian.h> +#include <bits/endian.h> __BEGIN_DECLS diff --git a/lib/libc/include/s390x-linux-gnu/sys/elf.h b/lib/libc/include/s390x-linux-gnu/sys/elf.h index 4a2e879b4a..3bdf93f1d0 100644 --- a/lib/libc/include/s390x-linux-gnu/sys/elf.h +++ b/lib/libc/include/s390x-linux-gnu/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_ELF_H #define _SYS_ELF_H 1 diff --git a/lib/libc/include/s390x-linux-gnu/sys/ptrace.h b/lib/libc/include/s390x-linux-gnu/sys/ptrace.h index 8afedb8c56..50673a84a2 100644 --- a/lib/libc/include/s390x-linux-gnu/sys/ptrace.h +++ b/lib/libc/include/s390x-linux-gnu/sys/ptrace.h @@ -1,5 +1,5 @@ /* `ptrace' debugger support interface. Linux/S390 version. - Copyright (C) 2000-2019 Free Software Foundation, Inc. + Copyright (C) 2000-2020 Free Software Foundation, Inc. Contributed by Denis Joseph Barrow (djbarrow@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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PTRACE_H #define _SYS_PTRACE_H 1 @@ -79,6 +79,11 @@ __BEGIN_DECLS # undef PTRACE_EVENT_SECCOMP # undef PTRACE_EVENT_STOP # undef PTRACE_PEEKSIGINFO_SHARED +# undef PTRACE_GET_SYSCALL_INFO +# undef PTRACE_SYSCALL_INFO_NONE +# undef PTRACE_SYSCALL_INFO_ENTRY +# undef PTRACE_SYSCALL_INFO_EXIT +# undef PTRACE_SYSCALL_INFO_SECCOMP #endif /* Type of the REQUEST argument to `ptrace.' */ enum __ptrace_request @@ -198,6 +203,10 @@ enum __ptrace_request PTRACE_SECCOMP_GET_METADATA = 0x420d, #define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA + /* Get information about system call. */ + PTRACE_GET_SYSCALL_INFO = 0x420e, +#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO + PTRACE_PEEKUSR_AREA = 0x5000, #define PTRACE_PEEKUSR_AREA PTRACE_PEEKUSR_AREA diff --git a/lib/libc/include/s390x-linux-gnu/sys/ucontext.h b/lib/libc/include/s390x-linux-gnu/sys/ucontext.h index 8e22466eb7..fc83b2c8f2 100644 --- a/lib/libc/include/s390x-linux-gnu/sys/ucontext.h +++ b/lib/libc/include/s390x-linux-gnu/sys/ucontext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2019 Free Software Foundation, Inc. +/* Copyright (C) 2000-2020 Free Software Foundation, Inc. Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com). 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_UCONTEXT_H #define _SYS_UCONTEXT_H 1 diff --git a/lib/libc/include/s390x-linux-gnu/sys/user.h b/lib/libc/include/s390x-linux-gnu/sys/user.h index 30484f5f7f..19bbd0c40b 100644 --- a/lib/libc/include/s390x-linux-gnu/sys/user.h +++ b/lib/libc/include/s390x-linux-gnu/sys/user.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_USER_H #define _SYS_USER_H 1 diff --git a/lib/libc/glibc/sysdeps/sparc/bits/endian.h b/lib/libc/include/sparc-linux-gnu/bits/endianness.h index 8acfdf5df6..8b14090d0e 100644 --- a/lib/libc/glibc/sysdeps/sparc/bits/endian.h +++ b/lib/libc/include/sparc-linux-gnu/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 <bits/endian.h> directly; include <endian.h> instead." +#ifndef _BITS_ENDIAN_H +# error "Never use <bits/endianness.h> directly; include <endian.h> 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 */
\ No newline at end of file diff --git a/lib/libc/include/sparc-linux-gnu/bits/environments.h b/lib/libc/include/sparc-linux-gnu/bits/environments.h index 2e1c0bc1de..9134837e15 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/environments.h +++ b/lib/libc/include/sparc-linux-gnu/bits/environments.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _UNISTD_H # error "Never include this file directly. Use <unistd.h> instead" diff --git a/lib/libc/include/sparc-linux-gnu/bits/epoll.h b/lib/libc/include/sparc-linux-gnu/bits/epoll.h index a5ae26649b..b06a614334 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/epoll.h +++ b/lib/libc/include/sparc-linux-gnu/bits/epoll.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_EPOLL_H # error "Never use <bits/epoll.h> directly; include <sys/epoll.h> instead." diff --git a/lib/libc/include/sparc-linux-gnu/bits/errno.h b/lib/libc/include/sparc-linux-gnu/bits/errno.h index 8ef40090fb..d190a76817 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/errno.h +++ b/lib/libc/include/sparc-linux-gnu/bits/errno.h @@ -1,5 +1,5 @@ /* Error constants. Linux/Sparc specific 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_ERRNO_H #define _BITS_ERRNO_H 1 diff --git a/lib/libc/include/sparc-linux-gnu/bits/eventfd.h b/lib/libc/include/sparc-linux-gnu/bits/eventfd.h index 942ede19f7..a57ae6403d 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/eventfd.h +++ b/lib/libc/include/sparc-linux-gnu/bits/eventfd.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2019 Free Software Foundation, Inc. +/* Copyright (C) 2007-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_EVENTFD_H # error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead." diff --git a/lib/libc/include/sparc-linux-gnu/bits/fcntl.h b/lib/libc/include/sparc-linux-gnu/bits/fcntl.h index 903872d0b6..48e3da3472 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/fcntl.h +++ b/lib/libc/include/sparc-linux-gnu/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux/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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FCNTL_H # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead." diff --git a/lib/libc/include/sparc-linux-gnu/bits/fenv.h b/lib/libc/include/sparc-linux-gnu/bits/fenv.h index 5a9305af9f..408a29f7b6 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/fenv.h +++ b/lib/libc/include/sparc-linux-gnu/bits/fenv.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FENV_H # error "Never use <bits/fenv.h> directly; include <fenv.h> instead." @@ -92,7 +92,7 @@ typedef unsigned long int fenv_t; # define __fenv_ldfsr(X) __asm__ __volatile__ ("ld %0,%%fsr" : : "m" (X)) #endif -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) /* Type representing floating-point control modes. */ typedef unsigned long int femode_t; diff --git a/lib/libc/include/sparc-linux-gnu/bits/floatn.h b/lib/libc/include/sparc-linux-gnu/bits/floatn.h index 5e7e3f4d2e..a4045e43a3 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/floatn.h +++ b/lib/libc/include/sparc-linux-gnu/bits/floatn.h @@ -1,5 +1,5 @@ /* Macros to control TS 18661-3 glibc features on ldbl-128 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_FLOATN_H #define _BITS_FLOATN_H diff --git a/lib/libc/include/sparc-linux-gnu/bits/hwcap.h b/lib/libc/include/sparc-linux-gnu/bits/hwcap.h index a05d2b6a25..679ae54a2f 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/hwcap.h +++ b/lib/libc/include/sparc-linux-gnu/bits/hwcap.h @@ -1,5 +1,5 @@ /* Defines for bits in AT_HWCAP. - 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,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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined(_SYS_AUXV_H) && !defined(_SYSDEPS_SYSDEP_H) # error "Never include <bits/hwcap.h> directly; use <sys/auxv.h> instead." diff --git a/lib/libc/include/sparc-linux-gnu/bits/inotify.h b/lib/libc/include/sparc-linux-gnu/bits/inotify.h index 9042dd71bb..8d1caf93a2 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/inotify.h +++ b/lib/libc/include/sparc-linux-gnu/bits/inotify.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_INOTIFY_H # error "Never use <bits/inotify.h> directly; include <sys/inotify.h> instead." diff --git a/lib/libc/include/sparc-linux-gnu/bits/ioctls.h b/lib/libc/include/sparc-linux-gnu/bits/ioctls.h index 244d48193d..46ae087fe6 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/ioctls.h +++ b/lib/libc/include/sparc-linux-gnu/bits/ioctls.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_IOCTL_H # error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead." diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/ipc.h b/lib/libc/include/sparc-linux-gnu/bits/ipc-perm.h index abda8ba408..97839b1e72 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/ipc.h +++ b/lib/libc/include/sparc-linux-gnu/bits/ipc-perm.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1995-2019 Free Software Foundation, Inc. +/* struct ipc_perm definition. Linux/sparc version. + 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,32 +14,12 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_IPC_H -# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead." +# error "Never use <bits/ipc-perm.h> directly; include <sys/ipc.h> instead." #endif -#include <bits/types.h> -#include <bits/wordsize.h> - -/* Mode bits for `msgget', `semget', and `shmget'. */ -#define IPC_CREAT 01000 /* Create key if key does not exist. */ -#define IPC_EXCL 02000 /* Fail if key exists. */ -#define IPC_NOWAIT 04000 /* Return error on wait. */ - -/* Control commands for `msgctl', `semctl', and `shmctl'. */ -#define IPC_RMID 0 /* Remove identifier. */ -#define IPC_SET 1 /* Set `ipc_perm' options. */ -#define IPC_STAT 2 /* Get `ipc_perm' options. */ -#ifdef __USE_GNU -# define IPC_INFO 3 /* See ipcs. */ -#endif - -/* Special key values. */ -#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ - - /* Data structure used to pass permission information to IPC operations. */ struct ipc_perm { @@ -47,14 +28,8 @@ struct ipc_perm __gid_t gid; /* Owner's group ID. */ __uid_t cuid; /* Creator's user ID. */ __gid_t cgid; /* Creator's group ID. */ -#if __WORDSIZE == 32 - unsigned short int __pad1; - unsigned short int mode; /* Read/write permission. */ - unsigned short int __pad2; -#else __mode_t mode; /* Read/write permission. */ unsigned short int __pad1; -#endif unsigned short int __seq; /* Sequence number. */ __extension__ unsigned long long int __glibc_reserved1; __extension__ unsigned long long int __glibc_reserved2; diff --git a/lib/libc/include/sparc-linux-gnu/bits/link.h b/lib/libc/include/sparc-linux-gnu/bits/link.h index 05e2fe6aac..9ba62345c0 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/link.h +++ b/lib/libc/include/sparc-linux-gnu/bits/link.h @@ -1,5 +1,5 @@ /* Machine-specific audit interfaces for dynamic linker. SPARC 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _LINK_H # error "Never include <bits/link.h> directly; use <link.h> instead." diff --git a/lib/libc/include/sparc-linux-gnu/bits/local_lim.h b/lib/libc/include/sparc-linux-gnu/bits/local_lim.h index 0f3afc18be..b2c73b5ae5 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/local_lim.h +++ b/lib/libc/include/sparc-linux-gnu/bits/local_lim.h @@ -1,5 +1,5 @@ /* Minimum guaranteed maximum values for system limits. Linux/SPARC version. - 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. 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 Library General Public License along with the GNU C Library; see the file COPYING.LIB. If - not, see <http://www.gnu.org/licenses/>. */ + not, see <https://www.gnu.org/licenses/>. */ /* The kernel header pollutes the namespace with the NR_OPEN symbol and defines LINK_MAX although filesystems have different maxima. A diff --git a/lib/libc/include/sparc-linux-gnu/bits/long-double.h b/lib/libc/include/sparc-linux-gnu/bits/long-double.h index 9858947c1b..e32f6ad721 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/long-double.h +++ b/lib/libc/include/sparc-linux-gnu/bits/long-double.h @@ -1,5 +1,5 @@ /* Properties of long double type. SPARC version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <bits/wordsize.h> @@ -23,4 +23,5 @@ # ifndef __LONG_DOUBLE_128__ # define __NO_LONG_DOUBLE_MATH 1 # endif -#endif
\ No newline at end of file +#endif +#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file diff --git a/lib/libc/include/sparc-linux-gnu/bits/mman.h b/lib/libc/include/sparc-linux-gnu/bits/mman.h index 3d71e80356..8fec53b60f 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/mman.h +++ b/lib/libc/include/sparc-linux-gnu/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/SPARC version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_MMAN_H # error "Never use <bits/mman.h> directly; include <sys/mman.h> instead." @@ -36,6 +36,8 @@ # define MAP_NONBLOCK 0x10000 /* Do not block on IO. */ # define MAP_STACK 0x20000 /* Allocation is for a stack. */ # define MAP_HUGETLB 0x40000 /* Create huge page mapping. */ +# define MAP_SYNC 0x80000 /* Perform synchronous page + faults for the mapping. */ # define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap underlying mapping. */ #endif diff --git a/lib/libc/include/sparc-linux-gnu/bits/msq-pad.h b/lib/libc/include/sparc-linux-gnu/bits/msq-pad.h index 4e1c89ee36..6e05183c93 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/msq-pad.h +++ b/lib/libc/include/sparc-linux-gnu/bits/msq-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct msqid_ds. SPARC 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_MSG_H # error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead." diff --git a/lib/libc/include/sparc-linux-gnu/bits/poll.h b/lib/libc/include/sparc-linux-gnu/bits/poll.h index b62004fb16..892307ca0f 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/poll.h +++ b/lib/libc/include/sparc-linux-gnu/bits/poll.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_POLL_H # error "Never use <bits/poll.h> directly; include <sys/poll.h> instead." diff --git a/lib/libc/include/sparc-linux-gnu/bits/procfs-extra.h b/lib/libc/include/sparc-linux-gnu/bits/procfs-extra.h index 3804e18a0f..3e7691d5c3 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/procfs-extra.h +++ b/lib/libc/include/sparc-linux-gnu/bits/procfs-extra.h @@ -1,5 +1,5 @@ /* Extra sys/procfs.h definitions. SPARC 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PROCFS_H # error "Never include <bits/procfs-extra.h> directly; use <sys/procfs.h> instead." diff --git a/lib/libc/include/sparc-linux-gnu/bits/procfs-id.h b/lib/libc/include/sparc-linux-gnu/bits/procfs-id.h index 64fb74a6e7..df3f655ac8 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/procfs-id.h +++ b/lib/libc/include/sparc-linux-gnu/bits/procfs-id.h @@ -1,5 +1,5 @@ /* Types of pr_uid and pr_gid in struct elf_prpsinfo. SPARC 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. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PROCFS_H # error "Never include <bits/procfs-id.h> directly; use <sys/procfs.h> instead." diff --git a/lib/libc/include/sparc-linux-gnu/bits/procfs.h b/lib/libc/include/sparc-linux-gnu/bits/procfs.h index d7908b1b0f..7b3620640d 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/procfs.h +++ b/lib/libc/include/sparc-linux-gnu/bits/procfs.h @@ -1,5 +1,5 @@ /* Types for registers for sys/procfs.h. SPARC 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PROCFS_H # error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead." diff --git a/lib/libc/include/sparc-linux-gnu/bits/resource.h b/lib/libc/include/sparc-linux-gnu/bits/resource.h index d3f58fd4c6..34605679a3 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/resource.h +++ b/lib/libc/include/sparc-linux-gnu/bits/resource.h @@ -1,5 +1,5 @@ /* Bit values & structures for resource limits. Linux/SPARC version. - 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_RESOURCE_H # error "Never use <bits/resource.h> directly; include <sys/resource.h> instead." diff --git a/lib/libc/include/sparc-linux-gnu/bits/sem-pad.h b/lib/libc/include/sparc-linux-gnu/bits/sem-pad.h index 1fd5475b40..75a0a010c9 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/sem-pad.h +++ b/lib/libc/include/sparc-linux-gnu/bits/sem-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct semid_ds. SPARC 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SEM_H # error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead." diff --git a/lib/libc/include/sparc-linux-gnu/bits/semaphore.h b/lib/libc/include/sparc-linux-gnu/bits/semaphore.h index f309c0c2b8..ee2f8e0ca5 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/semaphore.h +++ b/lib/libc/include/sparc-linux-gnu/bits/semaphore.h @@ -1,5 +1,5 @@ /* Machine-specific POSIX semaphore type layouts. SPARC 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. Contributed by Jakub Jelinek <jakub@redhat.com>, 2003. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SEMAPHORE_H # error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead." diff --git a/lib/libc/include/sparc-linux-gnu/bits/setjmp.h b/lib/libc/include/sparc-linux-gnu/bits/setjmp.h index bec6fd8fc8..1e1174bad1 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/setjmp.h +++ b/lib/libc/include/sparc-linux-gnu/bits/setjmp.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SETJMP_H #define _BITS_SETJMP_H 1 diff --git a/lib/libc/include/sparc-linux-gnu/bits/shm-pad.h b/lib/libc/include/sparc-linux-gnu/bits/shm-pad.h index 48bf143456..6f9480247f 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/shm-pad.h +++ b/lib/libc/include/sparc-linux-gnu/bits/shm-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct shmid_ds. SPARC 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SHM_H # error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead." diff --git a/lib/libc/include/sparc-linux-gnu/bits/shmlba.h b/lib/libc/include/sparc-linux-gnu/bits/shmlba.h index 5c736778ba..fc9e3e3669 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/shmlba.h +++ b/lib/libc/include/sparc-linux-gnu/bits/shmlba.h @@ -1,5 +1,5 @@ /* Define SHMLBA. SPARC 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SHM_H # error "Never use <bits/shmlba.h> directly; include <sys/shm.h> instead." diff --git a/lib/libc/include/sparc-linux-gnu/bits/sigaction.h b/lib/libc/include/sparc-linux-gnu/bits/sigaction.h index 3e18d99602..2a3f67242d 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/sigaction.h +++ b/lib/libc/include/sparc-linux-gnu/bits/sigaction.h @@ -1,5 +1,5 @@ /* The proper definitions for Linux/SPARC sigaction. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGACTION_H #define _BITS_SIGACTION_H 1 diff --git a/lib/libc/include/sparc-linux-gnu/bits/sigcontext.h b/lib/libc/include/sparc-linux-gnu/bits/sigcontext.h index e0f4caf2f6..df187d5970 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/sigcontext.h +++ b/lib/libc/include/sparc-linux-gnu/bits/sigcontext.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGCONTEXT_H #define _BITS_SIGCONTEXT_H 1 diff --git a/lib/libc/include/sparc-linux-gnu/bits/signalfd.h b/lib/libc/include/sparc-linux-gnu/bits/signalfd.h index f3ad2383f0..6cfcd8c574 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/signalfd.h +++ b/lib/libc/include/sparc-linux-gnu/bits/signalfd.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2019 Free Software Foundation, Inc. +/* Copyright (C) 2007-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SIGNALFD_H # error "Never use <bits/signalfd.h> directly; include <sys/signalfd.h> instead." diff --git a/lib/libc/include/sparc-linux-gnu/bits/signum.h b/lib/libc/include/sparc-linux-gnu/bits/signum.h index 4486a253b0..2890ba7808 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/signum.h +++ b/lib/libc/include/sparc-linux-gnu/bits/signum.h @@ -1,5 +1,5 @@ /* Signal number definitions. Linux/SPARC 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGNUM_H #define _BITS_SIGNUM_H 1 diff --git a/lib/libc/include/sparc-linux-gnu/bits/sigstack.h b/lib/libc/include/sparc-linux-gnu/bits/sigstack.h index f3029e811a..7d28d61692 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/sigstack.h +++ b/lib/libc/include/sparc-linux-gnu/bits/sigstack.h @@ -1,5 +1,5 @@ /* sigstack, sigaltstack definitions. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGSTACK_H #define _BITS_SIGSTACK_H 1 diff --git a/lib/libc/include/sparc-linux-gnu/bits/socket-constants.h b/lib/libc/include/sparc-linux-gnu/bits/socket-constants.h index 8334fc24e4..94b8e65b3c 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/socket-constants.h +++ b/lib/libc/include/sparc-linux-gnu/bits/socket-constants.h @@ -1,5 +1,5 @@ /* Socket constants which vary among Linux architectures. Version for SPARC. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SOCKET_H # error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead." diff --git a/lib/libc/include/sparc-linux-gnu/bits/socket_type.h b/lib/libc/include/sparc-linux-gnu/bits/socket_type.h index 411c8e8770..d25882e2a0 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/socket_type.h +++ b/lib/libc/include/sparc-linux-gnu/bits/socket_type.h @@ -1,5 +1,5 @@ /* Define enum __socket_type for Linux/SPARC. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SOCKET_H # error "Never include <bits/socket_type.h> directly; use <sys/socket.h> instead." diff --git a/lib/libc/include/sparc-linux-gnu/bits/stat.h b/lib/libc/include/sparc-linux-gnu/bits/stat.h index 5330f3a46d..cf6d4e2b07 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/stat.h +++ b/lib/libc/include/sparc-linux-gnu/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead." diff --git a/lib/libc/include/sparc-linux-gnu/bits/pthreadtypes-arch.h b/lib/libc/include/sparc-linux-gnu/bits/struct_rwlock.h index 6460ba9584..433d1f6f16 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/pthreadtypes-arch.h +++ b/lib/libc/include/sparc-linux-gnu/bits/struct_rwlock.h @@ -1,5 +1,6 @@ -/* Machine-specific pthread type layouts. SPARC version. - Copyright (C) 2003-2019 Free Software Foundation, Inc. +/* SPARC internal rwlock struct definitions. + 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 @@ -16,38 +17,8 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#ifndef _BITS_PTHREADTYPES_ARCH_H -#define _BITS_PTHREADTYPES_ARCH_H 1 - -#include <bits/wordsize.h> - -#if __WORDSIZE == 64 -# define __SIZEOF_PTHREAD_ATTR_T 56 -# define __SIZEOF_PTHREAD_MUTEX_T 40 -# define __SIZEOF_PTHREAD_CONDATTR_T 4 -# define __SIZEOF_PTHREAD_RWLOCK_T 56 -# define __SIZEOF_PTHREAD_BARRIER_T 32 -#else -# define __SIZEOF_PTHREAD_ATTR_T 36 -# define __SIZEOF_PTHREAD_MUTEX_T 24 -# define __SIZEOF_PTHREAD_CONDATTR_T 4 -# define __SIZEOF_PTHREAD_RWLOCK_T 32 -# define __SIZEOF_PTHREAD_BARRIER_T 20 -#endif -#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 -#define __SIZEOF_PTHREAD_COND_T 48 -#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 0 -#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND (__WORDSIZE != 64) -#define __PTHREAD_MUTEX_USE_UNION (__WORDSIZE != 64) - -#define __LOCK_ALIGNMENT -#define __ONCE_ALIGNMENT +#ifndef _RWLOCK_INTERNAL_H +#define _RWLOCK_INTERNAL_H struct __pthread_rwlock_arch_t { @@ -76,6 +47,12 @@ struct __pthread_rwlock_arch_t #endif }; -#define __PTHREAD_RWLOCK_ELISION_EXTRA 0 +#if __WORDSIZE == 64 +# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags +#else +# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags, 0 +#endif -#endif /* bits/pthreadtypes.h */
\ No newline at end of file +#endif
\ No newline at end of file diff --git a/lib/libc/include/sparc-linux-gnu/bits/termios-baud.h b/lib/libc/include/sparc-linux-gnu/bits/termios-baud.h index 5fb05af14a..9cb0c1f770 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/termios-baud.h +++ b/lib/libc/include/sparc-linux-gnu/bits/termios-baud.h @@ -1,5 +1,5 @@ /* termios baud rate selection definitions. Linux/sparc 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-baud.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/sparc-linux-gnu/bits/termios-c_cc.h b/lib/libc/include/sparc-linux-gnu/bits/termios-c_cc.h index 03bf3dc37d..ba7e520ead 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/termios-c_cc.h +++ b/lib/libc/include/sparc-linux-gnu/bits/termios-c_cc.h @@ -1,5 +1,5 @@ /* termios c_cc symbolic constant definitions. Linux/sparc 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-c_cc.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/sparc-linux-gnu/bits/termios-c_oflag.h b/lib/libc/include/sparc-linux-gnu/bits/termios-c_oflag.h index fb2d8d1e16..05e6b54710 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/termios-c_oflag.h +++ b/lib/libc/include/sparc-linux-gnu/bits/termios-c_oflag.h @@ -1,5 +1,5 @@ /* termios output mode definitions. Linux/sparc 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-c_oflag.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/sparc-linux-gnu/bits/termios-struct.h b/lib/libc/include/sparc-linux-gnu/bits/termios-struct.h index c76457619c..2cb8e1c88f 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/termios-struct.h +++ b/lib/libc/include/sparc-linux-gnu/bits/termios-struct.h @@ -1,5 +1,5 @@ /* struct termios definition. Linux/sparc 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-struct.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/sparc-linux-gnu/bits/timerfd.h b/lib/libc/include/sparc-linux-gnu/bits/timerfd.h index e858253959..411ed5208b 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/timerfd.h +++ b/lib/libc/include/sparc-linux-gnu/bits/timerfd.h @@ -1,4 +1,4 @@ -/* 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_TIMERFD_H # error "Never use <bits/timerfd.h> directly; include <sys/timerfd.h> instead." diff --git a/lib/libc/include/sparc-linux-gnu/bits/typesizes.h b/lib/libc/include/sparc-linux-gnu/bits/typesizes.h index ac12c705b9..123acf7d25 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/typesizes.h +++ b/lib/libc/include/sparc-linux-gnu/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_TYPES_H # error "Never include <bits/typesizes.h> directly; use <sys/types.h> 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/include/sparc-linux-gnu/fpu_control.h b/lib/libc/include/sparc-linux-gnu/fpu_control.h index 5456801580..40690b5bf7 100644 --- a/lib/libc/include/sparc-linux-gnu/fpu_control.h +++ b/lib/libc/include/sparc-linux-gnu/fpu_control.h @@ -1,5 +1,5 @@ /* FPU control word bits. SPARC version. - 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FPU_CONTROL_H #define _FPU_CONTROL_H 1 diff --git a/lib/libc/include/sparc-linux-gnu/ieee754.h b/lib/libc/include/sparc-linux-gnu/ieee754.h index e347e4a6e5..63fa9c5fce 100644 --- a/lib/libc/include/sparc-linux-gnu/ieee754.h +++ b/lib/libc/include/sparc-linux-gnu/ieee754.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,14 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _IEEE754_H - #define _IEEE754_H 1 + #include <features.h> -#include <endian.h> +#include <bits/endian.h> __BEGIN_DECLS diff --git a/lib/libc/include/sparc-linux-gnu/sys/ptrace.h b/lib/libc/include/sparc-linux-gnu/sys/ptrace.h index c64858789a..4f7fe458c2 100644 --- a/lib/libc/include/sparc-linux-gnu/sys/ptrace.h +++ b/lib/libc/include/sparc-linux-gnu/sys/ptrace.h @@ -1,5 +1,5 @@ /* `ptrace' debugger support interface. Linux/SPARC 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PTRACE_H #define _SYS_PTRACE_H 1 @@ -217,8 +217,12 @@ enum __ptrace_request #define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER /* Get seccomp BPF filter metadata. */ - PTRACE_SECCOMP_GET_METADATA = 0x420d + PTRACE_SECCOMP_GET_METADATA = 0x420d, #define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA + + /* Get information about system call. */ + PTRACE_GET_SYSCALL_INFO = 0x420e +#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO }; diff --git a/lib/libc/include/sparc-linux-gnu/sys/ucontext.h b/lib/libc/include/sparc-linux-gnu/sys/ucontext.h index ce917b46da..7d65864662 100644 --- a/lib/libc/include/sparc-linux-gnu/sys/ucontext.h +++ b/lib/libc/include/sparc-linux-gnu/sys/ucontext.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_UCONTEXT_H #define _SYS_UCONTEXT_H 1 diff --git a/lib/libc/include/sparc-linux-gnu/sys/user.h b/lib/libc/include/sparc-linux-gnu/sys/user.h index 142047ab1b..574a9a011c 100644 --- a/lib/libc/include/sparc-linux-gnu/sys/user.h +++ b/lib/libc/include/sparc-linux-gnu/sys/user.h @@ -1,4 +1,4 @@ -/* 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_USER_H #define _SYS_USER_H 1 diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/endian.h b/lib/libc/include/sparcv9-linux-gnu/bits/endianness.h index 1e1dd7a2e0..8b14090d0e 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/endian.h +++ b/lib/libc/include/sparcv9-linux-gnu/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 <bits/endian.h> directly; include <endian.h> instead." +#ifndef _BITS_ENDIAN_H +# error "Never use <bits/endianness.h> directly; include <endian.h> 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
\ No newline at end of file +#endif + +#endif /* bits/endianness.h */
\ No newline at end of file diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/environments.h b/lib/libc/include/sparcv9-linux-gnu/bits/environments.h index 2e1c0bc1de..9134837e15 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/environments.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/environments.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _UNISTD_H # error "Never include this file directly. Use <unistd.h> instead" diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/epoll.h b/lib/libc/include/sparcv9-linux-gnu/bits/epoll.h index a5ae26649b..b06a614334 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/epoll.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/epoll.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_EPOLL_H # error "Never use <bits/epoll.h> directly; include <sys/epoll.h> instead." diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/errno.h b/lib/libc/include/sparcv9-linux-gnu/bits/errno.h index 8ef40090fb..d190a76817 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/errno.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/errno.h @@ -1,5 +1,5 @@ /* Error constants. Linux/Sparc specific 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_ERRNO_H #define _BITS_ERRNO_H 1 diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/eventfd.h b/lib/libc/include/sparcv9-linux-gnu/bits/eventfd.h index 942ede19f7..a57ae6403d 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/eventfd.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/eventfd.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2019 Free Software Foundation, Inc. +/* Copyright (C) 2007-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_EVENTFD_H # error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead." diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/fcntl.h b/lib/libc/include/sparcv9-linux-gnu/bits/fcntl.h index 903872d0b6..48e3da3472 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/fcntl.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux/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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FCNTL_H # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead." diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/fenv.h b/lib/libc/include/sparcv9-linux-gnu/bits/fenv.h index 5a9305af9f..408a29f7b6 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/fenv.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/fenv.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FENV_H # error "Never use <bits/fenv.h> directly; include <fenv.h> instead." @@ -92,7 +92,7 @@ typedef unsigned long int fenv_t; # define __fenv_ldfsr(X) __asm__ __volatile__ ("ld %0,%%fsr" : : "m" (X)) #endif -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) /* Type representing floating-point control modes. */ typedef unsigned long int femode_t; diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/floatn.h b/lib/libc/include/sparcv9-linux-gnu/bits/floatn.h index 5e7e3f4d2e..a4045e43a3 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/floatn.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/floatn.h @@ -1,5 +1,5 @@ /* Macros to control TS 18661-3 glibc features on ldbl-128 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_FLOATN_H #define _BITS_FLOATN_H diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/hwcap.h b/lib/libc/include/sparcv9-linux-gnu/bits/hwcap.h index a05d2b6a25..679ae54a2f 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/hwcap.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/hwcap.h @@ -1,5 +1,5 @@ /* Defines for bits in AT_HWCAP. - 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,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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined(_SYS_AUXV_H) && !defined(_SYSDEPS_SYSDEP_H) # error "Never include <bits/hwcap.h> directly; use <sys/auxv.h> instead." diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/inotify.h b/lib/libc/include/sparcv9-linux-gnu/bits/inotify.h index 9042dd71bb..8d1caf93a2 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/inotify.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/inotify.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_INOTIFY_H # error "Never use <bits/inotify.h> directly; include <sys/inotify.h> instead." diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/ioctls.h b/lib/libc/include/sparcv9-linux-gnu/bits/ioctls.h index 244d48193d..46ae087fe6 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/ioctls.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/ioctls.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_IOCTL_H # error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead." diff --git a/lib/libc/include/sparc-linux-gnu/bits/ipc.h b/lib/libc/include/sparcv9-linux-gnu/bits/ipc-perm.h index abda8ba408..97839b1e72 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/ipc.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/ipc-perm.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1995-2019 Free Software Foundation, Inc. +/* struct ipc_perm definition. Linux/sparc version. + 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,32 +14,12 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_IPC_H -# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead." +# error "Never use <bits/ipc-perm.h> directly; include <sys/ipc.h> instead." #endif -#include <bits/types.h> -#include <bits/wordsize.h> - -/* Mode bits for `msgget', `semget', and `shmget'. */ -#define IPC_CREAT 01000 /* Create key if key does not exist. */ -#define IPC_EXCL 02000 /* Fail if key exists. */ -#define IPC_NOWAIT 04000 /* Return error on wait. */ - -/* Control commands for `msgctl', `semctl', and `shmctl'. */ -#define IPC_RMID 0 /* Remove identifier. */ -#define IPC_SET 1 /* Set `ipc_perm' options. */ -#define IPC_STAT 2 /* Get `ipc_perm' options. */ -#ifdef __USE_GNU -# define IPC_INFO 3 /* See ipcs. */ -#endif - -/* Special key values. */ -#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ - - /* Data structure used to pass permission information to IPC operations. */ struct ipc_perm { @@ -47,14 +28,8 @@ struct ipc_perm __gid_t gid; /* Owner's group ID. */ __uid_t cuid; /* Creator's user ID. */ __gid_t cgid; /* Creator's group ID. */ -#if __WORDSIZE == 32 - unsigned short int __pad1; - unsigned short int mode; /* Read/write permission. */ - unsigned short int __pad2; -#else __mode_t mode; /* Read/write permission. */ unsigned short int __pad1; -#endif unsigned short int __seq; /* Sequence number. */ __extension__ unsigned long long int __glibc_reserved1; __extension__ unsigned long long int __glibc_reserved2; diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/link.h b/lib/libc/include/sparcv9-linux-gnu/bits/link.h index 05e2fe6aac..9ba62345c0 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/link.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/link.h @@ -1,5 +1,5 @@ /* Machine-specific audit interfaces for dynamic linker. SPARC 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _LINK_H # error "Never include <bits/link.h> directly; use <link.h> instead." diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/local_lim.h b/lib/libc/include/sparcv9-linux-gnu/bits/local_lim.h index 0f3afc18be..b2c73b5ae5 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/local_lim.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/local_lim.h @@ -1,5 +1,5 @@ /* Minimum guaranteed maximum values for system limits. Linux/SPARC version. - 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. 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 Library General Public License along with the GNU C Library; see the file COPYING.LIB. If - not, see <http://www.gnu.org/licenses/>. */ + not, see <https://www.gnu.org/licenses/>. */ /* The kernel header pollutes the namespace with the NR_OPEN symbol and defines LINK_MAX although filesystems have different maxima. A diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/long-double.h b/lib/libc/include/sparcv9-linux-gnu/bits/long-double.h index 9858947c1b..e32f6ad721 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/long-double.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/long-double.h @@ -1,5 +1,5 @@ /* Properties of long double type. SPARC version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <bits/wordsize.h> @@ -23,4 +23,5 @@ # ifndef __LONG_DOUBLE_128__ # define __NO_LONG_DOUBLE_MATH 1 # endif -#endif
\ No newline at end of file +#endif +#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/mman.h b/lib/libc/include/sparcv9-linux-gnu/bits/mman.h index 3d71e80356..8fec53b60f 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/mman.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/SPARC version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_MMAN_H # error "Never use <bits/mman.h> directly; include <sys/mman.h> instead." @@ -36,6 +36,8 @@ # define MAP_NONBLOCK 0x10000 /* Do not block on IO. */ # define MAP_STACK 0x20000 /* Allocation is for a stack. */ # define MAP_HUGETLB 0x40000 /* Create huge page mapping. */ +# define MAP_SYNC 0x80000 /* Perform synchronous page + faults for the mapping. */ # define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap underlying mapping. */ #endif diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/msq-pad.h b/lib/libc/include/sparcv9-linux-gnu/bits/msq-pad.h index 4e1c89ee36..6e05183c93 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/msq-pad.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/msq-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct msqid_ds. SPARC 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_MSG_H # error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead." diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/poll.h b/lib/libc/include/sparcv9-linux-gnu/bits/poll.h index b62004fb16..892307ca0f 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/poll.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/poll.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_POLL_H # error "Never use <bits/poll.h> directly; include <sys/poll.h> instead." diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/procfs-extra.h b/lib/libc/include/sparcv9-linux-gnu/bits/procfs-extra.h index 3804e18a0f..3e7691d5c3 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/procfs-extra.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/procfs-extra.h @@ -1,5 +1,5 @@ /* Extra sys/procfs.h definitions. SPARC 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PROCFS_H # error "Never include <bits/procfs-extra.h> directly; use <sys/procfs.h> instead." diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/procfs-id.h b/lib/libc/include/sparcv9-linux-gnu/bits/procfs-id.h index 64fb74a6e7..df3f655ac8 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/procfs-id.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/procfs-id.h @@ -1,5 +1,5 @@ /* Types of pr_uid and pr_gid in struct elf_prpsinfo. SPARC 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. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PROCFS_H # error "Never include <bits/procfs-id.h> directly; use <sys/procfs.h> instead." diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/procfs.h b/lib/libc/include/sparcv9-linux-gnu/bits/procfs.h index d7908b1b0f..7b3620640d 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/procfs.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/procfs.h @@ -1,5 +1,5 @@ /* Types for registers for sys/procfs.h. SPARC 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PROCFS_H # error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead." diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/resource.h b/lib/libc/include/sparcv9-linux-gnu/bits/resource.h index d3f58fd4c6..34605679a3 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/resource.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/resource.h @@ -1,5 +1,5 @@ /* Bit values & structures for resource limits. Linux/SPARC version. - 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_RESOURCE_H # error "Never use <bits/resource.h> directly; include <sys/resource.h> instead." diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/sem-pad.h b/lib/libc/include/sparcv9-linux-gnu/bits/sem-pad.h index 1fd5475b40..75a0a010c9 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/sem-pad.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/sem-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct semid_ds. SPARC 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SEM_H # error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead." diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/semaphore.h b/lib/libc/include/sparcv9-linux-gnu/bits/semaphore.h index f309c0c2b8..ee2f8e0ca5 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/semaphore.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/semaphore.h @@ -1,5 +1,5 @@ /* Machine-specific POSIX semaphore type layouts. SPARC 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. Contributed by Jakub Jelinek <jakub@redhat.com>, 2003. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SEMAPHORE_H # error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead." diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/setjmp.h b/lib/libc/include/sparcv9-linux-gnu/bits/setjmp.h index bec6fd8fc8..1e1174bad1 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/setjmp.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/setjmp.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SETJMP_H #define _BITS_SETJMP_H 1 diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/shm-pad.h b/lib/libc/include/sparcv9-linux-gnu/bits/shm-pad.h index 48bf143456..6f9480247f 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/shm-pad.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/shm-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct shmid_ds. SPARC 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SHM_H # error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead." diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/shmlba.h b/lib/libc/include/sparcv9-linux-gnu/bits/shmlba.h index 5c736778ba..fc9e3e3669 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/shmlba.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/shmlba.h @@ -1,5 +1,5 @@ /* Define SHMLBA. SPARC 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SHM_H # error "Never use <bits/shmlba.h> directly; include <sys/shm.h> instead." diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/sigaction.h b/lib/libc/include/sparcv9-linux-gnu/bits/sigaction.h index 3e18d99602..2a3f67242d 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/sigaction.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/sigaction.h @@ -1,5 +1,5 @@ /* The proper definitions for Linux/SPARC sigaction. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGACTION_H #define _BITS_SIGACTION_H 1 diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/sigcontext.h b/lib/libc/include/sparcv9-linux-gnu/bits/sigcontext.h index e0f4caf2f6..df187d5970 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/sigcontext.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/sigcontext.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGCONTEXT_H #define _BITS_SIGCONTEXT_H 1 diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/signalfd.h b/lib/libc/include/sparcv9-linux-gnu/bits/signalfd.h index f3ad2383f0..6cfcd8c574 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/signalfd.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/signalfd.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2019 Free Software Foundation, Inc. +/* Copyright (C) 2007-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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SIGNALFD_H # error "Never use <bits/signalfd.h> directly; include <sys/signalfd.h> instead." diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/signum.h b/lib/libc/include/sparcv9-linux-gnu/bits/signum.h index 4486a253b0..2890ba7808 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/signum.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/signum.h @@ -1,5 +1,5 @@ /* Signal number definitions. Linux/SPARC 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGNUM_H #define _BITS_SIGNUM_H 1 diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/sigstack.h b/lib/libc/include/sparcv9-linux-gnu/bits/sigstack.h index f3029e811a..7d28d61692 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/sigstack.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/sigstack.h @@ -1,5 +1,5 @@ /* sigstack, sigaltstack definitions. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGSTACK_H #define _BITS_SIGSTACK_H 1 diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/socket-constants.h b/lib/libc/include/sparcv9-linux-gnu/bits/socket-constants.h index 8334fc24e4..94b8e65b3c 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/socket-constants.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/socket-constants.h @@ -1,5 +1,5 @@ /* Socket constants which vary among Linux architectures. Version for SPARC. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SOCKET_H # error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead." diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/socket_type.h b/lib/libc/include/sparcv9-linux-gnu/bits/socket_type.h index 411c8e8770..d25882e2a0 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/socket_type.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/socket_type.h @@ -1,5 +1,5 @@ /* Define enum __socket_type for Linux/SPARC. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SOCKET_H # error "Never include <bits/socket_type.h> directly; use <sys/socket.h> instead." diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/stat.h b/lib/libc/include/sparcv9-linux-gnu/bits/stat.h index 5330f3a46d..cf6d4e2b07 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/stat.h +++ b/lib/libc/include/sparcv9-linux-gnu/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead." diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/pthreadtypes-arch.h b/lib/libc/include/sparcv9-linux-gnu/bits/struct_rwlock.h index 6460ba9584..433d1f6f16 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/pthreadtypes-arch.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/struct_rwlock.h @@ -1,5 +1,6 @@ -/* Machine-specific pthread type layouts. SPARC version. - Copyright (C) 2003-2019 Free Software Foundation, Inc. +/* SPARC internal rwlock struct definitions. + 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 @@ -16,38 +17,8 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#ifndef _BITS_PTHREADTYPES_ARCH_H -#define _BITS_PTHREADTYPES_ARCH_H 1 - -#include <bits/wordsize.h> - -#if __WORDSIZE == 64 -# define __SIZEOF_PTHREAD_ATTR_T 56 -# define __SIZEOF_PTHREAD_MUTEX_T 40 -# define __SIZEOF_PTHREAD_CONDATTR_T 4 -# define __SIZEOF_PTHREAD_RWLOCK_T 56 -# define __SIZEOF_PTHREAD_BARRIER_T 32 -#else -# define __SIZEOF_PTHREAD_ATTR_T 36 -# define __SIZEOF_PTHREAD_MUTEX_T 24 -# define __SIZEOF_PTHREAD_CONDATTR_T 4 -# define __SIZEOF_PTHREAD_RWLOCK_T 32 -# define __SIZEOF_PTHREAD_BARRIER_T 20 -#endif -#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 -#define __SIZEOF_PTHREAD_COND_T 48 -#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 0 -#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND (__WORDSIZE != 64) -#define __PTHREAD_MUTEX_USE_UNION (__WORDSIZE != 64) - -#define __LOCK_ALIGNMENT -#define __ONCE_ALIGNMENT +#ifndef _RWLOCK_INTERNAL_H +#define _RWLOCK_INTERNAL_H struct __pthread_rwlock_arch_t { @@ -76,6 +47,12 @@ struct __pthread_rwlock_arch_t #endif }; -#define __PTHREAD_RWLOCK_ELISION_EXTRA 0 +#if __WORDSIZE == 64 +# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags +#else +# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags, 0 +#endif -#endif /* bits/pthreadtypes.h */
\ No newline at end of file +#endif
\ No newline at end of file diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/termios-baud.h b/lib/libc/include/sparcv9-linux-gnu/bits/termios-baud.h index 5fb05af14a..9cb0c1f770 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/termios-baud.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/termios-baud.h @@ -1,5 +1,5 @@ /* termios baud rate selection definitions. Linux/sparc 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-baud.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/termios-c_cc.h b/lib/libc/include/sparcv9-linux-gnu/bits/termios-c_cc.h index 03bf3dc37d..ba7e520ead 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/termios-c_cc.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/termios-c_cc.h @@ -1,5 +1,5 @@ /* termios c_cc symbolic constant definitions. Linux/sparc 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-c_cc.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/termios-c_oflag.h b/lib/libc/include/sparcv9-linux-gnu/bits/termios-c_oflag.h index fb2d8d1e16..05e6b54710 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/termios-c_oflag.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/termios-c_oflag.h @@ -1,5 +1,5 @@ /* termios output mode definitions. Linux/sparc 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-c_oflag.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/termios-struct.h b/lib/libc/include/sparcv9-linux-gnu/bits/termios-struct.h index c76457619c..2cb8e1c88f 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/termios-struct.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/termios-struct.h @@ -1,5 +1,5 @@ /* struct termios definition. Linux/sparc 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-struct.h> directly; use <termios.h> instead." diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/timerfd.h b/lib/libc/include/sparcv9-linux-gnu/bits/timerfd.h index e858253959..411ed5208b 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/timerfd.h +++ b/lib/libc/include/sparcv9-linux-gnu/bits/timerfd.h @@ -1,4 +1,4 @@ -/* 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_TIMERFD_H # error "Never use <bits/timerfd.h> directly; include <sys/timerfd.h> instead." diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/typesizes.h b/lib/libc/include/sparcv9-linux-gnu/bits/typesizes.h index ac12c705b9..123acf7d25 100644 --- a/lib/libc/include/sparcv9-linux-gnu/bits/typesizes.h +++ b/lib/libc/include/sparcv9-linux-gnu/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_TYPES_H # error "Never include <bits/typesizes.h> directly; use <sys/types.h> 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/include/sparcv9-linux-gnu/fpu_control.h b/lib/libc/include/sparcv9-linux-gnu/fpu_control.h index 5456801580..40690b5bf7 100644 --- a/lib/libc/include/sparcv9-linux-gnu/fpu_control.h +++ b/lib/libc/include/sparcv9-linux-gnu/fpu_control.h @@ -1,5 +1,5 @@ /* FPU control word bits. SPARC version. - 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FPU_CONTROL_H #define _FPU_CONTROL_H 1 diff --git a/lib/libc/include/sparcv9-linux-gnu/ieee754.h b/lib/libc/include/sparcv9-linux-gnu/ieee754.h index e347e4a6e5..63fa9c5fce 100644 --- a/lib/libc/include/sparcv9-linux-gnu/ieee754.h +++ b/lib/libc/include/sparcv9-linux-gnu/ieee754.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,14 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _IEEE754_H - #define _IEEE754_H 1 + #include <features.h> -#include <endian.h> +#include <bits/endian.h> __BEGIN_DECLS diff --git a/lib/libc/include/sparcv9-linux-gnu/sys/ptrace.h b/lib/libc/include/sparcv9-linux-gnu/sys/ptrace.h index c64858789a..4f7fe458c2 100644 --- a/lib/libc/include/sparcv9-linux-gnu/sys/ptrace.h +++ b/lib/libc/include/sparcv9-linux-gnu/sys/ptrace.h @@ -1,5 +1,5 @@ /* `ptrace' debugger support interface. Linux/SPARC 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PTRACE_H #define _SYS_PTRACE_H 1 @@ -217,8 +217,12 @@ enum __ptrace_request #define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER /* Get seccomp BPF filter metadata. */ - PTRACE_SECCOMP_GET_METADATA = 0x420d + PTRACE_SECCOMP_GET_METADATA = 0x420d, #define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA + + /* Get information about system call. */ + PTRACE_GET_SYSCALL_INFO = 0x420e +#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO }; diff --git a/lib/libc/include/sparcv9-linux-gnu/sys/ucontext.h b/lib/libc/include/sparcv9-linux-gnu/sys/ucontext.h index ce917b46da..7d65864662 100644 --- a/lib/libc/include/sparcv9-linux-gnu/sys/ucontext.h +++ b/lib/libc/include/sparcv9-linux-gnu/sys/ucontext.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_UCONTEXT_H #define _SYS_UCONTEXT_H 1 diff --git a/lib/libc/include/sparcv9-linux-gnu/sys/user.h b/lib/libc/include/sparcv9-linux-gnu/sys/user.h index 142047ab1b..574a9a011c 100644 --- a/lib/libc/include/sparcv9-linux-gnu/sys/user.h +++ b/lib/libc/include/sparcv9-linux-gnu/sys/user.h @@ -1,4 +1,4 @@ -/* 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_USER_H #define _SYS_USER_H 1 diff --git a/lib/libc/include/x86_64-linux-gnu/bits/endian.h b/lib/libc/include/x86_64-linux-gnu/bits/endian.h deleted file mode 100644 index 35c898d0ec..0000000000 --- a/lib/libc/include/x86_64-linux-gnu/bits/endian.h +++ /dev/null @@ -1,7 +0,0 @@ -/* i386/x86_64 are little-endian. */ - -#ifndef _ENDIAN_H -# error "Never use <bits/endian.h> directly; include <endian.h> instead." -#endif - -#define __BYTE_ORDER __LITTLE_ENDIAN
\ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-gnu/bits/endianness.h b/lib/libc/include/x86_64-linux-gnu/bits/endianness.h new file mode 100644 index 0000000000..80180b782e --- /dev/null +++ b/lib/libc/include/x86_64-linux-gnu/bits/endianness.h @@ -0,0 +1,11 @@ +#ifndef _BITS_ENDIANNESS_H +#define _BITS_ENDIANNESS_H 1 + +#ifndef _BITS_ENDIAN_H +# error "Never use <bits/endianness.h> directly; include <endian.h> instead." +#endif + +/* i386/x86_64 are little-endian. */ +#define __BYTE_ORDER __LITTLE_ENDIAN + +#endif /* bits/endianness.h */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-gnu/bits/environments.h b/lib/libc/include/x86_64-linux-gnu/bits/environments.h index 76f12fe085..2b18837e58 100644 --- a/lib/libc/include/x86_64-linux-gnu/bits/environments.h +++ b/lib/libc/include/x86_64-linux-gnu/bits/environments.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _UNISTD_H # error "Never include this file directly. Use <unistd.h> instead" diff --git a/lib/libc/include/x86_64-linux-gnu/bits/epoll.h b/lib/libc/include/x86_64-linux-gnu/bits/epoll.h index 205d42ad63..5f23749272 100644 --- a/lib/libc/include/x86_64-linux-gnu/bits/epoll.h +++ b/lib/libc/include/x86_64-linux-gnu/bits/epoll.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_EPOLL_H # error "Never use <bits/epoll.h> directly; include <sys/epoll.h> instead." diff --git a/lib/libc/include/x86_64-linux-gnu/bits/fcntl.h b/lib/libc/include/x86_64-linux-gnu/bits/fcntl.h index d3229a6782..4eb8fa0b6f 100644 --- a/lib/libc/include/x86_64-linux-gnu/bits/fcntl.h +++ b/lib/libc/include/x86_64-linux-gnu/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux/x86. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FCNTL_H # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead." diff --git a/lib/libc/include/x86_64-linux-gnu/bits/fenv.h b/lib/libc/include/x86_64-linux-gnu/bits/fenv.h index 74151486b4..3164b63556 100644 --- a/lib/libc/include/x86_64-linux-gnu/bits/fenv.h +++ b/lib/libc/include/x86_64-linux-gnu/bits/fenv.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FENV_H # error "Never use <bits/fenv.h> directly; include <fenv.h> instead." @@ -101,7 +101,7 @@ fenv_t; # define FE_NOMASK_ENV ((const fenv_t *) -2) #endif -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) /* Type representing floating-point control modes. */ typedef struct { diff --git a/lib/libc/include/x86_64-linux-gnu/bits/floatn.h b/lib/libc/include/x86_64-linux-gnu/bits/floatn.h index 1d7ba69ea8..36d64c23ec 100644 --- a/lib/libc/include/x86_64-linux-gnu/bits/floatn.h +++ b/lib/libc/include/x86_64-linux-gnu/bits/floatn.h @@ -1,5 +1,5 @@ /* Macros to control TS 18661-3 glibc features on 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_FLOATN_H #define _BITS_FLOATN_H diff --git a/lib/libc/include/x86_64-linux-gnu/bits/flt-eval-method.h b/lib/libc/include/x86_64-linux-gnu/bits/flt-eval-method.h index 87e06c4354..9da0307897 100644 --- a/lib/libc/include/x86_64-linux-gnu/bits/flt-eval-method.h +++ b/lib/libc/include/x86_64-linux-gnu/bits/flt-eval-method.h @@ -1,5 +1,5 @@ /* Define __GLIBC_FLT_EVAL_METHOD. x86 version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _MATH_H # error "Never use <bits/flt-eval-method.h> directly; include <math.h> instead." diff --git a/lib/libc/include/x86_64-linux-gnu/bits/fp-logb.h b/lib/libc/include/x86_64-linux-gnu/bits/fp-logb.h index f3e55ea50c..5f2e2a9f88 100644 --- a/lib/libc/include/x86_64-linux-gnu/bits/fp-logb.h +++ b/lib/libc/include/x86_64-linux-gnu/bits/fp-logb.h @@ -1,5 +1,5 @@ /* Define __FP_LOGB0_IS_MIN and __FP_LOGBNAN_IS_MIN. x86 version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _MATH_H # error "Never use <bits/fp-logb.h> directly; include <math.h> instead." diff --git a/lib/libc/include/x86_64-linux-gnu/bits/indirect-return.h b/lib/libc/include/x86_64-linux-gnu/bits/indirect-return.h index fd170e8a42..e74139721c 100644 --- a/lib/libc/include/x86_64-linux-gnu/bits/indirect-return.h +++ b/lib/libc/include/x86_64-linux-gnu/bits/indirect-return.h @@ -1,5 +1,5 @@ /* Definition of __INDIRECT_RETURN. x86 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _UCONTEXT_H # error "Never include <bits/indirect-return.h> directly; use <ucontext.h> instead." diff --git a/lib/libc/include/x86_64-linux-gnu/bits/ipctypes.h b/lib/libc/include/x86_64-linux-gnu/bits/ipctypes.h index 2b471d1e52..7f6bb7662d 100644 --- a/lib/libc/include/x86_64-linux-gnu/bits/ipctypes.h +++ b/lib/libc/include/x86_64-linux-gnu/bits/ipctypes.h @@ -1,5 +1,5 @@ /* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_IPC_H # error "Never use <bits/ipctypes.h> directly; include <sys/ipc.h> instead." diff --git a/lib/libc/include/x86_64-linux-gnu/bits/iscanonical.h b/lib/libc/include/x86_64-linux-gnu/bits/iscanonical.h index 1fa01edaad..ee0d8720f9 100644 --- a/lib/libc/include/x86_64-linux-gnu/bits/iscanonical.h +++ b/lib/libc/include/x86_64-linux-gnu/bits/iscanonical.h @@ -1,5 +1,5 @@ /* Define iscanonical macro. ldbl-96 version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _MATH_H # error "Never use <bits/iscanonical.h> directly; include <math.h> instead." diff --git a/lib/libc/include/x86_64-linux-gnu/bits/link.h b/lib/libc/include/x86_64-linux-gnu/bits/link.h index 2724980f6b..68938e8e0c 100644 --- a/lib/libc/include/x86_64-linux-gnu/bits/link.h +++ b/lib/libc/include/x86_64-linux-gnu/bits/link.h @@ -1,4 +1,4 @@ -/* 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _LINK_H # error "Never include <bits/link.h> directly; use <link.h> instead." diff --git a/lib/libc/include/x86_64-linux-gnu/bits/long-double.h b/lib/libc/include/x86_64-linux-gnu/bits/long-double.h index 6a582416cf..a7bd8fb163 100644 --- a/lib/libc/include/x86_64-linux-gnu/bits/long-double.h +++ b/lib/libc/include/x86_64-linux-gnu/bits/long-double.h @@ -1,5 +1,5 @@ /* Properties of long double type. ldbl-96 version. - 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,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* long double is distinct from double, so there is nothing to - define here. */
\ No newline at end of file + define here. */ +#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-gnu/bits/math-vector.h b/lib/libc/include/x86_64-linux-gnu/bits/math-vector.h index 67e2c8aea8..f7571e827d 100644 --- a/lib/libc/include/x86_64-linux-gnu/bits/math-vector.h +++ b/lib/libc/include/x86_64-linux-gnu/bits/math-vector.h @@ -1,5 +1,5 @@ /* Platform-specific SIMD declarations of math functions. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _MATH_H # error "Never include <bits/math-vector.h> directly;\ diff --git a/lib/libc/include/x86_64-linux-gnu/bits/mman.h b/lib/libc/include/x86_64-linux-gnu/bits/mman.h index 90f3588b6e..4319c54436 100644 --- a/lib/libc/include/x86_64-linux-gnu/bits/mman.h +++ b/lib/libc/include/x86_64-linux-gnu/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/x86_64 version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_MMAN_H # error "Never use <bits/mman.h> directly; include <sys/mman.h> instead." diff --git a/lib/libc/include/x86_64-linux-gnu/bits/procfs-id.h b/lib/libc/include/x86_64-linux-gnu/bits/procfs-id.h index 79f85bfd44..4f4cefeb4b 100644 --- a/lib/libc/include/x86_64-linux-gnu/bits/procfs-id.h +++ b/lib/libc/include/x86_64-linux-gnu/bits/procfs-id.h @@ -1,5 +1,5 @@ /* Types of pr_uid and pr_gid in struct elf_prpsinfo. x86 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. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PROCFS_H # error "Never include <bits/procfs-id.h> directly; use <sys/procfs.h> instead." diff --git a/lib/libc/include/x86_64-linux-gnu/bits/procfs.h b/lib/libc/include/x86_64-linux-gnu/bits/procfs.h index ea3cbfe1be..1f4ca5a0f0 100644 --- a/lib/libc/include/x86_64-linux-gnu/bits/procfs.h +++ b/lib/libc/include/x86_64-linux-gnu/bits/procfs.h @@ -1,5 +1,5 @@ /* Types for registers for sys/procfs.h. x86 version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PROCFS_H # error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead." diff --git a/lib/libc/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h b/lib/libc/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h index 7c5701b0b8..147ce690db 100644 --- a/lib/libc/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h +++ b/lib/libc/include/x86_64-linux-gnu/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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/include/x86_64-linux-gnu/bits/select.h b/lib/libc/include/x86_64-linux-gnu/bits/select.h index 24d5067c62..959d998266 100644 --- a/lib/libc/include/x86_64-linux-gnu/bits/select.h +++ b/lib/libc/include/x86_64-linux-gnu/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SELECT_H # error "Never use <bits/select.h> directly; include <sys/select.h> instead." diff --git a/lib/libc/include/x86_64-linux-gnu/bits/sem-pad.h b/lib/libc/include/x86_64-linux-gnu/bits/sem-pad.h index bd8df25ace..10534c61cf 100644 --- a/lib/libc/include/x86_64-linux-gnu/bits/sem-pad.h +++ b/lib/libc/include/x86_64-linux-gnu/bits/sem-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct semid_ds. x86 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SEM_H # error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead." diff --git a/lib/libc/include/x86_64-linux-gnu/bits/semaphore.h b/lib/libc/include/x86_64-linux-gnu/bits/semaphore.h index c5733e31f4..7f41d9a880 100644 --- a/lib/libc/include/x86_64-linux-gnu/bits/semaphore.h +++ b/lib/libc/include/x86_64-linux-gnu/bits/semaphore.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. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SEMAPHORE_H # error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead." diff --git a/lib/libc/include/x86_64-linux-gnu/bits/setjmp.h b/lib/libc/include/x86_64-linux-gnu/bits/setjmp.h index aec176f8d2..18d620397d 100644 --- a/lib/libc/include/x86_64-linux-gnu/bits/setjmp.h +++ b/lib/libc/include/x86_64-linux-gnu/bits/setjmp.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,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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* Define the machine-dependent type `jmp_buf'. x86-64 version. */ #ifndef _BITS_SETJMP_H diff --git a/lib/libc/include/x86_64-linux-gnu/bits/sigcontext.h b/lib/libc/include/x86_64-linux-gnu/bits/sigcontext.h index 481a8a7bb5..7498f87f91 100644 --- a/lib/libc/include/x86_64-linux-gnu/bits/sigcontext.h +++ b/lib/libc/include/x86_64-linux-gnu/bits/sigcontext.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGCONTEXT_H #define _BITS_SIGCONTEXT_H 1 diff --git a/lib/libc/include/x86_64-linux-gnu/bits/stat.h b/lib/libc/include/x86_64-linux-gnu/bits/stat.h index ee7f88c463..ab5378300a 100644 --- a/lib/libc/include/x86_64-linux-gnu/bits/stat.h +++ b/lib/libc/include/x86_64-linux-gnu/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead." diff --git a/lib/libc/include/x86_64-linux-gnu/bits/struct_mutex.h b/lib/libc/include/x86_64-linux-gnu/bits/struct_mutex.h new file mode 100644 index 0000000000..44273158be --- /dev/null +++ b/lib/libc/include/x86_64-linux-gnu/bits/struct_mutex.h @@ -0,0 +1,63 @@ +/* x86 internal mutex struct definitions. + 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _THREAD_MUTEX_INTERNAL_H +#define _THREAD_MUTEX_INTERNAL_H 1 + +struct __pthread_mutex_s +{ + int __lock; + unsigned int __count; + int __owner; +#ifdef __x86_64__ + unsigned int __nusers; +#endif + /* KIND must stay at this position in the structure to maintain + binary compatibility with static initializers. */ + int __kind; +#ifdef __x86_64__ + short __spins; + short __elision; + __pthread_list_t __list; +# define __PTHREAD_MUTEX_HAVE_PREV 1 +#else + unsigned int __nusers; + __extension__ union + { + struct + { + short __espins; + short __eelision; +# define __spins __elision_data.__espins +# define __elision __elision_data.__eelision + } __elision_data; + __pthread_slist_t __list; + }; +# define __PTHREAD_MUTEX_HAVE_PREV 0 +#endif +}; + +#ifdef __x86_64__ +# define __PTHREAD_MUTEX_INITIALIZER(__kind) \ + 0, 0, 0, 0, __kind, 0, 0, { 0, 0 } +#else +# define __PTHREAD_MUTEX_INITIALIZER(__kind) \ + 0, 0, 0, __kind, 0, { { 0, 0 } } +#endif + +#endif
\ No newline at end of file diff --git a/lib/libc/include/armeb-linux-gnueabihf/bits/pthreadtypes-arch.h b/lib/libc/include/x86_64-linux-gnu/bits/struct_rwlock.h index c46bf4f3fd..863b185dc9 100644 --- a/lib/libc/include/armeb-linux-gnueabihf/bits/pthreadtypes-arch.h +++ b/lib/libc/include/x86_64-linux-gnu/bits/struct_rwlock.h @@ -1,4 +1,6 @@ -/* Copyright (C) 2002-2019 Free Software Foundation, Inc. +/* x86 internal rwlock struct definitions. + 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 @@ -12,33 +14,11 @@ 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 + License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#ifndef _BITS_PTHREADTYPES_ARCH_H -#define _BITS_PTHREADTYPES_ARCH_H 1 - -#include <endian.h> - -#define __SIZEOF_PTHREAD_ATTR_T 36 -#define __SIZEOF_PTHREAD_MUTEX_T 24 -#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 -#define __SIZEOF_PTHREAD_COND_T 48 -#define __SIZEOF_PTHREAD_CONDATTR_T 4 -#define __SIZEOF_PTHREAD_RWLOCK_T 32 -#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 -#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 -#define __ONCE_ALIGNMENT +#ifndef _RWLOCK_INTERNAL_H +#define _RWLOCK_INTERNAL_H struct __pthread_rwlock_arch_t { @@ -48,24 +28,38 @@ struct __pthread_rwlock_arch_t unsigned int __writers_futex; unsigned int __pad3; unsigned int __pad4; -#if __BYTE_ORDER == __BIG_ENDIAN - unsigned char __pad1; - unsigned char __pad2; - unsigned char __shared; +#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 char __flags; -#else + unsigned int __flags; +#else /* __x86_64__ */ /* FLAGS must stay at this position in the structure to maintain binary compatibility. */ unsigned char __flags; unsigned char __shared; - unsigned char __pad1; + signed char __rwelision; unsigned char __pad2; -#endif int __cur_writer; +#endif }; -#define __PTHREAD_RWLOCK_ELISION_EXTRA 0 +#ifdef __x86_64__ +# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \ + 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, __flags +#else +# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \ + 0, 0, 0, 0, 0, 0, __flags, 0, 0, 0, 0 +#endif -#endif /* bits/pthreadtypes.h */
\ No newline at end of file +#endif
\ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-gnu/bits/sysctl.h b/lib/libc/include/x86_64-linux-gnu/bits/sysctl.h index 6b29199909..5e2b946cdf 100644 --- a/lib/libc/include/x86_64-linux-gnu/bits/sysctl.h +++ b/lib/libc/include/x86_64-linux-gnu/bits/sysctl.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if defined __x86_64__ && defined __ILP32__ # error "sysctl system call is unsupported in x32 kernel" diff --git a/lib/libc/include/x86_64-linux-gnu/bits/timesize.h b/lib/libc/include/x86_64-linux-gnu/bits/timesize.h index 48fb555234..ae0a502d0d 100644 --- a/lib/libc/include/x86_64-linux-gnu/bits/timesize.h +++ b/lib/libc/include/x86_64-linux-gnu/bits/timesize.h @@ -1,5 +1,5 @@ /* Bit size of the time_t type at glibc build time, x86-64 and x32 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if defined __x86_64__ && defined __ILP32__ /* For x32, time is 64-bit even though word size is 32-bit. */ diff --git a/lib/libc/include/x86_64-linux-gnu/bits/typesizes.h b/lib/libc/include/x86_64-linux-gnu/bits/typesizes.h index 7c14f5d7f8..7ad60c3f43 100644 --- a/lib/libc/include/x86_64-linux-gnu/bits/typesizes.h +++ b/lib/libc/include/x86_64-linux-gnu/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_TYPES_H # error "Never include <bits/typesizes.h> directly; use <sys/types.h> 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/include/x86_64-linux-gnu/finclude/math-vector-fortran.h b/lib/libc/include/x86_64-linux-gnu/finclude/math-vector-fortran.h index fc3aa3e3b2..c56f5fc16f 100644 --- a/lib/libc/include/x86_64-linux-gnu/finclude/math-vector-fortran.h +++ b/lib/libc/include/x86_64-linux-gnu/finclude/math-vector-fortran.h @@ -1,5 +1,5 @@ ! Platform-specific declarations of SIMD math functions for Fortran. -*- f90 -*- -! 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 -! <http://www.gnu.org/licenses/>. +! <https://www.gnu.org/licenses/>. !GCC$ builtin (cos) attributes simd (notinbranch) if('x86_64') !GCC$ builtin (cosf) attributes simd (notinbranch) if('x86_64') diff --git a/lib/libc/include/x86_64-linux-gnu/fpu_control.h b/lib/libc/include/x86_64-linux-gnu/fpu_control.h index 1c06450778..fa0a861923 100644 --- a/lib/libc/include/x86_64-linux-gnu/fpu_control.h +++ b/lib/libc/include/x86_64-linux-gnu/fpu_control.h @@ -1,5 +1,5 @@ /* FPU control word bits. x86 version. - 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 Olaf Flebbe. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FPU_CONTROL_H #define _FPU_CONTROL_H 1 diff --git a/lib/libc/include/x86_64-linux-gnu/sys/elf.h b/lib/libc/include/x86_64-linux-gnu/sys/elf.h index d8c2c7acc8..d37502689d 100644 --- a/lib/libc/include/x86_64-linux-gnu/sys/elf.h +++ b/lib/libc/include/x86_64-linux-gnu/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_ELF_H #define _SYS_ELF_H 1 diff --git a/lib/libc/include/x86_64-linux-gnu/sys/ptrace.h b/lib/libc/include/x86_64-linux-gnu/sys/ptrace.h index 1f6c5b50fd..0977a402d7 100644 --- a/lib/libc/include/x86_64-linux-gnu/sys/ptrace.h +++ b/lib/libc/include/x86_64-linux-gnu/sys/ptrace.h @@ -1,5 +1,5 @@ /* `ptrace' debugger support interface. Linux/x86 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. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PTRACE_H #define _SYS_PTRACE_H 1 @@ -186,8 +186,12 @@ enum __ptrace_request #define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER /* Get seccomp BPF filter metadata. */ - PTRACE_SECCOMP_GET_METADATA = 0x420d + PTRACE_SECCOMP_GET_METADATA = 0x420d, #define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA + + /* Get information about system call. */ + PTRACE_GET_SYSCALL_INFO = 0x420e +#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO }; diff --git a/lib/libc/include/x86_64-linux-gnu/sys/ucontext.h b/lib/libc/include/x86_64-linux-gnu/sys/ucontext.h index 2127a222a9..3244eab7c8 100644 --- a/lib/libc/include/x86_64-linux-gnu/sys/ucontext.h +++ b/lib/libc/include/x86_64-linux-gnu/sys/ucontext.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,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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_UCONTEXT_H #define _SYS_UCONTEXT_H 1 diff --git a/lib/libc/include/x86_64-linux-gnu/sys/user.h b/lib/libc/include/x86_64-linux-gnu/sys/user.h index 74bd6e393a..fe9d875789 100644 --- a/lib/libc/include/x86_64-linux-gnu/sys/user.h +++ b/lib/libc/include/x86_64-linux-gnu/sys/user.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,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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_USER_H #define _SYS_USER_H 1 diff --git a/lib/libc/include/x86_64-linux-gnux32/bits/endian.h b/lib/libc/include/x86_64-linux-gnux32/bits/endian.h deleted file mode 100644 index 35c898d0ec..0000000000 --- a/lib/libc/include/x86_64-linux-gnux32/bits/endian.h +++ /dev/null @@ -1,7 +0,0 @@ -/* i386/x86_64 are little-endian. */ - -#ifndef _ENDIAN_H -# error "Never use <bits/endian.h> directly; include <endian.h> instead." -#endif - -#define __BYTE_ORDER __LITTLE_ENDIAN
\ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-gnux32/bits/endianness.h b/lib/libc/include/x86_64-linux-gnux32/bits/endianness.h new file mode 100644 index 0000000000..80180b782e --- /dev/null +++ b/lib/libc/include/x86_64-linux-gnux32/bits/endianness.h @@ -0,0 +1,11 @@ +#ifndef _BITS_ENDIANNESS_H +#define _BITS_ENDIANNESS_H 1 + +#ifndef _BITS_ENDIAN_H +# error "Never use <bits/endianness.h> directly; include <endian.h> instead." +#endif + +/* i386/x86_64 are little-endian. */ +#define __BYTE_ORDER __LITTLE_ENDIAN + +#endif /* bits/endianness.h */
\ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-gnux32/bits/environments.h b/lib/libc/include/x86_64-linux-gnux32/bits/environments.h index 76f12fe085..2b18837e58 100644 --- a/lib/libc/include/x86_64-linux-gnux32/bits/environments.h +++ b/lib/libc/include/x86_64-linux-gnux32/bits/environments.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _UNISTD_H # error "Never include this file directly. Use <unistd.h> instead" diff --git a/lib/libc/include/x86_64-linux-gnux32/bits/epoll.h b/lib/libc/include/x86_64-linux-gnux32/bits/epoll.h index 205d42ad63..5f23749272 100644 --- a/lib/libc/include/x86_64-linux-gnux32/bits/epoll.h +++ b/lib/libc/include/x86_64-linux-gnux32/bits/epoll.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_EPOLL_H # error "Never use <bits/epoll.h> directly; include <sys/epoll.h> instead." diff --git a/lib/libc/include/x86_64-linux-gnux32/bits/fcntl.h b/lib/libc/include/x86_64-linux-gnux32/bits/fcntl.h index d3229a6782..4eb8fa0b6f 100644 --- a/lib/libc/include/x86_64-linux-gnux32/bits/fcntl.h +++ b/lib/libc/include/x86_64-linux-gnux32/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux/x86. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FCNTL_H # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead." diff --git a/lib/libc/include/x86_64-linux-gnux32/bits/fenv.h b/lib/libc/include/x86_64-linux-gnux32/bits/fenv.h index 74151486b4..3164b63556 100644 --- a/lib/libc/include/x86_64-linux-gnux32/bits/fenv.h +++ b/lib/libc/include/x86_64-linux-gnux32/bits/fenv.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FENV_H # error "Never use <bits/fenv.h> directly; include <fenv.h> instead." @@ -101,7 +101,7 @@ fenv_t; # define FE_NOMASK_ENV ((const fenv_t *) -2) #endif -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) /* Type representing floating-point control modes. */ typedef struct { diff --git a/lib/libc/include/x86_64-linux-gnux32/bits/floatn.h b/lib/libc/include/x86_64-linux-gnux32/bits/floatn.h index 1d7ba69ea8..36d64c23ec 100644 --- a/lib/libc/include/x86_64-linux-gnux32/bits/floatn.h +++ b/lib/libc/include/x86_64-linux-gnux32/bits/floatn.h @@ -1,5 +1,5 @@ /* Macros to control TS 18661-3 glibc features on 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_FLOATN_H #define _BITS_FLOATN_H diff --git a/lib/libc/include/x86_64-linux-gnux32/bits/flt-eval-method.h b/lib/libc/include/x86_64-linux-gnux32/bits/flt-eval-method.h index 87e06c4354..9da0307897 100644 --- a/lib/libc/include/x86_64-linux-gnux32/bits/flt-eval-method.h +++ b/lib/libc/include/x86_64-linux-gnux32/bits/flt-eval-method.h @@ -1,5 +1,5 @@ /* Define __GLIBC_FLT_EVAL_METHOD. x86 version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _MATH_H # error "Never use <bits/flt-eval-method.h> directly; include <math.h> instead." diff --git a/lib/libc/include/x86_64-linux-gnux32/bits/fp-logb.h b/lib/libc/include/x86_64-linux-gnux32/bits/fp-logb.h index f3e55ea50c..5f2e2a9f88 100644 --- a/lib/libc/include/x86_64-linux-gnux32/bits/fp-logb.h +++ b/lib/libc/include/x86_64-linux-gnux32/bits/fp-logb.h @@ -1,5 +1,5 @@ /* Define __FP_LOGB0_IS_MIN and __FP_LOGBNAN_IS_MIN. x86 version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _MATH_H # error "Never use <bits/fp-logb.h> directly; include <math.h> instead." diff --git a/lib/libc/include/x86_64-linux-gnux32/bits/indirect-return.h b/lib/libc/include/x86_64-linux-gnux32/bits/indirect-return.h index fd170e8a42..e74139721c 100644 --- a/lib/libc/include/x86_64-linux-gnux32/bits/indirect-return.h +++ b/lib/libc/include/x86_64-linux-gnux32/bits/indirect-return.h @@ -1,5 +1,5 @@ /* Definition of __INDIRECT_RETURN. x86 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _UCONTEXT_H # error "Never include <bits/indirect-return.h> directly; use <ucontext.h> instead." diff --git a/lib/libc/include/x86_64-linux-gnux32/bits/ipctypes.h b/lib/libc/include/x86_64-linux-gnux32/bits/ipctypes.h index 2b471d1e52..7f6bb7662d 100644 --- a/lib/libc/include/x86_64-linux-gnux32/bits/ipctypes.h +++ b/lib/libc/include/x86_64-linux-gnux32/bits/ipctypes.h @@ -1,5 +1,5 @@ /* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_IPC_H # error "Never use <bits/ipctypes.h> directly; include <sys/ipc.h> instead." diff --git a/lib/libc/include/x86_64-linux-gnux32/bits/iscanonical.h b/lib/libc/include/x86_64-linux-gnux32/bits/iscanonical.h index 1fa01edaad..ee0d8720f9 100644 --- a/lib/libc/include/x86_64-linux-gnux32/bits/iscanonical.h +++ b/lib/libc/include/x86_64-linux-gnux32/bits/iscanonical.h @@ -1,5 +1,5 @@ /* Define iscanonical macro. ldbl-96 version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _MATH_H # error "Never use <bits/iscanonical.h> directly; include <math.h> instead." diff --git a/lib/libc/include/x86_64-linux-gnux32/bits/link.h b/lib/libc/include/x86_64-linux-gnux32/bits/link.h index 2724980f6b..68938e8e0c 100644 --- a/lib/libc/include/x86_64-linux-gnux32/bits/link.h +++ b/lib/libc/include/x86_64-linux-gnux32/bits/link.h @@ -1,4 +1,4 @@ -/* 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 @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _LINK_H # error "Never include <bits/link.h> directly; use <link.h> instead." diff --git a/lib/libc/include/x86_64-linux-gnux32/bits/long-double.h b/lib/libc/include/x86_64-linux-gnux32/bits/long-double.h index 6a582416cf..a7bd8fb163 100644 --- a/lib/libc/include/x86_64-linux-gnux32/bits/long-double.h +++ b/lib/libc/include/x86_64-linux-gnux32/bits/long-double.h @@ -1,5 +1,5 @@ /* Properties of long double type. ldbl-96 version. - 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,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* long double is distinct from double, so there is nothing to - define here. */
\ No newline at end of file + define here. */ +#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-gnux32/bits/math-vector.h b/lib/libc/include/x86_64-linux-gnux32/bits/math-vector.h index 67e2c8aea8..f7571e827d 100644 --- a/lib/libc/include/x86_64-linux-gnux32/bits/math-vector.h +++ b/lib/libc/include/x86_64-linux-gnux32/bits/math-vector.h @@ -1,5 +1,5 @@ /* Platform-specific SIMD declarations of math functions. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _MATH_H # error "Never include <bits/math-vector.h> directly;\ diff --git a/lib/libc/include/x86_64-linux-gnux32/bits/mman.h b/lib/libc/include/x86_64-linux-gnux32/bits/mman.h index 90f3588b6e..4319c54436 100644 --- a/lib/libc/include/x86_64-linux-gnux32/bits/mman.h +++ b/lib/libc/include/x86_64-linux-gnux32/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/x86_64 version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_MMAN_H # error "Never use <bits/mman.h> directly; include <sys/mman.h> instead." diff --git a/lib/libc/include/x86_64-linux-gnux32/bits/procfs-id.h b/lib/libc/include/x86_64-linux-gnux32/bits/procfs-id.h index 79f85bfd44..4f4cefeb4b 100644 --- a/lib/libc/include/x86_64-linux-gnux32/bits/procfs-id.h +++ b/lib/libc/include/x86_64-linux-gnux32/bits/procfs-id.h @@ -1,5 +1,5 @@ /* Types of pr_uid and pr_gid in struct elf_prpsinfo. x86 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. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PROCFS_H # error "Never include <bits/procfs-id.h> directly; use <sys/procfs.h> instead." diff --git a/lib/libc/include/x86_64-linux-gnux32/bits/procfs.h b/lib/libc/include/x86_64-linux-gnux32/bits/procfs.h index ea3cbfe1be..1f4ca5a0f0 100644 --- a/lib/libc/include/x86_64-linux-gnux32/bits/procfs.h +++ b/lib/libc/include/x86_64-linux-gnux32/bits/procfs.h @@ -1,5 +1,5 @@ /* Types for registers for sys/procfs.h. x86 version. - 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PROCFS_H # error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead." diff --git a/lib/libc/include/x86_64-linux-gnux32/bits/pthreadtypes-arch.h b/lib/libc/include/x86_64-linux-gnux32/bits/pthreadtypes-arch.h index 7c5701b0b8..147ce690db 100644 --- a/lib/libc/include/x86_64-linux-gnux32/bits/pthreadtypes-arch.h +++ b/lib/libc/include/x86_64-linux-gnux32/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #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/include/x86_64-linux-gnux32/bits/select.h b/lib/libc/include/x86_64-linux-gnux32/bits/select.h index 24d5067c62..959d998266 100644 --- a/lib/libc/include/x86_64-linux-gnux32/bits/select.h +++ b/lib/libc/include/x86_64-linux-gnux32/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SELECT_H # error "Never use <bits/select.h> directly; include <sys/select.h> instead." diff --git a/lib/libc/include/x86_64-linux-gnux32/bits/sem-pad.h b/lib/libc/include/x86_64-linux-gnux32/bits/sem-pad.h index bd8df25ace..10534c61cf 100644 --- a/lib/libc/include/x86_64-linux-gnux32/bits/sem-pad.h +++ b/lib/libc/include/x86_64-linux-gnux32/bits/sem-pad.h @@ -1,5 +1,5 @@ /* Define where padding goes in struct semid_ds. x86 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SEM_H # error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead." diff --git a/lib/libc/include/x86_64-linux-gnux32/bits/semaphore.h b/lib/libc/include/x86_64-linux-gnux32/bits/semaphore.h index c5733e31f4..7f41d9a880 100644 --- a/lib/libc/include/x86_64-linux-gnux32/bits/semaphore.h +++ b/lib/libc/include/x86_64-linux-gnux32/bits/semaphore.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. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SEMAPHORE_H # error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead." diff --git a/lib/libc/include/x86_64-linux-gnux32/bits/setjmp.h b/lib/libc/include/x86_64-linux-gnux32/bits/setjmp.h index aec176f8d2..18d620397d 100644 --- a/lib/libc/include/x86_64-linux-gnux32/bits/setjmp.h +++ b/lib/libc/include/x86_64-linux-gnux32/bits/setjmp.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,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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ /* Define the machine-dependent type `jmp_buf'. x86-64 version. */ #ifndef _BITS_SETJMP_H diff --git a/lib/libc/include/x86_64-linux-gnux32/bits/sigcontext.h b/lib/libc/include/x86_64-linux-gnux32/bits/sigcontext.h index 481a8a7bb5..7498f87f91 100644 --- a/lib/libc/include/x86_64-linux-gnux32/bits/sigcontext.h +++ b/lib/libc/include/x86_64-linux-gnux32/bits/sigcontext.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SIGCONTEXT_H #define _BITS_SIGCONTEXT_H 1 diff --git a/lib/libc/include/x86_64-linux-gnux32/bits/stat.h b/lib/libc/include/x86_64-linux-gnux32/bits/stat.h index ee7f88c463..ab5378300a 100644 --- a/lib/libc/include/x86_64-linux-gnux32/bits/stat.h +++ b/lib/libc/include/x86_64-linux-gnux32/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead." diff --git a/lib/libc/include/x86_64-linux-gnux32/bits/struct_mutex.h b/lib/libc/include/x86_64-linux-gnux32/bits/struct_mutex.h new file mode 100644 index 0000000000..44273158be --- /dev/null +++ b/lib/libc/include/x86_64-linux-gnux32/bits/struct_mutex.h @@ -0,0 +1,63 @@ +/* x86 internal mutex struct definitions. + 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _THREAD_MUTEX_INTERNAL_H +#define _THREAD_MUTEX_INTERNAL_H 1 + +struct __pthread_mutex_s +{ + int __lock; + unsigned int __count; + int __owner; +#ifdef __x86_64__ + unsigned int __nusers; +#endif + /* KIND must stay at this position in the structure to maintain + binary compatibility with static initializers. */ + int __kind; +#ifdef __x86_64__ + short __spins; + short __elision; + __pthread_list_t __list; +# define __PTHREAD_MUTEX_HAVE_PREV 1 +#else + unsigned int __nusers; + __extension__ union + { + struct + { + short __espins; + short __eelision; +# define __spins __elision_data.__espins +# define __elision __elision_data.__eelision + } __elision_data; + __pthread_slist_t __list; + }; +# define __PTHREAD_MUTEX_HAVE_PREV 0 +#endif +}; + +#ifdef __x86_64__ +# define __PTHREAD_MUTEX_INITIALIZER(__kind) \ + 0, 0, 0, 0, __kind, 0, 0, { 0, 0 } +#else +# define __PTHREAD_MUTEX_INITIALIZER(__kind) \ + 0, 0, 0, __kind, 0, { { 0, 0 } } +#endif + +#endif
\ No newline at end of file diff --git a/lib/libc/include/arm-linux-gnueabi/bits/pthreadtypes-arch.h b/lib/libc/include/x86_64-linux-gnux32/bits/struct_rwlock.h index c46bf4f3fd..863b185dc9 100644 --- a/lib/libc/include/arm-linux-gnueabi/bits/pthreadtypes-arch.h +++ b/lib/libc/include/x86_64-linux-gnux32/bits/struct_rwlock.h @@ -1,4 +1,6 @@ -/* Copyright (C) 2002-2019 Free Software Foundation, Inc. +/* x86 internal rwlock struct definitions. + 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 @@ -12,33 +14,11 @@ 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 + License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#ifndef _BITS_PTHREADTYPES_ARCH_H -#define _BITS_PTHREADTYPES_ARCH_H 1 - -#include <endian.h> - -#define __SIZEOF_PTHREAD_ATTR_T 36 -#define __SIZEOF_PTHREAD_MUTEX_T 24 -#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 -#define __SIZEOF_PTHREAD_COND_T 48 -#define __SIZEOF_PTHREAD_CONDATTR_T 4 -#define __SIZEOF_PTHREAD_RWLOCK_T 32 -#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 -#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 -#define __ONCE_ALIGNMENT +#ifndef _RWLOCK_INTERNAL_H +#define _RWLOCK_INTERNAL_H struct __pthread_rwlock_arch_t { @@ -48,24 +28,38 @@ struct __pthread_rwlock_arch_t unsigned int __writers_futex; unsigned int __pad3; unsigned int __pad4; -#if __BYTE_ORDER == __BIG_ENDIAN - unsigned char __pad1; - unsigned char __pad2; - unsigned char __shared; +#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 char __flags; -#else + unsigned int __flags; +#else /* __x86_64__ */ /* FLAGS must stay at this position in the structure to maintain binary compatibility. */ unsigned char __flags; unsigned char __shared; - unsigned char __pad1; + signed char __rwelision; unsigned char __pad2; -#endif int __cur_writer; +#endif }; -#define __PTHREAD_RWLOCK_ELISION_EXTRA 0 +#ifdef __x86_64__ +# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \ + 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, __flags +#else +# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \ + 0, 0, 0, 0, 0, 0, __flags, 0, 0, 0, 0 +#endif -#endif /* bits/pthreadtypes.h */
\ No newline at end of file +#endif
\ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-gnux32/bits/sysctl.h b/lib/libc/include/x86_64-linux-gnux32/bits/sysctl.h index 6b29199909..5e2b946cdf 100644 --- a/lib/libc/include/x86_64-linux-gnux32/bits/sysctl.h +++ b/lib/libc/include/x86_64-linux-gnux32/bits/sysctl.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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if defined __x86_64__ && defined __ILP32__ # error "sysctl system call is unsupported in x32 kernel" diff --git a/lib/libc/include/x86_64-linux-gnux32/bits/timesize.h b/lib/libc/include/x86_64-linux-gnux32/bits/timesize.h index 48fb555234..ae0a502d0d 100644 --- a/lib/libc/include/x86_64-linux-gnux32/bits/timesize.h +++ b/lib/libc/include/x86_64-linux-gnux32/bits/timesize.h @@ -1,5 +1,5 @@ /* Bit size of the time_t type at glibc build time, x86-64 and x32 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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #if defined __x86_64__ && defined __ILP32__ /* For x32, time is 64-bit even though word size is 32-bit. */ diff --git a/lib/libc/include/x86_64-linux-gnux32/bits/typesizes.h b/lib/libc/include/x86_64-linux-gnux32/bits/typesizes.h index 7c14f5d7f8..7ad60c3f43 100644 --- a/lib/libc/include/x86_64-linux-gnux32/bits/typesizes.h +++ b/lib/libc/include/x86_64-linux-gnux32/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _BITS_TYPES_H # error "Never include <bits/typesizes.h> directly; use <sys/types.h> 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/include/x86_64-linux-gnux32/finclude/math-vector-fortran.h b/lib/libc/include/x86_64-linux-gnux32/finclude/math-vector-fortran.h index fc3aa3e3b2..c56f5fc16f 100644 --- a/lib/libc/include/x86_64-linux-gnux32/finclude/math-vector-fortran.h +++ b/lib/libc/include/x86_64-linux-gnux32/finclude/math-vector-fortran.h @@ -1,5 +1,5 @@ ! Platform-specific declarations of SIMD math functions for Fortran. -*- f90 -*- -! 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 -! <http://www.gnu.org/licenses/>. +! <https://www.gnu.org/licenses/>. !GCC$ builtin (cos) attributes simd (notinbranch) if('x86_64') !GCC$ builtin (cosf) attributes simd (notinbranch) if('x86_64') diff --git a/lib/libc/include/x86_64-linux-gnux32/fpu_control.h b/lib/libc/include/x86_64-linux-gnux32/fpu_control.h index 1c06450778..fa0a861923 100644 --- a/lib/libc/include/x86_64-linux-gnux32/fpu_control.h +++ b/lib/libc/include/x86_64-linux-gnux32/fpu_control.h @@ -1,5 +1,5 @@ /* FPU control word bits. x86 version. - 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 Olaf Flebbe. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _FPU_CONTROL_H #define _FPU_CONTROL_H 1 diff --git a/lib/libc/include/x86_64-linux-gnux32/sys/elf.h b/lib/libc/include/x86_64-linux-gnux32/sys/elf.h index d8c2c7acc8..d37502689d 100644 --- a/lib/libc/include/x86_64-linux-gnux32/sys/elf.h +++ b/lib/libc/include/x86_64-linux-gnux32/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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_ELF_H #define _SYS_ELF_H 1 diff --git a/lib/libc/include/x86_64-linux-gnux32/sys/ptrace.h b/lib/libc/include/x86_64-linux-gnux32/sys/ptrace.h index 1f6c5b50fd..0977a402d7 100644 --- a/lib/libc/include/x86_64-linux-gnux32/sys/ptrace.h +++ b/lib/libc/include/x86_64-linux-gnux32/sys/ptrace.h @@ -1,5 +1,5 @@ /* `ptrace' debugger support interface. Linux/x86 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. @@ -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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_PTRACE_H #define _SYS_PTRACE_H 1 @@ -186,8 +186,12 @@ enum __ptrace_request #define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER /* Get seccomp BPF filter metadata. */ - PTRACE_SECCOMP_GET_METADATA = 0x420d + PTRACE_SECCOMP_GET_METADATA = 0x420d, #define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA + + /* Get information about system call. */ + PTRACE_GET_SYSCALL_INFO = 0x420e +#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO }; diff --git a/lib/libc/include/x86_64-linux-gnux32/sys/ucontext.h b/lib/libc/include/x86_64-linux-gnux32/sys/ucontext.h index 2127a222a9..3244eab7c8 100644 --- a/lib/libc/include/x86_64-linux-gnux32/sys/ucontext.h +++ b/lib/libc/include/x86_64-linux-gnux32/sys/ucontext.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,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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_UCONTEXT_H #define _SYS_UCONTEXT_H 1 diff --git a/lib/libc/include/x86_64-linux-gnux32/sys/user.h b/lib/libc/include/x86_64-linux-gnux32/sys/user.h index 74bd6e393a..fe9d875789 100644 --- a/lib/libc/include/x86_64-linux-gnux32/sys/user.h +++ b/lib/libc/include/x86_64-linux-gnux32/sys/user.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,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 - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #ifndef _SYS_USER_H #define _SYS_USER_H 1 diff --git a/lib/std/build.zig b/lib/std/build.zig index ecf3930551..59e6c4e87c 100644 --- a/lib/std/build.zig +++ b/lib/std/build.zig @@ -763,7 +763,7 @@ pub const Builder = struct { } pub fn makePath(self: *Builder, path: []const u8) !void { - fs.makePath(self.allocator, self.pathFromRoot(path)) catch |err| { + fs.cwd().makePath(self.pathFromRoot(path)) catch |err| { warn("Unable to create path {}: {}\n", .{ path, @errorName(err) }); return err; }; @@ -2311,7 +2311,7 @@ pub const InstallDirStep = struct { const rel_path = entry.path[full_src_dir.len + 1 ..]; const dest_path = try fs.path.join(self.builder.allocator, &[_][]const u8{ dest_prefix, rel_path }); switch (entry.kind) { - .Directory => try fs.makePath(self.builder.allocator, dest_path), + .Directory => try fs.cwd().makePath(dest_path), .File => try self.builder.updateFile(entry.path, dest_path), else => continue, } diff --git a/lib/std/build/emit_raw.zig b/lib/std/build/emit_raw.zig index 54ceae3263..44e0227b6e 100644 --- a/lib/std/build/emit_raw.zig +++ b/lib/std/build/emit_raw.zig @@ -213,11 +213,11 @@ pub const InstallRawStep = struct { builder: *Builder, artifact: *LibExeObjStep, dest_dir: InstallDir, - dest_filename: [] const u8, + dest_filename: []const u8, const Self = @This(); - pub fn create(builder: *Builder, artifact: *LibExeObjStep, dest_filename: [] const u8) *Self { + pub fn create(builder: *Builder, artifact: *LibExeObjStep, dest_filename: []const u8) *Self { const self = builder.allocator.create(Self) catch unreachable; self.* = Self{ .step = Step.init(builder.fmt("install raw binary {}", .{artifact.step.name}), builder.allocator, make), @@ -249,7 +249,7 @@ pub const InstallRawStep = struct { const full_src_path = self.artifact.getOutputPath(); const full_dest_path = builder.getInstallPath(self.dest_dir, self.dest_filename); - fs.makePath(builder.allocator, builder.getInstallPath(self.dest_dir, "")) catch unreachable; + fs.cwd().makePath(builder.getInstallPath(self.dest_dir, "")) catch unreachable; try emit_raw(builder.allocator, full_src_path, full_dest_path); } -};
\ No newline at end of file +}; diff --git a/lib/std/build/write_file.zig b/lib/std/build/write_file.zig index 13d131ac61..60c54336e0 100644 --- a/lib/std/build/write_file.zig +++ b/lib/std/build/write_file.zig @@ -74,7 +74,7 @@ pub const WriteFileStep = struct { &hash_basename, }); // TODO replace with something like fs.makePathAndOpenDir - fs.makePath(self.builder.allocator, self.output_dir) catch |err| { + fs.cwd().makePath(self.output_dir) catch |err| { warn("unable to make path {}: {}\n", .{ self.output_dir, @errorName(err) }); return err; }; diff --git a/lib/std/c.zig b/lib/std/c.zig index 48a3039f51..7c01908540 100644 --- a/lib/std/c.zig +++ b/lib/std/c.zig @@ -75,6 +75,7 @@ pub extern "c" fn isatty(fd: fd_t) c_int; pub extern "c" fn close(fd: fd_t) c_int; pub extern "c" fn fstat(fd: fd_t, buf: *Stat) c_int; pub extern "c" fn @"fstat$INODE64"(fd: fd_t, buf: *Stat) c_int; +pub extern "c" fn fstatat(dirfd: fd_t, path: [*:0]const u8, stat_buf: *Stat, flags: u32) c_int; pub extern "c" fn lseek(fd: fd_t, offset: off_t, whence: c_int) off_t; pub extern "c" fn open(path: [*:0]const u8, oflag: c_uint, ...) c_int; pub extern "c" fn openat(fd: c_int, path: [*:0]const u8, oflag: c_uint, ...) c_int; @@ -101,9 +102,11 @@ pub extern "c" fn faccessat(dirfd: fd_t, path: [*:0]const u8, mode: c_uint, flag pub extern "c" fn pipe(fds: *[2]fd_t) c_int; pub extern "c" fn pipe2(fds: *[2]fd_t, flags: u32) c_int; pub extern "c" fn mkdir(path: [*:0]const u8, mode: c_uint) c_int; +pub extern "c" fn mkdirat(dirfd: fd_t, path: [*:0]const u8, mode: u32) c_int; pub extern "c" fn symlink(existing: [*:0]const u8, new: [*:0]const u8) c_int; pub extern "c" fn rename(old: [*:0]const u8, new: [*:0]const u8) c_int; pub extern "c" fn chdir(path: [*:0]const u8) c_int; +pub extern "c" fn fchdir(fd: fd_t) c_int; pub extern "c" fn execve(path: [*:0]const u8, argv: [*:null]const ?[*:0]const u8, envp: [*:null]const ?[*:0]const u8) c_int; pub extern "c" fn dup(fd: fd_t) c_int; pub extern "c" fn dup2(old_fd: fd_t, new_fd: fd_t) c_int; @@ -142,7 +145,7 @@ pub extern "c" fn sendto( buf: *const c_void, len: usize, flags: u32, - dest_addr: *const sockaddr, + dest_addr: ?*const sockaddr, addrlen: socklen_t, ) isize; diff --git a/lib/std/c/darwin.zig b/lib/std/c/darwin.zig index 524c82211e..881e52c72c 100644 --- a/lib/std/c/darwin.zig +++ b/lib/std/c/darwin.zig @@ -55,6 +55,22 @@ pub extern "c" fn clock_get_time(clock_serv: clock_serv_t, cur_time: *mach_times pub extern "c" fn host_get_clock_service(host: host_t, clock_id: clock_id_t, clock_serv: ?[*]clock_serv_t) kern_return_t; pub extern "c" fn mach_port_deallocate(task: ipc_space_t, name: mach_port_name_t) kern_return_t; +pub const sf_hdtr = extern struct { + headers: [*]const iovec_const, + hdr_cnt: c_int, + trailers: [*]const iovec_const, + trl_cnt: c_int, +}; + +pub extern "c" fn sendfile( + out_fd: fd_t, + in_fd: fd_t, + offset: off_t, + len: *off_t, + sf_hdtr: ?*sf_hdtr, + flags: u32, +) c_int; + pub fn sigaddset(set: *sigset_t, signo: u5) void { set.* |= @as(u32, 1) << (signo - 1); } diff --git a/lib/std/c/freebsd.zig b/lib/std/c/freebsd.zig index 4c6614c978..2c4820bbe9 100644 --- a/lib/std/c/freebsd.zig +++ b/lib/std/c/freebsd.zig @@ -8,6 +8,22 @@ pub extern "c" fn getdents(fd: c_int, buf_ptr: [*]u8, nbytes: usize) usize; pub extern "c" fn sigaltstack(ss: ?*stack_t, old_ss: ?*stack_t) c_int; pub extern "c" fn getrandom(buf_ptr: [*]u8, buf_len: usize, flags: c_uint) isize; +pub const sf_hdtr = extern struct { + headers: [*]const iovec_const, + hdr_cnt: c_int, + trailers: [*]const iovec_const, + trl_cnt: c_int, +}; +pub extern "c" fn sendfile( + out_fd: fd_t, + in_fd: fd_t, + offset: ?*off_t, + nbytes: usize, + sf_hdtr: ?*sf_hdtr, + sbytes: ?*off_t, + flags: u32, +) c_int; + pub const dl_iterate_phdr_callback = extern fn (info: *dl_phdr_info, size: usize, data: ?*c_void) c_int; pub extern "c" fn dl_iterate_phdr(callback: dl_iterate_phdr_callback, data: ?*c_void) c_int; diff --git a/lib/std/c/linux.zig b/lib/std/c/linux.zig index be32536d6f..7ac5ecd3fe 100644 --- a/lib/std/c/linux.zig +++ b/lib/std/c/linux.zig @@ -82,6 +82,13 @@ pub extern "c" fn sigaltstack(ss: ?*stack_t, old_ss: ?*stack_t) c_int; pub extern "c" fn memfd_create(name: [*:0]const u8, flags: c_uint) c_int; +pub extern "c" fn sendfile( + out_fd: fd_t, + in_fd: fd_t, + offset: ?*off_t, + count: usize, +) isize; + pub const pthread_attr_t = extern struct { __size: [56]u8, __align: c_long, diff --git a/lib/std/event/loop.zig b/lib/std/event/loop.zig index 80ba5a79b5..e62f15d59a 100644 --- a/lib/std/event/loop.zig +++ b/lib/std/event/loop.zig @@ -236,7 +236,8 @@ pub const Loop = struct { var extra_thread_index: usize = 0; errdefer { // writing 8 bytes to an eventfd cannot fail - noasync os.write(self.os_data.final_eventfd, &wakeup_bytes) catch unreachable; + const amt = noasync os.write(self.os_data.final_eventfd, &wakeup_bytes) catch unreachable; + assert(amt == wakeup_bytes.len); while (extra_thread_index != 0) { extra_thread_index -= 1; self.extra_threads[extra_thread_index].wait(); @@ -682,7 +683,8 @@ pub const Loop = struct { .linux => { self.posixFsRequest(&self.os_data.fs_end_request); // writing 8 bytes to an eventfd cannot fail - noasync os.write(self.os_data.final_eventfd, &wakeup_bytes) catch unreachable; + const amt = noasync os.write(self.os_data.final_eventfd, &wakeup_bytes) catch unreachable; + assert(amt == wakeup_bytes.len); return; }, .macosx, .freebsd, .netbsd, .dragonfly => { @@ -831,7 +833,7 @@ pub const Loop = struct { /// Performs an async `os.write` using a separate thread. /// `fd` must block and not return EAGAIN. - pub fn write(self: *Loop, fd: os.fd_t, bytes: []const u8) os.WriteError!void { + pub fn write(self: *Loop, fd: os.fd_t, bytes: []const u8) os.WriteError!usize { var req_node = Request.Node{ .data = .{ .msg = .{ @@ -852,7 +854,7 @@ pub const Loop = struct { /// Performs an async `os.writev` using a separate thread. /// `fd` must block and not return EAGAIN. - pub fn writev(self: *Loop, fd: os.fd_t, iov: []const os.iovec_const) os.WriteError!void { + pub fn writev(self: *Loop, fd: os.fd_t, iov: []const os.iovec_const) os.WriteError!usize { var req_node = Request.Node{ .data = .{ .msg = .{ @@ -873,7 +875,7 @@ pub const Loop = struct { /// Performs an async `os.pwritev` using a separate thread. /// `fd` must block and not return EAGAIN. - pub fn pwritev(self: *Loop, fd: os.fd_t, iov: []const os.iovec_const, offset: u64) os.WriteError!void { + pub fn pwritev(self: *Loop, fd: os.fd_t, iov: []const os.iovec_const, offset: u64) os.WriteError!usize { var req_node = Request.Node{ .data = .{ .msg = .{ @@ -1137,7 +1139,7 @@ pub const Loop = struct { pub const Write = struct { fd: os.fd_t, bytes: []const u8, - result: Error!void, + result: Error!usize, pub const Error = os.WriteError; }; @@ -1145,7 +1147,7 @@ pub const Loop = struct { pub const WriteV = struct { fd: os.fd_t, iov: []const os.iovec_const, - result: Error!void, + result: Error!usize, pub const Error = os.WriteError; }; @@ -1154,9 +1156,9 @@ pub const Loop = struct { fd: os.fd_t, iov: []const os.iovec_const, offset: usize, - result: Error!void, + result: Error!usize, - pub const Error = os.WriteError; + pub const Error = os.PWriteError; }; pub const PReadV = struct { @@ -1165,7 +1167,7 @@ pub const Loop = struct { offset: usize, result: Error!usize, - pub const Error = os.ReadError; + pub const Error = os.PReadError; }; pub const Open = struct { diff --git a/lib/std/fs.zig b/lib/std/fs.zig index 5077c52cd9..88806f69bb 100644 --- a/lib/std/fs.zig +++ b/lib/std/fs.zig @@ -123,47 +123,21 @@ pub fn updateFileMode(source_path: []const u8, dest_path: []const u8, mode: ?Fil } const actual_mode = mode orelse src_stat.mode; - // TODO this logic could be made more efficient by calling makePath, once - // that API does not require an allocator - var atomic_file = make_atomic_file: while (true) { - const af = AtomicFile.init(dest_path, actual_mode) catch |err| switch (err) { - error.FileNotFound => { - var p = dest_path; - while (path.dirname(p)) |dirname| { - makeDir(dirname) catch |e| switch (e) { - error.FileNotFound => { - p = dirname; - continue; - }, - else => return e, - }; - continue :make_atomic_file; - } else { - return err; - } - }, - else => |e| return e, - }; - break af; - } else unreachable; - defer atomic_file.deinit(); + if (path.dirname(dest_path)) |dirname| { + try cwd().makePath(dirname); + } - const in_stream = &src_file.inStream().stream; + var atomic_file = try AtomicFile.init(dest_path, actual_mode); + defer atomic_file.deinit(); - var buf: [mem.page_size * 6]u8 = undefined; - while (true) { - const amt = try in_stream.readFull(buf[0..]); - try atomic_file.file.write(buf[0..amt]); - if (amt != buf.len) { - try atomic_file.file.updateTimes(src_stat.atime, src_stat.mtime); - try atomic_file.finish(); - return PrevStatus.stale; - } - } + try atomic_file.file.writeFileAll(src_file, .{ .in_len = src_stat.size }); + try atomic_file.file.updateTimes(src_stat.atime, src_stat.mtime); + try atomic_file.finish(); + return PrevStatus.stale; } -/// Guaranteed to be atomic. However until https://patchwork.kernel.org/patch/9636735/ is -/// merged and readily available, +/// Guaranteed to be atomic. +/// On Linux, until https://patchwork.kernel.org/patch/9636735/ is merged and readily available, /// there is a possibility of power loss or application termination leaving temporary files present /// in the same directory as dest_path. /// Destination file will have the same mode as the source file. @@ -207,6 +181,9 @@ pub fn copyFileMode(source_path: []const u8, dest_path: []const u8, mode: File.M } } +/// TODO update this API to avoid a getrandom syscall for every operation. It +/// should accept a random interface. +/// TODO rework this to integrate with Dir pub const AtomicFile = struct { file: File, tmp_path_buf: [MAX_PATH_BYTES]u8, @@ -268,70 +245,42 @@ pub const AtomicFile = struct { pub fn finish(self: *AtomicFile) !void { assert(!self.finished); - self.file.close(); - self.finished = true; - if (builtin.os.tag == .windows) { + if (std.Target.current.os.tag == .windows) { const dest_path_w = try os.windows.sliceToPrefixedFileW(self.dest_path); const tmp_path_w = try os.windows.cStrToPrefixedFileW(@ptrCast([*:0]u8, &self.tmp_path_buf)); + self.file.close(); + self.finished = true; return os.renameW(&tmp_path_w, &dest_path_w); + } else { + const dest_path_c = try os.toPosixPath(self.dest_path); + self.file.close(); + self.finished = true; + return os.renameC(@ptrCast([*:0]u8, &self.tmp_path_buf), &dest_path_c); } - const dest_path_c = try os.toPosixPath(self.dest_path); - return os.renameC(@ptrCast([*:0]u8, &self.tmp_path_buf), &dest_path_c); } }; const default_new_dir_mode = 0o755; -/// Create a new directory. -pub fn makeDir(dir_path: []const u8) !void { - return os.mkdir(dir_path, default_new_dir_mode); +/// Create a new directory, based on an absolute path. +/// Asserts that the path is absolute. See `Dir.makeDir` for a function that operates +/// on both absolute and relative paths. +pub fn makeDirAbsolute(absolute_path: []const u8) !void { + assert(path.isAbsoluteC(absolute_path)); + return os.mkdir(absolute_path, default_new_dir_mode); } -/// Same as `makeDir` except the parameter is a null-terminated UTF8-encoded string. -pub fn makeDirC(dir_path: [*:0]const u8) !void { - return os.mkdirC(dir_path, default_new_dir_mode); +/// Same as `makeDirAbsolute` except the parameter is a null-terminated UTF8-encoded string. +pub fn makeDirAbsoluteZ(absolute_path_z: [*:0]const u8) !void { + assert(path.isAbsoluteC(absolute_path_z)); + return os.mkdirZ(absolute_path_z, default_new_dir_mode); } -/// Same as `makeDir` except the parameter is a null-terminated UTF16LE-encoded string. -pub fn makeDirW(dir_path: [*:0]const u16) !void { - return os.mkdirW(dir_path, default_new_dir_mode); -} - -/// Calls makeDir recursively to make an entire path. Returns success if the path -/// already exists and is a directory. -/// This function is not atomic, and if it returns an error, the file system may -/// have been modified regardless. -/// TODO determine if we can remove the allocator requirement from this function -pub fn makePath(allocator: *Allocator, full_path: []const u8) !void { - const resolved_path = try path.resolve(allocator, &[_][]const u8{full_path}); - defer allocator.free(resolved_path); - - var end_index: usize = resolved_path.len; - while (true) { - makeDir(resolved_path[0..end_index]) catch |err| switch (err) { - error.PathAlreadyExists => { - // TODO stat the file and return an error if it's not a directory - // this is important because otherwise a dangling symlink - // could cause an infinite loop - if (end_index == resolved_path.len) return; - }, - error.FileNotFound => { - // march end_index backward until next path component - while (true) { - end_index -= 1; - if (path.isSep(resolved_path[end_index])) break; - } - continue; - }, - else => return err, - }; - if (end_index == resolved_path.len) return; - // march end_index forward until next path component - while (true) { - end_index += 1; - if (end_index == resolved_path.len or path.isSep(resolved_path[end_index])) break; - } - } +/// Same as `makeDirAbsolute` except the parameter is a null-terminated WTF-16 encoded string. +pub fn makeDirAbsoluteW(absolute_path_w: [*:0]const u16) !void { + assert(path.isAbsoluteWindowsW(absolute_path_w)); + const handle = try os.windows.CreateDirectoryW(null, absolute_path_w, null); + os.windows.CloseHandle(handle); } /// Returns `error.DirNotEmpty` if the directory is not empty. @@ -709,17 +658,19 @@ pub const Dir = struct { /// Call `File.close` to release the resource. /// Asserts that the path parameter has no null bytes. pub fn openFile(self: Dir, sub_path: []const u8, flags: File.OpenFlags) File.OpenError!File { - if (std.debug.runtime_safety) for (sub_path) |byte| assert(byte != 0); if (builtin.os.tag == .windows) { const path_w = try os.windows.sliceToPrefixedFileW(sub_path); return self.openFileW(&path_w, flags); } const path_c = try os.toPosixPath(sub_path); - return self.openFileC(&path_c, flags); + return self.openFileZ(&path_c, flags); } + /// Deprecated; use `openFileZ`. + pub const openFileC = openFileZ; + /// Same as `openFile` but the path parameter is null-terminated. - pub fn openFileC(self: Dir, sub_path: [*:0]const u8, flags: File.OpenFlags) File.OpenError!File { + pub fn openFileZ(self: Dir, sub_path: [*:0]const u8, flags: File.OpenFlags) File.OpenError!File { if (builtin.os.tag == .windows) { const path_w = try os.windows.cStrToPrefixedFileW(sub_path); return self.openFileW(&path_w, flags); @@ -759,7 +710,6 @@ pub const Dir = struct { /// Call `File.close` on the result when done. /// Asserts that the path parameter has no null bytes. pub fn createFile(self: Dir, sub_path: []const u8, flags: File.CreateFlags) File.OpenError!File { - if (std.debug.runtime_safety) for (sub_path) |byte| assert(byte != 0); if (builtin.os.tag == .windows) { const path_w = try os.windows.sliceToPrefixedFileW(sub_path); return self.createFileW(&path_w, flags); @@ -806,9 +756,9 @@ pub const Dir = struct { return self.openFile(sub_path, .{}); } - /// Deprecated; call `openFileC` directly. + /// Deprecated; call `openFileZ` directly. pub fn openReadC(self: Dir, sub_path: [*:0]const u8) File.OpenError!File { - return self.openFileC(sub_path, .{}); + return self.openFileZ(sub_path, .{}); } /// Deprecated; call `openFileW` directly. @@ -882,6 +832,64 @@ pub const Dir = struct { } } + pub fn makeDir(self: Dir, sub_path: []const u8) !void { + try os.mkdirat(self.fd, sub_path, default_new_dir_mode); + } + + pub fn makeDirZ(self: Dir, sub_path: [*:0]const u8) !void { + try os.mkdiratC(self.fd, sub_path, default_new_dir_mode); + } + + pub fn makeDirW(self: Dir, sub_path: [*:0]const u16) !void { + const handle = try os.windows.CreateDirectoryW(self.fd, sub_path, null); + os.windows.CloseHandle(handle); + } + + /// Calls makeDir recursively to make an entire path. Returns success if the path + /// already exists and is a directory. + /// This function is not atomic, and if it returns an error, the file system may + /// have been modified regardless. + pub fn makePath(self: Dir, sub_path: []const u8) !void { + var end_index: usize = sub_path.len; + while (true) { + self.makeDir(sub_path[0..end_index]) catch |err| switch (err) { + error.PathAlreadyExists => { + // TODO stat the file and return an error if it's not a directory + // this is important because otherwise a dangling symlink + // could cause an infinite loop + if (end_index == sub_path.len) return; + }, + error.FileNotFound => { + if (end_index == 0) return err; + // march end_index backward until next path component + while (true) { + end_index -= 1; + if (path.isSep(sub_path[end_index])) break; + } + continue; + }, + else => return err, + }; + if (end_index == sub_path.len) return; + // march end_index forward until next path component + while (true) { + end_index += 1; + if (end_index == sub_path.len or path.isSep(sub_path[end_index])) break; + } + } + } + + /// Changes the current working directory to the open directory handle. + /// This modifies global state and can have surprising effects in multi- + /// threaded applications. Most applications and especially libraries should + /// not call this function as a general rule, however it can have use cases + /// in, for example, implementing a shell, or child process execution. + /// Not all targets support this. For example, WASI does not have the concept + /// of a current working directory. + pub fn setAsCwd(self: Dir) !void { + try os.fchdir(self.fd); + } + /// Deprecated; call `openDirList` directly. pub fn openDir(self: Dir, sub_path: []const u8) OpenError!Dir { return self.openDirList(sub_path); @@ -900,7 +908,6 @@ pub const Dir = struct { /// /// Asserts that the path parameter has no null bytes. pub fn openDirTraverse(self: Dir, sub_path: []const u8) OpenError!Dir { - if (std.debug.runtime_safety) for (sub_path) |byte| assert(byte != 0); if (builtin.os.tag == .windows) { const sub_path_w = try os.windows.sliceToPrefixedFileW(sub_path); return self.openDirTraverseW(&sub_path_w); @@ -918,7 +925,6 @@ pub const Dir = struct { /// /// Asserts that the path parameter has no null bytes. pub fn openDirList(self: Dir, sub_path: []const u8) OpenError!Dir { - if (std.debug.runtime_safety) for (sub_path) |byte| assert(byte != 0); if (builtin.os.tag == .windows) { const sub_path_w = try os.windows.sliceToPrefixedFileW(sub_path); return self.openDirListW(&sub_path_w); @@ -1082,7 +1088,6 @@ pub const Dir = struct { /// To delete a directory recursively, see `deleteTree`. /// Asserts that the path parameter has no null bytes. pub fn deleteDir(self: Dir, sub_path: []const u8) DeleteDirError!void { - if (std.debug.runtime_safety) for (sub_path) |byte| assert(byte != 0); if (builtin.os.tag == .windows) { const sub_path_w = try os.windows.sliceToPrefixedFileW(sub_path); return self.deleteDirW(&sub_path_w); @@ -1112,7 +1117,6 @@ pub const Dir = struct { /// The return value is a slice of `buffer`, from index `0`. /// Asserts that the path parameter has no null bytes. pub fn readLink(self: Dir, sub_path: []const u8, buffer: *[MAX_PATH_BYTES]u8) ![]u8 { - if (std.debug.runtime_safety) for (sub_path) |byte| assert(byte != 0); const sub_path_c = try os.toPosixPath(sub_path); return self.readLinkC(&sub_path_c, buffer); } @@ -1329,7 +1333,7 @@ pub const Dir = struct { pub fn writeFile(self: Dir, sub_path: []const u8, data: []const u8) !void { var file = try self.createFile(sub_path, .{}); defer file.close(); - try file.write(data); + try file.writeAll(data); } pub const AccessError = os.AccessError; @@ -1402,7 +1406,7 @@ pub fn openFileAbsolute(absolute_path: []const u8, flags: File.OpenFlags) File.O /// Same as `openFileAbsolute` but the path parameter is null-terminated. pub fn openFileAbsoluteC(absolute_path_c: [*:0]const u8, flags: File.OpenFlags) File.OpenError!File { assert(path.isAbsoluteC(absolute_path_c)); - return cwd().openFileC(absolute_path_c, flags); + return cwd().openFileZ(absolute_path_c, flags); } /// Same as `openFileAbsolute` but the path parameter is WTF-16 encoded. diff --git a/lib/std/fs/file.zig b/lib/std/fs/file.zig index c243eeb62c..5b51f19f41 100644 --- a/lib/std/fs/file.zig +++ b/lib/std/fs/file.zig @@ -228,63 +228,260 @@ pub const File = struct { } pub const ReadError = os.ReadError; + pub const PReadError = os.PReadError; pub fn read(self: File, buffer: []u8) ReadError!usize { if (need_async_thread and self.io_mode == .blocking and !self.async_block_allowed) { return std.event.Loop.instance.?.read(self.handle, buffer); + } else { + return os.read(self.handle, buffer); + } + } + + pub fn readAll(self: File, buffer: []u8) ReadError!void { + var index: usize = 0; + while (index < buffer.len) { + index += try self.read(buffer[index..]); } - return os.read(self.handle, buffer); } - pub fn pread(self: File, buffer: []u8, offset: u64) ReadError!usize { + pub fn pread(self: File, buffer: []u8, offset: u64) PReadError!usize { if (need_async_thread and self.io_mode == .blocking and !self.async_block_allowed) { - return std.event.Loop.instance.?.pread(self.handle, buffer); + return std.event.Loop.instance.?.pread(self.handle, buffer, offset); + } else { + return os.pread(self.handle, buffer, offset); + } + } + + pub fn preadAll(self: File, buffer: []u8, offset: u64) PReadError!void { + var index: usize = 0; + while (index < buffer.len) { + index += try self.pread(buffer[index..], offset + index); } - return os.pread(self.handle, buffer, offset); } pub fn readv(self: File, iovecs: []const os.iovec) ReadError!usize { if (need_async_thread and self.io_mode == .blocking and !self.async_block_allowed) { return std.event.Loop.instance.?.readv(self.handle, iovecs); + } else { + return os.readv(self.handle, iovecs); } - return os.readv(self.handle, iovecs); } - pub fn preadv(self: File, iovecs: []const os.iovec, offset: u64) ReadError!usize { + /// The `iovecs` parameter is mutable because this function needs to mutate the fields in + /// order to handle partial reads from the underlying OS layer. + pub fn readvAll(self: File, iovecs: []os.iovec) ReadError!void { + if (iovecs.len == 0) return; + + var i: usize = 0; + while (true) { + var amt = try self.readv(iovecs[i..]); + while (amt >= iovecs[i].iov_len) { + amt -= iovecs[i].iov_len; + i += 1; + if (i >= iovecs.len) return; + } + iovecs[i].iov_base += amt; + iovecs[i].iov_len -= amt; + } + } + + pub fn preadv(self: File, iovecs: []const os.iovec, offset: u64) PReadError!usize { if (need_async_thread and self.io_mode == .blocking and !self.async_block_allowed) { return std.event.Loop.instance.?.preadv(self.handle, iovecs, offset); + } else { + return os.preadv(self.handle, iovecs, offset); + } + } + + /// The `iovecs` parameter is mutable because this function needs to mutate the fields in + /// order to handle partial reads from the underlying OS layer. + pub fn preadvAll(self: File, iovecs: []const os.iovec, offset: u64) PReadError!void { + if (iovecs.len == 0) return; + + var i: usize = 0; + var off: usize = 0; + while (true) { + var amt = try self.preadv(iovecs[i..], offset + off); + off += amt; + while (amt >= iovecs[i].iov_len) { + amt -= iovecs[i].iov_len; + i += 1; + if (i >= iovecs.len) return; + } + iovecs[i].iov_base += amt; + iovecs[i].iov_len -= amt; } - return os.preadv(self.handle, iovecs, offset); } pub const WriteError = os.WriteError; + pub const PWriteError = os.PWriteError; - pub fn write(self: File, bytes: []const u8) WriteError!void { + pub fn write(self: File, bytes: []const u8) WriteError!usize { if (need_async_thread and self.io_mode == .blocking and !self.async_block_allowed) { return std.event.Loop.instance.?.write(self.handle, bytes); + } else { + return os.write(self.handle, bytes); + } + } + + pub fn writeAll(self: File, bytes: []const u8) WriteError!void { + var index: usize = 0; + while (index < bytes.len) { + index += try self.write(bytes[index..]); } - return os.write(self.handle, bytes); } - pub fn pwrite(self: File, bytes: []const u8, offset: u64) WriteError!void { + pub fn pwrite(self: File, bytes: []const u8, offset: u64) PWriteError!usize { if (need_async_thread and self.io_mode == .blocking and !self.async_block_allowed) { return std.event.Loop.instance.?.pwrite(self.handle, bytes, offset); + } else { + return os.pwrite(self.handle, bytes, offset); } - return os.pwrite(self.handle, bytes, offset); } - pub fn writev(self: File, iovecs: []const os.iovec_const) WriteError!void { + pub fn pwriteAll(self: File, bytes: []const u8, offset: u64) PWriteError!void { + var index: usize = 0; + while (index < bytes.len) { + index += try self.pwrite(bytes[index..], offset + index); + } + } + + pub fn writev(self: File, iovecs: []const os.iovec_const) WriteError!usize { if (need_async_thread and self.io_mode == .blocking and !self.async_block_allowed) { return std.event.Loop.instance.?.writev(self.handle, iovecs); + } else { + return os.writev(self.handle, iovecs); + } + } + + /// The `iovecs` parameter is mutable because this function needs to mutate the fields in + /// order to handle partial writes from the underlying OS layer. + pub fn writevAll(self: File, iovecs: []os.iovec_const) WriteError!void { + if (iovecs.len == 0) return; + + var i: usize = 0; + while (true) { + var amt = try self.writev(iovecs[i..]); + while (amt >= iovecs[i].iov_len) { + amt -= iovecs[i].iov_len; + i += 1; + if (i >= iovecs.len) return; + } + iovecs[i].iov_base += amt; + iovecs[i].iov_len -= amt; } - return os.writev(self.handle, iovecs); } - pub fn pwritev(self: File, iovecs: []const os.iovec_const, offset: usize) WriteError!void { + pub fn pwritev(self: File, iovecs: []os.iovec_const, offset: usize) PWriteError!usize { if (need_async_thread and self.io_mode == .blocking and !self.async_block_allowed) { - return std.event.Loop.instance.?.pwritev(self.handle, iovecs); + return std.event.Loop.instance.?.pwritev(self.handle, iovecs, offset); + } else { + return os.pwritev(self.handle, iovecs, offset); + } + } + + /// The `iovecs` parameter is mutable because this function needs to mutate the fields in + /// order to handle partial writes from the underlying OS layer. + pub fn pwritevAll(self: File, iovecs: []os.iovec_const, offset: usize) PWriteError!void { + if (iovecs.len == 0) return; + + var i: usize = 0; + var off: usize = 0; + while (true) { + var amt = try self.pwritev(iovecs[i..], offset + off); + off += amt; + while (amt >= iovecs[i].iov_len) { + amt -= iovecs[i].iov_len; + i += 1; + if (i >= iovecs.len) return; + } + iovecs[i].iov_base += amt; + iovecs[i].iov_len -= amt; + } + } + + pub const WriteFileOptions = struct { + in_offset: u64 = 0, + + /// `null` means the entire file. `0` means no bytes from the file. + /// When this is `null`, trailers must be sent in a separate writev() call + /// due to a flaw in the BSD sendfile API. Other operating systems, such as + /// Linux, already do this anyway due to API limitations. + /// If the size of the source file is known, passing the size here will save one syscall. + in_len: ?u64 = null, + + headers_and_trailers: []os.iovec_const = &[0]os.iovec_const{}, + + /// The trailer count is inferred from `headers_and_trailers.len - header_count` + header_count: usize = 0, + }; + + pub const WriteFileError = os.SendFileError; + + /// TODO integrate with async I/O + pub fn writeFileAll(self: File, in_file: File, args: WriteFileOptions) WriteFileError!void { + const count = blk: { + if (args.in_len) |l| { + if (l == 0) { + return self.writevAll(args.headers_and_trailers); + } else { + break :blk l; + } + } else { + break :blk 0; + } + }; + const headers = args.headers_and_trailers[0..args.header_count]; + const trailers = args.headers_and_trailers[args.header_count..]; + const zero_iovec = &[0]os.iovec_const{}; + // When reading the whole file, we cannot put the trailers in the sendfile() syscall, + // because we have no way to determine whether a partial write is past the end of the file or not. + const trls = if (count == 0) zero_iovec else trailers; + const offset = args.in_offset; + const out_fd = self.handle; + const in_fd = in_file.handle; + const flags = 0; + var amt: usize = 0; + hdrs: { + var i: usize = 0; + while (i < headers.len) { + amt = try os.sendfile(out_fd, in_fd, offset, count, headers[i..], trls, flags); + while (amt >= headers[i].iov_len) { + amt -= headers[i].iov_len; + i += 1; + if (i >= headers.len) break :hdrs; + } + headers[i].iov_base += amt; + headers[i].iov_len -= amt; + } + } + if (count == 0) { + var off: u64 = amt; + while (true) { + amt = try os.sendfile(out_fd, in_fd, offset + off, 0, zero_iovec, zero_iovec, flags); + if (amt == 0) break; + off += amt; + } + } else { + var off: u64 = amt; + while (off < count) { + amt = try os.sendfile(out_fd, in_fd, offset + off, count - off, zero_iovec, trailers, flags); + off += amt; + } + amt = @intCast(usize, off - count); + } + var i: usize = 0; + while (i < trailers.len) { + while (amt >= headers[i].iov_len) { + amt -= trailers[i].iov_len; + i += 1; + if (i >= trailers.len) return; + } + trailers[i].iov_base += amt; + trailers[i].iov_len -= amt; + amt = try os.writev(self.handle, trailers[i..]); } - return os.pwritev(self.handle, iovecs); } pub fn inStream(file: File) InStream { @@ -335,7 +532,7 @@ pub const File = struct { pub const Error = WriteError; pub const Stream = io.OutStream(Error); - fn writeFn(out_stream: *Stream, bytes: []const u8) Error!void { + fn writeFn(out_stream: *Stream, bytes: []const u8) Error!usize { const self = @fieldParentPtr(OutStream, "stream", out_stream); return self.file.write(bytes); } diff --git a/lib/std/fs/watch.zig b/lib/std/fs/watch.zig index 1eb5a97ff1..3180240a72 100644 --- a/lib/std/fs/watch.zig +++ b/lib/std/fs/watch.zig @@ -618,11 +618,10 @@ test "write a file, watch it, write it again" { // TODO re-enable this test if (true) return error.SkipZigTest; - const allocator = std.heap.page_allocator; - - try os.makePath(allocator, test_tmp_dir); + try fs.cwd().makePath(test_tmp_dir); defer os.deleteTree(test_tmp_dir) catch {}; + const allocator = std.heap.page_allocator; return testFsWatch(&allocator); } diff --git a/lib/std/io.zig b/lib/std/io.zig index d0bf26d548..99e9391f1d 100644 --- a/lib/std/io.zig +++ b/lib/std/io.zig @@ -437,10 +437,11 @@ pub fn BitInStream(endian: builtin.Endian, comptime Error: type) type { }; } -/// This is a simple OutStream that writes to a fixed buffer, and returns an error -/// when it runs out of space. +/// This is a simple OutStream that writes to a fixed buffer. If the returned number +/// of bytes written is less than requested, the buffer is full. +/// Returns error.OutOfMemory when no bytes would be written. pub const SliceOutStream = struct { - pub const Error = error{OutOfSpace}; + pub const Error = error{OutOfMemory}; pub const Stream = OutStream(Error); stream: Stream, @@ -464,9 +465,11 @@ pub const SliceOutStream = struct { self.pos = 0; } - fn writeFn(out_stream: *Stream, bytes: []const u8) Error!void { + fn writeFn(out_stream: *Stream, bytes: []const u8) Error!usize { const self = @fieldParentPtr(SliceOutStream, "stream", out_stream); + if (bytes.len == 0) return 0; + assert(self.pos <= self.slice.len); const n = if (self.pos + bytes.len <= self.slice.len) @@ -477,9 +480,9 @@ pub const SliceOutStream = struct { std.mem.copy(u8, self.slice[self.pos .. self.pos + n], bytes[0..n]); self.pos += n; - if (n < bytes.len) { - return Error.OutOfSpace; - } + if (n == 0) return error.OutOfMemory; + + return n; } }; @@ -508,7 +511,9 @@ pub const NullOutStream = struct { }; } - fn writeFn(out_stream: *Stream, bytes: []const u8) Error!void {} + fn writeFn(out_stream: *Stream, bytes: []const u8) Error!usize { + return bytes.len; + } }; test "io.NullOutStream" { @@ -536,10 +541,11 @@ pub fn CountingOutStream(comptime OutStreamError: type) type { }; } - fn writeFn(out_stream: *Stream, bytes: []const u8) OutStreamError!void { + fn writeFn(out_stream: *Stream, bytes: []const u8) OutStreamError!usize { const self = @fieldParentPtr(Self, "stream", out_stream); try self.child_stream.write(bytes); self.bytes_written += bytes.len; + return bytes.len; } }; } @@ -588,13 +594,14 @@ pub fn BufferedOutStreamCustom(comptime buffer_size: usize, comptime OutStreamEr } } - fn writeFn(out_stream: *Stream, bytes: []const u8) Error!void { + fn writeFn(out_stream: *Stream, bytes: []const u8) Error!usize { const self = @fieldParentPtr(Self, "stream", out_stream); if (bytes.len >= self.fifo.writableLength()) { try self.flush(); - return self.unbuffered_out_stream.write(bytes); + return self.unbuffered_out_stream.writeOnce(bytes); } self.fifo.writeAssumeCapacity(bytes); + return bytes.len; } }; } @@ -614,9 +621,10 @@ pub const BufferOutStream = struct { }; } - fn writeFn(out_stream: *Stream, bytes: []const u8) !void { + fn writeFn(out_stream: *Stream, bytes: []const u8) !usize { const self = @fieldParentPtr(BufferOutStream, "stream", out_stream); - return self.buffer.append(bytes); + try self.buffer.append(bytes); + return bytes.len; } }; @@ -734,17 +742,17 @@ pub fn BitOutStream(endian: builtin.Endian, comptime Error: type) type { self.bit_count = 0; } - pub fn write(self_stream: *Stream, buffer: []const u8) Error!void { + pub fn write(self_stream: *Stream, buffer: []const u8) Error!usize { var self = @fieldParentPtr(Self, "stream", self_stream); - //@NOTE: I'm not sure this is a good idea, maybe flushBits should be forced + // TODO: I'm not sure this is a good idea, maybe flushBits should be forced if (self.bit_count > 0) { for (buffer) |b, i| try self.writeBits(b, u8_bit_count); - return; + return buffer.len; } - return self.out_stream.write(buffer); + return self.out_stream.writeOnce(buffer); } }; } diff --git a/lib/std/io/c_out_stream.zig b/lib/std/io/c_out_stream.zig index 8b341e6937..adaa3fcbaf 100644 --- a/lib/std/io/c_out_stream.zig +++ b/lib/std/io/c_out_stream.zig @@ -20,10 +20,10 @@ pub const COutStream = struct { }; } - fn writeFn(out_stream: *Stream, bytes: []const u8) Error!void { + fn writeFn(out_stream: *Stream, bytes: []const u8) Error!usize { const self = @fieldParentPtr(COutStream, "stream", out_stream); const amt_written = std.c.fwrite(bytes.ptr, 1, bytes.len, self.c_file); - if (amt_written == bytes.len) return; + if (amt_written >= 0) return amt_written; switch (std.c._errno().*) { 0 => unreachable, os.EINVAL => unreachable, diff --git a/lib/std/io/out_stream.zig b/lib/std/io/out_stream.zig index 7f534865f5..cb75b27bf1 100644 --- a/lib/std/io/out_stream.zig +++ b/lib/std/io/out_stream.zig @@ -14,13 +14,13 @@ pub fn OutStream(comptime WriteError: type) type { const Self = @This(); pub const Error = WriteError; pub const WriteFn = if (std.io.is_async) - async fn (self: *Self, bytes: []const u8) Error!void + async fn (self: *Self, bytes: []const u8) Error!usize else - fn (self: *Self, bytes: []const u8) Error!void; + fn (self: *Self, bytes: []const u8) Error!usize; writeFn: WriteFn, - pub fn write(self: *Self, bytes: []const u8) Error!void { + pub fn writeOnce(self: *Self, bytes: []const u8) Error!usize { if (std.io.is_async) { // Let's not be writing 0xaa in safe modes for upwards of 4 MiB for every stream write. @setRuntimeSafety(false); @@ -31,6 +31,13 @@ pub fn OutStream(comptime WriteError: type) type { } } + pub fn write(self: *Self, bytes: []const u8) Error!void { + var index: usize = 0; + while (index != bytes.len) { + index += try self.writeOnce(bytes[index..]); + } + } + pub fn print(self: *Self, comptime format: []const u8, args: var) Error!void { return std.fmt.format(self, Error, write, format, args); } diff --git a/lib/std/io/test.zig b/lib/std/io/test.zig index a5b0913a60..bc194046f6 100644 --- a/lib/std/io/test.zig +++ b/lib/std/io/test.zig @@ -134,13 +134,13 @@ test "SliceOutStream" { try ss.stream.write("world"); expect(mem.eql(u8, ss.getWritten(), "Helloworld")); - expectError(error.OutOfSpace, ss.stream.write("!")); + expectError(error.OutOfMemory, ss.stream.write("!")); expect(mem.eql(u8, ss.getWritten(), "Helloworld")); ss.reset(); expect(ss.getWritten().len == 0); - expectError(error.OutOfSpace, ss.stream.write("Hello world!")); + expectError(error.OutOfMemory, ss.stream.write("Hello world!")); expect(mem.eql(u8, ss.getWritten(), "Hello worl")); } @@ -613,7 +613,7 @@ test "File seek ops" { fs.cwd().deleteFile(tmp_file_name) catch {}; } - try file.write(&([_]u8{0x55} ** 8192)); + try file.writeAll(&([_]u8{0x55} ** 8192)); // Seek to the end try file.seekFromEnd(0); diff --git a/lib/std/os.zig b/lib/std/os.zig index fbfef4ac4c..90ad3e03a9 100644 --- a/lib/std/os.zig +++ b/lib/std/os.zig @@ -298,6 +298,11 @@ pub const ReadError = error{ /// buf.len. If 0 bytes were read, that means EOF. /// If the application has a global event loop enabled, EAGAIN is handled /// via the event loop. Otherwise EAGAIN results in error.WouldBlock. +/// +/// Linux has a limit on how many bytes may be transferred in one `read` call, which is `0x7ffff000` +/// on both 64-bit and 32-bit systems. This is due to using a signed C int as the return value, as +/// well as stuffing the errno codes into the last `4096` values. This is noted on the `read` man page. +/// For POSIX the limit is `math.maxInt(isize)`. pub fn read(fd: fd_t, buf: []u8) ReadError!usize { if (builtin.os.tag == .windows) { return windows.ReadFile(fd, buf, null); @@ -316,8 +321,15 @@ pub fn read(fd: fd_t, buf: []u8) ReadError!usize { } } + // Prevents EINVAL. + const max_count = switch (std.Target.current.os.tag) { + .linux => 0x7ffff000, + else => math.maxInt(isize), + }; + const adjusted_len = math.min(max_count, buf.len); + while (true) { - const rc = system.read(fd, buf.ptr, buf.len); + const rc = system.read(fd, buf.ptr, adjusted_len); switch (errno(rc)) { 0 => return @intCast(usize, rc), EINTR => continue, @@ -352,32 +364,18 @@ pub fn read(fd: fd_t, buf: []u8) ReadError!usize { /// * Windows /// On these systems, the read races with concurrent writes to the same file descriptor. pub fn readv(fd: fd_t, iov: []const iovec) ReadError!usize { - if (builtin.os.tag == .windows) { - // TODO batch these into parallel requests - var off: usize = 0; - var iov_i: usize = 0; - var inner_off: usize = 0; - while (true) { - const v = iov[iov_i]; - const amt_read = try read(fd, v.iov_base[inner_off .. v.iov_len - inner_off]); - off += amt_read; - inner_off += amt_read; - if (inner_off == v.len) { - iov_i += 1; - inner_off = 0; - if (iov_i == iov.len) { - return off; - } - } - if (amt_read == 0) return off; // EOF - } else unreachable; // TODO https://github.com/ziglang/zig/issues/707 + if (std.Target.current.os.tag == .windows) { + // TODO does Windows have a way to read an io vector? + if (iov.len == 0) return @as(usize, 0); + const first = iov[0]; + return read(fd, first.iov_base[0..first.iov_len]); } while (true) { // TODO handle the case when iov_len is too large and get rid of this @intCast - const rc = system.readv(fd, iov.ptr, @intCast(u32, iov.len)); + const rc = system.readv(fd, iov.ptr, iov_count); switch (errno(rc)) { - 0 => return @bitCast(usize, rc), + 0 => return @intCast(usize, rc), EINTR => continue, EINVAL => unreachable, EFAULT => unreachable, @@ -397,6 +395,8 @@ pub fn readv(fd: fd_t, iov: []const iovec) ReadError!usize { } } +pub const PReadError = ReadError || error{Unseekable}; + /// Number of bytes read is returned. Upon reading end-of-file, zero is returned. /// /// Retries when interrupted by a signal. @@ -405,7 +405,7 @@ pub fn readv(fd: fd_t, iov: []const iovec) ReadError!usize { /// via the event loop. Otherwise EAGAIN results in `error.WouldBlock`. /// On Windows, if the application has a global event loop enabled, I/O Completion Ports are /// used to perform the I/O. `error.WouldBlock` is not possible on Windows. -pub fn pread(fd: fd_t, buf: []u8, offset: u64) ReadError!usize { +pub fn pread(fd: fd_t, buf: []u8, offset: u64) PReadError!usize { if (builtin.os.tag == .windows) { return windows.ReadFile(fd, buf, offset); } @@ -429,6 +429,9 @@ pub fn pread(fd: fd_t, buf: []u8, offset: u64) ReadError!usize { ENOBUFS => return error.SystemResources, ENOMEM => return error.SystemResources, ECONNRESET => return error.ConnectionResetByPeer, + ENXIO => return error.Unseekable, + ESPIPE => return error.Unseekable, + EOVERFLOW => return error.Unseekable, else => |err| return unexpectedErrno(err), } } @@ -448,75 +451,23 @@ pub fn pread(fd: fd_t, buf: []u8, offset: u64) ReadError!usize { /// * Darwin /// * Windows /// On these systems, the read races with concurrent writes to the same file descriptor. -pub fn preadv(fd: fd_t, iov: []const iovec, offset: u64) ReadError!usize { - if (comptime std.Target.current.isDarwin()) { - // Darwin does not have preadv but it does have pread. - var off: usize = 0; - var iov_i: usize = 0; - var inner_off: usize = 0; - while (true) { - const v = iov[iov_i]; - const rc = darwin.pread(fd, v.iov_base + inner_off, v.iov_len - inner_off, offset + off); - const err = darwin.getErrno(rc); - switch (err) { - 0 => { - const amt_read = @bitCast(usize, rc); - off += amt_read; - inner_off += amt_read; - if (inner_off == v.iov_len) { - iov_i += 1; - inner_off = 0; - if (iov_i == iov.len) { - return off; - } - } - if (rc == 0) return off; // EOF - continue; - }, - EINTR => continue, - EINVAL => unreachable, - EFAULT => unreachable, - ESPIPE => unreachable, // fd is not seekable - EAGAIN => if (std.event.Loop.instance) |loop| { - loop.waitUntilFdReadable(fd); - continue; - } else { - return error.WouldBlock; - }, - EBADF => unreachable, // always a race condition - EIO => return error.InputOutput, - EISDIR => return error.IsDir, - ENOBUFS => return error.SystemResources, - ENOMEM => return error.SystemResources, - else => return unexpectedErrno(err), - } - } +pub fn preadv(fd: fd_t, iov: []const iovec, offset: u64) PReadError!usize { + const have_pread_but_not_preadv = switch (std.Target.current.os.tag) { + .windows, .macosx, .ios, .watchos, .tvos => true, + else => false, + }; + if (have_pread_but_not_preadv) { + // We could loop here; but proper usage of `preadv` must handle partial reads anyway. + // So we simply read into the first vector only. + if (iov.len == 0) return @as(usize, 0); + const first = iov[0]; + return pread(fd, first.iov_base[0..first.iov_len], offset); } - if (builtin.os.tag == .windows) { - // TODO batch these into parallel requests - var off: usize = 0; - var iov_i: usize = 0; - var inner_off: usize = 0; - while (true) { - const v = iov[iov_i]; - const amt_read = try pread(fd, v.iov_base[inner_off .. v.iov_len - inner_off], offset + off); - off += amt_read; - inner_off += amt_read; - if (inner_off == v.len) { - iov_i += 1; - inner_off = 0; - if (iov_i == iov.len) { - return off; - } - } - if (amt_read == 0) return off; // EOF - } else unreachable; // TODO https://github.com/ziglang/zig/issues/707 - } + const iov_count = math.cast(u31, iov.len) catch math.maxInt(u31); while (true) { - // TODO handle the case when iov_len is too large and get rid of this @intCast - const rc = system.preadv(fd, iov.ptr, @intCast(u32, iov.len), offset); + const rc = system.preadv(fd, iov.ptr, iov_count, offset); switch (errno(rc)) { 0 => return @bitCast(usize, rc), EINTR => continue, @@ -533,6 +484,9 @@ pub fn preadv(fd: fd_t, iov: []const iovec, offset: u64) ReadError!usize { EISDIR => return error.IsDir, ENOBUFS => return error.SystemResources, ENOMEM => return error.SystemResources, + ENXIO => return error.Unseekable, + ESPIPE => return error.Unseekable, + EOVERFLOW => return error.Unseekable, else => |err| return unexpectedErrno(err), } } @@ -553,10 +507,28 @@ pub const WriteError = error{ WouldBlock, } || UnexpectedError; -/// Write to a file descriptor. Keeps trying if it gets interrupted. -/// If the application has a global event loop enabled, EAGAIN is handled -/// via the event loop. Otherwise EAGAIN results in error.WouldBlock. -pub fn write(fd: fd_t, bytes: []const u8) WriteError!void { +/// Write to a file descriptor. +/// Retries when interrupted by a signal. +/// Returns the number of bytes written. If nonzero bytes were supplied, this will be nonzero. +/// +/// Note that a successful write() may transfer fewer than count bytes. Such partial writes can +/// occur for various reasons; for example, because there was insufficient space on the disk +/// device to write all of the requested bytes, or because a blocked write() to a socket, pipe, or +/// similar was interrupted by a signal handler after it had transferred some, but before it had +/// transferred all of the requested bytes. In the event of a partial write, the caller can make +/// another write() call to transfer the remaining bytes. The subsequent call will either +/// transfer further bytes or may result in an error (e.g., if the disk is now full). +/// +/// For POSIX systems, if the application has a global event loop enabled, EAGAIN is handled +/// via the event loop. Otherwise EAGAIN results in `error.WouldBlock`. +/// On Windows, if the application has a global event loop enabled, I/O Completion Ports are +/// used to perform the I/O. `error.WouldBlock` is not possible on Windows. +/// +/// Linux has a limit on how many bytes may be transferred in one `write` call, which is `0x7ffff000` +/// on both 64-bit and 32-bit systems. This is due to using a signed C int as the return value, as +/// well as stuffing the errno codes into the last `4096` values. This is noted on the `write` man page. +/// The corresponding POSIX limit is `math.maxInt(isize)`. +pub fn write(fd: fd_t, bytes: []const u8) WriteError!usize { if (builtin.os.tag == .windows) { return windows.WriteFile(fd, bytes, null); } @@ -568,26 +540,21 @@ pub fn write(fd: fd_t, bytes: []const u8) WriteError!void { }}; var nwritten: usize = undefined; switch (wasi.fd_write(fd, &ciovs, ciovs.len, &nwritten)) { - 0 => return, + 0 => return nwritten, else => |err| return unexpectedErrno(err), } } - // Linux can return EINVAL when write amount is > 0x7ffff000 - // See https://github.com/ziglang/zig/pull/743#issuecomment-363165856 - // TODO audit this. Shawn Landden says that this is not actually true. - // if this logic should stay, move it to std.os.linux - const max_bytes_len = 0x7ffff000; + const max_count = switch (std.Target.current.os.tag) { + .linux => 0x7ffff000, + else => math.maxInt(isize), + }; + const adjusted_len = math.min(max_count, bytes.len); - var index: usize = 0; - while (index < bytes.len) { - const amt_to_write = math.min(bytes.len - index, @as(usize, max_bytes_len)); - const rc = system.write(fd, bytes.ptr + index, amt_to_write); + while (true) { + const rc = system.write(fd, bytes.ptr, adjusted_len); switch (errno(rc)) { - 0 => { - index += @intCast(usize, rc); - continue; - }, + 0 => return @intCast(usize, rc), EINTR => continue, EINVAL => unreachable, EFAULT => unreachable, @@ -611,14 +578,36 @@ pub fn write(fd: fd_t, bytes: []const u8) WriteError!void { } /// Write multiple buffers to a file descriptor. -/// If the application has a global event loop enabled, EAGAIN is handled -/// via the event loop. Otherwise EAGAIN results in error.WouldBlock. -pub fn writev(fd: fd_t, iov: []const iovec_const) WriteError!void { +/// Retries when interrupted by a signal. +/// Returns the number of bytes written. If nonzero bytes were supplied, this will be nonzero. +/// +/// Note that a successful write() may transfer fewer bytes than supplied. Such partial writes can +/// occur for various reasons; for example, because there was insufficient space on the disk +/// device to write all of the requested bytes, or because a blocked write() to a socket, pipe, or +/// similar was interrupted by a signal handler after it had transferred some, but before it had +/// transferred all of the requested bytes. In the event of a partial write, the caller can make +/// another write() call to transfer the remaining bytes. The subsequent call will either +/// transfer further bytes or may result in an error (e.g., if the disk is now full). +/// +/// For POSIX systems, if the application has a global event loop enabled, EAGAIN is handled +/// via the event loop. Otherwise EAGAIN results in `error.WouldBlock`. +/// On Windows, if the application has a global event loop enabled, I/O Completion Ports are +/// used to perform the I/O. `error.WouldBlock` is not possible on Windows. +/// +/// If `iov.len` is larger than will fit in a `u31`, a partial write will occur. +pub fn writev(fd: fd_t, iov: []const iovec_const) WriteError!usize { + if (std.Target.current.os.tag == .windows) { + // TODO does Windows have a way to write an io vector? + if (iov.len == 0) return @as(usize, 0); + const first = iov[0]; + return write(fd, first.iov_base[0..first.iov_len]); + } + + const iov_count = math.cast(u31, iov.len) catch math.maxInt(u31); while (true) { - // TODO handle the case when iov_len is too large and get rid of this @intCast - const rc = system.writev(fd, iov.ptr, @intCast(u32, iov.len)); + const rc = system.writev(fd, iov.ptr, iov_count); switch (errno(rc)) { - 0 => return, + 0 => return @intCast(usize, rc), EINTR => continue, EINVAL => unreachable, EFAULT => unreachable, @@ -641,23 +630,45 @@ pub fn writev(fd: fd_t, iov: []const iovec_const) WriteError!void { } } +pub const PWriteError = WriteError || error{Unseekable}; + /// Write to a file descriptor, with a position offset. -/// /// Retries when interrupted by a signal. +/// Returns the number of bytes written. If nonzero bytes were supplied, this will be nonzero. +/// +/// Note that a successful write() may transfer fewer bytes than supplied. Such partial writes can +/// occur for various reasons; for example, because there was insufficient space on the disk +/// device to write all of the requested bytes, or because a blocked write() to a socket, pipe, or +/// similar was interrupted by a signal handler after it had transferred some, but before it had +/// transferred all of the requested bytes. In the event of a partial write, the caller can make +/// another write() call to transfer the remaining bytes. The subsequent call will either +/// transfer further bytes or may result in an error (e.g., if the disk is now full). /// /// For POSIX systems, if the application has a global event loop enabled, EAGAIN is handled /// via the event loop. Otherwise EAGAIN results in `error.WouldBlock`. /// On Windows, if the application has a global event loop enabled, I/O Completion Ports are /// used to perform the I/O. `error.WouldBlock` is not possible on Windows. -pub fn pwrite(fd: fd_t, bytes: []const u8, offset: u64) WriteError!void { +/// +/// Linux has a limit on how many bytes may be transferred in one `pwrite` call, which is `0x7ffff000` +/// on both 64-bit and 32-bit systems. This is due to using a signed C int as the return value, as +/// well as stuffing the errno codes into the last `4096` values. This is noted on the `write` man page. +/// The corresponding POSIX limit is `math.maxInt(isize)`. +pub fn pwrite(fd: fd_t, bytes: []const u8, offset: u64) PWriteError!usize { if (std.Target.current.os.tag == .windows) { return windows.WriteFile(fd, bytes, offset); } + // Prevent EINVAL. + const max_count = switch (std.Target.current.os.tag) { + .linux => 0x7ffff000, + else => math.maxInt(isize), + }; + const adjusted_len = math.min(max_count, bytes.len); + while (true) { - const rc = system.pwrite(fd, bytes.ptr, bytes.len, offset); + const rc = system.pwrite(fd, bytes.ptr, adjusted_len, offset); switch (errno(rc)) { - 0 => return, + 0 => return @intCast(usize, rc), EINTR => continue, EINVAL => unreachable, EFAULT => unreachable, @@ -675,84 +686,54 @@ pub fn pwrite(fd: fd_t, bytes: []const u8, offset: u64) WriteError!void { ENOSPC => return error.NoSpaceLeft, EPERM => return error.AccessDenied, EPIPE => return error.BrokenPipe, + ENXIO => return error.Unseekable, + ESPIPE => return error.Unseekable, + EOVERFLOW => return error.Unseekable, else => |err| return unexpectedErrno(err), } } } /// Write multiple buffers to a file descriptor, with a position offset. -/// /// Retries when interrupted by a signal. +/// Returns the number of bytes written. If nonzero bytes were supplied, this will be nonzero. +/// +/// Note that a successful write() may transfer fewer than count bytes. Such partial writes can +/// occur for various reasons; for example, because there was insufficient space on the disk +/// device to write all of the requested bytes, or because a blocked write() to a socket, pipe, or +/// similar was interrupted by a signal handler after it had transferred some, but before it had +/// transferred all of the requested bytes. In the event of a partial write, the caller can make +/// another write() call to transfer the remaining bytes. The subsequent call will either +/// transfer further bytes or may result in an error (e.g., if the disk is now full). /// /// If the application has a global event loop enabled, EAGAIN is handled /// via the event loop. Otherwise EAGAIN results in `error.WouldBlock`. /// -/// This operation is non-atomic on the following systems: +/// The following systems do not have this syscall, and will return partial writes if more than one +/// vector is provided: /// * Darwin /// * Windows -/// On these systems, the write races with concurrent writes to the same file descriptor, and -/// the file can be in a partially written state when an error occurs. -pub fn pwritev(fd: fd_t, iov: []const iovec_const, offset: u64) WriteError!void { - if (comptime std.Target.current.isDarwin()) { - // Darwin does not have pwritev but it does have pwrite. - var off: usize = 0; - var iov_i: usize = 0; - var inner_off: usize = 0; - while (true) { - const v = iov[iov_i]; - const rc = darwin.pwrite(fd, v.iov_base + inner_off, v.iov_len - inner_off, offset + off); - const err = darwin.getErrno(rc); - switch (err) { - 0 => { - const amt_written = @bitCast(usize, rc); - off += amt_written; - inner_off += amt_written; - if (inner_off == v.iov_len) { - iov_i += 1; - inner_off = 0; - if (iov_i == iov.len) { - return; - } - } - continue; - }, - EINTR => continue, - ESPIPE => unreachable, // `fd` is not seekable. - EINVAL => unreachable, - EFAULT => unreachable, - EAGAIN => if (std.event.Loop.instance) |loop| { - loop.waitUntilFdWritable(fd); - continue; - } else { - return error.WouldBlock; - }, - EBADF => unreachable, // Always a race condition. - EDESTADDRREQ => unreachable, // `connect` was never called. - EDQUOT => return error.DiskQuota, - EFBIG => return error.FileTooBig, - EIO => return error.InputOutput, - ENOSPC => return error.NoSpaceLeft, - EPERM => return error.AccessDenied, - EPIPE => return error.BrokenPipe, - else => return unexpectedErrno(err), - } - } - } +/// +/// If `iov.len` is larger than will fit in a `u31`, a partial write will occur. +pub fn pwritev(fd: fd_t, iov: []const iovec_const, offset: u64) PWriteError!usize { + const have_pwrite_but_not_pwritev = switch (std.Target.current.os.tag) { + .windows, .macosx, .ios, .watchos, .tvos => true, + else => false, + }; - if (std.Target.current.os.tag == .windows) { - var off = offset; - for (iov) |item| { - try pwrite(fd, item.iov_base[0..item.iov_len], off); - off += buf.len; - } - return; + if (have_pwrite_but_not_pwritev) { + // We could loop here; but proper usage of `pwritev` must handle partial writes anyway. + // So we simply write the first vector only. + if (iov.len == 0) return @as(usize, 0); + const first = iov[0]; + return pwrite(fd, first.iov_base[0..first.iov_len], offset); } + const iov_count = math.cast(u31, iov.len) catch math.maxInt(u31); while (true) { - // TODO handle the case when iov_len is too large and get rid of this @intCast - const rc = system.pwritev(fd, iov.ptr, @intCast(u32, iov.len), offset); + const rc = system.pwritev(fd, iov.ptr, iov_count, offset); switch (errno(rc)) { - 0 => return, + 0 => return @intCast(usize, rc), EINTR => continue, EINVAL => unreachable, EFAULT => unreachable, @@ -770,6 +751,9 @@ pub fn pwritev(fd: fd_t, iov: []const iovec_const, offset: u64) WriteError!void ENOSPC => return error.NoSpaceLeft, EPERM => return error.AccessDenied, EPIPE => return error.BrokenPipe, + ENXIO => return error.Unseekable, + ESPIPE => return error.Unseekable, + EOVERFLOW => return error.Unseekable, else => |err| return unexpectedErrno(err), } } @@ -1371,7 +1355,6 @@ pub const UnlinkatError = UnlinkError || error{ /// Delete a file name and possibly the file it refers to, based on an open directory handle. /// Asserts that the path parameter has no null bytes. pub fn unlinkat(dirfd: fd_t, file_path: []const u8, flags: u32) UnlinkatError!void { - if (std.debug.runtime_safety) for (file_path) |byte| assert(byte != 0); if (builtin.os.tag == .windows) { const file_path_w = try windows.sliceToPrefixedFileW(file_path); return unlinkatW(dirfd, &file_path_w, flags); @@ -1556,25 +1539,69 @@ pub const MakeDirError = error{ ReadOnlyFileSystem, InvalidUtf8, BadPathName, + NoDevice, } || UnexpectedError; +pub fn mkdirat(dir_fd: fd_t, sub_dir_path: []const u8, mode: u32) MakeDirError!void { + if (builtin.os.tag == .windows) { + const sub_dir_path_w = try windows.sliceToPrefixedFileW(sub_dir_path); + return mkdiratW(dir_fd, &sub_dir_path_w, mode); + } else { + const sub_dir_path_c = try toPosixPath(sub_dir_path); + return mkdiratC(dir_fd, &sub_dir_path_c, mode); + } +} + +pub fn mkdiratC(dir_fd: fd_t, sub_dir_path: [*:0]const u8, mode: u32) MakeDirError!void { + if (builtin.os.tag == .windows) { + const sub_dir_path_w = try windows.cStrToPrefixedFileW(sub_dir_path); + return mkdiratW(dir_fd, &sub_dir_path_w, mode); + } + switch (errno(system.mkdirat(dir_fd, sub_dir_path, mode))) { + 0 => return, + EACCES => return error.AccessDenied, + EBADF => unreachable, + EPERM => return error.AccessDenied, + EDQUOT => return error.DiskQuota, + EEXIST => return error.PathAlreadyExists, + EFAULT => unreachable, + ELOOP => return error.SymLinkLoop, + EMLINK => return error.LinkQuotaExceeded, + ENAMETOOLONG => return error.NameTooLong, + ENOENT => return error.FileNotFound, + ENOMEM => return error.SystemResources, + ENOSPC => return error.NoSpaceLeft, + ENOTDIR => return error.NotDir, + EROFS => return error.ReadOnlyFileSystem, + else => |err| return unexpectedErrno(err), + } +} + +pub fn mkdiratW(dir_fd: fd_t, sub_path_w: [*:0]const u16, mode: u32) MakeDirError!void { + const sub_dir_handle = try windows.CreateDirectoryW(dir_fd, sub_path_w, null); + windows.CloseHandle(sub_dir_handle); +} + /// Create a directory. /// `mode` is ignored on Windows. pub fn mkdir(dir_path: []const u8, mode: u32) MakeDirError!void { if (builtin.os.tag == .windows) { - const dir_path_w = try windows.sliceToPrefixedFileW(dir_path); - return windows.CreateDirectoryW(&dir_path_w, null); + const sub_dir_handle = try windows.CreateDirectory(null, dir_path, null); + windows.CloseHandle(sub_dir_handle); + return; } else { const dir_path_c = try toPosixPath(dir_path); - return mkdirC(&dir_path_c, mode); + return mkdirZ(&dir_path_c, mode); } } /// Same as `mkdir` but the parameter is a null-terminated UTF8-encoded string. -pub fn mkdirC(dir_path: [*:0]const u8, mode: u32) MakeDirError!void { +pub fn mkdirZ(dir_path: [*:0]const u8, mode: u32) MakeDirError!void { if (builtin.os.tag == .windows) { const dir_path_w = try windows.cStrToPrefixedFileW(dir_path); - return windows.CreateDirectoryW(&dir_path_w, null); + const sub_dir_handle = try windows.CreateDirectoryW(null, &dir_path_w, null); + windows.CloseHandle(sub_dir_handle); + return; } switch (errno(system.mkdir(dir_path, mode))) { 0 => return, @@ -1687,6 +1714,26 @@ pub fn chdirC(dir_path: [*:0]const u8) ChangeCurDirError!void { } } +pub const FchdirError = error{ + AccessDenied, + NotDir, + FileSystem, +} || UnexpectedError; + +pub fn fchdir(dirfd: fd_t) FchdirError!void { + while (true) { + switch (errno(system.fchdir(dirfd))) { + 0 => return, + EACCES => return error.AccessDenied, + EBADF => unreachable, + ENOTDIR => return error.NotDir, + EINTR => continue, + EIO => return error.FileSystem, + else => |err| return unexpectedErrno(err), + } + } +} + pub const ReadLinkError = error{ AccessDenied, FileSystem, @@ -2338,6 +2385,29 @@ pub fn fstat(fd: fd_t) FStatError!Stat { } } +const FStatAtError = FStatError || error{NameTooLong}; + +pub fn fstatat(dirfd: fd_t, pathname: []const u8, flags: u32) FStatAtError![]Stat { + const pathname_c = try toPosixPath(pathname); + return fstatatC(dirfd, &pathname_c, flags); +} + +pub fn fstatatC(dirfd: fd_t, pathname: [*:0]const u8, flags: u32) FStatAtError!Stat { + var stat: Stat = undefined; + switch (errno(system.fstatat(dirfd, pathname, &stat, flags))) { + 0 => return stat, + EINVAL => unreachable, + EBADF => unreachable, // Always a race condition. + ENOMEM => return error.SystemResources, + EACCES => return error.AccessDenied, + EFAULT => unreachable, + ENAMETOOLONG => return error.NameTooLong, + ENOENT => return error.FileNotFound, + ENOTDIR => return error.FileNotFound, + else => |err| return unexpectedErrno(err), + } +} + pub const KQueueError = error{ /// The per-process limit on the number of open file descriptors has been reached. ProcessFdQuotaExceeded, @@ -3185,6 +3255,7 @@ pub fn sched_getaffinity(pid: pid_t) SchedGetAffinityError!cpu_set_t { /// Used to convert a slice to a null terminated slice on the stack. /// TODO https://github.com/ziglang/zig/issues/287 pub fn toPosixPath(file_path: []const u8) ![PATH_MAX - 1:0]u8 { + if (std.debug.runtime_safety) assert(std.mem.indexOfScalar(u8, file_path, 0) == null); var path_with_null: [PATH_MAX - 1:0]u8 = undefined; // >= rather than > to make room for the null byte if (file_path.len >= PATH_MAX) return error.NameTooLong; @@ -3389,7 +3460,6 @@ pub const SendError = error{ /// The socket type requires that message be sent atomically, and the size of the message /// to be sent made this impossible. The message is not transmitted. - /// MessageTooBig, /// The output queue for a network interface was full. This generally indicates that the @@ -3498,6 +3568,324 @@ pub fn send( return sendto(sockfd, buf, flags, null, 0); } +pub const SendFileError = PReadError || WriteError || SendError; + +fn count_iovec_bytes(iovs: []const iovec_const) usize { + var count: usize = 0; + for (iovs) |iov| { + count += iov.iov_len; + } + return count; +} + +/// Transfer data between file descriptors, with optional headers and trailers. +/// Returns the number of bytes written, which can be zero. +/// +/// The `sendfile` call copies `in_len` bytes from one file descriptor to another. When possible, +/// this is done within the operating system kernel, which can provide better performance +/// characteristics than transferring data from kernel to user space and back, such as with +/// `read` and `write` calls. When `in_len` is `0`, it means to copy until the end of the input file has been +/// reached. Note, however, that partial writes are still possible in this case. +/// +/// `in_fd` must be a file descriptor opened for reading, and `out_fd` must be a file descriptor +/// opened for writing. They may be any kind of file descriptor; however, if `in_fd` is not a regular +/// file system file, it may cause this function to fall back to calling `read` and `write`, in which case +/// atomicity guarantees no longer apply. +/// +/// Copying begins reading at `in_offset`. The input file descriptor seek position is ignored and not updated. +/// If the output file descriptor has a seek position, it is updated as bytes are written. When +/// `in_offset` is past the end of the input file, it successfully reads 0 bytes. +/// +/// `flags` has different meanings per operating system; refer to the respective man pages. +/// +/// These systems support atomically sending everything, including headers and trailers: +/// * macOS +/// * FreeBSD +/// +/// These systems support in-kernel data copying, but headers and trailers are not sent atomically: +/// * Linux +/// +/// Other systems fall back to calling `read` / `write`. +/// +/// Linux has a limit on how many bytes may be transferred in one `sendfile` call, which is `0x7ffff000` +/// on both 64-bit and 32-bit systems. This is due to using a signed C int as the return value, as +/// well as stuffing the errno codes into the last `4096` values. This is cited on the `sendfile` man page. +/// The corresponding POSIX limit on this is `math.maxInt(isize)`. +pub fn sendfile( + out_fd: fd_t, + in_fd: fd_t, + in_offset: u64, + in_len: u64, + headers: []const iovec_const, + trailers: []const iovec_const, + flags: u32, +) SendFileError!usize { + var header_done = false; + var total_written: usize = 0; + + // Prevents EOVERFLOW. + const size_t = @Type(std.builtin.TypeInfo{ + .Int = .{ + .is_signed = false, + .bits = @typeInfo(usize).Int.bits - 1, + }, + }); + const max_count = switch (std.Target.current.os.tag) { + .linux => 0x7ffff000, + else => math.maxInt(size_t), + }; + + switch (std.Target.current.os.tag) { + .linux => sf: { + // sendfile() first appeared in Linux 2.2, glibc 2.1. + const call_sf = comptime if (builtin.link_libc) + std.c.versionCheck(.{ .major = 2, .minor = 1 }).ok + else + std.Target.current.os.version_range.linux.range.max.order(.{ .major = 2, .minor = 2 }) != .lt; + if (!call_sf) break :sf; + + if (headers.len != 0) { + const amt = try writev(out_fd, headers); + total_written += amt; + if (amt < count_iovec_bytes(headers)) return total_written; + header_done = true; + } + + // Here we match BSD behavior, making a zero count value send as many bytes as possible. + const adjusted_count = if (in_len == 0) max_count else math.min(in_len, @as(size_t, max_count)); + + while (true) { + var offset: off_t = @bitCast(off_t, in_offset); + const rc = system.sendfile(out_fd, in_fd, &offset, adjusted_count); + switch (errno(rc)) { + 0 => { + const amt = @bitCast(usize, rc); + total_written += amt; + if (in_len == 0 and amt == 0) { + // We have detected EOF from `in_fd`. + break; + } else if (amt < in_len) { + return total_written; + } else { + break; + } + }, + + EBADF => unreachable, // Always a race condition. + EFAULT => unreachable, // Segmentation fault. + EOVERFLOW => unreachable, // We avoid passing too large of a `count`. + ENOTCONN => unreachable, // `out_fd` is an unconnected socket. + + EINVAL, ENOSYS => { + // EINVAL could be any of the following situations: + // * Descriptor is not valid or locked + // * an mmap(2)-like operation is not available for in_fd + // * count is negative + // * out_fd has the O_APPEND flag set + // Because of the "mmap(2)-like operation" possibility, we fall back to doing read/write + // manually, the same as ENOSYS. + break :sf; + }, + EAGAIN => if (std.event.Loop.instance) |loop| { + loop.waitUntilFdWritable(out_fd); + continue; + } else { + return error.WouldBlock; + }, + EIO => return error.InputOutput, + EPIPE => return error.BrokenPipe, + ENOMEM => return error.SystemResources, + ENXIO => return error.Unseekable, + ESPIPE => return error.Unseekable, + else => |err| { + const discard = unexpectedErrno(err); + break :sf; + }, + } + } + + if (trailers.len != 0) { + total_written += try writev(out_fd, trailers); + } + + return total_written; + }, + .freebsd => sf: { + var hdtr_data: std.c.sf_hdtr = undefined; + var hdtr: ?*std.c.sf_hdtr = null; + if (headers.len != 0 or trailers.len != 0) { + // Here we carefully avoid `@intCast` by returning partial writes when + // too many io vectors are provided. + const hdr_cnt = math.cast(u31, headers.len) catch math.maxInt(u31); + if (headers.len > hdr_cnt) return writev(out_fd, headers); + + const trl_cnt = math.cast(u31, trailers.len) catch math.maxInt(u31); + + hdtr_data = std.c.sf_hdtr{ + .headers = headers.ptr, + .hdr_cnt = hdr_cnt, + .trailers = trailers.ptr, + .trl_cnt = trl_cnt, + }; + hdtr = &hdtr_data; + } + + const adjusted_count = math.min(in_len, max_count); + + while (true) { + var sbytes: off_t = undefined; + const err = errno(system.sendfile(out_fd, in_fd, in_offset, adjusted_count, hdtr, &sbytes, flags)); + const amt = @bitCast(usize, sbytes); + switch (err) { + 0 => return amt, + + EBADF => unreachable, // Always a race condition. + EFAULT => unreachable, // Segmentation fault. + ENOTCONN => unreachable, // `out_fd` is an unconnected socket. + + EINVAL, EOPNOTSUPP, ENOTSOCK, ENOSYS => { + // EINVAL could be any of the following situations: + // * The fd argument is not a regular file. + // * The s argument is not a SOCK_STREAM type socket. + // * The offset argument is negative. + // Because of some of these possibilities, we fall back to doing read/write + // manually, the same as ENOSYS. + break :sf; + }, + + EINTR => if (amt != 0) return amt else continue, + + EAGAIN => if (amt != 0) { + return amt; + } else if (std.event.Loop.instance) |loop| { + loop.waitUntilFdWritable(out_fd); + continue; + } else { + return error.WouldBlock; + }, + + EBUSY => if (amt != 0) { + return amt; + } else if (std.event.Loop.instance) |loop| { + loop.waitUntilFdReadable(in_fd); + continue; + } else { + return error.WouldBlock; + }, + + EIO => return error.InputOutput, + ENOBUFS => return error.SystemResources, + EPIPE => return error.BrokenPipe, + + else => { + const discard = unexpectedErrno(err); + if (amt != 0) { + return amt; + } else { + break :sf; + } + }, + } + } + }, + .macosx, .ios, .tvos, .watchos => sf: { + var hdtr_data: std.c.sf_hdtr = undefined; + var hdtr: ?*std.c.sf_hdtr = null; + if (headers.len != 0 or trailers.len != 0) { + // Here we carefully avoid `@intCast` by returning partial writes when + // too many io vectors are provided. + const hdr_cnt = math.cast(u31, headers.len) catch math.maxInt(u31); + if (headers.len > hdr_cnt) return writev(out_fd, headers); + + const trl_cnt = math.cast(u31, trailers.len) catch math.maxInt(u31); + + hdtr_data = std.c.sf_hdtr{ + .headers = headers.ptr, + .hdr_cnt = hdr_cnt, + .trailers = trailers.ptr, + .trl_cnt = trl_cnt, + }; + hdtr = &hdtr_data; + } + + const adjusted_count = math.min(in_len, @as(u63, max_count)); + + while (true) { + var sbytes: off_t = adjusted_count; + const signed_offset = @bitCast(i64, in_offset); + const err = errno(system.sendfile(out_fd, in_fd, signed_offset, &sbytes, hdtr, flags)); + const amt = @bitCast(usize, sbytes); + switch (err) { + 0 => return amt, + + EFAULT => unreachable, // Segmentation fault. + EINVAL => unreachable, + ENOTCONN => unreachable, // `out_fd` is an unconnected socket. + + // On macOS version 10.14.6, I observed Darwin return EBADF when + // using sendfile on a valid open file descriptor of a file + // system file. + ENOTSUP, ENOTSOCK, ENOSYS, EBADF => break :sf, + + EINTR => if (amt != 0) return amt else continue, + + EAGAIN => if (amt != 0) { + return amt; + } else if (std.event.Loop.instance) |loop| { + loop.waitUntilFdWritable(out_fd); + continue; + } else { + return error.WouldBlock; + }, + + EIO => return error.InputOutput, + EPIPE => return error.BrokenPipe, + + else => { + const discard = unexpectedErrno(err); + if (amt != 0) { + return amt; + } else { + break :sf; + } + }, + } + } + }, + else => {}, // fall back to read/write + } + + if (headers.len != 0 and !header_done) { + const amt = try writev(out_fd, headers); + total_written += amt; + if (amt < count_iovec_bytes(headers)) return total_written; + } + + rw: { + var buf: [8 * 4096]u8 = undefined; + // Here we match BSD behavior, making a zero count value send as many bytes as possible. + const adjusted_count = if (in_len == 0) buf.len else math.min(buf.len, in_len); + const amt_read = try pread(in_fd, buf[0..adjusted_count], in_offset); + if (amt_read == 0) { + if (in_len == 0) { + // We have detected EOF from `in_fd`. + break :rw; + } else { + return total_written; + } + } + const amt_written = try write(out_fd, buf[0..amt_read]); + total_written += amt_written; + if (amt_written < in_len or in_len == 0) return total_written; + } + + if (trailers.len != 0) { + total_written += try writev(out_fd, trailers); + } + + return total_written; +} + pub const PollError = error{ /// The kernel had no space to allocate file descriptor tables. SystemResources, diff --git a/lib/std/os/bits/darwin.zig b/lib/std/os/bits/darwin.zig index 22897974c2..fb933c6698 100644 --- a/lib/std/os/bits/darwin.zig +++ b/lib/std/os/bits/darwin.zig @@ -926,6 +926,9 @@ pub const ESOCKTNOSUPPORT = 44; /// Operation not supported pub const ENOTSUP = 45; +/// Operation not supported. Alias of `ENOTSUP`. +pub const EOPNOTSUPP = ENOTSUP; + /// Protocol family not supported pub const EPFNOSUPPORT = 46; diff --git a/lib/std/os/bits/linux/arm64.zig b/lib/std/os/bits/linux/arm64.zig index 8dcebc5ddf..386e889873 100644 --- a/lib/std/os/bits/linux/arm64.zig +++ b/lib/std/os/bits/linux/arm64.zig @@ -82,6 +82,7 @@ pub const SYS_pread64 = 67; pub const SYS_pwrite64 = 68; pub const SYS_preadv = 69; pub const SYS_pwritev = 70; +pub const SYS_sendfile = 71; pub const SYS_pselect6 = 72; pub const SYS_ppoll = 73; pub const SYS_signalfd4 = 74; diff --git a/lib/std/os/linux.zig b/lib/std/os/linux.zig index 30dba85e51..719e541846 100644 --- a/lib/std/os/linux.zig +++ b/lib/std/os/linux.zig @@ -6,7 +6,7 @@ // provide `rename` when only the `renameat` syscall exists. // * Does not support POSIX thread cancellation. const std = @import("../std.zig"); -const builtin = @import("builtin"); +const builtin = std.builtin; const assert = std.debug.assert; const maxInt = std.math.maxInt; const elf = std.elf; @@ -39,6 +39,13 @@ pub fn getauxval(index: usize) usize { return 0; } +// Some architectures require 64bit parameters for some syscalls to be passed in +// even-aligned register pair +const require_aligned_register_pair = // + std.Target.current.cpu.arch.isMIPS() or + std.Target.current.cpu.arch.isARM() or + std.Target.current.cpu.arch.isThumb(); + /// Get the errno from a syscall return value, or 0 for no error. pub fn getErrno(r: usize) u12 { const signed_r = @bitCast(isize, r); @@ -69,6 +76,10 @@ pub fn chdir(path: [*:0]const u8) usize { return syscall1(SYS_chdir, @ptrToInt(path)); } +pub fn fchdir(fd: fd_t) usize { + return syscall1(SYS_fchdir, @bitCast(usize, @as(isize, fd))); +} + pub fn chroot(path: [*:0]const u8) usize { return syscall1(SYS_chroot, @ptrToInt(path)); } @@ -316,8 +327,31 @@ pub fn symlinkat(existing: [*:0]const u8, newfd: i32, newpath: [*:0]const u8) us return syscall3(SYS_symlinkat, @ptrToInt(existing), @bitCast(usize, @as(isize, newfd)), @ptrToInt(newpath)); } -pub fn pread(fd: i32, buf: [*]u8, count: usize, offset: usize) usize { - return syscall4(SYS_pread, @bitCast(usize, @as(isize, fd)), @ptrToInt(buf), count, offset); +pub fn pread(fd: i32, buf: [*]u8, count: usize, offset: u64) usize { + if (@hasDecl(@This(), "SYS_pread64")) { + if (require_aligned_register_pair) { + return syscall6( + SYS_pread64, + @bitCast(usize, @as(isize, fd)), + @ptrToInt(buf), + count, + 0, + @truncate(usize, offset), + @truncate(usize, offset >> 32), + ); + } else { + return syscall5( + SYS_pread64, + @bitCast(usize, @as(isize, fd)), + @ptrToInt(buf), + count, + @truncate(usize, offset), + @truncate(usize, offset >> 32), + ); + } + } else { + return syscall4(SYS_pread, @bitCast(usize, @as(isize, fd)), @ptrToInt(buf), count, offset); + } } pub fn access(path: [*:0]const u8, mode: u32) usize { @@ -333,7 +367,7 @@ pub fn faccessat(dirfd: i32, path: [*:0]const u8, mode: u32, flags: u32) usize { } pub fn pipe(fd: *[2]i32) usize { - if (builtin.arch == .mipsel) { + if (comptime builtin.arch.isMIPS()) { return syscall_pipe(fd); } else if (@hasDecl(@This(), "SYS_pipe")) { return syscall1(SYS_pipe, @ptrToInt(fd)); @@ -846,6 +880,26 @@ pub fn sendto(fd: i32, buf: [*]const u8, len: usize, flags: u32, addr: ?*const s return syscall6(SYS_sendto, @bitCast(usize, @as(isize, fd)), @ptrToInt(buf), len, flags, @ptrToInt(addr), @intCast(usize, alen)); } +pub fn sendfile(outfd: i32, infd: i32, offset: ?*i64, count: usize) usize { + if (@hasDecl(@This(), "SYS_sendfile64")) { + return syscall4( + SYS_sendfile64, + @bitCast(usize, @as(isize, outfd)), + @bitCast(usize, @as(isize, infd)), + @ptrToInt(offset), + count, + ); + } else { + return syscall4( + SYS_sendfile, + @bitCast(usize, @as(isize, outfd)), + @bitCast(usize, @as(isize, infd)), + @ptrToInt(offset), + count, + ); + } +} + pub fn socketpair(domain: i32, socket_type: i32, protocol: i32, fd: [2]i32) usize { if (builtin.arch == .i386) { return socketcall(SC_socketpair, &[4]usize{ @intCast(usize, domain), @intCast(usize, socket_type), @intCast(usize, protocol), @ptrToInt(&fd[0]) }); diff --git a/lib/std/os/test.zig b/lib/std/os/test.zig index 197edd82c1..5f97597537 100644 --- a/lib/std/os/test.zig +++ b/lib/std/os/test.zig @@ -16,7 +16,7 @@ const AtomicRmwOp = builtin.AtomicRmwOp; const AtomicOrder = builtin.AtomicOrder; test "makePath, put some files in it, deleteTree" { - try fs.makePath(a, "os_test_tmp" ++ fs.path.sep_str ++ "b" ++ fs.path.sep_str ++ "c"); + try fs.cwd().makePath("os_test_tmp" ++ fs.path.sep_str ++ "b" ++ fs.path.sep_str ++ "c"); try io.writeFile("os_test_tmp" ++ fs.path.sep_str ++ "b" ++ fs.path.sep_str ++ "c" ++ fs.path.sep_str ++ "file.txt", "nonsense"); try io.writeFile("os_test_tmp" ++ fs.path.sep_str ++ "b" ++ fs.path.sep_str ++ "file2.txt", "blah"); try fs.deleteTree("os_test_tmp"); @@ -28,7 +28,7 @@ test "makePath, put some files in it, deleteTree" { } test "access file" { - try fs.makePath(a, "os_test_tmp"); + try fs.cwd().makePath("os_test_tmp"); if (fs.cwd().access("os_test_tmp" ++ fs.path.sep_str ++ "file.txt", .{})) |ok| { @panic("expected error"); } else |err| { @@ -44,6 +44,68 @@ fn testThreadIdFn(thread_id: *Thread.Id) void { thread_id.* = Thread.getCurrentId(); } +test "sendfile" { + try fs.cwd().makePath("os_test_tmp"); + defer fs.deleteTree("os_test_tmp") catch {}; + + var dir = try fs.cwd().openDirList("os_test_tmp"); + defer dir.close(); + + const line1 = "line1\n"; + const line2 = "second line\n"; + var vecs = [_]os.iovec_const{ + .{ + .iov_base = line1, + .iov_len = line1.len, + }, + .{ + .iov_base = line2, + .iov_len = line2.len, + }, + }; + + var src_file = try dir.createFileC("sendfile1.txt", .{ .read = true }); + defer src_file.close(); + + try src_file.writevAll(&vecs); + + var dest_file = try dir.createFileC("sendfile2.txt", .{ .read = true }); + defer dest_file.close(); + + const header1 = "header1\n"; + const header2 = "second header\n"; + const trailer1 = "trailer1\n"; + const trailer2 = "second trailer\n"; + var hdtr = [_]os.iovec_const{ + .{ + .iov_base = header1, + .iov_len = header1.len, + }, + .{ + .iov_base = header2, + .iov_len = header2.len, + }, + .{ + .iov_base = trailer1, + .iov_len = trailer1.len, + }, + .{ + .iov_base = trailer2, + .iov_len = trailer2.len, + }, + }; + + var written_buf: [header1.len + header2.len + 10 + trailer1.len + trailer2.len]u8 = undefined; + try dest_file.writeFileAll(src_file, .{ + .in_offset = 1, + .in_len = 10, + .headers_and_trailers = &hdtr, + .header_count = 2, + }); + try dest_file.preadAll(&written_buf, 0); + expect(mem.eql(u8, &written_buf, "header1\nsecond header\nine1\nsecontrailer1\nsecond trailer\n")); +} + test "std.Thread.getCurrentId" { if (builtin.single_threaded) return error.SkipZigTest; @@ -103,7 +165,7 @@ test "AtomicFile" { { var af = try fs.AtomicFile.init(test_out_file, File.default_mode); defer af.deinit(); - try af.file.write(test_content); + try af.file.writeAll(test_content); try af.finish(); } const content = try io.readFileAlloc(testing.allocator, test_out_file); @@ -226,7 +288,7 @@ test "pipe" { return error.SkipZigTest; var fds = try os.pipe(); - try os.write(fds[1], "hello"); + expect((try os.write(fds[1], "hello")) == 5); var buf: [16]u8 = undefined; expect((try os.read(fds[0], buf[0..])) == 5); testing.expectEqualSlices(u8, buf[0..5], "hello"); @@ -248,7 +310,7 @@ test "memfd_create" { else => |e| return e, }; defer std.os.close(fd); - try std.os.write(fd, "test"); + expect((try std.os.write(fd, "test")) == 4); try std.os.lseek_SET(fd, 0); var buf: [10]u8 = undefined; diff --git a/lib/std/os/windows.zig b/lib/std/os/windows.zig index cc0d446b12..b8e14a220d 100644 --- a/lib/std/os/windows.zig +++ b/lib/std/os/windows.zig @@ -337,7 +337,7 @@ pub fn GetQueuedCompletionStatus( } pub fn CloseHandle(hObject: HANDLE) void { - assert(kernel32.CloseHandle(hObject) != 0); + assert(ntdll.NtClose(hObject) == .SUCCESS); } pub fn FindClose(hFindFile: HANDLE) void { @@ -424,7 +424,7 @@ pub const WriteFileError = error{ Unexpected, }; -pub fn WriteFile(handle: HANDLE, bytes: []const u8, offset: ?u64) WriteFileError!void { +pub fn WriteFile(handle: HANDLE, bytes: []const u8, offset: ?u64) WriteFileError!usize { if (std.event.Loop.instance) |loop| { // TODO support async WriteFile with no offset const off = offset.?; @@ -445,8 +445,8 @@ pub fn WriteFile(handle: HANDLE, bytes: []const u8, offset: ?u64) WriteFileError _ = CreateIoCompletionPort(fd, loop.os_data.io_port, undefined, undefined); loop.beginOneEvent(); suspend { - // TODO replace this @intCast with a loop that writes all the bytes - _ = kernel32.WriteFile(fd, bytes.ptr, @intCast(windows.DWORD, bytes.len), null, &resume_node.base.overlapped); + const adjusted_len = math.cast(windows.DWORD, bytes.len) catch maxInt(windows.DWORD); + _ = kernel32.WriteFile(fd, bytes.ptr, adjusted_len, null, &resume_node.base.overlapped); } var bytes_transferred: windows.DWORD = undefined; if (kernel32.GetOverlappedResult(fd, &resume_node.base.overlapped, &bytes_transferred, FALSE) == 0) { @@ -460,6 +460,7 @@ pub fn WriteFile(handle: HANDLE, bytes: []const u8, offset: ?u64) WriteFileError else => |err| return windows.unexpectedError(err), } } + return bytes_transferred; } else { var bytes_written: DWORD = undefined; var overlapped_data: OVERLAPPED = undefined; @@ -473,18 +474,19 @@ pub fn WriteFile(handle: HANDLE, bytes: []const u8, offset: ?u64) WriteFileError }; break :blk &overlapped_data; } else null; - // TODO replace this @intCast with a loop that writes all the bytes - if (kernel32.WriteFile(handle, bytes.ptr, @intCast(u32, bytes.len), &bytes_written, overlapped) == 0) { + const adjusted_len = math.cast(u32, bytes.len) catch maxInt(u32); + if (kernel32.WriteFile(handle, bytes.ptr, adjusted_len, &bytes_written, overlapped) == 0) { switch (kernel32.GetLastError()) { .INVALID_USER_BUFFER => return error.SystemResources, .NOT_ENOUGH_MEMORY => return error.SystemResources, .OPERATION_ABORTED => return error.OperationAborted, .NOT_ENOUGH_QUOTA => return error.SystemResources, - .IO_PENDING => unreachable, // this function is for blocking files only + .IO_PENDING => unreachable, .BROKEN_PIPE => return error.BrokenPipe, else => |err| return unexpectedError(err), } } + return bytes_written; } } @@ -584,23 +586,74 @@ pub fn MoveFileExW(old_path: [*:0]const u16, new_path: [*:0]const u16, flags: DW } pub const CreateDirectoryError = error{ + NameTooLong, PathAlreadyExists, FileNotFound, + NoDevice, + AccessDenied, Unexpected, }; -pub fn CreateDirectory(pathname: []const u8, attrs: ?*SECURITY_ATTRIBUTES) CreateDirectoryError!void { +/// Returns an open directory handle which the caller is responsible for closing with `CloseHandle`. +pub fn CreateDirectory(dir: ?HANDLE, pathname: []const u8, sa: ?*SECURITY_ATTRIBUTES) CreateDirectoryError!HANDLE { const pathname_w = try sliceToPrefixedFileW(pathname); - return CreateDirectoryW(&pathname_w, attrs); + return CreateDirectoryW(dir, &pathname_w, sa); } -pub fn CreateDirectoryW(pathname: [*:0]const u16, attrs: ?*SECURITY_ATTRIBUTES) CreateDirectoryError!void { - if (kernel32.CreateDirectoryW(pathname, attrs) == 0) { - switch (kernel32.GetLastError()) { - .ALREADY_EXISTS => return error.PathAlreadyExists, - .PATH_NOT_FOUND => return error.FileNotFound, - else => |err| return unexpectedError(err), - } +/// Same as `CreateDirectory` except takes a WTF-16 encoded path. +pub fn CreateDirectoryW( + dir: ?HANDLE, + sub_path_w: [*:0]const u16, + sa: ?*SECURITY_ATTRIBUTES, +) CreateDirectoryError!HANDLE { + const path_len_bytes = math.cast(u16, mem.toSliceConst(u16, sub_path_w).len * 2) catch |err| switch (err) { + error.Overflow => return error.NameTooLong, + }; + var nt_name = UNICODE_STRING{ + .Length = path_len_bytes, + .MaximumLength = path_len_bytes, + .Buffer = @intToPtr([*]u16, @ptrToInt(sub_path_w)), + }; + + if (sub_path_w[0] == '.' and sub_path_w[1] == 0) { + // Windows does not recognize this, but it does work with empty string. + nt_name.Length = 0; + } + + var attr = OBJECT_ATTRIBUTES{ + .Length = @sizeOf(OBJECT_ATTRIBUTES), + .RootDirectory = if (std.fs.path.isAbsoluteWindowsW(sub_path_w)) null else dir, + .Attributes = 0, // Note we do not use OBJ_CASE_INSENSITIVE here. + .ObjectName = &nt_name, + .SecurityDescriptor = if (sa) |ptr| ptr.lpSecurityDescriptor else null, + .SecurityQualityOfService = null, + }; + var io: IO_STATUS_BLOCK = undefined; + var result_handle: HANDLE = undefined; + const rc = ntdll.NtCreateFile( + &result_handle, + GENERIC_READ | SYNCHRONIZE, + &attr, + &io, + null, + FILE_ATTRIBUTE_NORMAL, + FILE_SHARE_READ, + FILE_CREATE, + FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT, + null, + 0, + ); + switch (rc) { + .SUCCESS => return result_handle, + .OBJECT_NAME_INVALID => unreachable, + .OBJECT_NAME_NOT_FOUND => return error.FileNotFound, + .OBJECT_PATH_NOT_FOUND => return error.FileNotFound, + .NO_MEDIA_IN_DEVICE => return error.NoDevice, + .INVALID_PARAMETER => unreachable, + .ACCESS_DENIED => return error.AccessDenied, + .OBJECT_PATH_SYNTAX_BAD => unreachable, + .OBJECT_NAME_COLLISION => return error.PathAlreadyExists, + else => return unexpectedStatus(rc), } } diff --git a/lib/std/special/docs/index.html b/lib/std/special/docs/index.html index d1eeb89c23..2683418aef 100644 --- a/lib/std/special/docs/index.html +++ b/lib/std/special/docs/index.html @@ -2,6 +2,7 @@ <html lang="en"> <head> <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Documentation - Zig</title> <link rel="icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAgklEQVR4AWMYWuD7EllJIM4G4g4g5oIJ/odhOJ8wToOxSTXgNxDHoeiBMfA4+wGShjyYOCkG/IGqWQziEzYAoUAeiF9D5U+DxEg14DRU7jWIT5IBIOdCxf+A+CQZAAoopEB7QJwBCBwHiip8UYmRdrAlDpIMgApwQZNnNii5Dq0MBgCxxycBnwEd+wAAAABJRU5ErkJggg=="> <style> @@ -25,6 +26,8 @@ --search-sh-color: rgba(0, 0, 0, 0.18); --help-sh-color: rgba(0, 0, 0, 0.75); } + + html, body { margin: 0; padding:0; height: 100%; } a { text-decoration: none; @@ -69,6 +72,7 @@ max-width: 15vw; min-width: 9.5rem; overflow: auto; + -webkit-overflow-scrolling: touch; overflow-wrap: break-word; flex-shrink: 0; flex-grow: 0; @@ -79,6 +83,7 @@ .flex-right { display: flex; overflow: auto; + -webkit-overflow-scrolling: touch; flex-grow: 1; flex-shrink: 1; @@ -175,6 +180,8 @@ border-bottom-color: var(--tx-color); outline: none; transition: border-bottom-color 0.35s, background 0.35s, box-shadow 0.35s; + border-radius: 0; + -webkit-appearance: none; } .docs .search:focus { @@ -258,12 +265,12 @@ font-weight: bold; } - #listFnExamples { + .examples { list-style-type: none; margin: 0; padding: 0; } - #listFnExamples li { + .examples li { padding: 0.5em 0; white-space: nowrap; overflow-x: auto; @@ -435,6 +442,76 @@ } } + + @media only screen and (max-width: 750px) { + .canvas { + overflow: auto; + } + .flex-main { + flex-direction: column; + display: block; + } + .sidebar { + min-width: calc(100vw - 2.8rem); + padding-left: 1.4rem; + padding-right: 1.4rem; + } + .logo { + max-width: 6.5rem; + } + .flex-main > .flex-filler { + display: none; + } + .flex-main > .flex-right > .flex-filler { + display: none; + } + .flex-main > .flex-right > .wrap { + max-width: 100vw; + } + .flex-main > .flex-right > .wrap > .docs { + padding-right: 1.4rem; + background: transparent; + } + .packages { + display: flex; + flex-wrap: wrap; + } + .table-container table { + display: flex; + flex-direction: column; + } + .table-container tr { + display: flex; + flex-direction: column; + } + .examples { + overflow-x: scroll; + -webkit-overflow-scrolling: touch; + max-width: 100vw; + margin-left: -1.4rem; + margin-right: -1.4rem; + } + .examples li { + width: max-content; + padding-left: 1.4rem; + padding-right: 1.4rem; + } + .mobile-scroll-container { + overflow-x: scroll; + -webkit-overflow-scrolling: touch; + margin-left: -1.4rem; + margin-right: -1.4rem; + max-width: 100vw; + } + .mobile-scroll-container > .scroll-item { + margin-left: 1.4rem; + margin-right: 1.4rem; + box-sizing: border-box; + width: max-content; + display: inline-block; + min-width: calc(100% - 2.8rem); + } + } </style> </head> <body class="canvas"> @@ -471,7 +548,7 @@ <p id="status">Loading...</p> <div id="sectNav" class="hidden"><ul id="listNav"></ul></div> <div id="fnProto" class="hidden"> - <pre id="fnProtoCode"></pre> + <div class="mobile-scroll-container"><pre id="fnProtoCode" class="scroll-item"></pre></div> </div> <h1 id="hdrName" class="hidden"></h1> <div id="fnNoExamples" class="hidden"> @@ -518,21 +595,27 @@ </div> <div id="sectGlobalVars" class="hidden"> <h2>Global Variables</h2> - <table> - <tbody id="listGlobalVars"></tbody> - </table> + <div class="table-container"> + <table> + <tbody id="listGlobalVars"></tbody> + </table> + </div> </div> <div id="sectFns" class="hidden"> <h2>Functions</h2> - <table> - <tbody id="listFns"></tbody> - </table> + <div class="table-container"> + <table> + <tbody id="listFns"></tbody> + </table> + </div> </div> <div id="sectValues" class="hidden"> <h2>Values</h2> - <table> - <tbody id="listValues"></tbody> - </table> + <div class="table-container"> + <table> + <tbody id="listValues"></tbody> + </table> + </div> </div> <div id="sectErrSets" class="hidden"> <h2>Error Sets</h2> @@ -540,7 +623,7 @@ </div> <div id="fnExamples" class="hidden"> <h2>Examples</h2> - <ul id="listFnExamples"></ul> + <ul id="listFnExamples" class="examples"></ul> </div> </section> </div> diff --git a/lib/std/special/docs/main.js b/lib/std/special/docs/main.js index 138f79887d..b11e10caa7 100644 --- a/lib/std/special/docs/main.js +++ b/lib/std/special/docs/main.js @@ -1086,7 +1086,7 @@ var fieldNode = zigAnalysis.astNodes[containerNode.fields[i]]; var divDom = domListFields.children[i]; - var html = '<pre>' + escapeHtml(fieldNode.name); + var html = '<div class="mobile-scroll-container"><pre class="scroll-item">' + escapeHtml(fieldNode.name); if (container.kind === typeKinds.Enum) { html += ' = <span class="tok-number">' + field + '</span>'; @@ -1099,7 +1099,7 @@ } } - html += ',</pre>'; + html += ',</pre></div>'; var docs = fieldNode.docs; if (docs != null) { diff --git a/lib/std/target.zig b/lib/std/target.zig index 778a93b90d..74c5362a00 100644 --- a/lib/std/target.zig +++ b/lib/std/target.zig @@ -146,7 +146,6 @@ pub const Target = struct { .freestanding, .ananas, .cloudabi, - .dragonfly, .fuchsia, .kfreebsd, .lv2, @@ -215,6 +214,12 @@ pub const Target = struct { .max = .{ .major = 6, .minor = 6 }, }, }, + .dragonfly => return .{ + .semver = .{ + .min = .{ .major = 5, .minor = 8 }, + .max = .{ .major = 5, .minor = 8 }, + }, + }, .linux => return .{ .linux = .{ diff --git a/lib/std/zig/cross_target.zig b/lib/std/zig/cross_target.zig index 38ce6549f3..cec3ea05e5 100644 --- a/lib/std/zig/cross_target.zig +++ b/lib/std/zig/cross_target.zig @@ -102,7 +102,6 @@ pub const CrossTarget = struct { .freestanding, .ananas, .cloudabi, - .dragonfly, .fuchsia, .kfreebsd, .lv2, @@ -135,10 +134,11 @@ pub const CrossTarget = struct { .freebsd, .macosx, .ios, - .netbsd, - .openbsd, .tvos, .watchos, + .netbsd, + .openbsd, + .dragonfly, => { self.os_version_min = .{ .semver = os.version_range.semver.min }; self.os_version_max = .{ .semver = os.version_range.semver.max }; @@ -355,8 +355,10 @@ pub const CrossTarget = struct { } pub fn getCpuModel(self: CrossTarget) *const Target.Cpu.Model { - if (self.cpu_model) |cpu_model| return cpu_model; - return self.getCpu().model; + return switch (self.cpu_model) { + .explicit => |cpu_model| cpu_model, + else => self.getCpu().model, + }; } pub fn getCpuFeatures(self: CrossTarget) Target.Cpu.Feature.Set { @@ -645,7 +647,7 @@ pub const CrossTarget = struct { self.glibc_version = SemVer{ .major = major, .minor = minor, .patch = patch }; } - pub fn getObjectFormat(self: CrossTarget) ObjectFormat { + pub fn getObjectFormat(self: CrossTarget) Target.ObjectFormat { return Target.getObjectFormatSimple(self.getOsTag(), self.getCpuArch()); } @@ -675,9 +677,7 @@ pub const CrossTarget = struct { .freestanding, .ananas, .cloudabi, - .dragonfly, .fuchsia, - .ios, .kfreebsd, .lv2, .solaris, @@ -692,8 +692,6 @@ pub const CrossTarget = struct { .amdhsa, .ps4, .elfiamcu, - .tvos, - .watchos, .mesa3d, .contiki, .amdpal, @@ -707,9 +705,13 @@ pub const CrossTarget = struct { .freebsd, .macosx, + .ios, + .tvos, + .watchos, .netbsd, .openbsd, .linux, + .dragonfly, => { var range_it = mem.separate(version_text, "..."); diff --git a/lib/std/zig/render.zig b/lib/std/zig/render.zig index ee6ee37d5d..625aef3131 100644 --- a/lib/std/zig/render.zig +++ b/lib/std/zig/render.zig @@ -29,7 +29,7 @@ pub fn render(allocator: *mem.Allocator, stream: var, tree: *ast.Tree) (@TypeOf( source_index: usize, source: []const u8, - fn write(iface_stream: *Stream, bytes: []const u8) StreamError!void { + fn write(iface_stream: *Stream, bytes: []const u8) StreamError!usize { const self = @fieldParentPtr(MyStream, "stream", iface_stream); if (!self.anything_changed_ptr.*) { @@ -45,7 +45,7 @@ pub fn render(allocator: *mem.Allocator, stream: var, tree: *ast.Tree) (@TypeOf( } } - try self.child_stream.write(bytes); + return self.child_stream.writeOnce(bytes); } }; var my_stream = MyStream{ @@ -2443,14 +2443,15 @@ const FindByteOutStream = struct { }; } - fn writeFn(out_stream: *Stream, bytes: []const u8) Error!void { + fn writeFn(out_stream: *Stream, bytes: []const u8) Error!usize { const self = @fieldParentPtr(Self, "stream", out_stream); - if (self.byte_found) return; + if (self.byte_found) return bytes.len; self.byte_found = blk: { for (bytes) |b| if (b == self.byte) break :blk true; break :blk false; }; + return bytes.len; } }; diff --git a/lib/std/zig/system.zig b/lib/std/zig/system.zig index 38a90f4c60..7f0609c112 100644 --- a/lib/std/zig/system.zig +++ b/lib/std/zig/system.zig @@ -796,6 +796,7 @@ pub const NativeTargetInfo = struct { error.SystemResources => return error.SystemResources, error.IsDir => return error.UnableToReadElfFile, error.BrokenPipe => return error.UnableToReadElfFile, + error.Unseekable => return error.UnableToReadElfFile, error.ConnectionResetByPeer => return error.UnableToReadElfFile, error.Unexpected => return error.Unexpected, error.InputOutput => return error.FileSystem, diff --git a/src-self-hosted/compilation.zig b/src-self-hosted/compilation.zig index 611e279bfe..73b4acd6cc 100644 --- a/src-self-hosted/compilation.zig +++ b/src-self-hosted/compilation.zig @@ -1176,7 +1176,7 @@ pub const Compilation = struct { defer self.gpa().free(zig_dir_path); const tmp_dir = try fs.path.join(self.arena(), &[_][]const u8{ zig_dir_path, comp_dir_name[0..] }); - try fs.makePath(self.gpa(), tmp_dir); + try fs.cwd().makePath(tmp_dir); return tmp_dir; } diff --git a/src-self-hosted/introspect.zig b/src-self-hosted/introspect.zig index c7f5690cc3..880a1d790a 100644 --- a/src-self-hosted/introspect.zig +++ b/src-self-hosted/introspect.zig @@ -8,13 +8,32 @@ const warn = std.debug.warn; /// Caller must free result pub fn testZigInstallPrefix(allocator: *mem.Allocator, test_path: []const u8) ![]u8 { - const test_zig_dir = try fs.path.join(allocator, &[_][]const u8{ test_path, "lib", "zig" }); + { + const test_zig_dir = try fs.path.join(allocator, &[_][]const u8{ test_path, "lib", "zig" }); + errdefer allocator.free(test_zig_dir); + + const test_index_file = try fs.path.join(allocator, &[_][]const u8{ test_zig_dir, "std", "std.zig" }); + defer allocator.free(test_index_file); + + if (fs.cwd().openFile(test_index_file, .{})) |file| { + file.close(); + return test_zig_dir; + } else |err| switch (err) { + error.FileNotFound => { + allocator.free(test_zig_dir); + }, + else => |e| return e, + } + } + + // Also try without "zig" + const test_zig_dir = try fs.path.join(allocator, &[_][]const u8{ test_path, "lib" }); errdefer allocator.free(test_zig_dir); const test_index_file = try fs.path.join(allocator, &[_][]const u8{ test_zig_dir, "std", "std.zig" }); defer allocator.free(test_index_file); - var file = try fs.cwd().openRead(test_index_file); + const file = try fs.cwd().openFile(test_index_file, .{}); file.close(); return test_zig_dir; diff --git a/src-self-hosted/print_targets.zig b/src-self-hosted/print_targets.zig index be024a2a04..bb3841ba24 100644 --- a/src-self-hosted/print_targets.zig +++ b/src-self-hosted/print_targets.zig @@ -4,6 +4,9 @@ const io = std.io; const mem = std.mem; const Allocator = mem.Allocator; const Target = std.Target; +const assert = std.debug.assert; + +const introspect = @import("introspect.zig"); // TODO this is hard-coded until self-hosted gains this information canonically const available_libcs = [_][]const u8{ @@ -55,57 +58,40 @@ const available_libcs = [_][]const u8{ "x86_64-windows-gnu", }; -// TODO this is hard-coded until self-hosted gains this information canonically -const available_glibcs = [_][]const u8{ - "2.0", - "2.1", - "2.1.1", - "2.1.2", - "2.1.3", - "2.2", - "2.2.1", - "2.2.2", - "2.2.3", - "2.2.4", - "2.2.5", - "2.2.6", - "2.3", - "2.3.2", - "2.3.3", - "2.3.4", - "2.4", - "2.5", - "2.6", - "2.7", - "2.8", - "2.9", - "2.10", - "2.11", - "2.12", - "2.13", - "2.14", - "2.15", - "2.16", - "2.17", - "2.18", - "2.19", - "2.22", - "2.23", - "2.24", - "2.25", - "2.26", - "2.27", - "2.28", - "2.29", - "2.30", -}; - pub fn cmdTargets( allocator: *Allocator, args: []const []const u8, stdout: *io.OutStream(fs.File.WriteError), native_target: Target, ) !void { + const available_glibcs = blk: { + const zig_lib_dir = introspect.resolveZigLibDir(allocator) catch |err| { + std.debug.warn("unable to find zig installation directory: {}\n", .{@errorName(err)}); + std.process.exit(1); + }; + defer allocator.free(zig_lib_dir); + + var dir = try std.fs.cwd().openDirList(zig_lib_dir); + defer dir.close(); + + const vers_txt = try dir.readFileAlloc(allocator, "libc/glibc/vers.txt", 10 * 1024); + defer allocator.free(vers_txt); + + var list = std.ArrayList(std.builtin.Version).init(allocator); + defer list.deinit(); + + var it = mem.tokenize(vers_txt, "\r\n"); + while (it.next()) |line| { + const prefix = "GLIBC_"; + assert(mem.startsWith(u8, line, prefix)); + const adjusted_line = line[prefix.len..]; + const ver = try std.builtin.Version.parse(adjusted_line); + try list.append(ver); + } + break :blk list.toOwnedSlice(); + }; + defer allocator.free(available_glibcs); + const BOS = io.BufferedOutStream(fs.File.WriteError); var bos = BOS.init(stdout); var jws = std.json.WriteStream(BOS.Stream, 6).init(&bos.stream); @@ -150,7 +136,10 @@ pub fn cmdTargets( try jws.beginArray(); for (available_glibcs) |glibc| { try jws.arrayElem(); - try jws.emitString(glibc); + + const tmp = try std.fmt.allocPrint(allocator, "{}", .{glibc}); + defer allocator.free(tmp); + try jws.emitString(tmp); } try jws.endArray(); diff --git a/src-self-hosted/test.zig b/src-self-hosted/test.zig index 8c322e5fb6..e87164c9fb 100644 --- a/src-self-hosted/test.zig +++ b/src-self-hosted/test.zig @@ -56,7 +56,7 @@ pub const TestContext = struct { self.zig_lib_dir = try introspect.resolveZigLibDir(allocator); errdefer allocator.free(self.zig_lib_dir); - try std.fs.makePath(allocator, tmp_dir_name); + try std.fs.cwd().makePath(tmp_dir_name); errdefer std.fs.deleteTree(tmp_dir_name) catch {}; } @@ -85,7 +85,7 @@ pub const TestContext = struct { const file1_path = try std.fs.path.join(allocator, [_][]const u8{ tmp_dir_name, file_index, file1 }); if (std.fs.path.dirname(file1_path)) |dirname| { - try std.fs.makePath(allocator, dirname); + try std.fs.cwd().makePath(dirname); } // TODO async I/O @@ -119,7 +119,7 @@ pub const TestContext = struct { const output_file = try std.fmt.allocPrint(allocator, "{}-out{}", .{ file1_path, (Target{ .Native = {} }).exeFileExt() }); if (std.fs.path.dirname(file1_path)) |dirname| { - try std.fs.makePath(allocator, dirname); + try std.fs.cwd().makePath(dirname); } // TODO async I/O diff --git a/src/codegen.cpp b/src/codegen.cpp index 55a9fa67ff..f41bbe5c16 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -10386,6 +10386,61 @@ static void resolve_out_paths(CodeGen *g) { } } +static void output_type_information(CodeGen *g) { + if (g->enable_dump_analysis) { + const char *analysis_json_filename = buf_ptr(buf_sprintf("%s" OS_SEP "%s-analysis.json", + buf_ptr(g->output_dir), buf_ptr(g->root_out_name))); + FILE *f = fopen(analysis_json_filename, "wb"); + if (f == nullptr) { + fprintf(stderr, "Unable to open '%s': %s\n", analysis_json_filename, strerror(errno)); + exit(1); + } + zig_print_analysis_dump(g, f, " ", "\n"); + if (fclose(f) != 0) { + fprintf(stderr, "Unable to write '%s': %s\n", analysis_json_filename, strerror(errno)); + exit(1); + } + } + if (g->enable_doc_generation) { + Error err; + Buf *doc_dir_path = buf_sprintf("%s" OS_SEP "docs", buf_ptr(g->output_dir)); + if ((err = os_make_path(doc_dir_path))) { + fprintf(stderr, "Unable to create directory %s: %s\n", buf_ptr(doc_dir_path), err_str(err)); + exit(1); + } + Buf *index_html_src_path = buf_sprintf("%s" OS_SEP "special" OS_SEP "docs" OS_SEP "index.html", + buf_ptr(g->zig_std_dir)); + Buf *index_html_dest_path = buf_sprintf("%s" OS_SEP "index.html", buf_ptr(doc_dir_path)); + Buf *main_js_src_path = buf_sprintf("%s" OS_SEP "special" OS_SEP "docs" OS_SEP "main.js", + buf_ptr(g->zig_std_dir)); + Buf *main_js_dest_path = buf_sprintf("%s" OS_SEP "main.js", buf_ptr(doc_dir_path)); + + if ((err = os_copy_file(index_html_src_path, index_html_dest_path))) { + fprintf(stderr, "Unable to copy %s to %s: %s\n", buf_ptr(index_html_src_path), + buf_ptr(index_html_dest_path), err_str(err)); + exit(1); + } + if ((err = os_copy_file(main_js_src_path, main_js_dest_path))) { + fprintf(stderr, "Unable to copy %s to %s: %s\n", buf_ptr(main_js_src_path), + buf_ptr(main_js_dest_path), err_str(err)); + exit(1); + } + const char *data_js_filename = buf_ptr(buf_sprintf("%s" OS_SEP "data.js", buf_ptr(doc_dir_path))); + FILE *f = fopen(data_js_filename, "wb"); + if (f == nullptr) { + fprintf(stderr, "Unable to open '%s': %s\n", data_js_filename, strerror(errno)); + exit(1); + } + fprintf(f, "zigAnalysis="); + zig_print_analysis_dump(g, f, "", ""); + fprintf(f, ";"); + if (fclose(f) != 0) { + fprintf(stderr, "Unable to write '%s': %s\n", data_js_filename, strerror(errno)); + exit(1); + } + } +} + void codegen_build_and_link(CodeGen *g) { Error err; assert(g->out_type != OutTypeUnknown); @@ -10460,6 +10515,10 @@ void codegen_build_and_link(CodeGen *g) { } resolve_out_paths(g); + if (g->enable_dump_analysis || g->enable_doc_generation) { + output_type_information(g); + } + if (need_llvm_module(g)) { codegen_add_time_event(g, "Code Generation"); { @@ -10487,57 +10546,6 @@ void codegen_build_and_link(CodeGen *g) { gen_h_file(g); } } - if (g->enable_dump_analysis) { - const char *analysis_json_filename = buf_ptr(buf_sprintf("%s" OS_SEP "%s-analysis.json", - buf_ptr(g->output_dir), buf_ptr(g->root_out_name))); - FILE *f = fopen(analysis_json_filename, "wb"); - if (f == nullptr) { - fprintf(stderr, "Unable to open '%s': %s\n", analysis_json_filename, strerror(errno)); - exit(1); - } - zig_print_analysis_dump(g, f, " ", "\n"); - if (fclose(f) != 0) { - fprintf(stderr, "Unable to write '%s': %s\n", analysis_json_filename, strerror(errno)); - exit(1); - } - } - if (g->enable_doc_generation) { - Buf *doc_dir_path = buf_sprintf("%s" OS_SEP "docs", buf_ptr(g->output_dir)); - if ((err = os_make_path(doc_dir_path))) { - fprintf(stderr, "Unable to create directory %s: %s\n", buf_ptr(doc_dir_path), err_str(err)); - exit(1); - } - Buf *index_html_src_path = buf_sprintf("%s" OS_SEP "special" OS_SEP "docs" OS_SEP "index.html", - buf_ptr(g->zig_std_dir)); - Buf *index_html_dest_path = buf_sprintf("%s" OS_SEP "index.html", buf_ptr(doc_dir_path)); - Buf *main_js_src_path = buf_sprintf("%s" OS_SEP "special" OS_SEP "docs" OS_SEP "main.js", - buf_ptr(g->zig_std_dir)); - Buf *main_js_dest_path = buf_sprintf("%s" OS_SEP "main.js", buf_ptr(doc_dir_path)); - - if ((err = os_copy_file(index_html_src_path, index_html_dest_path))) { - fprintf(stderr, "Unable to copy %s to %s: %s\n", buf_ptr(index_html_src_path), - buf_ptr(index_html_dest_path), err_str(err)); - exit(1); - } - if ((err = os_copy_file(main_js_src_path, main_js_dest_path))) { - fprintf(stderr, "Unable to copy %s to %s: %s\n", buf_ptr(main_js_src_path), - buf_ptr(main_js_dest_path), err_str(err)); - exit(1); - } - const char *data_js_filename = buf_ptr(buf_sprintf("%s" OS_SEP "data.js", buf_ptr(doc_dir_path))); - FILE *f = fopen(data_js_filename, "wb"); - if (f == nullptr) { - fprintf(stderr, "Unable to open '%s': %s\n", data_js_filename, strerror(errno)); - exit(1); - } - fprintf(f, "zigAnalysis="); - zig_print_analysis_dump(g, f, "", ""); - fprintf(f, ";"); - if (fclose(f) != 0) { - fprintf(stderr, "Unable to write '%s': %s\n", data_js_filename, strerror(errno)); - exit(1); - } - } // If we're outputting assembly or llvm IR we skip linking. // If we're making a library or executable we must link. diff --git a/test/cli.zig b/test/cli.zig index 117c714a29..9bc4a21c90 100644 --- a/test/cli.zig +++ b/test/cli.zig @@ -37,7 +37,7 @@ pub fn main() !void { }; for (test_fns) |testFn| { try fs.deleteTree(dir_path); - try fs.makeDir(dir_path); + try fs.cwd().makeDir(dir_path); try testFn(zig_exe, dir_path); } } diff --git a/test/standalone/cat/main.zig b/test/standalone/cat/main.zig index 34439f9c24..8539a0de0f 100644 --- a/test/standalone/cat/main.zig +++ b/test/standalone/cat/main.zig @@ -42,6 +42,7 @@ fn usage(exe: []const u8) !void { return error.Invalid; } +// TODO use copy_file_range fn cat_file(stdout: fs.File, file: fs.File) !void { var buf: [1024 * 4]u8 = undefined; @@ -55,7 +56,7 @@ fn cat_file(stdout: fs.File, file: fs.File) !void { break; } - stdout.write(buf[0..bytes_read]) catch |err| { + stdout.writeAll(buf[0..bytes_read]) catch |err| { warn("Unable to write to stdout: {}\n", .{@errorName(err)}); return err; }; diff --git a/test/standalone/hello_world/hello.zig b/test/standalone/hello_world/hello.zig index e3fc5c0e3e..eabb226eb2 100644 --- a/test/standalone/hello_world/hello.zig +++ b/test/standalone/hello_world/hello.zig @@ -1,8 +1,5 @@ const std = @import("std"); pub fn main() !void { - const stdout_file = std.io.getStdOut(); - // If this program encounters pipe failure when printing to stdout, exit - // with an error. - try stdout_file.write("Hello, world!\n"); + try std.io.getStdOut().writeAll("Hello, World!\n"); } diff --git a/tools/process_headers.zig b/tools/process_headers.zig index 9952147aac..abdc9fabf9 100644 --- a/tools/process_headers.zig +++ b/tools/process_headers.zig @@ -11,10 +11,9 @@ // You'll then have to manually update Zig source repo with these new files. const std = @import("std"); -const builtin = @import("builtin"); -const Arch = builtin.Arch; -const Abi = builtin.Abi; -const Os = builtin.Os; +const Arch = std.Target.Cpu.Arch; +const Abi = std.Target.Abi; +const OsTag = std.Target.Os.Tag; const assert = std.debug.assert; const LibCTarget = struct { @@ -29,12 +28,12 @@ const MultiArch = union(enum) { mips, mips64, powerpc64, - specific: @TagType(Arch), + specific: Arch, fn eql(a: MultiArch, b: MultiArch) bool { if (@enumToInt(a) != @enumToInt(b)) return false; - if (@TagType(MultiArch)(a) != .specific) + if (a != .specific) return true; return a.specific == b.specific; } @@ -221,7 +220,7 @@ const musl_targets = [_]LibCTarget{ const DestTarget = struct { arch: MultiArch, - os: Os, + os: OsTag, abi: Abi, fn hash(a: DestTarget) u32 { @@ -305,8 +304,8 @@ pub fn main() !void { // TODO compiler crashed when I wrote this the canonical way var libc_targets: []const LibCTarget = undefined; switch (vendor) { - .musl => libc_targets = musl_targets, - .glibc => libc_targets = glibc_targets, + .musl => libc_targets = &musl_targets, + .glibc => libc_targets = &glibc_targets, } var path_table = PathTable.init(allocator); @@ -340,15 +339,17 @@ pub fn main() !void { try dir_stack.append(target_include_dir); while (dir_stack.popOrNull()) |full_dir_name| { - var dir = std.fs.Dir.cwd().openDirList(full_dir_name) catch |err| switch (err) { + var dir = std.fs.cwd().openDirList(full_dir_name) catch |err| switch (err) { error.FileNotFound => continue :search, error.AccessDenied => continue :search, else => return err, }; defer dir.close(); - while (try dir.next()) |entry| { - const full_path = try std.fs.path.join(allocator, [_][]const u8{ full_dir_name, entry.name }); + var dir_it = dir.iterate(); + + while (try dir_it.next()) |entry| { + const full_path = try std.fs.path.join(allocator, &[_][]const u8{ full_dir_name, entry.name }); switch (entry.kind) { .Directory => try dir_stack.append(full_path), .File => { @@ -396,8 +397,8 @@ pub fn main() !void { std.debug.warn("warning: libc target not found: {}\n", .{libc_target.name}); } } - std.debug.warn("summary: {Bi:2} could be reduced to {Bi:2}\n", .{total_bytes, total_bytes - max_bytes_saved}); - try std.fs.makePath(allocator, out_dir); + std.debug.warn("summary: {Bi:2} could be reduced to {Bi:2}\n", .{ total_bytes, total_bytes - max_bytes_saved }); + try std.fs.cwd().makePath(out_dir); var missed_opportunity_bytes: usize = 0; // iterate path_table. for each path, put all the hashes into a list. sort by hit_count. @@ -417,15 +418,15 @@ pub fn main() !void { var best_contents = contents_list.popOrNull().?; if (best_contents.hit_count > 1) { // worth it to make it generic - const full_path = try std.fs.path.join(allocator, [_][]const u8{ out_dir, generic_name, path_kv.key }); - try std.fs.makePath(allocator, std.fs.path.dirname(full_path).?); + const full_path = try std.fs.path.join(allocator, &[_][]const u8{ out_dir, generic_name, path_kv.key }); + try std.fs.cwd().makePath(std.fs.path.dirname(full_path).?); try std.io.writeFile(full_path, best_contents.bytes); best_contents.is_generic = true; while (contents_list.popOrNull()) |contender| { if (contender.hit_count > 1) { const this_missed_bytes = contender.hit_count * contender.bytes.len; missed_opportunity_bytes += this_missed_bytes; - std.debug.warn("Missed opportunity ({Bi:2}): {}\n", .{this_missed_bytes, path_kv.key}); + std.debug.warn("Missed opportunity ({Bi:2}): {}\n", .{ this_missed_bytes, path_kv.key }); } else break; } } @@ -444,8 +445,8 @@ pub fn main() !void { @tagName(dest_target.os), @tagName(dest_target.abi), }); - const full_path = try std.fs.path.join(allocator, [_][]const u8{ out_dir, out_subpath, path_kv.key }); - try std.fs.makePath(allocator, std.fs.path.dirname(full_path).?); + const full_path = try std.fs.path.join(allocator, &[_][]const u8{ out_dir, out_subpath, path_kv.key }); + try std.fs.cwd().makePath(std.fs.path.dirname(full_path).?); try std.io.writeFile(full_path, contents.bytes); } } diff --git a/tools/update_glibc.zig b/tools/update_glibc.zig index b97f81d286..84522aabe4 100644 --- a/tools/update_glibc.zig +++ b/tools/update_glibc.zig @@ -1,5 +1,4 @@ const std = @import("std"); -const builtin = @import("builtin"); const fs = std.fs; const fmt = std.fmt; const assert = std.debug.assert; @@ -11,8 +10,8 @@ const AbiList = struct { path: []const u8, }; const ZigTarget = struct { - arch: @TagType(builtin.Arch), - abi: builtin.Abi, + arch: std.Target.Cpu.Arch, + abi: std.Target.Abi, }; const lib_names = [_][]const u8{ @@ -27,18 +26,18 @@ const lib_names = [_][]const u8{ // n64/n32 are hardcoded elsewhere, based on .gnuabi64/.gnuabin32 const abi_lists = [_]AbiList{ AbiList{ - .targets = [_]ZigTarget{ + .targets = &[_]ZigTarget{ ZigTarget{ .arch = .aarch64, .abi = .gnu }, ZigTarget{ .arch = .aarch64_be, .abi = .gnu }, }, .path = "aarch64", }, AbiList{ - .targets = [_]ZigTarget{ZigTarget{ .arch = .s390x, .abi = .gnu }}, + .targets = &[_]ZigTarget{ZigTarget{ .arch = .s390x, .abi = .gnu }}, .path = "s390/s390-64", }, AbiList{ - .targets = [_]ZigTarget{ + .targets = &[_]ZigTarget{ ZigTarget{ .arch = .arm, .abi = .gnueabi }, ZigTarget{ .arch = .armeb, .abi = .gnueabi }, ZigTarget{ .arch = .arm, .abi = .gnueabihf }, @@ -47,66 +46,66 @@ const abi_lists = [_]AbiList{ .path = "arm", }, AbiList{ - .targets = [_]ZigTarget{ + .targets = &[_]ZigTarget{ ZigTarget{ .arch = .sparc, .abi = .gnu }, ZigTarget{ .arch = .sparcel, .abi = .gnu }, }, .path = "sparc/sparc32", }, AbiList{ - .targets = [_]ZigTarget{ZigTarget{ .arch = .sparcv9, .abi = .gnu }}, + .targets = &[_]ZigTarget{ZigTarget{ .arch = .sparcv9, .abi = .gnu }}, .path = "sparc/sparc64", }, AbiList{ - .targets = [_]ZigTarget{ + .targets = &[_]ZigTarget{ ZigTarget{ .arch = .mips64el, .abi = .gnuabi64 }, ZigTarget{ .arch = .mips64, .abi = .gnuabi64 }, }, .path = "mips/mips64", }, AbiList{ - .targets = [_]ZigTarget{ + .targets = &[_]ZigTarget{ ZigTarget{ .arch = .mips64el, .abi = .gnuabin32 }, ZigTarget{ .arch = .mips64, .abi = .gnuabin32 }, }, .path = "mips/mips64", }, AbiList{ - .targets = [_]ZigTarget{ + .targets = &[_]ZigTarget{ ZigTarget{ .arch = .mipsel, .abi = .gnueabihf }, ZigTarget{ .arch = .mips, .abi = .gnueabihf }, }, .path = "mips/mips32", }, AbiList{ - .targets = [_]ZigTarget{ + .targets = &[_]ZigTarget{ ZigTarget{ .arch = .mipsel, .abi = .gnueabi }, ZigTarget{ .arch = .mips, .abi = .gnueabi }, }, .path = "mips/mips32", }, AbiList{ - .targets = [_]ZigTarget{ZigTarget{ .arch = .x86_64, .abi = .gnu }}, + .targets = &[_]ZigTarget{ZigTarget{ .arch = .x86_64, .abi = .gnu }}, .path = "x86_64/64", }, AbiList{ - .targets = [_]ZigTarget{ZigTarget{ .arch = .x86_64, .abi = .gnux32 }}, + .targets = &[_]ZigTarget{ZigTarget{ .arch = .x86_64, .abi = .gnux32 }}, .path = "x86_64/x32", }, AbiList{ - .targets = [_]ZigTarget{ZigTarget{ .arch = .i386, .abi = .gnu }}, + .targets = &[_]ZigTarget{ZigTarget{ .arch = .i386, .abi = .gnu }}, .path = "i386", }, AbiList{ - .targets = [_]ZigTarget{ZigTarget{ .arch = .powerpc64le, .abi = .gnu }}, + .targets = &[_]ZigTarget{ZigTarget{ .arch = .powerpc64le, .abi = .gnu }}, .path = "powerpc/powerpc64/le", }, AbiList{ - .targets = [_]ZigTarget{ZigTarget{ .arch = .powerpc64, .abi = .gnu }}, + .targets = &[_]ZigTarget{ZigTarget{ .arch = .powerpc64, .abi = .gnu }}, .path = "powerpc/powerpc64/be", }, AbiList{ - .targets = [_]ZigTarget{ + .targets = &[_]ZigTarget{ ZigTarget{ .arch = .powerpc, .abi = .gnueabi }, ZigTarget{ .arch = .powerpc, .abi = .gnueabihf }, }, @@ -137,8 +136,8 @@ pub fn main() !void { const in_glibc_dir = args[1]; // path to the unzipped tarball of glibc, e.g. ~/downloads/glibc-2.25 const zig_src_dir = args[2]; // path to the source checkout of zig, lib dir, e.g. ~/zig-src/lib - const prefix = try fs.path.join(allocator, [_][]const u8{ in_glibc_dir, "sysdeps", "unix", "sysv", "linux" }); - const glibc_out_dir = try fs.path.join(allocator, [_][]const u8{ zig_src_dir, "libc", "glibc" }); + const prefix = try fs.path.join(allocator, &[_][]const u8{ in_glibc_dir, "sysdeps", "unix", "sysv", "linux" }); + const glibc_out_dir = try fs.path.join(allocator, &[_][]const u8{ zig_src_dir, "libc", "glibc" }); var global_fn_set = std.StringHashMap(Function).init(allocator); var global_ver_set = std.StringHashMap(usize).init(allocator); @@ -158,26 +157,30 @@ pub fn main() !void { const basename = try fmt.allocPrint(allocator, "lib{}.abilist", .{lib_name}); const abi_list_filename = blk: { if (abi_list.targets[0].abi == .gnuabi64 and std.mem.eql(u8, lib_name, "c")) { - break :blk try fs.path.join(allocator, [_][]const u8{ prefix, abi_list.path, "n64", basename }); + break :blk try fs.path.join(allocator, &[_][]const u8{ prefix, abi_list.path, "n64", basename }); } else if (abi_list.targets[0].abi == .gnuabin32 and std.mem.eql(u8, lib_name, "c")) { - break :blk try fs.path.join(allocator, [_][]const u8{ prefix, abi_list.path, "n32", basename }); + break :blk try fs.path.join(allocator, &[_][]const u8{ prefix, abi_list.path, "n32", basename }); } else if (abi_list.targets[0].arch != .arm and abi_list.targets[0].abi == .gnueabihf and (std.mem.eql(u8, lib_name, "c") or (std.mem.eql(u8, lib_name, "m") and abi_list.targets[0].arch == .powerpc))) { - break :blk try fs.path.join(allocator, [_][]const u8{ prefix, abi_list.path, "fpu", basename }); + break :blk try fs.path.join(allocator, &[_][]const u8{ prefix, abi_list.path, "fpu", basename }); } else if (abi_list.targets[0].arch != .arm and abi_list.targets[0].abi == .gnueabi and (std.mem.eql(u8, lib_name, "c") or (std.mem.eql(u8, lib_name, "m") and abi_list.targets[0].arch == .powerpc))) { - break :blk try fs.path.join(allocator, [_][]const u8{ prefix, abi_list.path, "nofpu", basename }); + break :blk try fs.path.join(allocator, &[_][]const u8{ prefix, abi_list.path, "nofpu", basename }); + } else if (abi_list.targets[0].arch == .arm) { + break :blk try fs.path.join(allocator, &[_][]const u8{ prefix, abi_list.path, "le", basename }); + } else if (abi_list.targets[0].arch == .armeb) { + break :blk try fs.path.join(allocator, &[_][]const u8{ prefix, abi_list.path, "be", basename }); } - break :blk try fs.path.join(allocator, [_][]const u8{ prefix, abi_list.path, basename }); + break :blk try fs.path.join(allocator, &[_][]const u8{ prefix, abi_list.path, basename }); }; const contents = std.io.readFileAlloc(allocator, abi_list_filename) catch |err| { - std.debug.warn("unable to open {}: {}\n", .{abi_list_filename, err}); + std.debug.warn("unable to open {}: {}\n", .{ abi_list_filename, err }); std.process.exit(1); }; var lines_it = std.mem.tokenize(contents, "\n"); @@ -228,8 +231,8 @@ pub fn main() !void { break :blk list.toSliceConst(); }; { - const vers_txt_path = try fs.path.join(allocator, [_][]const u8{ glibc_out_dir, "vers.txt" }); - const vers_txt_file = try fs.File.openWrite(vers_txt_path); + const vers_txt_path = try fs.path.join(allocator, &[_][]const u8{ glibc_out_dir, "vers.txt" }); + const vers_txt_file = try fs.cwd().createFile(vers_txt_path, .{}); defer vers_txt_file.close(); var buffered = std.io.BufferedOutStream(fs.File.WriteError).init(&vers_txt_file.outStream().stream); const vers_txt = &buffered.stream; @@ -240,15 +243,15 @@ pub fn main() !void { try buffered.flush(); } { - const fns_txt_path = try fs.path.join(allocator, [_][]const u8{ glibc_out_dir, "fns.txt" }); - const fns_txt_file = try fs.File.openWrite(fns_txt_path); + const fns_txt_path = try fs.path.join(allocator, &[_][]const u8{ glibc_out_dir, "fns.txt" }); + const fns_txt_file = try fs.cwd().createFile(fns_txt_path, .{}); defer fns_txt_file.close(); var buffered = std.io.BufferedOutStream(fs.File.WriteError).init(&fns_txt_file.outStream().stream); const fns_txt = &buffered.stream; for (global_fn_list) |name, i| { const kv = global_fn_set.get(name).?; kv.value.index = i; - try fns_txt.print("{} {}\n", .{name, kv.value.lib}); + try fns_txt.print("{} {}\n", .{ name, kv.value.lib }); } try buffered.flush(); } @@ -271,8 +274,8 @@ pub fn main() !void { } { - const abilist_txt_path = try fs.path.join(allocator, [_][]const u8{ glibc_out_dir, "abi.txt" }); - const abilist_txt_file = try fs.File.openWrite(abilist_txt_path); + const abilist_txt_path = try fs.path.join(allocator, &[_][]const u8{ glibc_out_dir, "abi.txt" }); + const abilist_txt_file = try fs.cwd().createFile(abilist_txt_path, .{}); defer abilist_txt_file.close(); var buffered = std.io.BufferedOutStream(fs.File.WriteError).init(&abilist_txt_file.outStream().stream); const abilist_txt = &buffered.stream; @@ -282,7 +285,7 @@ pub fn main() !void { const fn_vers_list = &target_functions.get(@ptrToInt(abi_list)).?.value.fn_vers_list; for (abi_list.targets) |target, it_i| { if (it_i != 0) try abilist_txt.writeByte(' '); - try abilist_txt.print("{}-linux-{}", .{@tagName(target.arch), @tagName(target.abi)}); + try abilist_txt.print("{}-linux-{}", .{ @tagName(target.arch), @tagName(target.abi) }); } try abilist_txt.writeByte('\n'); // next, each line implicitly corresponds to a function @@ -304,7 +307,7 @@ pub fn main() !void { } pub fn strCmpLessThan(a: []const u8, b: []const u8) bool { - return std.mem.compare(u8, a, b) == .LessThan; + return std.mem.order(u8, a, b) == .lt; } pub fn versionLessThan(a: []const u8, b: []const u8) bool { |
