authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-03-04 15:35:46-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-03-04 15:35:46-05:00
log3178807657f0d75646c9de11ba4b23ee556e70da
tree0e8f668368e68a3fe7b510ae00aaa5d48dc379b2
parent66e6f5586e314b6f4fac8b0ed0198f47ba80d4f3
parent6cbd1ac51af4300ef11373d16771cf011fb6e572
signaturelock-open Commit is signed but in an unrecognized format.

Merge remote-tracking branch 'origin/master' into llvm10


1427 files changed, 8346 insertions(+), 7186 deletions(-)

ci/srht/update_download_page+10-5
......@@ -21,7 +21,10 @@ curl --fail -I "$AARCH64_LINUX_JSON_URL" >/dev/null || exit 0
2121curl --fail -I "$X86_64_LINUX_JSON_URL" >/dev/null || exit 0
2222curl --fail -I "$X86_64_WINDOWS_JSON_URL" >/dev/null || exit 0
2323curl --fail -I "$X86_64_MACOS_JSON_URL" >/dev/null || exit 0
24curl --fail -I "$X86_64_FREEBSD_JSON_URL" >/dev/null || exit 0
24
25# FreeBSD is dealing with some weird upstream bug right now
26# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244549
27#curl --fail -I "$X86_64_FREEBSD_JSON_URL" >/dev/null || exit 0
2528
2629# Without --user, this gave me:
2730# 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)"
6366export AARCH64_LINUX_BYTESIZE="$(echo "$AARCH64_LINUX_JSON" | jq .size -r)"
6467export AARCH64_LINUX_SHASUM="$(echo "$AARCH64_LINUX_JSON" | jq .shasum -r)"
6568
66X86_64_FREEBSD_JSON=$(curl --fail "$X86_64_FREEBSD_JSON_URL" || exit 1)
67export X86_64_FREEBSD_TARBALL="$(echo "$X86_64_FREEBSD_JSON" | jq .tarball -r)"
68export X86_64_FREEBSD_BYTESIZE="$(echo "$X86_64_FREEBSD_JSON" | jq .size -r)"
69export X86_64_FREEBSD_SHASUM="$(echo "$X86_64_FREEBSD_JSON" | jq .shasum -r)"
69# FreeBSD is dealing with some weird upstream bug right now
70# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244549
71#X86_64_FREEBSD_JSON=$(curl --fail "$X86_64_FREEBSD_JSON_URL" || exit 1)
72#export X86_64_FREEBSD_TARBALL="$(echo "$X86_64_FREEBSD_JSON" | jq .tarball -r)"
73#export X86_64_FREEBSD_BYTESIZE="$(echo "$X86_64_FREEBSD_JSON" | jq .size -r)"
74#export X86_64_FREEBSD_SHASUM="$(echo "$X86_64_FREEBSD_JSON" | jq .shasum -r)"
7075
7176git clone https://github.com/ziglang/www.ziglang.org --depth 1
7277cd www.ziglang.org
doc/docgen.zig+1-1
......@@ -50,7 +50,7 @@ pub fn main() !void {
5050 var tokenizer = Tokenizer.init(in_file_name, input_file_bytes);
5151 var toc = try genToc(allocator, &tokenizer);
5252
53 try fs.makePath(allocator, tmp_dir_name);
53 try fs.cwd().makePath(tmp_dir_name);
5454 defer fs.deleteTree(tmp_dir_name) catch {};
5555
5656 try genHtml(allocator, &tokenizer, &toc, &buffered_out_stream.stream, zig_exe);
doc/langref.html.in+10-7
......@@ -6019,13 +6019,16 @@ pub fn printf(self: *OutStream, arg0: i32, arg1: []const u8) !void {
60196019 </p>
60206020 {#code_begin|syntax#}
60216021pub fn printValue(self: *OutStream, value: var) !void {
6022 const T = @TypeOf(value);
6023 if (@isInteger(T)) {
6024 return self.printInt(T, value);
6025 } else if (@isFloat(T)) {
6026 return self.printFloat(T, value);
6027 } else {
6028 @compileError("Unable to print type '" ++ @typeName(T) ++ "'");
6022 switch (@typeInfo(@TypeOf(value))) {
6023 .Int => {
6024 return self.printInt(T, value);
6025 },
6026 .Float => {
6027 return self.printFloat(T, value);
6028 },
6029 else => {
6030 @compileError("Unable to print type '" ++ @typeName(T) ++ "'");
6031 },
60296032 }
60306033}
60316034 {#code_end#}
lib/libc/glibc/LICENSES+2-2
......@@ -246,7 +246,7 @@ Collected from libdes and modified for SECURE RPC by Martin Kuck 1994
246246This file is distributed under the terms of the GNU Lesser General
247247Public License, version 2.1 or later - see the file COPYING.LIB for details.
248248If you did not receive a copy of the license with this program, please
249see <http://www.gnu.org/licenses/> to obtain a copy.
249see <https://www.gnu.org/licenses/> to obtain a copy.
250250
251251The file inet/rcmd.c is under a UCB copyright and the following:
252252
......@@ -388,4 +388,4 @@ Copyright 2001 by Stephen L. Moshier <moshier@na-net.ornl.gov>
388388
389389 You should have received a copy of the GNU Lesser General Public
390390 License along with this library; if not, see
391 <http://www.gnu.org/licenses/>. */
391 <https://www.gnu.org/licenses/>. */
lib/libc/glibc/abi.txt+250-235
......@@ -2735,6 +2735,7 @@ aarch64-linux-gnu aarch64_be-linux-gnu
2735273529
2736273629
2737273729
273841
2738273929
2739274040
2740274129
......@@ -3420,22 +3421,22 @@ aarch64-linux-gnu aarch64_be-linux-gnu
3420342129
3421342229
3422342329
342335
342435
342537
342637
342737
342837
342937
343035
343135
343235
343337
343437
343537
343637
343737
343835
342435 41
342535 41
342637 41
342737 41
342837 41
342937 41
343037 41
343135 41
343235 41
343335 41
343437 41
343537 41
343637 41
343737 41
343837 41
343935 41
3439344029
3440344129
3441344229
......@@ -4240,7 +4241,7 @@ s390x-linux-gnu
424042415
424142425
424242435
4243
424411
4244424527
42454246
4246424727
......@@ -6461,6 +6462,7 @@ s390x-linux-gnu
646164625
646264635
646364645
646541
646464665 13
6465646740
646664685 13
......@@ -7146,22 +7148,22 @@ s390x-linux-gnu
714671485
714771495
7148715012
714935
715035
715137
715237
715337
715437
715537
715635
715735
715835
715937
716037
716137
716237
716337
716435
715135 41
715235 41
715337 41
715437 41
715537 41
715637 41
715737 41
715835 41
715935 41
716035 41
716137 41
716237 41
716337 41
716437 41
716537 41
716635 41
716571675
7166716812
716771695
......@@ -10187,6 +10189,7 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf
101871018916
101881019016
101891019116
1019241
101901019316
101911019440
101921019516
......@@ -10872,22 +10875,22 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf
108721087516
108731087616
108741087716
1087535
1087635
1087835 41
1087935 41
1087710880
1087837
1087937
1088037
1088137 41
1088237 41
1088337 41
1088110884
1088235
1088335
1088435
1088535 41
1088635 41
1088735 41
1088510888
1088637
1088737
1088837
1088937 41
1089037 41
1089137 41
1088910892
1089035
1089335 41
108911089416
108921089516
108931089616
......@@ -11692,7 +11695,7 @@ sparc-linux-gnu sparcel-linux-gnu
11692116951
11693116960
11694116970
116953
116983 11
116961169927
1169711700
116981170127
......@@ -13913,6 +13916,7 @@ sparc-linux-gnu sparcel-linux-gnu
13913139165
13914139175
13915139180
1391941
13916139200 13
139171392140
13918139220 13
......@@ -14598,22 +14602,22 @@ sparc-linux-gnu sparcel-linux-gnu
14598146020
14599146030
146001460412
1460135
1460235
1460337
1460437
1460537
1460637
1460737
1460835
1460935
1461035
1461137
1461237
1461337
1461437
1461537
1461635
1460535 41
1460635 41
1460737 41
1460837 41
1460937 41
1461037 41
1461137 41
1461235 41
1461335 41
1461435 41
1461537 41
1461637 41
1461737 41
1461837 41
1461937 41
1462035 41
14617146210
146181462212
14619146230
......@@ -15418,7 +15422,7 @@ sparcv9-linux-gnu
15418154225
15419154235
15420154245
15421
1542511
154221542627
1542315427
154241542827
......@@ -17639,6 +17643,7 @@ sparcv9-linux-gnu
17639176435
17640176445
17641176455
1764641
17642176475 13
176431764840
17644176495 13
......@@ -18324,22 +18329,22 @@ sparcv9-linux-gnu
18324183295
18325183305
183261833112
1832735
1832835
1832937
1833037
1833137
1833237
1833337
1833435
1833535
1833635
1833737
1833837
1833937
1834037
1834137
1834235
1833235 41
1833335 41
1833437 41
1833537 41
1833637 41
1833737 41
1833837 41
1833935 41
1834035 41
1834135 41
1834237 41
1834337 41
1834437 41
1834537 41
1834637 41
1834735 41
18343183485
183441834912
18345183505
......@@ -19144,7 +19149,7 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64
19144191495
19145191500
19146191510
19147
1915211
191481915327
1914919154
191501915527
......@@ -21365,6 +21370,7 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64
21365213705
21366213715
21367213720
2137341
21368213740 13
213692137540
21370213760 13
......@@ -22050,22 +22056,22 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64
22050220560
22051220570
220522205812
2205335
2205435
2205537
2205637
2205737
2205837
2205937
2206035
2206135
2206235
2206337
2206437
2206537
2206637
2206737
2206835
2205935 41
2206035 41
2206137 41
2206237 41
2206337 41
2206437 41
2206537 41
2206635 41
2206735 41
2206835 41
2206937 41
2207037 41
2207137 41
2207237 41
2207337 41
2207435 41
22069220750
220702207612
22071220770
......@@ -22870,7 +22876,7 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32
22870228765
22871228770
22872228780
22873
2287911
228742288027
2287522881
228762288227
......@@ -25091,6 +25097,7 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32
25091250975
25092250985
25093250990
2510041
25094251010 13
250952510240
25096251030 13
......@@ -25776,22 +25783,22 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32
25776257830
25777257840
257782578512
2577935
2578035
2578137
2578237
2578337
2578437
2578537
2578635
2578735
2578835
2578937
2579037
2579137
2579237
2579337
2579435
2578635 41
2578735 41
2578837 41
2578937 41
2579037 41
2579137 41
2579237 41
2579335 41
2579435 41
2579535 41
2579637 41
2579737 41
2579837 41
2579937 41
2580037 41
2580135 41
25795258020
257962580312
25797258040
......@@ -26596,7 +26603,7 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf
26596266035
26597266040
26598266050
26599
2660611
266002660727
2660126608
266022660927
......@@ -28817,6 +28824,7 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf
28817288245
28818288255
28819288260
2882741
28820288280 13
288212882940
28822288300 13
......@@ -29502,22 +29510,22 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf
29502295100
29503295110
295042951212
2950535
2950635
2951335 41
2951435 41
2950729515
2950837
2950937
2951037
2951637 41
2951737 41
2951837 41
2951129519
2951235
2951335
2951435
2952035 41
2952135 41
2952235 41
2951529523
2951637
2951737
2951837
2952437 41
2952537 41
2952637 41
2951929527
2952035
2952835 41
29521295290
295222953012
29523295310
......@@ -30322,7 +30330,7 @@ mipsel-linux-gnueabi mips-linux-gnueabi
30322303305
30323303310
30324303320
30325
3033311
303263033427
3032730335
303283033627
......@@ -32543,6 +32551,7 @@ mipsel-linux-gnueabi mips-linux-gnueabi
32543325515
32544325525
32545325530
3255441
32546325550 13
325473255640
32548325570 13
......@@ -33228,22 +33237,22 @@ mipsel-linux-gnueabi mips-linux-gnueabi
33228332370
33229332380
332303323912
3323135
3323235
3324035 41
3324135 41
3323333242
3323437
3323537
3323637
3324337 41
3324437 41
3324537 41
3323733246
3323835
3323935
3324035
3324735 41
3324835 41
3324935 41
3324133250
3324237
3324337
3324437
3325137 41
3325237 41
3325337 41
3324533254
3324635
3325535 41
33247332560
332483325712
33249332580
......@@ -34048,7 +34057,7 @@ x86_64-linux-gnu
340483405710
340493405810
340503405910
34051
3406011
340523406127
340533406236
340543406327
......@@ -36269,6 +36278,7 @@ x86_64-linux-gnu
362693627810
362703627910
362713628010
3628141
362723628210 13
362733628340
362743628410 13
......@@ -36954,22 +36964,22 @@ x86_64-linux-gnu
369543696410
369553696510
369563696612
3695735
3695835
3695936
3696037
3696137
3696237
3696337
3696435
3696535
3696635
3696736
3696837
3696937
3697037
3697137
3697235
3696735 41
3696835 41
3696936 41
3697037 41
3697137 41
3697237 41
3697337 41
3697435 41
3697535 41
3697635 41
3697736 41
3697837 41
3697937 41
3698037 41
3698137 41
3698235 41
369733698310
369743698412
369753698510
......@@ -38600,11 +38610,11 @@ x86_64-linux-gnux32
386003861028
386013861128
386023861228
3860329 28
3860429 28
3860529 28
3860629 28
3860729 28
3861328 29
3861428 29
3861528 29
3861628 29
3861728 29
386083861828
386093861928
386103862028
......@@ -39995,6 +40005,7 @@ x86_64-linux-gnux32
399954000528
399964000628
399974000728
4000841
399984000928
399994001040
400004001128
......@@ -40680,22 +40691,22 @@ x86_64-linux-gnux32
406804069128
406814069228
406824069328
4068335
4068435
4068536
4068637
4068737
4068837
4068937
4069035
4069135
4069235
4069336
4069437
4069537
4069637
4069737
4069835
4069435 41
4069535 41
4069636 41
4069737 41
4069837 41
4069937 41
4070037 41
4070135 41
4070235 41
4070335 41
4070436 41
4070537 41
4070637 41
4070737 41
4070837 41
4070935 41
406994071028
407004071128
407014071228
......@@ -41500,7 +41511,7 @@ i386-linux-gnu
41500415111
41501415120
41502415130
415033
415143 11
415044151527
415054151636
415064151727
......@@ -43721,6 +43732,7 @@ i386-linux-gnu
43721437325
43722437335
43723437340
4373541
43724437360 13
437254373740
43726437380 13
......@@ -44406,22 +44418,22 @@ i386-linux-gnu
44406444180
44407444190
444084442012
4440935
4441035
4441136
4441237
4441337
4441437
4441537
4441635
4441735
4441835
4441936
4442037
4442137
4442237
4442337
4442435
4442135 41
4442235 41
4442336 41
4442437 41
4442537 41
4442637 41
4442737 41
4442835 41
4442935 41
4443035 41
4443136 41
4443237 41
4443337 41
4443437 41
4443537 41
4443635 41
44425444370
444264443812
44427444390
......@@ -47447,6 +47459,7 @@ powerpc64le-linux-gnu
474474745929
474484746029
474494746129
4746241
474504746329
474514746440
474524746529
......@@ -48132,22 +48145,22 @@ powerpc64le-linux-gnu
481324814529
481334814629
481344814729
4813535
4813635
4813736
4813837
4813937
4814037
4814137
4814235
4814335
4814435
4814536
4814637
4814737
4814837
4814937
4815035
4814835 41
4814935 41
4815036 41
4815137 41
4815237 41
4815337 41
4815437 41
4815535 41
4815635 41
4815735 41
4815836 41
4815937 41
4816037 41
4816137 41
4816237 41
4816335 41
481514816429
481524816529
481534816629
......@@ -51173,6 +51186,7 @@ powerpc64-linux-gnu
511735118612
511745118712
511755118812
5118941
511765119012 13
511775119140
511785119212 13
......@@ -51858,22 +51872,22 @@ powerpc64-linux-gnu
518585187212
518595187312
518605187412
5186135
5186235
5187535 41
5187635 41
5186351877
5186437
5186537
5186637
5187837 41
5187937 41
5188037 41
5186751881
5186835
5186935
5187035
5188235 41
5188335 41
5188435 41
5187151885
5187237
5187337
5187437
5188637 41
5188737 41
5188837 41
5187551889
5187635
5189035 41
518775189112
518785189212
518795189312
......@@ -52678,7 +52692,7 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf
52678526921
52679526930
52680526940
526813
526953 11
526825269627
5268352697
526845269827
......@@ -54899,6 +54913,7 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf
54899549135
54900549145
54901549150
5491641
54902549170 13
549035491840
54904549190 13
......@@ -55584,22 +55599,22 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf
55584555990
55585556000
555865560112
5558735
5558835
5560235 41
5560335 41
5558955604
5559037
5559137
5559237
5560537 41
5560637 41
5560737 41
5559355608
5559435
5559535
5559635
5560935 41
5561035 41
5561135 41
5559755612
5559837
5559937
5560037
5561337 41
5561437 41
5561537 41
5560155616
5560235
5561735 41
55603556180
556045561912
55605556200
lib/libc/glibc/bits/byteswap.h+2-2
......@@ -1,5 +1,5 @@
11/* Macros and inline functions to swap the order of bytes in integer values.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#if !defined _BYTESWAP_H && !defined _NETINET_IN_H && !defined _ENDIAN_H
2020# error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead."
lib/libc/glibc/bits/floatn-common.h+2-2
......@@ -1,6 +1,6 @@
11/* Macros to control TS 18661-3 glibc features where the same
22 definitions are appropriate for all platforms.
3 Copyright (C) 2017-2019 Free Software Foundation, Inc.
3 Copyright (C) 2017-2020 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _BITS_FLOATN_COMMON_H
2121#define _BITS_FLOATN_COMMON_H
lib/libc/glibc/bits/libc-header-start.h+20-4
......@@ -1,5 +1,5 @@
11/* Handle feature test macros at the start of a header.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* This header is internal to glibc and should not be included outside
2020 of glibc headers. Headers including it must define
......@@ -43,22 +43,38 @@
4343#endif
4444
4545/* ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__
46 macro. */
46 macro. Most but not all symbols enabled by that macro in TS
47 18661-1 are enabled unconditionally in C2X; the symbols in Annex F
48 still require that macro in C2X. */
4749#undef __GLIBC_USE_IEC_60559_BFP_EXT
4850#if defined __USE_GNU || defined __STDC_WANT_IEC_60559_BFP_EXT__
4951# define __GLIBC_USE_IEC_60559_BFP_EXT 1
5052#else
5153# define __GLIBC_USE_IEC_60559_BFP_EXT 0
5254#endif
55#undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X
56#if __GLIBC_USE (IEC_60559_BFP_EXT) || __GLIBC_USE (ISOC2X)
57# define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1
58#else
59# define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 0
60#endif
5361
5462/* ISO/IEC TS 18661-4:2015 defines the
55 __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. */
63 __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction
64 functions, the symbols from this TS are enabled unconditionally in
65 C2X. */
5666#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
5767#if defined __USE_GNU || defined __STDC_WANT_IEC_60559_FUNCS_EXT__
5868# define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
5969#else
6070# define __GLIBC_USE_IEC_60559_FUNCS_EXT 0
6171#endif
72#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X
73#if __GLIBC_USE (IEC_60559_FUNCS_EXT) || __GLIBC_USE (ISOC2X)
74# define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1
75#else
76# define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 0
77#endif
6278
6379/* ISO/IEC TS 18661-3:2015 defines the
6480 __STDC_WANT_IEC_60559_TYPES_EXT__ macro. */
lib/libc/glibc/bits/long-double.h+3-2
......@@ -1,5 +1,5 @@
11/* Properties of long double type.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* This header is included by <sys/cdefs.h>.
2020
......@@ -37,3 +37,4 @@
3737#ifndef __NO_LONG_DOUBLE_MATH
3838# define __NO_LONG_DOUBLE_MATH 1
3939#endif
40#define __LONG_DOUBLE_USES_FLOAT128 0
lib/libc/glibc/bits/select.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_SELECT_H
1919# error "Never use <bits/select.h> directly; include <sys/select.h> instead."
lib/libc/glibc/bits/signum-generic.h+2-2
......@@ -1,5 +1,5 @@
11/* Signal number constants. Generic template.
2 Copyright (C) 1991-2019 Free Software Foundation, Inc.
2 Copyright (C) 1991-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_SIGNUM_GENERIC_H
2020#define _BITS_SIGNUM_GENERIC_H 1
lib/libc/glibc/bits/stat.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#if !defined _SYS_STAT_H && !defined _FCNTL_H
1919# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
lib/libc/glibc/bits/stdint-intn.h+2-2
......@@ -1,5 +1,5 @@
11/* Define intN_t types.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_STDINT_INTN_H
2020#define _BITS_STDINT_INTN_H 1
lib/libc/glibc/bits/stdlib-bsearch.h+2-2
......@@ -1,5 +1,5 @@
11/* Perform binary search - inline version.
2 Copyright (C) 1991-2019 Free Software Foundation, Inc.
2 Copyright (C) 1991-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919__extern_inline void *
2020bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size,
lib/libc/glibc/bits/time64.h+2-2
......@@ -1,5 +1,5 @@
11/* bits/time64.h -- underlying types for __time64_t. Generic version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_TYPES_H
2020# error "Never include <bits/time64.h> directly; use <sys/types.h> instead."
lib/libc/glibc/bits/timesize.h+2-2
......@@ -1,5 +1,5 @@
11/* Bit size of the time_t type at glibc build time, general case.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#include <bits/wordsize.h>
2020
lib/libc/glibc/bits/types/struct_sched_param.h+2-2
......@@ -1,5 +1,5 @@
11/* Sched parameter structure. Generic version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_TYPES_STRUCT_SCHED_PARAM
2020#define _BITS_TYPES_STRUCT_SCHED_PARAM 1
lib/libc/glibc/bits/typesizes.h+7-2
......@@ -1,5 +1,5 @@
11/* bits/typesizes.h -- underlying types for *_t. Generic version.
2 Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 Copyright (C) 2002-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_TYPES_H
2020# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
......@@ -72,8 +72,13 @@
7272
7373/* And for rlim_t and rlim64_t. */
7474# define __RLIM_T_MATCHES_RLIM64_T 1
75
76/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
77# define __STATFS_MATCHES_STATFS64 1
7578#else
7679# define __RLIM_T_MATCHES_RLIM64_T 0
80
81# define __STATFS_MATCHES_STATFS64 0
7782#endif
7883
7984/* Number of descriptors that can fit in an `fd_set'. */
lib/libc/glibc/bits/uintn-identity.h+2-2
......@@ -1,5 +1,5 @@
11/* Inline functions to return unsigned integer values unchanged.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#if !defined _NETINET_IN_H && !defined _ENDIAN_H
2020# error "Never use <bits/uintn-identity.h> directly; include <netinet/in.h> or <endian.h> instead."
lib/libc/glibc/bits/waitflags.h+2-2
......@@ -1,5 +1,5 @@
11/* Definitions of flag bits for `waitpid' et al.
2 Copyright (C) 1992-2019 Free Software Foundation, Inc.
2 Copyright (C) 1992-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#if !defined _SYS_WAIT_H && !defined _STDLIB_H
2020# error "Never include <bits/waitflags.h> directly; use <sys/wait.h> instead."
lib/libc/glibc/bits/waitstatus.h+2-2
......@@ -1,5 +1,5 @@
11/* Definitions of status bits for `wait' et al.
2 Copyright (C) 1992-2019 Free Software Foundation, Inc.
2 Copyright (C) 1992-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#if !defined _SYS_WAIT_H && !defined _STDLIB_H
2020# error "Never include <bits/waitstatus.h> directly; use <sys/wait.h> instead."
lib/libc/glibc/csu/abi-note.S+2-2
......@@ -1,5 +1,5 @@
11/* Special .init and .fini section support.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -23,7 +23,7 @@
2323
2424 You should have received a copy of the GNU Lesser General Public
2525 License along with the GNU C Library; if not, see
26 <http://www.gnu.org/licenses/>. */
26 <https://www.gnu.org/licenses/>. */
2727
2828/* Define an ELF note identifying the operating-system ABI that the
2929 executable was created for. The ELF note information identifies a
lib/libc/glibc/csu/elf-init.c+2-2
......@@ -1,5 +1,5 @@
11/* Startup support for ELF initializers/finalizers in the main executable.
2 Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 Copyright (C) 2002-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library; if not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636#include <stddef.h>
3737
lib/libc/glibc/debug/stack_chk_fail_local.c+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -30,7 +30,7 @@
3030
3131 You should have received a copy of the GNU Lesser General Public
3232 License along with the GNU C Library; if not, see
33 <http://www.gnu.org/licenses/>. */
33 <https://www.gnu.org/licenses/>. */
3434
3535#include <sys/cdefs.h>
3636
lib/libc/glibc/elf/elf.h+6-3
......@@ -1,5 +1,5 @@
11/* This file defines standard ELF types, structures, and macros.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _ELF_H
2020#define _ELF_H 1
......@@ -1715,6 +1715,7 @@ typedef struct
17151715#define SHT_MIPS_EH_REGION 0x70000027
17161716#define SHT_MIPS_XLATE_OLD 0x70000028
17171717#define SHT_MIPS_PDR_EXCEPTION 0x70000029
1718#define SHT_MIPS_XHASH 0x7000002b
17181719
17191720/* Legal values for sh_flags field of Elf32_Shdr. */
17201721
......@@ -1962,7 +1963,9 @@ typedef struct
19621963 in a PIE as it stores a relative offset from the address of the tag
19631964 rather than an absolute address. */
19641965#define DT_MIPS_RLD_MAP_REL 0x70000035
1965#define DT_MIPS_NUM 0x36
1966/* GNU-style hash table with xlat. */
1967#define DT_MIPS_XHASH 0x70000036
1968#define DT_MIPS_NUM 0x37
19661969
19671970/* Legal values for DT_MIPS_FLAGS Elf32_Dyn entry. */
19681971
lib/libc/glibc/fns.txt+1
......@@ -2734,6 +2734,7 @@ pthread_barrierattr_getpshared pthread
27342734pthread_barrierattr_init pthread
27352735pthread_barrierattr_setpshared pthread
27362736pthread_cancel pthread
2737pthread_clockjoin_np pthread
27372738pthread_cond_broadcast c
27382739pthread_cond_clockwait pthread
27392740pthread_cond_destroy c
lib/libc/glibc/include/bits/endian.h created+1
......@@ -0,0 +1 @@
1#include <string/bits/endian.h>
lib/libc/glibc/include/features.h+21-6
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _FEATURES_H
1919#define _FEATURES_H 1
......@@ -24,6 +24,7 @@
2424 __STRICT_ANSI__ ISO Standard C.
2525 _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
2626 _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
27 _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
2728 __STDC_WANT_LIB_EXT2__
2829 Extensions to ISO C99 from TR 27431-2:2010.
2930 __STDC_WANT_IEC_60559_BFP_EXT__
......@@ -139,6 +140,7 @@
139140#undef __USE_GNU
140141#undef __USE_FORTIFY_LEVEL
141142#undef __KERNEL_STRICT_NAMES
143#undef __GLIBC_USE_ISOC2X
142144#undef __GLIBC_USE_DEPRECATED_GETS
143145#undef __GLIBC_USE_DEPRECATED_SCANF
144146
......@@ -195,6 +197,8 @@
195197# define _ISOC99_SOURCE 1
196198# undef _ISOC11_SOURCE
197199# define _ISOC11_SOURCE 1
200# undef _ISOC2X_SOURCE
201# define _ISOC2X_SOURCE 1
198202# undef _POSIX_SOURCE
199203# define _POSIX_SOURCE 1
200204# undef _POSIX_C_SOURCE
......@@ -216,26 +220,37 @@
216220#if (defined _DEFAULT_SOURCE \
217221 || (!defined __STRICT_ANSI__ \
218222 && !defined _ISOC99_SOURCE && !defined _ISOC11_SOURCE \
223 && !defined _ISOC2X_SOURCE \
219224 && !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE \
220225 && !defined _XOPEN_SOURCE))
221226# undef _DEFAULT_SOURCE
222227# define _DEFAULT_SOURCE 1
223228#endif
224229
230/* This is to enable the ISO C2X extension. */
231#if (defined _ISOC2X_SOURCE \
232 || (defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L))
233# define __GLIBC_USE_ISOC2X 1
234#else
235# define __GLIBC_USE_ISOC2X 0
236#endif
237
225238/* This is to enable the ISO C11 extension. */
226#if (defined _ISOC11_SOURCE \
239#if (defined _ISOC11_SOURCE || defined _ISOC2X_SOURCE \
227240 || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L))
228241# define __USE_ISOC11 1
229242#endif
230243
231244/* This is to enable the ISO C99 extension. */
232#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \
245#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \
246 || defined _ISOC2X_SOURCE \
233247 || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L))
234248# define __USE_ISOC99 1
235249#endif
236250
237251/* This is to enable the ISO C90 Amendment 1:1995 extension. */
238#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \
252#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \
253 || defined _ISOC2X_SOURCE \
239254 || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199409L))
240255# define __USE_ISOC95 1
241256#endif
......@@ -439,7 +454,7 @@
439454/* Major and minor version number of the GNU C library package. Use
440455 these macros to test for features in specific releases. */
441456#define __GLIBC__ 2
442#define __GLIBC_MINOR__ 30
457#define __GLIBC_MINOR__ 31
443458
444459#define __GLIBC_PREREQ(maj, min) \
445460 ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
lib/libc/glibc/include/libc-pointer-arith.h+2-2
......@@ -1,5 +1,5 @@
11/* Helper macros for pointer arithmetic.
2 Copyright (C) 2012-2019 Free Software Foundation, Inc.
2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _LIBC_POINTER_ARITH_H
2020#define _LIBC_POINTER_ARITH_H 1
lib/libc/glibc/include/libc-symbols.h+2-2
......@@ -1,6 +1,6 @@
11/* Support macros for making weak and strong aliases for symbols,
22 and for using symbol sets and linker warnings with GNU ld.
3 Copyright (C) 1995-2019 Free Software Foundation, Inc.
3 Copyright (C) 1995-2020 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _LIBC_SYMBOLS_H
2121#define _LIBC_SYMBOLS_H 1
lib/libc/glibc/include/stap-probe.h+2-2
......@@ -1,5 +1,5 @@
11/* Macros for defining Systemtap <sys/sdt.h> static probe points.
2 Copyright (C) 2012-2019 Free Software Foundation, Inc.
2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _STAP_PROBE_H
2020#define _STAP_PROBE_H 1
lib/libc/glibc/include/stdc-predef.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _STDC_PREDEF_H
1919#define _STDC_PREDEF_H 1
lib/libc/glibc/include/stdlib.h+3
......@@ -202,9 +202,12 @@ libc_hidden_proto (____strtoll_l_internal)
202202libc_hidden_proto (____strtoul_l_internal)
203203libc_hidden_proto (____strtoull_l_internal)
204204
205#include <bits/floatn.h>
205206libc_hidden_proto (strtof)
206207libc_hidden_proto (strtod)
208#if __LONG_DOUBLE_USES_FLOAT128 == 0
207209libc_hidden_proto (strtold)
210#endif
208211libc_hidden_proto (strtol)
209212libc_hidden_proto (strtoll)
210213libc_hidden_proto (strtoul)
lib/libc/glibc/io/bits/statx.h+2-2
......@@ -1,5 +1,5 @@
11/* statx-related definitions and declarations. Generic version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* This interface is based on <linux/stat.h> in Linux. */
2020
lib/libc/glibc/io/fstat.c+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -30,7 +30,7 @@
3030
3131 You should have received a copy of the GNU Lesser General Public
3232 License along with the GNU C Library; if not, see
33 <http://www.gnu.org/licenses/>. */
33 <https://www.gnu.org/licenses/>. */
3434
3535#include <sys/stat.h>
3636
lib/libc/glibc/io/fstat64.c+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -30,7 +30,7 @@
3030
3131 You should have received a copy of the GNU Lesser General Public
3232 License along with the GNU C Library; if not, see
33 <http://www.gnu.org/licenses/>. */
33 <https://www.gnu.org/licenses/>. */
3434
3535#include <sys/stat.h>
3636
lib/libc/glibc/io/fstatat.c+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -30,7 +30,7 @@
3030
3131 You should have received a copy of the GNU Lesser General Public
3232 License along with the GNU C Library; if not, see
33 <http://www.gnu.org/licenses/>. */
33 <https://www.gnu.org/licenses/>. */
3434
3535#include <sys/stat.h>
3636
lib/libc/glibc/io/fstatat64.c+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -30,7 +30,7 @@
3030
3131 You should have received a copy of the GNU Lesser General Public
3232 License along with the GNU C Library; if not, see
33 <http://www.gnu.org/licenses/>. */
33 <https://www.gnu.org/licenses/>. */
3434
3535#include <sys/stat.h>
3636
lib/libc/glibc/io/lstat.c+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -30,7 +30,7 @@
3030
3131 You should have received a copy of the GNU Lesser General Public
3232 License along with the GNU C Library; if not, see
33 <http://www.gnu.org/licenses/>. */
33 <https://www.gnu.org/licenses/>. */
3434
3535#include <sys/stat.h>
3636
lib/libc/glibc/io/lstat64.c+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -30,7 +30,7 @@
3030
3131 You should have received a copy of the GNU Lesser General Public
3232 License along with the GNU C Library; if not, see
33 <http://www.gnu.org/licenses/>. */
33 <https://www.gnu.org/licenses/>. */
3434
3535#include <sys/stat.h>
3636
lib/libc/glibc/io/mknod.c+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -30,7 +30,7 @@
3030
3131 You should have received a copy of the GNU Lesser General Public
3232 License along with the GNU C Library; if not, see
33 <http://www.gnu.org/licenses/>. */
33 <https://www.gnu.org/licenses/>. */
3434
3535
3636#include <sys/types.h>
lib/libc/glibc/io/mknodat.c+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -30,7 +30,7 @@
3030
3131 You should have received a copy of the GNU Lesser General Public
3232 License along with the GNU C Library; if not, see
33 <http://www.gnu.org/licenses/>. */
33 <https://www.gnu.org/licenses/>. */
3434
3535
3636#include <sys/types.h>
lib/libc/glibc/io/stat.c+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -30,7 +30,7 @@
3030
3131 You should have received a copy of the GNU Lesser General Public
3232 License along with the GNU C Library; if not, see
33 <http://www.gnu.org/licenses/>. */
33 <https://www.gnu.org/licenses/>. */
3434
3535#include <sys/stat.h>
3636
lib/libc/glibc/io/stat64.c+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -30,7 +30,7 @@
3030
3131 You should have received a copy of the GNU Lesser General Public
3232 License along with the GNU C Library; if not, see
33 <http://www.gnu.org/licenses/>. */
33 <https://www.gnu.org/licenses/>. */
3434
3535#include <sys/stat.h>
3636
lib/libc/glibc/io/sys/stat.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * POSIX Standard: 5.6 File Characteristics <sys/stat.h>
lib/libc/glibc/locale/bits/types/__locale_t.h+2-2
......@@ -1,5 +1,5 @@
11/* Definition of struct __locale_struct and __locale_t.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44 Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _BITS_TYPES___LOCALE_T_H
2121#define _BITS_TYPES___LOCALE_T_H 1
lib/libc/glibc/locale/bits/types/locale_t.h+2-2
......@@ -1,5 +1,5 @@
11/* Definition of locale_t.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_TYPES_LOCALE_T_H
2020#define _BITS_TYPES_LOCALE_T_H 1
lib/libc/glibc/misc/sys/cdefs.h+2-10
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_CDEFS_H
1919#define _SYS_CDEFS_H 1
......@@ -412,14 +412,6 @@
412412# define __glibc_has_attribute(attr) 0
413413#endif
414414
415#ifdef __has_include
416/* Do not use a function-like macro, so that __has_include can inhibit
417 macro expansion. */
418# define __glibc_has_include __has_include
419#else
420# define __glibc_has_include(header) 0
421#endif
422
423415#if (!defined _Noreturn \
424416 && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
425417 && !__GNUC_PREREQ (4,7))
lib/libc/glibc/misc/sys/select.h+2-2
......@@ -1,5 +1,5 @@
11/* `fd_set' type and related macros, and `select'/`pselect' declarations.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h> */
2020
lib/libc/glibc/nptl/pthread_atfork.c+6-7
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33 Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
44
......@@ -31,18 +31,17 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library; if not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636extern int __pthread_atfork (void (*prepare) (void), void (*parent) (void),
37 void (*child) (void));
37 void (*child) (void));
3838extern int __register_atfork (void (*__prepare) (void),
39 void (*__parent) (void),
40 void (*__child) (void),
41 void *dso_handle);
39 void (*__parent) (void),
40 void (*__child) (void),
41 void *dso_handle);
4242libc_hidden_proto (__register_atfork)
4343extern void *__dso_handle __attribute__ ((__visibility__ ("hidden")));
4444
45
4645/* Hide the symbol so that no definition but the one locally in the
4746 executable or DSO is used. */
4847int
lib/libc/glibc/posix/bits/cpu-set.h+2-2
......@@ -1,6 +1,6 @@
11/* Definition of the cpu_set_t structure used by the POSIX 1003.1b-1993
22 scheduling interface.
3 Copyright (C) 1996-2019 Free Software Foundation, Inc.
3 Copyright (C) 1996-2020 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _BITS_CPU_SET_H
2121#define _BITS_CPU_SET_H 1
lib/libc/glibc/posix/bits/types.h+2-2
......@@ -1,5 +1,5 @@
11/* bits/types.h -- definitions of __*_t types underlying *_t types.
2 Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 Copyright (C) 2002-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/*
2020 * Never include this file directly; use <sys/types.h> instead.
lib/libc/glibc/posix/sys/types.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * POSIX Standard: 2.6 Primitive System Data Types <sys/types.h>
lib/libc/glibc/signal/signal.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * ISO C99 Standard: 7.14 Signal handling <signal.h>
lib/libc/glibc/stdlib/alloca.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _ALLOCA_H
1919#define _ALLOCA_H 1
lib/libc/glibc/stdlib/at_quick_exit.c+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -30,7 +30,7 @@
3030
3131 You should have received a copy of the GNU Lesser General Public
3232 License along with the GNU C Library; if not, see
33 <http://www.gnu.org/licenses/>. */
33 <https://www.gnu.org/licenses/>. */
3434
3535extern void *__dso_handle __attribute__ ((__visibility__ ("hidden")));
3636extern int __cxa_at_quick_exit (void (*func) (void *), void *d);
lib/libc/glibc/stdlib/atexit.c+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -30,7 +30,7 @@
3030
3131 You should have received a copy of the GNU Lesser General Public
3232 License along with the GNU C Library; if not, see
33 <http://www.gnu.org/licenses/>. */
33 <https://www.gnu.org/licenses/>. */
3434
3535extern int __cxa_atexit (void (*func) (void *), void *arg, void *d);
3636libc_hidden_proto (__cxa_atexit);
lib/libc/glibc/stdlib/bits/stdlib-float.h+2-2
......@@ -1,5 +1,5 @@
11/* Floating-point inline functions for stdlib.h.
2 Copyright (C) 2012-2019 Free Software Foundation, Inc.
2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _STDLIB_H
2020# error "Never use <bits/stdlib-float.h> directly; include <stdlib.h> instead."
lib/libc/glibc/stdlib/exit.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _EXIT_H
1919#define _EXIT_H 1
lib/libc/glibc/stdlib/stdlib.h+3-3
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * ISO C99 Standard: 7.20 General utilities <stdlib.h>
......@@ -208,7 +208,7 @@ extern unsigned long long int strtoull (const char *__restrict __nptr,
208208#endif /* ISO C99 or use MISC. */
209209
210210/* Convert a floating-point number to a string. */
211#if __GLIBC_USE (IEC_60559_BFP_EXT)
211#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
212212extern int strfromd (char *__dest, size_t __size, const char *__format,
213213 double __f)
214214 __THROW __nonnull ((3));
lib/libc/glibc/string/bits/endian.h created+49
......@@ -0,0 +1,49 @@
1/* Endian macros for string.h functions
2 Copyright (C) 1992-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19#ifndef _BITS_ENDIAN_H
20#define _BITS_ENDIAN_H 1
21
22/* Definitions for byte order, according to significance of bytes,
23 from low addresses to high addresses. The value is what you get by
24 putting '4' in the most significant byte, '3' in the second most
25 significant byte, '2' in the second least significant byte, and '1'
26 in the least significant byte, and then writing down one digit for
27 each byte, starting with the byte at the lowest address at the left,
28 and proceeding to the byte with the highest address at the right. */
29
30#define __LITTLE_ENDIAN 1234
31#define __BIG_ENDIAN 4321
32#define __PDP_ENDIAN 3412
33
34/* This file defines `__BYTE_ORDER' for the particular machine. */
35#include <bits/endianness.h>
36
37/* Some machines may need to use a different endianness for floating point
38 values. */
39#ifndef __FLOAT_WORD_ORDER
40# define __FLOAT_WORD_ORDER __BYTE_ORDER
41#endif
42
43#if __BYTE_ORDER == __LITTLE_ENDIAN
44# define __LONG_LONG_PAIR(HI, LO) LO, HI
45#elif __BYTE_ORDER == __BIG_ENDIAN
46# define __LONG_LONG_PAIR(HI, LO) HI, LO
47#endif
48
49#endif /* bits/endian.h */
lib/libc/glibc/string/endian.h+4-29
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,48 +13,23 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _ENDIAN_H
1919#define _ENDIAN_H 1
2020
2121#include <features.h>
2222
23/* Definitions for byte order, according to significance of bytes,
24 from low addresses to high addresses. The value is what you get by
25 putting '4' in the most significant byte, '3' in the second most
26 significant byte, '2' in the second least significant byte, and '1'
27 in the least significant byte, and then writing down one digit for
28 each byte, starting with the byte at the lowest address at the left,
29 and proceeding to the byte with the highest address at the right. */
30
31#define __LITTLE_ENDIAN 1234
32#define __BIG_ENDIAN 4321
33#define __PDP_ENDIAN 3412
34
35/* This file defines `__BYTE_ORDER' for the particular machine. */
23/* Get the definitions of __*_ENDIAN, __BYTE_ORDER, and __FLOAT_WORD_ORDER. */
3624#include <bits/endian.h>
3725
38/* Some machines may need to use a different endianness for floating point
39 values. */
40#ifndef __FLOAT_WORD_ORDER
41# define __FLOAT_WORD_ORDER __BYTE_ORDER
42#endif
43
44#ifdef __USE_MISC
26#ifdef __USE_MISC
4527# define LITTLE_ENDIAN __LITTLE_ENDIAN
4628# define BIG_ENDIAN __BIG_ENDIAN
4729# define PDP_ENDIAN __PDP_ENDIAN
4830# define BYTE_ORDER __BYTE_ORDER
4931#endif
5032
51#if __BYTE_ORDER == __LITTLE_ENDIAN
52# define __LONG_LONG_PAIR(HI, LO) LO, HI
53#elif __BYTE_ORDER == __BIG_ENDIAN
54# define __LONG_LONG_PAIR(HI, LO) HI, LO
55#endif
56
57
5833#if defined __USE_MISC && !defined __ASSEMBLER__
5934/* Conversion interfaces. */
6035# include <bits/byteswap.h>
lib/libc/glibc/sysdeps/aarch64/bits/endian.h deleted-30
......@@ -1,30 +0,0 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
2
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 2.1 of the
8 License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
18
19#ifndef _ENDIAN_H
20# error "Never use <bits/endian.h> directly; include <endian.h> instead."
21#endif
22
23/* AArch64 can be either big or little endian. */
24#ifdef __AARCH64EB__
25# define __BYTE_ORDER __BIG_ENDIAN
26#else
27# define __BYTE_ORDER __LITTLE_ENDIAN
28#endif
29
30#define __FLOAT_WORD_ORDER __BYTE_ORDER
lib/libc/glibc/sysdeps/aarch64/bits/endianness.h created+15
......@@ -0,0 +1,15 @@
1#ifndef _BITS_ENDIANNESS_H
2#define _BITS_ENDIANNESS_H 1
3
4#ifndef _BITS_ENDIAN_H
5# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
6#endif
7
8/* AArch64 has selectable endianness. */
9#ifdef __AARCH64EB__
10# define __BYTE_ORDER __BIG_ENDIAN
11#else
12# define __BYTE_ORDER __LITTLE_ENDIAN
13#endif
14
15#endif /* bits/endianness.h */
lib/libc/glibc/sysdeps/aarch64/crti.S+2-2
......@@ -1,5 +1,5 @@
11/* Special .init and .fini section support for AArch64.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -32,7 +32,7 @@
3232
3333 You should have received a copy of the GNU Lesser General Public
3434 License along with the GNU C Library; if not, see
35 <http://www.gnu.org/licenses/>. */
35 <https://www.gnu.org/licenses/>. */
3636
3737/* crti.S puts a function prologue at the beginning of the .init and
3838 .fini sections and defines global symbols for those addresses, so
lib/libc/glibc/sysdeps/aarch64/crtn.S+2-2
......@@ -1,5 +1,5 @@
11/* Special .init and .fini section support for AArch64.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -32,7 +32,7 @@
3232
3333 You should have received a copy of the GNU Lesser General Public
3434 License along with the GNU C Library; if not, see
35 <http://www.gnu.org/licenses/>. */
35 <https://www.gnu.org/licenses/>. */
3636
3737/* crtn.S puts function epilogues in the .init and .fini sections
3838 corresponding to the prologues in crti.S. */
lib/libc/glibc/sysdeps/aarch64/dl-sysdep.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#include_next <dl-sysdep.h>
2020
lib/libc/glibc/sysdeps/aarch64/nptl/bits/pthreadtypes-arch.h+3-27
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
......@@ -14,12 +14,12 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_PTHREADTYPES_ARCH_H
2020#define _BITS_PTHREADTYPES_ARCH_H 1
2121
22#include <endian.h>
22#include <bits/endian.h>
2323
2424#ifdef __ILP32__
2525# define __SIZEOF_PTHREAD_ATTR_T 32
......@@ -41,31 +41,7 @@
4141#define __SIZEOF_PTHREAD_COND_T 48
4242#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
4343
44/* Definitions for internal mutex struct. */
45#define __PTHREAD_COMPAT_PADDING_MID
46#define __PTHREAD_COMPAT_PADDING_END
47#define __PTHREAD_MUTEX_LOCK_ELISION 0
48#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 0
49#define __PTHREAD_MUTEX_USE_UNION 0
50
5144#define __LOCK_ALIGNMENT
5245#define __ONCE_ALIGNMENT
5346
54struct __pthread_rwlock_arch_t
55{
56 unsigned int __readers;
57 unsigned int __writers;
58 unsigned int __wrphase_futex;
59 unsigned int __writers_futex;
60 unsigned int __pad3;
61 unsigned int __pad4;
62 int __cur_writer;
63 int __shared;
64 unsigned long int __pad1;
65 unsigned long int __pad2;
66 unsigned int __flags;
67};
68
69#define __PTHREAD_RWLOCK_ELISION_EXTRA 0
70
7147#endif /* bits/pthreadtypes.h */
lib/libc/glibc/sysdeps/aarch64/start.S+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2020 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#include <sysdep.h>
2020
lib/libc/glibc/sysdeps/aarch64/sysdep.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _AARCH64_SYSDEP_H
2020#define _AARCH64_SYSDEP_H
lib/libc/glibc/sysdeps/alpha/bits/endian.h deleted-7
......@@ -1,7 +0,0 @@
1/* Alpha is little-endian. */
2
3#ifndef _ENDIAN_H
4# error "Never use <bits/endian.h> directly; include <endian.h> instead."
5#endif
6
7#define __BYTE_ORDER __LITTLE_ENDIAN
lib/libc/glibc/sysdeps/alpha/bits/endianness.h created+11
......@@ -0,0 +1,11 @@
1#ifndef _BITS_ENDIANNESS_H
2#define _BITS_ENDIANNESS_H 1
3
4#ifndef _BITS_ENDIAN_H
5# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
6#endif
7
8/* Alpha is little-endian. */
9#define __BYTE_ORDER __LITTLE_ENDIAN
10
11#endif /* bits/endianness.h */
lib/libc/glibc/sysdeps/alpha/crti.S+2-2
......@@ -1,5 +1,5 @@
11/* Special .init and .fini section support for Alpha.
2 Copyright (C) 2001-2019 Free Software Foundation, Inc.
2 Copyright (C) 2001-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library. If not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636/* crti.S puts a function prologue at the beginning of the .init and
3737 .fini sections and defines global symbols for those addresses, so
lib/libc/glibc/sysdeps/alpha/crtn.S+2-2
......@@ -1,5 +1,5 @@
11/* Special .init and .fini section support for Alpha.
2 Copyright (C) 2001-2019 Free Software Foundation, Inc.
2 Copyright (C) 2001-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library. If not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636/* crtn.S puts function epilogues in the .init and .fini sections
3737 corresponding to the prologues in crti.S. */
lib/libc/glibc/sysdeps/alpha/dl-sysdep.h+2-2
......@@ -1,5 +1,5 @@
11/* System-specific settings for dynamic linker code. Alpha version.
2 Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 Copyright (C) 2002-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#include_next <dl-sysdep.h>
2020
lib/libc/glibc/sysdeps/alpha/start.S+2-2
......@@ -1,5 +1,5 @@
11/* Startup code for Alpha/ELF.
2 Copyright (C) 1993-2019 Free Software Foundation, Inc.
2 Copyright (C) 1993-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44 Contributed by Richard Henderson <rth@tamu.edu>
55
......@@ -32,7 +32,7 @@
3232
3333 You should have received a copy of the GNU Lesser General Public
3434 License along with the GNU C Library. If not, see
35 <http://www.gnu.org/licenses/>. */
35 <https://www.gnu.org/licenses/>. */
3636
3737#include <sysdep.h>
3838
lib/libc/glibc/sysdeps/arm/bits/endian.h deleted-10
......@@ -1,10 +0,0 @@
1#ifndef _ENDIAN_H
2# error "Never use <bits/endian.h> directly; include <endian.h> instead."
3#endif
4
5/* ARM can be either big or little endian. */
6#ifdef __ARMEB__
7#define __BYTE_ORDER __BIG_ENDIAN
8#else
9#define __BYTE_ORDER __LITTLE_ENDIAN
10#endif
lib/libc/glibc/sysdeps/arm/bits/endianness.h created+15
......@@ -0,0 +1,15 @@
1#ifndef _BITS_ENDIANNESS_H
2#define _BITS_ENDIANNESS_H 1
3
4#ifndef _BITS_ENDIAN_H
5# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
6#endif
7
8/* ARM has selectable endianness. */
9#ifdef __ARMEB__
10#define __BYTE_ORDER __BIG_ENDIAN
11#else
12#define __BYTE_ORDER __LITTLE_ENDIAN
13#endif
14
15#endif /* bits/endianness.h */
lib/libc/glibc/sysdeps/arm/crti.S+2-2
......@@ -1,5 +1,5 @@
11/* Special .init and .fini section support for ARM.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library. If not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636/* crti.S puts a function prologue at the beginning of the .init and
3737 .fini sections and defines global symbols for those addresses, so
lib/libc/glibc/sysdeps/arm/crtn.S+2-2
......@@ -1,5 +1,5 @@
11/* Special .init and .fini section support for ARM.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library. If not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636/* Always build .init and .fini sections in ARM mode. */
3737#define NO_THUMB
lib/libc/glibc/sysdeps/arm/dl-sysdep.h+2-2
......@@ -1,5 +1,5 @@
11/* System-specific settings for dynamic linker code. Alpha version.
2 Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 Copyright (C) 2002-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#include_next <dl-sysdep.h>
2020
lib/libc/glibc/sysdeps/arm/start.S+2-2
......@@ -1,5 +1,5 @@
11/* Startup code for ARM & ELF
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library. If not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636/* This is the canonical entry point, usually the first thing in the text
3737 segment.
lib/libc/glibc/sysdeps/arm/sysdep.h+2-2
......@@ -1,5 +1,5 @@
11/* Assembler macros for ARM.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#include <sysdeps/generic/sysdep.h>
2020#include <features.h>
lib/libc/glibc/sysdeps/generic/dl-dtprocnum.h+2-2
......@@ -1,5 +1,5 @@
11/* Configuration of lookup functions.
2 Copyright (C) 2000-2019 Free Software Foundation, Inc.
2 Copyright (C) 2000-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* Number of extra dynamic section entries for this architecture. By
2020 default there are none. */
lib/libc/glibc/sysdeps/generic/dl-sysdep.h+2-2
......@@ -1,5 +1,5 @@
11/* System-specific settings for dynamic linker code. Generic version.
2 Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 Copyright (C) 2002-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* No multiple inclusion protection need here because it's just macros.
2020 We don't want to use _DL_SYSDEP_H in case we are #include_next'd. */
lib/libc/glibc/sysdeps/generic/dwarf2.h+2-2
......@@ -1,6 +1,6 @@
11/* Declarations and definitions of codes relating to the DWARF2 symbolic
22 debugging information format.
3 Copyright (C) 1992-2019 Free Software Foundation, Inc.
3 Copyright (C) 1992-2020 Free Software Foundation, Inc.
44 Contributed by Gary Funck (gary@intrepid.com). Derived from the
55 DWARF 1 implementation written by Ron Guilmette (rfg@monkeys.com).
66
......@@ -18,7 +18,7 @@
1818
1919 You should have received a copy of the GNU Lesser General Public
2020 License along with the GNU C Library; if not, see
21 <http://www.gnu.org/licenses/>. */
21 <https://www.gnu.org/licenses/>. */
2222
2323#ifndef _DWARF2_H
2424#define _DWARF2_H 1
lib/libc/glibc/sysdeps/generic/libc-lock.h+2-2
......@@ -1,5 +1,5 @@
11/* libc-internal interface for mutex locks. Stub version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _LIBC_LOCK_H
2020#define _LIBC_LOCK_H 1
lib/libc/glibc/sysdeps/generic/single-thread.h+3-2
......@@ -1,5 +1,5 @@
11/* Single thread optimization, generic version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,11 +14,12 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SINGLE_THREAD_H
2020#define _SINGLE_THREAD_H
2121
2222#define SINGLE_THREAD_P (0)
23#define RTLD_SINGLE_THREAD_P (0)
2324
2425#endif /* _SINGLE_THREAD_H */
lib/libc/glibc/sysdeps/generic/sysdep.h+2-2
......@@ -1,5 +1,5 @@
11/* Generic asm macros used on many machines.
2 Copyright (C) 1991-2019 Free Software Foundation, Inc.
2 Copyright (C) 1991-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef C_LABEL
2020
lib/libc/glibc/sysdeps/generic/tls.h+2-2
......@@ -1,5 +1,5 @@
11/* Definition for thread-local data handling. Generic version.
2 Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 Copyright (C) 2002-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* An architecture-specific version of this file has to defined a
2020 number of symbols:
lib/libc/glibc/sysdeps/hppa/bits/endian.h deleted-7
......@@ -1,7 +0,0 @@
1/* hppa1.1 big-endian. */
2
3#ifndef _ENDIAN_H
4# error "Never use <bits/endian.h> directly; include <endian.h> instead."
5#endif
6
7#define __BYTE_ORDER __BIG_ENDIAN
lib/libc/glibc/sysdeps/hppa/bits/endianness.h created+11
......@@ -0,0 +1,11 @@
1#ifndef _BITS_ENDIANNESS_H
2#define _BITS_ENDIANNESS_H 1
3
4#ifndef _BITS_ENDIAN_H
5# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
6#endif
7
8/* HP-PA is big-endian. */
9#define __BYTE_ORDER __BIG_ENDIAN
10
11#endif /* bits/endianness.h */
lib/libc/glibc/sysdeps/hppa/crti.S+2-2
......@@ -1,5 +1,5 @@
11/* Special .init and .fini section support for HPPA
2 Copyright (C) 2000-2019 Free Software Foundation, Inc.
2 Copyright (C) 2000-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library. If not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636/* crti.S puts a function prologue at the beginning of the .init and
3737 .fini sections and defines global symbols for those addresses, so
lib/libc/glibc/sysdeps/hppa/crtn.S+2-2
......@@ -1,5 +1,5 @@
11/* Special .init and .fini section support for HPPA
2 Copyright (C) 2000-2019 Free Software Foundation, Inc.
2 Copyright (C) 2000-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library. If not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636#include <sysdep.h>
3737
lib/libc/glibc/sysdeps/hppa/nptl/bits/pthreadtypes-arch.h+2-47
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _BITS_PTHREADTYPES_ARCH_H
1919#define _BITS_PTHREADTYPES_ARCH_H 1
......@@ -40,52 +40,7 @@
4040#define __SIZEOF_PTHREAD_RWLOCK_T 64
4141#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
4242
43/* The old 4-word 16-byte aligned lock. This is initalized
44 to all ones by the Linuxthreads PTHREAD_MUTEX_INITIALIZER.
45 Unused in NPTL. */
46#define __PTHREAD_COMPAT_PADDING_MID int __compat_padding[4];
47/* Two more words are left before the NPTL
48 pthread_mutex_t is larger than Linuxthreads. */
49#define __PTHREAD_COMPAT_PADDING_END int __reserved[2];
50#define __PTHREAD_MUTEX_LOCK_ELISION 0
51#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 1
52#define __PTHREAD_MUTEX_USE_UNION 1
53
5443#define __LOCK_ALIGNMENT __attribute__ ((__aligned__(16)))
5544#define __ONCE_ALIGNMENT
5645
57struct __pthread_rwlock_arch_t
58{
59 /* In the old Linuxthreads pthread_rwlock_t, this is the
60 start of the 4-word 16-byte aligned lock structure. The
61 next four words are all set to 1 by the Linuxthreads
62 PTHREAD_RWLOCK_INITIALIZER. We ignore them in NPTL. */
63 int __compat_padding[4] __attribute__ ((__aligned__(16)));
64 unsigned int __readers;
65 unsigned int __writers;
66 unsigned int __wrphase_futex;
67 unsigned int __writers_futex;
68 unsigned int __pad3;
69 unsigned int __pad4;
70 int __cur_writer;
71 /* An unused word, reserved for future use. It was added
72 to maintain the location of the flags from the Linuxthreads
73 layout of this structure. */
74 int __reserved1;
75 /* FLAGS must stay at this position in the structure to maintain
76 binary compatibility. */
77 unsigned char __pad2;
78 unsigned char __pad1;
79 unsigned char __shared;
80 unsigned char __flags;
81 /* The NPTL pthread_rwlock_t is 4 words smaller than the
82 Linuxthreads version. One word is in the middle of the
83 structure, the other three are at the end. */
84 int __reserved2;
85 int __reserved3;
86 int __reserved4;
87};
88
89#define __PTHREAD_RWLOCK_ELISION_EXTRA 0
90
9146#endif /* bits/pthreadtypes.h */
lib/libc/glibc/sysdeps/hppa/start.S+2-2
......@@ -1,5 +1,5 @@
11/* ELF startup code for HPPA.
2 Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 Copyright (C) 2002-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library. If not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636 .import main, code
3737 .import $global$, data
lib/libc/glibc/sysdeps/hppa/sysdep.h+2-2
......@@ -1,5 +1,5 @@
11/* Assembler macros for HP/PA.
2 Copyright (C) 1999-2019 Free Software Foundation, Inc.
2 Copyright (C) 1999-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44 Contributed by Ulrich Drepper, <drepper@cygnus.com>, August 1999.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library. If not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#include <sysdeps/generic/sysdep.h>
2121
lib/libc/glibc/sysdeps/htl/bits/pthread.h+2-2
......@@ -1,5 +1,5 @@
11/* Pthread data structures. Generic version.
2 Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 Copyright (C) 2002-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_PTHREAD_H
2020#define _BITS_PTHREAD_H 1
lib/libc/glibc/sysdeps/htl/bits/thread-shared-types.h+2-2
......@@ -1,5 +1,5 @@
11/* Common threading primitives definitions for both POSIX and C11.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _THREAD_SHARED_TYPES_H
2020#define _THREAD_SHARED_TYPES_H 1
lib/libc/glibc/sysdeps/htl/libc-lockP.h+4-2
......@@ -1,5 +1,5 @@
11/* Private libc-internal interface for mutex locks.
2 Copyright (C) 2015-2019 Free Software Foundation, Inc.
2 Copyright (C) 2015-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; see the file COPYING.LIB. If
17 not, see <http://www.gnu.org/licenses/>. */
17 not, see <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_LIBC_LOCKP_H
2020#define _BITS_LIBC_LOCKP_H 1
......@@ -112,6 +112,8 @@ extern int __pthread_rwlock_unlock (pthread_rwlock_t *__rwlock);
112112extern int __pthread_key_create (pthread_key_t *__key,
113113 void (*__destr_function) (void *));
114114
115extern int __pthread_key_delete (pthread_key_t __key);
116
115117extern int __pthread_setspecific (pthread_key_t __key,
116118 const void *__pointer);
117119
lib/libc/glibc/sysdeps/htl/pthread.h+2-2
......@@ -1,5 +1,5 @@
11/* Posix threads. Hurd version.
2 Copyright (C) 2000-2019 Free Software Foundation, Inc.
2 Copyright (C) 2000-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/*
2020 * POSIX Threads Extension: ??? <pthread.h>
lib/libc/glibc/sysdeps/i386/crti.S+2-2
......@@ -1,5 +1,5 @@
11/* Special .init and .fini section support for x86.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library; if not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636/* crti.S puts a function prologue at the beginning of the .init and
3737 .fini sections and defines global symbols for those addresses, so
lib/libc/glibc/sysdeps/i386/crtn.S+2-2
......@@ -1,5 +1,5 @@
11/* Special .init and .fini section support for x86.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library; if not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636/* crtn.S puts function epilogues in the .init and .fini sections
3737 corresponding to the prologues in crti.S. */
lib/libc/glibc/sysdeps/i386/htl/bits/pthreadtypes-arch.h+16-2
......@@ -1,5 +1,5 @@
11/* Machine-specific pthread type layouts. Hurd i386 version.
2 Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 Copyright (C) 2002-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,9 +14,23 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_PTHREADTYPES_ARCH_H
2020#define _BITS_PTHREADTYPES_ARCH_H 1
2121
22#define __SIZEOF_PTHREAD_MUTEX_T 32
23#define __SIZEOF_PTHREAD_ATTR_T 32
24#define __SIZEOF_PTHREAD_RWLOCK_T 28
25#define __SIZEOF_PTHREAD_BARRIER_T 24
26#define __SIZEOF_PTHREAD_MUTEXATTR_T 16
27#define __SIZEOF_PTHREAD_COND_T 20
28#define __SIZEOF_PTHREAD_CONDATTR_T 8
29#define __SIZEOF_PTHREAD_RWLOCKATTR_T 4
30#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
31#define __SIZEOF_PTHREAD_ONCE_T 8
32
33#define __LOCK_ALIGNMENT
34#define __ONCE_ALIGNMENT
35
2236#endif /* bits/pthreadtypes.h */
lib/libc/glibc/sysdeps/i386/start.S+2-2
......@@ -1,5 +1,5 @@
11/* Startup code compliant to the ELF i386 ABI.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library; if not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636/* This is the canonical entry point, usually the first thing in the text
3737 segment. The SVR4/i386 ABI (pages 3-31, 3-32) says that when the entry
lib/libc/glibc/sysdeps/i386/symbol-hacks.h+2-2
......@@ -1,5 +1,5 @@
11/* Hacks needed for symbol manipulation. i386 version.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#include <sysdeps/wordsize-32/divdi3-symbol-hacks.h>
2020
lib/libc/glibc/sysdeps/i386/sysdep.h+2-2
......@@ -1,5 +1,5 @@
11/* Assembler macros for i386.
2 Copyright (C) 1991-2019 Free Software Foundation, Inc.
2 Copyright (C) 1991-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#include <sysdeps/x86/sysdep.h>
2020
lib/libc/glibc/sysdeps/ia64/crti.S+2-2
......@@ -1,5 +1,5 @@
11/* Special .init and .fini section support for IA64.
2 Copyright (C) 2000-2019 Free Software Foundation, Inc.
2 Copyright (C) 2000-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library. If not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636/* crti.S puts a function prologue at the beginning of the .init and
3737 .fini sections and defines global symbols for those addresses, so
lib/libc/glibc/sysdeps/ia64/crtn.S+2-2
......@@ -1,5 +1,5 @@
11/* Special .init and .fini section support for ARM.
2 Copyright (C) 2000-2019 Free Software Foundation, Inc.
2 Copyright (C) 2000-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library. If not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636#include <sysdep.h>
3737#undef ret
lib/libc/glibc/sysdeps/ia64/dl-dtprocnum.h+2-2
......@@ -1,5 +1,5 @@
11/* Configuration of lookup functions. IA-64 version.
2 Copyright (C) 2000-2019 Free Software Foundation, Inc.
2 Copyright (C) 2000-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* Number of extra dynamic section entries for this architecture. By
2020 default there are none. */
lib/libc/glibc/sysdeps/ia64/dl-sysdep.h+2-2
......@@ -1,5 +1,5 @@
11/* System-specific settings for dynamic linker code. IA-64 version.
2 Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 Copyright (C) 2002-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#include_next <dl-sysdep.h>
2020
lib/libc/glibc/sysdeps/ia64/start.S+2-3
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33 Written by Jes Sorensen, <Jes.Sorensen@cern.ch>, April 1999.
44
......@@ -31,11 +31,10 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library; if not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636#include <sysdep.h>
3737
38#include <asm/unistd.h>
3938#include <asm/fpu.h>
4039
4140/*
lib/libc/glibc/sysdeps/ia64/sysdep.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2000-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2000-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33 Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#include <sysdeps/generic/sysdep.h>
2020
lib/libc/glibc/sysdeps/m68k/bits/endian.h deleted-7
......@@ -1,7 +0,0 @@
1/* m68k is big-endian. */
2
3#ifndef _ENDIAN_H
4# error "Never use <bits/endian.h> directly; include <endian.h> instead."
5#endif
6
7#define __BYTE_ORDER __BIG_ENDIAN
lib/libc/glibc/sysdeps/m68k/bits/endianness.h created+11
......@@ -0,0 +1,11 @@
1#ifndef _BITS_ENDIANNESS_H
2#define _BITS_ENDIANNESS_H 1
3
4#ifndef _BITS_ENDIAN_H
5# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
6#endif
7
8/* m68k is big-endian. */
9#define __BYTE_ORDER __BIG_ENDIAN
10
11#endif /* bits/endianness.h */
lib/libc/glibc/sysdeps/m68k/coldfire/sysdep.h+2-2
......@@ -1,5 +1,5 @@
11/* Assembler macros for Coldfire.
2 Copyright (C) 1998-2019 Free Software Foundation, Inc.
2 Copyright (C) 1998-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#include <sysdeps/m68k/sysdep.h>
2020
lib/libc/glibc/sysdeps/m68k/crti.S+2-2
......@@ -1,5 +1,5 @@
11/* Special .init and .fini section support for m68k.
2 Copyright (C) 2012-2019 Free Software Foundation, Inc.
2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library. If not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636/* crti.S puts a function prologue at the beginning of the .init and
3737 .fini sections and defines global symbols for those addresses, so
lib/libc/glibc/sysdeps/m68k/crtn.S+2-2
......@@ -1,5 +1,5 @@
11/* Special .init and .fini section support for m68k.
2 Copyright (C) 2012-2019 Free Software Foundation, Inc.
2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library. If not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636/* crtn.S puts function epilogues in the .init and .fini sections
3737 corresponding to the prologues in crti.S. */
lib/libc/glibc/sysdeps/m68k/m680x0/sysdep.h+2-2
......@@ -1,5 +1,5 @@
11/* Assembler macros for m680x0.
2 Copyright (C) 2010-2019 Free Software Foundation, Inc.
2 Copyright (C) 2010-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#include <sysdeps/m68k/sysdep.h>
2020
lib/libc/glibc/sysdeps/m68k/nptl/bits/pthreadtypes-arch.h+3-29
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2010-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2010-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33 Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
44
......@@ -14,12 +14,12 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_PTHREADTYPES_ARCH_H
2020#define _BITS_PTHREADTYPES_ARCH_H 1
2121
22#include <endian.h>
22#include <bits/endian.h>
2323
2424#define __SIZEOF_PTHREAD_ATTR_T 36
2525#define __SIZEOF_PTHREAD_MUTEX_T 24
......@@ -31,33 +31,7 @@
3131#define __SIZEOF_PTHREAD_BARRIER_T 20
3232#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
3333
34/* Data structure for mutex handling. */
35#define __PTHREAD_COMPAT_PADDING_MID
36#define __PTHREAD_COMPAT_PADDING_END
37#define __PTHREAD_MUTEX_LOCK_ELISION 0
38#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 1
39#define __PTHREAD_MUTEX_USE_UNION 1
40
4134#define __LOCK_ALIGNMENT __attribute__ ((__aligned__ (4)))
4235#define __ONCE_ALIGNMENT __attribute__ ((__aligned__ (4)))
4336
44struct __pthread_rwlock_arch_t
45{
46 unsigned int __readers __attribute__ ((__aligned__ (4)));
47 unsigned int __writers;
48 unsigned int __wrphase_futex;
49 unsigned int __writers_futex;
50 unsigned int __pad3;
51 unsigned int __pad4;
52 unsigned char __pad1;
53 unsigned char __pad2;
54 unsigned char __shared;
55 /* FLAGS must stay at this position in the structure to maintain
56 binary compatibility. */
57 unsigned char __flags;
58 int __cur_writer;
59};
60
61#define __PTHREAD_RWLOCK_ELISION_EXTRA 0
62
6337#endif /* bits/pthreadtypes.h */
lib/libc/glibc/sysdeps/m68k/start.S+2-2
......@@ -1,5 +1,5 @@
11/* Startup code compliant to the ELF m68k ABI.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library. If not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636/* This is the canonical entry point, usually the first thing in the text
3737 segment. The SVR4/m68k ABI says that when the entry point runs,
lib/libc/glibc/sysdeps/m68k/symbol-hacks.h+2-2
......@@ -1,5 +1,5 @@
11/* Hacks needed for symbol manipulation. m68k version.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#include <sysdeps/wordsize-32/divdi3-symbol-hacks.h>
2020
lib/libc/glibc/sysdeps/m68k/sysdep.h+2-2
......@@ -1,5 +1,5 @@
11/* Assembler macros for m68k.
2 Copyright (C) 1998-2019 Free Software Foundation, Inc.
2 Copyright (C) 1998-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#include <sysdeps/generic/sysdep.h>
2020
lib/libc/glibc/sysdeps/mach/hurd/bits/stat.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#if !defined _SYS_STAT_H && !defined _FCNTL_H
1919# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
lib/libc/glibc/sysdeps/mach/hurd/bits/typesizes.h+6-2
......@@ -1,5 +1,5 @@
11/* bits/typesizes.h -- underlying types for *_t. Hurd version.
2 Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 Copyright (C) 2002-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_TYPES_H
2020# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
......@@ -64,5 +64,9 @@
6464/* Number of descriptors that can fit in an `fd_set'. */
6565#define __FD_SETSIZE 256
6666
67/* Tell the libc code that fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and
68 fsfilcnt64_t are not the same type for all ABI purposes. */
69# define __STATFS_MATCHES_STATFS64 0
70
6771
6872#endif /* bits/typesizes.h */
lib/libc/glibc/sysdeps/mach/hurd/dl-sysdep.h+2-2
......@@ -1,5 +1,5 @@
11/* System-specific settings for dynamic linker code. Hurd version.
2 Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 Copyright (C) 2002-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* The private errno doesn't make sense on the Hurd. errno is always the
2020 thread-local slot shared with libc, and it matters to share the cell
lib/libc/glibc/sysdeps/mach/hurd/kernel-features.h+2-2
......@@ -1,5 +1,5 @@
11/* Set flags signalling availability of certain operating system features.
2 Copyright (C) 2012-2019 Free Software Foundation, Inc.
2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* This file can define __ASSUME_* macros checked by certain source files.
2020 Almost none of these are used outside of sysdeps/unix/sysv/linux code.
lib/libc/glibc/sysdeps/mach/i386/sysdep.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _MACH_I386_SYSDEP_H
2020#define _MACH_I386_SYSDEP_H 1
lib/libc/glibc/sysdeps/mach/libc-lock.h+2-2
......@@ -1,5 +1,5 @@
11/* libc-internal interface for mutex locks. Mach cthreads version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _LIBC_LOCK_H
2020#define _LIBC_LOCK_H 1
lib/libc/glibc/sysdeps/mach/sysdep.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1994-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1994-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifdef __ASSEMBLER__
1919
lib/libc/glibc/sysdeps/microblaze/bits/endian.h deleted-30
......@@ -1,30 +0,0 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
2
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 2.1 of the
8 License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
18
19#ifndef _ENDIAN_H
20# error "Never use <bits/endian.h> directly; include <endian.h> instead."
21#endif
22
23/* MicroBlaze can be either big or little endian. */
24#ifdef _BIG_ENDIAN
25# define __BYTE_ORDER __BIG_ENDIAN
26# define __FLOAT_WORD_ORDER __BIG_ENDIAN
27#else
28# define __BYTE_ORDER __LITTLE_ENDIAN
29# define __FLOAT_WORD_ORDER __LITTLE_ENDIAN
30#endif
lib/libc/glibc/sysdeps/microblaze/bits/endianness.h created+15
......@@ -0,0 +1,15 @@
1#ifndef _BITS_ENDIANNESS_H
2#define _BITS_ENDIANNESS_H 1
3
4#ifndef _BITS_ENDIAN_H
5# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
6#endif
7
8/* MicroBlaze has selectable endianness. */
9#ifdef _BIG_ENDIAN
10# define __BYTE_ORDER __BIG_ENDIAN
11#else
12# define __BYTE_ORDER __LITTLE_ENDIAN
13#endif
14
15#endif /* bits/endianness.h */
lib/libc/glibc/sysdeps/microblaze/crti.S+2-2
......@@ -1,5 +1,5 @@
11/* Special .init and .fini section support for MicroBlaze.
2 Copyright (C) 2012-2019 Free Software Foundation, Inc.
2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library; if not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636/* crti.S puts a function prologue at the beginning of the .init and
3737 .fini sections and defines global symbols for those addresses, so
lib/libc/glibc/sysdeps/microblaze/crtn.S+2-2
......@@ -1,5 +1,5 @@
11/* Special .init and .fini section support for MicroBlaze.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library; if not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636/* crtn.S puts function epilogues in the .init and .fini sections
3737 corresponding to the prologues in crti.S. */
lib/libc/glibc/sysdeps/microblaze/start.S+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2020 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library. If not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636 .text
3737 .globl _start
lib/libc/glibc/sysdeps/microblaze/sysdep.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#include <sysdeps/generic/sysdep.h>
2020
lib/libc/glibc/sysdeps/mips/bits/endian.h deleted-15
......@@ -1,15 +0,0 @@
1/* The MIPS architecture has selectable endianness.
2 It exists in both little and big endian flavours and we
3 want to be able to share the installed header files between
4 both, so we define __BYTE_ORDER based on GCC's predefines. */
5
6#ifndef _ENDIAN_H
7# error "Never use <bits/endian.h> directly; include <endian.h> instead."
8#endif
9
10#ifdef __MIPSEB
11# define __BYTE_ORDER __BIG_ENDIAN
12#endif
13#ifdef __MIPSEL
14# define __BYTE_ORDER __LITTLE_ENDIAN
15#endif
lib/libc/glibc/sysdeps/mips/bits/endianness.h created+16
......@@ -0,0 +1,16 @@
1#ifndef _BITS_ENDIANNESS_H
2#define _BITS_ENDIANNESS_H 1
3
4#ifndef _BITS_ENDIAN_H
5# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
6#endif
7
8/* MIPS has selectable endianness. */
9#ifdef __MIPSEB
10# define __BYTE_ORDER __BIG_ENDIAN
11#endif
12#ifdef __MIPSEL
13# define __BYTE_ORDER __LITTLE_ENDIAN
14#endif
15
16#endif /* bits/endianness.h */
lib/libc/glibc/sysdeps/mips/dl-dtprocnum.h+2-2
......@@ -1,5 +1,5 @@
11/* Configuration of lookup functions. MIPS version.
2 Copyright (C) 2000-2019 Free Software Foundation, Inc.
2 Copyright (C) 2000-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* Number of extra dynamic section entries for this architecture. By
2020 default there are none. */
lib/libc/glibc/sysdeps/mips/mips32/crti.S+2-2
......@@ -1,5 +1,5 @@
11/* Special .init and .fini section support for MIPS (o32).
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library. If not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636/* crti.S puts a function prologue at the beginning of the .init and
3737 .fini sections and defines global symbols for those addresses, so
lib/libc/glibc/sysdeps/mips/mips32/crtn.S+2-2
......@@ -1,5 +1,5 @@
11/* Special .init and .fini section support for MIPS (o32).
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library. If not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636/* crtn.S puts function epilogues in the .init and .fini sections
3737 corresponding to the prologues in crti.S. */
lib/libc/glibc/sysdeps/mips/mips64/n32/crti.S+2-2
......@@ -1,5 +1,5 @@
11/* Special .init and .fini section support for MIPS (n32).
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library. If not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636/* crti.S puts a function prologue at the beginning of the .init and
3737 .fini sections and defines global symbols for those addresses, so
lib/libc/glibc/sysdeps/mips/mips64/n32/crtn.S+2-2
......@@ -1,5 +1,5 @@
11/* Special .init and .fini section support for MIPS (n32).
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library. If not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636/* crtn.S puts function epilogues in the .init and .fini sections
3737 corresponding to the prologues in crti.S. */
lib/libc/glibc/sysdeps/mips/mips64/n64/crti.S+2-2
......@@ -1,5 +1,5 @@
11/* Special .init and .fini section support for MIPS (n64).
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library. If not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636/* crti.S puts a function prologue at the beginning of the .init and
3737 .fini sections and defines global symbols for those addresses, so
lib/libc/glibc/sysdeps/mips/mips64/n64/crtn.S+2-2
......@@ -1,5 +1,5 @@
11/* Special .init and .fini section support for MIPS (n64).
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library. If not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636/* crtn.S puts function epilogues in the .init and .fini sections
3737 corresponding to the prologues in crti.S. */
lib/libc/glibc/sysdeps/mips/nptl/bits/pthreadtypes-arch.h+3-48
......@@ -1,5 +1,5 @@
11/* Machine-specific pthread type layouts. MIPS version.
2 Copyright (C) 2005-2019 Free Software Foundation, Inc.
2 Copyright (C) 2005-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,12 +14,12 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_PTHREADTYPES_ARCH_H
2020#define _BITS_PTHREADTYPES_ARCH_H 1
2121
22#include <endian.h>
22#include <bits/endian.h>
2323
2424#if _MIPS_SIM == _ABI64
2525# define __SIZEOF_PTHREAD_ATTR_T 56
......@@ -38,52 +38,7 @@
3838#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
3939#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
4040
41/* Data structure for mutex handling. */
42#define __PTHREAD_COMPAT_PADDING_MID
43#define __PTHREAD_COMPAT_PADDING_END
44#define __PTHREAD_MUTEX_LOCK_ELISION 0
45#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND (_MIPS_SIM != _ABI64)
46#define __PTHREAD_MUTEX_USE_UNION (_MIPS_SIM != _ABI64)
47
4841#define __LOCK_ALIGNMENT
4942#define __ONCE_ALIGNMENT
5043
51struct __pthread_rwlock_arch_t
52{
53 unsigned int __readers;
54 unsigned int __writers;
55 unsigned int __wrphase_futex;
56 unsigned int __writers_futex;
57 unsigned int __pad3;
58 unsigned int __pad4;
59#if _MIPS_SIM == _ABI64
60 int __cur_writer;
61 int __shared;
62 unsigned long int __pad1;
63 unsigned long int __pad2;
64 /* FLAGS must stay at this position in the structure to maintain
65 binary compatibility. */
66 unsigned int __flags;
67# else
68# if __BYTE_ORDER == __BIG_ENDIAN
69 unsigned char __pad1;
70 unsigned char __pad2;
71 unsigned char __shared;
72 /* FLAGS must stay at this position in the structure to maintain
73 binary compatibility. */
74 unsigned char __flags;
75# else
76 /* FLAGS must stay at this position in the structure to maintain
77 binary compatibility. */
78 unsigned char __flags;
79 unsigned char __shared;
80 unsigned char __pad1;
81 unsigned char __pad2;
82# endif
83 int __cur_writer;
84#endif
85};
86
87#define __PTHREAD_RWLOCK_ELISION_EXTRA 0
88
8944#endif /* bits/pthreadtypes.h */
lib/libc/glibc/sysdeps/mips/start.S+2-2
......@@ -1,5 +1,5 @@
11/* Startup code compliant to the ELF Mips ABI.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library. If not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636#define __ASSEMBLY__ 1
3737#include <entry.h>
lib/libc/glibc/sysdeps/nptl/bits/pthreadtypes.h+2-2
......@@ -1,5 +1,5 @@
11/* Declaration of common pthread types for all architectures.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_PTHREADTYPES_COMMON_H
2020# define _BITS_PTHREADTYPES_COMMON_H 1
lib/libc/glibc/sysdeps/nptl/bits/thread-shared-types.h+34-113
......@@ -1,5 +1,5 @@
11/* Common threading primitives definitions for both POSIX and C11.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _THREAD_SHARED_TYPES_H
2020#define _THREAD_SHARED_TYPES_H 1
......@@ -32,36 +32,6 @@
3232 __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
3333 __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
3434
35 Also, the following macros must be define for internal pthread_mutex_t
36 struct definitions (struct __pthread_mutex_s):
37
38 __PTHREAD_COMPAT_PADDING_MID - any additional members after 'kind'
39 and before '__spin' (for 64 bits) or
40 '__nusers' (for 32 bits).
41 __PTHREAD_COMPAT_PADDING_END - any additional members at the end of
42 the internal structure.
43 __PTHREAD_MUTEX_LOCK_ELISION - 1 if the architecture supports lock
44 elision or 0 otherwise.
45 __PTHREAD_MUTEX_NUSERS_AFTER_KIND - control where to put __nusers. The
46 preferred value for new architectures
47 is 0.
48 __PTHREAD_MUTEX_USE_UNION - control whether internal __spins and
49 __list will be place inside a union for
50 linuxthreads compatibility.
51 The preferred value for new architectures
52 is 0.
53
54 For a new port the preferred values for the required defines are:
55
56 #define __PTHREAD_COMPAT_PADDING_MID
57 #define __PTHREAD_COMPAT_PADDING_END
58 #define __PTHREAD_MUTEX_LOCK_ELISION 0
59 #define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 0
60 #define __PTHREAD_MUTEX_USE_UNION 0
61
62 __PTHREAD_MUTEX_LOCK_ELISION can be set to 1 if the hardware plans to
63 eventually support lock elision using transactional memory.
64
6535 The additional macro defines any constraint for the lock alignment
6636 inside the thread structures:
6737
......@@ -69,101 +39,52 @@
6939
7040 Same idea but for the once locking primitive:
7141
72 __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
42 __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. */
7343
74 And finally the internal pthread_rwlock_t (struct __pthread_rwlock_arch_t)
75 must be defined.
76 */
7744#include <bits/pthreadtypes-arch.h>
7845
46
7947/* Common definition of pthread_mutex_t. */
8048
81#if !__PTHREAD_MUTEX_USE_UNION
8249typedef struct __pthread_internal_list
8350{
8451 struct __pthread_internal_list *__prev;
8552 struct __pthread_internal_list *__next;
8653} __pthread_list_t;
87#else
54
8855typedef struct __pthread_internal_slist
8956{
9057 struct __pthread_internal_slist *__next;
9158} __pthread_slist_t;
92#endif
93
94/* Lock elision support. */
95#if __PTHREAD_MUTEX_LOCK_ELISION
96# if !__PTHREAD_MUTEX_USE_UNION
97# define __PTHREAD_SPINS_DATA \
98 short __spins; \
99 short __elision
100# define __PTHREAD_SPINS 0, 0
101# else
102# define __PTHREAD_SPINS_DATA \
103 struct \
104 { \
105 short __espins; \
106 short __eelision; \
107 } __elision_data
108# define __PTHREAD_SPINS { 0, 0 }
109# define __spins __elision_data.__espins
110# define __elision __elision_data.__eelision
111# endif
112#else
113# define __PTHREAD_SPINS_DATA int __spins
114/* Mutex __spins initializer used by PTHREAD_MUTEX_INITIALIZER. */
115# define __PTHREAD_SPINS 0
116#endif
117
118struct __pthread_mutex_s
119{
120 int __lock __LOCK_ALIGNMENT;
121 unsigned int __count;
122 int __owner;
123#if !__PTHREAD_MUTEX_NUSERS_AFTER_KIND
124 unsigned int __nusers;
125#endif
126 /* KIND must stay at this position in the structure to maintain
127 binary compatibility with static initializers.
128
129 Concurrency notes:
130 The __kind of a mutex is initialized either by the static
131 PTHREAD_MUTEX_INITIALIZER or by a call to pthread_mutex_init.
132
133 After a mutex has been initialized, the __kind of a mutex is usually not
134 changed. BUT it can be set to -1 in pthread_mutex_destroy or elision can
135 be enabled. This is done concurrently in the pthread_mutex_*lock functions
136 by using the macro FORCE_ELISION. This macro is only defined for
137 architectures which supports lock elision.
138
139 For elision, there are the flags PTHREAD_MUTEX_ELISION_NP and
140 PTHREAD_MUTEX_NO_ELISION_NP which can be set in addition to the already set
141 type of a mutex.
142 Before a mutex is initialized, only PTHREAD_MUTEX_NO_ELISION_NP can be set
143 with pthread_mutexattr_settype.
144 After a mutex has been initialized, the functions pthread_mutex_*lock can
145 enable elision - if the mutex-type and the machine supports it - by setting
146 the flag PTHREAD_MUTEX_ELISION_NP. This is done concurrently. Afterwards
147 the lock / unlock functions are using specific elision code-paths. */
148 int __kind;
149 __PTHREAD_COMPAT_PADDING_MID
150#if __PTHREAD_MUTEX_NUSERS_AFTER_KIND
151 unsigned int __nusers;
152#endif
153#if !__PTHREAD_MUTEX_USE_UNION
154 __PTHREAD_SPINS_DATA;
155 __pthread_list_t __list;
156# define __PTHREAD_MUTEX_HAVE_PREV 1
157#else
158 __extension__ union
159 {
160 __PTHREAD_SPINS_DATA;
161 __pthread_slist_t __list;
162 };
163# define __PTHREAD_MUTEX_HAVE_PREV 0
164#endif
165 __PTHREAD_COMPAT_PADDING_END
166};
59
60/* Arch-specific mutex definitions. A generic implementation is provided
61 by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture
62 can override it by defining:
63
64 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t
65 definition). It should contains at least the internal members
66 defined in the generic version.
67
68 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with
69 atomic operations.
70
71 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization.
72 It should initialize the mutex internal flag. */
73
74#include <bits/struct_mutex.h>
75
76/* Arch-sepecific read-write lock definitions. A generic implementation is
77 provided by struct_rwlock.h. If required, an architecture can override it
78 by defining:
79
80 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition).
81 It should contain at least the internal members defined in the
82 generic version.
83
84 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization.
85 It should initialize the rwlock internal type. */
86
87#include <bits/struct_rwlock.h>
16788
16889
16990/* Common definition of pthread_cond_t. */
lib/libc/glibc/sysdeps/nptl/libc-lock.h+2-2
......@@ -1,5 +1,5 @@
11/* libc-internal interface for mutex locks. NPTL version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; see the file COPYING.LIB. If
17 not, see <http://www.gnu.org/licenses/>. */
17 not, see <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _LIBC_LOCK_H
2020#define _LIBC_LOCK_H 1
lib/libc/glibc/sysdeps/nptl/libc-lockP.h+2-2
......@@ -1,5 +1,5 @@
11/* Private libc-internal interface for mutex locks. NPTL version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; see the file COPYING.LIB. If
17 not, see <http://www.gnu.org/licenses/>. */
17 not, see <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _LIBC_LOCKP_H
2020#define _LIBC_LOCKP_H 1
lib/libc/glibc/sysdeps/nptl/pthread.h+26-51
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,16 +13,16 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _PTHREAD_H
1919#define _PTHREAD_H 1
2020
2121#include <features.h>
22#include <endian.h>
2322#include <sched.h>
2423#include <time.h>
2524
25#include <bits/endian.h>
2626#include <bits/pthreadtypes.h>
2727#include <bits/setjmp.h>
2828#include <bits/wordsize.h>
......@@ -83,30 +83,15 @@ enum
8383#endif
8484
8585
86#if __PTHREAD_MUTEX_HAVE_PREV
87# define PTHREAD_MUTEX_INITIALIZER \
88 { { 0, 0, 0, 0, 0, __PTHREAD_SPINS, { 0, 0 } } }
89# ifdef __USE_GNU
90# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \
91 { { 0, 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, __PTHREAD_SPINS, { 0, 0 } } }
92# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \
93 { { 0, 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, __PTHREAD_SPINS, { 0, 0 } } }
94# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \
95 { { 0, 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, __PTHREAD_SPINS, { 0, 0 } } }
96
97# endif
98#else
99# define PTHREAD_MUTEX_INITIALIZER \
100 { { 0, 0, 0, 0, 0, { __PTHREAD_SPINS } } }
101# ifdef __USE_GNU
102# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \
103 { { 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, { __PTHREAD_SPINS } } }
104# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \
105 { { 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, 0, { __PTHREAD_SPINS } } }
106# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \
107 { { 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, 0, { __PTHREAD_SPINS } } }
108
109# endif
86#define PTHREAD_MUTEX_INITIALIZER \
87 { { __PTHREAD_MUTEX_INITIALIZER (PTHREAD_MUTEX_TIMED_NP) } }
88#ifdef __USE_GNU
89# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \
90 { { __PTHREAD_MUTEX_INITIALIZER (PTHREAD_MUTEX_RECURSIVE_NP) } }
91# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \
92 { { __PTHREAD_MUTEX_INITIALIZER (PTHREAD_MUTEX_ERRORCHECK_NP) } }
93# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \
94 { { __PTHREAD_MUTEX_INITIALIZER (PTHREAD_MUTEX_ADAPTIVE_NP) } }
11095#endif
11196
11297
......@@ -120,34 +105,13 @@ enum
120105 PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP
121106};
122107
123/* Define __PTHREAD_RWLOCK_INT_FLAGS_SHARED to 1 if pthread_rwlock_t
124 has the shared field. All 64-bit architectures have the shared field
125 in pthread_rwlock_t. */
126#ifndef __PTHREAD_RWLOCK_INT_FLAGS_SHARED
127# if __WORDSIZE == 64
128# define __PTHREAD_RWLOCK_INT_FLAGS_SHARED 1
129# endif
130#endif
131108
132109/* Read-write lock initializers. */
133110# define PTHREAD_RWLOCK_INITIALIZER \
134 { { 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, 0 } }
111 { { __PTHREAD_RWLOCK_INITIALIZER (PTHREAD_RWLOCK_DEFAULT_NP) } }
135112# ifdef __USE_GNU
136# ifdef __PTHREAD_RWLOCK_INT_FLAGS_SHARED
137# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
138 { { 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, \
139 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP } }
140# else
141# if __BYTE_ORDER == __LITTLE_ENDIAN
142# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
143 { { 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, \
144 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, 0 } }
145# else
146# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
147 { { 0, 0, 0, 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,\
148 0 } }
149# endif
150# endif
113# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
114 { { __PTHREAD_RWLOCK_INITIALIZER (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP) } }
151115# endif
152116#endif /* Unix98 or XOpen2K */
153117
......@@ -263,6 +227,17 @@ extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __THROW;
263227 __THROW. */
264228extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return,
265229 const struct timespec *__abstime);
230
231/* Make calling thread wait for termination of the thread TH, but only
232 until TIMEOUT measured against the clock specified by CLOCKID. The
233 exit status of the thread is stored in *THREAD_RETURN, if
234 THREAD_RETURN is not NULL.
235
236 This function is a cancellation point and therefore not marked with
237 __THROW. */
238extern int pthread_clockjoin_np (pthread_t __th, void **__thread_return,
239 clockid_t __clockid,
240 const struct timespec *__abstime);
266241#endif
267242
268243/* Indicate that the thread TH is never to be joined with PTHREAD_JOIN.
lib/libc/glibc/sysdeps/powerpc/bits/endian.h deleted-36
......@@ -1,36 +0,0 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
17
18/* PowerPC can be little or big endian. Hopefully gcc will know... */
19
20#ifndef _ENDIAN_H
21# error "Never use <bits/endian.h> directly; include <endian.h> instead."
22#endif
23
24#if defined __BIG_ENDIAN__ || defined _BIG_ENDIAN
25# if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN
26# error Both BIG_ENDIAN and LITTLE_ENDIAN defined!
27# endif
28# define __BYTE_ORDER __BIG_ENDIAN
29#else
30# if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN
31# define __BYTE_ORDER __LITTLE_ENDIAN
32# else
33# warning Cannot determine current byte order, assuming big-endian.
34# define __BYTE_ORDER __BIG_ENDIAN
35# endif
36#endif
lib/libc/glibc/sysdeps/powerpc/bits/endianness.h created+16
......@@ -0,0 +1,16 @@
1#ifndef _BITS_ENDIANNESS_H
2#define _BITS_ENDIANNESS_H 1
3
4#ifndef _BITS_ENDIAN_H
5# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
6#endif
7
8/* PowerPC has selectable endianness. */
9#if defined __BIG_ENDIAN__ || defined _BIG_ENDIAN
10# define __BYTE_ORDER __BIG_ENDIAN
11#endif
12#if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN
13# define __BYTE_ORDER __LITTLE_ENDIAN
14#endif
15
16#endif /* bits/endianness.h */
lib/libc/glibc/sysdeps/powerpc/powerpc32/crti.S+2-2
......@@ -1,5 +1,5 @@
11/* Special .init and .fini section support for PowerPC.
2 Copyright (C) 2012-2019 Free Software Foundation, Inc.
2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library; if not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636/* crti.S puts a function prologue at the beginning of the .init and
3737 .fini sections and defines global symbols for those addresses, so
lib/libc/glibc/sysdeps/powerpc/powerpc32/crtn.S+2-2
......@@ -1,5 +1,5 @@
11/* Special .init and .fini section support for PowerPC.
2 Copyright (C) 2012-2019 Free Software Foundation, Inc.
2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library; if not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636/* crtn.S puts function epilogues in the .init and .fini sections
3737 corresponding to the prologues in crti.S. */
lib/libc/glibc/sysdeps/powerpc/powerpc32/start.S+2-2
......@@ -1,5 +1,5 @@
11/* Startup code for programs linked with GNU libc.
2 Copyright (C) 1998-2019 Free Software Foundation, Inc.
2 Copyright (C) 1998-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library; if not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636#include <sysdep.h>
3737
lib/libc/glibc/sysdeps/powerpc/powerpc32/symbol-hacks.h+2-2
......@@ -1,5 +1,5 @@
11/* Hacks needed for symbol manipulation. powerpc version.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#include <sysdeps/wordsize-32/divdi3-symbol-hacks.h>
2020
lib/libc/glibc/sysdeps/powerpc/powerpc32/sysdep.h+28-2
......@@ -1,5 +1,5 @@
11/* Assembly macros for 32-bit PowerPC.
2 Copyright (C) 1999-2019 Free Software Foundation, Inc.
2 Copyright (C) 1999-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#include <sysdeps/powerpc/sysdep.h>
2020
......@@ -157,4 +157,30 @@ GOT_LABEL: ; \
157157/* Label in text section. */
158158#define C_TEXT(name) name
159159
160/* Read the value of member from rtld_global_ro. */
161#ifdef PIC
162# ifdef SHARED
163# if IS_IN (rtld)
164/* Inside ld.so we use the local alias to avoid runtime GOT
165 relocations. */
166# define __GLRO(rOUT, rGOT, member, offset) \
167 lwz rOUT,_rtld_local_ro@got(rGOT); \
168 lwz rOUT,offset(rOUT)
169# else
170# define __GLRO(rOUT, rGOT, member, offset) \
171 lwz rOUT,_rtld_global_ro@got(rGOT); \
172 lwz rOUT,offset(rOUT)
173# endif
174# else
175# define __GLRO(rOUT, rGOT, member, offset) \
176 lwz rOUT,member@got(rGOT); \
177 lwz rOUT,0(rOUT)
178# endif
179#else
180/* Position-dependent code does not require access to the GOT. */
181# define __GLRO(rOUT, rGOT, member, offset) \
182 lis rOUT,(member+LOWORD)@ha; \
183 lwz rOUT,(member+LOWORD)@l(rOUT)
184#endif /* PIC */
185
160186#endif /* __ASSEMBLER__ */
lib/libc/glibc/sysdeps/powerpc/powerpc64/crti.S+2-2
......@@ -1,5 +1,5 @@
11/* Special .init and .fini section support for PowerPC64.
2 Copyright (C) 2012-2019 Free Software Foundation, Inc.
2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library; if not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636/* crti.S puts a function prologue at the beginning of the .init and
3737 .fini sections and defines global symbols for those addresses, so
lib/libc/glibc/sysdeps/powerpc/powerpc64/crtn.S+2-2
......@@ -1,5 +1,5 @@
11/* Special .init and .fini section support for PowerPC64.
2 Copyright (C) 2012-2019 Free Software Foundation, Inc.
2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library; if not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636/* crtn.S puts function epilogues in the .init and .fini sections
3737 corresponding to the prologues in crti.S. */
lib/libc/glibc/sysdeps/powerpc/powerpc64/dl-dtprocnum.h+2-2
......@@ -1,5 +1,5 @@
11/* Configuration of lookup functions. PowerPC64 version.
2 Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 Copyright (C) 2002-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* Number of extra dynamic section entries for this architecture. By
2020 default there are none. */
lib/libc/glibc/sysdeps/powerpc/powerpc64/start.S+2-2
......@@ -1,5 +1,5 @@
11/* Startup code for programs linked with GNU libc. PowerPC64 version.
2 Copyright (C) 1998-2019 Free Software Foundation, Inc.
2 Copyright (C) 1998-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library; if not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636#include <sysdep.h>
3737
lib/libc/glibc/sysdeps/powerpc/powerpc64/sysdep.h+26-2
......@@ -1,5 +1,5 @@
11/* Assembly macros for 64-bit PowerPC.
2 Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 Copyright (C) 2002-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#include <sysdeps/powerpc/sysdep.h>
2020
......@@ -342,6 +342,30 @@ LT_LABELSUFFIX(name,_name_end): ; \
342342#define PSEUDO_END_ERRVAL(name) \
343343 END (name)
344344
345#ifdef SHARED
346# if IS_IN (rtld)
347 /* Inside ld.so we use the local alias to avoid runtime GOT
348 relocations. */
349# define __GLRO_DEF(var) \
350.LC__ ## var: \
351 .tc _rtld_local_ro[TC],_rtld_local_ro
352# else
353# define __GLRO_DEF(var) \
354.LC__ ## var: \
355 .tc _rtld_global_ro[TC],_rtld_global_ro
356# endif
357# define __GLRO(rOUT, var, offset) \
358 ld rOUT,.LC__ ## var@toc(r2); \
359 lwz rOUT,offset(rOUT)
360#else
361# define __GLRO_DEF(var) \
362.LC__ ## var: \
363 .tc _ ## var[TC],_ ## var
364# define __GLRO(rOUT, var, offset) \
365 ld rOUT,.LC__ ## var@toc(r2); \
366 lwz rOUT,0(rOUT)
367#endif
368
345369#else /* !__ASSEMBLER__ */
346370
347371#if _CALL_ELF != 2
lib/libc/glibc/sysdeps/powerpc/sysdep.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * Powerpc Feature masks for the Aux Vector Hardware Capabilities (AT_HWCAP).
lib/libc/glibc/sysdeps/riscv/bits/endian.h deleted-5
......@@ -1,5 +0,0 @@
1#ifndef _ENDIAN_H
2# error "Never use <bits/endian.h> directly; include <endian.h> instead."
3#endif
4
5#define __BYTE_ORDER __LITTLE_ENDIAN
lib/libc/glibc/sysdeps/riscv/bits/endianness.h created+11
......@@ -0,0 +1,11 @@
1#ifndef _BITS_ENDIANNESS_H
2#define _BITS_ENDIANNESS_H 1
3
4#ifndef _BITS_ENDIAN_H
5# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
6#endif
7
8/* RISC-V is little-endian. */
9#define __BYTE_ORDER __LITTLE_ENDIAN
10
11#endif /* bits/endianness.h */
lib/libc/glibc/sysdeps/riscv/nptl/bits/pthreadtypes-arch.h+3-30
......@@ -1,5 +1,5 @@
11/* Machine-specific pthread type layouts. RISC-V version.
2 Copyright (C) 2011-2019 Free Software Foundation, Inc.
2 Copyright (C) 2011-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,12 +14,12 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_PTHREADTYPES_ARCH_H
2020#define _BITS_PTHREADTYPES_ARCH_H 1
2121
22#include <endian.h>
22#include <bits/endian.h>
2323
2424#if __riscv_xlen == 64
2525# define __SIZEOF_PTHREAD_ATTR_T 56
......@@ -35,34 +35,7 @@
3535# error "rv32i-based systems are not supported"
3636#endif
3737
38#define __PTHREAD_COMPAT_PADDING_MID
39#define __PTHREAD_COMPAT_PADDING_END
40#define __PTHREAD_MUTEX_LOCK_ELISION 0
41#define __PTHREAD_MUTEX_USE_UNION 0
42#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 0
43
4438#define __LOCK_ALIGNMENT
4539#define __ONCE_ALIGNMENT
4640
47/* There is a lot of padding in this structure. While it's not strictly
48 necessary on RISC-V, we're going to leave it in to be on the safe side in
49 case it's needed in the future. Most other architectures have the padding,
50 so this gives us the same extensibility as everyone else has. */
51struct __pthread_rwlock_arch_t
52{
53 unsigned int __readers;
54 unsigned int __writers;
55 unsigned int __wrphase_futex;
56 unsigned int __writers_futex;
57 unsigned int __pad3;
58 unsigned int __pad4;
59 int __cur_writer;
60 int __shared;
61 unsigned long int __pad1;
62 unsigned long int __pad2;
63 unsigned int __flags;
64};
65
66#define __PTHREAD_RWLOCK_ELISION_EXTRA 0
67
6841#endif /* bits/pthreadtypes.h */
lib/libc/glibc/sysdeps/riscv/start.S+5-5
......@@ -1,5 +1,5 @@
11/* Startup code compliant to the ELF RISC-V ABI.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library. If not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636#define __ASSEMBLY__ 1
3737#include <entry.h>
......@@ -47,7 +47,7 @@ ENTRY (ENTRY_POINT)
4747 .cfi_label to force starting the FDE. */
4848 .cfi_label .Ldummy
4949 cfi_undefined (ra)
50 call .Lload_gp
50 call load_gp
5151 mv a5, a0 /* rtld_fini. */
5252 /* main may be in a shared library. */
5353 la a0, main
......@@ -68,7 +68,7 @@ END (ENTRY_POINT)
6868 needs to be initialized before calling __libc_start_main in that case.
6969 So we redundantly initialize it at the beginning of _start. */
7070
71.Lload_gp:
71load_gp:
7272.option push
7373.option norelax
7474 lla gp, __global_pointer$
......@@ -76,7 +76,7 @@ END (ENTRY_POINT)
7676 ret
7777
7878 .section .preinit_array,"aw"
79 .dc.a .Lload_gp
79 .dc.a load_gp
8080
8181/* Define a symbol for the first piece of initialized data. */
8282 .data
lib/libc/glibc/sysdeps/s390/bits/endian.h deleted-7
......@@ -1,7 +0,0 @@
1/* s390 is big-endian */
2
3#ifndef _ENDIAN_H
4# error "Never use <bits/endian.h> directly; include <endian.h> instead."
5#endif
6
7#define __BYTE_ORDER __BIG_ENDIAN
lib/libc/glibc/sysdeps/s390/bits/endianness.h created+11
......@@ -0,0 +1,11 @@
1#ifndef _BITS_ENDIANNESS_H
2#define _BITS_ENDIANNESS_H 1
3
4#ifndef _BITS_ENDIAN_H
5# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
6#endif
7
8/* S/390 is big-endian. */
9#define __BYTE_ORDER __BIG_ENDIAN
10
11#endif /* bits/endianness.h */
lib/libc/glibc/sysdeps/s390/s390-32/crti.S+2-2
......@@ -1,5 +1,5 @@
11/* Special .init and .fini section support for S/390.
2 Copyright (C) 2000-2019 Free Software Foundation, Inc.
2 Copyright (C) 2000-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library; if not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636/* crti.S puts a function prologue at the beginning of the .init and
3737 .fini sections and defines global symbols for those addresses, so
lib/libc/glibc/sysdeps/s390/s390-32/crtn.S+2-2
......@@ -1,5 +1,5 @@
11/* Special .init and .fini section support for S/390.
2 Copyright (C) 2000-2019 Free Software Foundation, Inc.
2 Copyright (C) 2000-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library; if not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636/* crtn.S puts function epilogues in the .init and .fini sections
3737 corresponding to the prologues in crti.S. */
lib/libc/glibc/sysdeps/s390/s390-32/dl-sysdep.h+2-2
......@@ -1,5 +1,5 @@
11/* System-specific settings for dynamic linker code. S/390 version.
2 Copyright (C) 2014-2019 Free Software Foundation, Inc.
2 Copyright (C) 2014-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#include_next <dl-sysdep.h>
2020
lib/libc/glibc/sysdeps/s390/s390-32/start.S+2-2
......@@ -1,5 +1,5 @@
11/* Startup code compliant to the ELF s390 ABI.
2 Copyright (C) 2000-2019 Free Software Foundation, Inc.
2 Copyright (C) 2000-2020 Free Software Foundation, Inc.
33 Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
44 This file is part of the GNU C Library.
55
......@@ -32,7 +32,7 @@
3232
3333 You should have received a copy of the GNU Lesser General Public
3434 License along with the GNU C Library; if not, see
35 <http://www.gnu.org/licenses/>. */
35 <https://www.gnu.org/licenses/>. */
3636
3737#include <sysdep.h>
3838
lib/libc/glibc/sysdeps/s390/s390-32/symbol-hacks.h+2-2
......@@ -1,5 +1,5 @@
11/* Hacks needed for symbol manipulation. s390 version.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#include <sysdeps/wordsize-32/divdi3-symbol-hacks.h>
2020
lib/libc/glibc/sysdeps/s390/s390-32/sysdep.h+2-2
......@@ -1,5 +1,5 @@
11/* Assembler macros for s390.
2 Copyright (C) 2000-2019 Free Software Foundation, Inc.
2 Copyright (C) 2000-2020 Free Software Foundation, Inc.
33 Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
44 This file is part of the GNU C Library.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#include <sysdeps/generic/sysdep.h>
2121
lib/libc/glibc/sysdeps/s390/s390-64/crti.S+2-2
......@@ -1,5 +1,5 @@
11/* Special .init and .fini section support for 64 bit S/390.
2 Copyright (C) 2001-2019 Free Software Foundation, Inc.
2 Copyright (C) 2001-2020 Free Software Foundation, Inc.
33 Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
44 This file is part of the GNU C Library.
55
......@@ -32,7 +32,7 @@
3232
3333 You should have received a copy of the GNU Lesser General Public
3434 License along with the GNU C Library; if not, see
35 <http://www.gnu.org/licenses/>. */
35 <https://www.gnu.org/licenses/>. */
3636
3737/* crti.S puts a function prologue at the beginning of the .init and
3838 .fini sections and defines global symbols for those addresses, so
lib/libc/glibc/sysdeps/s390/s390-64/crtn.S+2-2
......@@ -1,5 +1,5 @@
11/* Special .init and .fini section support for 64 bit S/390.
2 Copyright (C) 2001-2019 Free Software Foundation, Inc.
2 Copyright (C) 2001-2020 Free Software Foundation, Inc.
33 Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
44 This file is part of the GNU C Library.
55
......@@ -32,7 +32,7 @@
3232
3333 You should have received a copy of the GNU Lesser General Public
3434 License along with the GNU C Library; if not, see
35 <http://www.gnu.org/licenses/>. */
35 <https://www.gnu.org/licenses/>. */
3636
3737/* crtn.S puts function epilogues in the .init and .fini sections
3838 corresponding to the prologues in crti.S. */
lib/libc/glibc/sysdeps/s390/s390-64/start.S+2-2
......@@ -1,5 +1,5 @@
11/* Startup code compliant to the 64 bit S/390 ELF ABI.
2 Copyright (C) 2001-2019 Free Software Foundation, Inc.
2 Copyright (C) 2001-2020 Free Software Foundation, Inc.
33 Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
44 This file is part of the GNU C Library.
55
......@@ -32,7 +32,7 @@
3232
3333 You should have received a copy of the GNU Lesser General Public
3434 License along with the GNU C Library; if not, see
35 <http://www.gnu.org/licenses/>. */
35 <https://www.gnu.org/licenses/>. */
3636
3737#include <sysdep.h>
3838
lib/libc/glibc/sysdeps/s390/s390-64/sysdep.h+2-2
......@@ -1,5 +1,5 @@
11/* Assembler macros for 64 bit S/390.
2 Copyright (C) 2001-2019 Free Software Foundation, Inc.
2 Copyright (C) 2001-2020 Free Software Foundation, Inc.
33 Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
44 This file is part of the GNU C Library.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#include <sysdeps/generic/sysdep.h>
2121
lib/libc/glibc/sysdeps/sh/bits/endian.h deleted-13
......@@ -1,13 +0,0 @@
1/* SH is bi-endian but with a big-endian FPU. */
2
3#ifndef _ENDIAN_H
4# error "Never use <bits/endian.h> directly; include <endian.h> instead."
5#endif
6
7#ifdef __LITTLE_ENDIAN__
8#define __BYTE_ORDER __LITTLE_ENDIAN
9#define __FLOAT_WORD_ORDER __LITTLE_ENDIAN
10#else
11#define __BYTE_ORDER __BIG_ENDIAN
12#define __FLOAT_WORD_ORDER __BIG_ENDIAN
13#endif
lib/libc/glibc/sysdeps/sh/bits/endianness.h created+15
......@@ -0,0 +1,15 @@
1#ifndef _BITS_ENDIANNESS_H
2#define _BITS_ENDIANNESS_H 1
3
4#ifndef _BITS_ENDIAN_H
5# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
6#endif
7
8/* SH has selectable endianness. */
9#ifdef __LITTLE_ENDIAN__
10#define __BYTE_ORDER __LITTLE_ENDIAN
11#else
12#define __BYTE_ORDER __BIG_ENDIAN
13#endif
14
15#endif /* bits/endianness.h */
lib/libc/glibc/sysdeps/sh/crti.S+2-2
......@@ -1,5 +1,5 @@
11/* Special .init and .fini section support for SH.
2 Copyright (C) 2000-2019 Free Software Foundation, Inc.
2 Copyright (C) 2000-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library; if not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636/* crti.S puts a function prologue at the beginning of the .init and
3737 .fini sections and defines global symbols for those addresses, so
lib/libc/glibc/sysdeps/sh/crtn.S+2-2
......@@ -1,5 +1,5 @@
11/* Special .init and .fini section support for SH.
2 Copyright (C) 2000-2019 Free Software Foundation, Inc.
2 Copyright (C) 2000-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library; if not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636/* crtn.S puts function epilogues in the .init and .fini sections
3737 corresponding to the prologues in crti.S. */
lib/libc/glibc/sysdeps/sh/start.S+2-2
......@@ -1,5 +1,5 @@
11/* Startup code for SH & ELF.
2 Copyright (C) 1999-2019 Free Software Foundation, Inc.
2 Copyright (C) 1999-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library; if not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636/* This is the canonical entry point, usually the first thing in the text
3737 segment.
lib/libc/glibc/sysdeps/sh/sysdep.h+2-2
......@@ -1,5 +1,5 @@
11/* Assembler macros for SH.
2 Copyright (C) 1999-2019 Free Software Foundation, Inc.
2 Copyright (C) 1999-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#include <sysdeps/generic/sysdep.h>
2020
lib/libc/glibc/sysdeps/sparc/bits/endian.h deleted-12
......@@ -1,12 +0,0 @@
1/* Sparc is big-endian, but v9 supports endian conversion on loads/stores
2 and GCC supports such a mode. Be prepared. */
3
4#ifndef _ENDIAN_H
5# error "Never use <bits/endian.h> directly; include <endian.h> instead."
6#endif
7
8#ifdef __LITTLE_ENDIAN__
9# define __BYTE_ORDER __LITTLE_ENDIAN
10#else
11# define __BYTE_ORDER __BIG_ENDIAN
12#endif
lib/libc/glibc/sysdeps/sparc/bits/endianness.h created+16
......@@ -0,0 +1,16 @@
1#ifndef _BITS_ENDIANNESS_H
2#define _BITS_ENDIANNESS_H 1
3
4#ifndef _BITS_ENDIAN_H
5# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
6#endif
7
8/* Sparc is big-endian, but v9 supports endian conversion on loads/stores
9 and GCC supports such a mode. Be prepared. */
10#ifdef __LITTLE_ENDIAN__
11# define __BYTE_ORDER __LITTLE_ENDIAN
12#else
13# define __BYTE_ORDER __BIG_ENDIAN
14#endif
15
16#endif /* bits/endianness.h */
lib/libc/glibc/sysdeps/sparc/crti.S+2-2
......@@ -1,5 +1,5 @@
11/* Special .init and .fini section support for sparc.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library; if not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636/* crti.S puts a function prologue at the beginning of the .init and
3737 .fini sections and defines global symbols for those addresses, so
lib/libc/glibc/sysdeps/sparc/crtn.S+2-2
......@@ -1,5 +1,5 @@
11/* Special .init and .fini section support for sparc.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library; if not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636/* crtn.S puts function epilogues in the .init and .fini sections
3737 corresponding to the prologues in crti.S. */
lib/libc/glibc/sysdeps/sparc/dl-dtprocnum.h+2-2
......@@ -1,5 +1,5 @@
11/* Configuration of lookup functions. SPARC version.
2 Copyright (C) 2000-2019 Free Software Foundation, Inc.
2 Copyright (C) 2000-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* Number of extra dynamic section entries for this architecture. By
2020 default there are none. */
lib/libc/glibc/sysdeps/sparc/dl-sysdep.h+2-2
......@@ -1,5 +1,5 @@
11/* System-specific settings for dynamic linker code. SPARC version.
2 Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 Copyright (C) 2002-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#include_next <dl-sysdep.h>
2020
lib/libc/glibc/sysdeps/sparc/sparc32/start.S+2-2
......@@ -1,5 +1,5 @@
11/* Startup code for elf32-sparc
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44 Contributed by Richard Henderson <richard@gnu.ai.mit.edu>, 1997.
55
......@@ -32,7 +32,7 @@
3232
3333 You should have received a copy of the GNU Lesser General Public
3434 License along with the GNU C Library; if not, see
35 <http://www.gnu.org/licenses/>. */
35 <https://www.gnu.org/licenses/>. */
3636
3737#include <sysdep.h>
3838
lib/libc/glibc/sysdeps/sparc/sparc64/start.S+2-2
......@@ -1,5 +1,5 @@
11/* Startup code for elf64-sparc
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44 Contributed by Richard Henderson <richard@gnu.ai.mit.edu>, 1997.
55
......@@ -32,7 +32,7 @@
3232
3333 You should have received a copy of the GNU Lesser General Public
3434 License along with the GNU C Library; if not, see
35 <http://www.gnu.org/licenses/>. */
35 <https://www.gnu.org/licenses/>. */
3636
3737#include <sysdep.h>
3838
lib/libc/glibc/sysdeps/sparc/sysdep.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2011-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2011-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#define _SYSDEPS_SYSDEP_H 1
1919#include <bits/hwcap.h>
lib/libc/glibc/sysdeps/unix/alpha/sysdep.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33 Contributed by Brendan Kehoe (brendan@zen.org).
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#include <sysdeps/unix/sysdep.h>
2020#include <dl-sysdep.h> /* Defines RTLD_PRIVATE_ERRNO. */
lib/libc/glibc/sysdeps/unix/arm/sysdep.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#include <sysdeps/unix/sysdep.h>
1919#include <sysdeps/arm/sysdep.h>
lib/libc/glibc/sysdeps/unix/i386/sysdep.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#include <sysdeps/unix/sysdep.h>
1919#include <sysdeps/i386/sysdep.h>
lib/libc/glibc/sysdeps/unix/mips/mips32/sysdep.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33 Contributed by Brendan Kehoe (brendan@zen.org).
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#include <sysdeps/unix/mips/sysdep.h>
2020
lib/libc/glibc/sysdeps/unix/mips/mips64/n32/sysdep.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33 Contributed by Alexandre Oliva <aoliva@redhat.com>.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#include <sysdeps/unix/mips/sysdep.h>
2020
lib/libc/glibc/sysdeps/unix/mips/mips64/n64/sysdep.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33 Contributed by Alexandre Oliva <aoliva@redhat.com>.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#include <sysdeps/unix/mips/sysdep.h>
2020
lib/libc/glibc/sysdeps/unix/mips/sysdep.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33 Contributed by Brendan Kehoe (brendan@zen.org).
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#include <sgidefs.h>
2020#include <sysdeps/unix/sysdep.h>
lib/libc/glibc/sysdeps/unix/powerpc/sysdep.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#include <sysdeps/unix/sysdep.h>
1919#include <bits/wordsize.h>
lib/libc/glibc/sysdeps/unix/sh/sysdep.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#include <sysdeps/unix/sysdep.h>
1919#include <sysdeps/sh/sysdep.h>
lib/libc/glibc/sysdeps/unix/sysdep.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#include <sysdeps/generic/sysdep.h>
1919#include <single-thread.h>
lib/libc/glibc/sysdeps/unix/sysv/linux/aarch64/kernel-features.h+2-2
......@@ -1,6 +1,6 @@
11/* Set flags signalling availability of kernel features based on given
22 kernel version number. AArch64 version.
3 Copyright (C) 2018-2019 Free Software Foundation, Inc.
3 Copyright (C) 2018-2020 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#include_next <kernel-features.h>
2121
lib/libc/glibc/sysdeps/unix/sysv/linux/aarch64/sys/elf.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_ELF_H
2020#define _SYS_ELF_H 1
lib/libc/glibc/sysdeps/unix/sysv/linux/aarch64/sysdep.h+12-8
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2020 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
......@@ -14,14 +14,11 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _LINUX_AARCH64_SYSDEP_H
2020#define _LINUX_AARCH64_SYSDEP_H 1
2121
22/* Always enable vsyscalls on aarch64 */
23#define ALWAYS_USE_VSYSCALL 1
24
2522#include <sysdeps/unix/sysdep.h>
2623#include <sysdeps/aarch64/sysdep.h>
2724#include <sysdeps/unix/sysv/linux/generic/sysdep.h>
......@@ -154,11 +151,18 @@
154151
155152#else /* not __ASSEMBLER__ */
156153
154# ifdef __LP64__
155# define VDSO_NAME "LINUX_2.6.39"
156# define VDSO_HASH 123718537
157# else
158# define VDSO_NAME "LINUX_4.9"
159# define VDSO_HASH 61765625
160# endif
157161
158162/* List of system calls which are supported as vsyscalls. */
159# define HAVE_CLOCK_GETRES_VSYSCALL 1
160# define HAVE_CLOCK_GETTIME_VSYSCALL 1
161# define HAVE_GETTIMEOFDAY_VSYSCALL 1
163# define HAVE_CLOCK_GETRES64_VSYSCALL "__kernel_clock_getres"
164# define HAVE_CLOCK_GETTIME64_VSYSCALL "__kernel_clock_gettime"
165# define HAVE_GETTIMEOFDAY_VSYSCALL "__kernel_gettimeofday"
162166
163167/* Previously AArch64 used the generic version without the libc_hidden_def
164168 which lead in a non existent __send symbol in libc.so. */
lib/libc/glibc/sysdeps/unix/sysv/linux/alpha/bits/stat.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#if !defined _SYS_STAT_H && !defined _FCNTL_H
1919# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
lib/libc/glibc/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h+5-2
......@@ -1,5 +1,5 @@
11/* bits/typesizes.h -- underlying types for *_t. Linux/Alpha version.
2 Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 Copyright (C) 2002-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_TYPES_H
2020# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
......@@ -69,6 +69,9 @@
6969/* And for __rlim_t and __rlim64_t. */
7070#define __RLIM_T_MATCHES_RLIM64_T 1
7171
72/* Not for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
73# define __STATFS_MATCHES_STATFS64 0
74
7275/* Number of descriptors that can fit in an `fd_set'. */
7376#define __FD_SETSIZE 1024
7477
lib/libc/glibc/sysdeps/unix/sysv/linux/alpha/kernel-features.h+5-7
......@@ -1,6 +1,6 @@
11/* Set flags signalling availability of kernel features based on given
22 kernel version number.
3 Copyright (C) 2010-2019 Free Software Foundation, Inc.
3 Copyright (C) 2010-2020 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library. If not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _KERNEL_FEATURES_H
2121#define _KERNEL_FEATURES_H 1
......@@ -28,11 +28,6 @@
2828# define __ASSUME_STATFS64 0
2929#endif
3030
31/* Alpha used to define SysV ipc shmat syscall with a different name. */
32#ifndef __NR_shmat
33# define __NR_shmat __NR_osf_shmat
34#endif
35
3631#define __ASSUME_RECV_SYSCALL 1
3732#define __ASSUME_SEND_SYSCALL 1
3833
......@@ -52,4 +47,7 @@
5247# undef __ASSUME_STATX
5348#endif
5449
50/* Alpha requires old sysvipc even being a 64-bit architecture. */
51#undef __ASSUME_SYSVIPC_DEFAULT_IPC_64
52
5553#endif /* _KERNEL_FEATURES_H */
lib/libc/glibc/sysdeps/unix/sysv/linux/alpha/sysdep.h+2-37
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33 Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _LINUX_ALPHA_SYSDEP_H
2020#define _LINUX_ALPHA_SYSDEP_H 1
......@@ -37,41 +37,6 @@
3737#undef SYS_ify
3838#define SYS_ify(syscall_name) __NR_##syscall_name
3939
40/* Define some aliases to make automatic syscall generation work
41 properly. The SYS_* variants are for the benefit of the files in
42 sysdeps/unix. */
43#define __NR_getpid __NR_getxpid
44#define __NR_getuid __NR_getxuid
45#define __NR_getgid __NR_getxgid
46#define SYS_getpid __NR_getxpid
47#define SYS_getuid __NR_getxuid
48#define SYS_getgid __NR_getxgid
49
50/*
51 * Some syscalls no Linux program should know about:
52 */
53#define __NR_osf_sigprocmask 48
54#ifndef __NR_osf_shmat
55# define __NR_osf_shmat 209
56#endif
57#define __NR_osf_getsysinfo 256
58#define __NR_osf_setsysinfo 257
59
60/* Help old kernel headers where particular syscalls are not available. */
61#ifndef __NR_semtimedop
62# define __NR_semtimedop 423
63#endif
64
65/* This is a kludge to make syscalls.list find these under the names
66 pread and pwrite, since some kernel headers define those names
67 and some define the *64 names for the same system calls. */
68#if !defined __NR_pread && defined __NR_pread64
69# define __NR_pread __NR_pread64
70#endif
71#if !defined __NR_pwrite && defined __NR_pwrite64
72# define __NR_pwrite __NR_pwrite64
73#endif
74
7540#define SINGLE_THREAD_BY_GLOBAL 1
7641
7742#endif /* _LINUX_ALPHA_SYSDEP_H */
lib/libc/glibc/sysdeps/unix/sysv/linux/arm/kernel-features.h+9-2
......@@ -1,6 +1,6 @@
11/* Set flags signalling availability of kernel features based on given
22 kernel version number.
3 Copyright (C) 2006-2019 Free Software Foundation, Inc.
3 Copyright (C) 2006-2020 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
......@@ -15,8 +15,9 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library. If not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
20#include <endian.h>
2021#include_next <kernel-features.h>
2122
2223/* The ARM kernel before 3.14.3 may or may not support
......@@ -49,3 +50,9 @@
4950
5051#undef __ASSUME_CLONE_DEFAULT
5152#define __ASSUME_CLONE_BACKWARDS 1
53
54#if __BYTE_ORDER == __BIG_ENDIAN
55# define __ASSUME_SYSVIPC_BROKEN_MODE_T
56#endif
57
58#undef __ASSUME_SYSVIPC_DEFAULT_IPC_64
lib/libc/glibc/sysdeps/unix/sysv/linux/arm/sys/elf.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_ELF_H
1919#define _SYS_ELF_H 1
lib/libc/glibc/sysdeps/unix/sysv/linux/arm/sysdep.h+8-11
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33 Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
44 ARM changes by Philip Blundell, <pjb27@cam.ac.uk>, May 1997.
......@@ -15,14 +15,11 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library. If not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _LINUX_ARM_SYSDEP_H
2121#define _LINUX_ARM_SYSDEP_H 1
2222
23/* Always enable vsyscalls on arm */
24#define ALWAYS_USE_VSYSCALL 1
25
2623/* There is some commonality. */
2724#include <sysdeps/unix/sysv/linux/sysdep.h>
2825#include <sysdeps/unix/arm/sysdep.h>
......@@ -380,10 +377,6 @@ __local_syscall_error: \
380377#define INTERNAL_SYSCALL(name, err, nr, args...) \
381378 INTERNAL_SYSCALL_RAW(SYS_ify(name), err, nr, args)
382379
383#undef INTERNAL_SYSCALL_ARM
384#define INTERNAL_SYSCALL_ARM(name, err, nr, args...) \
385 INTERNAL_SYSCALL_RAW(__ARM_NR_##name, err, nr, args)
386
387380#undef INTERNAL_SYSCALL_ERROR_P
388381#define INTERNAL_SYSCALL_ERROR_P(val, err) \
389382 ((unsigned int) (val) >= 0xfffff001u)
......@@ -391,9 +384,13 @@ __local_syscall_error: \
391384#undef INTERNAL_SYSCALL_ERRNO
392385#define INTERNAL_SYSCALL_ERRNO(val, err) (-(val))
393386
387#define VDSO_NAME "LINUX_2.6"
388#define VDSO_HASH 61765110
389
394390/* List of system calls which are supported as vsyscalls. */
395#define HAVE_CLOCK_GETTIME_VSYSCALL 1
396#define HAVE_GETTIMEOFDAY_VSYSCALL 1
391#define HAVE_CLOCK_GETTIME_VSYSCALL "__vdso_clock_gettime"
392#define HAVE_CLOCK_GETTIME64_VSYSCALL "__vdso_clock_gettime64"
393#define HAVE_GETTIMEOFDAY_VSYSCALL "__vdso_gettimeofday"
397394
398395#define LOAD_ARGS_0()
399396#define ASM_ARGS_0
lib/libc/glibc/sysdeps/unix/sysv/linux/bits/stat.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#if !defined _SYS_STAT_H && !defined _FCNTL_H
1919# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
lib/libc/glibc/sysdeps/unix/sysv/linux/bits/timex.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _BITS_TIMEX_H
1919#define _BITS_TIMEX_H 1
lib/libc/glibc/sysdeps/unix/sysv/linux/dl-sysdep.h+2-2
......@@ -1,5 +1,5 @@
11/* System-specific settings for dynamic linker code. Linux version.
2 Copyright (C) 2005-2019 Free Software Foundation, Inc.
2 Copyright (C) 2005-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#include_next <dl-sysdep.h>
2020
lib/libc/glibc/sysdeps/unix/sysv/linux/generic/bits/stat.h+7-4
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2011-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2011-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33 Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#if !defined _SYS_STAT_H && !defined _FCNTL_H
2020# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
......@@ -23,7 +23,7 @@
2323#ifndef _BITS_STAT_H
2424#define _BITS_STAT_H 1
2525
26#include <endian.h>
26#include <bits/endian.h>
2727#include <bits/wordsize.h>
2828
2929/* 64-bit libc uses the kernel's 'struct stat', accessed via the
......@@ -42,7 +42,10 @@
4242
4343#if defined __USE_FILE_OFFSET64
4444# define __field64(type, type64, name) type64 name
45#elif __WORDSIZE == 64
45#elif __WORDSIZE == 64 || defined __INO_T_MATCHES_INO64_T
46# if defined __INO_T_MATCHES_INO64_T && !defined __OFF_T_MATCHES_OFF64_T
47# error "ino_t and off_t must both be the same type"
48# endif
4649# define __field64(type, type64, name) type name
4750#elif __BYTE_ORDER == __LITTLE_ENDIAN
4851# define __field64(type, type64, name) \
lib/libc/glibc/sysdeps/unix/sysv/linux/generic/bits/typesizes.h+7-3
......@@ -1,5 +1,5 @@
11/* bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
2 Copyright (C) 2011-2019 Free Software Foundation, Inc.
2 Copyright (C) 2011-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44 Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library. If not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _BITS_TYPES_H
2121# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
......@@ -73,10 +73,14 @@
7373
7474/* And for __rlim_t and __rlim64_t. */
7575# define __RLIM_T_MATCHES_RLIM64_T 1
76
77/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
78# define __STATFS_MATCHES_STATFS64 1
7679#else
7780# define __RLIM_T_MATCHES_RLIM64_T 0
78#endif
7981
82# define __STATFS_MATCHES_STATFS64 0
83#endif
8084/* Number of descriptors that can fit in an `fd_set'. */
8185#define __FD_SETSIZE 1024
8286
lib/libc/glibc/sysdeps/unix/sysv/linux/generic/sysdep.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2011-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2011-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33 Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#include <bits/wordsize.h>
2020#include <kernel-features.h>
lib/libc/glibc/sysdeps/unix/sysv/linux/hppa/kernel-features.h+2-2
......@@ -1,6 +1,6 @@
11/* Set flags signalling availability of kernel features based on given
22 kernel version number.
3 Copyright (C) 2006-2019 Free Software Foundation, Inc.
3 Copyright (C) 2006-2020 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library. If not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020
2121/* Support for the utimes syscall was added in 3.14. */
lib/libc/glibc/sysdeps/unix/sysv/linux/hppa/sysdep.h+2-2
......@@ -1,5 +1,5 @@
11/* Assembler macros for PA-RISC.
2 Copyright (C) 1999-2019 Free Software Foundation, Inc.
2 Copyright (C) 1999-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44 Contributed by Ulrich Drepper, <drepper@cygnus.com>, August 1999.
55 Linux/PA-RISC changes by Philipp Rumpf, <prumpf@tux.org>, March 2000.
......@@ -16,7 +16,7 @@
1616
1717 You should have received a copy of the GNU Lesser General Public
1818 License along with the GNU C Library. If not, see
19 <http://www.gnu.org/licenses/>. */
19 <https://www.gnu.org/licenses/>. */
2020
2121#ifndef _LINUX_HPPA_SYSDEP_H
2222#define _LINUX_HPPA_SYSDEP_H 1
lib/libc/glibc/sysdeps/unix/sysv/linux/i386/dl-sysdep.h+2-2
......@@ -1,5 +1,5 @@
11/* System-specific settings for dynamic linker code. i386 version.
2 Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 Copyright (C) 2002-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _LINUX_I386_DL_SYSDEP_H
2020
lib/libc/glibc/sysdeps/unix/sysv/linux/i386/kernel-features.h+7-4
......@@ -1,6 +1,6 @@
11/* Set flags signalling availability of kernel features based on given
22 kernel version number. i386 version.
3 Copyright (C) 1999-2019 Free Software Foundation, Inc.
3 Copyright (C) 1999-2020 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020/* Direct socketcalls available with kernel 4.3. */
2121#if __LINUX_KERNEL_VERSION >= 0x040300
......@@ -43,8 +43,11 @@
4343# undef __ASSUME_SENDTO_SYSCALL
4444#endif
4545
46/* i686 only supports ipc syscall. */
47#undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
46/* i686 only supports ipc syscall before 5.1. */
47#if __LINUX_KERNEL_VERSION < 0x050100
48# undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
49# undef __ASSUME_SYSVIPC_DEFAULT_IPC_64
50#endif
4851
4952#undef __ASSUME_CLONE_DEFAULT
5053#define __ASSUME_CLONE_BACKWARDS 1
lib/libc/glibc/sysdeps/unix/sysv/linux/i386/sysdep.h+10-7
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33 Contributed by Ulrich Drepper, <drepper@gnu.org>, August 1995.
44
......@@ -14,14 +14,11 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _LINUX_I386_SYSDEP_H
2020#define _LINUX_I386_SYSDEP_H 1
2121
22/* Always enable vsyscalls on i386 */
23#define ALWAYS_USE_VSYSCALL 1
24
2522/* There is some commonality. */
2623#include <sysdeps/unix/sysv/linux/sysdep.h>
2724#include <sysdeps/unix/i386/sysdep.h>
......@@ -312,9 +309,15 @@ struct libc_do_syscall_args
312309#define INLINE_SYSCALL_ERROR_RETURN_VALUE(resultvar) \
313310 __syscall_error (-(resultvar))
314311
312# define VDSO_NAME "LINUX_2.6"
313# define VDSO_HASH 61765110
314
315315/* List of system calls which are supported as vsyscalls. */
316# define HAVE_CLOCK_GETTIME_VSYSCALL 1
317# define HAVE_GETTIMEOFDAY_VSYSCALL 1
316# define HAVE_CLOCK_GETTIME_VSYSCALL "__vdso_clock_gettime"
317# define HAVE_CLOCK_GETTIME64_VSYSCALL "__vdso_clock_gettime64"
318# define HAVE_GETTIMEOFDAY_VSYSCALL "__vdso_gettimeofday"
319# define HAVE_TIME_VSYSCALL "__vdso_time"
320# define HAVE_CLOCK_GETRES_VSYSCALL "__vdso_clock_getres"
318321
319322/* Define a macro which expands inline into the wrapper code for a system
320323 call. This use is for internal calls that do not need to handle errors
lib/libc/glibc/sysdeps/unix/sysv/linux/ia64/bits/endian.h deleted-7
......@@ -1,7 +0,0 @@
1/* Linux/ia64 is little-endian. */
2
3#ifndef _ENDIAN_H
4# error "Never use <bits/endian.h> directly; include <endian.h> instead."
5#endif
6
7#define __BYTE_ORDER __LITTLE_ENDIAN
lib/libc/glibc/sysdeps/unix/sysv/linux/ia64/bits/stat.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#if !defined _SYS_STAT_H && !defined _FCNTL_H
1919# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
lib/libc/glibc/sysdeps/unix/sysv/linux/ia64/dl-sysdep.h+2-2
......@@ -1,5 +1,5 @@
11/* System-specific settings for dynamic linker code. IA-64 version.
2 Copyright (C) 2003-2019 Free Software Foundation, Inc.
2 Copyright (C) 2003-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _LINUX_IA64_DL_SYSDEP_H
2020#define _LINUX_IA64_DL_SYSDEP_H 1
lib/libc/glibc/sysdeps/unix/sysv/linux/ia64/kernel-features.h+2-2
......@@ -1,6 +1,6 @@
11/* Set flags signalling availability of kernel features based on given
22 kernel version number.
3 Copyright (C) 2010-2019 Free Software Foundation, Inc.
3 Copyright (C) 2010-2020 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library. If not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _KERNEL_FEATURES_H
2121#define _KERNEL_FEATURES_H 1
lib/libc/glibc/sysdeps/unix/sysv/linux/ia64/sysdep.h+5-14
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33 Written by Jes Sorensen, <Jes.Sorensen@cern.ch>, April 1999.
44 Based on code originally written by David Mosberger-Tang
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _LINUX_IA64_SYSDEP_H
2121#define _LINUX_IA64_SYSDEP_H 1
......@@ -25,6 +25,7 @@
2525#include <sysdeps/ia64/sysdep.h>
2626#include <dl-sysdep.h>
2727#include <tls.h>
28#include <asm/break.h>
2829
2930/* In order to get __set_errno() definition in INLINE_SYSCALL. */
3031#ifndef __ASSEMBLER__
......@@ -45,16 +46,6 @@
4546#undef SYS_ify
4647#define SYS_ify(syscall_name) __NR_##syscall_name
4748
48/* This is a kludge to make syscalls.list find these under the names
49 pread and pwrite, since some kernel headers define those names
50 and some define the *64 names for the same system calls. */
51#if !defined __NR_pread && defined __NR_pread64
52# define __NR_pread __NR_pread64
53#endif
54#if !defined __NR_pwrite && defined __NR_pwrite64
55# define __NR_pwrite __NR_pwrite64
56#endif
57
5849/* This is to help the old kernel headers where __NR_semtimedop is not
5950 available. */
6051#ifndef __NR_semtimedop
......@@ -115,7 +106,7 @@
115106
116107#define DO_CALL_VIA_BREAK(num) \
117108 mov r15=num; \
118 break __BREAK_SYSCALL
109 break __IA64_BREAK_SYSCALL
119110
120111#ifdef IA64_USE_NEW_STUB
121112# ifdef SHARED
......@@ -229,7 +220,7 @@
229220 register long _r15 asm ("r15") = name; \
230221 long _retval; \
231222 LOAD_REGS_##nr \
232 __asm __volatile (BREAK_INSN (__BREAK_SYSCALL) \
223 __asm __volatile (BREAK_INSN (__IA64_BREAK_SYSCALL) \
233224 : "=r" (_r8), "=r" (_r10), "=r" (_r15) \
234225 ASM_OUTARGS_##nr \
235226 : "2" (_r15) ASM_ARGS_##nr \
lib/libc/glibc/sysdeps/unix/sysv/linux/include/bits/syscall.h deleted-3
......@@ -1,3 +0,0 @@
1/* The real bits/syscall.h is generated during the build, in
2 $(objdir)/misc/bits. */
3#include <misc/bits/syscall.h>
lib/libc/glibc/sysdeps/unix/sysv/linux/include/sys/timex.h+2-2
......@@ -1,5 +1,5 @@
11/* Internal declarations for sys/timex.h.
2 Copyright (C) 2014-2019 Free Software Foundation, Inc.
2 Copyright (C) 2014-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _INCLUDE_SYS_TIMEX_H
2020#define _INCLUDE_SYS_TIMEX_H 1
lib/libc/glibc/sysdeps/unix/sysv/linux/kernel-features.h+78-2
......@@ -1,6 +1,6 @@
11/* Set flags signalling availability of kernel features based on given
22 kernel version number.
3 Copyright (C) 1999-2019 Free Software Foundation, Inc.
3 Copyright (C) 1999-2020 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
......@@ -15,11 +15,16 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020/* This file must not contain any C code. At least it must be protected
2121 to allow using the file also in assembler files. */
2222
23#ifndef _LINUX_KERNEL_FEATURES_H
24#define _LINUX_KERNEL_FEATURES_H 1
25
26#include <bits/wordsize.h>
27
2328#ifndef __LINUX_KERNEL_VERSION
2429/* We assume the worst; all kernels should be supported. */
2530# define __LINUX_KERNEL_VERSION 0
......@@ -80,6 +85,17 @@
8085/* Support for SysV IPC through wired syscalls. All supported architectures
8186 either support ipc syscall and/or all the ipc correspondent syscalls. */
8287#define __ASSUME_DIRECT_SYSVIPC_SYSCALLS 1
88/* The generic default __IPC_64 value is 0x0, however some architectures
89 require a different value of 0x100. */
90#define __ASSUME_SYSVIPC_DEFAULT_IPC_64 1
91
92/* All supported architectures reserve a 32-bit for MODE field in sysvipc
93 ipc_perm. However, some kernel ABI interfaces still expect a 16-bit
94 field. This is only an issue if arch-defined IPC_PERM padding is on a
95 wrong position regarding endianness. In this case, the IPC control
96 routines (msgctl, semctl, and semtctl) requires to shift the value to
97 correct place.
98 The ABIs that requires it define __ASSUME_SYSVIPC_BROKEN_MODE_T. */
8399
84100/* Support for p{read,write}v2 was added in 4.6. However Linux default
85101 implementation does not assume the __ASSUME_* and instead use a fallback
......@@ -139,3 +155,63 @@
139155 */
140156
141157#define __ASSUME_CLONE_DEFAULT 1
158
159/* Support for 64-bit time_t in the system call interface. When this
160 flag is set, the kernel provides a version of each of these system
161 calls that accepts 64-bit time_t:
162
163 clock_adjtime(64)
164 clock_gettime(64)
165 clock_settime(64)
166 clock_getres(_time64)
167 clock_nanosleep(_time64)
168 futex(_time64)
169 mq_timedreceive(_time64)
170 mq_timedsend(_time64)
171 ppoll(_time64)
172 pselect6(_time64)
173 rt_sigtimedwait(_time64)
174 sched_rr_get_interval(_time64)
175 timer_gettime(64)
176 timer_settime(64)
177 timerfd_gettime(64)
178 timerfd_settime(64)
179 utimensat(_time64)
180
181 On architectures where time_t has historically been 64 bits,
182 only the 64-bit version of each system call exists, and there
183 are no suffixes on the __NR_ constants.
184
185 On architectures where time_t has historically been 32 bits,
186 both 32-bit and 64-bit versions of each system call may exist,
187 depending on the kernel version. When the 64-bit version exists,
188 there is a '64' or '_time64' suffix on the name of its __NR_
189 constant, as shown above.
190
191 This flag is always set for Linux 5.1 and later. Prior to that
192 version, it is set only for some CPU architectures and ABIs:
193
194 - __WORDSIZE == 64 - all supported architectures where pointers
195 are 64 bits also have always had 64-bit time_t.
196
197 - __WORDSIZE == 32 && __SYSCALL_WORDSIZE == 64 - this describes
198 only one supported configuration, x86's 'x32' subarchitecture,
199 where pointers are 32 bits but time_t has always been 64 bits.
200
201 __ASSUME_TIME64_SYSCALLS being set does not mean __TIMESIZE is 64,
202 and __TIMESIZE equal to 64 does not mean __ASSUME_TIME64_SYSCALLS
203 is set. All four cases are possible. */
204
205#if __LINUX_KERNEL_VERSION >= 0x050100 \
206 || __WORDSIZE == 64 \
207 || (defined __SYSCALL_WORDSIZE && __SYSCALL_WORDSIZE == 64)
208# define __ASSUME_TIME64_SYSCALLS 1
209#endif
210
211/* Linux waitid prior kernel 5.4 does not support waiting for the current
212 process group. */
213#if __LINUX_KERNEL_VERSION >= 0x050400
214# define __ASSUME_WAITID_PID0_P_PGID
215#endif
216
217#endif /* kernel-features.h */
lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/bits/stat.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#if !defined _SYS_STAT_H && !defined _FCNTL_H
1919# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2010-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2010-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _LINUX_M68K_COLDFIRE_SYSDEP_H
1919#define _LINUX_M68K_COLDFIRE_SYSDEP_H 1
lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/kernel-features.h+8-4
......@@ -1,6 +1,6 @@
11/* Set flags signalling availability of kernel features based on given
22 kernel version number.
3 Copyright (C) 2008-2019 Free Software Foundation, Inc.
3 Copyright (C) 2008-2020 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library. If not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020/* Direct socketcalls available with kernel 4.3. */
2121#if __LINUX_KERNEL_VERSION >= 0x040300
......@@ -50,5 +50,9 @@
5050# undef __ASSUME_SET_ROBUST_LIST
5151#endif
5252
53/* m68k only supports ipc syscall. */
54#undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
53/* m68k only supports ipc syscall before 5.1. */
54#if __LINUX_KERNEL_VERSION < 0x050100
55# undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
56# undef __ASSUME_SYSVIPC_DEFAULT_IPC_64
57#endif
58#define __ASSUME_SYSVIPC_BROKEN_MODE_T
lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2010-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2010-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _LINUX_M68K_M680X0_SYSDEP_H
1919#define _LINUX_M68K_M680X0_SYSDEP_H 1
lib/libc/glibc/sysdeps/unix/sysv/linux/m68k/sysdep.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33 Written by Andreas Schwab, <schwab@issan.informatik.uni-dortmund.de>,
44 December 1995.
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library. If not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#include <sysdeps/unix/sysv/linux/sysdep.h>
2121#include <tls.h>
lib/libc/glibc/sysdeps/unix/sysv/linux/microblaze/bits/stat.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#if !defined _SYS_STAT_H && !defined _FCNTL_H
2020# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
lib/libc/glibc/sysdeps/unix/sysv/linux/microblaze/kernel-features.h+8-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2011-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2011-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,8 +13,9 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
18#include <endian.h>
1819
1920/* All supported kernel versions for MicroBlaze have these syscalls. */
2021#define __ASSUME_SOCKET_SYSCALL 1
......@@ -67,3 +68,8 @@
6768
6869#undef __ASSUME_CLONE_DEFAULT
6970#define __ASSUME_CLONE_BACKWARDS3
71
72#if __BYTE_ORDER == __BIG_ENDIAN
73# define __ASSUME_SYSVIPC_BROKEN_MODE_T
74#endif
75#undef __ASSUME_SYSVIPC_DEFAULT_IPC_64
lib/libc/glibc/sysdeps/unix/sysv/linux/microblaze/sysdep.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2000-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2000-2020 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _LINUX_MICROBLAZE_SYSDEP_H
2020#define _LINUX_MICROBLAZE_SYSDEP_H 1
lib/libc/glibc/sysdeps/unix/sysv/linux/mips/bits/stat.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#if !defined _SYS_STAT_H && !defined _FCNTL_H
1919# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
lib/libc/glibc/sysdeps/unix/sysv/linux/mips/kernel-features.h+10-4
......@@ -1,6 +1,6 @@
11/* Set flags signalling availability of kernel features based on given
22 kernel version number.
3 Copyright (C) 1999-2019 Free Software Foundation, Inc.
3 Copyright (C) 1999-2020 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library. If not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#include <sgidefs.h>
2121
......@@ -31,8 +31,12 @@
3131 pairs to start with an even-number register. */
3232#if _MIPS_SIM == _ABIO32
3333# define __ASSUME_ALIGNED_REGISTER_PAIRS 1
34/* mips32 only supports ipc syscall. */
35# undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
34/* mips32 only supports ipc syscall before 5.1. */
35# if __LINUX_KERNEL_VERSION < 0x050100
36# undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
37# undef __ASSUME_SYSVIPC_DEFAULT_IPC_64
38# else
39# endif
3640
3741/* The o32 MIPS fadvise64 syscall behaves as fadvise64_64. */
3842# define __ASSUME_FADVISE64_AS_64_64 1
......@@ -40,6 +44,8 @@
4044/* mips32 support wire-up network syscalls. */
4145# define __ASSUME_RECV_SYSCALL 1
4246# define __ASSUME_SEND_SYSCALL 1
47#else
48# undef __ASSUME_SYSVIPC_DEFAULT_IPC_64
4349#endif
4450
4551/* Define that mips64-n32 is a ILP32 ABI to set the correct interface to
lib/libc/glibc/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h+10-23
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2000-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2000-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,15 +13,13 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _LINUX_MIPS_MIPS32_SYSDEP_H
1919#define _LINUX_MIPS_MIPS32_SYSDEP_H 1
2020
21/* Always enable vsyscalls on mips32. */
22#define ALWAYS_USE_VSYSCALL 1
23
2421/* There is some commonality. */
22#include <sysdeps/unix/sysv/linux/mips/sysdep.h>
2523#include <sysdeps/unix/sysv/linux/sysdep.h>
2624#include <sysdeps/unix/mips/mips32/sysdep.h>
2725
......@@ -348,24 +346,13 @@ libc_hidden_proto (__mips_syscall7, nomips16)
348346 _sc_ret.reg.v0; \
349347})
350348
351#define __SYSCALL_CLOBBERS "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", \
352 "$14", "$15", "$24", "$25", "hi", "lo", "memory"
353
354/* Standard MIPS syscalls have an error flag, and return a positive errno
355 when the error flag is set. Emulate this behaviour for vsyscalls so that
356 the INTERNAL_SYSCALL_{ERROR_P,ERRNO} macros work correctly. */
357#define INTERNAL_VSYSCALL_CALL(funcptr, err, nr, args...) \
358 ({ \
359 long _ret = funcptr (args); \
360 err = ((unsigned long) (_ret) >= (unsigned long) -4095L); \
361 if (err) \
362 _ret = -_ret; \
363 _ret; \
364 })
365
366/* List of system calls which are supported as vsyscalls. */
367#define HAVE_CLOCK_GETTIME_VSYSCALL 1
368#define HAVE_GETTIMEOFDAY_VSYSCALL 1
349#if __mips_isa_rev >= 6
350# define __SYSCALL_CLOBBERS "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", \
351 "$14", "$15", "$24", "$25", "memory"
352#else
353# define __SYSCALL_CLOBBERS "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", \
354 "$14", "$15", "$24", "$25", "hi", "lo", "memory"
355#endif
369356
370357#endif /* __ASSEMBLER__ */
371358
lib/libc/glibc/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h+10-23
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2000-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2000-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,15 +13,13 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _LINUX_MIPS_SYSDEP_H
1919#define _LINUX_MIPS_SYSDEP_H 1
2020
21/* Always enable vsyscalls on n32. */
22#define ALWAYS_USE_VSYSCALL 1
23
2421/* There is some commonality. */
22#include <sysdeps/unix/sysv/linux/mips/sysdep.h>
2523#include <sysdeps/unix/sysv/linux/sysdep.h>
2624#include <sysdeps/unix/mips/mips64/n32/sysdep.h>
2725
......@@ -296,24 +294,13 @@
296294 _sys_result; \
297295})
298296
299#define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", \
300 "$14", "$15", "$24", "$25", "hi", "lo", "memory"
301
302/* Standard MIPS syscalls have an error flag, and return a positive errno
303 when the error flag is set. Emulate this behaviour for vsyscalls so that
304 the INTERNAL_SYSCALL_{ERROR_P,ERRNO} macros work correctly. */
305#define INTERNAL_VSYSCALL_CALL(funcptr, err, nr, args...) \
306 ({ \
307 long _ret = funcptr (args); \
308 err = ((unsigned long) (_ret) >= (unsigned long) -4095L); \
309 if (err) \
310 _ret = -_ret; \
311 _ret; \
312 })
313
314/* List of system calls which are supported as vsyscalls. */
315#define HAVE_CLOCK_GETTIME_VSYSCALL 1
316#define HAVE_GETTIMEOFDAY_VSYSCALL 1
297#if __mips_isa_rev >= 6
298# define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", \
299 "$14", "$15", "$24", "$25", "memory"
300#else
301# define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", \
302 "$14", "$15", "$24", "$25", "hi", "lo", "memory"
303#endif
317304
318305#endif /* __ASSEMBLER__ */
319306
lib/libc/glibc/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h+10-23
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2000-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2000-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,15 +13,13 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _LINUX_MIPS_SYSDEP_H
1919#define _LINUX_MIPS_SYSDEP_H 1
2020
21/* Always enable vsyscalls on n64. */
22#define ALWAYS_USE_VSYSCALL 1
23
2421/* There is some commonality. */
22#include <sysdeps/unix/sysv/linux/mips/sysdep.h>
2523#include <sysdeps/unix/sysv/linux/sysdep.h>
2624#include <sysdeps/unix/mips/mips64/n64/sysdep.h>
2725
......@@ -292,24 +290,13 @@
292290 _sys_result; \
293291})
294292
295#define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", \
296 "$14", "$15", "$24", "$25", "hi", "lo", "memory"
297
298/* Standard MIPS syscalls have an error flag, and return a positive errno
299 when the error flag is set. Emulate this behaviour for vsyscalls so that
300 the INTERNAL_SYSCALL_{ERROR_P,ERRNO} macros work correctly. */
301#define INTERNAL_VSYSCALL_CALL(funcptr, err, nr, args...) \
302 ({ \
303 long _ret = funcptr (args); \
304 err = ((unsigned long) (_ret) >= (unsigned long) -4095L); \
305 if (err) \
306 _ret = -_ret; \
307 _ret; \
308 })
309
310/* List of system calls which are supported as vsyscalls. */
311#define HAVE_CLOCK_GETTIME_VSYSCALL 1
312#define HAVE_GETTIMEOFDAY_VSYSCALL 1
293#if __mips_isa_rev >= 6
294# define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", \
295 "$14", "$15", "$24", "$25", "memory"
296#else
297# define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", \
298 "$14", "$15", "$24", "$25", "hi", "lo", "memory"
299#endif
313300
314301#endif /* __ASSEMBLER__ */
315302
lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/bits/stat.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#if !defined _SYS_STAT_H && !defined _FCNTL_H
1919# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/kernel-features.h+7-4
......@@ -1,6 +1,6 @@
11/* Set flags signalling availability of kernel features based on given
22 kernel version number. PowerPC version.
3 Copyright (C) 1999-2019 Free Software Foundation, Inc.
3 Copyright (C) 1999-2020 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020/* New syscalls added for PowerPC in 2.6.37. */
2121#define __ASSUME_SOCKET_SYSCALL 1
......@@ -44,8 +44,11 @@
4444
4545#include_next <kernel-features.h>
4646
47/* powerpc only supports ipc syscall. */
48#undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
47/* powerpc only supports ipc syscall before 5.1. */
48#if __LINUX_KERNEL_VERSION < 0x050100
49# undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
50# undef __ASSUME_SYSVIPC_DEFAULT_IPC_64
51#endif
4952
5053#undef __ASSUME_CLONE_DEFAULT
5154#define __ASSUME_CLONE_BACKWARDS 1
lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h+5-27
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,14 +13,12 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _LINUX_POWERPC_SYSDEP_H
1919#define _LINUX_POWERPC_SYSDEP_H 1
2020
21/* Always enable vsyscalls on powerpc32 */
22#define ALWAYS_USE_VSYSCALL 1
23
21#include <sysdeps/unix/sysv/linux/powerpc/sysdep.h>
2422#include <sysdeps/unix/sysv/linux/sysdep.h>
2523#include <sysdeps/unix/powerpc/sysdep.h>
2624#include <tls.h>
......@@ -43,7 +41,7 @@
4341 function call, with the exception of LR (which is needed for the
4442 "sc; bnslr+" sequence) and CR (where only CR0.SO is clobbered to signal
4543 an error return status). */
46# define INTERNAL_VSYSCALL_CALL_TYPE(funcptr, err, nr, type, args...) \
44# define INTERNAL_VSYSCALL_CALL_TYPE(funcptr, err, type, nr, args...) \
4745 ({ \
4846 register void *r0 __asm__ ("r0"); \
4947 register long int r3 __asm__ ("r3"); \
......@@ -71,7 +69,7 @@
7169 })
7270
7371#define INTERNAL_VSYSCALL_CALL(funcptr, err, nr, args...) \
74 INTERNAL_VSYSCALL_CALL_TYPE(funcptr, err, nr, long int, args)
72 INTERNAL_VSYSCALL_CALL_TYPE(funcptr, err, long int, nr, args)
7573
7674# undef INLINE_SYSCALL
7775# define INLINE_SYSCALL(name, nr, args...) \
......@@ -133,26 +131,6 @@
133131# undef INTERNAL_SYSCALL_ERRNO
134132# define INTERNAL_SYSCALL_ERRNO(val, err) (val)
135133
136# define INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK(name, err, type, nr, args...) \
137 ({ \
138 type sc_ret = ENOSYS; \
139 \
140 __typeof (__vdso_##name) vdsop = __vdso_##name; \
141 PTR_DEMANGLE (vdsop); \
142 if (vdsop != NULL) \
143 sc_ret = \
144 INTERNAL_VSYSCALL_CALL_TYPE (vdsop, err, nr, type, ##args); \
145 else \
146 err = 1 << 28; \
147 sc_ret; \
148 })
149
150/* List of system calls which are supported as vsyscalls. */
151# define HAVE_CLOCK_GETRES_VSYSCALL 1
152# define HAVE_CLOCK_GETTIME_VSYSCALL 1
153# define HAVE_GETCPU_VSYSCALL 1
154
155
156134# define LOADARGS_0(name, dummy) \
157135 r0 = name
158136# define LOADARGS_1(name, __arg1) \
lib/libc/glibc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h+4-28
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,16 +13,14 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/* Alan Modra <amodra@bigpond.net.au> rewrote the INLINE_SYSCALL macro */
1919
2020#ifndef _LINUX_POWERPC_SYSDEP_H
2121#define _LINUX_POWERPC_SYSDEP_H 1
2222
23/* Always enable vsyscalls on powerpc64 */
24#define ALWAYS_USE_VSYSCALL 1
25
23#include <sysdeps/unix/sysv/linux/powerpc/sysdep.h>
2624#include <sysdeps/unix/sysv/linux/sysdep.h>
2725#include <sysdeps/unix/powerpc/sysdep.h>
2826#include <tls.h>
......@@ -47,27 +45,6 @@
4745
4846#endif /* __ASSEMBLER__ */
4947
50/* This version is for internal uses when there is no desire
51 to set errno */
52#define INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK(name, err, type, nr, args...) \
53 ({ \
54 type sc_ret = ENOSYS; \
55 \
56 __typeof (__vdso_##name) vdsop = __vdso_##name; \
57 PTR_DEMANGLE (vdsop); \
58 if (vdsop != NULL) \
59 sc_ret = \
60 INTERNAL_VSYSCALL_CALL_TYPE (vdsop, err, type, nr, ##args); \
61 else \
62 err = 1 << 28; \
63 sc_ret; \
64 })
65
66/* List of system calls which are supported as vsyscalls. */
67#define HAVE_CLOCK_GETRES_VSYSCALL 1
68#define HAVE_CLOCK_GETTIME_VSYSCALL 1
69#define HAVE_GETCPU_VSYSCALL 1
70
7148/* Define a macro which expands inline into the wrapper code for a system
7249 call. This use is for internal calls that do not need to handle errors
7350 normally. It will never touch errno. This returns just what the kernel
......@@ -101,10 +78,9 @@
10178#define INTERNAL_VSYSCALL_CALL(funcptr, err, nr, args...) \
10279 INTERNAL_VSYSCALL_CALL_TYPE(funcptr, err, long int, nr, args)
10380
104#undef INLINE_SYSCALL
105
10681/* This version is for kernels that implement system calls that
10782 behave like function calls as far as register saving. */
83#undef INLINE_SYSCALL
10884#define INLINE_SYSCALL(name, nr, args...) \
10985 ({ \
11086 INTERNAL_SYSCALL_DECL (sc_err); \
lib/libc/glibc/sysdeps/unix/sysv/linux/riscv/kernel-features.h+2-2
......@@ -1,6 +1,6 @@
11/* Set flags signalling availability of kernel features based on given
22 kernel version number. RISC-V version.
3 Copyright (C) 2018-2019 Free Software Foundation, Inc.
3 Copyright (C) 2018-2020 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#include_next <kernel-features.h>
2121
lib/libc/glibc/sysdeps/unix/sysv/linux/riscv/sysdep.h+8-5
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _LINUX_RISCV_SYSDEP_H
2020#define _LINUX_RISCV_SYSDEP_H 1
......@@ -121,11 +121,14 @@
121121
122122#ifndef __ASSEMBLER__
123123
124# define VDSO_NAME "LINUX_4.15"
125# define VDSO_HASH 182943605
126
124127/* List of system calls which are supported as vsyscalls. */
125# define HAVE_CLOCK_GETRES_VSYSCALL 1
126# define HAVE_CLOCK_GETTIME_VSYSCALL 1
127# define HAVE_GETTIMEOFDAY_VSYSCALL 1
128# define HAVE_GETCPU_VSYSCALL 1
128# define HAVE_CLOCK_GETRES64_VSYSCALL "__vdso_clock_getres"
129# define HAVE_CLOCK_GETTIME64_VSYSCALL "__vdso_clock_gettime"
130# define HAVE_GETTIMEOFDAY_VSYSCALL "__vdso_gettimeofday"
131# define HAVE_GETCPU_VSYSCALL "__vdso_getcpu"
129132
130133/* Define a macro which expands into the inline wrapper code for a system
131134 call. */
lib/libc/glibc/sysdeps/unix/sysv/linux/s390/bits/stat.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2000-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2000-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#if !defined _SYS_STAT_H && !defined _FCNTL_H
1919# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
lib/libc/glibc/sysdeps/unix/sysv/linux/s390/bits/typesizes.h+7-2
......@@ -1,5 +1,5 @@
11/* bits/typesizes.h -- underlying types for *_t. Linux/s390 version.
2 Copyright (C) 2003-2019 Free Software Foundation, Inc.
2 Copyright (C) 2003-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_TYPES_H
2020# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
......@@ -78,8 +78,13 @@
7878
7979/* And for __rlim_t and __rlim64_t. */
8080# define __RLIM_T_MATCHES_RLIM64_T 1
81
82/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
83# define __STATFS_MATCHES_STATFS64 1
8184#else
8285# define __RLIM_T_MATCHES_RLIM64_T 0
86
87# define __STATFS_MATCHES_STATFS64 0
8388#endif
8489
8590/* Number of descriptors that can fit in an `fd_set'. */
lib/libc/glibc/sysdeps/unix/sysv/linux/s390/kernel-features.h+10-4
......@@ -1,6 +1,6 @@
11/* Set flags signalling availability of kernel features based on given
22 kernel version number. S/390 version.
3 Copyright (C) 1999-2019 Free Software Foundation, Inc.
3 Copyright (C) 1999-2020 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020/* Direct socketcalls available with kernel 4.3. */
2121#if __LINUX_KERNEL_VERSION >= 0x040300
......@@ -45,8 +45,14 @@
4545# undef __ASSUME_SENDTO_SYSCALL
4646#endif
4747
48/* s390 only supports ipc syscall. */
49#undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
48/* s390 only supports ipc syscall before 5.1. */
49#if __LINUX_KERNEL_VERSION < 0x050100
50# undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
51# undef __ASSUME_SYSVIPC_DEFAULT_IPC_64
52#endif
53#ifndef __s390x__
54# define __ASSUME_SYSVIPC_BROKEN_MODE_T
55#endif
5056
5157#undef __ASSUME_CLONE_DEFAULT
5258#define __ASSUME_CLONE_BACKWARDS2
lib/libc/glibc/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h+3-8
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2000-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2000-2020 Free Software Foundation, Inc.
22 Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
33 This file is part of the GNU C Library.
44
......@@ -14,13 +14,14 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _LINUX_S390_SYSDEP_H
2020#define _LINUX_S390_SYSDEP_H
2121
2222#include <sysdeps/s390/s390-32/sysdep.h>
2323#include <sysdeps/unix/sysdep.h>
24#include <sysdeps/unix/sysv/linux/s390/sysdep.h>
2425#include <sysdeps/unix/sysv/linux/sysdep.h>
2526#include <dl-sysdep.h> /* For RTLD_PRIVATE_ERRNO. */
2627#include <tls.h>
......@@ -271,12 +272,6 @@
271272#define ASMFMT_5 , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5), "d" (gpr6)
272273#define ASMFMT_6 , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5), "d" (gpr6), "d" (gpr7)
273274
274/* List of system calls which are supported as vsyscalls. */
275#define HAVE_CLOCK_GETRES_VSYSCALL 1
276#define HAVE_CLOCK_GETTIME_VSYSCALL 1
277#define HAVE_GETTIMEOFDAY_VSYSCALL 1
278#define HAVE_GETCPU_VSYSCALL 1
279
280275/* Pointer mangling support. */
281276#if IS_IN (rtld)
282277/* We cannot use the thread descriptor because in ld.so we use setjmp
lib/libc/glibc/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h+3-8
......@@ -1,5 +1,5 @@
11/* Assembler macros for 64 bit S/390.
2 Copyright (C) 2001-2019 Free Software Foundation, Inc.
2 Copyright (C) 2001-2020 Free Software Foundation, Inc.
33 Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
44 This file is part of the GNU C Library.
55
......@@ -15,13 +15,14 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _LINUX_S390_SYSDEP_H
2121#define _LINUX_S390_SYSDEP_H
2222
2323#include <sysdeps/s390/s390-64/sysdep.h>
2424#include <sysdeps/unix/sysdep.h>
25#include <sysdeps/unix/sysv/linux/s390/sysdep.h>
2526#include <sysdeps/unix/sysv/linux/sysdep.h>
2627#include <dl-sysdep.h> /* For RTLD_PRIVATE_ERRNO. */
2728#include <tls.h>
......@@ -277,12 +278,6 @@
277278#define ASMFMT_5 , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5), "d" (gpr6)
278279#define ASMFMT_6 , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5), "d" (gpr6), "d" (gpr7)
279280
280/* List of system calls which are supported as vsyscalls. */
281#define HAVE_CLOCK_GETRES_VSYSCALL 1
282#define HAVE_CLOCK_GETTIME_VSYSCALL 1
283#define HAVE_GETTIMEOFDAY_VSYSCALL 1
284#define HAVE_GETCPU_VSYSCALL 1
285
286281#define SINGLE_THREAD_BY_GLOBAL 1
287282
288283/* Pointer mangling support. */
lib/libc/glibc/sysdeps/unix/sysv/linux/s390/sys/elf.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2000-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2000-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_ELF_H
1919#define _SYS_ELF_H 1
lib/libc/glibc/sysdeps/unix/sysv/linux/sh/kernel-features.h+12-4
......@@ -1,6 +1,6 @@
11/* Set flags signalling availability of kernel features based on given
22 kernel version number. SH version.
3 Copyright (C) 1999-2019 Free Software Foundation, Inc.
3 Copyright (C) 1999-2020 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
......@@ -15,11 +15,13 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef __KERNEL_FEATURES_SH__
2121# define __KERNEL_FEATURES_SH__
2222
23#include <endian.h>
24
2325/* These syscalls were added for SH in 2.6.37. */
2426#define __ASSUME_SOCKET_SYSCALL 1
2527#define __ASSUME_BIND_SYSCALL 1
......@@ -41,8 +43,14 @@
4143 before the offset. */
4244#define __ASSUME_PRW_DUMMY_ARG 1
4345
44/* sh only supports ipc syscall. */
45#undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
46/* sh only supports ipc syscall before 5.1. */
47#if __LINUX_KERNEL_VERSION < 0x050100
48# undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
49# undef __ASSUME_SYSVIPC_DEFAULT_IPC_64
50#endif
51#if __BYTE_ORDER == __BIG_ENDIAN
52# define __ASSUME_SYSVIPC_BROKEN_MODE_T
53#endif
4654
4755/* Support for several syscalls was added in 4.8. */
4856#if __LINUX_KERNEL_VERSION < 0x040800
lib/libc/glibc/sysdeps/unix/sysv/linux/sh/sysdep.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33 Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
44 Changed by Kaz Kojima, <kkojima@rr.iij4u.or.jp>.
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _LINUX_SH_SYSDEP_H
2121#define _LINUX_SH_SYSDEP_H 1
lib/libc/glibc/sysdeps/unix/sysv/linux/single-thread.h+2-2
......@@ -1,5 +1,5 @@
11/* Single thread optimization, Linux version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SINGLE_THREAD_H
2020#define _SINGLE_THREAD_H
lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/bits/stat.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#if !defined _SYS_STAT_H && !defined _FCNTL_H
1919# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h+7-2
......@@ -1,5 +1,5 @@
11/* bits/typesizes.h -- underlying types for *_t. Linux/SPARC version.
2 Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 Copyright (C) 2002-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_TYPES_H
2020# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
......@@ -72,8 +72,13 @@
7272
7373/* And for __rlim_t and __rlim64_t. */
7474# define __RLIM_T_MATCHES_RLIM64_T 1
75
76/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
77# define __STATFS_MATCHES_STATFS64 1
7578#else
7679# define __RLIM_T_MATCHES_RLIM64_T 0
80
81# define __STATFS_MATCHES_STATFS64 0
7782#endif
7883
7984/* Number of descriptors that can fit in an `fd_set'. */
lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/kernel-features.h+9-4
......@@ -1,6 +1,6 @@
11/* Set flags signalling availability of kernel features based on given
22 kernel version number. SPARC version.
3 Copyright (C) 1999-2019 Free Software Foundation, Inc.
3 Copyright (C) 1999-2020 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#include_next <kernel-features.h>
2121
......@@ -58,8 +58,13 @@
5858# undef __NR_pause
5959#endif
6060
61/* sparc only supports ipc syscall. */
62#undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
61/* sparc only supports ipc syscall before 5.1. */
62#if __LINUX_KERNEL_VERSION < 0x050100
63# undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
64# if !defined __arch64__
65# undef __ASSUME_SYSVIPC_DEFAULT_IPC_64
66# endif
67#endif
6368
6469/* Support for the renameat2 syscall was added in 3.16. */
6570#if __LINUX_KERNEL_VERSION < 0x031000
lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33 Contributed by Miguel de Icaza <miguel@gnu.ai.mit.edu>, January 1997.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _LINUX_SPARC32_SYSDEP_H
2020#define _LINUX_SPARC32_SYSDEP_H 1
lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h+2-12
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33 Contributed by Richard Henderson <richard@gnu.ai.mit.edu>, 1997.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _LINUX_SPARC64_SYSDEP_H
2020#define _LINUX_SPARC64_SYSDEP_H 1
......@@ -29,16 +29,6 @@
2929#undef SYS_ify
3030#define SYS_ify(syscall_name) __NR_##syscall_name
3131
32/* This is a kludge to make syscalls.list find these under the names
33 pread and pwrite, since some kernel headers define those names
34 and some define the *64 names for the same system calls. */
35#if !defined __NR_pread && defined __NR_pread64
36# define __NR_pread __NR_pread64
37#endif
38#if !defined __NR_pwrite && defined __NR_pwrite64
39# define __NR_pwrite __NR_pwrite64
40#endif
41
4232#ifdef __ASSEMBLER__
4333
4434#define LOADSYSCALL(x) mov __NR_##x, %g1
lib/libc/glibc/sysdeps/unix/sysv/linux/sparc/sysdep.h+11-4
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2000-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2000-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33 Contributed by Jakub Jelinek <jakub@redhat.com>, 2000.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _LINUX_SPARC_SYSDEP_H
2020#define _LINUX_SPARC_SYSDEP_H 1
......@@ -41,9 +41,16 @@
4141 _ret; \
4242 })
4343
44# define VDSO_NAME "LINUX_2.6"
45# define VDSO_HASH 61765110
46
4447/* List of system calls which are supported as vsyscalls. */
45# define HAVE_CLOCK_GETTIME_VSYSCALL 1
46# define HAVE_GETTIMEOFDAY_VSYSCALL 1
48# ifdef __arch64__
49# define HAVE_CLOCK_GETTIME64_VSYSCALL "__vdso_clock_gettime"
50# else
51# define HAVE_CLOCK_GETTIME_VSYSCALL "__vdso_clock_gettime"
52# endif
53# define HAVE_GETTIMEOFDAY_VSYSCALL "__vdso_gettimeofday"
4754
4855#undef INLINE_SYSCALL
4956#define INLINE_SYSCALL(name, nr, args...) \
lib/libc/glibc/sysdeps/unix/sysv/linux/sys/syscall.h+6-9
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYSCALL_H
1919#define _SYSCALL_H 1
......@@ -23,12 +23,9 @@
2323 from the kernel sources. */
2424#include <asm/unistd.h>
2525
26#ifndef _LIBC
27/* The Linux kernel header file defines macros `__NR_<name>', but some
28 programs expect the traditional form `SYS_<name>'. So in building libc
29 we scan the kernel's list and produce <bits/syscall.h> with macros for
30 all the `SYS_' names. */
31# include <bits/syscall.h>
32#endif
26/* The Linux kernel header file defines macros __NR_*, but some
27 programs expect the traditional form SYS_*. <bits/syscall.h>
28 defines SYS_* macros for __NR_* macros of known names. */
29#include <bits/syscall.h>
3330
3431#endif
lib/libc/glibc/sysdeps/unix/sysv/linux/sys/timex.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_TIMEX_H
1919#define _SYS_TIMEX_H 1
lib/libc/glibc/sysdeps/unix/sysv/linux/sysdep.h+2-9
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2015-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2015-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,18 +13,11 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#include <bits/wordsize.h>
1919#include <kernel-features.h>
2020
21/* By default only shared builds use vdso. */
22#ifndef ALWAYS_USE_VSYSCALL
23#define ALWAYS_USE_VSYSCALL 0
24#endif
25
26#define USE_VSYSCALL (defined (SHARED) || ALWAYS_USE_VSYSCALL)
27
2821/* Set error number and return -1. A target may choose to return the
2922 internal function, __syscall_error, which sets errno and returns -1.
3023 We use -1l, instead of -1, so that it can be casted to (void *). */
lib/libc/glibc/sysdeps/unix/sysv/linux/x86/bits/stat.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#if !defined _SYS_STAT_H && !defined _FCNTL_H
1919# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
lib/libc/glibc/sysdeps/unix/sysv/linux/x86/bits/typesizes.h+7-2
......@@ -1,5 +1,5 @@
11/* bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
2 Copyright (C) 2012-2019 Free Software Foundation, Inc.
2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_TYPES_H
2020# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
......@@ -84,8 +84,13 @@
8484
8585/* And for __rlim_t and __rlim64_t. */
8686# define __RLIM_T_MATCHES_RLIM64_T 1
87
88/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
89# define __STATFS_MATCHES_STATFS64 1
8790#else
8891# define __RLIM_T_MATCHES_RLIM64_T 0
92
93# define __STATFS_MATCHES_STATFS64 0
8994#endif
9095
9196/* Number of descriptors that can fit in an `fd_set'. */
lib/libc/glibc/sysdeps/unix/sysv/linux/x86/sys/elf.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_ELF_H
1919#define _SYS_ELF_H 1
lib/libc/glibc/sysdeps/unix/sysv/linux/x86_64/kernel-features.h+2-2
......@@ -1,6 +1,6 @@
11/* Set flags signalling availability of kernel features based on given
22 kernel version number. x86-64 version.
3 Copyright (C) 1999-2019 Free Software Foundation, Inc.
3 Copyright (C) 1999-2020 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020/* Define that x32 is a ILP32 ABI to set the correct interface to pass
2121 64-bits values through syscalls. */
lib/libc/glibc/sysdeps/unix/sysv/linux/x86_64/sysdep.h+10-18
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2001-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,14 +13,11 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _LINUX_X86_64_SYSDEP_H
1919#define _LINUX_X86_64_SYSDEP_H 1
2020
21/* Always enable vsyscalls on x86_64 */
22#define ALWAYS_USE_VSYSCALL 1
23
2421/* There is some commonality. */
2522#include <sysdeps/unix/sysv/linux/sysdep.h>
2623#include <sysdeps/unix/x86_64/sysdep.h>
......@@ -36,16 +33,6 @@
3633#undef SYS_ify
3734#define SYS_ify(syscall_name) __NR_##syscall_name
3835
39/* This is a kludge to make syscalls.list find these under the names
40 pread and pwrite, since some kernel headers define those names
41 and some define the *64 names for the same system calls. */
42#if !defined __NR_pread && defined __NR_pread64
43# define __NR_pread __NR_pread64
44#endif
45#if !defined __NR_pwrite && defined __NR_pwrite64
46# define __NR_pwrite __NR_pwrite64
47#endif
48
4936/* This is to help the old kernel headers where __NR_semtimedop is not
5037 available. */
5138#ifndef __NR_semtimedop
......@@ -373,10 +360,15 @@
373360# undef INTERNAL_SYSCALL_ERRNO
374361# define INTERNAL_SYSCALL_ERRNO(val, err) (-(val))
375362
363# define VDSO_NAME "LINUX_2.6"
364# define VDSO_HASH 61765110
365
376366/* List of system calls which are supported as vsyscalls. */
377# define HAVE_CLOCK_GETTIME_VSYSCALL 1
378# define HAVE_GETTIMEOFDAY_VSYSCALL 1
379# define HAVE_GETCPU_VSYSCALL 1
367# define HAVE_CLOCK_GETTIME64_VSYSCALL "__vdso_clock_gettime"
368# define HAVE_GETTIMEOFDAY_VSYSCALL "__vdso_gettimeofday"
369# define HAVE_TIME_VSYSCALL "__vdso_time"
370# define HAVE_GETCPU_VSYSCALL "__vdso_getcpu"
371# define HAVE_CLOCK_GETRES64_VSYSCALL "__vdso_clock_getres"
380372
381373# define SINGLE_THREAD_BY_GLOBAL 1
382374
lib/libc/glibc/sysdeps/unix/sysv/linux/x86_64/x32/sysdep.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2012-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2012-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _LINUX_X32_SYSDEP_H
1919#define _LINUX_X32_SYSDEP_H 1
lib/libc/glibc/sysdeps/unix/x86_64/sysdep.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#include <sysdeps/unix/sysdep.h>
1919#include <sysdeps/x86_64/sysdep.h>
lib/libc/glibc/sysdeps/wordsize-32/divdi3-symbol-hacks.h+2-2
......@@ -1,5 +1,5 @@
11/* Hacks needed for divdi3 symbol manipulation.
2 Copyright (C) 2004-2019 Free Software Foundation, Inc.
2 Copyright (C) 2004-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* A very dirty trick: gcc emits references to __divdi3, __udivdi3,
2020 __moddi3, and __umoddi3. These functions are exported and
lib/libc/glibc/sysdeps/x86/bits/endian.h deleted-7
......@@ -1,7 +0,0 @@
1/* i386/x86_64 are little-endian. */
2
3#ifndef _ENDIAN_H
4# error "Never use <bits/endian.h> directly; include <endian.h> instead."
5#endif
6
7#define __BYTE_ORDER __LITTLE_ENDIAN
lib/libc/glibc/sysdeps/x86/bits/endianness.h created+11
......@@ -0,0 +1,11 @@
1#ifndef _BITS_ENDIANNESS_H
2#define _BITS_ENDIANNESS_H 1
3
4#ifndef _BITS_ENDIAN_H
5# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
6#endif
7
8/* i386/x86_64 are little-endian. */
9#define __BYTE_ORDER __LITTLE_ENDIAN
10
11#endif /* bits/endianness.h */
lib/libc/glibc/sysdeps/x86/bits/select.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_SELECT_H
1919# error "Never use <bits/select.h> directly; include <sys/select.h> instead."
lib/libc/glibc/sysdeps/x86/nptl/bits/pthreadtypes-arch.h+2-53
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _BITS_PTHREADTYPES_ARCH_H
1919#define _BITS_PTHREADTYPES_ARCH_H 1
......@@ -24,20 +24,17 @@
2424# if __WORDSIZE == 64
2525# define __SIZEOF_PTHREAD_MUTEX_T 40
2626# define __SIZEOF_PTHREAD_ATTR_T 56
27# define __SIZEOF_PTHREAD_MUTEX_T 40
2827# define __SIZEOF_PTHREAD_RWLOCK_T 56
2928# define __SIZEOF_PTHREAD_BARRIER_T 32
3029# else
3130# define __SIZEOF_PTHREAD_MUTEX_T 32
3231# define __SIZEOF_PTHREAD_ATTR_T 32
33# define __SIZEOF_PTHREAD_MUTEX_T 32
3432# define __SIZEOF_PTHREAD_RWLOCK_T 44
3533# define __SIZEOF_PTHREAD_BARRIER_T 20
3634# endif
3735#else
3836# define __SIZEOF_PTHREAD_MUTEX_T 24
3937# define __SIZEOF_PTHREAD_ATTR_T 36
40# define __SIZEOF_PTHREAD_MUTEX_T 24
4138# define __SIZEOF_PTHREAD_RWLOCK_T 32
4239# define __SIZEOF_PTHREAD_BARRIER_T 20
4340#endif
......@@ -47,57 +44,9 @@
4744#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
4845#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
4946
50/* Definitions for internal mutex struct. */
51#define __PTHREAD_COMPAT_PADDING_MID
52#define __PTHREAD_COMPAT_PADDING_END
53#define __PTHREAD_MUTEX_LOCK_ELISION 1
54#ifdef __x86_64__
55# define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 0
56# define __PTHREAD_MUTEX_USE_UNION 0
57#else
58# define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 1
59# define __PTHREAD_MUTEX_USE_UNION 1
60#endif
61
6247#define __LOCK_ALIGNMENT
6348#define __ONCE_ALIGNMENT
6449
65struct __pthread_rwlock_arch_t
66{
67 unsigned int __readers;
68 unsigned int __writers;
69 unsigned int __wrphase_futex;
70 unsigned int __writers_futex;
71 unsigned int __pad3;
72 unsigned int __pad4;
73#ifdef __x86_64__
74 int __cur_writer;
75 int __shared;
76 signed char __rwelision;
77# ifdef __ILP32__
78 unsigned char __pad1[3];
79# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0 }
80# else
81 unsigned char __pad1[7];
82# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0, 0, 0, 0, 0 }
83# endif
84 unsigned long int __pad2;
85 /* FLAGS must stay at this position in the structure to maintain
86 binary compatibility. */
87 unsigned int __flags;
88# define __PTHREAD_RWLOCK_INT_FLAGS_SHARED 1
89#else
90 /* FLAGS must stay at this position in the structure to maintain
91 binary compatibility. */
92 unsigned char __flags;
93 unsigned char __shared;
94 signed char __rwelision;
95# define __PTHREAD_RWLOCK_ELISION_EXTRA 0
96 unsigned char __pad2;
97 int __cur_writer;
98#endif
99};
100
10150#ifndef __x86_64__
10251/* Extra attributes for the cleanup functions. */
10352# define __cleanup_fct_attribute __attribute__ ((__regparm__ (1)))
lib/libc/glibc/sysdeps/x86/sysdep.h+2-2
......@@ -1,5 +1,5 @@
11/* Assembler macros for x86.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _X86_SYSDEP_H
2020#define _X86_SYSDEP_H 1
lib/libc/glibc/sysdeps/x86_64/crti.S+2-2
......@@ -1,5 +1,5 @@
11/* Special .init and .fini section support for x86-64.
2 Copyright (C) 2012-2019 Free Software Foundation, Inc.
2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library; if not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636/* crti.S puts a function prologue at the beginning of the .init and
3737 .fini sections and defines global symbols for those addresses, so
lib/libc/glibc/sysdeps/x86_64/crtn.S+2-2
......@@ -1,5 +1,5 @@
11/* Special .init and .fini section support for x86-64.
2 Copyright (C) 2012-2019 Free Software Foundation, Inc.
2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,7 +31,7 @@
3131
3232 You should have received a copy of the GNU Lesser General Public
3333 License along with the GNU C Library; if not, see
34 <http://www.gnu.org/licenses/>. */
34 <https://www.gnu.org/licenses/>. */
3535
3636/* crtn.S puts function epilogues in the .init and .fini sections
3737 corresponding to the prologues in crti.S. */
lib/libc/glibc/sysdeps/x86_64/start.S+2-2
......@@ -1,5 +1,5 @@
11/* Startup code compliant to the ELF x86-64 ABI.
2 Copyright (C) 2001-2019 Free Software Foundation, Inc.
2 Copyright (C) 2001-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44 Contributed by Andreas Jaeger <aj@suse.de>, 2001.
55
......@@ -32,7 +32,7 @@
3232
3333 You should have received a copy of the GNU Lesser General Public
3434 License along with the GNU C Library; if not, see
35 <http://www.gnu.org/licenses/>. */
35 <https://www.gnu.org/licenses/>. */
3636
3737/* This is the canonical entry point, usually the first thing in the text
3838 segment. The SVR4/i386 ABI (pages 3-31, 3-32) says that when the entry
lib/libc/glibc/sysdeps/x86_64/sysdep.h+2-2
......@@ -1,5 +1,5 @@
11/* Assembler macros for x86-64.
2 Copyright (C) 2001-2019 Free Software Foundation, Inc.
2 Copyright (C) 2001-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _X86_64_SYSDEP_H
2020#define _X86_64_SYSDEP_H 1
lib/libc/glibc/sysdeps/x86_64/x32/sysdep.h+2-2
......@@ -1,5 +1,5 @@
11/* Assembler macros for x32.
2 Copyright (C) 2012-2019 Free Software Foundation, Inc.
2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#include <sysdeps/x86_64/sysdep.h>
2020
lib/libc/glibc/time/bits/types/struct_timespec.h+13
......@@ -3,13 +3,26 @@
33#define _STRUCT_TIMESPEC 1
44
55#include <bits/types.h>
6#include <bits/endian.h>
67
78/* POSIX.1b structure for a time value. This is like a `struct timeval' but
89 has nanoseconds instead of microseconds. */
910struct timespec
1011{
1112 __time_t tv_sec; /* Seconds. */
13#if __WORDSIZE == 64 \
14 || (defined __SYSCALL_WORDSIZE && __SYSCALL_WORDSIZE == 64) \
15 || __TIMESIZE == 32
1216 __syscall_slong_t tv_nsec; /* Nanoseconds. */
17#else
18# if __BYTE_ORDER == __BIG_ENDIAN
19 int: 32; /* Padding. */
20 long int tv_nsec; /* Nanoseconds. */
21# else
22 long int tv_nsec; /* Nanoseconds. */
23 int: 32; /* Padding. */
24# endif
25#endif
1326};
1427
1528#endif
lib/libc/glibc/vers.txt+1
......@@ -39,3 +39,4 @@ GLIBC_2.27
3939GLIBC_2.28
4040GLIBC_2.29
4141GLIBC_2.30
42GLIBC_2.31
lib/libc/include/aarch64-linux-gnu/bits/endian.h deleted-30
......@@ -1,30 +0,0 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
2
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 2.1 of the
8 License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
18
19#ifndef _ENDIAN_H
20# error "Never use <bits/endian.h> directly; include <endian.h> instead."
21#endif
22
23/* AArch64 can be either big or little endian. */
24#ifdef __AARCH64EB__
25# define __BYTE_ORDER __BIG_ENDIAN
26#else
27# define __BYTE_ORDER __LITTLE_ENDIAN
28#endif
29
30#define __FLOAT_WORD_ORDER __BYTE_ORDER
\ No newline at end of file
lib/libc/include/aarch64-linux-gnu/bits/endianness.h created+15
......@@ -0,0 +1,15 @@
1#ifndef _BITS_ENDIANNESS_H
2#define _BITS_ENDIANNESS_H 1
3
4#ifndef _BITS_ENDIAN_H
5# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
6#endif
7
8/* AArch64 has selectable endianness. */
9#ifdef __AARCH64EB__
10# define __BYTE_ORDER __BIG_ENDIAN
11#else
12# define __BYTE_ORDER __LITTLE_ENDIAN
13#endif
14
15#endif /* bits/endianness.h */
\ No newline at end of file
lib/libc/include/aarch64-linux-gnu/bits/fcntl.h+2-2
......@@ -1,5 +1,5 @@
11/* O_*, F_*, FD_* bit values for the AArch64 Linux ABI.
2 Copyright (C) 2011-2019 Free Software Foundation, Inc.
2 Copyright (C) 2011-2020 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library. If not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _FCNTL_H
2121# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
lib/libc/include/aarch64-linux-gnu/bits/fenv.h+3-3
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2004-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2004-2020 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _FENV_H
2020# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
......@@ -73,7 +73,7 @@ fenv_t;
7373# define FE_NOMASK_ENV ((const fenv_t *) -2)
7474#endif
7575
76#if __GLIBC_USE (IEC_60559_BFP_EXT)
76#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
7777/* Type representing floating-point control modes. */
7878typedef unsigned int femode_t;
7979
lib/libc/include/aarch64-linux-gnu/bits/floatn.h+2-2
......@@ -1,5 +1,5 @@
11/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_FLOATN_H
2020#define _BITS_FLOATN_H
lib/libc/include/aarch64-linux-gnu/bits/fp-fast.h+2-2
......@@ -1,5 +1,5 @@
11/* Define FP_FAST_* macros. AArch64 version.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _MATH_H
2020# error "Never use <bits/fp-fast.h> directly; include <math.h> instead."
lib/libc/include/aarch64-linux-gnu/bits/hwcap.h+2-2
......@@ -1,5 +1,5 @@
11/* Defines for bits in AT_HWCAP. AArch64 Linux version.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#if !defined (_SYS_AUXV_H)
2020# error "Never include <bits/hwcap.h> directly; use <sys/auxv.h> instead."
lib/libc/include/aarch64-linux-gnu/bits/ipc.h deleted-54
......@@ -1,54 +0,0 @@
1/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_IPC_H
19# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
20#endif
21
22#include <bits/types.h>
23
24/* Mode bits for `msgget', `semget', and `shmget'. */
25#define IPC_CREAT 01000 /* Create key if key does not exist. */
26#define IPC_EXCL 02000 /* Fail if key exists. */
27#define IPC_NOWAIT 04000 /* Return error on wait. */
28
29/* Control commands for `msgctl', `semctl', and `shmctl'. */
30#define IPC_RMID 0 /* Remove identifier. */
31#define IPC_SET 1 /* Set `ipc_perm' options. */
32#define IPC_STAT 2 /* Get `ipc_perm' options. */
33#ifdef __USE_GNU
34# define IPC_INFO 3 /* See ipcs. */
35#endif
36
37/* Special key values. */
38#define IPC_PRIVATE ((__key_t) 0) /* Private key. */
39
40
41/* Data structure used to pass permission information to IPC operations. */
42struct ipc_perm
43 {
44 __key_t __key; /* Key. */
45 __uid_t uid; /* Owner's user ID. */
46 __gid_t gid; /* Owner's group ID. */
47 __uid_t cuid; /* Creator's user ID. */
48 __gid_t cgid; /* Creator's group ID. */
49 unsigned int mode; /* Read/write permission. */
50 unsigned short int __seq; /* Sequence number. */
51 unsigned short int __pad1;
52 __syscall_ulong_t __glibc_reserved1;
53 __syscall_ulong_t __glibc_reserved2;
54 };
\ No newline at end of file
lib/libc/include/aarch64-linux-gnu/bits/link.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2020 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _LINK_H
2020# error "Never include <bits/link.h> directly; use <link.h> instead."
lib/libc/include/aarch64-linux-gnu/bits/local_lim.h+2-2
......@@ -1,5 +1,5 @@
11/* Minimum guaranteed maximum values for system limits. Linux version.
2 Copyright (C) 1993-2019 Free Software Foundation, Inc.
2 Copyright (C) 1993-2020 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library. If not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020/* The kernel header pollutes the namespace with the NR_OPEN symbol
2121 and defines LINK_MAX although filesystems have different maxima. A
lib/libc/include/aarch64-linux-gnu/bits/long-double.h+4-3
......@@ -1,5 +1,5 @@
11/* Properties of long double type. ldbl-128 version.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,8 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* long double is distinct from double, so there is nothing to
20 define here. */
\ No newline at end of file
20 define here. */
21#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file
lib/libc/include/aarch64-linux-gnu/bits/procfs.h+2-2
......@@ -1,5 +1,5 @@
11/* Types for registers for sys/procfs.h. AArch64 version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _SYS_PROCFS_H
2121# error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead."
lib/libc/include/aarch64-linux-gnu/bits/pthreadtypes-arch.h+3-27
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
......@@ -14,12 +14,12 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_PTHREADTYPES_ARCH_H
2020#define _BITS_PTHREADTYPES_ARCH_H 1
2121
22#include <endian.h>
22#include <bits/endian.h>
2323
2424#ifdef __ILP32__
2525# define __SIZEOF_PTHREAD_ATTR_T 32
......@@ -41,31 +41,7 @@
4141#define __SIZEOF_PTHREAD_COND_T 48
4242#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
4343
44/* Definitions for internal mutex struct. */
45#define __PTHREAD_COMPAT_PADDING_MID
46#define __PTHREAD_COMPAT_PADDING_END
47#define __PTHREAD_MUTEX_LOCK_ELISION 0
48#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 0
49#define __PTHREAD_MUTEX_USE_UNION 0
50
5144#define __LOCK_ALIGNMENT
5245#define __ONCE_ALIGNMENT
5346
54struct __pthread_rwlock_arch_t
55{
56 unsigned int __readers;
57 unsigned int __writers;
58 unsigned int __wrphase_futex;
59 unsigned int __writers_futex;
60 unsigned int __pad3;
61 unsigned int __pad4;
62 int __cur_writer;
63 int __shared;
64 unsigned long int __pad1;
65 unsigned long int __pad2;
66 unsigned int __flags;
67};
68
69#define __PTHREAD_RWLOCK_ELISION_EXTRA 0
70
7147#endif /* bits/pthreadtypes.h */
\ No newline at end of file
lib/libc/include/aarch64-linux-gnu/bits/semaphore.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SEMAPHORE_H
2020# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
lib/libc/include/aarch64-linux-gnu/bits/setjmp.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_SETJMP_H
2020#define _BITS_SETJMP_H 1
lib/libc/include/aarch64-linux-gnu/bits/sigstack.h+2-2
......@@ -1,5 +1,5 @@
11/* sigstack, sigaltstack definitions.
2 Copyright (C) 2015-2019 Free Software Foundation, Inc.
2 Copyright (C) 2015-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_SIGSTACK_H
2020#define _BITS_SIGSTACK_H 1
lib/libc/include/aarch64-linux-gnu/bits/stat.h+7-4
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2011-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2011-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33 Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#if !defined _SYS_STAT_H && !defined _FCNTL_H
2020# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
......@@ -23,7 +23,7 @@
2323#ifndef _BITS_STAT_H
2424#define _BITS_STAT_H 1
2525
26#include <endian.h>
26#include <bits/endian.h>
2727#include <bits/wordsize.h>
2828
2929/* 64-bit libc uses the kernel's 'struct stat', accessed via the
......@@ -42,7 +42,10 @@
4242
4343#if defined __USE_FILE_OFFSET64
4444# define __field64(type, type64, name) type64 name
45#elif __WORDSIZE == 64
45#elif __WORDSIZE == 64 || defined __INO_T_MATCHES_INO64_T
46# if defined __INO_T_MATCHES_INO64_T && !defined __OFF_T_MATCHES_OFF64_T
47# error "ino_t and off_t must both be the same type"
48# endif
4649# define __field64(type, type64, name) type name
4750#elif __BYTE_ORDER == __LITTLE_ENDIAN
4851# define __field64(type, type64, name) \
lib/libc/include/aarch64-linux-gnu/bits/statfs.h+4-4
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2011-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2011-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33 Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
44
......@@ -14,13 +14,13 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_STATFS_H
2020# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
2121#endif
2222
23#include <endian.h>
23#include <bits/endian.h>
2424#include <bits/types.h>
2525#include <bits/wordsize.h>
2626
......@@ -34,7 +34,7 @@
3434
3535#if defined __USE_FILE_OFFSET64
3636# define __field64(type, type64, name) type64 name
37#elif __WORDSIZE == 64
37#elif __WORDSIZE == 64 || __STATFS_MATCHES_STATFS64
3838# define __field64(type, type64, name) type name
3939#elif __BYTE_ORDER == __LITTLE_ENDIAN
4040# define __field64(type, type64, name) \
lib/libc/include/aarch64-linux-gnu/bits/struct_rwlock.h created+41
......@@ -0,0 +1,41 @@
1/* AArch64 internal rwlock struct definitions.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
3
4 This file is part of the GNU C Library.
5
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
19
20#ifndef _RWLOCK_INTERNAL_H
21#define _RWLOCK_INTERNAL_H
22
23struct __pthread_rwlock_arch_t
24{
25 unsigned int __readers;
26 unsigned int __writers;
27 unsigned int __wrphase_futex;
28 unsigned int __writers_futex;
29 unsigned int __pad3;
30 unsigned int __pad4;
31 int __cur_writer;
32 int __shared;
33 unsigned long int __pad1;
34 unsigned long int __pad2;
35 unsigned int __flags;
36};
37
38#define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
39 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags
40
41#endif
\ No newline at end of file
lib/libc/include/aarch64-linux-gnu/bits/typesizes.h+7-3
......@@ -1,5 +1,5 @@
11/* bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
2 Copyright (C) 2011-2019 Free Software Foundation, Inc.
2 Copyright (C) 2011-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44 Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library. If not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _BITS_TYPES_H
2121# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
......@@ -73,10 +73,14 @@
7373
7474/* And for __rlim_t and __rlim64_t. */
7575# define __RLIM_T_MATCHES_RLIM64_T 1
76
77/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
78# define __STATFS_MATCHES_STATFS64 1
7679#else
7780# define __RLIM_T_MATCHES_RLIM64_T 0
78#endif
7981
82# define __STATFS_MATCHES_STATFS64 0
83#endif
8084/* Number of descriptors that can fit in an `fd_set'. */
8185#define __FD_SETSIZE 1024
8286
lib/libc/include/aarch64-linux-gnu/bits/wordsize.h+2-2
......@@ -1,6 +1,6 @@
11/* Determine the wordsize from the preprocessor defines.
22
3 Copyright (C) 2016-2019 Free Software Foundation, Inc.
3 Copyright (C) 2016-2020 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifdef __LP64__
2121# define __WORDSIZE 64
lib/libc/include/aarch64-linux-gnu/fpu_control.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _AARCH64_FPU_CONTROL_H
2020#define _AARCH64_FPU_CONTROL_H
lib/libc/include/aarch64-linux-gnu/ieee754.h+4-4
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,14 +13,14 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _IEEE754_H
19
2019#define _IEEE754_H 1
20
2121#include <features.h>
2222
23#include <endian.h>
23#include <bits/endian.h>
2424
2525__BEGIN_DECLS
2626
lib/libc/include/aarch64-linux-gnu/sys/elf.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_ELF_H
2020#define _SYS_ELF_H 1
lib/libc/include/aarch64-linux-gnu/sys/ptrace.h+7-3
......@@ -1,5 +1,5 @@
11/* `ptrace' debugger support interface. Linux/AArch64 version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _SYS_PTRACE_H
2121#define _SYS_PTRACE_H 1
......@@ -136,8 +136,12 @@ enum __ptrace_request
136136#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER
137137
138138 /* Get seccomp BPF filter metadata. */
139 PTRACE_SECCOMP_GET_METADATA = 0x420d
139 PTRACE_SECCOMP_GET_METADATA = 0x420d,
140140#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
141
142 /* Get information about system call. */
143 PTRACE_GET_SYSCALL_INFO = 0x420e
144#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
141145};
142146
143147
lib/libc/include/aarch64-linux-gnu/sys/ucontext.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2020 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* System V/AArch64 ABI compliant context switching support. */
2020
lib/libc/include/aarch64-linux-gnu/sys/user.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2009-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2009-2020 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_USER_H
2020#define _SYS_USER_H 1
lib/libc/include/aarch64_be-linux-gnu/bits/endian.h deleted-30
......@@ -1,30 +0,0 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
2
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 2.1 of the
8 License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
18
19#ifndef _ENDIAN_H
20# error "Never use <bits/endian.h> directly; include <endian.h> instead."
21#endif
22
23/* AArch64 can be either big or little endian. */
24#ifdef __AARCH64EB__
25# define __BYTE_ORDER __BIG_ENDIAN
26#else
27# define __BYTE_ORDER __LITTLE_ENDIAN
28#endif
29
30#define __FLOAT_WORD_ORDER __BYTE_ORDER
\ No newline at end of file
lib/libc/include/aarch64_be-linux-gnu/bits/endianness.h created+15
......@@ -0,0 +1,15 @@
1#ifndef _BITS_ENDIANNESS_H
2#define _BITS_ENDIANNESS_H 1
3
4#ifndef _BITS_ENDIAN_H
5# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
6#endif
7
8/* AArch64 has selectable endianness. */
9#ifdef __AARCH64EB__
10# define __BYTE_ORDER __BIG_ENDIAN
11#else
12# define __BYTE_ORDER __LITTLE_ENDIAN
13#endif
14
15#endif /* bits/endianness.h */
\ No newline at end of file
lib/libc/include/aarch64_be-linux-gnu/bits/fcntl.h+2-2
......@@ -1,5 +1,5 @@
11/* O_*, F_*, FD_* bit values for the AArch64 Linux ABI.
2 Copyright (C) 2011-2019 Free Software Foundation, Inc.
2 Copyright (C) 2011-2020 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library. If not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _FCNTL_H
2121# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
lib/libc/include/aarch64_be-linux-gnu/bits/fenv.h+3-3
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2004-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2004-2020 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _FENV_H
2020# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
......@@ -73,7 +73,7 @@ fenv_t;
7373# define FE_NOMASK_ENV ((const fenv_t *) -2)
7474#endif
7575
76#if __GLIBC_USE (IEC_60559_BFP_EXT)
76#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
7777/* Type representing floating-point control modes. */
7878typedef unsigned int femode_t;
7979
lib/libc/include/aarch64_be-linux-gnu/bits/floatn.h+2-2
......@@ -1,5 +1,5 @@
11/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_FLOATN_H
2020#define _BITS_FLOATN_H
lib/libc/include/aarch64_be-linux-gnu/bits/fp-fast.h+2-2
......@@ -1,5 +1,5 @@
11/* Define FP_FAST_* macros. AArch64 version.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _MATH_H
2020# error "Never use <bits/fp-fast.h> directly; include <math.h> instead."
lib/libc/include/aarch64_be-linux-gnu/bits/hwcap.h+2-2
......@@ -1,5 +1,5 @@
11/* Defines for bits in AT_HWCAP. AArch64 Linux version.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#if !defined (_SYS_AUXV_H)
2020# error "Never include <bits/hwcap.h> directly; use <sys/auxv.h> instead."
lib/libc/include/aarch64_be-linux-gnu/bits/ipc.h deleted-54
......@@ -1,54 +0,0 @@
1/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_IPC_H
19# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
20#endif
21
22#include <bits/types.h>
23
24/* Mode bits for `msgget', `semget', and `shmget'. */
25#define IPC_CREAT 01000 /* Create key if key does not exist. */
26#define IPC_EXCL 02000 /* Fail if key exists. */
27#define IPC_NOWAIT 04000 /* Return error on wait. */
28
29/* Control commands for `msgctl', `semctl', and `shmctl'. */
30#define IPC_RMID 0 /* Remove identifier. */
31#define IPC_SET 1 /* Set `ipc_perm' options. */
32#define IPC_STAT 2 /* Get `ipc_perm' options. */
33#ifdef __USE_GNU
34# define IPC_INFO 3 /* See ipcs. */
35#endif
36
37/* Special key values. */
38#define IPC_PRIVATE ((__key_t) 0) /* Private key. */
39
40
41/* Data structure used to pass permission information to IPC operations. */
42struct ipc_perm
43 {
44 __key_t __key; /* Key. */
45 __uid_t uid; /* Owner's user ID. */
46 __gid_t gid; /* Owner's group ID. */
47 __uid_t cuid; /* Creator's user ID. */
48 __gid_t cgid; /* Creator's group ID. */
49 unsigned int mode; /* Read/write permission. */
50 unsigned short int __seq; /* Sequence number. */
51 unsigned short int __pad1;
52 __syscall_ulong_t __glibc_reserved1;
53 __syscall_ulong_t __glibc_reserved2;
54 };
\ No newline at end of file
lib/libc/include/aarch64_be-linux-gnu/bits/link.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2020 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _LINK_H
2020# error "Never include <bits/link.h> directly; use <link.h> instead."
lib/libc/include/aarch64_be-linux-gnu/bits/local_lim.h+2-2
......@@ -1,5 +1,5 @@
11/* Minimum guaranteed maximum values for system limits. Linux version.
2 Copyright (C) 1993-2019 Free Software Foundation, Inc.
2 Copyright (C) 1993-2020 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library. If not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020/* The kernel header pollutes the namespace with the NR_OPEN symbol
2121 and defines LINK_MAX although filesystems have different maxima. A
lib/libc/include/aarch64_be-linux-gnu/bits/long-double.h+4-3
......@@ -1,5 +1,5 @@
11/* Properties of long double type. ldbl-128 version.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,8 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* long double is distinct from double, so there is nothing to
20 define here. */
\ No newline at end of file
20 define here. */
21#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file
lib/libc/include/aarch64_be-linux-gnu/bits/procfs.h+2-2
......@@ -1,5 +1,5 @@
11/* Types for registers for sys/procfs.h. AArch64 version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _SYS_PROCFS_H
2121# error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead."
lib/libc/include/aarch64_be-linux-gnu/bits/pthreadtypes-arch.h+3-27
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
......@@ -14,12 +14,12 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_PTHREADTYPES_ARCH_H
2020#define _BITS_PTHREADTYPES_ARCH_H 1
2121
22#include <endian.h>
22#include <bits/endian.h>
2323
2424#ifdef __ILP32__
2525# define __SIZEOF_PTHREAD_ATTR_T 32
......@@ -41,31 +41,7 @@
4141#define __SIZEOF_PTHREAD_COND_T 48
4242#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
4343
44/* Definitions for internal mutex struct. */
45#define __PTHREAD_COMPAT_PADDING_MID
46#define __PTHREAD_COMPAT_PADDING_END
47#define __PTHREAD_MUTEX_LOCK_ELISION 0
48#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 0
49#define __PTHREAD_MUTEX_USE_UNION 0
50
5144#define __LOCK_ALIGNMENT
5245#define __ONCE_ALIGNMENT
5346
54struct __pthread_rwlock_arch_t
55{
56 unsigned int __readers;
57 unsigned int __writers;
58 unsigned int __wrphase_futex;
59 unsigned int __writers_futex;
60 unsigned int __pad3;
61 unsigned int __pad4;
62 int __cur_writer;
63 int __shared;
64 unsigned long int __pad1;
65 unsigned long int __pad2;
66 unsigned int __flags;
67};
68
69#define __PTHREAD_RWLOCK_ELISION_EXTRA 0
70
7147#endif /* bits/pthreadtypes.h */
\ No newline at end of file
lib/libc/include/aarch64_be-linux-gnu/bits/semaphore.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SEMAPHORE_H
2020# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
lib/libc/include/aarch64_be-linux-gnu/bits/setjmp.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_SETJMP_H
2020#define _BITS_SETJMP_H 1
lib/libc/include/aarch64_be-linux-gnu/bits/sigstack.h+2-2
......@@ -1,5 +1,5 @@
11/* sigstack, sigaltstack definitions.
2 Copyright (C) 2015-2019 Free Software Foundation, Inc.
2 Copyright (C) 2015-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_SIGSTACK_H
2020#define _BITS_SIGSTACK_H 1
lib/libc/include/aarch64_be-linux-gnu/bits/stat.h+7-4
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2011-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2011-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33 Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#if !defined _SYS_STAT_H && !defined _FCNTL_H
2020# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
......@@ -23,7 +23,7 @@
2323#ifndef _BITS_STAT_H
2424#define _BITS_STAT_H 1
2525
26#include <endian.h>
26#include <bits/endian.h>
2727#include <bits/wordsize.h>
2828
2929/* 64-bit libc uses the kernel's 'struct stat', accessed via the
......@@ -42,7 +42,10 @@
4242
4343#if defined __USE_FILE_OFFSET64
4444# define __field64(type, type64, name) type64 name
45#elif __WORDSIZE == 64
45#elif __WORDSIZE == 64 || defined __INO_T_MATCHES_INO64_T
46# if defined __INO_T_MATCHES_INO64_T && !defined __OFF_T_MATCHES_OFF64_T
47# error "ino_t and off_t must both be the same type"
48# endif
4649# define __field64(type, type64, name) type name
4750#elif __BYTE_ORDER == __LITTLE_ENDIAN
4851# define __field64(type, type64, name) \
lib/libc/include/aarch64_be-linux-gnu/bits/statfs.h+4-4
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2011-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2011-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33 Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
44
......@@ -14,13 +14,13 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_STATFS_H
2020# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
2121#endif
2222
23#include <endian.h>
23#include <bits/endian.h>
2424#include <bits/types.h>
2525#include <bits/wordsize.h>
2626
......@@ -34,7 +34,7 @@
3434
3535#if defined __USE_FILE_OFFSET64
3636# define __field64(type, type64, name) type64 name
37#elif __WORDSIZE == 64
37#elif __WORDSIZE == 64 || __STATFS_MATCHES_STATFS64
3838# define __field64(type, type64, name) type name
3939#elif __BYTE_ORDER == __LITTLE_ENDIAN
4040# define __field64(type, type64, name) \
lib/libc/include/aarch64_be-linux-gnu/bits/struct_rwlock.h created+41
......@@ -0,0 +1,41 @@
1/* AArch64 internal rwlock struct definitions.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
3
4 This file is part of the GNU C Library.
5
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
19
20#ifndef _RWLOCK_INTERNAL_H
21#define _RWLOCK_INTERNAL_H
22
23struct __pthread_rwlock_arch_t
24{
25 unsigned int __readers;
26 unsigned int __writers;
27 unsigned int __wrphase_futex;
28 unsigned int __writers_futex;
29 unsigned int __pad3;
30 unsigned int __pad4;
31 int __cur_writer;
32 int __shared;
33 unsigned long int __pad1;
34 unsigned long int __pad2;
35 unsigned int __flags;
36};
37
38#define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
39 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags
40
41#endif
\ No newline at end of file
lib/libc/include/aarch64_be-linux-gnu/bits/typesizes.h+7-3
......@@ -1,5 +1,5 @@
11/* bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
2 Copyright (C) 2011-2019 Free Software Foundation, Inc.
2 Copyright (C) 2011-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44 Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library. If not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _BITS_TYPES_H
2121# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
......@@ -73,10 +73,14 @@
7373
7474/* And for __rlim_t and __rlim64_t. */
7575# define __RLIM_T_MATCHES_RLIM64_T 1
76
77/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
78# define __STATFS_MATCHES_STATFS64 1
7679#else
7780# define __RLIM_T_MATCHES_RLIM64_T 0
78#endif
7981
82# define __STATFS_MATCHES_STATFS64 0
83#endif
8084/* Number of descriptors that can fit in an `fd_set'. */
8185#define __FD_SETSIZE 1024
8286
lib/libc/include/aarch64_be-linux-gnu/bits/wordsize.h+2-2
......@@ -1,6 +1,6 @@
11/* Determine the wordsize from the preprocessor defines.
22
3 Copyright (C) 2016-2019 Free Software Foundation, Inc.
3 Copyright (C) 2016-2020 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifdef __LP64__
2121# define __WORDSIZE 64
lib/libc/include/aarch64_be-linux-gnu/fpu_control.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _AARCH64_FPU_CONTROL_H
2020#define _AARCH64_FPU_CONTROL_H
lib/libc/include/aarch64_be-linux-gnu/ieee754.h+4-4
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,14 +13,14 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _IEEE754_H
19
2019#define _IEEE754_H 1
20
2121#include <features.h>
2222
23#include <endian.h>
23#include <bits/endian.h>
2424
2525__BEGIN_DECLS
2626
lib/libc/include/aarch64_be-linux-gnu/sys/elf.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_ELF_H
2020#define _SYS_ELF_H 1
lib/libc/include/aarch64_be-linux-gnu/sys/ptrace.h+7-3
......@@ -1,5 +1,5 @@
11/* `ptrace' debugger support interface. Linux/AArch64 version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _SYS_PTRACE_H
2121#define _SYS_PTRACE_H 1
......@@ -136,8 +136,12 @@ enum __ptrace_request
136136#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER
137137
138138 /* Get seccomp BPF filter metadata. */
139 PTRACE_SECCOMP_GET_METADATA = 0x420d
139 PTRACE_SECCOMP_GET_METADATA = 0x420d,
140140#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
141
142 /* Get information about system call. */
143 PTRACE_GET_SYSCALL_INFO = 0x420e
144#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
141145};
142146
143147
lib/libc/include/aarch64_be-linux-gnu/sys/ucontext.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2020 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* System V/AArch64 ABI compliant context switching support. */
2020
lib/libc/include/aarch64_be-linux-gnu/sys/user.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2009-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2009-2020 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_USER_H
2020#define _SYS_USER_H 1
lib/libc/include/arm-linux-gnueabi/bits/endian.h deleted-10
......@@ -1,10 +0,0 @@
1#ifndef _ENDIAN_H
2# error "Never use <bits/endian.h> directly; include <endian.h> instead."
3#endif
4
5/* ARM can be either big or little endian. */
6#ifdef __ARMEB__
7#define __BYTE_ORDER __BIG_ENDIAN
8#else
9#define __BYTE_ORDER __LITTLE_ENDIAN
10#endif
\ No newline at end of file
lib/libc/include/arm-linux-gnueabi/bits/endianness.h created+15
......@@ -0,0 +1,15 @@
1#ifndef _BITS_ENDIANNESS_H
2#define _BITS_ENDIANNESS_H 1
3
4#ifndef _BITS_ENDIAN_H
5# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
6#endif
7
8/* ARM has selectable endianness. */
9#ifdef __ARMEB__
10#define __BYTE_ORDER __BIG_ENDIAN
11#else
12#define __BYTE_ORDER __LITTLE_ENDIAN
13#endif
14
15#endif /* bits/endianness.h */
\ No newline at end of file
lib/libc/include/arm-linux-gnueabi/bits/fcntl.h+2-2
......@@ -1,5 +1,5 @@
11/* O_*, F_*, FD_* bit values for Linux.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _FCNTL_H
2020# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
lib/libc/include/arm-linux-gnueabi/bits/fenv.h+3-3
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2004-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2004-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _FENV_H
1919# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
......@@ -81,7 +81,7 @@ fenv_t;
8181# define FE_NOMASK_ENV ((const fenv_t *) -2)
8282#endif
8383
84#if __GLIBC_USE (IEC_60559_BFP_EXT)
84#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
8585/* Type representing floating-point control modes. */
8686typedef unsigned int femode_t;
8787
lib/libc/include/arm-linux-gnueabi/bits/floatn.h+2-2
......@@ -1,5 +1,5 @@
11/* Macros to control TS 18661-3 glibc features.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* Defined to 1 if the current compiler invocation provides a
2020 floating-point type with the IEEE 754 binary128 format, and this glibc
lib/libc/include/arm-linux-gnueabi/bits/hwcap.h+2-2
......@@ -1,5 +1,5 @@
11/* Defines for bits in AT_HWCAP. ARM Linux version.
2 Copyright (C) 2012-2019 Free Software Foundation, Inc.
2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#if !defined (_SYS_AUXV_H) && !defined (_LINUX_ARM_SYSDEP_H)
2020# error "Never include <bits/hwcap.h> directly; use <sys/auxv.h> instead."
lib/libc/include/arm-linux-gnueabi/bits/link.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _LINK_H
1919# error "Never include <bits/link.h> directly; use <link.h> instead."
lib/libc/include/arm-linux-gnueabi/bits/long-double.h+4-3
......@@ -1,5 +1,5 @@
11/* Properties of long double type.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* This header is included by <sys/cdefs.h>.
2020
......@@ -36,4 +36,5 @@
3636 ABI-compatible with double. */
3737#ifndef __NO_LONG_DOUBLE_MATH
3838# define __NO_LONG_DOUBLE_MATH 1
39#endif
\ No newline at end of file
39#endif
40#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file
lib/libc/include/arm-linux-gnueabi/bits/procfs-id.h+2-2
......@@ -1,5 +1,5 @@
11/* Types of pr_uid and pr_gid in struct elf_prpsinfo. Arm version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _SYS_PROCFS_H
2121# error "Never include <bits/procfs-id.h> directly; use <sys/procfs.h> instead."
lib/libc/include/arm-linux-gnueabi/bits/procfs.h+2-2
......@@ -1,5 +1,5 @@
11/* Types for registers for sys/procfs.h. Arm version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_PROCFS_H
2020# error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead."
lib/libc/include/arm-linux-gnueabi/bits/pthreadtypes-arch.h deleted-71
......@@ -1,71 +0,0 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
17
18#ifndef _BITS_PTHREADTYPES_ARCH_H
19#define _BITS_PTHREADTYPES_ARCH_H 1
20
21#include <endian.h>
22
23#define __SIZEOF_PTHREAD_ATTR_T 36
24#define __SIZEOF_PTHREAD_MUTEX_T 24
25#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
26#define __SIZEOF_PTHREAD_COND_T 48
27#define __SIZEOF_PTHREAD_CONDATTR_T 4
28#define __SIZEOF_PTHREAD_RWLOCK_T 32
29#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
30#define __SIZEOF_PTHREAD_BARRIER_T 20
31#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
32
33/* Data structure for mutex handling. */
34#define __PTHREAD_COMPAT_PADDING_MID
35#define __PTHREAD_COMPAT_PADDING_END
36#define __PTHREAD_MUTEX_LOCK_ELISION 0
37#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 1
38#define __PTHREAD_MUTEX_USE_UNION 1
39
40#define __LOCK_ALIGNMENT
41#define __ONCE_ALIGNMENT
42
43struct __pthread_rwlock_arch_t
44{
45 unsigned int __readers;
46 unsigned int __writers;
47 unsigned int __wrphase_futex;
48 unsigned int __writers_futex;
49 unsigned int __pad3;
50 unsigned int __pad4;
51#if __BYTE_ORDER == __BIG_ENDIAN
52 unsigned char __pad1;
53 unsigned char __pad2;
54 unsigned char __shared;
55 /* FLAGS must stay at this position in the structure to maintain
56 binary compatibility. */
57 unsigned char __flags;
58#else
59 /* FLAGS must stay at this position in the structure to maintain
60 binary compatibility. */
61 unsigned char __flags;
62 unsigned char __shared;
63 unsigned char __pad1;
64 unsigned char __pad2;
65#endif
66 int __cur_writer;
67};
68
69#define __PTHREAD_RWLOCK_ELISION_EXTRA 0
70
71#endif /* bits/pthreadtypes.h */
\ No newline at end of file
lib/libc/include/arm-linux-gnueabi/bits/semaphore.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SEMAPHORE_H
1919# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
lib/libc/include/arm-linux-gnueabi/bits/setjmp.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2004-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2004-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/* Define the machine-dependent type `jmp_buf'. ARM EABI version. */
1919
lib/libc/include/arm-linux-gnueabi/bits/shmlba.h+2-2
......@@ -1,5 +1,5 @@
11/* Define SHMLBA. ARM version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SHM_H
2020# error "Never use <bits/shmlba.h> directly; include <sys/shm.h> instead."
lib/libc/include/arm-linux-gnueabi/bits/stat.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#if !defined _SYS_STAT_H && !defined _FCNTL_H
1919# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
lib/libc/include/arm-linux-gnueabi/bits/struct_rwlock.h created+61
......@@ -0,0 +1,61 @@
1/* Default read-write lock implementation struct definitions.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19#ifndef __RWLOCK_INTERNAL_H
20#define __RWLOCK_INTERNAL_H
21
22#include <bits/endian.h>
23
24/* Generic struct for both POSIX read-write lock. New ports are expected
25 to use the default layout, however archictetures can redefine it to add
26 arch-specific extensions (such as lock-elision). The struct have a size
27 of 32 bytes on both LP32 and LP64 architectures. */
28
29struct __pthread_rwlock_arch_t
30{
31 unsigned int __readers;
32 unsigned int __writers;
33 unsigned int __wrphase_futex;
34 unsigned int __writers_futex;
35 unsigned int __pad3;
36 unsigned int __pad4;
37 /* FLAGS must stay at its position in the structure to maintain
38 binary compatibility. */
39#if __BYTE_ORDER == __BIG_ENDIAN
40 unsigned char __pad1;
41 unsigned char __pad2;
42 unsigned char __shared;
43 unsigned char __flags;
44#else
45 unsigned char __flags;
46 unsigned char __shared;
47 unsigned char __pad1;
48 unsigned char __pad2;
49#endif
50 int __cur_writer;
51};
52
53#if __BYTE_ORDER == __BIG_ENDIAN
54# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
55 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags, 0
56#else
57# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
58 0, 0, 0, 0, 0, 0, __flags, 0, 0, 0, 0
59#endif
60
61#endif
\ No newline at end of file
lib/libc/include/arm-linux-gnueabi/bits/wordsize.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#define __WORDSIZE 32
1919#define __WORDSIZE_TIME64_COMPAT32 0
lib/libc/include/arm-linux-gnueabi/fpu_control.h+2-2
......@@ -1,5 +1,5 @@
11/* FPU control word definitions. ARM VFP version.
2 Copyright (C) 2004-2019 Free Software Foundation, Inc.
2 Copyright (C) 2004-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _FPU_CONTROL_H
2020#define _FPU_CONTROL_H
lib/libc/include/arm-linux-gnueabi/sys/ptrace.h+6-2
......@@ -1,5 +1,5 @@
11/* `ptrace' debugger support interface. Linux/ARM version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -196,8 +196,12 @@ enum __ptrace_request
196196#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER
197197
198198 /* Get seccomp BPF filter metadata. */
199 PTRACE_SECCOMP_GET_METADATA = 0x420d
199 PTRACE_SECCOMP_GET_METADATA = 0x420d,
200200#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
201
202 /* Get information about system call. */
203 PTRACE_GET_SYSCALL_INFO = 0x420e
204#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
201205};
202206
203207
lib/libc/include/arm-linux-gnueabi/sys/ucontext.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/* System V/ARM ABI compliant context switching support. */
1919
lib/libc/include/arm-linux-gnueabi/sys/user.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_USER_H
1919#define _SYS_USER_H 1
lib/libc/include/arm-linux-gnueabihf/bits/endian.h deleted-10
......@@ -1,10 +0,0 @@
1#ifndef _ENDIAN_H
2# error "Never use <bits/endian.h> directly; include <endian.h> instead."
3#endif
4
5/* ARM can be either big or little endian. */
6#ifdef __ARMEB__
7#define __BYTE_ORDER __BIG_ENDIAN
8#else
9#define __BYTE_ORDER __LITTLE_ENDIAN
10#endif
\ No newline at end of file
lib/libc/include/arm-linux-gnueabihf/bits/endianness.h created+15
......@@ -0,0 +1,15 @@
1#ifndef _BITS_ENDIANNESS_H
2#define _BITS_ENDIANNESS_H 1
3
4#ifndef _BITS_ENDIAN_H
5# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
6#endif
7
8/* ARM has selectable endianness. */
9#ifdef __ARMEB__
10#define __BYTE_ORDER __BIG_ENDIAN
11#else
12#define __BYTE_ORDER __LITTLE_ENDIAN
13#endif
14
15#endif /* bits/endianness.h */
\ No newline at end of file
lib/libc/include/arm-linux-gnueabihf/bits/fcntl.h+2-2
......@@ -1,5 +1,5 @@
11/* O_*, F_*, FD_* bit values for Linux.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _FCNTL_H
2020# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
lib/libc/include/arm-linux-gnueabihf/bits/fenv.h+3-3
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2004-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2004-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _FENV_H
1919# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
......@@ -81,7 +81,7 @@ fenv_t;
8181# define FE_NOMASK_ENV ((const fenv_t *) -2)
8282#endif
8383
84#if __GLIBC_USE (IEC_60559_BFP_EXT)
84#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
8585/* Type representing floating-point control modes. */
8686typedef unsigned int femode_t;
8787
lib/libc/include/arm-linux-gnueabihf/bits/floatn.h+2-2
......@@ -1,5 +1,5 @@
11/* Macros to control TS 18661-3 glibc features.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* Defined to 1 if the current compiler invocation provides a
2020 floating-point type with the IEEE 754 binary128 format, and this glibc
lib/libc/include/arm-linux-gnueabihf/bits/hwcap.h+2-2
......@@ -1,5 +1,5 @@
11/* Defines for bits in AT_HWCAP. ARM Linux version.
2 Copyright (C) 2012-2019 Free Software Foundation, Inc.
2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#if !defined (_SYS_AUXV_H) && !defined (_LINUX_ARM_SYSDEP_H)
2020# error "Never include <bits/hwcap.h> directly; use <sys/auxv.h> instead."
lib/libc/include/arm-linux-gnueabihf/bits/link.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _LINK_H
1919# error "Never include <bits/link.h> directly; use <link.h> instead."
lib/libc/include/arm-linux-gnueabihf/bits/long-double.h+4-3
......@@ -1,5 +1,5 @@
11/* Properties of long double type.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* This header is included by <sys/cdefs.h>.
2020
......@@ -36,4 +36,5 @@
3636 ABI-compatible with double. */
3737#ifndef __NO_LONG_DOUBLE_MATH
3838# define __NO_LONG_DOUBLE_MATH 1
39#endif
\ No newline at end of file
39#endif
40#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file
lib/libc/include/arm-linux-gnueabihf/bits/procfs-id.h+2-2
......@@ -1,5 +1,5 @@
11/* Types of pr_uid and pr_gid in struct elf_prpsinfo. Arm version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _SYS_PROCFS_H
2121# error "Never include <bits/procfs-id.h> directly; use <sys/procfs.h> instead."
lib/libc/include/arm-linux-gnueabihf/bits/procfs.h+2-2
......@@ -1,5 +1,5 @@
11/* Types for registers for sys/procfs.h. Arm version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_PROCFS_H
2020# error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead."
lib/libc/include/arm-linux-gnueabihf/bits/pthreadtypes-arch.h deleted-71
......@@ -1,71 +0,0 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
17
18#ifndef _BITS_PTHREADTYPES_ARCH_H
19#define _BITS_PTHREADTYPES_ARCH_H 1
20
21#include <endian.h>
22
23#define __SIZEOF_PTHREAD_ATTR_T 36
24#define __SIZEOF_PTHREAD_MUTEX_T 24
25#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
26#define __SIZEOF_PTHREAD_COND_T 48
27#define __SIZEOF_PTHREAD_CONDATTR_T 4
28#define __SIZEOF_PTHREAD_RWLOCK_T 32
29#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
30#define __SIZEOF_PTHREAD_BARRIER_T 20
31#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
32
33/* Data structure for mutex handling. */
34#define __PTHREAD_COMPAT_PADDING_MID
35#define __PTHREAD_COMPAT_PADDING_END
36#define __PTHREAD_MUTEX_LOCK_ELISION 0
37#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 1
38#define __PTHREAD_MUTEX_USE_UNION 1
39
40#define __LOCK_ALIGNMENT
41#define __ONCE_ALIGNMENT
42
43struct __pthread_rwlock_arch_t
44{
45 unsigned int __readers;
46 unsigned int __writers;
47 unsigned int __wrphase_futex;
48 unsigned int __writers_futex;
49 unsigned int __pad3;
50 unsigned int __pad4;
51#if __BYTE_ORDER == __BIG_ENDIAN
52 unsigned char __pad1;
53 unsigned char __pad2;
54 unsigned char __shared;
55 /* FLAGS must stay at this position in the structure to maintain
56 binary compatibility. */
57 unsigned char __flags;
58#else
59 /* FLAGS must stay at this position in the structure to maintain
60 binary compatibility. */
61 unsigned char __flags;
62 unsigned char __shared;
63 unsigned char __pad1;
64 unsigned char __pad2;
65#endif
66 int __cur_writer;
67};
68
69#define __PTHREAD_RWLOCK_ELISION_EXTRA 0
70
71#endif /* bits/pthreadtypes.h */
\ No newline at end of file
lib/libc/include/arm-linux-gnueabihf/bits/semaphore.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SEMAPHORE_H
1919# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
lib/libc/include/arm-linux-gnueabihf/bits/setjmp.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2004-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2004-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/* Define the machine-dependent type `jmp_buf'. ARM EABI version. */
1919
lib/libc/include/arm-linux-gnueabihf/bits/shmlba.h+2-2
......@@ -1,5 +1,5 @@
11/* Define SHMLBA. ARM version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SHM_H
2020# error "Never use <bits/shmlba.h> directly; include <sys/shm.h> instead."
lib/libc/include/arm-linux-gnueabihf/bits/stat.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#if !defined _SYS_STAT_H && !defined _FCNTL_H
1919# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
lib/libc/include/arm-linux-gnueabihf/bits/struct_rwlock.h created+61
......@@ -0,0 +1,61 @@
1/* Default read-write lock implementation struct definitions.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19#ifndef __RWLOCK_INTERNAL_H
20#define __RWLOCK_INTERNAL_H
21
22#include <bits/endian.h>
23
24/* Generic struct for both POSIX read-write lock. New ports are expected
25 to use the default layout, however archictetures can redefine it to add
26 arch-specific extensions (such as lock-elision). The struct have a size
27 of 32 bytes on both LP32 and LP64 architectures. */
28
29struct __pthread_rwlock_arch_t
30{
31 unsigned int __readers;
32 unsigned int __writers;
33 unsigned int __wrphase_futex;
34 unsigned int __writers_futex;
35 unsigned int __pad3;
36 unsigned int __pad4;
37 /* FLAGS must stay at its position in the structure to maintain
38 binary compatibility. */
39#if __BYTE_ORDER == __BIG_ENDIAN
40 unsigned char __pad1;
41 unsigned char __pad2;
42 unsigned char __shared;
43 unsigned char __flags;
44#else
45 unsigned char __flags;
46 unsigned char __shared;
47 unsigned char __pad1;
48 unsigned char __pad2;
49#endif
50 int __cur_writer;
51};
52
53#if __BYTE_ORDER == __BIG_ENDIAN
54# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
55 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags, 0
56#else
57# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
58 0, 0, 0, 0, 0, 0, __flags, 0, 0, 0, 0
59#endif
60
61#endif
\ No newline at end of file
lib/libc/include/arm-linux-gnueabihf/bits/wordsize.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#define __WORDSIZE 32
1919#define __WORDSIZE_TIME64_COMPAT32 0
lib/libc/include/arm-linux-gnueabihf/fpu_control.h+2-2
......@@ -1,5 +1,5 @@
11/* FPU control word definitions. ARM VFP version.
2 Copyright (C) 2004-2019 Free Software Foundation, Inc.
2 Copyright (C) 2004-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _FPU_CONTROL_H
2020#define _FPU_CONTROL_H
lib/libc/include/arm-linux-gnueabihf/sys/ptrace.h+6-2
......@@ -1,5 +1,5 @@
11/* `ptrace' debugger support interface. Linux/ARM version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -196,8 +196,12 @@ enum __ptrace_request
196196#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER
197197
198198 /* Get seccomp BPF filter metadata. */
199 PTRACE_SECCOMP_GET_METADATA = 0x420d
199 PTRACE_SECCOMP_GET_METADATA = 0x420d,
200200#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
201
202 /* Get information about system call. */
203 PTRACE_GET_SYSCALL_INFO = 0x420e
204#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
201205};
202206
203207
lib/libc/include/arm-linux-gnueabihf/sys/ucontext.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/* System V/ARM ABI compliant context switching support. */
1919
lib/libc/include/arm-linux-gnueabihf/sys/user.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_USER_H
1919#define _SYS_USER_H 1
lib/libc/include/armeb-linux-gnueabi/bits/endian.h deleted-10
......@@ -1,10 +0,0 @@
1#ifndef _ENDIAN_H
2# error "Never use <bits/endian.h> directly; include <endian.h> instead."
3#endif
4
5/* ARM can be either big or little endian. */
6#ifdef __ARMEB__
7#define __BYTE_ORDER __BIG_ENDIAN
8#else
9#define __BYTE_ORDER __LITTLE_ENDIAN
10#endif
\ No newline at end of file
lib/libc/include/armeb-linux-gnueabi/bits/endianness.h created+15
......@@ -0,0 +1,15 @@
1#ifndef _BITS_ENDIANNESS_H
2#define _BITS_ENDIANNESS_H 1
3
4#ifndef _BITS_ENDIAN_H
5# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
6#endif
7
8/* ARM has selectable endianness. */
9#ifdef __ARMEB__
10#define __BYTE_ORDER __BIG_ENDIAN
11#else
12#define __BYTE_ORDER __LITTLE_ENDIAN
13#endif
14
15#endif /* bits/endianness.h */
\ No newline at end of file
lib/libc/include/armeb-linux-gnueabi/bits/fcntl.h+2-2
......@@ -1,5 +1,5 @@
11/* O_*, F_*, FD_* bit values for Linux.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _FCNTL_H
2020# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
lib/libc/include/armeb-linux-gnueabi/bits/fenv.h+3-3
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2004-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2004-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _FENV_H
1919# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
......@@ -81,7 +81,7 @@ fenv_t;
8181# define FE_NOMASK_ENV ((const fenv_t *) -2)
8282#endif
8383
84#if __GLIBC_USE (IEC_60559_BFP_EXT)
84#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
8585/* Type representing floating-point control modes. */
8686typedef unsigned int femode_t;
8787
lib/libc/include/armeb-linux-gnueabi/bits/floatn.h+2-2
......@@ -1,5 +1,5 @@
11/* Macros to control TS 18661-3 glibc features.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* Defined to 1 if the current compiler invocation provides a
2020 floating-point type with the IEEE 754 binary128 format, and this glibc
lib/libc/include/armeb-linux-gnueabi/bits/hwcap.h+2-2
......@@ -1,5 +1,5 @@
11/* Defines for bits in AT_HWCAP. ARM Linux version.
2 Copyright (C) 2012-2019 Free Software Foundation, Inc.
2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#if !defined (_SYS_AUXV_H) && !defined (_LINUX_ARM_SYSDEP_H)
2020# error "Never include <bits/hwcap.h> directly; use <sys/auxv.h> instead."
lib/libc/include/armeb-linux-gnueabi/bits/link.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _LINK_H
1919# error "Never include <bits/link.h> directly; use <link.h> instead."
lib/libc/include/armeb-linux-gnueabi/bits/long-double.h+4-3
......@@ -1,5 +1,5 @@
11/* Properties of long double type.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* This header is included by <sys/cdefs.h>.
2020
......@@ -36,4 +36,5 @@
3636 ABI-compatible with double. */
3737#ifndef __NO_LONG_DOUBLE_MATH
3838# define __NO_LONG_DOUBLE_MATH 1
39#endif
\ No newline at end of file
39#endif
40#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file
lib/libc/include/armeb-linux-gnueabi/bits/procfs-id.h+2-2
......@@ -1,5 +1,5 @@
11/* Types of pr_uid and pr_gid in struct elf_prpsinfo. Arm version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _SYS_PROCFS_H
2121# error "Never include <bits/procfs-id.h> directly; use <sys/procfs.h> instead."
lib/libc/include/armeb-linux-gnueabi/bits/procfs.h+2-2
......@@ -1,5 +1,5 @@
11/* Types for registers for sys/procfs.h. Arm version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_PROCFS_H
2020# error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead."
lib/libc/include/armeb-linux-gnueabi/bits/pthreadtypes-arch.h deleted-71
......@@ -1,71 +0,0 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
17
18#ifndef _BITS_PTHREADTYPES_ARCH_H
19#define _BITS_PTHREADTYPES_ARCH_H 1
20
21#include <endian.h>
22
23#define __SIZEOF_PTHREAD_ATTR_T 36
24#define __SIZEOF_PTHREAD_MUTEX_T 24
25#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
26#define __SIZEOF_PTHREAD_COND_T 48
27#define __SIZEOF_PTHREAD_CONDATTR_T 4
28#define __SIZEOF_PTHREAD_RWLOCK_T 32
29#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
30#define __SIZEOF_PTHREAD_BARRIER_T 20
31#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
32
33/* Data structure for mutex handling. */
34#define __PTHREAD_COMPAT_PADDING_MID
35#define __PTHREAD_COMPAT_PADDING_END
36#define __PTHREAD_MUTEX_LOCK_ELISION 0
37#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 1
38#define __PTHREAD_MUTEX_USE_UNION 1
39
40#define __LOCK_ALIGNMENT
41#define __ONCE_ALIGNMENT
42
43struct __pthread_rwlock_arch_t
44{
45 unsigned int __readers;
46 unsigned int __writers;
47 unsigned int __wrphase_futex;
48 unsigned int __writers_futex;
49 unsigned int __pad3;
50 unsigned int __pad4;
51#if __BYTE_ORDER == __BIG_ENDIAN
52 unsigned char __pad1;
53 unsigned char __pad2;
54 unsigned char __shared;
55 /* FLAGS must stay at this position in the structure to maintain
56 binary compatibility. */
57 unsigned char __flags;
58#else
59 /* FLAGS must stay at this position in the structure to maintain
60 binary compatibility. */
61 unsigned char __flags;
62 unsigned char __shared;
63 unsigned char __pad1;
64 unsigned char __pad2;
65#endif
66 int __cur_writer;
67};
68
69#define __PTHREAD_RWLOCK_ELISION_EXTRA 0
70
71#endif /* bits/pthreadtypes.h */
\ No newline at end of file
lib/libc/include/armeb-linux-gnueabi/bits/semaphore.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SEMAPHORE_H
1919# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
lib/libc/include/armeb-linux-gnueabi/bits/setjmp.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2004-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2004-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/* Define the machine-dependent type `jmp_buf'. ARM EABI version. */
1919
lib/libc/include/armeb-linux-gnueabi/bits/shmlba.h+2-2
......@@ -1,5 +1,5 @@
11/* Define SHMLBA. ARM version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SHM_H
2020# error "Never use <bits/shmlba.h> directly; include <sys/shm.h> instead."
lib/libc/include/armeb-linux-gnueabi/bits/stat.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#if !defined _SYS_STAT_H && !defined _FCNTL_H
1919# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
lib/libc/include/armeb-linux-gnueabi/bits/struct_rwlock.h created+61
......@@ -0,0 +1,61 @@
1/* Default read-write lock implementation struct definitions.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19#ifndef __RWLOCK_INTERNAL_H
20#define __RWLOCK_INTERNAL_H
21
22#include <bits/endian.h>
23
24/* Generic struct for both POSIX read-write lock. New ports are expected
25 to use the default layout, however archictetures can redefine it to add
26 arch-specific extensions (such as lock-elision). The struct have a size
27 of 32 bytes on both LP32 and LP64 architectures. */
28
29struct __pthread_rwlock_arch_t
30{
31 unsigned int __readers;
32 unsigned int __writers;
33 unsigned int __wrphase_futex;
34 unsigned int __writers_futex;
35 unsigned int __pad3;
36 unsigned int __pad4;
37 /* FLAGS must stay at its position in the structure to maintain
38 binary compatibility. */
39#if __BYTE_ORDER == __BIG_ENDIAN
40 unsigned char __pad1;
41 unsigned char __pad2;
42 unsigned char __shared;
43 unsigned char __flags;
44#else
45 unsigned char __flags;
46 unsigned char __shared;
47 unsigned char __pad1;
48 unsigned char __pad2;
49#endif
50 int __cur_writer;
51};
52
53#if __BYTE_ORDER == __BIG_ENDIAN
54# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
55 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags, 0
56#else
57# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
58 0, 0, 0, 0, 0, 0, __flags, 0, 0, 0, 0
59#endif
60
61#endif
\ No newline at end of file
lib/libc/include/armeb-linux-gnueabi/bits/wordsize.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#define __WORDSIZE 32
1919#define __WORDSIZE_TIME64_COMPAT32 0
lib/libc/include/armeb-linux-gnueabi/fpu_control.h+2-2
......@@ -1,5 +1,5 @@
11/* FPU control word definitions. ARM VFP version.
2 Copyright (C) 2004-2019 Free Software Foundation, Inc.
2 Copyright (C) 2004-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _FPU_CONTROL_H
2020#define _FPU_CONTROL_H
lib/libc/include/armeb-linux-gnueabi/sys/ptrace.h+6-2
......@@ -1,5 +1,5 @@
11/* `ptrace' debugger support interface. Linux/ARM version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -196,8 +196,12 @@ enum __ptrace_request
196196#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER
197197
198198 /* Get seccomp BPF filter metadata. */
199 PTRACE_SECCOMP_GET_METADATA = 0x420d
199 PTRACE_SECCOMP_GET_METADATA = 0x420d,
200200#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
201
202 /* Get information about system call. */
203 PTRACE_GET_SYSCALL_INFO = 0x420e
204#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
201205};
202206
203207
lib/libc/include/armeb-linux-gnueabi/sys/ucontext.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/* System V/ARM ABI compliant context switching support. */
1919
lib/libc/include/armeb-linux-gnueabi/sys/user.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_USER_H
1919#define _SYS_USER_H 1
lib/libc/include/armeb-linux-gnueabihf/bits/endian.h deleted-10
......@@ -1,10 +0,0 @@
1#ifndef _ENDIAN_H
2# error "Never use <bits/endian.h> directly; include <endian.h> instead."
3#endif
4
5/* ARM can be either big or little endian. */
6#ifdef __ARMEB__
7#define __BYTE_ORDER __BIG_ENDIAN
8#else
9#define __BYTE_ORDER __LITTLE_ENDIAN
10#endif
\ No newline at end of file
lib/libc/include/armeb-linux-gnueabihf/bits/endianness.h created+15
......@@ -0,0 +1,15 @@
1#ifndef _BITS_ENDIANNESS_H
2#define _BITS_ENDIANNESS_H 1
3
4#ifndef _BITS_ENDIAN_H
5# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
6#endif
7
8/* ARM has selectable endianness. */
9#ifdef __ARMEB__
10#define __BYTE_ORDER __BIG_ENDIAN
11#else
12#define __BYTE_ORDER __LITTLE_ENDIAN
13#endif
14
15#endif /* bits/endianness.h */
\ No newline at end of file
lib/libc/include/armeb-linux-gnueabihf/bits/fcntl.h+2-2
......@@ -1,5 +1,5 @@
11/* O_*, F_*, FD_* bit values for Linux.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _FCNTL_H
2020# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
lib/libc/include/armeb-linux-gnueabihf/bits/fenv.h+3-3
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2004-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2004-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _FENV_H
1919# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
......@@ -81,7 +81,7 @@ fenv_t;
8181# define FE_NOMASK_ENV ((const fenv_t *) -2)
8282#endif
8383
84#if __GLIBC_USE (IEC_60559_BFP_EXT)
84#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
8585/* Type representing floating-point control modes. */
8686typedef unsigned int femode_t;
8787
lib/libc/include/armeb-linux-gnueabihf/bits/floatn.h+2-2
......@@ -1,5 +1,5 @@
11/* Macros to control TS 18661-3 glibc features.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* Defined to 1 if the current compiler invocation provides a
2020 floating-point type with the IEEE 754 binary128 format, and this glibc
lib/libc/include/armeb-linux-gnueabihf/bits/hwcap.h+2-2
......@@ -1,5 +1,5 @@
11/* Defines for bits in AT_HWCAP. ARM Linux version.
2 Copyright (C) 2012-2019 Free Software Foundation, Inc.
2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#if !defined (_SYS_AUXV_H) && !defined (_LINUX_ARM_SYSDEP_H)
2020# error "Never include <bits/hwcap.h> directly; use <sys/auxv.h> instead."
lib/libc/include/armeb-linux-gnueabihf/bits/link.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _LINK_H
1919# error "Never include <bits/link.h> directly; use <link.h> instead."
lib/libc/include/armeb-linux-gnueabihf/bits/long-double.h+4-3
......@@ -1,5 +1,5 @@
11/* Properties of long double type.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* This header is included by <sys/cdefs.h>.
2020
......@@ -36,4 +36,5 @@
3636 ABI-compatible with double. */
3737#ifndef __NO_LONG_DOUBLE_MATH
3838# define __NO_LONG_DOUBLE_MATH 1
39#endif
\ No newline at end of file
39#endif
40#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file
lib/libc/include/armeb-linux-gnueabihf/bits/procfs-id.h+2-2
......@@ -1,5 +1,5 @@
11/* Types of pr_uid and pr_gid in struct elf_prpsinfo. Arm version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _SYS_PROCFS_H
2121# error "Never include <bits/procfs-id.h> directly; use <sys/procfs.h> instead."
lib/libc/include/armeb-linux-gnueabihf/bits/procfs.h+2-2
......@@ -1,5 +1,5 @@
11/* Types for registers for sys/procfs.h. Arm version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_PROCFS_H
2020# error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead."
lib/libc/include/armeb-linux-gnueabihf/bits/pthreadtypes-arch.h deleted-71
......@@ -1,71 +0,0 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
17
18#ifndef _BITS_PTHREADTYPES_ARCH_H
19#define _BITS_PTHREADTYPES_ARCH_H 1
20
21#include <endian.h>
22
23#define __SIZEOF_PTHREAD_ATTR_T 36
24#define __SIZEOF_PTHREAD_MUTEX_T 24
25#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
26#define __SIZEOF_PTHREAD_COND_T 48
27#define __SIZEOF_PTHREAD_CONDATTR_T 4
28#define __SIZEOF_PTHREAD_RWLOCK_T 32
29#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
30#define __SIZEOF_PTHREAD_BARRIER_T 20
31#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
32
33/* Data structure for mutex handling. */
34#define __PTHREAD_COMPAT_PADDING_MID
35#define __PTHREAD_COMPAT_PADDING_END
36#define __PTHREAD_MUTEX_LOCK_ELISION 0
37#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 1
38#define __PTHREAD_MUTEX_USE_UNION 1
39
40#define __LOCK_ALIGNMENT
41#define __ONCE_ALIGNMENT
42
43struct __pthread_rwlock_arch_t
44{
45 unsigned int __readers;
46 unsigned int __writers;
47 unsigned int __wrphase_futex;
48 unsigned int __writers_futex;
49 unsigned int __pad3;
50 unsigned int __pad4;
51#if __BYTE_ORDER == __BIG_ENDIAN
52 unsigned char __pad1;
53 unsigned char __pad2;
54 unsigned char __shared;
55 /* FLAGS must stay at this position in the structure to maintain
56 binary compatibility. */
57 unsigned char __flags;
58#else
59 /* FLAGS must stay at this position in the structure to maintain
60 binary compatibility. */
61 unsigned char __flags;
62 unsigned char __shared;
63 unsigned char __pad1;
64 unsigned char __pad2;
65#endif
66 int __cur_writer;
67};
68
69#define __PTHREAD_RWLOCK_ELISION_EXTRA 0
70
71#endif /* bits/pthreadtypes.h */
\ No newline at end of file
lib/libc/include/armeb-linux-gnueabihf/bits/semaphore.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SEMAPHORE_H
1919# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
lib/libc/include/armeb-linux-gnueabihf/bits/setjmp.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2004-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2004-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/* Define the machine-dependent type `jmp_buf'. ARM EABI version. */
1919
lib/libc/include/armeb-linux-gnueabihf/bits/shmlba.h+2-2
......@@ -1,5 +1,5 @@
11/* Define SHMLBA. ARM version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SHM_H
2020# error "Never use <bits/shmlba.h> directly; include <sys/shm.h> instead."
lib/libc/include/armeb-linux-gnueabihf/bits/stat.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#if !defined _SYS_STAT_H && !defined _FCNTL_H
1919# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
lib/libc/include/armeb-linux-gnueabihf/bits/struct_rwlock.h created+61
......@@ -0,0 +1,61 @@
1/* Default read-write lock implementation struct definitions.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19#ifndef __RWLOCK_INTERNAL_H
20#define __RWLOCK_INTERNAL_H
21
22#include <bits/endian.h>
23
24/* Generic struct for both POSIX read-write lock. New ports are expected
25 to use the default layout, however archictetures can redefine it to add
26 arch-specific extensions (such as lock-elision). The struct have a size
27 of 32 bytes on both LP32 and LP64 architectures. */
28
29struct __pthread_rwlock_arch_t
30{
31 unsigned int __readers;
32 unsigned int __writers;
33 unsigned int __wrphase_futex;
34 unsigned int __writers_futex;
35 unsigned int __pad3;
36 unsigned int __pad4;
37 /* FLAGS must stay at its position in the structure to maintain
38 binary compatibility. */
39#if __BYTE_ORDER == __BIG_ENDIAN
40 unsigned char __pad1;
41 unsigned char __pad2;
42 unsigned char __shared;
43 unsigned char __flags;
44#else
45 unsigned char __flags;
46 unsigned char __shared;
47 unsigned char __pad1;
48 unsigned char __pad2;
49#endif
50 int __cur_writer;
51};
52
53#if __BYTE_ORDER == __BIG_ENDIAN
54# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
55 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags, 0
56#else
57# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
58 0, 0, 0, 0, 0, 0, __flags, 0, 0, 0, 0
59#endif
60
61#endif
\ No newline at end of file
lib/libc/include/armeb-linux-gnueabihf/bits/wordsize.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#define __WORDSIZE 32
1919#define __WORDSIZE_TIME64_COMPAT32 0
lib/libc/include/armeb-linux-gnueabihf/fpu_control.h+2-2
......@@ -1,5 +1,5 @@
11/* FPU control word definitions. ARM VFP version.
2 Copyright (C) 2004-2019 Free Software Foundation, Inc.
2 Copyright (C) 2004-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _FPU_CONTROL_H
2020#define _FPU_CONTROL_H
lib/libc/include/armeb-linux-gnueabihf/sys/ptrace.h+6-2
......@@ -1,5 +1,5 @@
11/* `ptrace' debugger support interface. Linux/ARM version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -196,8 +196,12 @@ enum __ptrace_request
196196#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER
197197
198198 /* Get seccomp BPF filter metadata. */
199 PTRACE_SECCOMP_GET_METADATA = 0x420d
199 PTRACE_SECCOMP_GET_METADATA = 0x420d,
200200#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
201
202 /* Get information about system call. */
203 PTRACE_GET_SYSCALL_INFO = 0x420e
204#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
201205};
202206
203207
lib/libc/include/armeb-linux-gnueabihf/sys/ucontext.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/* System V/ARM ABI compliant context switching support. */
1919
lib/libc/include/armeb-linux-gnueabihf/sys/user.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_USER_H
1919#define _SYS_USER_H 1
lib/libc/include/generic-glibc/aio.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * ISO/IEC 9945-1:1996 6.7: Asynchronous Input and Output
lib/libc/include/generic-glibc/aliases.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _ALIASES_H
1919#define _ALIASES_H 1
lib/libc/include/generic-glibc/alloca.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _ALLOCA_H
1919#define _ALLOCA_H 1
lib/libc/include/generic-glibc/ar.h+2-2
......@@ -1,5 +1,5 @@
11/* Header describing `ar' archive file format.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _AR_H
2020#define _AR_H 1
lib/libc/include/generic-glibc/argp.h+2-2
......@@ -1,5 +1,5 @@
11/* Hierarchial argument parsing, layered over getopt.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44 Written by Miles Bader <miles@gnu.ai.mit.edu>.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _ARGP_H
2121#define _ARGP_H
lib/libc/include/generic-glibc/argz.h+2-2
......@@ -1,5 +1,5 @@
11/* Routines for dealing with '\0' separated arg vectors.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _ARGZ_H
2020#define _ARGZ_H 1
lib/libc/include/generic-glibc/arpa/inet.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _ARPA_INET_H
1919#define _ARPA_INET_H 1
lib/libc/include/generic-glibc/assert.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * ISO C99 Standard: 7.2 Diagnostics <assert.h>
lib/libc/include/generic-glibc/bits/argp-ldbl.h+2-2
......@@ -1,5 +1,5 @@
11/* Redirections for argp functions for -mlong-double-64.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _ARGP_H
2020# error "Never include <bits/argp-ldbl.h> directly; use <argp.h> instead."
lib/libc/include/generic-glibc/bits/byteswap.h+2-2
......@@ -1,5 +1,5 @@
11/* Macros and inline functions to swap the order of bytes in integer values.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#if !defined _BYTESWAP_H && !defined _NETINET_IN_H && !defined _ENDIAN_H
2020# error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead."
lib/libc/include/generic-glibc/bits/cmathcalls.h+2-2
......@@ -1,6 +1,6 @@
11/* Prototype declarations for complex math functions;
22 helper file for <complex.h>.
3 Copyright (C) 1997-2019 Free Software Foundation, Inc.
3 Copyright (C) 1997-2020 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020/* NOTE: Because of the special way this file is used by <complex.h>, this
2121 file must NOT be protected from multiple inclusion as header files
lib/libc/include/generic-glibc/bits/confname.h+2-2
......@@ -1,5 +1,5 @@
11/* `sysconf', `pathconf', and `confstr' NAME values. Generic version.
2 Copyright (C) 1993-2019 Free Software Foundation, Inc.
2 Copyright (C) 1993-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _UNISTD_H
2020# error "Never use <bits/confname.h> directly; include <unistd.h> instead."
lib/libc/include/generic-glibc/bits/cpu-set.h+2-2
......@@ -1,6 +1,6 @@
11/* Definition of the cpu_set_t structure used by the POSIX 1003.1b-1993
22 scheduling interface.
3 Copyright (C) 1996-2019 Free Software Foundation, Inc.
3 Copyright (C) 1996-2020 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _BITS_CPU_SET_H
2121#define _BITS_CPU_SET_H 1
lib/libc/include/generic-glibc/bits/dirent.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _DIRENT_H
1919# error "Never use <bits/dirent.h> directly; include <dirent.h> instead."
lib/libc/include/generic-glibc/bits/dirent_ext.h+2-2
......@@ -1,5 +1,5 @@
11/* System-specific extensions of <dirent.h>. Linux version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _DIRENT_H
2020# error "Never include <bits/dirent_ext.h> directly; use <dirent.h> instead."
lib/libc/include/generic-glibc/bits/dlfcn.h+2-2
......@@ -1,5 +1,5 @@
11/* System dependent definitions for run-time dynamic loading.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _DLFCN_H
2020# error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead."
lib/libc/include/generic-glibc/bits/endian.h+45-11
......@@ -1,15 +1,49 @@
1/* The MIPS architecture has selectable endianness.
2 It exists in both little and big endian flavours and we
3 want to be able to share the installed header files between
4 both, so we define __BYTE_ORDER based on GCC's predefines. */
1/* Endian macros for string.h functions
2 Copyright (C) 1992-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
54
6#ifndef _ENDIAN_H
7# error "Never use <bits/endian.h> directly; include <endian.h> instead."
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19#ifndef _BITS_ENDIAN_H
20#define _BITS_ENDIAN_H 1
21
22/* Definitions for byte order, according to significance of bytes,
23 from low addresses to high addresses. The value is what you get by
24 putting '4' in the most significant byte, '3' in the second most
25 significant byte, '2' in the second least significant byte, and '1'
26 in the least significant byte, and then writing down one digit for
27 each byte, starting with the byte at the lowest address at the left,
28 and proceeding to the byte with the highest address at the right. */
29
30#define __LITTLE_ENDIAN 1234
31#define __BIG_ENDIAN 4321
32#define __PDP_ENDIAN 3412
33
34/* This file defines `__BYTE_ORDER' for the particular machine. */
35#include <bits/endianness.h>
36
37/* Some machines may need to use a different endianness for floating point
38 values. */
39#ifndef __FLOAT_WORD_ORDER
40# define __FLOAT_WORD_ORDER __BYTE_ORDER
841#endif
942
10#ifdef __MIPSEB
11# define __BYTE_ORDER __BIG_ENDIAN
43#if __BYTE_ORDER == __LITTLE_ENDIAN
44# define __LONG_LONG_PAIR(HI, LO) LO, HI
45#elif __BYTE_ORDER == __BIG_ENDIAN
46# define __LONG_LONG_PAIR(HI, LO) HI, LO
1247#endif
13#ifdef __MIPSEL
14# define __BYTE_ORDER __LITTLE_ENDIAN
15#endif
\ No newline at end of file
48
49#endif /* bits/endian.h */
\ No newline at end of file
lib/libc/include/generic-glibc/bits/endianness.h created+16
......@@ -0,0 +1,16 @@
1#ifndef _BITS_ENDIANNESS_H
2#define _BITS_ENDIANNESS_H 1
3
4#ifndef _BITS_ENDIAN_H
5# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
6#endif
7
8/* MIPS has selectable endianness. */
9#ifdef __MIPSEB
10# define __BYTE_ORDER __BIG_ENDIAN
11#endif
12#ifdef __MIPSEL
13# define __BYTE_ORDER __LITTLE_ENDIAN
14#endif
15
16#endif /* bits/endianness.h */
\ No newline at end of file
lib/libc/include/generic-glibc/bits/environments.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _UNISTD_H
1919# error "Never include this file directly. Use <unistd.h> instead"
lib/libc/include/generic-glibc/bits/epoll.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_EPOLL_H
1919# error "Never use <bits/epoll.h> directly; include <sys/epoll.h> instead."
lib/libc/include/generic-glibc/bits/err-ldbl.h+2-2
......@@ -1,5 +1,5 @@
11/* Redirections for err.h functions for -mlong-double-64.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _ERR_H
2020# error "Never include <bits/err-ldbl.h> directly; use <err.h> instead."
lib/libc/include/generic-glibc/bits/errno.h+2-2
......@@ -1,5 +1,5 @@
11/* Error constants. Linux specific version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_ERRNO_H
2020#define _BITS_ERRNO_H 1
lib/libc/include/generic-glibc/bits/error-ldbl.h+2-2
......@@ -1,5 +1,5 @@
11/* Redirections for error.h functions for -mlong-double-64.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _ERROR_H
2020# error "Never include <bits/error-ldbl.h> directly; use <error.h> instead."
lib/libc/include/generic-glibc/bits/error.h+2-2
......@@ -1,5 +1,5 @@
11/* Specializations for error functions.
2 Copyright (C) 2007-2019 Free Software Foundation, Inc.
2 Copyright (C) 2007-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _ERROR_H
2020# error "Never include <bits/error.h> directly; use <error.h> instead."
lib/libc/include/generic-glibc/bits/eventfd.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_EVENTFD_H
1919# error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead."
lib/libc/include/generic-glibc/bits/fcntl-linux.h+7-2
......@@ -1,5 +1,5 @@
11/* O_*, F_*, FD_* bit values for Linux.
2 Copyright (C) 2001-2019 Free Software Foundation, Inc.
2 Copyright (C) 2001-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _FCNTL_H
2020# error "Never use <bits/fcntl-linux.h> directly; include <fcntl.h> instead."
......@@ -334,6 +334,11 @@ struct f_owner_ex
334334# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
335335 the range after performing the
336336 write. */
337/* SYNC_FILE_RANGE_WRITE_AND_WAIT ensures all pages in the range are
338 written to disk before returning. */
339# define SYNC_FILE_RANGE_WRITE_AND_WAIT (SYNC_FILE_RANGE_WRITE \
340 | SYNC_FILE_RANGE_WAIT_BEFORE \
341 | SYNC_FILE_RANGE_WAIT_AFTER)
337342
338343/* Flags for SPLICE and VMSPLICE. */
339344# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
lib/libc/include/generic-glibc/bits/fcntl.h+2-2
......@@ -1,5 +1,5 @@
11/* O_*, F_*, FD_* bit values for Linux.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _FCNTL_H
2020# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
lib/libc/include/generic-glibc/bits/fcntl2.h+2-2
......@@ -1,5 +1,5 @@
11/* Checking macros for fcntl functions.
2 Copyright (C) 2007-2019 Free Software Foundation, Inc.
2 Copyright (C) 2007-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _FCNTL_H
2020# error "Never include <bits/fcntl2.h> directly; use <fcntl.h> instead."
lib/libc/include/generic-glibc/bits/fenv.h+3-3
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _FENV_H
1919# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
......@@ -104,7 +104,7 @@ fenv_t;
104104# define FE_NOMASK_ENV ((const fenv_t *) -2)
105105#endif
106106
107#if __GLIBC_USE (IEC_60559_BFP_EXT)
107#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
108108/* Type representing floating-point control modes. */
109109typedef unsigned int femode_t;
110110
lib/libc/include/generic-glibc/bits/floatn-common.h+2-2
......@@ -1,6 +1,6 @@
11/* Macros to control TS 18661-3 glibc features where the same
22 definitions are appropriate for all platforms.
3 Copyright (C) 2017-2019 Free Software Foundation, Inc.
3 Copyright (C) 2017-2020 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _BITS_FLOATN_COMMON_H
2121#define _BITS_FLOATN_COMMON_H
lib/libc/include/generic-glibc/bits/floatn.h+2-2
......@@ -1,5 +1,5 @@
11/* Macros to control TS 18661-3 glibc features on MIPS platforms.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_FLOATN_H
2020#define _BITS_FLOATN_H
lib/libc/include/generic-glibc/bits/flt-eval-method.h+2-2
......@@ -1,5 +1,5 @@
11/* Define __GLIBC_FLT_EVAL_METHOD.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _MATH_H
2020# error "Never use <bits/flt-eval-method.h> directly; include <math.h> instead."
lib/libc/include/generic-glibc/bits/fp-fast.h+2-2
......@@ -1,5 +1,5 @@
11/* Define FP_FAST_* macros.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _MATH_H
2020# error "Never use <bits/fp-fast.h> directly; include <math.h> instead."
lib/libc/include/generic-glibc/bits/fp-logb.h+2-2
......@@ -1,5 +1,5 @@
11/* Define __FP_LOGB0_IS_MIN and __FP_LOGBNAN_IS_MIN.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _MATH_H
2020# error "Never use <bits/fp-logb.h> directly; include <math.h> instead."
lib/libc/include/generic-glibc/bits/getopt_core.h+2-2
......@@ -1,5 +1,5 @@
11/* Declarations for getopt (basic, portable features only).
2 Copyright (C) 1989-2019 Free Software Foundation, Inc.
2 Copyright (C) 1989-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library and is also part of gnulib.
44 Patches to this file should be submitted to both projects.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _GETOPT_CORE_H
2121#define _GETOPT_CORE_H 1
lib/libc/include/generic-glibc/bits/getopt_ext.h+2-2
......@@ -1,5 +1,5 @@
11/* Declarations for getopt (GNU extensions).
2 Copyright (C) 1989-2019 Free Software Foundation, Inc.
2 Copyright (C) 1989-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library and is also part of gnulib.
44 Patches to this file should be submitted to both projects.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _GETOPT_EXT_H
2121#define _GETOPT_EXT_H 1
lib/libc/include/generic-glibc/bits/getopt_posix.h+2-2
......@@ -1,5 +1,5 @@
11/* Declarations for getopt (POSIX compatibility shim).
2 Copyright (C) 1989-2019 Free Software Foundation, Inc.
2 Copyright (C) 1989-2020 Free Software Foundation, Inc.
33 Unlike the bulk of the getopt implementation, this file is NOT part
44 of gnulib.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _GETOPT_POSIX_H
2121#define _GETOPT_POSIX_H 1
lib/libc/include/generic-glibc/bits/hwcap.h+2-2
......@@ -1,5 +1,5 @@
11/* Defines for bits in AT_HWCAP.
2 Copyright (C) 2012-2019 Free Software Foundation, Inc.
2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_AUXV_H
2020# error "Never include <bits/hwcap.h> directly; use <sys/auxv.h> instead."
lib/libc/include/generic-glibc/bits/in.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/* Linux version. */
1919
lib/libc/include/generic-glibc/bits/indirect-return.h+2-2
......@@ -1,5 +1,5 @@
11/* Definition of __INDIRECT_RETURN. Generic version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _UCONTEXT_H
2020# error "Never include <bits/indirect-return.h> directly; use <ucontext.h> instead."
lib/libc/include/generic-glibc/bits/inotify.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_INOTIFY_H
1919# error "Never use <bits/inotify.h> directly; include <sys/inotify.h> instead."
lib/libc/include/generic-glibc/bits/ioctl-types.h+2-2
......@@ -1,5 +1,5 @@
11/* Structure types for pre-termios terminal ioctls. Linux version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_IOCTL_H
2020# error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead."
lib/libc/include/generic-glibc/bits/ioctls.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_IOCTL_H
1919# error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead."
lib/libc/include/generic-glibc/bits/ipc-perm.h created+40
......@@ -0,0 +1,40 @@
1/* struct ipc_perm definition.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19#ifndef _SYS_IPC_H
20# error "Never use <bits/ipc-perm.h> directly; include <sys/ipc.h> instead."
21#endif
22
23/* Data structure used to pass permission information to IPC operations.
24 It follows the kernel ipc64_perm size so the syscall can be made directly
25 without temporary buffer copy. However, since glibc defines the MODE
26 field as mode_t per POSIX definition (BZ#18231), it omits the __PAD1 field
27 (since glibc does not export mode_t as 16-bit for any architecture). */
28struct ipc_perm
29{
30 __key_t __key; /* Key. */
31 __uid_t uid; /* Owner's user ID. */
32 __gid_t gid; /* Owner's group ID. */
33 __uid_t cuid; /* Creator's user ID. */
34 __gid_t cgid; /* Creator's group ID. */
35 __mode_t mode; /* Read/write permission. */
36 unsigned short int __seq; /* Sequence number. */
37 unsigned short int __pad2;
38 __syscall_ulong_t __glibc_reserved1;
39 __syscall_ulong_t __glibc_reserved2;
40};
\ No newline at end of file
lib/libc/include/generic-glibc/bits/ipc.h+3-18
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_IPC_H
1919# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
......@@ -37,19 +37,4 @@
3737/* Special key values. */
3838#define IPC_PRIVATE ((__key_t) 0) /* Private key. */
3939
40
41/* Data structure used to pass permission information to IPC operations. */
42struct ipc_perm
43 {
44 __key_t __key; /* Key. */
45 __uid_t uid; /* Owner's user ID. */
46 __gid_t gid; /* Owner's group ID. */
47 __uid_t cuid; /* Creator's user ID. */
48 __gid_t cgid; /* Creator's group ID. */
49 unsigned short int mode; /* Read/write permission. */
50 unsigned short int __pad1;
51 unsigned short int __seq; /* Sequence number. */
52 unsigned short int __pad2;
53 __syscall_ulong_t __glibc_reserved1;
54 __syscall_ulong_t __glibc_reserved2;
55 };
\ No newline at end of file
40#include <bits/ipc-perm.h>
\ No newline at end of file
lib/libc/include/generic-glibc/bits/ipctypes.h+2-2
......@@ -1,5 +1,5 @@
11/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. Generic.
2 Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 Copyright (C) 2002-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/*
2020 * Never include <bits/ipctypes.h> directly.
lib/libc/include/generic-glibc/bits/iscanonical.h+2-2
......@@ -1,5 +1,5 @@
11/* Define iscanonical macro.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _MATH_H
2020# error "Never use <bits/iscanonical.h> directly; include <math.h> instead."
lib/libc/include/generic-glibc/bits/libc-header-start.h+20-4
......@@ -1,5 +1,5 @@
11/* Handle feature test macros at the start of a header.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* This header is internal to glibc and should not be included outside
2020 of glibc headers. Headers including it must define
......@@ -43,22 +43,38 @@
4343#endif
4444
4545/* ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__
46 macro. */
46 macro. Most but not all symbols enabled by that macro in TS
47 18661-1 are enabled unconditionally in C2X; the symbols in Annex F
48 still require that macro in C2X. */
4749#undef __GLIBC_USE_IEC_60559_BFP_EXT
4850#if defined __USE_GNU || defined __STDC_WANT_IEC_60559_BFP_EXT__
4951# define __GLIBC_USE_IEC_60559_BFP_EXT 1
5052#else
5153# define __GLIBC_USE_IEC_60559_BFP_EXT 0
5254#endif
55#undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X
56#if __GLIBC_USE (IEC_60559_BFP_EXT) || __GLIBC_USE (ISOC2X)
57# define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1
58#else
59# define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 0
60#endif
5361
5462/* ISO/IEC TS 18661-4:2015 defines the
55 __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. */
63 __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction
64 functions, the symbols from this TS are enabled unconditionally in
65 C2X. */
5666#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
5767#if defined __USE_GNU || defined __STDC_WANT_IEC_60559_FUNCS_EXT__
5868# define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
5969#else
6070# define __GLIBC_USE_IEC_60559_FUNCS_EXT 0
6171#endif
72#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X
73#if __GLIBC_USE (IEC_60559_FUNCS_EXT) || __GLIBC_USE (ISOC2X)
74# define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1
75#else
76# define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 0
77#endif
6278
6379/* ISO/IEC TS 18661-3:2015 defines the
6480 __STDC_WANT_IEC_60559_TYPES_EXT__ macro. */
lib/libc/include/generic-glibc/bits/libm-simd-decl-stubs.h+2-2
......@@ -1,5 +1,5 @@
11/* Empty definitions required for __MATHCALL_VEC unfolding in mathcalls.h.
2 Copyright (C) 2014-2019 Free Software Foundation, Inc.
2 Copyright (C) 2014-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _MATH_H
2020# error "Never include <bits/libm-simd-decl-stubs.h> directly;\
lib/libc/include/generic-glibc/bits/link.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _LINK_H
1919# error "Never include <bits/link.h> directly; use <link.h> instead."
lib/libc/include/generic-glibc/bits/local_lim.h+2-2
......@@ -1,5 +1,5 @@
11/* Minimum guaranteed maximum values for system limits. Linux version.
2 Copyright (C) 1993-2019 Free Software Foundation, Inc.
2 Copyright (C) 1993-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; see the file COPYING.LIB. If
17 not, see <http://www.gnu.org/licenses/>. */
17 not, see <https://www.gnu.org/licenses/>. */
1818
1919/* The kernel header pollutes the namespace with the NR_OPEN symbol
2020 and defines LINK_MAX although filesystems have different maxima. A
lib/libc/include/generic-glibc/bits/locale.h+2-2
......@@ -1,5 +1,5 @@
11/* Definition of locale category symbol values.
2 Copyright (C) 2001-2019 Free Software Foundation, Inc.
2 Copyright (C) 2001-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#if !defined _LOCALE_H && !defined _LANGINFO_H
2020# error "Never use <bits/locale.h> directly; include <locale.h> instead."
lib/libc/include/generic-glibc/bits/long-double.h+4-3
......@@ -1,5 +1,5 @@
11/* Properties of long double type. MIPS version.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,10 +14,11 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#include <sgidefs.h>
2020
2121#if !defined __NO_LONG_DOUBLE_MATH && _MIPS_SIM == _ABIO32
2222# define __NO_LONG_DOUBLE_MATH 1
23#endif
\ No newline at end of file
23#endif
24#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file
lib/libc/include/generic-glibc/bits/math-finite.h deleted-197
......@@ -1,197 +0,0 @@
1/* Entry points to finite-math-only compiler runs.
2 Copyright (C) 2011-2019 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19#ifndef _MATH_H
20# error "Never use <bits/math-finite.h> directly; include <math.h> instead."
21#endif
22
23#define __REDIRFROM(...) __REDIRFROM_X(__VA_ARGS__)
24
25#define __REDIRTO(...) __REDIRTO_X(__VA_ARGS__)
26
27#define __MATH_REDIRCALL_X(from, args, to) \
28 extern _Mdouble_ __REDIRECT_NTH (from, args, to)
29#define __MATH_REDIRCALL(function, reentrant, args) \
30 __MATH_REDIRCALL_X \
31 (__REDIRFROM (function, reentrant), args, \
32 __REDIRTO (function, reentrant))
33#define __MATH_REDIRCALL_2(from, reentrant, args, to) \
34 __MATH_REDIRCALL_X \
35 (__REDIRFROM (from, reentrant), args, \
36 __REDIRTO (to, reentrant))
37
38#define __MATH_REDIRCALL_INTERNAL(function, reentrant, args) \
39 __MATH_REDIRCALL_X \
40 (__REDIRFROM (__CONCAT (__, function), \
41 __CONCAT (reentrant, _finite)), \
42 args, __REDIRTO (function, _r))
43
44
45/* acos. */
46__MATH_REDIRCALL (acos, , (_Mdouble_));
47
48#if defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
49/* acosh. */
50__MATH_REDIRCALL (acosh, , (_Mdouble_));
51#endif
52
53/* asin. */
54__MATH_REDIRCALL (asin, , (_Mdouble_));
55
56/* atan2. */
57__MATH_REDIRCALL (atan2, , (_Mdouble_, _Mdouble_));
58
59#if defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
60/* atanh. */
61__MATH_REDIRCALL (atanh, , (_Mdouble_));
62#endif
63
64/* cosh. */
65__MATH_REDIRCALL (cosh, , (_Mdouble_));
66
67/* exp. */
68__MATH_REDIRCALL (exp, , (_Mdouble_));
69
70#if __GLIBC_USE (IEC_60559_FUNCS_EXT)
71/* exp10. */
72__MATH_REDIRCALL (exp10, , (_Mdouble_));
73#endif
74
75#ifdef __USE_ISOC99
76/* exp2. */
77__MATH_REDIRCALL (exp2, , (_Mdouble_));
78#endif
79
80/* fmod. */
81__MATH_REDIRCALL (fmod, , (_Mdouble_, _Mdouble_));
82
83#if defined __USE_XOPEN || defined __USE_ISOC99
84/* hypot. */
85__MATH_REDIRCALL (hypot, , (_Mdouble_, _Mdouble_));
86#endif
87
88#if (__MATH_DECLARING_DOUBLE && (defined __USE_MISC || defined __USE_XOPEN)) \
89 || (!__MATH_DECLARING_DOUBLE && defined __USE_MISC)
90/* j0. */
91__MATH_REDIRCALL (j0, , (_Mdouble_));
92
93/* y0. */
94__MATH_REDIRCALL (y0, , (_Mdouble_));
95
96/* j1. */
97__MATH_REDIRCALL (j1, , (_Mdouble_));
98
99/* y1. */
100__MATH_REDIRCALL (y1, , (_Mdouble_));
101
102/* jn. */
103__MATH_REDIRCALL (jn, , (int, _Mdouble_));
104
105/* yn. */
106__MATH_REDIRCALL (yn, , (int, _Mdouble_));
107#endif
108
109#ifdef __USE_MISC
110/* lgamma_r. */
111__MATH_REDIRCALL (lgamma, _r, (_Mdouble_, int *));
112#endif
113
114/* Redirect __lgammal_r_finite to __lgamma_r_finite when __NO_LONG_DOUBLE_MATH
115 is set and to itself otherwise. It also redirects __lgamma_r_finite and
116 __lgammaf_r_finite to themselves. */
117__MATH_REDIRCALL_INTERNAL (lgamma, _r, (_Mdouble_, int *));
118
119#if ((defined __USE_XOPEN || defined __USE_ISOC99) \
120 && defined __extern_always_inline)
121/* lgamma. */
122__extern_always_inline _Mdouble_
123__NTH (__REDIRFROM (lgamma, ) (_Mdouble_ __d))
124{
125# if defined __USE_MISC || defined __USE_XOPEN
126 return __REDIRTO (lgamma, _r) (__d, &signgam);
127# else
128 int __local_signgam = 0;
129 return __REDIRTO (lgamma, _r) (__d, &__local_signgam);
130# endif
131}
132#endif
133
134#if ((defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_XOPEN2K)) \
135 && defined __extern_always_inline) && !__MATH_DECLARING_FLOATN
136/* gamma. */
137__extern_always_inline _Mdouble_
138__NTH (__REDIRFROM (gamma, ) (_Mdouble_ __d))
139{
140 return __REDIRTO (lgamma, _r) (__d, &signgam);
141}
142#endif
143
144/* log. */
145__MATH_REDIRCALL (log, , (_Mdouble_));
146
147/* log10. */
148__MATH_REDIRCALL (log10, , (_Mdouble_));
149
150#ifdef __USE_ISOC99
151/* log2. */
152__MATH_REDIRCALL (log2, , (_Mdouble_));
153#endif
154
155/* pow. */
156__MATH_REDIRCALL (pow, , (_Mdouble_, _Mdouble_));
157
158#if defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
159/* remainder. */
160__MATH_REDIRCALL (remainder, , (_Mdouble_, _Mdouble_));
161#endif
162
163#if ((__MATH_DECLARING_DOUBLE \
164 && (defined __USE_MISC \
165 || (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8))) \
166 || (!defined __MATH_DECLARE_LDOUBLE && defined __USE_MISC)) \
167 && !__MATH_DECLARING_FLOATN
168/* scalb. */
169__MATH_REDIRCALL (scalb, , (_Mdouble_, _Mdouble_));
170#endif
171
172/* sinh. */
173__MATH_REDIRCALL (sinh, , (_Mdouble_));
174
175/* sqrt. */
176__MATH_REDIRCALL (sqrt, , (_Mdouble_));
177
178#if defined __USE_ISOC99 && defined __extern_always_inline
179/* tgamma. */
180extern _Mdouble_
181__REDIRFROM (__gamma, _r_finite) (_Mdouble_, int *);
182
183__extern_always_inline _Mdouble_
184__NTH (__REDIRFROM (tgamma, ) (_Mdouble_ __d))
185{
186 int __local_signgam = 0;
187 _Mdouble_ __res = __REDIRTO (gamma, _r) (__d, &__local_signgam);
188 return __local_signgam < 0 ? -__res : __res;
189}
190#endif
191
192#undef __REDIRFROM
193#undef __REDIRTO
194#undef __MATH_REDIRCALL
195#undef __MATH_REDIRCALL_2
196#undef __MATH_REDIRCALL_INTERNAL
197#undef __MATH_REDIRCALL_X
\ No newline at end of file
lib/libc/include/generic-glibc/bits/math-vector.h+2-2
......@@ -1,5 +1,5 @@
11/* Platform-specific SIMD declarations of math functions.
2 Copyright (C) 2014-2019 Free Software Foundation, Inc.
2 Copyright (C) 2014-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _MATH_H
2020# error "Never include <bits/math-vector.h> directly;\
lib/libc/include/generic-glibc/bits/mathcalls-helper-functions.h+2-2
......@@ -1,5 +1,5 @@
11/* Prototype declarations for math classification macros helpers.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919
2020/* Classify given number. */
lib/libc/include/generic-glibc/bits/mathcalls-narrow.h+2-2
......@@ -1,5 +1,5 @@
11/* Declare functions returning a narrower type.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _MATH_H
2020# error "Never include <bits/mathcalls-narrow.h> directly; include <math.h> instead."
lib/libc/include/generic-glibc/bits/mathcalls.h+17-13
......@@ -1,5 +1,5 @@
11/* Prototype declarations for math functions; helper file for <math.h>.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* NOTE: Because of the special way this file is used by <math.h>, this
2020 file must NOT be protected from multiple inclusion as header files
......@@ -109,7 +109,7 @@ __MATHCALL (log10,, (_Mdouble_ __x));
109109/* Break VALUE into integral and fractional parts. */
110110__MATHCALL (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr)) __nonnull ((2));
111111
112#if __GLIBC_USE (IEC_60559_FUNCS_EXT)
112#if __GLIBC_USE (IEC_60559_FUNCS_EXT_C2X)
113113/* Compute exponent to base ten. */
114114__MATHCALL (exp10,, (_Mdouble_ __x));
115115#endif
......@@ -261,7 +261,7 @@ __MATHCALL (nextafter,, (_Mdouble_ __x, _Mdouble_ __y));
261261__MATHCALL (nexttoward,, (_Mdouble_ __x, long double __y));
262262# endif
263263
264# if __GLIBC_USE (IEC_60559_BFP_EXT) || __MATH_DECLARING_FLOATN
264# if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) || __MATH_DECLARING_FLOATN
265265/* Return X - epsilon. */
266266__MATHCALL (nextdown,, (_Mdouble_ __x));
267267/* Return X + epsilon. */
......@@ -280,7 +280,7 @@ __MATHCALL (scalbn,, (_Mdouble_ __x, int __n));
280280__MATHDECL (int,ilogb,, (_Mdouble_ __x));
281281#endif
282282
283#if __GLIBC_USE (IEC_60559_BFP_EXT) || __MATH_DECLARING_FLOATN
283#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) || __MATH_DECLARING_FLOATN
284284/* Like ilogb, but returning long int. */
285285__MATHDECL (long int, llogb,, (_Mdouble_ __x));
286286#endif
......@@ -335,7 +335,7 @@ __MATHCALLX (fmin,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
335335__MATHCALL (fma,, (_Mdouble_ __x, _Mdouble_ __y, _Mdouble_ __z));
336336#endif /* Use ISO C99. */
337337
338#if __GLIBC_USE (IEC_60559_BFP_EXT) || __MATH_DECLARING_FLOATN
338#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) || __MATH_DECLARING_FLOATN
339339/* Round X to nearest integer value, rounding halfway cases to even. */
340340__MATHCALLX (roundeven,, (_Mdouble_ __x), (__const__));
341341
......@@ -367,16 +367,20 @@ __MATHCALLX (fmaxmag,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
367367/* Return value with minimum magnitude. */
368368__MATHCALLX (fminmag,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
369369
370/* Canonicalize floating-point representation. */
371__MATHDECL_1 (int, canonicalize,, (_Mdouble_ *__cx, const _Mdouble_ *__x));
372#endif
373
374#if __GLIBC_USE (IEC_60559_BFP_EXT) || __MATH_DECLARING_FLOATN
370375/* Total order operation. */
371__MATHDECL_1 (int, totalorder,, (_Mdouble_ __x, _Mdouble_ __y))
372 __attribute__ ((__const__));
376__MATHDECL_1 (int, totalorder,, (const _Mdouble_ *__x,
377 const _Mdouble_ *__y))
378 __attribute_pure__;
373379
374380/* Total order operation on absolute values. */
375__MATHDECL_1 (int, totalordermag,, (_Mdouble_ __x, _Mdouble_ __y))
376 __attribute__ ((__const__));
377
378/* Canonicalize floating-point representation. */
379__MATHDECL_1 (int, canonicalize,, (_Mdouble_ *__cx, const _Mdouble_ *__x));
381__MATHDECL_1 (int, totalordermag,, (const _Mdouble_ *__x,
382 const _Mdouble_ *__y))
383 __attribute_pure__;
380384
381385/* Get NaN payload. */
382386__MATHCALL (getpayload,, (const _Mdouble_ *__x));
lib/libc/include/generic-glibc/bits/mathdef.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _COMPLEX_H
1919# error "Never use <bits/mathdef.h> directly; include <complex.h> instead"
lib/libc/include/generic-glibc/bits/mman-linux.h+4-2
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX memory map interface. Linux generic version.
2 Copyright (C) 2001-2019 Free Software Foundation, Inc.
2 Copyright (C) 2001-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_MMAN_H
2020# error "Never use <bits/mman-linux.h> directly; include <sys/mman.h> instead."
......@@ -87,6 +87,8 @@
8787# define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */
8888# define MADV_WIPEONFORK 18 /* Zero memory on fork, child only. */
8989# define MADV_KEEPONFORK 19 /* Undo MADV_WIPEONFORK. */
90# define MADV_COLD 20 /* Deactivate these pages. */
91# define MADV_PAGEOUT 21 /* Reclaim these pages. */
9092# define MADV_HWPOISON 100 /* Poison a page for testing. */
9193#endif
9294
lib/libc/include/generic-glibc/bits/mman-map-flags-generic.h+2-2
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX memory map interface. Linux/generic version.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_MMAN_H
2020# error "Never use <bits/mman-map-flags-generic.h> directly; include <sys/mman.h> instead."
lib/libc/include/generic-glibc/bits/mman-shared.h+2-2
......@@ -1,5 +1,5 @@
11/* Memory-mapping-related declarations/definitions, not architecture-specific.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_MMAN_H
2020# error "Never use <bits/mman-shared.h> directly; include <sys/mman.h> instead."
lib/libc/include/generic-glibc/bits/mman.h+2-2
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX memory map interface. Linux/generic version.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_MMAN_H
2020# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
lib/libc/include/generic-glibc/bits/monetary-ldbl.h+2-2
......@@ -1,5 +1,5 @@
11/* -mlong-double-64 compatibility mode for monetary functions.
2 Copyright (C) 2006-2019 Free Software Foundation, Inc.
2 Copyright (C) 2006-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _MONETARY_H
2020# error "Never include <bits/monetary-ldbl.h> directly; use <monetary.h> instead."
lib/libc/include/generic-glibc/bits/mqueue.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2004-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2004-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _MQUEUE_H
1919# error "Never use <bits/mqueue.h> directly; include <mqueue.h> instead."
lib/libc/include/generic-glibc/bits/mqueue2.h+2-2
......@@ -1,5 +1,5 @@
11/* Checking macros for mq functions.
2 Copyright (C) 2007-2019 Free Software Foundation, Inc.
2 Copyright (C) 2007-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _FCNTL_H
2020# error "Never include <bits/mqueue2.h> directly; use <mqueue.h> instead."
lib/libc/include/generic-glibc/bits/msq-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct msqid_ds. Generic version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_MSG_H
2020# error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead."
lib/libc/include/generic-glibc/bits/msq.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_MSG_H
1919# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
lib/libc/include/generic-glibc/bits/netdb.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _NETDB_H
1919# error "Never include <bits/netdb.h> directly; use <netdb.h> instead."
lib/libc/include/generic-glibc/bits/param.h+2-2
......@@ -1,5 +1,5 @@
11/* Old-style Unix parameters and limits. Linux version.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_PARAM_H
2020# error "Never use <bits/param.h> directly; include <sys/param.h> instead."
lib/libc/include/generic-glibc/bits/poll.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_POLL_H
1919# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
lib/libc/include/generic-glibc/bits/poll2.h+2-2
......@@ -1,5 +1,5 @@
11/* Checking macros for poll functions.
2 Copyright (C) 2012-2019 Free Software Foundation, Inc.
2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_POLL_H
2020# error "Never include <bits/poll2.h> directly; use <sys/poll.h> instead."
lib/libc/include/generic-glibc/bits/posix1_lim.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * POSIX Standard: 2.9.2 Minimum Values Added to <limits.h>
lib/libc/include/generic-glibc/bits/posix2_lim.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * Never include this file directly; include <limits.h> instead.
lib/libc/include/generic-glibc/bits/posix_opt.h+2-2
......@@ -1,5 +1,5 @@
11/* Define POSIX options for Linux.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; see the file COPYING.LIB. If
17 not, see <http://www.gnu.org/licenses/>. */
17 not, see <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_POSIX_OPT_H
2020#define _BITS_POSIX_OPT_H 1
lib/libc/include/generic-glibc/bits/ppc.h+2-2
......@@ -1,5 +1,5 @@
11/* Facilities specific to the PowerPC architecture on Linux
2 Copyright (C) 2012-2019 Free Software Foundation, Inc.
2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_PPC_H
2020#define _BITS_PPC_H
lib/libc/include/generic-glibc/bits/printf-ldbl.h+2-2
......@@ -1,5 +1,5 @@
11/* -mlong-double-64 compatibility mode for <printf.h> functions.
2 Copyright (C) 2006-2019 Free Software Foundation, Inc.
2 Copyright (C) 2006-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _PRINTF_H
2020# error "Never include <bits/printf-ldbl.h> directly; use <printf.h> instead."
lib/libc/include/generic-glibc/bits/procfs-extra.h+2-2
......@@ -1,5 +1,5 @@
11/* Extra sys/procfs.h definitions. Generic Linux version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _SYS_PROCFS_H
2121# error "Never include <bits/procfs-extra.h> directly; use <sys/procfs.h> instead."
lib/libc/include/generic-glibc/bits/procfs-id.h+2-2
......@@ -1,5 +1,5 @@
11/* Types of pr_uid and pr_gid in struct elf_prpsinfo. Generic Linux version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _SYS_PROCFS_H
2121# error "Never include <bits/procfs-id.h> directly; use <sys/procfs.h> instead."
lib/libc/include/generic-glibc/bits/procfs-prregset.h+2-2
......@@ -1,5 +1,5 @@
11/* Types of prgregset_t and prfpregset_t. Generic Linux version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _SYS_PROCFS_H
2121# error "Never include <bits/procfs-prregset.h> directly; use <sys/procfs.h> instead."
lib/libc/include/generic-glibc/bits/procfs.h+2-2
......@@ -1,5 +1,5 @@
11/* Types for registers for sys/procfs.h. MIPS version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_PROCFS_H
2020# error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead."
lib/libc/include/generic-glibc/bits/pthreadtypes-arch.h+19-63
......@@ -1,5 +1,6 @@
1/* Machine-specific pthread type layouts. MIPS version.
2 Copyright (C) 2005-2019 Free Software Foundation, Inc.
1/* Machine-specific pthread type layouts. Generic version.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
3
34 This file is part of the GNU C Library.
45
56 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,77 +14,32 @@
1314 Lesser General Public License for more details.
1415
1516 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library. If not, see
17 License along with the GNU C Library; if not, see
1718 <http://www.gnu.org/licenses/>. */
1819
1920#ifndef _BITS_PTHREADTYPES_ARCH_H
2021#define _BITS_PTHREADTYPES_ARCH_H 1
2122
22#include <endian.h>
23#include <bits/wordsize.h>
2324
24#if _MIPS_SIM == _ABI64
25# define __SIZEOF_PTHREAD_ATTR_T 56
26# define __SIZEOF_PTHREAD_MUTEX_T 40
27# define __SIZEOF_PTHREAD_RWLOCK_T 56
28# define __SIZEOF_PTHREAD_BARRIER_T 32
25#if __WORDSIZE == 64
26# define __SIZEOF_PTHREAD_ATTR_T 56
27# define __SIZEOF_PTHREAD_MUTEX_T 40
28# define __SIZEOF_PTHREAD_RWLOCK_T 56
29# define __SIZEOF_PTHREAD_BARRIER_T 32
2930#else
30# define __SIZEOF_PTHREAD_ATTR_T 36
31# define __SIZEOF_PTHREAD_MUTEX_T 24
32# define __SIZEOF_PTHREAD_RWLOCK_T 32
33# define __SIZEOF_PTHREAD_BARRIER_T 20
31# define __SIZEOF_PTHREAD_ATTR_T 36
32# define __SIZEOF_PTHREAD_MUTEX_T 24
33# define __SIZEOF_PTHREAD_RWLOCK_T 32
34# define __SIZEOF_PTHREAD_BARRIER_T 20
3435#endif
35#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
36#define __SIZEOF_PTHREAD_COND_T 48
37#define __SIZEOF_PTHREAD_CONDATTR_T 4
38#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
39#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
40
41/* Data structure for mutex handling. */
42#define __PTHREAD_COMPAT_PADDING_MID
43#define __PTHREAD_COMPAT_PADDING_END
44#define __PTHREAD_MUTEX_LOCK_ELISION 0
45#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND (_MIPS_SIM != _ABI64)
46#define __PTHREAD_MUTEX_USE_UNION (_MIPS_SIM != _ABI64)
36#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
37#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
38#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
39#define __SIZEOF_PTHREAD_COND_T 48
40#define __SIZEOF_PTHREAD_CONDATTR_T 4
4741
4842#define __LOCK_ALIGNMENT
4943#define __ONCE_ALIGNMENT
5044
51struct __pthread_rwlock_arch_t
52{
53 unsigned int __readers;
54 unsigned int __writers;
55 unsigned int __wrphase_futex;
56 unsigned int __writers_futex;
57 unsigned int __pad3;
58 unsigned int __pad4;
59#if _MIPS_SIM == _ABI64
60 int __cur_writer;
61 int __shared;
62 unsigned long int __pad1;
63 unsigned long int __pad2;
64 /* FLAGS must stay at this position in the structure to maintain
65 binary compatibility. */
66 unsigned int __flags;
67# else
68# if __BYTE_ORDER == __BIG_ENDIAN
69 unsigned char __pad1;
70 unsigned char __pad2;
71 unsigned char __shared;
72 /* FLAGS must stay at this position in the structure to maintain
73 binary compatibility. */
74 unsigned char __flags;
75# else
76 /* FLAGS must stay at this position in the structure to maintain
77 binary compatibility. */
78 unsigned char __flags;
79 unsigned char __shared;
80 unsigned char __pad1;
81 unsigned char __pad2;
82# endif
83 int __cur_writer;
84#endif
85};
86
87#define __PTHREAD_RWLOCK_ELISION_EXTRA 0
88
8945#endif /* bits/pthreadtypes.h */
\ No newline at end of file
lib/libc/include/generic-glibc/bits/pthreadtypes.h+2-2
......@@ -1,5 +1,5 @@
11/* Declaration of common pthread types for all architectures.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_PTHREADTYPES_COMMON_H
2020# define _BITS_PTHREADTYPES_COMMON_H 1
lib/libc/include/generic-glibc/bits/ptrace-shared.h+49-2
......@@ -1,6 +1,6 @@
11/* `ptrace' debugger support interface. Linux version,
22 not architecture-specific.
3 Copyright (C) 1996-2019 Free Software Foundation, Inc.
3 Copyright (C) 1996-2020 Free Software Foundation, Inc.
44
55 This file is part of the GNU C Library.
66
......@@ -16,7 +16,7 @@
1616
1717 You should have received a copy of the GNU Lesser General Public
1818 License along with the GNU C Library; if not, see
19 <http://www.gnu.org/licenses/>. */
19 <https://www.gnu.org/licenses/>. */
2020
2121#ifndef _SYS_PTRACE_H
2222# error "Never use <bits/ptrace-shared.h> directly; include <sys/ptrace.h> instead."
......@@ -52,6 +52,15 @@ enum __ptrace_eventcodes
5252 PTRACE_EVENT_STOP = 128
5353};
5454
55/* Type of stop for PTRACE_GET_SYSCALL_INFO. */
56enum __ptrace_get_syscall_info_op
57{
58 PTRACE_SYSCALL_INFO_NONE = 0,
59 PTRACE_SYSCALL_INFO_ENTRY = 1,
60 PTRACE_SYSCALL_INFO_EXIT = 2,
61 PTRACE_SYSCALL_INFO_SECCOMP = 3
62};
63
5564/* Arguments for PTRACE_PEEKSIGINFO. */
5665struct __ptrace_peeksiginfo_args
5766{
......@@ -73,6 +82,44 @@ struct __ptrace_seccomp_metadata
7382 __uint64_t flags; /* Output: filter's flags. */
7483};
7584
85/* Results of PTRACE_GET_SYSCALL_INFO. */
86struct __ptrace_syscall_info
87{
88 __uint8_t op; /* One of the enum
89 __ptrace_get_syscall_info_op
90 values. */
91 __uint32_t arch __attribute__ ((__aligned__ (4))); /* AUDIT_ARCH_*
92 value. */
93 __uint64_t instruction_pointer; /* Instruction pointer. */
94 __uint64_t stack_pointer; /* Stack pointer. */
95 union
96 {
97 /* System call number and arguments, for
98 PTRACE_SYSCALL_INFO_ENTRY. */
99 struct
100 {
101 __uint64_t nr;
102 __uint64_t args[6];
103 } entry;
104 /* System call return value and error flag, for
105 PTRACE_SYSCALL_INFO_EXIT. */
106 struct
107 {
108 __int64_t rval;
109 __uint8_t is_error;
110 } exit;
111 /* System call number, arguments and SECCOMP_RET_DATA portion of
112 SECCOMP_RET_TRACE return value, for
113 PTRACE_SYSCALL_INFO_SECCOMP. */
114 struct
115 {
116 __uint64_t nr;
117 __uint64_t args[6];
118 __uint32_t ret_data;
119 } seccomp;
120 };
121};
122
76123/* Perform process tracing functions. REQUEST is one of the values
77124 above, and determines the action to be taken.
78125 For all requests except PTRACE_TRACEME, PID specifies the process to be
lib/libc/include/generic-glibc/bits/resource.h+2-2
......@@ -1,5 +1,5 @@
11/* Bit values & structures for resource limits. Linux version.
2 Copyright (C) 1994-2019 Free Software Foundation, Inc.
2 Copyright (C) 1994-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_RESOURCE_H
2020# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
lib/libc/include/generic-glibc/bits/sched.h+4-2
......@@ -1,6 +1,6 @@
11/* Definitions of constants and data structure for POSIX 1003.1b-1993
22 scheduling interface.
3 Copyright (C) 1996-2019 Free Software Foundation, Inc.
3 Copyright (C) 1996-2020 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _BITS_SCHED_H
2121#define _BITS_SCHED_H 1
......@@ -44,6 +44,8 @@
4444# define CLONE_FS 0x00000200 /* Set if fs info shared between processes. */
4545# define CLONE_FILES 0x00000400 /* Set if open files shared between processes. */
4646# define CLONE_SIGHAND 0x00000800 /* Set if signal handlers shared. */
47# define CLONE_PIDFD 0x00001000 /* Set if a pidfd should be placed
48 in parent. */
4749# define CLONE_PTRACE 0x00002000 /* Set if tracing continues on the child. */
4850# define CLONE_VFORK 0x00004000 /* Set if the parent wants the child to
4951 wake it up on mm_release. */
lib/libc/include/generic-glibc/bits/select.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_SELECT_H
1919# error "Never use <bits/select.h> directly; include <sys/select.h> instead."
lib/libc/include/generic-glibc/bits/select2.h+2-2
......@@ -1,5 +1,5 @@
11/* Checking macros for select functions.
2 Copyright (C) 2011-2019 Free Software Foundation, Inc.
2 Copyright (C) 2011-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SELECT_H
2020# error "Never include <bits/select2.h> directly; use <sys/select.h> instead."
lib/libc/include/generic-glibc/bits/sem-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct semid_ds. Generic version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SEM_H
2020# error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead."
lib/libc/include/generic-glibc/bits/sem.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_SEM_H
1919# error "Never include <bits/sem.h> directly; use <sys/sem.h> instead."
lib/libc/include/generic-glibc/bits/semaphore.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SEMAPHORE_H
1919# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
lib/libc/include/generic-glibc/bits/setjmp.h+2-2
......@@ -1,5 +1,5 @@
11/* Define the machine-dependent type `jmp_buf'. MIPS version.
2 Copyright (C) 1992-2019 Free Software Foundation, Inc.
2 Copyright (C) 1992-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _MIPS_BITS_SETJMP_H
2020#define _MIPS_BITS_SETJMP_H 1
lib/libc/include/generic-glibc/bits/setjmp2.h+2-2
......@@ -1,5 +1,5 @@
11/* Checking macros for setjmp functions.
2 Copyright (C) 2009-2019 Free Software Foundation, Inc.
2 Copyright (C) 2009-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SETJMP_H
2020# error "Never include <bits/setjmp2.h> directly; use <setjmp.h> instead."
lib/libc/include/generic-glibc/bits/shm-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct shmid_ds. Generic version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SHM_H
2020# error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead."
lib/libc/include/generic-glibc/bits/shm.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_SHM_H
1919# error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
lib/libc/include/generic-glibc/bits/shmlba.h+2-2
......@@ -1,5 +1,5 @@
11/* Define SHMLBA. Generic version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SHM_H
2020# error "Never use <bits/shmlba.h> directly; include <sys/shm.h> instead."
lib/libc/include/generic-glibc/bits/sigaction.h+2-2
......@@ -1,5 +1,5 @@
11/* The proper definitions for Linux's sigaction.
2 Copyright (C) 1993-2019 Free Software Foundation, Inc.
2 Copyright (C) 1993-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_SIGACTION_H
2020#define _BITS_SIGACTION_H 1
lib/libc/include/generic-glibc/bits/sigcontext.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _BITS_SIGCONTEXT_H
1919#define _BITS_SIGCONTEXT_H 1
lib/libc/include/generic-glibc/bits/sigevent-consts.h+2-2
......@@ -1,5 +1,5 @@
11/* sigevent constants. Linux version.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_SIGEVENT_CONSTS_H
2020#define _BITS_SIGEVENT_CONSTS_H 1
lib/libc/include/generic-glibc/bits/siginfo-consts.h+2-2
......@@ -1,5 +1,5 @@
11/* siginfo constants. Linux version.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_SIGINFO_CONSTS_H
2020#define _BITS_SIGINFO_CONSTS_H 1
lib/libc/include/generic-glibc/bits/signal_ext.h+2-2
......@@ -1,5 +1,5 @@
11/* System-specific extensions of <signal.h>, Linux version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SIGNAL_H
2020# error "Never include <bits/signal_ext.h> directly; use <signal.h> instead."
lib/libc/include/generic-glibc/bits/signalfd.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_SIGNALFD_H
1919# error "Never use <bits/signalfd.h> directly; include <sys/signalfd.h> instead."
lib/libc/include/generic-glibc/bits/signum-generic.h+2-2
......@@ -1,5 +1,5 @@
11/* Signal number constants. Generic template.
2 Copyright (C) 1991-2019 Free Software Foundation, Inc.
2 Copyright (C) 1991-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_SIGNUM_GENERIC_H
2020#define _BITS_SIGNUM_GENERIC_H 1
lib/libc/include/generic-glibc/bits/signum.h+2-2
......@@ -1,5 +1,5 @@
11/* Signal number definitions. Linux version.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_SIGNUM_H
2020#define _BITS_SIGNUM_H 1
lib/libc/include/generic-glibc/bits/sigstack.h+2-2
......@@ -1,5 +1,5 @@
11/* sigstack, sigaltstack definitions.
2 Copyright (C) 1998-2019 Free Software Foundation, Inc.
2 Copyright (C) 1998-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_SIGSTACK_H
2020#define _BITS_SIGSTACK_H 1
lib/libc/include/generic-glibc/bits/sigthread.h+2-2
......@@ -1,5 +1,5 @@
11/* Signal handling function for threaded programs.
2 Copyright (C) 1998-2019 Free Software Foundation, Inc.
2 Copyright (C) 1998-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; see the file COPYING.LIB. If
17 not, see <http://www.gnu.org/licenses/>. */
17 not, see <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_SIGTHREAD_H
2020#define _BITS_SIGTHREAD_H 1
lib/libc/include/generic-glibc/bits/sockaddr.h+2-2
......@@ -1,5 +1,5 @@
11/* Definition of struct sockaddr_* common members and sizes, generic version.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/*
2020 * Never include this file directly; use <sys/socket.h> instead.
lib/libc/include/generic-glibc/bits/socket-constants.h+2-2
......@@ -1,5 +1,5 @@
11/* Socket constants which vary among Linux architectures.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SOCKET_H
2020# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
lib/libc/include/generic-glibc/bits/socket.h+3-3
......@@ -1,5 +1,5 @@
11/* System-specific socket constants and types. Linux version.
2 Copyright (C) 1991-2019 Free Software Foundation, Inc.
2 Copyright (C) 1991-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef __BITS_SOCKET_H
2020#define __BITS_SOCKET_H
......@@ -169,7 +169,7 @@ typedef __socklen_t socklen_t;
169169#define SOL_XDP 283
170170
171171/* Maximum queue length specifiable by listen. */
172#define SOMAXCONN 128
172#define SOMAXCONN 4096
173173
174174/* Get the definition of the macro to define the common sockaddr members. */
175175#include <bits/sockaddr.h>
lib/libc/include/generic-glibc/bits/socket2.h+2-2
......@@ -1,5 +1,5 @@
11/* Checking macros for socket functions.
2 Copyright (C) 2005-2019 Free Software Foundation, Inc.
2 Copyright (C) 2005-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SOCKET_H
2020# error "Never include <bits/socket2.h> directly; use <sys/socket.h> instead."
lib/libc/include/generic-glibc/bits/socket_type.h+2-2
......@@ -1,5 +1,5 @@
11/* Define enum __socket_type for generic Linux.
2 Copyright (C) 1991-2019 Free Software Foundation, Inc.
2 Copyright (C) 1991-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SOCKET_H
2020# error "Never include <bits/socket_type.h> directly; use <sys/socket.h> instead."
lib/libc/include/generic-glibc/bits/ss_flags.h+2-2
......@@ -1,5 +1,5 @@
11/* ss_flags values for stack_t. Linux version.
2 Copyright (C) 1998-2019 Free Software Foundation, Inc.
2 Copyright (C) 1998-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_SS_FLAGS_H
2020#define _BITS_SS_FLAGS_H 1
lib/libc/include/generic-glibc/bits/stab.def+2-2
......@@ -1,5 +1,5 @@
11/* Table of DBX symbol codes for the GNU system.
2 Copyright (C) 1988, 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1988, 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* This contains contribution from Cygnus Support. */
2020
lib/libc/include/generic-glibc/bits/stat.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#if !defined _SYS_STAT_H && !defined _FCNTL_H
1919# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
lib/libc/include/generic-glibc/bits/statfs.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_STATFS_H
1919# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
lib/libc/include/generic-glibc/bits/statvfs.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_STATVFS_H
1919# error "Never include <bits/statvfs.h> directly; use <sys/statvfs.h> instead."
lib/libc/include/generic-glibc/bits/statx-generic.h+2-2
......@@ -1,5 +1,5 @@
11/* Generic statx-related definitions and declarations.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* This interface is based on <linux/stat.h> in Linux. */
2020
lib/libc/include/generic-glibc/bits/statx.h+9-7
......@@ -1,5 +1,5 @@
11/* statx-related definitions and declarations. Linux version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* This interface is based on <linux/stat.h> in Linux. */
2020
......@@ -26,11 +26,13 @@
2626
2727/* Use "" to work around incorrect macro expansion of the
2828 __has_include argument (GCC PR 80005). */
29#if __glibc_has_include ("linux/stat.h")
30# include "linux/stat.h"
31# ifdef STATX_TYPE
32# define __statx_timestamp_defined 1
33# define __statx_defined 1
29#ifdef __has_include
30# if __has_include ("linux/stat.h")
31# include "linux/stat.h"
32# ifdef STATX_TYPE
33# define __statx_timestamp_defined 1
34# define __statx_defined 1
35# endif
3436# endif
3537#endif
3638
lib/libc/include/generic-glibc/bits/stdint-intn.h+2-2
......@@ -1,5 +1,5 @@
11/* Define intN_t types.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_STDINT_INTN_H
2020#define _BITS_STDINT_INTN_H 1
lib/libc/include/generic-glibc/bits/stdint-uintn.h+2-2
......@@ -1,5 +1,5 @@
11/* Define uintN_t types.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_STDINT_UINTN_H
2020#define _BITS_STDINT_UINTN_H 1
lib/libc/include/generic-glibc/bits/stdio-ldbl.h+2-2
......@@ -1,5 +1,5 @@
11/* -mlong-double-64 compatibility mode for stdio functions.
2 Copyright (C) 2006-2019 Free Software Foundation, Inc.
2 Copyright (C) 2006-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _STDIO_H
2020# error "Never include <bits/stdio-ldbl.h> directly; use <stdio.h> instead."
lib/libc/include/generic-glibc/bits/stdio.h+2-2
......@@ -1,5 +1,5 @@
11/* Optimizing macros and inline functions for stdio functions.
2 Copyright (C) 1998-2019 Free Software Foundation, Inc.
2 Copyright (C) 1998-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_STDIO_H
2020#define _BITS_STDIO_H 1
lib/libc/include/generic-glibc/bits/stdio2.h+2-2
......@@ -1,5 +1,5 @@
11/* Checking macros for stdio functions.
2 Copyright (C) 2004-2019 Free Software Foundation, Inc.
2 Copyright (C) 2004-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_STDIO2_H
2020#define _BITS_STDIO2_H 1
lib/libc/include/generic-glibc/bits/stdio_lim.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1994-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1994-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _BITS_STDIO_LIM_H
1919#define _BITS_STDIO_LIM_H 1
lib/libc/include/generic-glibc/bits/stdlib-bsearch.h+2-2
......@@ -1,5 +1,5 @@
11/* Perform binary search - inline version.
2 Copyright (C) 1991-2019 Free Software Foundation, Inc.
2 Copyright (C) 1991-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919__extern_inline void *
2020bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size,
lib/libc/include/generic-glibc/bits/stdlib-float.h+2-2
......@@ -1,5 +1,5 @@
11/* Floating-point inline functions for stdlib.h.
2 Copyright (C) 2012-2019 Free Software Foundation, Inc.
2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _STDLIB_H
2020# error "Never use <bits/stdlib-float.h> directly; include <stdlib.h> instead."
lib/libc/include/generic-glibc/bits/stdlib-ldbl.h+3-3
......@@ -1,5 +1,5 @@
11/* -mlong-double-64 compatibility mode for <stdlib.h> functions.
2 Copyright (C) 2006-2019 Free Software Foundation, Inc.
2 Copyright (C) 2006-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _STDLIB_H
2020# error "Never include <bits/stdlib-ldbl.h> directly; use <stdlib.h> instead."
......@@ -28,7 +28,7 @@ __LDBL_REDIR1_DECL (strtold, strtod)
2828__LDBL_REDIR1_DECL (strtold_l, strtod_l)
2929#endif
3030
31#if __GLIBC_USE (IEC_60559_BFP_EXT)
31#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
3232__LDBL_REDIR1_DECL (strfroml, strfromd)
3333#endif
3434
lib/libc/include/generic-glibc/bits/stdlib.h+2-2
......@@ -1,5 +1,5 @@
11/* Checking macros for stdlib functions.
2 Copyright (C) 2005-2019 Free Software Foundation, Inc.
2 Copyright (C) 2005-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _STDLIB_H
2020# error "Never include <bits/stdlib.h> directly; use <stdlib.h> instead."
lib/libc/include/generic-glibc/bits/string_fortified.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2004-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2004-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _BITS_STRING_FORTIFIED_H
1919#define _BITS_STRING_FORTIFIED_H 1
lib/libc/include/generic-glibc/bits/strings_fortified.h+2-2
......@@ -1,5 +1,5 @@
11/* Fortify macros for strings.h functions.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef __STRINGS_FORTIFIED
2020# define __STRINGS_FORTIFIED 1
lib/libc/include/generic-glibc/bits/struct_mutex.h created+84
......@@ -0,0 +1,84 @@
1/* Default mutex implementation struct definitions.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19#ifndef _THREAD_MUTEX_INTERNAL_H
20#define _THREAD_MUTEX_INTERNAL_H 1
21
22/* Generic struct for both POSIX and C11 mutexes. New ports are expected
23 to use the default layout, however architecture can redefine it to
24 add arch-specific extension (such as lock-elision). The struct have
25 a size of 32 bytes on LP32 and 40 bytes on LP64 architectures. */
26
27struct __pthread_mutex_s
28{
29 int __lock __LOCK_ALIGNMENT;
30 unsigned int __count;
31 int __owner;
32#if __WORDSIZE == 64
33 unsigned int __nusers;
34#endif
35 /* KIND must stay at this position in the structure to maintain
36 binary compatibility with static initializers.
37
38 Concurrency notes:
39 The __kind of a mutex is initialized either by the static
40 PTHREAD_MUTEX_INITIALIZER or by a call to pthread_mutex_init.
41
42 After a mutex has been initialized, the __kind of a mutex is usually not
43 changed. BUT it can be set to -1 in pthread_mutex_destroy or elision can
44 be enabled. This is done concurrently in the pthread_mutex_*lock
45 functions by using the macro FORCE_ELISION. This macro is only defined
46 for architectures which supports lock elision.
47
48 For elision, there are the flags PTHREAD_MUTEX_ELISION_NP and
49 PTHREAD_MUTEX_NO_ELISION_NP which can be set in addition to the already
50 set type of a mutex. Before a mutex is initialized, only
51 PTHREAD_MUTEX_NO_ELISION_NP can be set with pthread_mutexattr_settype.
52
53 After a mutex has been initialized, the functions pthread_mutex_*lock can
54 enable elision - if the mutex-type and the machine supports it - by
55 setting the flag PTHREAD_MUTEX_ELISION_NP. This is done concurrently.
56 Afterwards the lock / unlock functions are using specific elision
57 code-paths. */
58 int __kind;
59#if __WORDSIZE != 64
60 unsigned int __nusers;
61#endif
62#if __WORDSIZE == 64
63 int __spins;
64 __pthread_list_t __list;
65# define __PTHREAD_MUTEX_HAVE_PREV 1
66#else
67 __extension__ union
68 {
69 int __spins;
70 __pthread_slist_t __list;
71 };
72# define __PTHREAD_MUTEX_HAVE_PREV 0
73#endif
74};
75
76#if __PTHREAD_MUTEX_HAVE_PREV == 1
77# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
78 0, 0, 0, 0, __kind, 0, { 0, 0 }
79#else
80# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
81 0, 0, 0, __kind, 0, { 0 }
82#endif
83
84#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/struct_rwlock.h created+71
......@@ -0,0 +1,71 @@
1/* MIPS internal rwlock struct definitions.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19#ifndef _RWLOCK_INTERNAL_H
20#define _RWLOCK_INTERNAL_H
21
22struct __pthread_rwlock_arch_t
23{
24 unsigned int __readers;
25 unsigned int __writers;
26 unsigned int __wrphase_futex;
27 unsigned int __writers_futex;
28 unsigned int __pad3;
29 unsigned int __pad4;
30#if _MIPS_SIM == _ABI64
31 int __cur_writer;
32 int __shared;
33 unsigned long int __pad1;
34 unsigned long int __pad2;
35 /* FLAGS must stay at this position in the structure to maintain
36 binary compatibility. */
37 unsigned int __flags;
38# else
39# if __BYTE_ORDER == __BIG_ENDIAN
40 unsigned char __pad1;
41 unsigned char __pad2;
42 unsigned char __shared;
43 /* FLAGS must stay at this position in the structure to maintain
44 binary compatibility. */
45 unsigned char __flags;
46# else
47 /* FLAGS must stay at this position in the structure to maintain
48 binary compatibility. */
49 unsigned char __flags;
50 unsigned char __shared;
51 unsigned char __pad1;
52 unsigned char __pad2;
53# endif
54 int __cur_writer;
55#endif
56};
57
58#if _MIPS_SIM == _ABI64
59# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
60 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags
61#else
62# if __BYTE_ORDER == __BIG_ENDIAN
63# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
64 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags, 0
65# else
66# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
67 0, 0, 0, 0, 0, 0, __flags, 0, 0, 0, 0
68# endif
69#endif
70
71#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/sys_errlist.h+2-2
......@@ -1,5 +1,5 @@
11/* Declare sys_errlist and sys_nerr, or don't. Compatibility (do) version.
2 Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 Copyright (C) 2002-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _STDIO_H
2020# error "Never include <bits/sys_errlist.h> directly; use <stdio.h> instead."
lib/libc/include/generic-glibc/bits/syscall.h+10-2
......@@ -1,11 +1,11 @@
11/* Generated at libc build time from syscall list. */
2/* The system call list corresponds to kernel 5.2. */
2/* The system call list corresponds to kernel 5.4. */
33
44#ifndef _SYSCALL_H
55# error "Never use <bits/syscall.h> directly; include <sys/syscall.h> instead."
66#endif
77
8#define __GLIBC_LINUX_VERSION_CODE 328192
8#define __GLIBC_LINUX_VERSION_CODE 328704
99
1010#ifdef __NR_FAST_atomic_update
1111# define SYS_FAST_atomic_update __NR_FAST_atomic_update
......@@ -207,6 +207,10 @@
207207# define SYS_clone2 __NR_clone2
208208#endif
209209
210#ifdef __NR_clone3
211# define SYS_clone3 __NR_clone3
212#endif
213
210214#ifdef __NR_close
211215# define SYS_close __NR_close
212216#endif
......@@ -1547,6 +1551,10 @@
15471551# define SYS_personality __NR_personality
15481552#endif
15491553
1554#ifdef __NR_pidfd_open
1555# define SYS_pidfd_open __NR_pidfd_open
1556#endif
1557
15501558#ifdef __NR_pidfd_send_signal
15511559# define SYS_pidfd_send_signal __NR_pidfd_send_signal
15521560#endif
lib/libc/include/generic-glibc/bits/syslog-ldbl.h+2-2
......@@ -1,5 +1,5 @@
11/* -mlong-double-64 compatibility mode for syslog functions.
2 Copyright (C) 2006-2019 Free Software Foundation, Inc.
2 Copyright (C) 2006-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SYSLOG_H
2020# error "Never include <bits/syslog-ldbl.h> directly; use <sys/syslog.h> instead."
lib/libc/include/generic-glibc/bits/syslog-path.h+2-2
......@@ -1,5 +1,5 @@
11/* <bits/syslog-path.h> -- _PATH_LOG definition
2 Copyright (C) 2006-2019 Free Software Foundation, Inc.
2 Copyright (C) 2006-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SYSLOG_H
2020# error "Never include this file directly. Use <sys/syslog.h> instead"
lib/libc/include/generic-glibc/bits/syslog.h+2-2
......@@ -1,5 +1,5 @@
11/* Checking macros for syslog functions.
2 Copyright (C) 2005-2019 Free Software Foundation, Inc.
2 Copyright (C) 2005-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SYSLOG_H
2020# error "Never include <bits/syslog.h> directly; use <sys/syslog.h> instead."
lib/libc/include/generic-glibc/bits/sysmacros.h+2-2
......@@ -1,5 +1,5 @@
11/* Definitions of macros to access `dev_t' values.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_SYSMACROS_H
2020#define _BITS_SYSMACROS_H 1
lib/libc/include/generic-glibc/bits/termios-baud.h+2-2
......@@ -1,5 +1,5 @@
11/* termios baud rate selection definitions. Linux/generic version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-baud.h> directly; use <termios.h> instead."
lib/libc/include/generic-glibc/bits/termios-c_cc.h+2-2
......@@ -1,5 +1,5 @@
11/* termios c_cc symbolic constant definitions. Linux/generic version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios_c_cc.h> directly; use <termios.h> instead."
lib/libc/include/generic-glibc/bits/termios-c_cflag.h+2-2
......@@ -1,5 +1,5 @@
11/* termios control mode definitions. Linux/generic version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-c_cflag.h> directly; use <termios.h> instead."
lib/libc/include/generic-glibc/bits/termios-c_iflag.h+2-2
......@@ -1,5 +1,5 @@
11/* termios input mode definitions. Linux/generic version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-ciflags.h> directly; use <termios.h> instead."
lib/libc/include/generic-glibc/bits/termios-c_lflag.h+2-2
......@@ -1,5 +1,5 @@
11/* termios local mode definitions. Linux/generic version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-c_lflag.h> directly; use <termios.h> instead."
lib/libc/include/generic-glibc/bits/termios-c_oflag.h+2-2
......@@ -1,5 +1,5 @@
11/* termios output mode definitions. Linux/generic version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-c_oflag.h> directly; use <termios.h> instead."
lib/libc/include/generic-glibc/bits/termios-misc.h+2-2
......@@ -1,5 +1,5 @@
11/* termios baud platform specific definitions. Linux/generic version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-misc.h> directly; use <termios.h> instead."
lib/libc/include/generic-glibc/bits/termios-struct.h+2-2
......@@ -1,5 +1,5 @@
11/* struct termios definition. Linux/generic version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-struct.h> directly; use <termios.h> instead."
lib/libc/include/generic-glibc/bits/termios-tcflow.h+2-2
......@@ -1,5 +1,5 @@
11/* termios tcflag symbolic contants definitions. Linux/generic version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-tcflow.h> directly; use <termios.h> instead."
lib/libc/include/generic-glibc/bits/termios.h+2-2
......@@ -1,5 +1,5 @@
11/* termios type and macro definitions. Linux version.
2 Copyright (C) 1993-2019 Free Software Foundation, Inc.
2 Copyright (C) 1993-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios.h> directly; use <termios.h> instead."
lib/libc/include/generic-glibc/bits/thread-shared-types.h+34-113
......@@ -1,5 +1,5 @@
11/* Common threading primitives definitions for both POSIX and C11.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _THREAD_SHARED_TYPES_H
2020#define _THREAD_SHARED_TYPES_H 1
......@@ -32,36 +32,6 @@
3232 __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
3333 __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
3434
35 Also, the following macros must be define for internal pthread_mutex_t
36 struct definitions (struct __pthread_mutex_s):
37
38 __PTHREAD_COMPAT_PADDING_MID - any additional members after 'kind'
39 and before '__spin' (for 64 bits) or
40 '__nusers' (for 32 bits).
41 __PTHREAD_COMPAT_PADDING_END - any additional members at the end of
42 the internal structure.
43 __PTHREAD_MUTEX_LOCK_ELISION - 1 if the architecture supports lock
44 elision or 0 otherwise.
45 __PTHREAD_MUTEX_NUSERS_AFTER_KIND - control where to put __nusers. The
46 preferred value for new architectures
47 is 0.
48 __PTHREAD_MUTEX_USE_UNION - control whether internal __spins and
49 __list will be place inside a union for
50 linuxthreads compatibility.
51 The preferred value for new architectures
52 is 0.
53
54 For a new port the preferred values for the required defines are:
55
56 #define __PTHREAD_COMPAT_PADDING_MID
57 #define __PTHREAD_COMPAT_PADDING_END
58 #define __PTHREAD_MUTEX_LOCK_ELISION 0
59 #define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 0
60 #define __PTHREAD_MUTEX_USE_UNION 0
61
62 __PTHREAD_MUTEX_LOCK_ELISION can be set to 1 if the hardware plans to
63 eventually support lock elision using transactional memory.
64
6535 The additional macro defines any constraint for the lock alignment
6636 inside the thread structures:
6737
......@@ -69,101 +39,52 @@
6939
7040 Same idea but for the once locking primitive:
7141
72 __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
42 __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. */
7343
74 And finally the internal pthread_rwlock_t (struct __pthread_rwlock_arch_t)
75 must be defined.
76 */
7744#include <bits/pthreadtypes-arch.h>
7845
46
7947/* Common definition of pthread_mutex_t. */
8048
81#if !__PTHREAD_MUTEX_USE_UNION
8249typedef struct __pthread_internal_list
8350{
8451 struct __pthread_internal_list *__prev;
8552 struct __pthread_internal_list *__next;
8653} __pthread_list_t;
87#else
54
8855typedef struct __pthread_internal_slist
8956{
9057 struct __pthread_internal_slist *__next;
9158} __pthread_slist_t;
92#endif
93
94/* Lock elision support. */
95#if __PTHREAD_MUTEX_LOCK_ELISION
96# if !__PTHREAD_MUTEX_USE_UNION
97# define __PTHREAD_SPINS_DATA \
98 short __spins; \
99 short __elision
100# define __PTHREAD_SPINS 0, 0
101# else
102# define __PTHREAD_SPINS_DATA \
103 struct \
104 { \
105 short __espins; \
106 short __eelision; \
107 } __elision_data
108# define __PTHREAD_SPINS { 0, 0 }
109# define __spins __elision_data.__espins
110# define __elision __elision_data.__eelision
111# endif
112#else
113# define __PTHREAD_SPINS_DATA int __spins
114/* Mutex __spins initializer used by PTHREAD_MUTEX_INITIALIZER. */
115# define __PTHREAD_SPINS 0
116#endif
117
118struct __pthread_mutex_s
119{
120 int __lock __LOCK_ALIGNMENT;
121 unsigned int __count;
122 int __owner;
123#if !__PTHREAD_MUTEX_NUSERS_AFTER_KIND
124 unsigned int __nusers;
125#endif
126 /* KIND must stay at this position in the structure to maintain
127 binary compatibility with static initializers.
128
129 Concurrency notes:
130 The __kind of a mutex is initialized either by the static
131 PTHREAD_MUTEX_INITIALIZER or by a call to pthread_mutex_init.
132
133 After a mutex has been initialized, the __kind of a mutex is usually not
134 changed. BUT it can be set to -1 in pthread_mutex_destroy or elision can
135 be enabled. This is done concurrently in the pthread_mutex_*lock functions
136 by using the macro FORCE_ELISION. This macro is only defined for
137 architectures which supports lock elision.
138
139 For elision, there are the flags PTHREAD_MUTEX_ELISION_NP and
140 PTHREAD_MUTEX_NO_ELISION_NP which can be set in addition to the already set
141 type of a mutex.
142 Before a mutex is initialized, only PTHREAD_MUTEX_NO_ELISION_NP can be set
143 with pthread_mutexattr_settype.
144 After a mutex has been initialized, the functions pthread_mutex_*lock can
145 enable elision - if the mutex-type and the machine supports it - by setting
146 the flag PTHREAD_MUTEX_ELISION_NP. This is done concurrently. Afterwards
147 the lock / unlock functions are using specific elision code-paths. */
148 int __kind;
149 __PTHREAD_COMPAT_PADDING_MID
150#if __PTHREAD_MUTEX_NUSERS_AFTER_KIND
151 unsigned int __nusers;
152#endif
153#if !__PTHREAD_MUTEX_USE_UNION
154 __PTHREAD_SPINS_DATA;
155 __pthread_list_t __list;
156# define __PTHREAD_MUTEX_HAVE_PREV 1
157#else
158 __extension__ union
159 {
160 __PTHREAD_SPINS_DATA;
161 __pthread_slist_t __list;
162 };
163# define __PTHREAD_MUTEX_HAVE_PREV 0
164#endif
165 __PTHREAD_COMPAT_PADDING_END
166};
59
60/* Arch-specific mutex definitions. A generic implementation is provided
61 by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture
62 can override it by defining:
63
64 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t
65 definition). It should contains at least the internal members
66 defined in the generic version.
67
68 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with
69 atomic operations.
70
71 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization.
72 It should initialize the mutex internal flag. */
73
74#include <bits/struct_mutex.h>
75
76/* Arch-sepecific read-write lock definitions. A generic implementation is
77 provided by struct_rwlock.h. If required, an architecture can override it
78 by defining:
79
80 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition).
81 It should contain at least the internal members defined in the
82 generic version.
83
84 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization.
85 It should initialize the rwlock internal type. */
86
87#include <bits/struct_rwlock.h>
16788
16889
16990/* Common definition of pthread_cond_t. */
lib/libc/include/generic-glibc/bits/time.h+2-2
......@@ -1,5 +1,5 @@
11/* System-dependent timing definitions. Linux version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/*
2020 * Never include this file directly; use <time.h> instead.
lib/libc/include/generic-glibc/bits/time64.h+2-2
......@@ -1,5 +1,5 @@
11/* bits/time64.h -- underlying types for __time64_t. Generic version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_TYPES_H
2020# error "Never include <bits/time64.h> directly; use <sys/types.h> instead."
lib/libc/include/generic-glibc/bits/timerfd.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2008-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_TIMERFD_H
1919# error "Never use <bits/timerfd.h> directly; include <sys/timerfd.h> instead."
lib/libc/include/generic-glibc/bits/timesize.h+2-2
......@@ -1,5 +1,5 @@
11/* Bit size of the time_t type at glibc build time, general case.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#include <bits/wordsize.h>
2020
lib/libc/include/generic-glibc/bits/timex.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _BITS_TIMEX_H
1919#define _BITS_TIMEX_H 1
lib/libc/include/generic-glibc/bits/types.h+2-2
......@@ -1,5 +1,5 @@
11/* bits/types.h -- definitions of __*_t types underlying *_t types.
2 Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 Copyright (C) 2002-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/*
2020 * Never include this file directly; use <sys/types.h> instead.
lib/libc/include/generic-glibc/bits/types/__locale_t.h+2-2
......@@ -1,5 +1,5 @@
11/* Definition of struct __locale_struct and __locale_t.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44 Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _BITS_TYPES___LOCALE_T_H
2121#define _BITS_TYPES___LOCALE_T_H 1
lib/libc/include/generic-glibc/bits/types/__sigval_t.h+2-2
......@@ -1,5 +1,5 @@
11/* Define __sigval_t.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef ____sigval_t_defined
2020#define ____sigval_t_defined
lib/libc/include/generic-glibc/bits/types/cookie_io_functions_t.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef __cookie_io_functions_t_defined
1919#define __cookie_io_functions_t_defined 1
lib/libc/include/generic-glibc/bits/types/error_t.h+2-2
......@@ -1,5 +1,5 @@
11/* Define error_t.
2 Copyright (C) 1991-2019 Free Software Foundation, Inc.
2 Copyright (C) 1991-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef __error_t_defined
2020# define __error_t_defined 1
lib/libc/include/generic-glibc/bits/types/locale_t.h+2-2
......@@ -1,5 +1,5 @@
11/* Definition of locale_t.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_TYPES_LOCALE_T_H
2020#define _BITS_TYPES_LOCALE_T_H 1
lib/libc/include/generic-glibc/bits/types/stack_t.h+2-2
......@@ -1,5 +1,5 @@
11/* Define stack_t. Linux version.
2 Copyright (C) 1998-2019 Free Software Foundation, Inc.
2 Copyright (C) 1998-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef __stack_t_defined
2020#define __stack_t_defined 1
lib/libc/include/generic-glibc/bits/types/struct_FILE.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef __struct_FILE_defined
1919#define __struct_FILE_defined 1
lib/libc/include/generic-glibc/bits/types/struct_iovec.h+2-2
......@@ -1,5 +1,5 @@
11/* Define struct iovec.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef __iovec_defined
2020#define __iovec_defined 1
lib/libc/include/generic-glibc/bits/types/struct_rusage.h+2-2
......@@ -1,5 +1,5 @@
11/* Define struct rusage.
2 Copyright (C) 1994-2019 Free Software Foundation, Inc.
2 Copyright (C) 1994-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef __rusage_defined
2020#define __rusage_defined 1
lib/libc/include/generic-glibc/bits/types/struct_sched_param.h+2-2
......@@ -1,5 +1,5 @@
11/* Sched parameter structure. Generic version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_TYPES_STRUCT_SCHED_PARAM
2020#define _BITS_TYPES_STRUCT_SCHED_PARAM 1
lib/libc/include/generic-glibc/bits/types/struct_sigstack.h+2-2
......@@ -1,5 +1,5 @@
11/* Define struct sigstack.
2 Copyright (C) 1998-2019 Free Software Foundation, Inc.
2 Copyright (C) 1998-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef __sigstack_defined
2020#define __sigstack_defined 1
lib/libc/include/generic-glibc/bits/types/struct_statx.h+2-2
......@@ -1,5 +1,5 @@
11/* Definition of the generic version of struct statx.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_STAT_H
2020# error Never include <bits/types/struct_statx.h> directly, include <sys/stat.h> instead.
lib/libc/include/generic-glibc/bits/types/struct_statx_timestamp.h+2-2
......@@ -1,5 +1,5 @@
11/* Definition of the generic version of struct statx_timestamp.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_STAT_H
2020# error Never include <bits/types/struct_statx_timestamp.h> directly, include <sys/stat.h> instead.
lib/libc/include/generic-glibc/bits/types/struct_timespec.h+13
......@@ -3,13 +3,26 @@
33#define _STRUCT_TIMESPEC 1
44
55#include <bits/types.h>
6#include <bits/endian.h>
67
78/* POSIX.1b structure for a time value. This is like a `struct timeval' but
89 has nanoseconds instead of microseconds. */
910struct timespec
1011{
1112 __time_t tv_sec; /* Seconds. */
13#if __WORDSIZE == 64 \
14 || (defined __SYSCALL_WORDSIZE && __SYSCALL_WORDSIZE == 64) \
15 || __TIMESIZE == 32
1216 __syscall_slong_t tv_nsec; /* Nanoseconds. */
17#else
18# if __BYTE_ORDER == __BIG_ENDIAN
19 int: 32; /* Padding. */
20 long int tv_nsec; /* Nanoseconds. */
21# else
22 long int tv_nsec; /* Nanoseconds. */
23 int: 32; /* Padding. */
24# endif
25#endif
1326};
1427
1528#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/typesizes.h+7-2
......@@ -1,5 +1,5 @@
11/* bits/typesizes.h -- underlying types for *_t. Generic version.
2 Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 Copyright (C) 2002-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_TYPES_H
2020# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
......@@ -72,8 +72,13 @@
7272
7373/* And for rlim_t and rlim64_t. */
7474# define __RLIM_T_MATCHES_RLIM64_T 1
75
76/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
77# define __STATFS_MATCHES_STATFS64 1
7578#else
7679# define __RLIM_T_MATCHES_RLIM64_T 0
80
81# define __STATFS_MATCHES_STATFS64 0
7782#endif
7883
7984/* Number of descriptors that can fit in an `fd_set'. */
lib/libc/include/generic-glibc/bits/uintn-identity.h+2-2
......@@ -1,5 +1,5 @@
11/* Inline functions to return unsigned integer values unchanged.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#if !defined _NETINET_IN_H && !defined _ENDIAN_H
2020# error "Never use <bits/uintn-identity.h> directly; include <netinet/in.h> or <endian.h> instead."
lib/libc/include/generic-glibc/bits/uio-ext.h+2-2
......@@ -1,5 +1,5 @@
11/* Operating system-specific extensions to sys/uio.h - Linux version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_UIO_EXT_H
2020#define _BITS_UIO_EXT_H 1
lib/libc/include/generic-glibc/bits/uio_lim.h+2-2
......@@ -1,5 +1,5 @@
11/* Implementation limits related to sys/uio.h - Linux version.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_UIO_LIM_H
2020#define _BITS_UIO_LIM_H 1
lib/libc/include/generic-glibc/bits/unistd.h+2-2
......@@ -1,5 +1,5 @@
11/* Checking macros for unistd functions.
2 Copyright (C) 2005-2019 Free Software Foundation, Inc.
2 Copyright (C) 2005-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _UNISTD_H
2020# error "Never include <bits/unistd.h> directly; use <unistd.h> instead."
lib/libc/include/generic-glibc/bits/unistd_ext.h+2-2
......@@ -1,5 +1,5 @@
11/* System-specific extensions of <unistd.h>, Linux version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _UNISTD_H
2020# error "Never include <bits/unistd_ext.h> directly; use <unistd.h> instead."
lib/libc/include/generic-glibc/bits/utmp.h+5-4
......@@ -1,5 +1,5 @@
1/* The `struct utmp' type, describing entries in the utmp file. GNU version.
2 Copyright (C) 1993-2019 Free Software Foundation, Inc.
1/* The `struct utmp' type, describing entries in the utmp file.
2 Copyright (C) 1993-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _UTMP_H
2020# error "Never include <bits/utmp.h> directly; use <utmp.h> instead."
......@@ -61,7 +61,8 @@ struct utmp
6161 pid_t ut_pid; /* Process ID of login process. */
6262 char ut_line[UT_LINESIZE]
6363 __attribute_nonstring__; /* Devicename. */
64 char ut_id[4]; /* Inittab ID. */
64 char ut_id[4]
65 __attribute_nonstring__; /* Inittab ID. */
6566 char ut_user[UT_NAMESIZE]
6667 __attribute_nonstring__; /* Username. */
6768 char ut_host[UT_HOSTSIZE]
lib/libc/include/generic-glibc/bits/utmpx.h+10-6
......@@ -1,5 +1,5 @@
11/* Structures and definitions for the user accounting database. GNU version.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _UTMPX_H
2020# error "Never include <bits/utmpx.h> directly; use <utmpx.h> instead."
......@@ -56,10 +56,14 @@ struct utmpx
5656{
5757 short int ut_type; /* Type of login. */
5858 __pid_t ut_pid; /* Process ID of login process. */
59 char ut_line[__UT_LINESIZE]; /* Devicename. */
60 char ut_id[4]; /* Inittab ID. */
61 char ut_user[__UT_NAMESIZE]; /* Username. */
62 char ut_host[__UT_HOSTSIZE]; /* Hostname for remote login. */
59 char ut_line[__UT_LINESIZE]
60 __attribute_nonstring__; /* Devicename. */
61 char ut_id[4]
62 __attribute_nonstring__; /* Inittab ID. */
63 char ut_user[__UT_NAMESIZE]
64 __attribute_nonstring__; /* Username. */
65 char ut_host[__UT_HOSTSIZE]
66 __attribute_nonstring__; /* Hostname for remote login. */
6367 struct __exit_status ut_exit; /* Exit status of a process marked
6468 as DEAD_PROCESS. */
6569
lib/libc/include/generic-glibc/bits/utsname.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_UTSNAME_H
1919# error "Never include <bits/utsname.h> directly; use <sys/utsname.h> instead."
lib/libc/include/generic-glibc/bits/waitflags.h+2-2
......@@ -1,5 +1,5 @@
11/* Definitions of flag bits for `waitpid' et al.
2 Copyright (C) 1992-2019 Free Software Foundation, Inc.
2 Copyright (C) 1992-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#if !defined _SYS_WAIT_H && !defined _STDLIB_H
2020# error "Never include <bits/waitflags.h> directly; use <sys/wait.h> instead."
lib/libc/include/generic-glibc/bits/waitstatus.h+2-2
......@@ -1,5 +1,5 @@
11/* Definitions of status bits for `wait' et al.
2 Copyright (C) 1992-2019 Free Software Foundation, Inc.
2 Copyright (C) 1992-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#if !defined _SYS_WAIT_H && !defined _STDLIB_H
2020# error "Never include <bits/waitstatus.h> directly; use <sys/wait.h> instead."
lib/libc/include/generic-glibc/bits/wchar-ldbl.h+2-2
......@@ -1,5 +1,5 @@
11/* -mlong-double-64 compatibility mode for <wchar.h> functions.
2 Copyright (C) 2006-2019 Free Software Foundation, Inc.
2 Copyright (C) 2006-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _WCHAR_H
2020# error "Never include <bits/wchar-ldbl.h> directly; use <wchar.h> instead."
lib/libc/include/generic-glibc/bits/wchar.h+2-2
......@@ -1,5 +1,5 @@
11/* wchar_t type related definitions.
2 Copyright (C) 2000-2019 Free Software Foundation, Inc.
2 Copyright (C) 2000-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_WCHAR_H
2020#define _BITS_WCHAR_H 1
lib/libc/include/generic-glibc/bits/wchar2.h+2-2
......@@ -1,5 +1,5 @@
11/* Checking macros for wchar functions.
2 Copyright (C) 2005-2019 Free Software Foundation, Inc.
2 Copyright (C) 2005-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _WCHAR_H
2020# error "Never include <bits/wchar2.h> directly; use <wchar.h> instead."
lib/libc/include/generic-glibc/bits/wctype-wchar.h+3-3
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * ISO C99 Standard: 7.25
......@@ -42,7 +42,7 @@ typedef unsigned long int wctype_t;
4242 endian). We define the bit value interpretations here dependent on the
4343 machine's byte order. */
4444
45# include <endian.h>
45# include <bits/endian.h>
4646# if __BYTE_ORDER == __BIG_ENDIAN
4747# define _ISwbit(bit) (1 << (bit))
4848# else /* __BYTE_ORDER == __LITTLE_ENDIAN */
lib/libc/include/generic-glibc/bits/wordsize.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#include <sgidefs.h>
1919
lib/libc/include/generic-glibc/bits/xopen_lim.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * Never include this file directly; use <limits.h> instead.
lib/libc/include/generic-glibc/byteswap.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _BYTESWAP_H
1919#define _BYTESWAP_H 1
lib/libc/include/generic-glibc/complex.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * ISO C99: 7.3 Complex arithmetic <complex.h>
lib/libc/include/generic-glibc/cpio.h+2-2
......@@ -1,6 +1,6 @@
11/* Extended cpio format from POSIX.1.
22 This file is part of the GNU C Library.
3 Copyright (C) 1992-2019 Free Software Foundation, Inc.
3 Copyright (C) 1992-2020 Free Software Foundation, Inc.
44 NOTE: The canonical source of this file is maintained with the GNU cpio.
55
66 The GNU C Library is free software; you can redistribute it and/or
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _CPIO_H
2121#define _CPIO_H 1
lib/libc/include/generic-glibc/crypt.h+2-2
......@@ -1,7 +1,7 @@
11/*
22 * UFC-crypt: ultra fast crypt(3) implementation
33 *
4 * Copyright (C) 1991-2019 Free Software Foundation, Inc.
4 * Copyright (C) 1991-2020 Free Software Foundation, Inc.
55 *
66 * The GNU C Library is free software; you can redistribute it and/or
77 * modify it under the terms of the GNU Lesser General Public
......@@ -15,7 +15,7 @@
1515 *
1616 * You should have received a copy of the GNU Lesser General Public
1717 * License along with the GNU C Library; if not, see
18 * <http://www.gnu.org/licenses/>.
18 * <https://www.gnu.org/licenses/>.
1919 *
2020 * @(#)crypt.h 1.5 12/20/96
2121 *
lib/libc/include/generic-glibc/ctype.h+3-3
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * ISO C99 Standard 7.4: Character handling <ctype.h>
......@@ -36,7 +36,7 @@ __BEGIN_DECLS
3636 endian). We define the bit value interpretations here dependent on the
3737 machine's byte order. */
3838
39# include <endian.h>
39# include <bits/endian.h>
4040# if __BYTE_ORDER == __BIG_ENDIAN
4141# define _ISbit(bit) (1 << (bit))
4242# else /* __BYTE_ORDER == __LITTLE_ENDIAN */
lib/libc/include/generic-glibc/dirent.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * POSIX Standard: 5.1.2 Directory Operations <dirent.h>
lib/libc/include/generic-glibc/dlfcn.h+2-2
......@@ -1,5 +1,5 @@
11/* User functions for run-time dynamic loading.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _DLFCN_H
2020#define _DLFCN_H 1
lib/libc/include/generic-glibc/elf.h+6-3
......@@ -1,5 +1,5 @@
11/* This file defines standard ELF types, structures, and macros.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _ELF_H
2020#define _ELF_H 1
......@@ -1715,6 +1715,7 @@ typedef struct
17151715#define SHT_MIPS_EH_REGION 0x70000027
17161716#define SHT_MIPS_XLATE_OLD 0x70000028
17171717#define SHT_MIPS_PDR_EXCEPTION 0x70000029
1718#define SHT_MIPS_XHASH 0x7000002b
17181719
17191720/* Legal values for sh_flags field of Elf32_Shdr. */
17201721
......@@ -1962,7 +1963,9 @@ typedef struct
19621963 in a PIE as it stores a relative offset from the address of the tag
19631964 rather than an absolute address. */
19641965#define DT_MIPS_RLD_MAP_REL 0x70000035
1965#define DT_MIPS_NUM 0x36
1966/* GNU-style hash table with xlat. */
1967#define DT_MIPS_XHASH 0x70000036
1968#define DT_MIPS_NUM 0x37
19661969
19671970/* Legal values for DT_MIPS_FLAGS Elf32_Dyn entry. */
19681971
lib/libc/include/generic-glibc/endian.h+4-29
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,48 +13,23 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _ENDIAN_H
1919#define _ENDIAN_H 1
2020
2121#include <features.h>
2222
23/* Definitions for byte order, according to significance of bytes,
24 from low addresses to high addresses. The value is what you get by
25 putting '4' in the most significant byte, '3' in the second most
26 significant byte, '2' in the second least significant byte, and '1'
27 in the least significant byte, and then writing down one digit for
28 each byte, starting with the byte at the lowest address at the left,
29 and proceeding to the byte with the highest address at the right. */
30
31#define __LITTLE_ENDIAN 1234
32#define __BIG_ENDIAN 4321
33#define __PDP_ENDIAN 3412
34
35/* This file defines `__BYTE_ORDER' for the particular machine. */
23/* Get the definitions of __*_ENDIAN, __BYTE_ORDER, and __FLOAT_WORD_ORDER. */
3624#include <bits/endian.h>
3725
38/* Some machines may need to use a different endianness for floating point
39 values. */
40#ifndef __FLOAT_WORD_ORDER
41# define __FLOAT_WORD_ORDER __BYTE_ORDER
42#endif
43
44#ifdef __USE_MISC
26#ifdef __USE_MISC
4527# define LITTLE_ENDIAN __LITTLE_ENDIAN
4628# define BIG_ENDIAN __BIG_ENDIAN
4729# define PDP_ENDIAN __PDP_ENDIAN
4830# define BYTE_ORDER __BYTE_ORDER
4931#endif
5032
51#if __BYTE_ORDER == __LITTLE_ENDIAN
52# define __LONG_LONG_PAIR(HI, LO) LO, HI
53#elif __BYTE_ORDER == __BIG_ENDIAN
54# define __LONG_LONG_PAIR(HI, LO) HI, LO
55#endif
56
57
5833#if defined __USE_MISC && !defined __ASSEMBLER__
5934/* Conversion interfaces. */
6035# include <bits/byteswap.h>
lib/libc/include/generic-glibc/envz.h+2-2
......@@ -1,5 +1,5 @@
11/* Routines for dealing with '\0' separated environment vectors
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _ENVZ_H
2020#define _ENVZ_H 1
lib/libc/include/generic-glibc/err.h+2-2
......@@ -1,5 +1,5 @@
11/* 4.4BSD utility functions for error messages.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _ERR_H
2020#define _ERR_H 1
lib/libc/include/generic-glibc/errno.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * ISO C99 Standard: 7.5 Errors <errno.h>
lib/libc/include/generic-glibc/error.h+2-2
......@@ -1,5 +1,5 @@
11/* Declaration for error-reporting function
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _ERROR_H
2020#define _ERROR_H 1
lib/libc/include/generic-glibc/execinfo.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _EXECINFO_H
1919#define _EXECINFO_H 1
lib/libc/include/generic-glibc/fcntl.h+3-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * POSIX Standard: 6.5 File Control Operations <fcntl.h>
......@@ -161,6 +161,7 @@ typedef __pid_t pid_t;
161161# define AT_STATX_SYNC_AS_STAT 0x0000
162162# define AT_STATX_FORCE_SYNC 0x2000
163163# define AT_STATX_DONT_SYNC 0x4000
164# define AT_RECURSIVE 0x8000 /* Apply to the entire subtree. */
164165# endif
165166# define AT_EACCESS 0x200 /* Test access permitted for
166167 effective IDs, not real IDs. */
lib/libc/include/generic-glibc/features.h+21-6
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _FEATURES_H
1919#define _FEATURES_H 1
......@@ -24,6 +24,7 @@
2424 __STRICT_ANSI__ ISO Standard C.
2525 _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
2626 _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
27 _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
2728 __STDC_WANT_LIB_EXT2__
2829 Extensions to ISO C99 from TR 27431-2:2010.
2930 __STDC_WANT_IEC_60559_BFP_EXT__
......@@ -139,6 +140,7 @@
139140#undef __USE_GNU
140141#undef __USE_FORTIFY_LEVEL
141142#undef __KERNEL_STRICT_NAMES
143#undef __GLIBC_USE_ISOC2X
142144#undef __GLIBC_USE_DEPRECATED_GETS
143145#undef __GLIBC_USE_DEPRECATED_SCANF
144146
......@@ -195,6 +197,8 @@
195197# define _ISOC99_SOURCE 1
196198# undef _ISOC11_SOURCE
197199# define _ISOC11_SOURCE 1
200# undef _ISOC2X_SOURCE
201# define _ISOC2X_SOURCE 1
198202# undef _POSIX_SOURCE
199203# define _POSIX_SOURCE 1
200204# undef _POSIX_C_SOURCE
......@@ -216,26 +220,37 @@
216220#if (defined _DEFAULT_SOURCE \
217221 || (!defined __STRICT_ANSI__ \
218222 && !defined _ISOC99_SOURCE && !defined _ISOC11_SOURCE \
223 && !defined _ISOC2X_SOURCE \
219224 && !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE \
220225 && !defined _XOPEN_SOURCE))
221226# undef _DEFAULT_SOURCE
222227# define _DEFAULT_SOURCE 1
223228#endif
224229
230/* This is to enable the ISO C2X extension. */
231#if (defined _ISOC2X_SOURCE \
232 || (defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L))
233# define __GLIBC_USE_ISOC2X 1
234#else
235# define __GLIBC_USE_ISOC2X 0
236#endif
237
225238/* This is to enable the ISO C11 extension. */
226#if (defined _ISOC11_SOURCE \
239#if (defined _ISOC11_SOURCE || defined _ISOC2X_SOURCE \
227240 || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L))
228241# define __USE_ISOC11 1
229242#endif
230243
231244/* This is to enable the ISO C99 extension. */
232#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \
245#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \
246 || defined _ISOC2X_SOURCE \
233247 || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L))
234248# define __USE_ISOC99 1
235249#endif
236250
237251/* This is to enable the ISO C90 Amendment 1:1995 extension. */
238#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \
252#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \
253 || defined _ISOC2X_SOURCE \
239254 || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199409L))
240255# define __USE_ISOC95 1
241256#endif
......@@ -439,7 +454,7 @@
439454/* Major and minor version number of the GNU C library package. Use
440455 these macros to test for features in specific releases. */
441456#define __GLIBC__ 2
442#define __GLIBC_MINOR__ 30
457#define __GLIBC_MINOR__ 31
443458
444459#define __GLIBC_PREREQ(maj, min) \
445460 ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
lib/libc/include/generic-glibc/fenv.h+6-6
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * ISO C99 7.6: Floating-point environment <fenv.h>
......@@ -77,7 +77,7 @@ extern int fegetexceptflag (fexcept_t *__flagp, int __excepts) __THROW;
7777/* Raise the supported exceptions represented by EXCEPTS. */
7878extern int feraiseexcept (int __excepts) __THROW;
7979
80#if __GLIBC_USE (IEC_60559_BFP_EXT)
80#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
8181/* Set the supported exception flags represented by EXCEPTS, without
8282 causing enabled traps to be taken. */
8383extern int fesetexcept (int __excepts) __THROW;
......@@ -91,7 +91,7 @@ extern int fesetexceptflag (const fexcept_t *__flagp, int __excepts) __THROW;
9191 currently set. */
9292extern int fetestexcept (int __excepts) __THROW;
9393
94#if __GLIBC_USE (IEC_60559_BFP_EXT)
94#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
9595/* Determine which of subset of the exceptions specified by EXCEPTS
9696 are set in *FLAGP. */
9797extern int fetestexceptflag (const fexcept_t *__flagp, int __excepts) __THROW;
......@@ -130,7 +130,7 @@ extern int feupdateenv (const fenv_t *__envp) __THROW;
130130
131131/* Control modes. */
132132
133#if __GLIBC_USE (IEC_60559_BFP_EXT)
133#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
134134/* Store the current floating-point control modes in the object
135135 pointed to by MODEP. */
136136extern int fegetmode (femode_t *__modep) __THROW;
......@@ -147,7 +147,7 @@ extern int fesetmode (const femode_t *__modep) __THROW;
147147
148148/* NaN support. */
149149
150#if (__GLIBC_USE (IEC_60559_BFP_EXT) \
150#if (__GLIBC_USE (IEC_60559_BFP_EXT_C2X) \
151151 && defined FE_INVALID \
152152 && defined __SUPPORT_SNAN__)
153153# define FE_SNANS_ALWAYS_SIGNAL 1
lib/libc/include/generic-glibc/finclude/math-vector-fortran.h+2-2
......@@ -1,5 +1,5 @@
11! Platform-specific declarations of SIMD math functions for Fortran. -*- f90 -*-
2! Copyright (C) 2019 Free Software Foundation, Inc.
2! Copyright (C) 2019-2020 Free Software Foundation, Inc.
33! This file is part of the GNU C Library.
44!
55! The GNU C Library is free software; you can redistribute it and/or
......@@ -14,6 +14,6 @@
1414!
1515! You should have received a copy of the GNU Lesser General Public
1616! License along with the GNU C Library; if not, see
17! <http://www.gnu.org/licenses/>.
17! <https://www.gnu.org/licenses/>.
1818
1919! No SIMD math functions are available for this platform.
\ No newline at end of file
lib/libc/include/generic-glibc/fmtmsg.h+2-2
......@@ -1,5 +1,5 @@
11/* Message display handling.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef __FMTMSG_H
2020#define __FMTMSG_H 1
lib/libc/include/generic-glibc/fnmatch.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _FNMATCH_H
1919#define _FNMATCH_H 1
lib/libc/include/generic-glibc/fpregdef.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _FPREGDEF_H
1919#define _FPREGDEF_H
lib/libc/include/generic-glibc/fpu_control.h+2-3
......@@ -1,7 +1,6 @@
11/* FPU control word bits. Mips version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
4 Contributed by Olaf Flebbe and Ralf Baechle.
54
65 The GNU C Library is free software; you can redistribute it and/or
76 modify it under the terms of the GNU Lesser General Public
......@@ -15,7 +14,7 @@
1514
1615 You should have received a copy of the GNU Lesser General Public
1716 License along with the GNU C Library. If not, see
18 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1918
2019#ifndef _FPU_CONTROL_H
2120#define _FPU_CONTROL_H
lib/libc/include/generic-glibc/fts.h+2-2
......@@ -1,5 +1,5 @@
11/* File tree traversal functions declarations.
2 Copyright (C) 1994-2019 Free Software Foundation, Inc.
2 Copyright (C) 1994-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/*
2020 * Copyright (c) 1989, 1993
lib/libc/include/generic-glibc/ftw.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * X/Open Portability Guide 4.2: ftw.h
lib/libc/include/generic-glibc/gconv.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/* This header provides no interface for a user to the internals of
1919 the gconv implementation in the libc. Therefore there is no use
lib/libc/include/generic-glibc/getopt.h+2-2
......@@ -1,5 +1,5 @@
11/* Declarations for getopt.
2 Copyright (C) 1989-2019 Free Software Foundation, Inc.
2 Copyright (C) 1989-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44 Unlike the bulk of the getopt implementation, this file is NOT part
55 of gnulib; gnulib also has a getopt.h but it is different.
......@@ -16,7 +16,7 @@
1616
1717 You should have received a copy of the GNU Lesser General Public
1818 License along with the GNU C Library; if not, see
19 <http://www.gnu.org/licenses/>. */
19 <https://www.gnu.org/licenses/>. */
2020
2121#ifndef _GETOPT_H
2222#define _GETOPT_H 1
lib/libc/include/generic-glibc/glob.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _GLOB_H
1919#define _GLOB_H 1
lib/libc/include/generic-glibc/gnu-versions.h+2-2
......@@ -1,5 +1,5 @@
11/* Header with interface version macros for library pieces copied elsewhere.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _GNU_VERSIONS_H
2020#define _GNU_VERSIONS_H 1
lib/libc/include/generic-glibc/gnu/libc-version.h+2-2
......@@ -1,5 +1,5 @@
11/* Interface to GNU libc specific functions for version information.
2 Copyright (C) 1998-2019 Free Software Foundation, Inc.
2 Copyright (C) 1998-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _GNU_LIBC_VERSION_H
2020#define _GNU_LIBC_VERSION_H 1
lib/libc/include/generic-glibc/grp.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * POSIX Standard: 9.2.1 Group Database Access <grp.h>
lib/libc/include/generic-glibc/gshadow.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2009-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2009-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/* Declaration of types and functions for shadow group suite. */
1919
lib/libc/include/generic-glibc/iconv.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _ICONV_H
1919#define _ICONV_H 1
lib/libc/include/generic-glibc/ieee754.h+4-4
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,14 +13,14 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _IEEE754_H
19
2019#define _IEEE754_H 1
20
2121#include <features.h>
2222
23#include <endian.h>
23#include <bits/endian.h>
2424
2525__BEGIN_DECLS
2626
lib/libc/include/generic-glibc/ifaddrs.h+2-2
......@@ -1,5 +1,5 @@
11/* ifaddrs.h -- declarations for getting network interface addresses
2 Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 Copyright (C) 2002-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _IFADDRS_H
2020#define _IFADDRS_H 1
lib/libc/include/generic-glibc/inttypes.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * ISO C99: 7.8 Format conversion of integer types <inttypes.h>
lib/libc/include/generic-glibc/langinfo.h+2-2
......@@ -1,5 +1,5 @@
11/* Access to locale-dependent parameters.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _LANGINFO_H
2020#define _LANGINFO_H 1
lib/libc/include/generic-glibc/libgen.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _LIBGEN_H
1919#define _LIBGEN_H 1
lib/libc/include/generic-glibc/libintl.h+2-2
......@@ -1,5 +1,5 @@
11/* Message catalogs for internationalization.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44 This file is derived from the file libgettext.h in the GNU gettext package.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _LIBINTL_H
2121#define _LIBINTL_H 1
lib/libc/include/generic-glibc/limits.h+3-3
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * ISO C99 Standard: 7.10/5.2.4.2.1 Sizes of integer types <limits.h>
......@@ -142,7 +142,7 @@
142142/* The integer width macros are not defined by GCC's <limits.h> before
143143 GCC 7, or if _GNU_SOURCE rather than
144144 __STDC_WANT_IEC_60559_BFP_EXT__ is used to enable this feature. */
145#if __GLIBC_USE (IEC_60559_BFP_EXT)
145#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
146146# ifndef CHAR_WIDTH
147147# define CHAR_WIDTH 8
148148# endif
lib/libc/include/generic-glibc/link.h+2-2
......@@ -1,6 +1,6 @@
11/* Data structure for communication from the run-time dynamic linker for
22 loaded ELF shared objects.
3 Copyright (C) 1995-2019 Free Software Foundation, Inc.
3 Copyright (C) 1995-2020 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _LINK_H
2121#define _LINK_H 1
lib/libc/include/generic-glibc/locale.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * ISO C99 Standard: 7.11 Localization <locale.h>
lib/libc/include/generic-glibc/malloc.h+3-4
......@@ -1,5 +1,5 @@
11/* Prototypes and definition for malloc implementation.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _MALLOC_H
2020#define _MALLOC_H 1
......@@ -71,8 +71,7 @@ extern void *valloc (size_t __size) __THROW __attribute_malloc__
7171
7272/* Equivalent to valloc(minimum-page-that-holds(n)), that is, round up
7373 __size to nearest pagesize. */
74extern void *pvalloc (size_t __size) __THROW __attribute_malloc__
75 __attribute_alloc_size__ ((1)) __wur;
74extern void *pvalloc (size_t __size) __THROW __attribute_malloc__ __wur;
7675
7776/* Underlying allocation function; successive calls should return
7877 contiguous pieces of memory. */
lib/libc/include/generic-glibc/math.h+8-228
......@@ -1,5 +1,5 @@
11/* Declarations for math functions.
2 Copyright (C) 1991-2019 Free Software Foundation, Inc.
2 Copyright (C) 1991-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/*
2020 * ISO C99 Standard: 7.12 Mathematics <math.h>
......@@ -104,7 +104,7 @@ __BEGIN_DECLS
104104# endif
105105#endif /* __USE_ISOC99 */
106106
107#if __GLIBC_USE (IEC_60559_BFP_EXT)
107#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
108108/* Signaling NaN macros, if supported. */
109109# if __GNUC_PREREQ (3, 3)
110110# define SNANF (__builtin_nansf (""))
......@@ -200,7 +200,7 @@ typedef _Float128x double_t;
200200# define FP_ILOGBNAN 2147483647
201201# endif
202202#endif
203#if __GLIBC_USE (IEC_60559_BFP_EXT)
203#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
204204# if __WORDSIZE == 32
205205# define __FP_LONG_MAX 0x7fffffffL
206206# else
......@@ -232,7 +232,7 @@ typedef _Float128x double_t;
232232
233233#include <bits/fp-fast.h>
234234
235#if __GLIBC_USE (IEC_60559_BFP_EXT)
235#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
236236/* Rounding direction macros for fromfp functions. */
237237enum
238238 {
......@@ -495,7 +495,7 @@ extern long double __REDIRECT_NTH (nexttowardl,
495495#define __MATHCALL_NARROW(func, redir, nargs) \
496496 __MATHCALL_NARROW_NORMAL (func, nargs)
497497
498#if __GLIBC_USE (IEC_60559_BFP_EXT)
498#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
499499
500500# define _Mret_ float
501501# define _Marg_ double
......@@ -969,7 +969,7 @@ enum
969969
970970#endif /* Use ISO C99. */
971971
972#if __GLIBC_USE (IEC_60559_BFP_EXT)
972#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
973973# include <bits/iscanonical.h>
974974
975975/* Return nonzero value if X is a signaling NaN. */
......@@ -1245,228 +1245,8 @@ iszero (__T __val)
12451245# include <bits/mathinline.h>
12461246#endif
12471247
1248/* Define special entry points to use when the compiler got told to
1249 only expect finite results. */
1250#if defined __FINITE_MATH_ONLY__ && __FINITE_MATH_ONLY__ > 0
1251
1252/* Include bits/math-finite.h for double. */
1253# define _Mdouble_ double
1254# define __MATH_DECLARING_DOUBLE 1
1255# define __MATH_DECLARING_FLOATN 0
1256# define __REDIRFROM_X(function, reentrant) \
1257 function ## reentrant
1258# define __REDIRTO_X(function, reentrant) \
1259 __ ## function ## reentrant ## _finite
1260# include <bits/math-finite.h>
1261# undef _Mdouble_
1262# undef __MATH_DECLARING_DOUBLE
1263# undef __MATH_DECLARING_FLOATN
1264# undef __REDIRFROM_X
1265# undef __REDIRTO_X
1266
1267/* When __USE_ISOC99 is defined, include math-finite for float and
1268 long double, as well. */
1269# ifdef __USE_ISOC99
1270
1271/* Include bits/math-finite.h for float. */
1272# define _Mdouble_ float
1273# define __MATH_DECLARING_DOUBLE 0
1274# define __MATH_DECLARING_FLOATN 0
1275# define __REDIRFROM_X(function, reentrant) \
1276 function ## f ## reentrant
1277# define __REDIRTO_X(function, reentrant) \
1278 __ ## function ## f ## reentrant ## _finite
1279# include <bits/math-finite.h>
1280# undef _Mdouble_
1281# undef __MATH_DECLARING_DOUBLE
1282# undef __MATH_DECLARING_FLOATN
1283# undef __REDIRFROM_X
1284# undef __REDIRTO_X
1285
1286/* Include bits/math-finite.h for long double. */
1287# ifdef __MATH_DECLARE_LDOUBLE
1288# define _Mdouble_ long double
1289# define __MATH_DECLARING_DOUBLE 0
1290# define __MATH_DECLARING_FLOATN 0
1291# define __REDIRFROM_X(function, reentrant) \
1292 function ## l ## reentrant
1293# ifdef __NO_LONG_DOUBLE_MATH
1294# define __REDIRTO_X(function, reentrant) \
1295 __ ## function ## reentrant ## _finite
1296# else
1297# define __REDIRTO_X(function, reentrant) \
1298 __ ## function ## l ## reentrant ## _finite
1299# endif
1300# include <bits/math-finite.h>
1301# undef _Mdouble_
1302# undef __MATH_DECLARING_DOUBLE
1303# undef __MATH_DECLARING_FLOATN
1304# undef __REDIRFROM_X
1305# undef __REDIRTO_X
1306# endif
1307
1308# endif /* __USE_ISOC99. */
1309
1310/* Include bits/math-finite.h for _FloatN and _FloatNx. */
1311
1312# if (__HAVE_DISTINCT_FLOAT16 || (__HAVE_FLOAT16 && !defined _LIBC)) \
1313 && __GLIBC_USE (IEC_60559_TYPES_EXT)
1314# define _Mdouble_ _Float16
1315# define __MATH_DECLARING_DOUBLE 0
1316# define __MATH_DECLARING_FLOATN 1
1317# define __REDIRFROM_X(function, reentrant) \
1318 function ## f16 ## reentrant
1319# if __HAVE_DISTINCT_FLOAT16
1320# define __REDIRTO_X(function, reentrant) \
1321 __ ## function ## f16 ## reentrant ## _finite
1322# else
1323# error "non-disinct _Float16"
1324# endif
1325# include <bits/math-finite.h>
1326# undef _Mdouble_
1327# undef __MATH_DECLARING_DOUBLE
1328# undef __MATH_DECLARING_FLOATN
1329# undef __REDIRFROM_X
1330# undef __REDIRTO_X
1331# endif
1332
1333# if (__HAVE_DISTINCT_FLOAT32 || (__HAVE_FLOAT32 && !defined _LIBC)) \
1334 && __GLIBC_USE (IEC_60559_TYPES_EXT)
1335# define _Mdouble_ _Float32
1336# define __MATH_DECLARING_DOUBLE 0
1337# define __MATH_DECLARING_FLOATN 1
1338# define __REDIRFROM_X(function, reentrant) \
1339 function ## f32 ## reentrant
1340# if __HAVE_DISTINCT_FLOAT32
1341# define __REDIRTO_X(function, reentrant) \
1342 __ ## function ## f32 ## reentrant ## _finite
1343# else
1344# define __REDIRTO_X(function, reentrant) \
1345 __ ## function ## f ## reentrant ## _finite
1346# endif
1347# include <bits/math-finite.h>
1348# undef _Mdouble_
1349# undef __MATH_DECLARING_DOUBLE
1350# undef __MATH_DECLARING_FLOATN
1351# undef __REDIRFROM_X
1352# undef __REDIRTO_X
1353# endif
1354
1355# if (__HAVE_DISTINCT_FLOAT64 || (__HAVE_FLOAT64 && !defined _LIBC)) \
1356 && __GLIBC_USE (IEC_60559_TYPES_EXT)
1357# define _Mdouble_ _Float64
1358# define __MATH_DECLARING_DOUBLE 0
1359# define __MATH_DECLARING_FLOATN 1
1360# define __REDIRFROM_X(function, reentrant) \
1361 function ## f64 ## reentrant
1362# if __HAVE_DISTINCT_FLOAT64
1363# define __REDIRTO_X(function, reentrant) \
1364 __ ## function ## f64 ## reentrant ## _finite
1365# else
1366# define __REDIRTO_X(function, reentrant) \
1367 __ ## function ## reentrant ## _finite
1368# endif
1369# include <bits/math-finite.h>
1370# undef _Mdouble_
1371# undef __MATH_DECLARING_DOUBLE
1372# undef __MATH_DECLARING_FLOATN
1373# undef __REDIRFROM_X
1374# undef __REDIRTO_X
1375# endif
1376
1377# if (__HAVE_DISTINCT_FLOAT128 || (__HAVE_FLOAT128 && !defined _LIBC)) \
1378 && __GLIBC_USE (IEC_60559_TYPES_EXT)
1379# define _Mdouble_ _Float128
1380# define __MATH_DECLARING_DOUBLE 0
1381# define __MATH_DECLARING_FLOATN 1
1382# define __REDIRFROM_X(function, reentrant) \
1383 function ## f128 ## reentrant
1384# if __HAVE_DISTINCT_FLOAT128
1385# define __REDIRTO_X(function, reentrant) \
1386 __ ## function ## f128 ## reentrant ## _finite
1387# else
1388# define __REDIRTO_X(function, reentrant) \
1389 __ ## function ## l ## reentrant ## _finite
1390# endif
1391# include <bits/math-finite.h>
1392# undef _Mdouble_
1393# undef __MATH_DECLARING_DOUBLE
1394# undef __MATH_DECLARING_FLOATN
1395# undef __REDIRFROM_X
1396# undef __REDIRTO_X
1397# endif
1398
1399# if (__HAVE_DISTINCT_FLOAT32X || (__HAVE_FLOAT32X && !defined _LIBC)) \
1400 && __GLIBC_USE (IEC_60559_TYPES_EXT)
1401# define _Mdouble_ _Float32x
1402# define __MATH_DECLARING_DOUBLE 0
1403# define __MATH_DECLARING_FLOATN 1
1404# define __REDIRFROM_X(function, reentrant) \
1405 function ## f32x ## reentrant
1406# if __HAVE_DISTINCT_FLOAT32X
1407# define __REDIRTO_X(function, reentrant) \
1408 __ ## function ## f32x ## reentrant ## _finite
1409# else
1410# define __REDIRTO_X(function, reentrant) \
1411 __ ## function ## reentrant ## _finite
1412# endif
1413# include <bits/math-finite.h>
1414# undef _Mdouble_
1415# undef __MATH_DECLARING_DOUBLE
1416# undef __MATH_DECLARING_FLOATN
1417# undef __REDIRFROM_X
1418# undef __REDIRTO_X
1419# endif
1420
1421# if (__HAVE_DISTINCT_FLOAT64X || (__HAVE_FLOAT64X && !defined _LIBC)) \
1422 && __GLIBC_USE (IEC_60559_TYPES_EXT)
1423# define _Mdouble_ _Float64x
1424# define __MATH_DECLARING_DOUBLE 0
1425# define __MATH_DECLARING_FLOATN 1
1426# define __REDIRFROM_X(function, reentrant) \
1427 function ## f64x ## reentrant
1428# if __HAVE_DISTINCT_FLOAT64X
1429# define __REDIRTO_X(function, reentrant) \
1430 __ ## function ## f64x ## reentrant ## _finite
1431# elif __HAVE_FLOAT64X_LONG_DOUBLE
1432# define __REDIRTO_X(function, reentrant) \
1433 __ ## function ## l ## reentrant ## _finite
1434# else
1435# define __REDIRTO_X(function, reentrant) \
1436 __ ## function ## f128 ## reentrant ## _finite
1437# endif
1438# include <bits/math-finite.h>
1439# undef _Mdouble_
1440# undef __MATH_DECLARING_DOUBLE
1441# undef __MATH_DECLARING_FLOATN
1442# undef __REDIRFROM_X
1443# undef __REDIRTO_X
1444# endif
1445
1446# if (__HAVE_DISTINCT_FLOAT128X || (__HAVE_FLOAT128X && !defined _LIBC)) \
1447 && __GLIBC_USE (IEC_60559_TYPES_EXT)
1448# define _Mdouble_ _Float128x
1449# define __MATH_DECLARING_DOUBLE 0
1450# define __MATH_DECLARING_FLOATN 1
1451# define __REDIRFROM_X(function, reentrant) \
1452 function ## f128x ## reentrant
1453# if __HAVE_DISTINCT_FLOAT128X
1454# define __REDIRTO_X(function, reentrant) \
1455 __ ## function ## f128x ## reentrant ## _finite
1456# else
1457# error "non-disinct _Float128x"
1458# endif
1459# include <bits/math-finite.h>
1460# undef _Mdouble_
1461# undef __MATH_DECLARING_DOUBLE
1462# undef __MATH_DECLARING_FLOATN
1463# undef __REDIRFROM_X
1464# undef __REDIRTO_X
1465# endif
1466
1467#endif /* __FINITE_MATH_ONLY__ > 0. */
14681248
1469#if __GLIBC_USE (IEC_60559_BFP_EXT)
1249#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
14701250/* An expression whose type has the widest of the evaluation formats
14711251 of X and Y (which are of floating-point types). */
14721252# if __FLT_EVAL_METHOD__ == 2 || __FLT_EVAL_METHOD__ > 64
lib/libc/include/generic-glibc/mcheck.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _MCHECK_H
1919#define _MCHECK_H 1
lib/libc/include/generic-glibc/memory.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * SVID
lib/libc/include/generic-glibc/mntent.h+2-2
......@@ -1,5 +1,5 @@
11/* Utilities for reading/writing fstab, mtab, etc.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _MNTENT_H
2020#define _MNTENT_H 1
lib/libc/include/generic-glibc/monetary.h+2-2
......@@ -1,5 +1,5 @@
11/* Header file for monetary value formatting functions.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _MONETARY_H
2020#define _MONETARY_H 1
lib/libc/include/generic-glibc/mqueue.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2004-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2004-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _MQUEUE_H
1919#define _MQUEUE_H 1
lib/libc/include/generic-glibc/net/ethernet.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/* Based on the FreeBSD version of this file. Curiously, that file
1919 lacks a copyright in the header. */
lib/libc/include/generic-glibc/net/if.h+2-2
......@@ -1,5 +1,5 @@
11/* net/if.h -- declarations for inquiring about network interfaces
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _NET_IF_H
2020#define _NET_IF_H 1
lib/libc/include/generic-glibc/net/if_arp.h+2-2
......@@ -1,5 +1,5 @@
11/* Definitions for Address Resolution Protocol.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44 Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020/* Based on the 4.4BSD and Linux version of this file. */
2121
lib/libc/include/generic-glibc/net/if_packet.h+2-2
......@@ -1,5 +1,5 @@
11/* Definitions for use with Linux SOCK_PACKET sockets.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef __IF_PACKET_H
2020#define __IF_PACKET_H
lib/libc/include/generic-glibc/net/if_shaper.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _NET_IF_SHAPER_H
1919#define _NET_IF_SHAPER_H 1
lib/libc/include/generic-glibc/net/if_slip.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _NET_IF_SLIP_H
1919#define _NET_IF_SLIP_H 1
lib/libc/include/generic-glibc/net/route.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/* Based on the 4.4BSD and Linux version of this file. */
1919
lib/libc/include/generic-glibc/netash/ash.h+2-2
......@@ -1,5 +1,5 @@
11/* Definitions for use with Linux AF_ASH sockets.
2 Copyright (C) 1998-2019 Free Software Foundation, Inc.
2 Copyright (C) 1998-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _NETASH_ASH_H
2020#define _NETASH_ASH_H 1
lib/libc/include/generic-glibc/netatalk/at.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _NETATALK_AT_H
1919#define _NETATALK_AT_H 1
lib/libc/include/generic-glibc/netax25/ax25.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _NETAX25_AX25_H
1919#define _NETAX25_AX25_H 1
lib/libc/include/generic-glibc/netdb.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/* All data returned by the network data base library are supplied in
1919 host order and returned in network order (suitable for use in
lib/libc/include/generic-glibc/neteconet/ec.h+2-2
......@@ -1,5 +1,5 @@
11/* Definitions for use with Linux AF_ECONET sockets.
2 Copyright (C) 1998-2019 Free Software Foundation, Inc.
2 Copyright (C) 1998-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _NETECONET_EC_H
2020#define _NETECONET_EC_H 1
lib/libc/include/generic-glibc/netinet/ether.h+2-2
......@@ -1,5 +1,5 @@
11/* Functions for storing Ethernet addresses in ASCII and mapping to hostnames.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _NETINET_ETHER_H
2020#define _NETINET_ETHER_H 1
lib/libc/include/generic-glibc/netinet/icmp6.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _NETINET_ICMP6_H
1919#define _NETINET_ICMP6_H 1
lib/libc/include/generic-glibc/netinet/if_ether.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef __NETINET_IF_ETHER_H
1919
lib/libc/include/generic-glibc/netinet/if_fddi.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _NETINET_IF_FDDI_H
1919#define _NETINET_IF_FDDI_H 1
lib/libc/include/generic-glibc/netinet/if_tr.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _NETINET_IF_TR_H
1919#define _NETINET_IF_TR_H 1
lib/libc/include/generic-glibc/netinet/igmp.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _NETINET_IGMP_H
1919#define _NETINET_IGMP_H 1
lib/libc/include/generic-glibc/netinet/in.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _NETINET_IN_H
1919#define _NETINET_IN_H 1
lib/libc/include/generic-glibc/netinet/in_systm.h+2-2
......@@ -1,5 +1,5 @@
11/* System specific type definitions for networking code.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _NETINET_IN_SYSTM_H
2020#define _NETINET_IN_SYSTM_H 1
lib/libc/include/generic-glibc/netinet/ip.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef __NETINET_IP_H
1919#define __NETINET_IP_H 1
lib/libc/include/generic-glibc/netinet/ip6.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _NETINET_IP6_H
1919#define _NETINET_IP6_H 1
lib/libc/include/generic-glibc/netinet/ip_icmp.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef __NETINET_IP_ICMP_H
1919#define __NETINET_IP_ICMP_H 1
lib/libc/include/generic-glibc/netinet/tcp.h+1
......@@ -79,6 +79,7 @@
7979#define TCP_INQ 36 /* Notify bytes available to read
8080 as a cmsg on read. */
8181#define TCP_CM_INQ TCP_INQ
82#define TCP_TX_DELAY 37 /* Delay outgoing packets by XX usec. */
8283
8384#define TCP_REPAIR_ON 1
8485#define TCP_REPAIR_OFF 0
lib/libc/include/generic-glibc/netinet/udp.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * Copyright (C) 1982, 1986 Regents of the University of California.
lib/libc/include/generic-glibc/netipx/ipx.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef __NETIPX_IPX_H
1919#define __NETIPX_IPX_H 1
lib/libc/include/generic-glibc/netiucv/iucv.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef __NETIUCV_IUCV_H
1919#define __NETIUCV_IUCV_H 1
lib/libc/include/generic-glibc/netpacket/packet.h+2-2
......@@ -1,5 +1,5 @@
11/* Definitions for use with Linux AF_PACKET sockets.
2 Copyright (C) 1998-2019 Free Software Foundation, Inc.
2 Copyright (C) 1998-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef __NETPACKET_PACKET_H
2020#define __NETPACKET_PACKET_H 1
lib/libc/include/generic-glibc/netrom/netrom.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _NETROM_NETROM_H
1919#define _NETROM_NETROM_H 1
lib/libc/include/generic-glibc/netrose/rose.h+2-2
......@@ -1,5 +1,5 @@
11/* Definitions for Rose packet radio address family.
2 Copyright (C) 1998-2019 Free Software Foundation, Inc.
2 Copyright (C) 1998-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* What follows is copied from the 2.1.93 <linux/rose.h>. */
2020
lib/libc/include/generic-glibc/nl_types.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _NL_TYPES_H
1919#define _NL_TYPES_H 1
lib/libc/include/generic-glibc/nss.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/* Define interface to NSS. This is meant for the interface functions
1919 and for implementors of new services. */
lib/libc/include/generic-glibc/obstack.h+2-2
......@@ -1,5 +1,5 @@
11/* obstack.h - object stack macros
2 Copyright (C) 1988-2019 Free Software Foundation, Inc.
2 Copyright (C) 1988-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* Summary:
2020
lib/libc/include/generic-glibc/printf.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _PRINTF_H
1919
lib/libc/include/generic-glibc/proc_service.h+2-2
......@@ -1,5 +1,5 @@
11/* Callback interface for libthread_db, functions users must define.
2 Copyright (C) 1999-2019 Free Software Foundation, Inc.
2 Copyright (C) 1999-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _PROC_SERVICE_H
2020#define _PROC_SERVICE_H 1
lib/libc/include/generic-glibc/pthread.h+26-51
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,16 +13,16 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _PTHREAD_H
1919#define _PTHREAD_H 1
2020
2121#include <features.h>
22#include <endian.h>
2322#include <sched.h>
2423#include <time.h>
2524
25#include <bits/endian.h>
2626#include <bits/pthreadtypes.h>
2727#include <bits/setjmp.h>
2828#include <bits/wordsize.h>
......@@ -83,30 +83,15 @@ enum
8383#endif
8484
8585
86#if __PTHREAD_MUTEX_HAVE_PREV
87# define PTHREAD_MUTEX_INITIALIZER \
88 { { 0, 0, 0, 0, 0, __PTHREAD_SPINS, { 0, 0 } } }
89# ifdef __USE_GNU
90# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \
91 { { 0, 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, __PTHREAD_SPINS, { 0, 0 } } }
92# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \
93 { { 0, 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, __PTHREAD_SPINS, { 0, 0 } } }
94# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \
95 { { 0, 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, __PTHREAD_SPINS, { 0, 0 } } }
96
97# endif
98#else
99# define PTHREAD_MUTEX_INITIALIZER \
100 { { 0, 0, 0, 0, 0, { __PTHREAD_SPINS } } }
101# ifdef __USE_GNU
102# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \
103 { { 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, { __PTHREAD_SPINS } } }
104# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \
105 { { 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, 0, { __PTHREAD_SPINS } } }
106# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \
107 { { 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, 0, { __PTHREAD_SPINS } } }
108
109# endif
86#define PTHREAD_MUTEX_INITIALIZER \
87 { { __PTHREAD_MUTEX_INITIALIZER (PTHREAD_MUTEX_TIMED_NP) } }
88#ifdef __USE_GNU
89# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \
90 { { __PTHREAD_MUTEX_INITIALIZER (PTHREAD_MUTEX_RECURSIVE_NP) } }
91# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \
92 { { __PTHREAD_MUTEX_INITIALIZER (PTHREAD_MUTEX_ERRORCHECK_NP) } }
93# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \
94 { { __PTHREAD_MUTEX_INITIALIZER (PTHREAD_MUTEX_ADAPTIVE_NP) } }
11095#endif
11196
11297
......@@ -120,34 +105,13 @@ enum
120105 PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP
121106};
122107
123/* Define __PTHREAD_RWLOCK_INT_FLAGS_SHARED to 1 if pthread_rwlock_t
124 has the shared field. All 64-bit architectures have the shared field
125 in pthread_rwlock_t. */
126#ifndef __PTHREAD_RWLOCK_INT_FLAGS_SHARED
127# if __WORDSIZE == 64
128# define __PTHREAD_RWLOCK_INT_FLAGS_SHARED 1
129# endif
130#endif
131108
132109/* Read-write lock initializers. */
133110# define PTHREAD_RWLOCK_INITIALIZER \
134 { { 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, 0 } }
111 { { __PTHREAD_RWLOCK_INITIALIZER (PTHREAD_RWLOCK_DEFAULT_NP) } }
135112# ifdef __USE_GNU
136# ifdef __PTHREAD_RWLOCK_INT_FLAGS_SHARED
137# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
138 { { 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, \
139 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP } }
140# else
141# if __BYTE_ORDER == __LITTLE_ENDIAN
142# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
143 { { 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, \
144 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, 0 } }
145# else
146# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
147 { { 0, 0, 0, 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,\
148 0 } }
149# endif
150# endif
113# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
114 { { __PTHREAD_RWLOCK_INITIALIZER (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP) } }
151115# endif
152116#endif /* Unix98 or XOpen2K */
153117
......@@ -263,6 +227,17 @@ extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __THROW;
263227 __THROW. */
264228extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return,
265229 const struct timespec *__abstime);
230
231/* Make calling thread wait for termination of the thread TH, but only
232 until TIMEOUT measured against the clock specified by CLOCKID. The
233 exit status of the thread is stored in *THREAD_RETURN, if
234 THREAD_RETURN is not NULL.
235
236 This function is a cancellation point and therefore not marked with
237 __THROW. */
238extern int pthread_clockjoin_np (pthread_t __th, void **__thread_return,
239 clockid_t __clockid,
240 const struct timespec *__abstime);
266241#endif
267242
268243/* Indicate that the thread TH is never to be joined with PTHREAD_JOIN.
lib/libc/include/generic-glibc/pty.h+2-2
......@@ -1,5 +1,5 @@
11/* Functions for pseudo TTY handling.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _PTY_H
2020#define _PTY_H 1
lib/libc/include/generic-glibc/pwd.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * POSIX Standard: 9.2.2 User Database Access <pwd.h>
lib/libc/include/generic-glibc/re_comp.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _RE_COMP_H
1919#define _RE_COMP_H 1
lib/libc/include/generic-glibc/regdef.h+2-3
......@@ -1,6 +1,5 @@
1/* Copyright (C) 1994-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1994-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
3 Contributed by Ralf Baechle <ralf@gnu.org>.
43
54 The GNU C Library is free software; you can redistribute it and/or
65 modify it under the terms of the GNU Lesser General Public
......@@ -14,7 +13,7 @@
1413
1514 You should have received a copy of the GNU Lesser General Public
1615 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1817
1918#ifndef _REGDEF_H
2019#define _REGDEF_H
lib/libc/include/generic-glibc/regex.h+1-1
......@@ -1,6 +1,6 @@
11/* Definitions for data structures and routines for the regular
22 expression library.
3 Copyright (C) 1985, 1989-2019 Free Software Foundation, Inc.
3 Copyright (C) 1985, 1989-2020 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/regexp.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33 Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _REGEXP_H
2020#define _REGEXP_H 1
lib/libc/include/generic-glibc/resolv.h+1
......@@ -131,6 +131,7 @@ struct res_sym {
131131#define RES_NOTLDQUERY 0x01000000 /* Do not look up unqualified name
132132 as a TLD. */
133133#define RES_NORELOAD 0x02000000 /* No automatic configuration reload. */
134#define RES_TRUSTAD 0x04000000 /* Request AD bit, keep it in responses. */
134135
135136#define RES_DEFAULT (RES_RECURSE|RES_DEFNAMES|RES_DNSRCH)
136137
lib/libc/include/generic-glibc/sched.h+2-2
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX 1003.1b-1993 (aka POSIX.4) scheduling interface.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SCHED_H
2020#define _SCHED_H 1
lib/libc/include/generic-glibc/scsi/scsi.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * This header file contains public constants and structures used by
lib/libc/include/generic-glibc/scsi/scsi_ioctl.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SCSI_IOCTL_H
1919#define _SCSI_IOCTL_H
lib/libc/include/generic-glibc/scsi/sg.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 History:
lib/libc/include/generic-glibc/search.h+2-2
......@@ -1,5 +1,5 @@
11/* Declarations for System V style searching functions.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SEARCH_H
2020#define _SEARCH_H 1
lib/libc/include/generic-glibc/semaphore.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SEMAPHORE_H
1919#define _SEMAPHORE_H 1
lib/libc/include/generic-glibc/setjmp.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * ISO C99 Standard: 7.13 Nonlocal jumps <setjmp.h>
lib/libc/include/generic-glibc/sgidefs.h+2-3
......@@ -1,6 +1,5 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
3 Contributed by Ralf Baechle <ralf@gnu.org>.
43
54 The GNU C Library is free software; you can redistribute it and/or
65 modify it under the terms of the GNU Lesser General Public
......@@ -14,7 +13,7 @@
1413
1514 You should have received a copy of the GNU Lesser General Public
1615 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1817
1918#ifndef _SGIDEFS_H
2019#define _SGIDEFS_H 1
lib/libc/include/generic-glibc/sgtty.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SGTTY_H
1919#define _SGTTY_H 1
lib/libc/include/generic-glibc/shadow.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/* Declaration of types and functions for "shadow" storage of hashed
1919 passphrases. The shadow database is like the user database, but is
lib/libc/include/generic-glibc/signal.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * ISO C99 Standard: 7.14 Signal handling <signal.h>
lib/libc/include/generic-glibc/spawn.h+2-2
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX spawn interface.
2 Copyright (C) 2000-2019 Free Software Foundation, Inc.
2 Copyright (C) 2000-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SPAWN_H
2020#define _SPAWN_H 1
lib/libc/include/generic-glibc/stdc-predef.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _STDC_PREDEF_H
1919#define _STDC_PREDEF_H 1
lib/libc/include/generic-glibc/stdint.h+3-3
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * ISO C99: 7.18 Integer types <stdint.h>
......@@ -273,7 +273,7 @@ typedef __uintmax_t uintmax_t;
273273# define UINTMAX_C(c) c ## ULL
274274# endif
275275
276#if __GLIBC_USE (IEC_60559_BFP_EXT)
276#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
277277
278278# define INT8_WIDTH 8
279279# define UINT8_WIDTH 8
lib/libc/include/generic-glibc/stdio.h+2-2
......@@ -1,5 +1,5 @@
11/* Define ISO C stdio on top of C++ iostreams.
2 Copyright (C) 1991-2019 Free Software Foundation, Inc.
2 Copyright (C) 1991-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/*
2020 * ISO C99 Standard: 7.19 Input/output <stdio.h>
lib/libc/include/generic-glibc/stdio_ext.h+2-2
......@@ -1,5 +1,5 @@
11/* Functions to access FILE structure internals.
2 Copyright (C) 2000-2019 Free Software Foundation, Inc.
2 Copyright (C) 2000-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* This header contains the same definitions as the header of the same name
2020 on Sun's Solaris OS. */
lib/libc/include/generic-glibc/stdlib.h+3-3
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * ISO C99 Standard: 7.20 General utilities <stdlib.h>
......@@ -208,7 +208,7 @@ extern unsigned long long int strtoull (const char *__restrict __nptr,
208208#endif /* ISO C99 or use MISC. */
209209
210210/* Convert a floating-point number to a string. */
211#if __GLIBC_USE (IEC_60559_BFP_EXT)
211#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
212212extern int strfromd (char *__dest, size_t __size, const char *__format,
213213 double __f)
214214 __THROW __nonnull ((3));
lib/libc/include/generic-glibc/string.h+7-6
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * ISO C99 Standard: 7.21 String handling <string.h>
......@@ -33,7 +33,8 @@ __BEGIN_DECLS
3333#include <stddef.h>
3434
3535/* Tell the caller that we provide correct C++ prototypes. */
36#if defined __cplusplus && __GNUC_PREREQ (4, 4)
36#if defined __cplusplus && (__GNUC_PREREQ (4, 4) \
37 || __glibc_clang_prereq (3, 5))
3738# define __CORRECT_ISO_CPP_STRING_H_PROTO
3839#endif
3940
......@@ -49,7 +50,7 @@ extern void *memmove (void *__dest, const void *__src, size_t __n)
4950/* Copy no more than N bytes of SRC to DEST, stopping when C is found.
5051 Return the position in DEST one byte past where C was copied,
5152 or NULL if C was not found in the first N bytes of SRC. */
52#if defined __USE_MISC || defined __USE_XOPEN
53#if defined __USE_MISC || defined __USE_XOPEN || __GLIBC_USE (ISOC2X)
5354extern void *memccpy (void *__restrict __dest, const void *__restrict __src,
5455 int __c, size_t __n)
5556 __THROW __nonnull ((1, 2));
......@@ -161,7 +162,7 @@ extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n,
161162#endif
162163
163164#if (defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 \
164 || __GLIBC_USE (LIB_EXT2))
165 || __GLIBC_USE (LIB_EXT2) || __GLIBC_USE (ISOC2X))
165166/* Duplicate S, returning an identical malloc'd string. */
166167extern char *strdup (const char *__s)
167168 __THROW __attribute_malloc__ __nonnull ((1));
......@@ -170,7 +171,7 @@ extern char *strdup (const char *__s)
170171/* Return a malloc'd copy of at most N bytes of STRING. The
171172 resultant string is terminated even if no null terminator
172173 appears before STRING[N]. */
173#if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2)
174#if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2) || __GLIBC_USE (ISOC2X)
174175extern char *strndup (const char *__string, size_t __n)
175176 __THROW __attribute_malloc__ __nonnull ((1));
176177#endif
lib/libc/include/generic-glibc/strings.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _STRINGS_H
1919#define _STRINGS_H 1
lib/libc/include/generic-glibc/sys/acct.h+3-3
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,14 +13,14 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_ACCT_H
1919#define _SYS_ACCT_H 1
2020
2121#include <sys/types.h>
2222#include <stdint.h>
23#include <endian.h>
23#include <bits/endian.h>
2424#include <bits/types/time_t.h>
2525
2626__BEGIN_DECLS
lib/libc/include/generic-glibc/sys/asm.h+2-3
......@@ -1,6 +1,5 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
3 Contributed by Ralf Baechle <ralf@gnu.org>.
43
54 The GNU C Library is free software; you can redistribute it and/or
65 modify it under the terms of the GNU Lesser General Public
......@@ -14,7 +13,7 @@
1413
1514 You should have received a copy of the GNU Lesser General Public
1615 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1817
1918#ifndef _SYS_ASM_H
2019#define _SYS_ASM_H
lib/libc/include/generic-glibc/sys/auxv.h+2-2
......@@ -1,5 +1,5 @@
11/* Access to the auxiliary vector.
2 Copyright (C) 2012-2019 Free Software Foundation, Inc.
2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_AUXV_H
2020#define _SYS_AUXV_H 1
lib/libc/include/generic-glibc/sys/cachectl.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_CACHECTL_H
1919#define _SYS_CACHECTL_H 1
lib/libc/include/generic-glibc/sys/cdefs.h+2-10
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_CDEFS_H
1919#define _SYS_CDEFS_H 1
......@@ -412,14 +412,6 @@
412412# define __glibc_has_attribute(attr) 0
413413#endif
414414
415#ifdef __has_include
416/* Do not use a function-like macro, so that __has_include can inhibit
417 macro expansion. */
418# define __glibc_has_include __has_include
419#else
420# define __glibc_has_include(header) 0
421#endif
422
423415#if (!defined _Noreturn \
424416 && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
425417 && !__GNUC_PREREQ (4,7))
lib/libc/include/generic-glibc/sys/debugreg.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2001-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_DEBUGREG_H
1919#define _SYS_DEBUGREG_H 1
lib/libc/include/generic-glibc/sys/dir.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_DIR_H
1919#define _SYS_DIR_H 1
lib/libc/include/generic-glibc/sys/elf.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_ELF_H
1919#define _SYS_ELF_H 1
lib/libc/include/generic-glibc/sys/epoll.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_EPOLL_H
1919#define _SYS_EPOLL_H 1
lib/libc/include/generic-glibc/sys/eventfd.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_EVENTFD_H
1919#define _SYS_EVENTFD_H 1
lib/libc/include/generic-glibc/sys/fanotify.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2010-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2010-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_FANOTIFY_H
1919#define _SYS_FANOTIFY_H 1
lib/libc/include/generic-glibc/sys/file.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_FILE_H
1919#define _SYS_FILE_H 1
lib/libc/include/generic-glibc/sys/fpregdef.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_FPREGDEF_H
1919#define _SYS_FPREGDEF_H
lib/libc/include/generic-glibc/sys/fsuid.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_FSUID_H
1919#define _SYS_FSUID_H 1
lib/libc/include/generic-glibc/sys/gmon_out.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33 Contributed by David Mosberger <davidm@cs.arizona.edu>.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* This file specifies the format of gmon.out files. It should have
2020 as few external dependencies as possible as it is going to be included
lib/libc/include/generic-glibc/sys/ifunc.h+2-2
......@@ -1,5 +1,5 @@
11/* Definitions used by AArch64 indirect function resolvers.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_IFUNC_H
2020#define _SYS_IFUNC_H
lib/libc/include/generic-glibc/sys/inotify.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_INOTIFY_H
1919#define _SYS_INOTIFY_H 1
lib/libc/include/generic-glibc/sys/io.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_IO_H
1919#define _SYS_IO_H 1
lib/libc/include/generic-glibc/sys/ioctl.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_IOCTL_H
1919#define _SYS_IOCTL_H 1
lib/libc/include/generic-glibc/sys/ipc.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_IPC_H
1919#define _SYS_IPC_H 1
lib/libc/include/generic-glibc/sys/kd.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_KD_H
1919#define _SYS_KD_H 1
lib/libc/include/generic-glibc/sys/klog.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_KLOG_H
1919
lib/libc/include/generic-glibc/sys/mman.h+2-2
......@@ -1,5 +1,5 @@
11/* Definitions for BSD-style memory management.
2 Copyright (C) 1994-2019 Free Software Foundation, Inc.
2 Copyright (C) 1994-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_MMAN_H
2020#define _SYS_MMAN_H 1
lib/libc/include/generic-glibc/sys/mount.h+2-2
......@@ -1,5 +1,5 @@
11/* Header file for mounting/unmount Linux filesystems.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* This is taken from /usr/include/linux/fs.h. */
2020
lib/libc/include/generic-glibc/sys/msg.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_MSG_H
1919#define _SYS_MSG_H
lib/libc/include/generic-glibc/sys/mtio.h+2-2
......@@ -1,5 +1,5 @@
11/* Structures and definitions for magnetic tape I/O control commands.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* Written by H. Bergman <hennus@cybercomm.nl>. */
2020
lib/libc/include/generic-glibc/sys/param.h+2-2
......@@ -1,5 +1,5 @@
11/* Compatibility header for old-style Unix parameters and limits.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_PARAM_H
2020#define _SYS_PARAM_H 1
lib/libc/include/generic-glibc/sys/pci.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_PCI_H
1919#define _SYS_PCI_H 1
lib/libc/include/generic-glibc/sys/perm.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_PERM_H
1919
lib/libc/include/generic-glibc/sys/personality.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/* Taken verbatim from Linux 2.6 (include/linux/personality.h). */
1919
lib/libc/include/generic-glibc/sys/platform/ppc.h+2-2
......@@ -1,5 +1,5 @@
11/* Facilities specific to the PowerPC architecture
2 Copyright (C) 2012-2019 Free Software Foundation, Inc.
2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_PLATFORM_PPC_H
2020#define _SYS_PLATFORM_PPC_H 1
lib/libc/include/generic-glibc/sys/poll.h+2-2
......@@ -1,5 +1,5 @@
11/* Compatibility definitions for System V `poll' interface.
2 Copyright (C) 1994-2019 Free Software Foundation, Inc.
2 Copyright (C) 1994-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_POLL_H
2020#define _SYS_POLL_H 1
lib/libc/include/generic-glibc/sys/prctl.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_PRCTL_H
1919#define _SYS_PRCTL_H 1
lib/libc/include/generic-glibc/sys/procfs.h+2-2
......@@ -1,5 +1,5 @@
11/* Definitions for core files and libthread_db. Generic Linux version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _SYS_PROCFS_H
2121#define _SYS_PROCFS_H 1
lib/libc/include/generic-glibc/sys/profil.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2001-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _PROFIL_H
1919#define _PROFIL_H 1
lib/libc/include/generic-glibc/sys/ptrace.h+7-3
......@@ -1,5 +1,5 @@
11/* `ptrace' debugger support interface. Linux version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _SYS_PTRACE_H
2121#define _SYS_PTRACE_H 1
......@@ -166,8 +166,12 @@ enum __ptrace_request
166166#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER
167167
168168 /* Get seccomp BPF filter metadata. */
169 PTRACE_SECCOMP_GET_METADATA = 0x420d
169 PTRACE_SECCOMP_GET_METADATA = 0x420d,
170170#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
171
172 /* Get information about system call. */
173 PTRACE_GET_SYSCALL_INFO = 0x420e
174#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
171175};
172176
173177
lib/libc/include/generic-glibc/sys/quota.h+2-2
......@@ -1,5 +1,5 @@
11/* This just represents the non-kernel parts of <linux/quota.h>.
2 Copyright (C) 1998-2019 Free Software Foundation, Inc.
2 Copyright (C) 1998-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/*
2020 * Copyright (c) 1982, 1986 Regents of the University of California.
lib/libc/include/generic-glibc/sys/random.h+2-2
......@@ -1,5 +1,5 @@
11/* Interfaces for obtaining random bytes.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_RANDOM_H
2020#define _SYS_RANDOM_H 1
lib/libc/include/generic-glibc/sys/raw.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_RAW_H
1919#define _SYS_RAW_H 1
lib/libc/include/generic-glibc/sys/reboot.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/* This file should define RB_* macros to be used as flag
1919 bits in the argument to the `reboot' system call. */
lib/libc/include/generic-glibc/sys/reg.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2001-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_REG_H
1919#define _SYS_REG_H 1
lib/libc/include/generic-glibc/sys/regdef.h+2-3
......@@ -1,6 +1,5 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
3 Contributed by Ralf Baechle <ralf@gnu.org>.
43
54 The GNU C Library is free software; you can redistribute it and/or
65 modify it under the terms of the GNU Lesser General Public
......@@ -14,7 +13,7 @@
1413
1514 You should have received a copy of the GNU Lesser General Public
1615 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1817
1918#ifndef _SYS_REGDEF_H
2019#define _SYS_REGDEF_H
lib/libc/include/generic-glibc/sys/resource.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_RESOURCE_H
1919#define _SYS_RESOURCE_H 1
lib/libc/include/generic-glibc/sys/select.h+2-2
......@@ -1,5 +1,5 @@
11/* `fd_set' type and related macros, and `select'/`pselect' declarations.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h> */
2020
lib/libc/include/generic-glibc/sys/sem.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_SEM_H
1919#define _SYS_SEM_H 1
lib/libc/include/generic-glibc/sys/sendfile.h+2-2
......@@ -1,5 +1,5 @@
11/* sendfile -- copy data directly from one file descriptor to another
2 Copyright (C) 1998-2019 Free Software Foundation, Inc.
2 Copyright (C) 1998-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SENDFILE_H
2020#define _SYS_SENDFILE_H 1
lib/libc/include/generic-glibc/sys/shm.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_SHM_H
1919#define _SYS_SHM_H 1
lib/libc/include/generic-glibc/sys/signalfd.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_SIGNALFD_H
1919#define _SYS_SIGNALFD_H 1
lib/libc/include/generic-glibc/sys/socket.h+2-2
......@@ -1,5 +1,5 @@
11/* Declarations of socket constants, types, and functions.
2 Copyright (C) 1991-2019 Free Software Foundation, Inc.
2 Copyright (C) 1991-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SOCKET_H
2020#define _SYS_SOCKET_H 1
lib/libc/include/generic-glibc/sys/stat.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * POSIX Standard: 5.6 File Characteristics <sys/stat.h>
lib/libc/include/generic-glibc/sys/statfs.h+2-2
......@@ -1,5 +1,5 @@
11/* Definitions for getting information about a filesystem.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_STATFS_H
2020#define _SYS_STATFS_H 1
lib/libc/include/generic-glibc/sys/statvfs.h+2-2
......@@ -1,5 +1,5 @@
11/* Definitions for getting information about a filesystem.
2 Copyright (C) 1998-2019 Free Software Foundation, Inc.
2 Copyright (C) 1998-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_STATVFS_H
2020#define _SYS_STATVFS_H 1
lib/libc/include/generic-glibc/sys/swap.h+2-2
......@@ -1,5 +1,5 @@
11/* Calls to enable and disable swapping on specified locations. Linux version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SWAP_H
2020
lib/libc/include/generic-glibc/sys/syscall.h+6-9
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYSCALL_H
1919#define _SYSCALL_H 1
......@@ -23,12 +23,9 @@
2323 from the kernel sources. */
2424#include <asm/unistd.h>
2525
26#ifndef _LIBC
27/* The Linux kernel header file defines macros `__NR_<name>', but some
28 programs expect the traditional form `SYS_<name>'. So in building libc
29 we scan the kernel's list and produce <bits/syscall.h> with macros for
30 all the `SYS_' names. */
31# include <bits/syscall.h>
32#endif
26/* The Linux kernel header file defines macros __NR_*, but some
27 programs expect the traditional form SYS_*. <bits/syscall.h>
28 defines SYS_* macros for __NR_* macros of known names. */
29#include <bits/syscall.h>
3330
3431#endif
\ No newline at end of file
lib/libc/include/generic-glibc/sys/sysctl.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_SYSCTL_H
1919#define _SYS_SYSCTL_H 1
lib/libc/include/generic-glibc/sys/sysinfo.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_SYSINFO_H
1919#define _SYS_SYSINFO_H 1
lib/libc/include/generic-glibc/sys/sysmacros.h+2-2
......@@ -1,5 +1,5 @@
11/* Definitions of macros to access `dev_t' values.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SYSMACROS_H
2020#define _SYS_SYSMACROS_H 1
lib/libc/include/generic-glibc/sys/sysmips.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_SYSMIPS_H
1919#define _SYS_SYSMIPS_H 1
lib/libc/include/generic-glibc/sys/tas.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2000-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2000-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33 Contributed by Maciej W. Rozycki <macro@ds2.pg.gda.pl>, 2000.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_TAS_H
2020#define _SYS_TAS_H 1
lib/libc/include/generic-glibc/sys/time.h+14-13
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_TIME_H
1919#define _SYS_TIME_H 1
......@@ -54,23 +54,24 @@ struct timezone
5454 int tz_minuteswest; /* Minutes west of GMT. */
5555 int tz_dsttime; /* Nonzero if DST is ever in effect. */
5656 };
57
58typedef struct timezone *__restrict __timezone_ptr_t;
59#else
60typedef void *__restrict __timezone_ptr_t;
6157#endif
6258
63/* Get the current time of day and timezone information,
64 putting it into *TV and *TZ. If TZ is NULL, *TZ is not filled.
65 Returns 0 on success, -1 on errors.
66 NOTE: This form of timezone information is obsolete.
67 Use the functions and variables declared in <time.h> instead. */
59/* Get the current time of day, putting it into *TV.
60 If TZ is not null, *TZ must be a struct timezone, and both fields
61 will be set to zero.
62 Calling this function with a non-null TZ is obsolete;
63 use localtime etc. instead.
64 This function itself is semi-obsolete;
65 most callers should use time or clock_gettime instead. */
6866extern int gettimeofday (struct timeval *__restrict __tv,
69 __timezone_ptr_t __tz) __THROW __nonnull ((1));
67 void *__restrict __tz) __THROW __nonnull ((1));
7068
7169#ifdef __USE_MISC
7270/* Set the current time of day and timezone information.
73 This call is restricted to the super-user. */
71 This call is restricted to the super-user.
72 Setting the timezone in this way is obsolete, but we don't yet
73 warn about it because it still has some uses for which there is
74 no alternative. */
7475extern int settimeofday (const struct timeval *__tv,
7576 const struct timezone *__tz)
7677 __THROW;
lib/libc/include/generic-glibc/sys/timeb.h+4-3
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1994-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1994-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_TIMEB_H
1919#define _SYS_TIMEB_H 1
......@@ -36,7 +36,8 @@ struct timeb
3636
3737/* Fill in TIMEBUF with information about the current time. */
3838
39extern int ftime (struct timeb *__timebuf);
39extern int ftime (struct timeb *__timebuf)
40 __nonnull ((1)) __attribute_deprecated__;
4041
4142__END_DECLS
4243
lib/libc/include/generic-glibc/sys/timerfd.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2008-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_TIMERFD_H
1919#define _SYS_TIMERFD_H 1
lib/libc/include/generic-glibc/sys/times.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * POSIX Standard: 4.5.2 Process Times <sys/times.h>
lib/libc/include/generic-glibc/sys/timex.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_TIMEX_H
1919#define _SYS_TIMEX_H 1
lib/libc/include/generic-glibc/sys/types.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * POSIX Standard: 2.6 Primitive System Data Types <sys/types.h>
lib/libc/include/generic-glibc/sys/ucontext.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc. This file is part of the GNU C Library.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc. This file is part of the GNU C Library.
22
33 The GNU C Library is free software; you can redistribute it and/or
44 modify it under the terms of the GNU Lesser General Public
......@@ -12,7 +12,7 @@
1212
1313 You should have received a copy of the GNU Lesser General Public
1414 License along with the GNU C Library. If not, see
15 <http://www.gnu.org/licenses/>. */
15 <https://www.gnu.org/licenses/>. */
1616
1717/* Don't rely on this, the interface is currently messed up and may need to
1818 be broken to be fixed. */
lib/libc/include/generic-glibc/sys/uio.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_UIO_H
1919#define _SYS_UIO_H 1
lib/libc/include/generic-glibc/sys/un.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_UN_H
1919#define _SYS_UN_H 1
lib/libc/include/generic-glibc/sys/user.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_USER_H
1919#define _SYS_USER_H 1
lib/libc/include/generic-glibc/sys/utsname.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * POSIX Standard: 4.4 System Identification <sys/utsname.h>
lib/libc/include/generic-glibc/sys/vlimit.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_VLIMIT_H
1919#define _SYS_VLIMIT_H 1
lib/libc/include/generic-glibc/sys/vm86.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_VM86_H
1919
lib/libc/include/generic-glibc/sys/vtimes.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_VTIMES_H
1919#define _SYS_VTIMES_H 1
lib/libc/include/generic-glibc/sys/wait.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * POSIX Standard: 3.2.1 Wait for Process Termination <sys/wait.h>
lib/libc/include/generic-glibc/sys/xattr.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_XATTR_H
1919#define _SYS_XATTR_H 1
lib/libc/include/generic-glibc/tar.h+2-2
......@@ -1,5 +1,5 @@
11/* Extended tar format from POSIX.1.
2 Copyright (C) 1992-2019 Free Software Foundation, Inc.
2 Copyright (C) 1992-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44 Written by David J. MacKenzie.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _TAR_H
2121#define _TAR_H 1
lib/libc/include/generic-glibc/termios.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * POSIX Standard: 7.1-2 General Terminal Interface <termios.h>
lib/libc/include/generic-glibc/tgmath.h+171-26
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * ISO C99 Standard: 7.22 Type-generic math <tgmath.h>
......@@ -43,6 +43,25 @@
4343
4444#if __GNUC_PREREQ (2, 7)
4545
46/* Certain cases of narrowing macros only need to call a single
47 function so cannot use __builtin_tgmath and do not need any
48 complicated logic. */
49# if __HAVE_FLOAT128X
50# error "Unsupported _Float128x type for <tgmath.h>."
51# endif
52# if ((__HAVE_FLOAT64X && !__HAVE_FLOAT128) \
53 || (__HAVE_FLOAT128 && !__HAVE_FLOAT64X))
54# error "Unsupported combination of types for <tgmath.h>."
55# endif
56# define __TGMATH_2_NARROW_D(F, X, Y) \
57 (F ## l (X, Y))
58# define __TGMATH_2_NARROW_F64X(F, X, Y) \
59 (F ## f128 (X, Y))
60# if !__HAVE_FLOAT128
61# define __TGMATH_2_NARROW_F32X(F, X, Y) \
62 (F ## f64 (X, Y))
63# endif
64
4665# if __HAVE_BUILTIN_TGMATH
4766
4867# if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT)
......@@ -94,6 +113,33 @@
94113# define __TGMATH_2C(F, C, X, Y) __builtin_tgmath (__TGMATH_RCFUNCS (F, C) \
95114 (X), (Y))
96115
116# define __TGMATH_NARROW_FUNCS_F(X) X, X ## l,
117# define __TGMATH_NARROW_FUNCS_F16(X) \
118 __TG_F32_ARG (X) __TG_F64_ARG (X) __TG_F128_ARG (X) \
119 __TG_F32X_ARG (X) __TG_F64X_ARG (X) __TG_F128X_ARG (X)
120# define __TGMATH_NARROW_FUNCS_F32(X) \
121 __TG_F64_ARG (X) __TG_F128_ARG (X) \
122 __TG_F32X_ARG (X) __TG_F64X_ARG (X) __TG_F128X_ARG (X)
123# define __TGMATH_NARROW_FUNCS_F64(X) \
124 __TG_F128_ARG (X) \
125 __TG_F64X_ARG (X) __TG_F128X_ARG (X)
126# define __TGMATH_NARROW_FUNCS_F32X(X) \
127 __TG_F64X_ARG (X) __TG_F128X_ARG (X) \
128 __TG_F64_ARG (X) __TG_F128_ARG (X)
129
130# define __TGMATH_2_NARROW_F(F, X, Y) \
131 __builtin_tgmath (__TGMATH_NARROW_FUNCS_F (F) (X), (Y))
132# define __TGMATH_2_NARROW_F16(F, X, Y) \
133 __builtin_tgmath (__TGMATH_NARROW_FUNCS_F16 (F) (X), (Y))
134# define __TGMATH_2_NARROW_F32(F, X, Y) \
135 __builtin_tgmath (__TGMATH_NARROW_FUNCS_F32 (F) (X), (Y))
136# define __TGMATH_2_NARROW_F64(F, X, Y) \
137 __builtin_tgmath (__TGMATH_NARROW_FUNCS_F64 (F) (X), (Y))
138# if __HAVE_FLOAT128
139# define __TGMATH_2_NARROW_F32X(F, X, Y) \
140 __builtin_tgmath (__TGMATH_NARROW_FUNCS_F32X (F) (X), (Y))
141# endif
142
97143# else /* !__HAVE_BUILTIN_TGMATH. */
98144
99145# ifdef __NO_LONG_DOUBLE_MATH
......@@ -230,8 +276,6 @@
230276 __TGMATH_2 (Fct, (Val1), (Val2))
231277# define __TGMATH_BINARY_REAL_STD_ONLY(Val1, Val2, Fct) \
232278 __TGMATH_2STD (Fct, (Val1), (Val2))
233# define __TGMATH_BINARY_REAL_RET_ONLY(Val1, Val2, Fct) \
234 __TGMATH_2 (Fct, (Val1), (Val2))
235279# define __TGMATH_TERNARY_FIRST_SECOND_REAL_ONLY(Val1, Val2, Val3, Fct) \
236280 __TGMATH_3 (Fct, (Val1), (Val2), (Val3))
237281# define __TGMATH_TERNARY_REAL_ONLY(Val1, Val2, Val3, Fct) \
......@@ -326,18 +370,6 @@
326370 + (__tgmath_real_type (Val2)) 0)) \
327371 Fct##f (Val1, Val2)))
328372
329# define __TGMATH_BINARY_REAL_RET_ONLY(Val1, Val2, Fct) \
330 (__extension__ ((sizeof ((Val1) + (Val2)) > sizeof (double) \
331 && __builtin_classify_type ((Val1) + (Val2)) == 8) \
332 ? __TGMATH_F128 ((Val1) + (Val2), Fct, (Val1, Val2)) \
333 __tgml(Fct) (Val1, Val2) \
334 : (sizeof (+(Val1)) == sizeof (double) \
335 || sizeof (+(Val2)) == sizeof (double) \
336 || __builtin_classify_type (Val1) != 8 \
337 || __builtin_classify_type (Val2) != 8) \
338 ? Fct (Val1, Val2) \
339 : Fct##f (Val1, Val2)))
340
341373# define __TGMATH_TERNARY_FIRST_SECOND_REAL_ONLY(Val1, Val2, Val3, Fct) \
342374 (__extension__ ((sizeof ((Val1) + (Val2)) > sizeof (double) \
343375 && __builtin_classify_type ((Val1) + (Val2)) == 8) \
......@@ -507,6 +539,65 @@
507539 : (__typeof ((__tgmath_complex_type (Val1)) 0 \
508540 + (__tgmath_complex_type (Val2)) 0)) \
509541 Cfct##f (Val1, Val2))))
542
543# define __TGMATH_2_NARROW_F(F, X, Y) \
544 (__extension__ (sizeof ((__tgmath_real_type (X)) 0 \
545 + (__tgmath_real_type (Y)) 0) > sizeof (double) \
546 ? F ## l (X, Y) \
547 : F (X, Y)))
548/* In most cases, these narrowing macro definitions based on sizeof
549 ensure that the function called has the right argument format, as
550 for other <tgmath.h> macros for compilers before GCC 8, but may not
551 have exactly the argument type (among the types with that format)
552 specified in the standard logic.
553
554 In the case of macros for _Float32x return type, when _Float64x
555 exists, _Float64 arguments should result in the *f64 function being
556 called while _Float32x arguments should result in the *f64x
557 function being called. These cases cannot be distinguished using
558 sizeof (or at all if the types are typedefs rather than different
559 types). However, for these functions it is OK (does not affect the
560 final result) to call a function with any argument format at least
561 as wide as all the floating-point arguments, unless that affects
562 rounding of integer arguments. Integer arguments are considered to
563 have type _Float64, so the *f64 functions are preferred for f32x*
564 macros when no argument has a wider floating-point type. */
565# if __HAVE_FLOAT64X_LONG_DOUBLE && __HAVE_DISTINCT_FLOAT128
566# define __TGMATH_2_NARROW_F32(F, X, Y) \
567 (__extension__ (sizeof ((__tgmath_real_type (X)) 0 \
568 + (__tgmath_real_type (Y)) 0) > sizeof (_Float64) \
569 ? __TGMATH_F128 ((X) + (Y), F, (X, Y)) \
570 F ## f64x (X, Y) \
571 : F ## f64 (X, Y)))
572# define __TGMATH_2_NARROW_F64(F, X, Y) \
573 (__extension__ (sizeof ((__tgmath_real_type (X)) 0 \
574 + (__tgmath_real_type (Y)) 0) > sizeof (_Float64) \
575 ? __TGMATH_F128 ((X) + (Y), F, (X, Y)) \
576 F ## f64x (X, Y) \
577 : F ## f128 (X, Y)))
578# define __TGMATH_2_NARROW_F32X(F, X, Y) \
579 (__extension__ (sizeof ((__tgmath_real_type (X)) 0 \
580 + (__tgmath_real_type (Y)) 0) > sizeof (_Float64) \
581 ? __TGMATH_F128 ((X) + (Y), F, (X, Y)) \
582 F ## f64x (X, Y) \
583 : F ## f64 (X, Y)))
584# elif __HAVE_FLOAT128
585# define __TGMATH_2_NARROW_F32(F, X, Y) \
586 (__extension__ (sizeof ((__tgmath_real_type (X)) 0 \
587 + (__tgmath_real_type (Y)) 0) > sizeof (_Float64) \
588 ? F ## f128 (X, Y) \
589 : F ## f64 (X, Y)))
590# define __TGMATH_2_NARROW_F64(F, X, Y) \
591 (F ## f128 (X, Y))
592# define __TGMATH_2_NARROW_F32X(F, X, Y) \
593 (__extension__ (sizeof ((__tgmath_real_type (X)) 0 \
594 + (__tgmath_real_type (Y)) 0) > sizeof (_Float32x) \
595 ? F ## f64x (X, Y) \
596 : F ## f64 (X, Y)))
597# else
598# define __TGMATH_2_NARROW_F32(F, X, Y) \
599 (F ## f64 (X, Y))
600# endif
510601# endif /* !__HAVE_BUILTIN_TGMATH. */
511602#else
512603# error "Unsupported compiler; you cannot use <tgmath.h>"
......@@ -661,7 +752,7 @@
661752 prevailing rounding mode. */
662753#define rint(Val) __TGMATH_UNARY_REAL_ONLY (Val, rint)
663754
664#if __GLIBC_USE (IEC_60559_BFP_EXT)
755#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
665756/* Return X - epsilon. */
666757# define nextdown(Val) __TGMATH_UNARY_REAL_ONLY (Val, nextdown)
667758/* Return X + epsilon. */
......@@ -706,7 +797,7 @@
706797#define fma(Val1, Val2, Val3) \
707798 __TGMATH_TERNARY_REAL_ONLY (Val1, Val2, Val3, fma)
708799
709#if __GLIBC_USE (IEC_60559_BFP_EXT)
800#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
710801/* Round X to nearest integer value, rounding halfway cases to even. */
711802# define roundeven(Val) __TGMATH_UNARY_REAL_ONLY (Val, roundeven)
712803
......@@ -730,14 +821,6 @@
730821
731822/* Return value with minimum magnitude. */
732823# define fminmag(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fminmag)
733
734/* Total order operation. */
735# define totalorder(Val1, Val2) \
736 __TGMATH_BINARY_REAL_RET_ONLY (Val1, Val2, totalorder)
737
738/* Total order operation on absolute values. */
739# define totalordermag(Val1, Val2) \
740 __TGMATH_BINARY_REAL_RET_ONLY (Val1, Val2, totalordermag)
741824#endif
742825
743826
......@@ -761,4 +844,66 @@
761844/* Real part of Z. */
762845#define creal(Val) __TGMATH_UNARY_REAL_IMAG_RET_REAL_SAME (Val, creal)
763846
847
848/* Narrowing functions. */
849
850#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
851
852/* Add. */
853# define fadd(Val1, Val2) __TGMATH_2_NARROW_F (fadd, Val1, Val2)
854# define dadd(Val1, Val2) __TGMATH_2_NARROW_D (dadd, Val1, Val2)
855
856/* Divide. */
857# define fdiv(Val1, Val2) __TGMATH_2_NARROW_F (fdiv, Val1, Val2)
858# define ddiv(Val1, Val2) __TGMATH_2_NARROW_D (ddiv, Val1, Val2)
859
860/* Multiply. */
861# define fmul(Val1, Val2) __TGMATH_2_NARROW_F (fmul, Val1, Val2)
862# define dmul(Val1, Val2) __TGMATH_2_NARROW_D (dmul, Val1, Val2)
863
864/* Subtract. */
865# define fsub(Val1, Val2) __TGMATH_2_NARROW_F (fsub, Val1, Val2)
866# define dsub(Val1, Val2) __TGMATH_2_NARROW_D (dsub, Val1, Val2)
867
868#endif
869
870#if __GLIBC_USE (IEC_60559_TYPES_EXT)
871
872# if __HAVE_FLOAT16
873# define f16add(Val1, Val2) __TGMATH_2_NARROW_F16 (f16add, Val1, Val2)
874# define f16div(Val1, Val2) __TGMATH_2_NARROW_F16 (f16div, Val1, Val2)
875# define f16mul(Val1, Val2) __TGMATH_2_NARROW_F16 (f16mul, Val1, Val2)
876# define f16sub(Val1, Val2) __TGMATH_2_NARROW_F16 (f16sub, Val1, Val2)
877# endif
878
879# if __HAVE_FLOAT32
880# define f32add(Val1, Val2) __TGMATH_2_NARROW_F32 (f32add, Val1, Val2)
881# define f32div(Val1, Val2) __TGMATH_2_NARROW_F32 (f32div, Val1, Val2)
882# define f32mul(Val1, Val2) __TGMATH_2_NARROW_F32 (f32mul, Val1, Val2)
883# define f32sub(Val1, Val2) __TGMATH_2_NARROW_F32 (f32sub, Val1, Val2)
884# endif
885
886# if __HAVE_FLOAT64 && (__HAVE_FLOAT64X || __HAVE_FLOAT128)
887# define f64add(Val1, Val2) __TGMATH_2_NARROW_F64 (f64add, Val1, Val2)
888# define f64div(Val1, Val2) __TGMATH_2_NARROW_F64 (f64div, Val1, Val2)
889# define f64mul(Val1, Val2) __TGMATH_2_NARROW_F64 (f64mul, Val1, Val2)
890# define f64sub(Val1, Val2) __TGMATH_2_NARROW_F64 (f64sub, Val1, Val2)
891# endif
892
893# if __HAVE_FLOAT32X
894# define f32xadd(Val1, Val2) __TGMATH_2_NARROW_F32X (f32xadd, Val1, Val2)
895# define f32xdiv(Val1, Val2) __TGMATH_2_NARROW_F32X (f32xdiv, Val1, Val2)
896# define f32xmul(Val1, Val2) __TGMATH_2_NARROW_F32X (f32xmul, Val1, Val2)
897# define f32xsub(Val1, Val2) __TGMATH_2_NARROW_F32X (f32xsub, Val1, Val2)
898# endif
899
900# if __HAVE_FLOAT64X && (__HAVE_FLOAT128X || __HAVE_FLOAT128)
901# define f64xadd(Val1, Val2) __TGMATH_2_NARROW_F64X (f64xadd, Val1, Val2)
902# define f64xdiv(Val1, Val2) __TGMATH_2_NARROW_F64X (f64xdiv, Val1, Val2)
903# define f64xmul(Val1, Val2) __TGMATH_2_NARROW_F64X (f64xmul, Val1, Val2)
904# define f64xsub(Val1, Val2) __TGMATH_2_NARROW_F64X (f64xsub, Val1, Val2)
905# endif
906
907#endif
908
764909#endif /* tgmath.h */
\ No newline at end of file
lib/libc/include/generic-glibc/thread_db.h+2-2
......@@ -1,5 +1,5 @@
11/* thread_db.h -- interface to libthread_db.so library for debugging -lpthread
2 Copyright (C) 1999-2019 Free Software Foundation, Inc.
2 Copyright (C) 1999-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _THREAD_DB_H
2020#define _THREAD_DB_H 1
lib/libc/include/generic-glibc/threads.h+2-2
......@@ -1,5 +1,5 @@
11/* ISO C11 Standard: 7.26 - Thread support library <threads.h>.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _THREADS_H
2020#define _THREADS_H 1
lib/libc/include/generic-glibc/time.h+6-12
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * ISO C99 Standard: 7.23 Date and time <time.h>
......@@ -122,7 +122,7 @@ extern struct tm *gmtime (const time_t *__timer) __THROW;
122122 of *TIMER in the local timezone. */
123123extern struct tm *localtime (const time_t *__timer) __THROW;
124124
125#ifdef __USE_POSIX
125#if defined __USE_POSIX || __GLIBC_USE (ISOC2X)
126126/* Return the `struct tm' representation of *TIMER in UTC,
127127 using *TP to store the result. */
128128extern struct tm *gmtime_r (const time_t *__restrict __timer,
......@@ -132,7 +132,7 @@ extern struct tm *gmtime_r (const time_t *__restrict __timer,
132132 using *TP to store the result. */
133133extern struct tm *localtime_r (const time_t *__restrict __timer,
134134 struct tm *__restrict __tp) __THROW;
135#endif /* POSIX */
135#endif /* POSIX || C2X */
136136
137137/* Return a string of the form "Day Mon dd hh:mm:ss yyyy\n"
138138 that is the representation of TP in this format. */
......@@ -141,7 +141,7 @@ extern char *asctime (const struct tm *__tp) __THROW;
141141/* Equivalent to `asctime (localtime (timer))'. */
142142extern char *ctime (const time_t *__timer) __THROW;
143143
144#ifdef __USE_POSIX
144#if defined __USE_POSIX || __GLIBC_USE (ISOC2X)
145145/* Reentrant versions of the above functions. */
146146
147147/* 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,
152152/* Equivalent to `asctime_r (localtime_r (timer, *TMP*), buf)'. */
153153extern char *ctime_r (const time_t *__restrict __timer,
154154 char *__restrict __buf) __THROW;
155#endif /* POSIX */
155#endif /* POSIX || C2X */
156156
157157
158158/* Defined in localtime.c. */
......@@ -175,12 +175,6 @@ extern int daylight;
175175extern long int timezone;
176176#endif
177177
178#ifdef __USE_MISC
179/* Set the system time to *WHEN.
180 This call is restricted to the superuser. */
181extern int stime (const time_t *__when) __THROW;
182#endif
183
184178
185179/* Nonzero if YEAR is a leap year (every 4 years,
186180 except every 100th isn't, and every 400th is). */
lib/libc/include/generic-glibc/uchar.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2011-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2011-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * ISO C11 Standard: 7.28
lib/libc/include/generic-glibc/ucontext.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/* System V ABI compliant user-level context switching support. */
1919
lib/libc/include/generic-glibc/ulimit.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _ULIMIT_H
1919#define _ULIMIT_H 1
lib/libc/include/generic-glibc/unistd.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * POSIX Standard: 2.10 Symbolic Constants <unistd.h>
lib/libc/include/generic-glibc/utime.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * POSIX Standard: 5.6.6 Set File Access and Modification Times <utime.h>
lib/libc/include/generic-glibc/utmp.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1993-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1993-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _UTMP_H
1919#define _UTMP_H 1
lib/libc/include/generic-glibc/utmpx.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _UTMPX_H
1919#define _UTMPX_H 1
lib/libc/include/generic-glibc/values.h+2-2
......@@ -1,5 +1,5 @@
11/* Old compatibility names for <limits.h> and <float.h> constants.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* This interface is obsolete. New programs should use
2020 <limits.h> and/or <float.h> instead of <values.h>. */
lib/libc/include/generic-glibc/wchar.h+4-3
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * ISO C99 Standard: 7.24
......@@ -685,7 +685,8 @@ extern int vswscanf (const wchar_t *__restrict __s,
685685 __gnuc_va_list __arg)
686686 __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */;
687687
688# if !defined __USE_GNU \
688/* Same redirection as above for the v*wscanf family. */
689# if !__GLIBC_USE (DEPRECATED_SCANF) \
689690 && (!defined __LDBL_COMPAT || !defined __REDIRECT) \
690691 && (defined __STRICT_ANSI__ || defined __USE_XOPEN2K)
691692# ifdef __REDIRECT
lib/libc/include/generic-glibc/wctype.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/*
1919 * ISO C99 Standard: 7.25
lib/libc/include/generic-glibc/wordexp.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _WORDEXP_H
1919#define _WORDEXP_H 1
lib/libc/include/i386-linux-gnu/bits/endian.h deleted-7
......@@ -1,7 +0,0 @@
1/* i386/x86_64 are little-endian. */
2
3#ifndef _ENDIAN_H
4# error "Never use <bits/endian.h> directly; include <endian.h> instead."
5#endif
6
7#define __BYTE_ORDER __LITTLE_ENDIAN
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/endianness.h created+11
......@@ -0,0 +1,11 @@
1#ifndef _BITS_ENDIANNESS_H
2#define _BITS_ENDIANNESS_H 1
3
4#ifndef _BITS_ENDIAN_H
5# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
6#endif
7
8/* i386/x86_64 are little-endian. */
9#define __BYTE_ORDER __LITTLE_ENDIAN
10
11#endif /* bits/endianness.h */
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/environments.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _UNISTD_H
1919# error "Never include this file directly. Use <unistd.h> instead"
lib/libc/include/i386-linux-gnu/bits/epoll.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_EPOLL_H
1919# error "Never use <bits/epoll.h> directly; include <sys/epoll.h> instead."
lib/libc/include/i386-linux-gnu/bits/fcntl.h+2-2
......@@ -1,5 +1,5 @@
11/* O_*, F_*, FD_* bit values for Linux/x86.
2 Copyright (C) 2001-2019 Free Software Foundation, Inc.
2 Copyright (C) 2001-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _FCNTL_H
2020# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
lib/libc/include/i386-linux-gnu/bits/fenv.h+3-3
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _FENV_H
1919# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
......@@ -101,7 +101,7 @@ fenv_t;
101101# define FE_NOMASK_ENV ((const fenv_t *) -2)
102102#endif
103103
104#if __GLIBC_USE (IEC_60559_BFP_EXT)
104#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
105105/* Type representing floating-point control modes. */
106106typedef struct
107107 {
lib/libc/include/i386-linux-gnu/bits/floatn.h+2-2
......@@ -1,5 +1,5 @@
11/* Macros to control TS 18661-3 glibc features on x86.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_FLOATN_H
2020#define _BITS_FLOATN_H
lib/libc/include/i386-linux-gnu/bits/flt-eval-method.h+2-2
......@@ -1,5 +1,5 @@
11/* Define __GLIBC_FLT_EVAL_METHOD. x86 version.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _MATH_H
2020# error "Never use <bits/flt-eval-method.h> directly; include <math.h> instead."
lib/libc/include/i386-linux-gnu/bits/fp-logb.h+2-2
......@@ -1,5 +1,5 @@
11/* Define __FP_LOGB0_IS_MIN and __FP_LOGBNAN_IS_MIN. x86 version.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _MATH_H
2020# error "Never use <bits/fp-logb.h> directly; include <math.h> instead."
lib/libc/include/i386-linux-gnu/bits/indirect-return.h+2-2
......@@ -1,5 +1,5 @@
11/* Definition of __INDIRECT_RETURN. x86 version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _UCONTEXT_H
2020# error "Never include <bits/indirect-return.h> directly; use <ucontext.h> instead."
lib/libc/include/i386-linux-gnu/bits/ipctypes.h+2-2
......@@ -1,5 +1,5 @@
11/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM.
2 Copyright (C) 2012-2019 Free Software Foundation, Inc.
2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_IPC_H
2020# error "Never use <bits/ipctypes.h> directly; include <sys/ipc.h> instead."
lib/libc/include/i386-linux-gnu/bits/iscanonical.h+2-2
......@@ -1,5 +1,5 @@
11/* Define iscanonical macro. ldbl-96 version.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _MATH_H
2020# error "Never use <bits/iscanonical.h> directly; include <math.h> instead."
lib/libc/include/i386-linux-gnu/bits/link.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2004-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2004-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _LINK_H
1919# error "Never include <bits/link.h> directly; use <link.h> instead."
lib/libc/include/i386-linux-gnu/bits/long-double.h+4-3
......@@ -1,5 +1,5 @@
11/* Properties of long double type. ldbl-96 version.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,8 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* long double is distinct from double, so there is nothing to
20 define here. */
\ No newline at end of file
20 define here. */
21#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/math-vector.h+2-2
......@@ -1,5 +1,5 @@
11/* Platform-specific SIMD declarations of math functions.
2 Copyright (C) 2014-2019 Free Software Foundation, Inc.
2 Copyright (C) 2014-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _MATH_H
2020# error "Never include <bits/math-vector.h> directly;\
lib/libc/include/i386-linux-gnu/bits/mman.h+2-2
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX memory map interface. Linux/x86_64 version.
2 Copyright (C) 2001-2019 Free Software Foundation, Inc.
2 Copyright (C) 2001-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_MMAN_H
2020# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
lib/libc/include/i386-linux-gnu/bits/procfs-id.h+2-2
......@@ -1,5 +1,5 @@
11/* Types of pr_uid and pr_gid in struct elf_prpsinfo. x86 version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _SYS_PROCFS_H
2121# error "Never include <bits/procfs-id.h> directly; use <sys/procfs.h> instead."
lib/libc/include/i386-linux-gnu/bits/procfs.h+2-2
......@@ -1,5 +1,5 @@
11/* Types for registers for sys/procfs.h. x86 version.
2 Copyright (C) 2001-2019 Free Software Foundation, Inc.
2 Copyright (C) 2001-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_PROCFS_H
2020# error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead."
lib/libc/include/i386-linux-gnu/bits/pthreadtypes-arch.h+2-53
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _BITS_PTHREADTYPES_ARCH_H
1919#define _BITS_PTHREADTYPES_ARCH_H 1
......@@ -24,20 +24,17 @@
2424# if __WORDSIZE == 64
2525# define __SIZEOF_PTHREAD_MUTEX_T 40
2626# define __SIZEOF_PTHREAD_ATTR_T 56
27# define __SIZEOF_PTHREAD_MUTEX_T 40
2827# define __SIZEOF_PTHREAD_RWLOCK_T 56
2928# define __SIZEOF_PTHREAD_BARRIER_T 32
3029# else
3130# define __SIZEOF_PTHREAD_MUTEX_T 32
3231# define __SIZEOF_PTHREAD_ATTR_T 32
33# define __SIZEOF_PTHREAD_MUTEX_T 32
3432# define __SIZEOF_PTHREAD_RWLOCK_T 44
3533# define __SIZEOF_PTHREAD_BARRIER_T 20
3634# endif
3735#else
3836# define __SIZEOF_PTHREAD_MUTEX_T 24
3937# define __SIZEOF_PTHREAD_ATTR_T 36
40# define __SIZEOF_PTHREAD_MUTEX_T 24
4138# define __SIZEOF_PTHREAD_RWLOCK_T 32
4239# define __SIZEOF_PTHREAD_BARRIER_T 20
4340#endif
......@@ -47,57 +44,9 @@
4744#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
4845#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
4946
50/* Definitions for internal mutex struct. */
51#define __PTHREAD_COMPAT_PADDING_MID
52#define __PTHREAD_COMPAT_PADDING_END
53#define __PTHREAD_MUTEX_LOCK_ELISION 1
54#ifdef __x86_64__
55# define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 0
56# define __PTHREAD_MUTEX_USE_UNION 0
57#else
58# define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 1
59# define __PTHREAD_MUTEX_USE_UNION 1
60#endif
61
6247#define __LOCK_ALIGNMENT
6348#define __ONCE_ALIGNMENT
6449
65struct __pthread_rwlock_arch_t
66{
67 unsigned int __readers;
68 unsigned int __writers;
69 unsigned int __wrphase_futex;
70 unsigned int __writers_futex;
71 unsigned int __pad3;
72 unsigned int __pad4;
73#ifdef __x86_64__
74 int __cur_writer;
75 int __shared;
76 signed char __rwelision;
77# ifdef __ILP32__
78 unsigned char __pad1[3];
79# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0 }
80# else
81 unsigned char __pad1[7];
82# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0, 0, 0, 0, 0 }
83# endif
84 unsigned long int __pad2;
85 /* FLAGS must stay at this position in the structure to maintain
86 binary compatibility. */
87 unsigned int __flags;
88# define __PTHREAD_RWLOCK_INT_FLAGS_SHARED 1
89#else
90 /* FLAGS must stay at this position in the structure to maintain
91 binary compatibility. */
92 unsigned char __flags;
93 unsigned char __shared;
94 signed char __rwelision;
95# define __PTHREAD_RWLOCK_ELISION_EXTRA 0
96 unsigned char __pad2;
97 int __cur_writer;
98#endif
99};
100
10150#ifndef __x86_64__
10251/* Extra attributes for the cleanup functions. */
10352# define __cleanup_fct_attribute __attribute__ ((__regparm__ (1)))
lib/libc/include/i386-linux-gnu/bits/select.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_SELECT_H
1919# error "Never use <bits/select.h> directly; include <sys/select.h> instead."
lib/libc/include/i386-linux-gnu/bits/sem-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct semid_ds. x86 version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SEM_H
2020# error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead."
lib/libc/include/i386-linux-gnu/bits/semaphore.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33 Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SEMAPHORE_H
2020# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
lib/libc/include/i386-linux-gnu/bits/setjmp.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2001-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/* Define the machine-dependent type `jmp_buf'. x86-64 version. */
1919#ifndef _BITS_SETJMP_H
lib/libc/include/i386-linux-gnu/bits/sigcontext.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _BITS_SIGCONTEXT_H
1919#define _BITS_SIGCONTEXT_H 1
lib/libc/include/i386-linux-gnu/bits/stat.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#if !defined _SYS_STAT_H && !defined _FCNTL_H
1919# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
lib/libc/include/i386-linux-gnu/bits/struct_mutex.h created+63
......@@ -0,0 +1,63 @@
1/* x86 internal mutex struct definitions.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19#ifndef _THREAD_MUTEX_INTERNAL_H
20#define _THREAD_MUTEX_INTERNAL_H 1
21
22struct __pthread_mutex_s
23{
24 int __lock;
25 unsigned int __count;
26 int __owner;
27#ifdef __x86_64__
28 unsigned int __nusers;
29#endif
30 /* KIND must stay at this position in the structure to maintain
31 binary compatibility with static initializers. */
32 int __kind;
33#ifdef __x86_64__
34 short __spins;
35 short __elision;
36 __pthread_list_t __list;
37# define __PTHREAD_MUTEX_HAVE_PREV 1
38#else
39 unsigned int __nusers;
40 __extension__ union
41 {
42 struct
43 {
44 short __espins;
45 short __eelision;
46# define __spins __elision_data.__espins
47# define __elision __elision_data.__eelision
48 } __elision_data;
49 __pthread_slist_t __list;
50 };
51# define __PTHREAD_MUTEX_HAVE_PREV 0
52#endif
53};
54
55#ifdef __x86_64__
56# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
57 0, 0, 0, 0, __kind, 0, 0, { 0, 0 }
58#else
59# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
60 0, 0, 0, __kind, 0, { { 0, 0 } }
61#endif
62
63#endif
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/struct_rwlock.h created+65
......@@ -0,0 +1,65 @@
1/* x86 internal rwlock struct definitions.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
3
4 This file is part of the GNU C Library.
5
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
19
20#ifndef _RWLOCK_INTERNAL_H
21#define _RWLOCK_INTERNAL_H
22
23struct __pthread_rwlock_arch_t
24{
25 unsigned int __readers;
26 unsigned int __writers;
27 unsigned int __wrphase_futex;
28 unsigned int __writers_futex;
29 unsigned int __pad3;
30 unsigned int __pad4;
31#ifdef __x86_64__
32 int __cur_writer;
33 int __shared;
34 signed char __rwelision;
35# ifdef __ILP32__
36 unsigned char __pad1[3];
37# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0 }
38# else
39 unsigned char __pad1[7];
40# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0, 0, 0, 0, 0 }
41# endif
42 unsigned long int __pad2;
43 /* FLAGS must stay at this position in the structure to maintain
44 binary compatibility. */
45 unsigned int __flags;
46#else /* __x86_64__ */
47 /* FLAGS must stay at this position in the structure to maintain
48 binary compatibility. */
49 unsigned char __flags;
50 unsigned char __shared;
51 signed char __rwelision;
52 unsigned char __pad2;
53 int __cur_writer;
54#endif
55};
56
57#ifdef __x86_64__
58# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
59 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, __flags
60#else
61# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
62 0, 0, 0, 0, 0, 0, __flags, 0, 0, 0, 0
63#endif
64
65#endif
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/sysctl.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2012-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2012-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#if defined __x86_64__ && defined __ILP32__
1919# error "sysctl system call is unsupported in x32 kernel"
lib/libc/include/i386-linux-gnu/bits/timesize.h+2-2
......@@ -1,5 +1,5 @@
11/* Bit size of the time_t type at glibc build time, x86-64 and x32 case.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#if defined __x86_64__ && defined __ILP32__
2020/* For x32, time is 64-bit even though word size is 32-bit. */
lib/libc/include/i386-linux-gnu/bits/typesizes.h+7-2
......@@ -1,5 +1,5 @@
11/* bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
2 Copyright (C) 2012-2019 Free Software Foundation, Inc.
2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_TYPES_H
2020# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
......@@ -84,8 +84,13 @@
8484
8585/* And for __rlim_t and __rlim64_t. */
8686# define __RLIM_T_MATCHES_RLIM64_T 1
87
88/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
89# define __STATFS_MATCHES_STATFS64 1
8790#else
8891# define __RLIM_T_MATCHES_RLIM64_T 0
92
93# define __STATFS_MATCHES_STATFS64 0
8994#endif
9095
9196/* Number of descriptors that can fit in an `fd_set'. */
lib/libc/include/i386-linux-gnu/finclude/math-vector-fortran.h+2-2
......@@ -1,5 +1,5 @@
11! Platform-specific declarations of SIMD math functions for Fortran. -*- f90 -*-
2! Copyright (C) 2019 Free Software Foundation, Inc.
2! Copyright (C) 2019-2020 Free Software Foundation, Inc.
33! This file is part of the GNU C Library.
44!
55! The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414!
1515! You should have received a copy of the GNU Lesser General Public
1616! License along with the GNU C Library; if not, see
17! <http://www.gnu.org/licenses/>.
17! <https://www.gnu.org/licenses/>.
1818
1919!GCC$ builtin (cos) attributes simd (notinbranch) if('x86_64')
2020!GCC$ builtin (cosf) attributes simd (notinbranch) if('x86_64')
lib/libc/include/i386-linux-gnu/fpu_control.h+2-2
......@@ -1,5 +1,5 @@
11/* FPU control word bits. x86 version.
2 Copyright (C) 1993-2019 Free Software Foundation, Inc.
2 Copyright (C) 1993-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44 Contributed by Olaf Flebbe.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _FPU_CONTROL_H
2121#define _FPU_CONTROL_H 1
lib/libc/include/i386-linux-gnu/sys/elf.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_ELF_H
1919#define _SYS_ELF_H 1
lib/libc/include/i386-linux-gnu/sys/ptrace.h+7-3
......@@ -1,5 +1,5 @@
11/* `ptrace' debugger support interface. Linux/x86 version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _SYS_PTRACE_H
2121#define _SYS_PTRACE_H 1
......@@ -186,8 +186,12 @@ enum __ptrace_request
186186#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER
187187
188188 /* Get seccomp BPF filter metadata. */
189 PTRACE_SECCOMP_GET_METADATA = 0x420d
189 PTRACE_SECCOMP_GET_METADATA = 0x420d,
190190#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
191
192 /* Get information about system call. */
193 PTRACE_GET_SYSCALL_INFO = 0x420e
194#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
191195};
192196
193197
lib/libc/include/i386-linux-gnu/sys/ucontext.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2001-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_UCONTEXT_H
1919#define _SYS_UCONTEXT_H 1
lib/libc/include/i386-linux-gnu/sys/user.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2001-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_USER_H
1919#define _SYS_USER_H 1
lib/libc/include/mips-linux-gnu/bits/dlfcn.h+2-2
......@@ -1,5 +1,5 @@
11/* System dependent definitions for run-time dynamic loading.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _DLFCN_H
2020# error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead."
lib/libc/include/mips-linux-gnu/bits/errno.h+2-2
......@@ -1,5 +1,5 @@
11/* Error constants. MIPS/Linux specific version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_ERRNO_H
2020
lib/libc/include/mips-linux-gnu/bits/eventfd.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_EVENTFD_H
1919# error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead."
lib/libc/include/mips-linux-gnu/bits/inotify.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_INOTIFY_H
1919# error "Never use <bits/inotify.h> directly; include <sys/inotify.h> instead."
lib/libc/include/mips-linux-gnu/bits/ioctl-types.h+2-2
......@@ -1,5 +1,5 @@
11/* Structure types for pre-termios terminal ioctls. Linux/MIPS version.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_IOCTL_H
2020# error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead."
lib/libc/include/mips-linux-gnu/bits/ipc.h deleted-54
......@@ -1,54 +0,0 @@
1/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_IPC_H
19# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
20#endif
21
22#include <bits/types.h>
23
24/* Mode bits for `msgget', `semget', and `shmget'. */
25#define IPC_CREAT 01000 /* Create key if key does not exist. */
26#define IPC_EXCL 02000 /* Fail if key exists. */
27#define IPC_NOWAIT 04000 /* Return error on wait. */
28
29/* Control commands for `msgctl', `semctl', and `shmctl'. */
30#define IPC_RMID 0 /* Remove identifier. */
31#define IPC_SET 1 /* Set `ipc_perm' options. */
32#define IPC_STAT 2 /* Get `ipc_perm' options. */
33#ifdef __USE_GNU
34# define IPC_INFO 3 /* See ipcs. */
35#endif
36
37/* Special key values. */
38#define IPC_PRIVATE ((__key_t) 0) /* Private key. */
39
40
41/* Data structure used to pass permission information to IPC operations. */
42struct ipc_perm
43 {
44 __key_t __key; /* Key. */
45 unsigned int uid; /* Owner's user ID. */
46 unsigned int gid; /* Owner's group ID. */
47 unsigned int cuid; /* Creator's user ID. */
48 unsigned int cgid; /* Creator's group ID. */
49 unsigned int mode; /* Read/write permission. */
50 unsigned short int __seq; /* Sequence number. */
51 unsigned short int __pad1;
52 unsigned long int __glibc_reserved1;
53 unsigned long int __glibc_reserved2;
54};
\ No newline at end of file
lib/libc/include/mips-linux-gnu/bits/ipctypes.h+2-2
......@@ -1,5 +1,5 @@
11/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. MIPS version
2 Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 Copyright (C) 2002-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/*
2020 * Never include <bits/ipctypes.h> directly.
lib/libc/include/mips-linux-gnu/bits/local_lim.h+2-2
......@@ -1,5 +1,5 @@
11/* Minimum guaranteed maximum values for system limits. MIPS Linux version.
2 Copyright (C) 1993-2019 Free Software Foundation, Inc.
2 Copyright (C) 1993-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* The kernel header pollutes the namespace with the NR_OPEN symbol
2020 and defines LINK_MAX although filesystems have different maxima. A
lib/libc/include/mips-linux-gnu/bits/mman.h+2-2
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX memory map interface. Linux/MIPS version.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_MMAN_H
2020# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
lib/libc/include/mips-linux-gnu/bits/msq-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct msqid_ds. MIPS version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_MSG_H
2020# error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead."
lib/libc/include/mips-linux-gnu/bits/poll.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_POLL_H
1919# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
lib/libc/include/mips-linux-gnu/bits/pthreadtypes-arch.h created+44
......@@ -0,0 +1,44 @@
1/* Machine-specific pthread type layouts. MIPS version.
2 Copyright (C) 2005-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library. If not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _BITS_PTHREADTYPES_ARCH_H
20#define _BITS_PTHREADTYPES_ARCH_H 1
21
22#include <bits/endian.h>
23
24#if _MIPS_SIM == _ABI64
25# define __SIZEOF_PTHREAD_ATTR_T 56
26# define __SIZEOF_PTHREAD_MUTEX_T 40
27# define __SIZEOF_PTHREAD_RWLOCK_T 56
28# define __SIZEOF_PTHREAD_BARRIER_T 32
29#else
30# define __SIZEOF_PTHREAD_ATTR_T 36
31# define __SIZEOF_PTHREAD_MUTEX_T 24
32# define __SIZEOF_PTHREAD_RWLOCK_T 32
33# define __SIZEOF_PTHREAD_BARRIER_T 20
34#endif
35#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
36#define __SIZEOF_PTHREAD_COND_T 48
37#define __SIZEOF_PTHREAD_CONDATTR_T 4
38#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
39#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
40
41#define __LOCK_ALIGNMENT
42#define __ONCE_ALIGNMENT
43
44#endif /* bits/pthreadtypes.h */
\ No newline at end of file
lib/libc/include/mips-linux-gnu/bits/resource.h+2-2
......@@ -1,5 +1,5 @@
11/* Bit values & structures for resource limits. Linux/MIPS version.
2 Copyright (C) 1994-2019 Free Software Foundation, Inc.
2 Copyright (C) 1994-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_RESOURCE_H
2020# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
lib/libc/include/mips-linux-gnu/bits/sem-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct semid_ds. MIPS version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SEM_H
2020# error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead."
lib/libc/include/mips-linux-gnu/bits/shm-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct shmid_ds. MIPS version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SHM_H
2020# error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead."
lib/libc/include/mips-linux-gnu/bits/shmlba.h+2-2
......@@ -1,5 +1,5 @@
11/* Define SHMLBA. MIPS version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SHM_H
2020# error "Never use <bits/shmlba.h> directly; include <sys/shm.h> instead."
lib/libc/include/mips-linux-gnu/bits/sigaction.h+2-2
......@@ -1,5 +1,5 @@
11/* The proper definitions for Linux/MIPS's sigaction.
2 Copyright (C) 1993-2019 Free Software Foundation, Inc.
2 Copyright (C) 1993-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_SIGACTION_H
2020#define _BITS_SIGACTION_H 1
lib/libc/include/mips-linux-gnu/bits/sigcontext.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc. This file is part of the GNU C Library.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc. This file is part of the GNU C Library.
22
33 The GNU C Library is free software; you can redistribute it and/or
44 modify it under the terms of the GNU Lesser General Public
......@@ -12,7 +12,7 @@
1212
1313 You should have received a copy of the GNU Lesser General Public
1414 License along with the GNU C Library. If not, see
15 <http://www.gnu.org/licenses/>. */
15 <https://www.gnu.org/licenses/>. */
1616
1717#ifndef _BITS_SIGCONTEXT_H
1818#define _BITS_SIGCONTEXT_H 1
lib/libc/include/mips-linux-gnu/bits/signalfd.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_SIGNALFD_H
1919# error "Never use <bits/signalfd.h> directly; include <sys/signalfd.h> instead."
lib/libc/include/mips-linux-gnu/bits/signum.h+2-2
......@@ -1,5 +1,5 @@
11/* Signal number definitions. Linux/MIPS version.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_SIGNUM_H
2020#define _BITS_SIGNUM_H 1
lib/libc/include/mips-linux-gnu/bits/socket-constants.h+2-2
......@@ -1,5 +1,5 @@
11/* Socket constants which vary among Linux architectures. Version for MIPS.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SOCKET_H
2020# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
lib/libc/include/mips-linux-gnu/bits/socket_type.h+2-2
......@@ -1,5 +1,5 @@
11/* Define enum __socket_type for Linux/MIPS.
2 Copyright (C) 1991-2019 Free Software Foundation, Inc.
2 Copyright (C) 1991-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SOCKET_H
2020# error "Never include <bits/socket_type.h> directly; use <sys/socket.h> instead."
lib/libc/include/mips-linux-gnu/bits/statfs.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_STATFS_H
1919# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
lib/libc/include/mips-linux-gnu/bits/struct_mutex.h created+56
......@@ -0,0 +1,56 @@
1/* MIPS internal mutex struct definitions.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19#ifndef _THREAD_MUTEX_INTERNAL_H
20#define _THREAD_MUTEX_INTERNAL_H 1
21
22struct __pthread_mutex_s
23{
24 int __lock;
25 unsigned int __count;
26 int __owner;
27#if _MIPS_SIM == _ABI64
28 unsigned int __nusers;
29#endif
30 /* KIND must stay at this position in the structure to maintain
31 binary compatibility with static initializers. */
32 int __kind;
33#if _MIPS_SIM == _ABI64
34 int __spins;
35 __pthread_list_t __list;
36# define __PTHREAD_MUTEX_HAVE_PREV 1
37#else
38 unsigned int __nusers;
39 __extension__ union
40 {
41 int __spins;
42 __pthread_slist_t __list;
43 };
44# define __PTHREAD_MUTEX_HAVE_PREV 0
45#endif
46};
47
48#if _MIPS_SIM == _ABI64
49# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
50 0, 0, 0, 0, __kind, 0, { 0, 0 }
51#else
52# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
53 0, 0, 0, __kind, 0, { 0 }
54#endif
55
56#endif
\ No newline at end of file
lib/libc/include/mips-linux-gnu/bits/termios-c_cc.h+2-2
......@@ -1,5 +1,5 @@
11/* termios c_cc symbolic constant definitions. Linux/mips version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-c_cc.h> directly; use <termios.h> instead."
lib/libc/include/mips-linux-gnu/bits/termios-c_lflag.h+2-2
......@@ -1,5 +1,5 @@
11/* termios local mode definitions. Linux/mips version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-c_lflag.h> directly; use <termios.h> instead."
lib/libc/include/mips-linux-gnu/bits/termios-struct.h+2-2
......@@ -1,5 +1,5 @@
11/* struct termios definition. Linux/mips version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-struct.h> directly; use <termios.h> instead."
lib/libc/include/mips-linux-gnu/bits/termios-tcflow.h+2-2
......@@ -1,5 +1,5 @@
11/* termios local mode definitions. Linux/mips version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-tcflow.h> directly; use <termios.h> instead."
lib/libc/include/mips-linux-gnu/bits/timerfd.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2008-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_TIMERFD_H
1919# error "Never use <bits/timerfd.h> directly; include <sys/timerfd.h> instead."
lib/libc/include/mips-linux-gnu/bits/types/stack_t.h+2-2
......@@ -1,5 +1,5 @@
11/* Define stack_t. MIPS Linux version.
2 Copyright (C) 1998-2019 Free Software Foundation, Inc.
2 Copyright (C) 1998-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef __stack_t_defined
2020#define __stack_t_defined 1
lib/libc/include/mips-linux-gnu/ieee754.h+12-9
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,16 +13,19 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _IEEE754_H
19
2019#define _IEEE754_H 1
20
2121#include <features.h>
2222
23#include <endian.h>
23#include <bits/endian.h>
2424
25#include <float.h>
25#ifndef __LDBL_MANT_DIG__
26# include <float.h>
27# define __LDBL_MANT_DIG__ LDBL_MANT_DIG
28#endif
2629
2730__BEGIN_DECLS
2831
......@@ -127,7 +130,7 @@ union ieee754_double
127130
128131#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */
129132
130#if LDBL_MANT_DIG == 113
133#if __LDBL_MANT_DIG__ == 113
131134
132135union ieee854_long_double
133136 {
......@@ -184,7 +187,7 @@ union ieee854_long_double
184187
185188#define IEEE854_LONG_DOUBLE_BIAS 0x3fff /* Added to exponent. */
186189
187#elif LDBL_MANT_DIG == 64
190#elif __LDBL_MANT_DIG__ == 64
188191
189192union ieee854_long_double
190193 {
......@@ -253,7 +256,7 @@ union ieee854_long_double
253256
254257#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
255258
256#elif LDBL_MANT_DIG == 53
259#elif __LDBL_MANT_DIG__ == 53
257260
258261union ieee854_long_double
259262 {
......@@ -316,7 +319,7 @@ union ieee854_long_double
316319
317320#define IEEE854_LONG_DOUBLE_BIAS 0x3ff /* Added to exponent. */
318321
319#endif /* LDBL_MANT_DIG == 53 */
322#endif /* __LDBL_MANT_DIG__ == 53 */
320323
321324__END_DECLS
322325
lib/libc/include/mips64-linux-gnuabi64/bits/dlfcn.h+2-2
......@@ -1,5 +1,5 @@
11/* System dependent definitions for run-time dynamic loading.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _DLFCN_H
2020# error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead."
lib/libc/include/mips64-linux-gnuabi64/bits/errno.h+2-2
......@@ -1,5 +1,5 @@
11/* Error constants. MIPS/Linux specific version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_ERRNO_H
2020
lib/libc/include/mips64-linux-gnuabi64/bits/eventfd.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_EVENTFD_H
1919# error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead."
lib/libc/include/mips64-linux-gnuabi64/bits/inotify.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_INOTIFY_H
1919# error "Never use <bits/inotify.h> directly; include <sys/inotify.h> instead."
lib/libc/include/mips64-linux-gnuabi64/bits/ioctl-types.h+2-2
......@@ -1,5 +1,5 @@
11/* Structure types for pre-termios terminal ioctls. Linux/MIPS version.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_IOCTL_H
2020# error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead."
lib/libc/include/mips64-linux-gnuabi64/bits/ipc.h deleted-54
......@@ -1,54 +0,0 @@
1/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_IPC_H
19# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
20#endif
21
22#include <bits/types.h>
23
24/* Mode bits for `msgget', `semget', and `shmget'. */
25#define IPC_CREAT 01000 /* Create key if key does not exist. */
26#define IPC_EXCL 02000 /* Fail if key exists. */
27#define IPC_NOWAIT 04000 /* Return error on wait. */
28
29/* Control commands for `msgctl', `semctl', and `shmctl'. */
30#define IPC_RMID 0 /* Remove identifier. */
31#define IPC_SET 1 /* Set `ipc_perm' options. */
32#define IPC_STAT 2 /* Get `ipc_perm' options. */
33#ifdef __USE_GNU
34# define IPC_INFO 3 /* See ipcs. */
35#endif
36
37/* Special key values. */
38#define IPC_PRIVATE ((__key_t) 0) /* Private key. */
39
40
41/* Data structure used to pass permission information to IPC operations. */
42struct ipc_perm
43 {
44 __key_t __key; /* Key. */
45 unsigned int uid; /* Owner's user ID. */
46 unsigned int gid; /* Owner's group ID. */
47 unsigned int cuid; /* Creator's user ID. */
48 unsigned int cgid; /* Creator's group ID. */
49 unsigned int mode; /* Read/write permission. */
50 unsigned short int __seq; /* Sequence number. */
51 unsigned short int __pad1;
52 unsigned long int __glibc_reserved1;
53 unsigned long int __glibc_reserved2;
54};
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabi64/bits/ipctypes.h+2-2
......@@ -1,5 +1,5 @@
11/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. MIPS version
2 Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 Copyright (C) 2002-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/*
2020 * Never include <bits/ipctypes.h> directly.
lib/libc/include/mips64-linux-gnuabi64/bits/local_lim.h+2-2
......@@ -1,5 +1,5 @@
11/* Minimum guaranteed maximum values for system limits. MIPS Linux version.
2 Copyright (C) 1993-2019 Free Software Foundation, Inc.
2 Copyright (C) 1993-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* The kernel header pollutes the namespace with the NR_OPEN symbol
2020 and defines LINK_MAX although filesystems have different maxima. A
lib/libc/include/mips64-linux-gnuabi64/bits/mman.h+2-2
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX memory map interface. Linux/MIPS version.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_MMAN_H
2020# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
lib/libc/include/mips64-linux-gnuabi64/bits/msq-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct msqid_ds. MIPS version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_MSG_H
2020# error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead."
lib/libc/include/mips64-linux-gnuabi64/bits/poll.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_POLL_H
1919# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
lib/libc/include/mips64-linux-gnuabi64/bits/pthreadtypes-arch.h created+44
......@@ -0,0 +1,44 @@
1/* Machine-specific pthread type layouts. MIPS version.
2 Copyright (C) 2005-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library. If not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _BITS_PTHREADTYPES_ARCH_H
20#define _BITS_PTHREADTYPES_ARCH_H 1
21
22#include <bits/endian.h>
23
24#if _MIPS_SIM == _ABI64
25# define __SIZEOF_PTHREAD_ATTR_T 56
26# define __SIZEOF_PTHREAD_MUTEX_T 40
27# define __SIZEOF_PTHREAD_RWLOCK_T 56
28# define __SIZEOF_PTHREAD_BARRIER_T 32
29#else
30# define __SIZEOF_PTHREAD_ATTR_T 36
31# define __SIZEOF_PTHREAD_MUTEX_T 24
32# define __SIZEOF_PTHREAD_RWLOCK_T 32
33# define __SIZEOF_PTHREAD_BARRIER_T 20
34#endif
35#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
36#define __SIZEOF_PTHREAD_COND_T 48
37#define __SIZEOF_PTHREAD_CONDATTR_T 4
38#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
39#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
40
41#define __LOCK_ALIGNMENT
42#define __ONCE_ALIGNMENT
43
44#endif /* bits/pthreadtypes.h */
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabi64/bits/resource.h+2-2
......@@ -1,5 +1,5 @@
11/* Bit values & structures for resource limits. Linux/MIPS version.
2 Copyright (C) 1994-2019 Free Software Foundation, Inc.
2 Copyright (C) 1994-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_RESOURCE_H
2020# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
lib/libc/include/mips64-linux-gnuabi64/bits/sem-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct semid_ds. MIPS version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SEM_H
2020# error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead."
lib/libc/include/mips64-linux-gnuabi64/bits/shm-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct shmid_ds. MIPS version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SHM_H
2020# error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead."
lib/libc/include/mips64-linux-gnuabi64/bits/shmlba.h+2-2
......@@ -1,5 +1,5 @@
11/* Define SHMLBA. MIPS version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SHM_H
2020# error "Never use <bits/shmlba.h> directly; include <sys/shm.h> instead."
lib/libc/include/mips64-linux-gnuabi64/bits/sigaction.h+2-2
......@@ -1,5 +1,5 @@
11/* The proper definitions for Linux/MIPS's sigaction.
2 Copyright (C) 1993-2019 Free Software Foundation, Inc.
2 Copyright (C) 1993-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_SIGACTION_H
2020#define _BITS_SIGACTION_H 1
lib/libc/include/mips64-linux-gnuabi64/bits/sigcontext.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc. This file is part of the GNU C Library.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc. This file is part of the GNU C Library.
22
33 The GNU C Library is free software; you can redistribute it and/or
44 modify it under the terms of the GNU Lesser General Public
......@@ -12,7 +12,7 @@
1212
1313 You should have received a copy of the GNU Lesser General Public
1414 License along with the GNU C Library. If not, see
15 <http://www.gnu.org/licenses/>. */
15 <https://www.gnu.org/licenses/>. */
1616
1717#ifndef _BITS_SIGCONTEXT_H
1818#define _BITS_SIGCONTEXT_H 1
lib/libc/include/mips64-linux-gnuabi64/bits/signalfd.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_SIGNALFD_H
1919# error "Never use <bits/signalfd.h> directly; include <sys/signalfd.h> instead."
lib/libc/include/mips64-linux-gnuabi64/bits/signum.h+2-2
......@@ -1,5 +1,5 @@
11/* Signal number definitions. Linux/MIPS version.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_SIGNUM_H
2020#define _BITS_SIGNUM_H 1
lib/libc/include/mips64-linux-gnuabi64/bits/socket-constants.h+2-2
......@@ -1,5 +1,5 @@
11/* Socket constants which vary among Linux architectures. Version for MIPS.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SOCKET_H
2020# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
lib/libc/include/mips64-linux-gnuabi64/bits/socket_type.h+2-2
......@@ -1,5 +1,5 @@
11/* Define enum __socket_type for Linux/MIPS.
2 Copyright (C) 1991-2019 Free Software Foundation, Inc.
2 Copyright (C) 1991-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SOCKET_H
2020# error "Never include <bits/socket_type.h> directly; use <sys/socket.h> instead."
lib/libc/include/mips64-linux-gnuabi64/bits/statfs.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_STATFS_H
1919# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
lib/libc/include/mips64-linux-gnuabi64/bits/struct_mutex.h created+56
......@@ -0,0 +1,56 @@
1/* MIPS internal mutex struct definitions.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19#ifndef _THREAD_MUTEX_INTERNAL_H
20#define _THREAD_MUTEX_INTERNAL_H 1
21
22struct __pthread_mutex_s
23{
24 int __lock;
25 unsigned int __count;
26 int __owner;
27#if _MIPS_SIM == _ABI64
28 unsigned int __nusers;
29#endif
30 /* KIND must stay at this position in the structure to maintain
31 binary compatibility with static initializers. */
32 int __kind;
33#if _MIPS_SIM == _ABI64
34 int __spins;
35 __pthread_list_t __list;
36# define __PTHREAD_MUTEX_HAVE_PREV 1
37#else
38 unsigned int __nusers;
39 __extension__ union
40 {
41 int __spins;
42 __pthread_slist_t __list;
43 };
44# define __PTHREAD_MUTEX_HAVE_PREV 0
45#endif
46};
47
48#if _MIPS_SIM == _ABI64
49# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
50 0, 0, 0, 0, __kind, 0, { 0, 0 }
51#else
52# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
53 0, 0, 0, __kind, 0, { 0 }
54#endif
55
56#endif
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabi64/bits/termios-c_cc.h+2-2
......@@ -1,5 +1,5 @@
11/* termios c_cc symbolic constant definitions. Linux/mips version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-c_cc.h> directly; use <termios.h> instead."
lib/libc/include/mips64-linux-gnuabi64/bits/termios-c_lflag.h+2-2
......@@ -1,5 +1,5 @@
11/* termios local mode definitions. Linux/mips version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-c_lflag.h> directly; use <termios.h> instead."
lib/libc/include/mips64-linux-gnuabi64/bits/termios-struct.h+2-2
......@@ -1,5 +1,5 @@
11/* struct termios definition. Linux/mips version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-struct.h> directly; use <termios.h> instead."
lib/libc/include/mips64-linux-gnuabi64/bits/termios-tcflow.h+2-2
......@@ -1,5 +1,5 @@
11/* termios local mode definitions. Linux/mips version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-tcflow.h> directly; use <termios.h> instead."
lib/libc/include/mips64-linux-gnuabi64/bits/timerfd.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2008-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_TIMERFD_H
1919# error "Never use <bits/timerfd.h> directly; include <sys/timerfd.h> instead."
lib/libc/include/mips64-linux-gnuabi64/bits/types/stack_t.h+2-2
......@@ -1,5 +1,5 @@
11/* Define stack_t. MIPS Linux version.
2 Copyright (C) 1998-2019 Free Software Foundation, Inc.
2 Copyright (C) 1998-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef __stack_t_defined
2020#define __stack_t_defined 1
lib/libc/include/mips64-linux-gnuabi64/ieee754.h+12-9
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,16 +13,19 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _IEEE754_H
19
2019#define _IEEE754_H 1
20
2121#include <features.h>
2222
23#include <endian.h>
23#include <bits/endian.h>
2424
25#include <float.h>
25#ifndef __LDBL_MANT_DIG__
26# include <float.h>
27# define __LDBL_MANT_DIG__ LDBL_MANT_DIG
28#endif
2629
2730__BEGIN_DECLS
2831
......@@ -127,7 +130,7 @@ union ieee754_double
127130
128131#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */
129132
130#if LDBL_MANT_DIG == 113
133#if __LDBL_MANT_DIG__ == 113
131134
132135union ieee854_long_double
133136 {
......@@ -184,7 +187,7 @@ union ieee854_long_double
184187
185188#define IEEE854_LONG_DOUBLE_BIAS 0x3fff /* Added to exponent. */
186189
187#elif LDBL_MANT_DIG == 64
190#elif __LDBL_MANT_DIG__ == 64
188191
189192union ieee854_long_double
190193 {
......@@ -253,7 +256,7 @@ union ieee854_long_double
253256
254257#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
255258
256#elif LDBL_MANT_DIG == 53
259#elif __LDBL_MANT_DIG__ == 53
257260
258261union ieee854_long_double
259262 {
......@@ -316,7 +319,7 @@ union ieee854_long_double
316319
317320#define IEEE854_LONG_DOUBLE_BIAS 0x3ff /* Added to exponent. */
318321
319#endif /* LDBL_MANT_DIG == 53 */
322#endif /* __LDBL_MANT_DIG__ == 53 */
320323
321324__END_DECLS
322325
lib/libc/include/mips64-linux-gnuabin32/bits/dlfcn.h+2-2
......@@ -1,5 +1,5 @@
11/* System dependent definitions for run-time dynamic loading.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _DLFCN_H
2020# error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead."
lib/libc/include/mips64-linux-gnuabin32/bits/errno.h+2-2
......@@ -1,5 +1,5 @@
11/* Error constants. MIPS/Linux specific version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_ERRNO_H
2020
lib/libc/include/mips64-linux-gnuabin32/bits/eventfd.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_EVENTFD_H
1919# error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead."
lib/libc/include/mips64-linux-gnuabin32/bits/inotify.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_INOTIFY_H
1919# error "Never use <bits/inotify.h> directly; include <sys/inotify.h> instead."
lib/libc/include/mips64-linux-gnuabin32/bits/ioctl-types.h+2-2
......@@ -1,5 +1,5 @@
11/* Structure types for pre-termios terminal ioctls. Linux/MIPS version.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_IOCTL_H
2020# error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead."
lib/libc/include/mips64-linux-gnuabin32/bits/ipc.h deleted-54
......@@ -1,54 +0,0 @@
1/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_IPC_H
19# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
20#endif
21
22#include <bits/types.h>
23
24/* Mode bits for `msgget', `semget', and `shmget'. */
25#define IPC_CREAT 01000 /* Create key if key does not exist. */
26#define IPC_EXCL 02000 /* Fail if key exists. */
27#define IPC_NOWAIT 04000 /* Return error on wait. */
28
29/* Control commands for `msgctl', `semctl', and `shmctl'. */
30#define IPC_RMID 0 /* Remove identifier. */
31#define IPC_SET 1 /* Set `ipc_perm' options. */
32#define IPC_STAT 2 /* Get `ipc_perm' options. */
33#ifdef __USE_GNU
34# define IPC_INFO 3 /* See ipcs. */
35#endif
36
37/* Special key values. */
38#define IPC_PRIVATE ((__key_t) 0) /* Private key. */
39
40
41/* Data structure used to pass permission information to IPC operations. */
42struct ipc_perm
43 {
44 __key_t __key; /* Key. */
45 unsigned int uid; /* Owner's user ID. */
46 unsigned int gid; /* Owner's group ID. */
47 unsigned int cuid; /* Creator's user ID. */
48 unsigned int cgid; /* Creator's group ID. */
49 unsigned int mode; /* Read/write permission. */
50 unsigned short int __seq; /* Sequence number. */
51 unsigned short int __pad1;
52 unsigned long int __glibc_reserved1;
53 unsigned long int __glibc_reserved2;
54};
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabin32/bits/ipctypes.h+2-2
......@@ -1,5 +1,5 @@
11/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. MIPS version
2 Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 Copyright (C) 2002-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/*
2020 * Never include <bits/ipctypes.h> directly.
lib/libc/include/mips64-linux-gnuabin32/bits/local_lim.h+2-2
......@@ -1,5 +1,5 @@
11/* Minimum guaranteed maximum values for system limits. MIPS Linux version.
2 Copyright (C) 1993-2019 Free Software Foundation, Inc.
2 Copyright (C) 1993-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* The kernel header pollutes the namespace with the NR_OPEN symbol
2020 and defines LINK_MAX although filesystems have different maxima. A
lib/libc/include/mips64-linux-gnuabin32/bits/mman.h+2-2
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX memory map interface. Linux/MIPS version.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_MMAN_H
2020# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
lib/libc/include/mips64-linux-gnuabin32/bits/msq-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct msqid_ds. MIPS version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_MSG_H
2020# error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead."
lib/libc/include/mips64-linux-gnuabin32/bits/poll.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_POLL_H
1919# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
lib/libc/include/mips64-linux-gnuabin32/bits/pthreadtypes-arch.h created+44
......@@ -0,0 +1,44 @@
1/* Machine-specific pthread type layouts. MIPS version.
2 Copyright (C) 2005-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library. If not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _BITS_PTHREADTYPES_ARCH_H
20#define _BITS_PTHREADTYPES_ARCH_H 1
21
22#include <bits/endian.h>
23
24#if _MIPS_SIM == _ABI64
25# define __SIZEOF_PTHREAD_ATTR_T 56
26# define __SIZEOF_PTHREAD_MUTEX_T 40
27# define __SIZEOF_PTHREAD_RWLOCK_T 56
28# define __SIZEOF_PTHREAD_BARRIER_T 32
29#else
30# define __SIZEOF_PTHREAD_ATTR_T 36
31# define __SIZEOF_PTHREAD_MUTEX_T 24
32# define __SIZEOF_PTHREAD_RWLOCK_T 32
33# define __SIZEOF_PTHREAD_BARRIER_T 20
34#endif
35#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
36#define __SIZEOF_PTHREAD_COND_T 48
37#define __SIZEOF_PTHREAD_CONDATTR_T 4
38#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
39#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
40
41#define __LOCK_ALIGNMENT
42#define __ONCE_ALIGNMENT
43
44#endif /* bits/pthreadtypes.h */
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabin32/bits/resource.h+2-2
......@@ -1,5 +1,5 @@
11/* Bit values & structures for resource limits. Linux/MIPS version.
2 Copyright (C) 1994-2019 Free Software Foundation, Inc.
2 Copyright (C) 1994-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_RESOURCE_H
2020# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
lib/libc/include/mips64-linux-gnuabin32/bits/sem-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct semid_ds. MIPS version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SEM_H
2020# error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead."
lib/libc/include/mips64-linux-gnuabin32/bits/shm-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct shmid_ds. MIPS version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SHM_H
2020# error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead."
lib/libc/include/mips64-linux-gnuabin32/bits/shmlba.h+2-2
......@@ -1,5 +1,5 @@
11/* Define SHMLBA. MIPS version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SHM_H
2020# error "Never use <bits/shmlba.h> directly; include <sys/shm.h> instead."
lib/libc/include/mips64-linux-gnuabin32/bits/sigaction.h+2-2
......@@ -1,5 +1,5 @@
11/* The proper definitions for Linux/MIPS's sigaction.
2 Copyright (C) 1993-2019 Free Software Foundation, Inc.
2 Copyright (C) 1993-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_SIGACTION_H
2020#define _BITS_SIGACTION_H 1
lib/libc/include/mips64-linux-gnuabin32/bits/sigcontext.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc. This file is part of the GNU C Library.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc. This file is part of the GNU C Library.
22
33 The GNU C Library is free software; you can redistribute it and/or
44 modify it under the terms of the GNU Lesser General Public
......@@ -12,7 +12,7 @@
1212
1313 You should have received a copy of the GNU Lesser General Public
1414 License along with the GNU C Library. If not, see
15 <http://www.gnu.org/licenses/>. */
15 <https://www.gnu.org/licenses/>. */
1616
1717#ifndef _BITS_SIGCONTEXT_H
1818#define _BITS_SIGCONTEXT_H 1
lib/libc/include/mips64-linux-gnuabin32/bits/signalfd.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_SIGNALFD_H
1919# error "Never use <bits/signalfd.h> directly; include <sys/signalfd.h> instead."
lib/libc/include/mips64-linux-gnuabin32/bits/signum.h+2-2
......@@ -1,5 +1,5 @@
11/* Signal number definitions. Linux/MIPS version.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_SIGNUM_H
2020#define _BITS_SIGNUM_H 1
lib/libc/include/mips64-linux-gnuabin32/bits/socket-constants.h+2-2
......@@ -1,5 +1,5 @@
11/* Socket constants which vary among Linux architectures. Version for MIPS.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SOCKET_H
2020# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
lib/libc/include/mips64-linux-gnuabin32/bits/socket_type.h+2-2
......@@ -1,5 +1,5 @@
11/* Define enum __socket_type for Linux/MIPS.
2 Copyright (C) 1991-2019 Free Software Foundation, Inc.
2 Copyright (C) 1991-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SOCKET_H
2020# error "Never include <bits/socket_type.h> directly; use <sys/socket.h> instead."
lib/libc/include/mips64-linux-gnuabin32/bits/statfs.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_STATFS_H
1919# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
lib/libc/include/mips64-linux-gnuabin32/bits/struct_mutex.h created+56
......@@ -0,0 +1,56 @@
1/* MIPS internal mutex struct definitions.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19#ifndef _THREAD_MUTEX_INTERNAL_H
20#define _THREAD_MUTEX_INTERNAL_H 1
21
22struct __pthread_mutex_s
23{
24 int __lock;
25 unsigned int __count;
26 int __owner;
27#if _MIPS_SIM == _ABI64
28 unsigned int __nusers;
29#endif
30 /* KIND must stay at this position in the structure to maintain
31 binary compatibility with static initializers. */
32 int __kind;
33#if _MIPS_SIM == _ABI64
34 int __spins;
35 __pthread_list_t __list;
36# define __PTHREAD_MUTEX_HAVE_PREV 1
37#else
38 unsigned int __nusers;
39 __extension__ union
40 {
41 int __spins;
42 __pthread_slist_t __list;
43 };
44# define __PTHREAD_MUTEX_HAVE_PREV 0
45#endif
46};
47
48#if _MIPS_SIM == _ABI64
49# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
50 0, 0, 0, 0, __kind, 0, { 0, 0 }
51#else
52# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
53 0, 0, 0, __kind, 0, { 0 }
54#endif
55
56#endif
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabin32/bits/termios-c_cc.h+2-2
......@@ -1,5 +1,5 @@
11/* termios c_cc symbolic constant definitions. Linux/mips version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-c_cc.h> directly; use <termios.h> instead."
lib/libc/include/mips64-linux-gnuabin32/bits/termios-c_lflag.h+2-2
......@@ -1,5 +1,5 @@
11/* termios local mode definitions. Linux/mips version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-c_lflag.h> directly; use <termios.h> instead."
lib/libc/include/mips64-linux-gnuabin32/bits/termios-struct.h+2-2
......@@ -1,5 +1,5 @@
11/* struct termios definition. Linux/mips version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-struct.h> directly; use <termios.h> instead."
lib/libc/include/mips64-linux-gnuabin32/bits/termios-tcflow.h+2-2
......@@ -1,5 +1,5 @@
11/* termios local mode definitions. Linux/mips version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-tcflow.h> directly; use <termios.h> instead."
lib/libc/include/mips64-linux-gnuabin32/bits/timerfd.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2008-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_TIMERFD_H
1919# error "Never use <bits/timerfd.h> directly; include <sys/timerfd.h> instead."
lib/libc/include/mips64-linux-gnuabin32/bits/types/stack_t.h+2-2
......@@ -1,5 +1,5 @@
11/* Define stack_t. MIPS Linux version.
2 Copyright (C) 1998-2019 Free Software Foundation, Inc.
2 Copyright (C) 1998-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef __stack_t_defined
2020#define __stack_t_defined 1
lib/libc/include/mips64-linux-gnuabin32/ieee754.h+12-9
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,16 +13,19 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _IEEE754_H
19
2019#define _IEEE754_H 1
20
2121#include <features.h>
2222
23#include <endian.h>
23#include <bits/endian.h>
2424
25#include <float.h>
25#ifndef __LDBL_MANT_DIG__
26# include <float.h>
27# define __LDBL_MANT_DIG__ LDBL_MANT_DIG
28#endif
2629
2730__BEGIN_DECLS
2831
......@@ -127,7 +130,7 @@ union ieee754_double
127130
128131#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */
129132
130#if LDBL_MANT_DIG == 113
133#if __LDBL_MANT_DIG__ == 113
131134
132135union ieee854_long_double
133136 {
......@@ -184,7 +187,7 @@ union ieee854_long_double
184187
185188#define IEEE854_LONG_DOUBLE_BIAS 0x3fff /* Added to exponent. */
186189
187#elif LDBL_MANT_DIG == 64
190#elif __LDBL_MANT_DIG__ == 64
188191
189192union ieee854_long_double
190193 {
......@@ -253,7 +256,7 @@ union ieee854_long_double
253256
254257#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
255258
256#elif LDBL_MANT_DIG == 53
259#elif __LDBL_MANT_DIG__ == 53
257260
258261union ieee854_long_double
259262 {
......@@ -316,7 +319,7 @@ union ieee854_long_double
316319
317320#define IEEE854_LONG_DOUBLE_BIAS 0x3ff /* Added to exponent. */
318321
319#endif /* LDBL_MANT_DIG == 53 */
322#endif /* __LDBL_MANT_DIG__ == 53 */
320323
321324__END_DECLS
322325
lib/libc/include/mips64el-linux-gnuabi64/bits/dlfcn.h+2-2
......@@ -1,5 +1,5 @@
11/* System dependent definitions for run-time dynamic loading.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _DLFCN_H
2020# error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead."
lib/libc/include/mips64el-linux-gnuabi64/bits/errno.h+2-2
......@@ -1,5 +1,5 @@
11/* Error constants. MIPS/Linux specific version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_ERRNO_H
2020
lib/libc/include/mips64el-linux-gnuabi64/bits/eventfd.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_EVENTFD_H
1919# error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead."
lib/libc/include/mips64el-linux-gnuabi64/bits/inotify.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_INOTIFY_H
1919# error "Never use <bits/inotify.h> directly; include <sys/inotify.h> instead."
lib/libc/include/mips64el-linux-gnuabi64/bits/ioctl-types.h+2-2
......@@ -1,5 +1,5 @@
11/* Structure types for pre-termios terminal ioctls. Linux/MIPS version.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_IOCTL_H
2020# error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead."
lib/libc/include/mips64el-linux-gnuabi64/bits/ipc.h deleted-54
......@@ -1,54 +0,0 @@
1/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_IPC_H
19# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
20#endif
21
22#include <bits/types.h>
23
24/* Mode bits for `msgget', `semget', and `shmget'. */
25#define IPC_CREAT 01000 /* Create key if key does not exist. */
26#define IPC_EXCL 02000 /* Fail if key exists. */
27#define IPC_NOWAIT 04000 /* Return error on wait. */
28
29/* Control commands for `msgctl', `semctl', and `shmctl'. */
30#define IPC_RMID 0 /* Remove identifier. */
31#define IPC_SET 1 /* Set `ipc_perm' options. */
32#define IPC_STAT 2 /* Get `ipc_perm' options. */
33#ifdef __USE_GNU
34# define IPC_INFO 3 /* See ipcs. */
35#endif
36
37/* Special key values. */
38#define IPC_PRIVATE ((__key_t) 0) /* Private key. */
39
40
41/* Data structure used to pass permission information to IPC operations. */
42struct ipc_perm
43 {
44 __key_t __key; /* Key. */
45 unsigned int uid; /* Owner's user ID. */
46 unsigned int gid; /* Owner's group ID. */
47 unsigned int cuid; /* Creator's user ID. */
48 unsigned int cgid; /* Creator's group ID. */
49 unsigned int mode; /* Read/write permission. */
50 unsigned short int __seq; /* Sequence number. */
51 unsigned short int __pad1;
52 unsigned long int __glibc_reserved1;
53 unsigned long int __glibc_reserved2;
54};
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabi64/bits/ipctypes.h+2-2
......@@ -1,5 +1,5 @@
11/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. MIPS version
2 Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 Copyright (C) 2002-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/*
2020 * Never include <bits/ipctypes.h> directly.
lib/libc/include/mips64el-linux-gnuabi64/bits/local_lim.h+2-2
......@@ -1,5 +1,5 @@
11/* Minimum guaranteed maximum values for system limits. MIPS Linux version.
2 Copyright (C) 1993-2019 Free Software Foundation, Inc.
2 Copyright (C) 1993-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* The kernel header pollutes the namespace with the NR_OPEN symbol
2020 and defines LINK_MAX although filesystems have different maxima. A
lib/libc/include/mips64el-linux-gnuabi64/bits/mman.h+2-2
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX memory map interface. Linux/MIPS version.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_MMAN_H
2020# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
lib/libc/include/mips64el-linux-gnuabi64/bits/msq-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct msqid_ds. MIPS version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_MSG_H
2020# error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead."
lib/libc/include/mips64el-linux-gnuabi64/bits/poll.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_POLL_H
1919# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
lib/libc/include/mips64el-linux-gnuabi64/bits/pthreadtypes-arch.h created+44
......@@ -0,0 +1,44 @@
1/* Machine-specific pthread type layouts. MIPS version.
2 Copyright (C) 2005-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library. If not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _BITS_PTHREADTYPES_ARCH_H
20#define _BITS_PTHREADTYPES_ARCH_H 1
21
22#include <bits/endian.h>
23
24#if _MIPS_SIM == _ABI64
25# define __SIZEOF_PTHREAD_ATTR_T 56
26# define __SIZEOF_PTHREAD_MUTEX_T 40
27# define __SIZEOF_PTHREAD_RWLOCK_T 56
28# define __SIZEOF_PTHREAD_BARRIER_T 32
29#else
30# define __SIZEOF_PTHREAD_ATTR_T 36
31# define __SIZEOF_PTHREAD_MUTEX_T 24
32# define __SIZEOF_PTHREAD_RWLOCK_T 32
33# define __SIZEOF_PTHREAD_BARRIER_T 20
34#endif
35#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
36#define __SIZEOF_PTHREAD_COND_T 48
37#define __SIZEOF_PTHREAD_CONDATTR_T 4
38#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
39#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
40
41#define __LOCK_ALIGNMENT
42#define __ONCE_ALIGNMENT
43
44#endif /* bits/pthreadtypes.h */
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabi64/bits/resource.h+2-2
......@@ -1,5 +1,5 @@
11/* Bit values & structures for resource limits. Linux/MIPS version.
2 Copyright (C) 1994-2019 Free Software Foundation, Inc.
2 Copyright (C) 1994-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_RESOURCE_H
2020# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
lib/libc/include/mips64el-linux-gnuabi64/bits/sem-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct semid_ds. MIPS version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SEM_H
2020# error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead."
lib/libc/include/mips64el-linux-gnuabi64/bits/shm-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct shmid_ds. MIPS version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SHM_H
2020# error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead."
lib/libc/include/mips64el-linux-gnuabi64/bits/shmlba.h+2-2
......@@ -1,5 +1,5 @@
11/* Define SHMLBA. MIPS version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SHM_H
2020# error "Never use <bits/shmlba.h> directly; include <sys/shm.h> instead."
lib/libc/include/mips64el-linux-gnuabi64/bits/sigaction.h+2-2
......@@ -1,5 +1,5 @@
11/* The proper definitions for Linux/MIPS's sigaction.
2 Copyright (C) 1993-2019 Free Software Foundation, Inc.
2 Copyright (C) 1993-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_SIGACTION_H
2020#define _BITS_SIGACTION_H 1
lib/libc/include/mips64el-linux-gnuabi64/bits/sigcontext.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc. This file is part of the GNU C Library.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc. This file is part of the GNU C Library.
22
33 The GNU C Library is free software; you can redistribute it and/or
44 modify it under the terms of the GNU Lesser General Public
......@@ -12,7 +12,7 @@
1212
1313 You should have received a copy of the GNU Lesser General Public
1414 License along with the GNU C Library. If not, see
15 <http://www.gnu.org/licenses/>. */
15 <https://www.gnu.org/licenses/>. */
1616
1717#ifndef _BITS_SIGCONTEXT_H
1818#define _BITS_SIGCONTEXT_H 1
lib/libc/include/mips64el-linux-gnuabi64/bits/signalfd.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_SIGNALFD_H
1919# error "Never use <bits/signalfd.h> directly; include <sys/signalfd.h> instead."
lib/libc/include/mips64el-linux-gnuabi64/bits/signum.h+2-2
......@@ -1,5 +1,5 @@
11/* Signal number definitions. Linux/MIPS version.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_SIGNUM_H
2020#define _BITS_SIGNUM_H 1
lib/libc/include/mips64el-linux-gnuabi64/bits/socket-constants.h+2-2
......@@ -1,5 +1,5 @@
11/* Socket constants which vary among Linux architectures. Version for MIPS.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SOCKET_H
2020# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
lib/libc/include/mips64el-linux-gnuabi64/bits/socket_type.h+2-2
......@@ -1,5 +1,5 @@
11/* Define enum __socket_type for Linux/MIPS.
2 Copyright (C) 1991-2019 Free Software Foundation, Inc.
2 Copyright (C) 1991-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SOCKET_H
2020# error "Never include <bits/socket_type.h> directly; use <sys/socket.h> instead."
lib/libc/include/mips64el-linux-gnuabi64/bits/statfs.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_STATFS_H
1919# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
lib/libc/include/mips64el-linux-gnuabi64/bits/struct_mutex.h created+56
......@@ -0,0 +1,56 @@
1/* MIPS internal mutex struct definitions.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19#ifndef _THREAD_MUTEX_INTERNAL_H
20#define _THREAD_MUTEX_INTERNAL_H 1
21
22struct __pthread_mutex_s
23{
24 int __lock;
25 unsigned int __count;
26 int __owner;
27#if _MIPS_SIM == _ABI64
28 unsigned int __nusers;
29#endif
30 /* KIND must stay at this position in the structure to maintain
31 binary compatibility with static initializers. */
32 int __kind;
33#if _MIPS_SIM == _ABI64
34 int __spins;
35 __pthread_list_t __list;
36# define __PTHREAD_MUTEX_HAVE_PREV 1
37#else
38 unsigned int __nusers;
39 __extension__ union
40 {
41 int __spins;
42 __pthread_slist_t __list;
43 };
44# define __PTHREAD_MUTEX_HAVE_PREV 0
45#endif
46};
47
48#if _MIPS_SIM == _ABI64
49# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
50 0, 0, 0, 0, __kind, 0, { 0, 0 }
51#else
52# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
53 0, 0, 0, __kind, 0, { 0 }
54#endif
55
56#endif
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabi64/bits/termios-c_cc.h+2-2
......@@ -1,5 +1,5 @@
11/* termios c_cc symbolic constant definitions. Linux/mips version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-c_cc.h> directly; use <termios.h> instead."
lib/libc/include/mips64el-linux-gnuabi64/bits/termios-c_lflag.h+2-2
......@@ -1,5 +1,5 @@
11/* termios local mode definitions. Linux/mips version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-c_lflag.h> directly; use <termios.h> instead."
lib/libc/include/mips64el-linux-gnuabi64/bits/termios-struct.h+2-2
......@@ -1,5 +1,5 @@
11/* struct termios definition. Linux/mips version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-struct.h> directly; use <termios.h> instead."
lib/libc/include/mips64el-linux-gnuabi64/bits/termios-tcflow.h+2-2
......@@ -1,5 +1,5 @@
11/* termios local mode definitions. Linux/mips version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-tcflow.h> directly; use <termios.h> instead."
lib/libc/include/mips64el-linux-gnuabi64/bits/timerfd.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2008-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_TIMERFD_H
1919# error "Never use <bits/timerfd.h> directly; include <sys/timerfd.h> instead."
lib/libc/include/mips64el-linux-gnuabi64/bits/types/stack_t.h+2-2
......@@ -1,5 +1,5 @@
11/* Define stack_t. MIPS Linux version.
2 Copyright (C) 1998-2019 Free Software Foundation, Inc.
2 Copyright (C) 1998-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef __stack_t_defined
2020#define __stack_t_defined 1
lib/libc/include/mips64el-linux-gnuabi64/ieee754.h+12-9
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,16 +13,19 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _IEEE754_H
19
2019#define _IEEE754_H 1
20
2121#include <features.h>
2222
23#include <endian.h>
23#include <bits/endian.h>
2424
25#include <float.h>
25#ifndef __LDBL_MANT_DIG__
26# include <float.h>
27# define __LDBL_MANT_DIG__ LDBL_MANT_DIG
28#endif
2629
2730__BEGIN_DECLS
2831
......@@ -127,7 +130,7 @@ union ieee754_double
127130
128131#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */
129132
130#if LDBL_MANT_DIG == 113
133#if __LDBL_MANT_DIG__ == 113
131134
132135union ieee854_long_double
133136 {
......@@ -184,7 +187,7 @@ union ieee854_long_double
184187
185188#define IEEE854_LONG_DOUBLE_BIAS 0x3fff /* Added to exponent. */
186189
187#elif LDBL_MANT_DIG == 64
190#elif __LDBL_MANT_DIG__ == 64
188191
189192union ieee854_long_double
190193 {
......@@ -253,7 +256,7 @@ union ieee854_long_double
253256
254257#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
255258
256#elif LDBL_MANT_DIG == 53
259#elif __LDBL_MANT_DIG__ == 53
257260
258261union ieee854_long_double
259262 {
......@@ -316,7 +319,7 @@ union ieee854_long_double
316319
317320#define IEEE854_LONG_DOUBLE_BIAS 0x3ff /* Added to exponent. */
318321
319#endif /* LDBL_MANT_DIG == 53 */
322#endif /* __LDBL_MANT_DIG__ == 53 */
320323
321324__END_DECLS
322325
lib/libc/include/mips64el-linux-gnuabin32/bits/dlfcn.h+2-2
......@@ -1,5 +1,5 @@
11/* System dependent definitions for run-time dynamic loading.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _DLFCN_H
2020# error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead."
lib/libc/include/mips64el-linux-gnuabin32/bits/errno.h+2-2
......@@ -1,5 +1,5 @@
11/* Error constants. MIPS/Linux specific version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_ERRNO_H
2020
lib/libc/include/mips64el-linux-gnuabin32/bits/eventfd.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_EVENTFD_H
1919# error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead."
lib/libc/include/mips64el-linux-gnuabin32/bits/inotify.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_INOTIFY_H
1919# error "Never use <bits/inotify.h> directly; include <sys/inotify.h> instead."
lib/libc/include/mips64el-linux-gnuabin32/bits/ioctl-types.h+2-2
......@@ -1,5 +1,5 @@
11/* Structure types for pre-termios terminal ioctls. Linux/MIPS version.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_IOCTL_H
2020# error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead."
lib/libc/include/mips64el-linux-gnuabin32/bits/ipc.h deleted-54
......@@ -1,54 +0,0 @@
1/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_IPC_H
19# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
20#endif
21
22#include <bits/types.h>
23
24/* Mode bits for `msgget', `semget', and `shmget'. */
25#define IPC_CREAT 01000 /* Create key if key does not exist. */
26#define IPC_EXCL 02000 /* Fail if key exists. */
27#define IPC_NOWAIT 04000 /* Return error on wait. */
28
29/* Control commands for `msgctl', `semctl', and `shmctl'. */
30#define IPC_RMID 0 /* Remove identifier. */
31#define IPC_SET 1 /* Set `ipc_perm' options. */
32#define IPC_STAT 2 /* Get `ipc_perm' options. */
33#ifdef __USE_GNU
34# define IPC_INFO 3 /* See ipcs. */
35#endif
36
37/* Special key values. */
38#define IPC_PRIVATE ((__key_t) 0) /* Private key. */
39
40
41/* Data structure used to pass permission information to IPC operations. */
42struct ipc_perm
43 {
44 __key_t __key; /* Key. */
45 unsigned int uid; /* Owner's user ID. */
46 unsigned int gid; /* Owner's group ID. */
47 unsigned int cuid; /* Creator's user ID. */
48 unsigned int cgid; /* Creator's group ID. */
49 unsigned int mode; /* Read/write permission. */
50 unsigned short int __seq; /* Sequence number. */
51 unsigned short int __pad1;
52 unsigned long int __glibc_reserved1;
53 unsigned long int __glibc_reserved2;
54};
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabin32/bits/ipctypes.h+2-2
......@@ -1,5 +1,5 @@
11/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. MIPS version
2 Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 Copyright (C) 2002-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/*
2020 * Never include <bits/ipctypes.h> directly.
lib/libc/include/mips64el-linux-gnuabin32/bits/local_lim.h+2-2
......@@ -1,5 +1,5 @@
11/* Minimum guaranteed maximum values for system limits. MIPS Linux version.
2 Copyright (C) 1993-2019 Free Software Foundation, Inc.
2 Copyright (C) 1993-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* The kernel header pollutes the namespace with the NR_OPEN symbol
2020 and defines LINK_MAX although filesystems have different maxima. A
lib/libc/include/mips64el-linux-gnuabin32/bits/mman.h+2-2
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX memory map interface. Linux/MIPS version.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_MMAN_H
2020# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
lib/libc/include/mips64el-linux-gnuabin32/bits/msq-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct msqid_ds. MIPS version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_MSG_H
2020# error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead."
lib/libc/include/mips64el-linux-gnuabin32/bits/poll.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_POLL_H
1919# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
lib/libc/include/mips64el-linux-gnuabin32/bits/pthreadtypes-arch.h created+44
......@@ -0,0 +1,44 @@
1/* Machine-specific pthread type layouts. MIPS version.
2 Copyright (C) 2005-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library. If not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _BITS_PTHREADTYPES_ARCH_H
20#define _BITS_PTHREADTYPES_ARCH_H 1
21
22#include <bits/endian.h>
23
24#if _MIPS_SIM == _ABI64
25# define __SIZEOF_PTHREAD_ATTR_T 56
26# define __SIZEOF_PTHREAD_MUTEX_T 40
27# define __SIZEOF_PTHREAD_RWLOCK_T 56
28# define __SIZEOF_PTHREAD_BARRIER_T 32
29#else
30# define __SIZEOF_PTHREAD_ATTR_T 36
31# define __SIZEOF_PTHREAD_MUTEX_T 24
32# define __SIZEOF_PTHREAD_RWLOCK_T 32
33# define __SIZEOF_PTHREAD_BARRIER_T 20
34#endif
35#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
36#define __SIZEOF_PTHREAD_COND_T 48
37#define __SIZEOF_PTHREAD_CONDATTR_T 4
38#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
39#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
40
41#define __LOCK_ALIGNMENT
42#define __ONCE_ALIGNMENT
43
44#endif /* bits/pthreadtypes.h */
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabin32/bits/resource.h+2-2
......@@ -1,5 +1,5 @@
11/* Bit values & structures for resource limits. Linux/MIPS version.
2 Copyright (C) 1994-2019 Free Software Foundation, Inc.
2 Copyright (C) 1994-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_RESOURCE_H
2020# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
lib/libc/include/mips64el-linux-gnuabin32/bits/sem-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct semid_ds. MIPS version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SEM_H
2020# error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead."
lib/libc/include/mips64el-linux-gnuabin32/bits/shm-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct shmid_ds. MIPS version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SHM_H
2020# error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead."
lib/libc/include/mips64el-linux-gnuabin32/bits/shmlba.h+2-2
......@@ -1,5 +1,5 @@
11/* Define SHMLBA. MIPS version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SHM_H
2020# error "Never use <bits/shmlba.h> directly; include <sys/shm.h> instead."
lib/libc/include/mips64el-linux-gnuabin32/bits/sigaction.h+2-2
......@@ -1,5 +1,5 @@
11/* The proper definitions for Linux/MIPS's sigaction.
2 Copyright (C) 1993-2019 Free Software Foundation, Inc.
2 Copyright (C) 1993-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_SIGACTION_H
2020#define _BITS_SIGACTION_H 1
lib/libc/include/mips64el-linux-gnuabin32/bits/sigcontext.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc. This file is part of the GNU C Library.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc. This file is part of the GNU C Library.
22
33 The GNU C Library is free software; you can redistribute it and/or
44 modify it under the terms of the GNU Lesser General Public
......@@ -12,7 +12,7 @@
1212
1313 You should have received a copy of the GNU Lesser General Public
1414 License along with the GNU C Library. If not, see
15 <http://www.gnu.org/licenses/>. */
15 <https://www.gnu.org/licenses/>. */
1616
1717#ifndef _BITS_SIGCONTEXT_H
1818#define _BITS_SIGCONTEXT_H 1
lib/libc/include/mips64el-linux-gnuabin32/bits/signalfd.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_SIGNALFD_H
1919# error "Never use <bits/signalfd.h> directly; include <sys/signalfd.h> instead."
lib/libc/include/mips64el-linux-gnuabin32/bits/signum.h+2-2
......@@ -1,5 +1,5 @@
11/* Signal number definitions. Linux/MIPS version.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_SIGNUM_H
2020#define _BITS_SIGNUM_H 1
lib/libc/include/mips64el-linux-gnuabin32/bits/socket-constants.h+2-2
......@@ -1,5 +1,5 @@
11/* Socket constants which vary among Linux architectures. Version for MIPS.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SOCKET_H
2020# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
lib/libc/include/mips64el-linux-gnuabin32/bits/socket_type.h+2-2
......@@ -1,5 +1,5 @@
11/* Define enum __socket_type for Linux/MIPS.
2 Copyright (C) 1991-2019 Free Software Foundation, Inc.
2 Copyright (C) 1991-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SOCKET_H
2020# error "Never include <bits/socket_type.h> directly; use <sys/socket.h> instead."
lib/libc/include/mips64el-linux-gnuabin32/bits/statfs.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_STATFS_H
1919# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
lib/libc/include/mips64el-linux-gnuabin32/bits/struct_mutex.h created+56
......@@ -0,0 +1,56 @@
1/* MIPS internal mutex struct definitions.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19#ifndef _THREAD_MUTEX_INTERNAL_H
20#define _THREAD_MUTEX_INTERNAL_H 1
21
22struct __pthread_mutex_s
23{
24 int __lock;
25 unsigned int __count;
26 int __owner;
27#if _MIPS_SIM == _ABI64
28 unsigned int __nusers;
29#endif
30 /* KIND must stay at this position in the structure to maintain
31 binary compatibility with static initializers. */
32 int __kind;
33#if _MIPS_SIM == _ABI64
34 int __spins;
35 __pthread_list_t __list;
36# define __PTHREAD_MUTEX_HAVE_PREV 1
37#else
38 unsigned int __nusers;
39 __extension__ union
40 {
41 int __spins;
42 __pthread_slist_t __list;
43 };
44# define __PTHREAD_MUTEX_HAVE_PREV 0
45#endif
46};
47
48#if _MIPS_SIM == _ABI64
49# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
50 0, 0, 0, 0, __kind, 0, { 0, 0 }
51#else
52# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
53 0, 0, 0, __kind, 0, { 0 }
54#endif
55
56#endif
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabin32/bits/termios-c_cc.h+2-2
......@@ -1,5 +1,5 @@
11/* termios c_cc symbolic constant definitions. Linux/mips version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-c_cc.h> directly; use <termios.h> instead."
lib/libc/include/mips64el-linux-gnuabin32/bits/termios-c_lflag.h+2-2
......@@ -1,5 +1,5 @@
11/* termios local mode definitions. Linux/mips version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-c_lflag.h> directly; use <termios.h> instead."
lib/libc/include/mips64el-linux-gnuabin32/bits/termios-struct.h+2-2
......@@ -1,5 +1,5 @@
11/* struct termios definition. Linux/mips version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-struct.h> directly; use <termios.h> instead."
lib/libc/include/mips64el-linux-gnuabin32/bits/termios-tcflow.h+2-2
......@@ -1,5 +1,5 @@
11/* termios local mode definitions. Linux/mips version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-tcflow.h> directly; use <termios.h> instead."
lib/libc/include/mips64el-linux-gnuabin32/bits/timerfd.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2008-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_TIMERFD_H
1919# error "Never use <bits/timerfd.h> directly; include <sys/timerfd.h> instead."
lib/libc/include/mips64el-linux-gnuabin32/bits/types/stack_t.h+2-2
......@@ -1,5 +1,5 @@
11/* Define stack_t. MIPS Linux version.
2 Copyright (C) 1998-2019 Free Software Foundation, Inc.
2 Copyright (C) 1998-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef __stack_t_defined
2020#define __stack_t_defined 1
lib/libc/include/mips64el-linux-gnuabin32/ieee754.h+12-9
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,16 +13,19 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _IEEE754_H
19
2019#define _IEEE754_H 1
20
2121#include <features.h>
2222
23#include <endian.h>
23#include <bits/endian.h>
2424
25#include <float.h>
25#ifndef __LDBL_MANT_DIG__
26# include <float.h>
27# define __LDBL_MANT_DIG__ LDBL_MANT_DIG
28#endif
2629
2730__BEGIN_DECLS
2831
......@@ -127,7 +130,7 @@ union ieee754_double
127130
128131#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */
129132
130#if LDBL_MANT_DIG == 113
133#if __LDBL_MANT_DIG__ == 113
131134
132135union ieee854_long_double
133136 {
......@@ -184,7 +187,7 @@ union ieee854_long_double
184187
185188#define IEEE854_LONG_DOUBLE_BIAS 0x3fff /* Added to exponent. */
186189
187#elif LDBL_MANT_DIG == 64
190#elif __LDBL_MANT_DIG__ == 64
188191
189192union ieee854_long_double
190193 {
......@@ -253,7 +256,7 @@ union ieee854_long_double
253256
254257#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
255258
256#elif LDBL_MANT_DIG == 53
259#elif __LDBL_MANT_DIG__ == 53
257260
258261union ieee854_long_double
259262 {
......@@ -316,7 +319,7 @@ union ieee854_long_double
316319
317320#define IEEE854_LONG_DOUBLE_BIAS 0x3ff /* Added to exponent. */
318321
319#endif /* LDBL_MANT_DIG == 53 */
322#endif /* __LDBL_MANT_DIG__ == 53 */
320323
321324__END_DECLS
322325
lib/libc/include/mipsel-linux-gnu/bits/dlfcn.h+2-2
......@@ -1,5 +1,5 @@
11/* System dependent definitions for run-time dynamic loading.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _DLFCN_H
2020# error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead."
lib/libc/include/mipsel-linux-gnu/bits/errno.h+2-2
......@@ -1,5 +1,5 @@
11/* Error constants. MIPS/Linux specific version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_ERRNO_H
2020
lib/libc/include/mipsel-linux-gnu/bits/eventfd.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_EVENTFD_H
1919# error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead."
lib/libc/include/mipsel-linux-gnu/bits/inotify.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_INOTIFY_H
1919# error "Never use <bits/inotify.h> directly; include <sys/inotify.h> instead."
lib/libc/include/mipsel-linux-gnu/bits/ioctl-types.h+2-2
......@@ -1,5 +1,5 @@
11/* Structure types for pre-termios terminal ioctls. Linux/MIPS version.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_IOCTL_H
2020# error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead."
lib/libc/include/mipsel-linux-gnu/bits/ipc.h deleted-54
......@@ -1,54 +0,0 @@
1/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_IPC_H
19# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
20#endif
21
22#include <bits/types.h>
23
24/* Mode bits for `msgget', `semget', and `shmget'. */
25#define IPC_CREAT 01000 /* Create key if key does not exist. */
26#define IPC_EXCL 02000 /* Fail if key exists. */
27#define IPC_NOWAIT 04000 /* Return error on wait. */
28
29/* Control commands for `msgctl', `semctl', and `shmctl'. */
30#define IPC_RMID 0 /* Remove identifier. */
31#define IPC_SET 1 /* Set `ipc_perm' options. */
32#define IPC_STAT 2 /* Get `ipc_perm' options. */
33#ifdef __USE_GNU
34# define IPC_INFO 3 /* See ipcs. */
35#endif
36
37/* Special key values. */
38#define IPC_PRIVATE ((__key_t) 0) /* Private key. */
39
40
41/* Data structure used to pass permission information to IPC operations. */
42struct ipc_perm
43 {
44 __key_t __key; /* Key. */
45 unsigned int uid; /* Owner's user ID. */
46 unsigned int gid; /* Owner's group ID. */
47 unsigned int cuid; /* Creator's user ID. */
48 unsigned int cgid; /* Creator's group ID. */
49 unsigned int mode; /* Read/write permission. */
50 unsigned short int __seq; /* Sequence number. */
51 unsigned short int __pad1;
52 unsigned long int __glibc_reserved1;
53 unsigned long int __glibc_reserved2;
54};
\ No newline at end of file
lib/libc/include/mipsel-linux-gnu/bits/ipctypes.h+2-2
......@@ -1,5 +1,5 @@
11/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. MIPS version
2 Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 Copyright (C) 2002-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/*
2020 * Never include <bits/ipctypes.h> directly.
lib/libc/include/mipsel-linux-gnu/bits/local_lim.h+2-2
......@@ -1,5 +1,5 @@
11/* Minimum guaranteed maximum values for system limits. MIPS Linux version.
2 Copyright (C) 1993-2019 Free Software Foundation, Inc.
2 Copyright (C) 1993-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* The kernel header pollutes the namespace with the NR_OPEN symbol
2020 and defines LINK_MAX although filesystems have different maxima. A
lib/libc/include/mipsel-linux-gnu/bits/mman.h+2-2
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX memory map interface. Linux/MIPS version.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_MMAN_H
2020# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
lib/libc/include/mipsel-linux-gnu/bits/msq-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct msqid_ds. MIPS version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_MSG_H
2020# error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead."
lib/libc/include/mipsel-linux-gnu/bits/poll.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_POLL_H
1919# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
lib/libc/include/mipsel-linux-gnu/bits/pthreadtypes-arch.h created+44
......@@ -0,0 +1,44 @@
1/* Machine-specific pthread type layouts. MIPS version.
2 Copyright (C) 2005-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library. If not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _BITS_PTHREADTYPES_ARCH_H
20#define _BITS_PTHREADTYPES_ARCH_H 1
21
22#include <bits/endian.h>
23
24#if _MIPS_SIM == _ABI64
25# define __SIZEOF_PTHREAD_ATTR_T 56
26# define __SIZEOF_PTHREAD_MUTEX_T 40
27# define __SIZEOF_PTHREAD_RWLOCK_T 56
28# define __SIZEOF_PTHREAD_BARRIER_T 32
29#else
30# define __SIZEOF_PTHREAD_ATTR_T 36
31# define __SIZEOF_PTHREAD_MUTEX_T 24
32# define __SIZEOF_PTHREAD_RWLOCK_T 32
33# define __SIZEOF_PTHREAD_BARRIER_T 20
34#endif
35#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
36#define __SIZEOF_PTHREAD_COND_T 48
37#define __SIZEOF_PTHREAD_CONDATTR_T 4
38#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
39#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
40
41#define __LOCK_ALIGNMENT
42#define __ONCE_ALIGNMENT
43
44#endif /* bits/pthreadtypes.h */
\ No newline at end of file
lib/libc/include/mipsel-linux-gnu/bits/resource.h+2-2
......@@ -1,5 +1,5 @@
11/* Bit values & structures for resource limits. Linux/MIPS version.
2 Copyright (C) 1994-2019 Free Software Foundation, Inc.
2 Copyright (C) 1994-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_RESOURCE_H
2020# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
lib/libc/include/mipsel-linux-gnu/bits/sem-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct semid_ds. MIPS version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SEM_H
2020# error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead."
lib/libc/include/mipsel-linux-gnu/bits/shm-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct shmid_ds. MIPS version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SHM_H
2020# error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead."
lib/libc/include/mipsel-linux-gnu/bits/shmlba.h+2-2
......@@ -1,5 +1,5 @@
11/* Define SHMLBA. MIPS version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SHM_H
2020# error "Never use <bits/shmlba.h> directly; include <sys/shm.h> instead."
lib/libc/include/mipsel-linux-gnu/bits/sigaction.h+2-2
......@@ -1,5 +1,5 @@
11/* The proper definitions for Linux/MIPS's sigaction.
2 Copyright (C) 1993-2019 Free Software Foundation, Inc.
2 Copyright (C) 1993-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_SIGACTION_H
2020#define _BITS_SIGACTION_H 1
lib/libc/include/mipsel-linux-gnu/bits/sigcontext.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc. This file is part of the GNU C Library.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc. This file is part of the GNU C Library.
22
33 The GNU C Library is free software; you can redistribute it and/or
44 modify it under the terms of the GNU Lesser General Public
......@@ -12,7 +12,7 @@
1212
1313 You should have received a copy of the GNU Lesser General Public
1414 License along with the GNU C Library. If not, see
15 <http://www.gnu.org/licenses/>. */
15 <https://www.gnu.org/licenses/>. */
1616
1717#ifndef _BITS_SIGCONTEXT_H
1818#define _BITS_SIGCONTEXT_H 1
lib/libc/include/mipsel-linux-gnu/bits/signalfd.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_SIGNALFD_H
1919# error "Never use <bits/signalfd.h> directly; include <sys/signalfd.h> instead."
lib/libc/include/mipsel-linux-gnu/bits/signum.h+2-2
......@@ -1,5 +1,5 @@
11/* Signal number definitions. Linux/MIPS version.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_SIGNUM_H
2020#define _BITS_SIGNUM_H 1
lib/libc/include/mipsel-linux-gnu/bits/socket-constants.h+2-2
......@@ -1,5 +1,5 @@
11/* Socket constants which vary among Linux architectures. Version for MIPS.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SOCKET_H
2020# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
lib/libc/include/mipsel-linux-gnu/bits/socket_type.h+2-2
......@@ -1,5 +1,5 @@
11/* Define enum __socket_type for Linux/MIPS.
2 Copyright (C) 1991-2019 Free Software Foundation, Inc.
2 Copyright (C) 1991-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SOCKET_H
2020# error "Never include <bits/socket_type.h> directly; use <sys/socket.h> instead."
lib/libc/include/mipsel-linux-gnu/bits/statfs.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_STATFS_H
1919# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
lib/libc/include/mipsel-linux-gnu/bits/struct_mutex.h created+56
......@@ -0,0 +1,56 @@
1/* MIPS internal mutex struct definitions.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19#ifndef _THREAD_MUTEX_INTERNAL_H
20#define _THREAD_MUTEX_INTERNAL_H 1
21
22struct __pthread_mutex_s
23{
24 int __lock;
25 unsigned int __count;
26 int __owner;
27#if _MIPS_SIM == _ABI64
28 unsigned int __nusers;
29#endif
30 /* KIND must stay at this position in the structure to maintain
31 binary compatibility with static initializers. */
32 int __kind;
33#if _MIPS_SIM == _ABI64
34 int __spins;
35 __pthread_list_t __list;
36# define __PTHREAD_MUTEX_HAVE_PREV 1
37#else
38 unsigned int __nusers;
39 __extension__ union
40 {
41 int __spins;
42 __pthread_slist_t __list;
43 };
44# define __PTHREAD_MUTEX_HAVE_PREV 0
45#endif
46};
47
48#if _MIPS_SIM == _ABI64
49# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
50 0, 0, 0, 0, __kind, 0, { 0, 0 }
51#else
52# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
53 0, 0, 0, __kind, 0, { 0 }
54#endif
55
56#endif
\ No newline at end of file
lib/libc/include/mipsel-linux-gnu/bits/termios-c_cc.h+2-2
......@@ -1,5 +1,5 @@
11/* termios c_cc symbolic constant definitions. Linux/mips version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-c_cc.h> directly; use <termios.h> instead."
lib/libc/include/mipsel-linux-gnu/bits/termios-c_lflag.h+2-2
......@@ -1,5 +1,5 @@
11/* termios local mode definitions. Linux/mips version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-c_lflag.h> directly; use <termios.h> instead."
lib/libc/include/mipsel-linux-gnu/bits/termios-struct.h+2-2
......@@ -1,5 +1,5 @@
11/* struct termios definition. Linux/mips version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-struct.h> directly; use <termios.h> instead."
lib/libc/include/mipsel-linux-gnu/bits/termios-tcflow.h+2-2
......@@ -1,5 +1,5 @@
11/* termios local mode definitions. Linux/mips version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-tcflow.h> directly; use <termios.h> instead."
lib/libc/include/mipsel-linux-gnu/bits/timerfd.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2008-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_TIMERFD_H
1919# error "Never use <bits/timerfd.h> directly; include <sys/timerfd.h> instead."
lib/libc/include/mipsel-linux-gnu/bits/types/stack_t.h+2-2
......@@ -1,5 +1,5 @@
11/* Define stack_t. MIPS Linux version.
2 Copyright (C) 1998-2019 Free Software Foundation, Inc.
2 Copyright (C) 1998-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef __stack_t_defined
2020#define __stack_t_defined 1
lib/libc/include/mipsel-linux-gnu/ieee754.h+12-9
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,16 +13,19 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _IEEE754_H
19
2019#define _IEEE754_H 1
20
2121#include <features.h>
2222
23#include <endian.h>
23#include <bits/endian.h>
2424
25#include <float.h>
25#ifndef __LDBL_MANT_DIG__
26# include <float.h>
27# define __LDBL_MANT_DIG__ LDBL_MANT_DIG
28#endif
2629
2730__BEGIN_DECLS
2831
......@@ -127,7 +130,7 @@ union ieee754_double
127130
128131#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */
129132
130#if LDBL_MANT_DIG == 113
133#if __LDBL_MANT_DIG__ == 113
131134
132135union ieee854_long_double
133136 {
......@@ -184,7 +187,7 @@ union ieee854_long_double
184187
185188#define IEEE854_LONG_DOUBLE_BIAS 0x3fff /* Added to exponent. */
186189
187#elif LDBL_MANT_DIG == 64
190#elif __LDBL_MANT_DIG__ == 64
188191
189192union ieee854_long_double
190193 {
......@@ -253,7 +256,7 @@ union ieee854_long_double
253256
254257#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
255258
256#elif LDBL_MANT_DIG == 53
259#elif __LDBL_MANT_DIG__ == 53
257260
258261union ieee854_long_double
259262 {
......@@ -316,7 +319,7 @@ union ieee854_long_double
316319
317320#define IEEE854_LONG_DOUBLE_BIAS 0x3ff /* Added to exponent. */
318321
319#endif /* LDBL_MANT_DIG == 53 */
322#endif /* __LDBL_MANT_DIG__ == 53 */
320323
321324__END_DECLS
322325
lib/libc/include/powerpc-linux-gnu/bits/endian.h deleted-36
......@@ -1,36 +0,0 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
17
18/* PowerPC can be little or big endian. Hopefully gcc will know... */
19
20#ifndef _ENDIAN_H
21# error "Never use <bits/endian.h> directly; include <endian.h> instead."
22#endif
23
24#if defined __BIG_ENDIAN__ || defined _BIG_ENDIAN
25# if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN
26# error Both BIG_ENDIAN and LITTLE_ENDIAN defined!
27# endif
28# define __BYTE_ORDER __BIG_ENDIAN
29#else
30# if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN
31# define __BYTE_ORDER __LITTLE_ENDIAN
32# else
33# warning Cannot determine current byte order, assuming big-endian.
34# define __BYTE_ORDER __BIG_ENDIAN
35# endif
36#endif
\ No newline at end of file
lib/libc/include/powerpc-linux-gnu/bits/endianness.h created+16
......@@ -0,0 +1,16 @@
1#ifndef _BITS_ENDIANNESS_H
2#define _BITS_ENDIANNESS_H 1
3
4#ifndef _BITS_ENDIAN_H
5# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
6#endif
7
8/* PowerPC has selectable endianness. */
9#if defined __BIG_ENDIAN__ || defined _BIG_ENDIAN
10# define __BYTE_ORDER __BIG_ENDIAN
11#endif
12#if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN
13# define __BYTE_ORDER __LITTLE_ENDIAN
14#endif
15
16#endif /* bits/endianness.h */
\ No newline at end of file
lib/libc/include/powerpc-linux-gnu/bits/environments.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _UNISTD_H
1919# error "Never include this file directly. Use <unistd.h> instead"
lib/libc/include/powerpc-linux-gnu/bits/fcntl.h+2-2
......@@ -1,5 +1,5 @@
11/* O_*, F_*, FD_* bit values for Linux/PowerPC.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _FCNTL_H
2020# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
lib/libc/include/powerpc-linux-gnu/bits/fenv.h+3-3
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _FENV_H
1919# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
......@@ -170,7 +170,7 @@ extern const fenv_t __fe_nonieee_env;
170170
171171#endif
172172
173#if __GLIBC_USE (IEC_60559_BFP_EXT)
173#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
174174/* Type representing floating-point control modes. */
175175typedef double femode_t;
176176
lib/libc/include/powerpc-linux-gnu/bits/fenvinline.h+2-2
......@@ -1,5 +1,5 @@
11/* Inline floating-point environment handling functions for powerpc.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#if defined __GNUC__ && !defined _SOFT_FLOAT && !defined __NO_FPRS__
2020
lib/libc/include/powerpc-linux-gnu/bits/floatn.h+2-2
......@@ -1,5 +1,5 @@
11/* Macros to control TS 18661-3 glibc features on powerpc.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_FLOATN_H
2020#define _BITS_FLOATN_H
lib/libc/include/powerpc-linux-gnu/bits/fp-fast.h+2-2
......@@ -1,5 +1,5 @@
11/* Define FP_FAST_* macros. PowerPC version.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _MATH_H
2020# error "Never use <bits/fp-fast.h> directly; include <math.h> instead."
lib/libc/include/powerpc-linux-gnu/bits/hwcap.h+2-2
......@@ -1,5 +1,5 @@
11/* Defines for bits in AT_HWCAP and AT_HWCAP2.
2 Copyright (C) 2012-2019 Free Software Foundation, Inc.
2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#if !defined(_SYS_AUXV_H) && !defined(_SYSDEPS_SYSDEP_H)
2020# error "Never include <bits/hwcap.h> directly; use <sys/auxv.h> instead."
lib/libc/include/powerpc-linux-gnu/bits/ioctl-types.h+2-2
......@@ -1,5 +1,5 @@
11/* Structure types for pre-termios terminal ioctls. Linux/powerpc version.
2 Copyright (C) 2014-2019 Free Software Foundation, Inc.
2 Copyright (C) 2014-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_IOCTL_H
2020# error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead."
lib/libc/include/powerpc-linux-gnu/bits/ipc-perm.h created+36
......@@ -0,0 +1,36 @@
1/* struct ipc_perm definition. Linux/powerpc version.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _SYS_IPC_H
20# error "Never use <bits/ipc-perm.h> directly; include <sys/ipc.h> instead."
21#endif
22
23/* Data structure used to pass permission information to IPC operations. */
24struct ipc_perm
25 {
26 __key_t __key; /* Key. */
27 __uid_t uid; /* Owner's user ID. */
28 __gid_t gid; /* Owner's group ID. */
29 __uid_t cuid; /* Creator's user ID. */
30 __gid_t cgid; /* Creator's group ID. */
31 __mode_t mode; /* Read/write permission. */
32 __uint32_t __seq; /* Sequence number. */
33 __uint32_t __pad1;
34 __uint64_t __glibc_reserved1;
35 __uint64_t __glibc_reserved2;
36 };
\ No newline at end of file
lib/libc/include/powerpc-linux-gnu/bits/ipc.h deleted-54
......@@ -1,54 +0,0 @@
1/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_IPC_H
19# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
20#endif
21
22#include <bits/types.h>
23
24/* Mode bits for `msgget', `semget', and `shmget'. */
25#define IPC_CREAT 01000 /* Create key if key does not exist. */
26#define IPC_EXCL 02000 /* Fail if key exists. */
27#define IPC_NOWAIT 04000 /* Return error on wait. */
28
29/* Control commands for `msgctl', `semctl', and `shmctl'. */
30#define IPC_RMID 0 /* Remove identifier. */
31#define IPC_SET 1 /* Set `ipc_perm' options. */
32#define IPC_STAT 2 /* Get `ipc_perm' options. */
33#ifdef __USE_GNU
34# define IPC_INFO 3 /* See ipcs. */
35#endif
36
37/* Special key values. */
38#define IPC_PRIVATE ((__key_t) 0) /* Private key. */
39
40
41/* Data structure used to pass permission information to IPC operations. */
42struct ipc_perm
43 {
44 __key_t __key; /* Key. */
45 __uid_t uid; /* Owner's user ID. */
46 __gid_t gid; /* Owner's group ID. */
47 __uid_t cuid; /* Creator's user ID. */
48 __gid_t cgid; /* Creator's group ID. */
49 __mode_t mode; /* Read/write permission. */
50 __uint32_t __seq; /* Sequence number. */
51 __uint32_t __pad1;
52 __uint64_t __glibc_reserved1;
53 __uint64_t __glibc_reserved2;
54 };
\ No newline at end of file
lib/libc/include/powerpc-linux-gnu/bits/iscanonical.h+2-2
......@@ -1,5 +1,5 @@
11/* Define iscanonical macro. ldbl-128ibm version.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _MATH_H
2020# error "Never use <bits/iscanonical.h> directly; include <math.h> instead."
lib/libc/include/powerpc-linux-gnu/bits/link.h+2-2
......@@ -1,5 +1,5 @@
11/* Machine-specific declarations for dynamic linker interface. PowerPC version
2 Copyright (C) 2004-2019 Free Software Foundation, Inc.
2 Copyright (C) 2004-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _LINK_H
2020# error "Never include <bits/link.h> directly; use <link.h> instead."
lib/libc/include/powerpc-linux-gnu/bits/local_lim.h+2-2
......@@ -1,5 +1,5 @@
11/* Minimum guaranteed maximum values for system limits. Linux/PPC version.
2 Copyright (C) 1993-2019 Free Software Foundation, Inc.
2 Copyright (C) 1993-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; see the file COPYING.LIB. If
17 not, see <http://www.gnu.org/licenses/>. */
17 not, see <https://www.gnu.org/licenses/>. */
1818
1919/* The kernel header pollutes the namespace with the NR_OPEN symbol
2020 and defines LINK_MAX although filesystems have different maxima. A
lib/libc/include/powerpc-linux-gnu/bits/long-double.h+4-3
......@@ -1,5 +1,5 @@
11/* Properties of long double type. ldbl-opt version.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,11 +14,12 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef __NO_LONG_DOUBLE_MATH
2020# define __LONG_DOUBLE_MATH_OPTIONAL 1
2121# ifndef __LONG_DOUBLE_128__
2222# define __NO_LONG_DOUBLE_MATH 1
2323# endif
24#endif
\ No newline at end of file
24#endif
25#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file
lib/libc/include/powerpc-linux-gnu/bits/mman.h+4-2
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX memory map interface. Linux/PowerPC version.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_MMAN_H
2020# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
......@@ -36,6 +36,8 @@
3636# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */
3737# define MAP_STACK 0x20000 /* Allocation is for a stack. */
3838# define MAP_HUGETLB 0x40000 /* Create huge page mapping. */
39# define MAP_SYNC 0x80000 /* Perform synchronous page
40 faults for the mapping. */
3941# define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap
4042 underlying mapping. */
4143#endif
lib/libc/include/powerpc-linux-gnu/bits/msq-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct msqid_ds. PowerPC version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_MSG_H
2020# error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead."
lib/libc/include/powerpc-linux-gnu/bits/procfs.h+2-2
......@@ -1,5 +1,5 @@
11/* Types for registers for sys/procfs.h. PowerPC version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_PROCFS_H
2020# error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead."
lib/libc/include/powerpc-linux-gnu/bits/pthreadtypes-arch.h deleted-81
......@@ -1,81 +0,0 @@
1/* Machine-specific pthread type layouts. PowerPC version.
2 Copyright (C) 2003-2019 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19#ifndef _BITS_PTHREADTYPES_ARCH_H
20#define _BITS_PTHREADTYPES_ARCH_H 1
21
22#include <bits/wordsize.h>
23
24#if __WORDSIZE == 64
25# define __SIZEOF_PTHREAD_MUTEX_T 40
26# define __SIZEOF_PTHREAD_ATTR_T 56
27# define __SIZEOF_PTHREAD_RWLOCK_T 56
28# define __SIZEOF_PTHREAD_BARRIER_T 32
29#else
30# define __SIZEOF_PTHREAD_MUTEX_T 24
31# define __SIZEOF_PTHREAD_ATTR_T 36
32# define __SIZEOF_PTHREAD_RWLOCK_T 32
33# define __SIZEOF_PTHREAD_BARRIER_T 20
34#endif
35#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
36#define __SIZEOF_PTHREAD_COND_T 48
37#define __SIZEOF_PTHREAD_CONDATTR_T 4
38#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
39#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
40
41/* Definitions for internal mutex struct. */
42#define __PTHREAD_COMPAT_PADDING_MID
43#define __PTHREAD_COMPAT_PADDING_END
44#define __PTHREAD_MUTEX_LOCK_ELISION 1
45#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND (__WORDSIZE != 64)
46#define __PTHREAD_MUTEX_USE_UNION (__WORDSIZE != 64)
47
48#define __LOCK_ALIGNMENT
49#define __ONCE_ALIGNMENT
50
51struct __pthread_rwlock_arch_t
52{
53 unsigned int __readers;
54 unsigned int __writers;
55 unsigned int __wrphase_futex;
56 unsigned int __writers_futex;
57 unsigned int __pad3;
58 unsigned int __pad4;
59#if __WORDSIZE == 64
60 int __cur_writer;
61 int __shared;
62 unsigned char __rwelision;
63 unsigned char __pad1[7];
64 unsigned long int __pad2;
65 /* FLAGS must stay at this position in the structure to maintain
66 binary compatibility. */
67 unsigned int __flags;
68# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, {0, 0, 0, 0, 0, 0, 0 }
69#else
70 unsigned char __rwelision;
71 unsigned char __pad2;
72 unsigned char __shared;
73 /* FLAGS must stay at this position in the structure to maintain
74 binary compatibility. */
75 unsigned char __flags;
76 int __cur_writer;
77# define __PTHREAD_RWLOCK_ELISION_EXTRA 0
78#endif
79};
80
81#endif /* bits/pthreadtypes.h */
\ No newline at end of file
lib/libc/include/powerpc-linux-gnu/bits/sem-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct semid_ds. PowerPC version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SEM_H
2020# error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead."
lib/libc/include/powerpc-linux-gnu/bits/semaphore.h+2-2
......@@ -1,5 +1,5 @@
11/* Machine-specific POSIX semaphore type layouts. PowerPC version.
2 Copyright (C) 2003-2019 Free Software Foundation, Inc.
2 Copyright (C) 2003-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44 Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _SEMAPHORE_H
2121# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
lib/libc/include/powerpc-linux-gnu/bits/setjmp.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/* Define the machine-dependent type `jmp_buf'. PowerPC version. */
1919#ifndef _BITS_SETJMP_H
lib/libc/include/powerpc-linux-gnu/bits/shm-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct shmid_ds. PowerPC version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SHM_H
2020# error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead."
lib/libc/include/powerpc-linux-gnu/bits/sigstack.h+2-2
......@@ -1,5 +1,5 @@
11/* sigstack, sigaltstack definitions.
2 Copyright (C) 1998-2019 Free Software Foundation, Inc.
2 Copyright (C) 1998-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_SIGSTACK_H
2020#define _BITS_SIGSTACK_H 1
lib/libc/include/powerpc-linux-gnu/bits/socket-constants.h+2-2
......@@ -1,5 +1,5 @@
11/* Socket constants which vary among Linux architectures. Version for POWER.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SOCKET_H
2020# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
lib/libc/include/powerpc-linux-gnu/bits/stat.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#if !defined _SYS_STAT_H && !defined _FCNTL_H
1919# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
lib/libc/include/powerpc-linux-gnu/bits/struct_mutex.h created+63
......@@ -0,0 +1,63 @@
1/* PowerPC internal mutex struct definitions.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19#ifndef _THREAD_MUTEX_INTERNAL_H
20#define _THREAD_MUTEX_INTERNAL_H 1
21
22struct __pthread_mutex_s
23{
24 int __lock;
25 unsigned int __count;
26 int __owner;
27#if __WORDSIZE == 64
28 unsigned int __nusers;
29#endif
30 /* KIND must stay at this position in the structure to maintain
31 binary compatibility with static initializers. */
32 int __kind;
33#if __WORDSIZE == 64
34 short __spins;
35 short __elision;
36 __pthread_list_t __list;
37# define __PTHREAD_MUTEX_HAVE_PREV 1
38#else
39 unsigned int __nusers;
40 __extension__ union
41 {
42 struct
43 {
44 short __espins;
45 short __elision;
46# define __spins __elision_data.__espins
47# define __elision __elision_data.__elision
48 } __elision_data;
49 __pthread_slist_t __list;
50 };
51# define __PTHREAD_MUTEX_HAVE_PREV 0
52#endif
53};
54
55#if __WORDSIZE == 64
56# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
57 0, 0, 0, 0, __kind, 0, 0, { 0, 0 }
58#else
59# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
60 0, 0, 0, __kind, 0, { { 0, 0 } }
61#endif
62
63#endif
\ No newline at end of file
lib/libc/include/powerpc-linux-gnu/bits/struct_rwlock.h created+61
......@@ -0,0 +1,61 @@
1/* PowerPC internal rwlock struct definitions.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
3
4 This file is part of the GNU C Library.
5
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
19
20#ifndef _RWLOCK_INTERNAL_H
21#define _RWLOCK_INTERNAL_H
22
23struct __pthread_rwlock_arch_t
24{
25 unsigned int __readers;
26 unsigned int __writers;
27 unsigned int __wrphase_futex;
28 unsigned int __writers_futex;
29 unsigned int __pad3;
30 unsigned int __pad4;
31#if __WORDSIZE == 64
32 int __cur_writer;
33 int __shared;
34 unsigned char __rwelision;
35 unsigned char __pad1[7];
36 unsigned long int __pad2;
37 /* FLAGS must stay at this position in the structure to maintain
38 binary compatibility. */
39 unsigned int __flags;
40# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, {0, 0, 0, 0, 0, 0, 0 }
41#else
42 unsigned char __rwelision;
43 unsigned char __pad2;
44 unsigned char __shared;
45 /* FLAGS must stay at this position in the structure to maintain
46 binary compatibility. */
47 unsigned char __flags;
48 int __cur_writer;
49# define __PTHREAD_RWLOCK_ELISION_EXTRA 0
50#endif
51};
52
53#if __WORDSIZE == 64
54# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
55 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, __flags
56#else
57# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
58 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, 0, __flags, 0
59#endif
60
61#endif
\ No newline at end of file
lib/libc/include/powerpc-linux-gnu/bits/termios-baud.h+2-2
......@@ -1,5 +1,5 @@
11/* termios baud rate selection definitions. Linux/powerpc version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-baud.h> directly; use <termios.h> instead."
lib/libc/include/powerpc-linux-gnu/bits/termios-c_cc.h+2-2
......@@ -1,5 +1,5 @@
11/* termios c_cc symbolic constant definitions. Linux/powerpc version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-c_cc.h> directly; use <termios.h> instead."
lib/libc/include/powerpc-linux-gnu/bits/termios-c_cflag.h+2-2
......@@ -1,5 +1,5 @@
11/* termios control mode definitions. Linux/powerpc version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-c_cflag.h> directly; use <termios.h> instead."
lib/libc/include/powerpc-linux-gnu/bits/termios-c_iflag.h+2-2
......@@ -1,5 +1,5 @@
11/* termios input mode definitions. Linux/powerpc version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-c_iflags.h> directly; use <termios.h> instead."
lib/libc/include/powerpc-linux-gnu/bits/termios-c_lflag.h+2-2
......@@ -1,5 +1,5 @@
11/* termios local mode definitions. Linux/powerpc version.
2 Copyright (C) 2019i Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-c_lflag.h> directly; use <termios.h> instead."
lib/libc/include/powerpc-linux-gnu/bits/termios-c_oflag.h+2-2
......@@ -1,5 +1,5 @@
11/* termios output mode definitions. Linux/powerpc version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-c_oflag.h> directly; use <termios.h> instead."
lib/libc/include/powerpc-linux-gnu/bits/termios-misc.h+2-2
......@@ -1,5 +1,5 @@
11/* termios baud platform specific definitions. Linux/powerpc version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-misc.h> directly; use <termios.h> instead."
lib/libc/include/powerpc-linux-gnu/fpu_control.h+2-2
......@@ -1,5 +1,5 @@
11/* FPU control word definitions. PowerPC version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _FPU_CONTROL_H
2020#define _FPU_CONTROL_H
lib/libc/include/powerpc-linux-gnu/ieee754.h+4-4
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,14 +13,14 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _IEEE754_H
19
2019#define _IEEE754_H 1
20
2121#include <features.h>
2222
23#include <endian.h>
23#include <bits/endian.h>
2424
2525__BEGIN_DECLS
2626
lib/libc/include/powerpc-linux-gnu/sys/ptrace.h+12-3
......@@ -1,5 +1,5 @@
11/* `ptrace' debugger support interface. Linux/PowerPC version.
2 Copyright (C) 2001-2019 Free Software Foundation, Inc.
2 Copyright (C) 2001-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_PTRACE_H
2020#define _SYS_PTRACE_H 1
......@@ -38,6 +38,7 @@ __BEGIN_DECLS
3838# undef PTRACE_GETREGSET
3939# undef PTRACE_GETSIGINFO
4040# undef PTRACE_GETSIGMASK
41# undef PTRACE_GET_SYSCALL_INFO
4142# undef PTRACE_GETVRREGS
4243# undef PTRACE_GETVSRREGS
4344# undef PTRACE_INTERRUPT
......@@ -65,6 +66,10 @@ __BEGIN_DECLS
6566# undef PTRACE_SINGLEBLOCK
6667# undef PTRACE_SINGLESTEP
6768# undef PTRACE_SYSCALL
69# undef PTRACE_SYSCALL_INFO_NONE
70# undef PTRACE_SYSCALL_INFO_ENTRY
71# undef PTRACE_SYSCALL_INFO_EXIT
72# undef PTRACE_SYSCALL_INFO_SECCOMP
6873# undef PTRACE_TRACEME
6974#endif
7075
......@@ -241,8 +246,12 @@ enum __ptrace_request
241246#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER
242247
243248 /* Get seccomp BPF filter metadata. */
244 PTRACE_SECCOMP_GET_METADATA = 0x420d
249 PTRACE_SECCOMP_GET_METADATA = 0x420d,
245250#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
251
252 /* Get information about system call. */
253 PTRACE_GET_SYSCALL_INFO = 0x420e
254#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
246255};
247256
248257
lib/libc/include/powerpc-linux-gnu/sys/ucontext.h+6-6
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_UCONTEXT_H
1919#define _SYS_UCONTEXT_H 1
......@@ -75,12 +75,12 @@ typedef struct
7575 * a sigcontext. For older kernel (without Altivec) the sigcontext matches
7676 * the mcontext upto but not including the v_regs field. For kernels that
7777 * don't set AT_HWCAP or return AT_HWCAP without PPC_FEATURE_HAS_ALTIVEC the
78 * v_regs field may not exist and should not be referenced. The v_regd field
79 * can be refernced safely only after verifying that PPC_FEATURE_HAS_ALTIVEC
78 * v_regs field may not exist and should not be referenced. The v_regs field
79 * can be referenced safely only after verifying that PPC_FEATURE_HAS_ALTIVEC
8080 * is set in AT_HWCAP. */
8181
8282/* Number of general registers. */
83# define __NGREG 48 /* includes r0-r31, nip, msr, lr, etc. */
83# define __NGREG 48 /* includes r0-r31, nip, msr, lr, etc. */
8484# define __NFPREG 33 /* includes fp0-fp31 &fpscr. */
8585# define __NVRREG 34 /* includes v0-v31, vscr, & vrsave in
8686 split vectors */
......@@ -136,7 +136,7 @@ typedef struct {
136136 * either NULL (if this processor does not support the VMX feature) or the
137137 * address of the first quadword within the allocated (vmx_reserve) area.
138138 *
139 * The pointer (v_regs) of vector type (elf_vrreg_t) is essentually
139 * The pointer (v_regs) of vector type (elf_vrreg_t) is essentially
140140 * an array of 34 quadword entries. The entries with
141141 * indexes 0-31 contain the corresponding vector registers. The entry with
142142 * index 32 contains the vscr as the last word (offset 12) within the
lib/libc/include/powerpc-linux-gnu/sys/user.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_USER_H
1919
lib/libc/include/powerpc64-linux-gnu/bits/endian.h deleted-36
......@@ -1,36 +0,0 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
17
18/* PowerPC can be little or big endian. Hopefully gcc will know... */
19
20#ifndef _ENDIAN_H
21# error "Never use <bits/endian.h> directly; include <endian.h> instead."
22#endif
23
24#if defined __BIG_ENDIAN__ || defined _BIG_ENDIAN
25# if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN
26# error Both BIG_ENDIAN and LITTLE_ENDIAN defined!
27# endif
28# define __BYTE_ORDER __BIG_ENDIAN
29#else
30# if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN
31# define __BYTE_ORDER __LITTLE_ENDIAN
32# else
33# warning Cannot determine current byte order, assuming big-endian.
34# define __BYTE_ORDER __BIG_ENDIAN
35# endif
36#endif
\ No newline at end of file
lib/libc/include/powerpc64-linux-gnu/bits/endianness.h created+16
......@@ -0,0 +1,16 @@
1#ifndef _BITS_ENDIANNESS_H
2#define _BITS_ENDIANNESS_H 1
3
4#ifndef _BITS_ENDIAN_H
5# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
6#endif
7
8/* PowerPC has selectable endianness. */
9#if defined __BIG_ENDIAN__ || defined _BIG_ENDIAN
10# define __BYTE_ORDER __BIG_ENDIAN
11#endif
12#if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN
13# define __BYTE_ORDER __LITTLE_ENDIAN
14#endif
15
16#endif /* bits/endianness.h */
\ No newline at end of file
lib/libc/include/powerpc64-linux-gnu/bits/environments.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _UNISTD_H
1919# error "Never include this file directly. Use <unistd.h> instead"
lib/libc/include/powerpc64-linux-gnu/bits/fcntl.h+2-2
......@@ -1,5 +1,5 @@
11/* O_*, F_*, FD_* bit values for Linux/PowerPC.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _FCNTL_H
2020# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
lib/libc/include/powerpc64-linux-gnu/bits/fenv.h+3-3
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _FENV_H
1919# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
......@@ -170,7 +170,7 @@ extern const fenv_t __fe_nonieee_env;
170170
171171#endif
172172
173#if __GLIBC_USE (IEC_60559_BFP_EXT)
173#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
174174/* Type representing floating-point control modes. */
175175typedef double femode_t;
176176
lib/libc/include/powerpc64-linux-gnu/bits/fenvinline.h+2-2
......@@ -1,5 +1,5 @@
11/* Inline floating-point environment handling functions for powerpc.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#if defined __GNUC__ && !defined _SOFT_FLOAT && !defined __NO_FPRS__
2020
lib/libc/include/powerpc64-linux-gnu/bits/floatn.h+2-2
......@@ -1,5 +1,5 @@
11/* Macros to control TS 18661-3 glibc features on powerpc.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_FLOATN_H
2020#define _BITS_FLOATN_H
lib/libc/include/powerpc64-linux-gnu/bits/fp-fast.h+2-2
......@@ -1,5 +1,5 @@
11/* Define FP_FAST_* macros. PowerPC version.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _MATH_H
2020# error "Never use <bits/fp-fast.h> directly; include <math.h> instead."
lib/libc/include/powerpc64-linux-gnu/bits/hwcap.h+2-2
......@@ -1,5 +1,5 @@
11/* Defines for bits in AT_HWCAP and AT_HWCAP2.
2 Copyright (C) 2012-2019 Free Software Foundation, Inc.
2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#if !defined(_SYS_AUXV_H) && !defined(_SYSDEPS_SYSDEP_H)
2020# error "Never include <bits/hwcap.h> directly; use <sys/auxv.h> instead."
lib/libc/include/powerpc64-linux-gnu/bits/ioctl-types.h+2-2
......@@ -1,5 +1,5 @@
11/* Structure types for pre-termios terminal ioctls. Linux/powerpc version.
2 Copyright (C) 2014-2019 Free Software Foundation, Inc.
2 Copyright (C) 2014-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_IOCTL_H
2020# error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead."
lib/libc/include/powerpc64-linux-gnu/bits/ipc-perm.h created+36
......@@ -0,0 +1,36 @@
1/* struct ipc_perm definition. Linux/powerpc version.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _SYS_IPC_H
20# error "Never use <bits/ipc-perm.h> directly; include <sys/ipc.h> instead."
21#endif
22
23/* Data structure used to pass permission information to IPC operations. */
24struct ipc_perm
25 {
26 __key_t __key; /* Key. */
27 __uid_t uid; /* Owner's user ID. */
28 __gid_t gid; /* Owner's group ID. */
29 __uid_t cuid; /* Creator's user ID. */
30 __gid_t cgid; /* Creator's group ID. */
31 __mode_t mode; /* Read/write permission. */
32 __uint32_t __seq; /* Sequence number. */
33 __uint32_t __pad1;
34 __uint64_t __glibc_reserved1;
35 __uint64_t __glibc_reserved2;
36 };
\ No newline at end of file
lib/libc/include/powerpc64-linux-gnu/bits/ipc.h deleted-54
......@@ -1,54 +0,0 @@
1/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_IPC_H
19# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
20#endif
21
22#include <bits/types.h>
23
24/* Mode bits for `msgget', `semget', and `shmget'. */
25#define IPC_CREAT 01000 /* Create key if key does not exist. */
26#define IPC_EXCL 02000 /* Fail if key exists. */
27#define IPC_NOWAIT 04000 /* Return error on wait. */
28
29/* Control commands for `msgctl', `semctl', and `shmctl'. */
30#define IPC_RMID 0 /* Remove identifier. */
31#define IPC_SET 1 /* Set `ipc_perm' options. */
32#define IPC_STAT 2 /* Get `ipc_perm' options. */
33#ifdef __USE_GNU
34# define IPC_INFO 3 /* See ipcs. */
35#endif
36
37/* Special key values. */
38#define IPC_PRIVATE ((__key_t) 0) /* Private key. */
39
40
41/* Data structure used to pass permission information to IPC operations. */
42struct ipc_perm
43 {
44 __key_t __key; /* Key. */
45 __uid_t uid; /* Owner's user ID. */
46 __gid_t gid; /* Owner's group ID. */
47 __uid_t cuid; /* Creator's user ID. */
48 __gid_t cgid; /* Creator's group ID. */
49 __mode_t mode; /* Read/write permission. */
50 __uint32_t __seq; /* Sequence number. */
51 __uint32_t __pad1;
52 __uint64_t __glibc_reserved1;
53 __uint64_t __glibc_reserved2;
54 };
\ No newline at end of file
lib/libc/include/powerpc64-linux-gnu/bits/iscanonical.h+2-2
......@@ -1,5 +1,5 @@
11/* Define iscanonical macro. ldbl-128ibm version.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _MATH_H
2020# error "Never use <bits/iscanonical.h> directly; include <math.h> instead."
lib/libc/include/powerpc64-linux-gnu/bits/link.h+2-2
......@@ -1,5 +1,5 @@
11/* Machine-specific declarations for dynamic linker interface. PowerPC version
2 Copyright (C) 2004-2019 Free Software Foundation, Inc.
2 Copyright (C) 2004-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _LINK_H
2020# error "Never include <bits/link.h> directly; use <link.h> instead."
lib/libc/include/powerpc64-linux-gnu/bits/local_lim.h+2-2
......@@ -1,5 +1,5 @@
11/* Minimum guaranteed maximum values for system limits. Linux/PPC version.
2 Copyright (C) 1993-2019 Free Software Foundation, Inc.
2 Copyright (C) 1993-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; see the file COPYING.LIB. If
17 not, see <http://www.gnu.org/licenses/>. */
17 not, see <https://www.gnu.org/licenses/>. */
1818
1919/* The kernel header pollutes the namespace with the NR_OPEN symbol
2020 and defines LINK_MAX although filesystems have different maxima. A
lib/libc/include/powerpc64-linux-gnu/bits/long-double.h+4-3
......@@ -1,5 +1,5 @@
11/* Properties of long double type. ldbl-opt version.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,11 +14,12 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef __NO_LONG_DOUBLE_MATH
2020# define __LONG_DOUBLE_MATH_OPTIONAL 1
2121# ifndef __LONG_DOUBLE_128__
2222# define __NO_LONG_DOUBLE_MATH 1
2323# endif
24#endif
\ No newline at end of file
24#endif
25#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file
lib/libc/include/powerpc64-linux-gnu/bits/mman.h+4-2
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX memory map interface. Linux/PowerPC version.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_MMAN_H
2020# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
......@@ -36,6 +36,8 @@
3636# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */
3737# define MAP_STACK 0x20000 /* Allocation is for a stack. */
3838# define MAP_HUGETLB 0x40000 /* Create huge page mapping. */
39# define MAP_SYNC 0x80000 /* Perform synchronous page
40 faults for the mapping. */
3941# define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap
4042 underlying mapping. */
4143#endif
lib/libc/include/powerpc64-linux-gnu/bits/msq-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct msqid_ds. PowerPC version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_MSG_H
2020# error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead."
lib/libc/include/powerpc64-linux-gnu/bits/procfs.h+2-2
......@@ -1,5 +1,5 @@
11/* Types for registers for sys/procfs.h. PowerPC version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_PROCFS_H
2020# error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead."
lib/libc/include/powerpc64-linux-gnu/bits/pthreadtypes-arch.h deleted-81
......@@ -1,81 +0,0 @@
1/* Machine-specific pthread type layouts. PowerPC version.
2 Copyright (C) 2003-2019 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19#ifndef _BITS_PTHREADTYPES_ARCH_H
20#define _BITS_PTHREADTYPES_ARCH_H 1
21
22#include <bits/wordsize.h>
23
24#if __WORDSIZE == 64
25# define __SIZEOF_PTHREAD_MUTEX_T 40
26# define __SIZEOF_PTHREAD_ATTR_T 56
27# define __SIZEOF_PTHREAD_RWLOCK_T 56
28# define __SIZEOF_PTHREAD_BARRIER_T 32
29#else
30# define __SIZEOF_PTHREAD_MUTEX_T 24
31# define __SIZEOF_PTHREAD_ATTR_T 36
32# define __SIZEOF_PTHREAD_RWLOCK_T 32
33# define __SIZEOF_PTHREAD_BARRIER_T 20
34#endif
35#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
36#define __SIZEOF_PTHREAD_COND_T 48
37#define __SIZEOF_PTHREAD_CONDATTR_T 4
38#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
39#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
40
41/* Definitions for internal mutex struct. */
42#define __PTHREAD_COMPAT_PADDING_MID
43#define __PTHREAD_COMPAT_PADDING_END
44#define __PTHREAD_MUTEX_LOCK_ELISION 1
45#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND (__WORDSIZE != 64)
46#define __PTHREAD_MUTEX_USE_UNION (__WORDSIZE != 64)
47
48#define __LOCK_ALIGNMENT
49#define __ONCE_ALIGNMENT
50
51struct __pthread_rwlock_arch_t
52{
53 unsigned int __readers;
54 unsigned int __writers;
55 unsigned int __wrphase_futex;
56 unsigned int __writers_futex;
57 unsigned int __pad3;
58 unsigned int __pad4;
59#if __WORDSIZE == 64
60 int __cur_writer;
61 int __shared;
62 unsigned char __rwelision;
63 unsigned char __pad1[7];
64 unsigned long int __pad2;
65 /* FLAGS must stay at this position in the structure to maintain
66 binary compatibility. */
67 unsigned int __flags;
68# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, {0, 0, 0, 0, 0, 0, 0 }
69#else
70 unsigned char __rwelision;
71 unsigned char __pad2;
72 unsigned char __shared;
73 /* FLAGS must stay at this position in the structure to maintain
74 binary compatibility. */
75 unsigned char __flags;
76 int __cur_writer;
77# define __PTHREAD_RWLOCK_ELISION_EXTRA 0
78#endif
79};
80
81#endif /* bits/pthreadtypes.h */
\ No newline at end of file
lib/libc/include/powerpc64-linux-gnu/bits/sem-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct semid_ds. PowerPC version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SEM_H
2020# error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead."
lib/libc/include/powerpc64-linux-gnu/bits/semaphore.h+2-2
......@@ -1,5 +1,5 @@
11/* Machine-specific POSIX semaphore type layouts. PowerPC version.
2 Copyright (C) 2003-2019 Free Software Foundation, Inc.
2 Copyright (C) 2003-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44 Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _SEMAPHORE_H
2121# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
lib/libc/include/powerpc64-linux-gnu/bits/setjmp.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/* Define the machine-dependent type `jmp_buf'. PowerPC version. */
1919#ifndef _BITS_SETJMP_H
lib/libc/include/powerpc64-linux-gnu/bits/shm-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct shmid_ds. PowerPC version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SHM_H
2020# error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead."
lib/libc/include/powerpc64-linux-gnu/bits/sigstack.h+2-2
......@@ -1,5 +1,5 @@
11/* sigstack, sigaltstack definitions.
2 Copyright (C) 1998-2019 Free Software Foundation, Inc.
2 Copyright (C) 1998-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_SIGSTACK_H
2020#define _BITS_SIGSTACK_H 1
lib/libc/include/powerpc64-linux-gnu/bits/socket-constants.h+2-2
......@@ -1,5 +1,5 @@
11/* Socket constants which vary among Linux architectures. Version for POWER.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SOCKET_H
2020# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
lib/libc/include/powerpc64-linux-gnu/bits/stat.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#if !defined _SYS_STAT_H && !defined _FCNTL_H
1919# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
lib/libc/include/powerpc64-linux-gnu/bits/struct_mutex.h created+63
......@@ -0,0 +1,63 @@
1/* PowerPC internal mutex struct definitions.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19#ifndef _THREAD_MUTEX_INTERNAL_H
20#define _THREAD_MUTEX_INTERNAL_H 1
21
22struct __pthread_mutex_s
23{
24 int __lock;
25 unsigned int __count;
26 int __owner;
27#if __WORDSIZE == 64
28 unsigned int __nusers;
29#endif
30 /* KIND must stay at this position in the structure to maintain
31 binary compatibility with static initializers. */
32 int __kind;
33#if __WORDSIZE == 64
34 short __spins;
35 short __elision;
36 __pthread_list_t __list;
37# define __PTHREAD_MUTEX_HAVE_PREV 1
38#else
39 unsigned int __nusers;
40 __extension__ union
41 {
42 struct
43 {
44 short __espins;
45 short __elision;
46# define __spins __elision_data.__espins
47# define __elision __elision_data.__elision
48 } __elision_data;
49 __pthread_slist_t __list;
50 };
51# define __PTHREAD_MUTEX_HAVE_PREV 0
52#endif
53};
54
55#if __WORDSIZE == 64
56# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
57 0, 0, 0, 0, __kind, 0, 0, { 0, 0 }
58#else
59# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
60 0, 0, 0, __kind, 0, { { 0, 0 } }
61#endif
62
63#endif
\ No newline at end of file
lib/libc/include/powerpc64-linux-gnu/bits/struct_rwlock.h created+61
......@@ -0,0 +1,61 @@
1/* PowerPC internal rwlock struct definitions.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
3
4 This file is part of the GNU C Library.
5
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
19
20#ifndef _RWLOCK_INTERNAL_H
21#define _RWLOCK_INTERNAL_H
22
23struct __pthread_rwlock_arch_t
24{
25 unsigned int __readers;
26 unsigned int __writers;
27 unsigned int __wrphase_futex;
28 unsigned int __writers_futex;
29 unsigned int __pad3;
30 unsigned int __pad4;
31#if __WORDSIZE == 64
32 int __cur_writer;
33 int __shared;
34 unsigned char __rwelision;
35 unsigned char __pad1[7];
36 unsigned long int __pad2;
37 /* FLAGS must stay at this position in the structure to maintain
38 binary compatibility. */
39 unsigned int __flags;
40# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, {0, 0, 0, 0, 0, 0, 0 }
41#else
42 unsigned char __rwelision;
43 unsigned char __pad2;
44 unsigned char __shared;
45 /* FLAGS must stay at this position in the structure to maintain
46 binary compatibility. */
47 unsigned char __flags;
48 int __cur_writer;
49# define __PTHREAD_RWLOCK_ELISION_EXTRA 0
50#endif
51};
52
53#if __WORDSIZE == 64
54# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
55 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, __flags
56#else
57# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
58 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, 0, __flags, 0
59#endif
60
61#endif
\ No newline at end of file
lib/libc/include/powerpc64-linux-gnu/bits/termios-baud.h+2-2
......@@ -1,5 +1,5 @@
11/* termios baud rate selection definitions. Linux/powerpc version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-baud.h> directly; use <termios.h> instead."
lib/libc/include/powerpc64-linux-gnu/bits/termios-c_cc.h+2-2
......@@ -1,5 +1,5 @@
11/* termios c_cc symbolic constant definitions. Linux/powerpc version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-c_cc.h> directly; use <termios.h> instead."
lib/libc/include/powerpc64-linux-gnu/bits/termios-c_cflag.h+2-2
......@@ -1,5 +1,5 @@
11/* termios control mode definitions. Linux/powerpc version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-c_cflag.h> directly; use <termios.h> instead."
lib/libc/include/powerpc64-linux-gnu/bits/termios-c_iflag.h+2-2
......@@ -1,5 +1,5 @@
11/* termios input mode definitions. Linux/powerpc version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-c_iflags.h> directly; use <termios.h> instead."
lib/libc/include/powerpc64-linux-gnu/bits/termios-c_lflag.h+2-2
......@@ -1,5 +1,5 @@
11/* termios local mode definitions. Linux/powerpc version.
2 Copyright (C) 2019i Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-c_lflag.h> directly; use <termios.h> instead."
lib/libc/include/powerpc64-linux-gnu/bits/termios-c_oflag.h+2-2
......@@ -1,5 +1,5 @@
11/* termios output mode definitions. Linux/powerpc version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-c_oflag.h> directly; use <termios.h> instead."
lib/libc/include/powerpc64-linux-gnu/bits/termios-misc.h+2-2
......@@ -1,5 +1,5 @@
11/* termios baud platform specific definitions. Linux/powerpc version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-misc.h> directly; use <termios.h> instead."
lib/libc/include/powerpc64-linux-gnu/fpu_control.h+2-2
......@@ -1,5 +1,5 @@
11/* FPU control word definitions. PowerPC version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _FPU_CONTROL_H
2020#define _FPU_CONTROL_H
lib/libc/include/powerpc64-linux-gnu/ieee754.h+4-4
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,14 +13,14 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _IEEE754_H
19
2019#define _IEEE754_H 1
20
2121#include <features.h>
2222
23#include <endian.h>
23#include <bits/endian.h>
2424
2525__BEGIN_DECLS
2626
lib/libc/include/powerpc64-linux-gnu/sys/ptrace.h+12-3
......@@ -1,5 +1,5 @@
11/* `ptrace' debugger support interface. Linux/PowerPC version.
2 Copyright (C) 2001-2019 Free Software Foundation, Inc.
2 Copyright (C) 2001-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_PTRACE_H
2020#define _SYS_PTRACE_H 1
......@@ -38,6 +38,7 @@ __BEGIN_DECLS
3838# undef PTRACE_GETREGSET
3939# undef PTRACE_GETSIGINFO
4040# undef PTRACE_GETSIGMASK
41# undef PTRACE_GET_SYSCALL_INFO
4142# undef PTRACE_GETVRREGS
4243# undef PTRACE_GETVSRREGS
4344# undef PTRACE_INTERRUPT
......@@ -65,6 +66,10 @@ __BEGIN_DECLS
6566# undef PTRACE_SINGLEBLOCK
6667# undef PTRACE_SINGLESTEP
6768# undef PTRACE_SYSCALL
69# undef PTRACE_SYSCALL_INFO_NONE
70# undef PTRACE_SYSCALL_INFO_ENTRY
71# undef PTRACE_SYSCALL_INFO_EXIT
72# undef PTRACE_SYSCALL_INFO_SECCOMP
6873# undef PTRACE_TRACEME
6974#endif
7075
......@@ -241,8 +246,12 @@ enum __ptrace_request
241246#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER
242247
243248 /* Get seccomp BPF filter metadata. */
244 PTRACE_SECCOMP_GET_METADATA = 0x420d
249 PTRACE_SECCOMP_GET_METADATA = 0x420d,
245250#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
251
252 /* Get information about system call. */
253 PTRACE_GET_SYSCALL_INFO = 0x420e
254#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
246255};
247256
248257
lib/libc/include/powerpc64-linux-gnu/sys/ucontext.h+6-6
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_UCONTEXT_H
1919#define _SYS_UCONTEXT_H 1
......@@ -75,12 +75,12 @@ typedef struct
7575 * a sigcontext. For older kernel (without Altivec) the sigcontext matches
7676 * the mcontext upto but not including the v_regs field. For kernels that
7777 * don't set AT_HWCAP or return AT_HWCAP without PPC_FEATURE_HAS_ALTIVEC the
78 * v_regs field may not exist and should not be referenced. The v_regd field
79 * can be refernced safely only after verifying that PPC_FEATURE_HAS_ALTIVEC
78 * v_regs field may not exist and should not be referenced. The v_regs field
79 * can be referenced safely only after verifying that PPC_FEATURE_HAS_ALTIVEC
8080 * is set in AT_HWCAP. */
8181
8282/* Number of general registers. */
83# define __NGREG 48 /* includes r0-r31, nip, msr, lr, etc. */
83# define __NGREG 48 /* includes r0-r31, nip, msr, lr, etc. */
8484# define __NFPREG 33 /* includes fp0-fp31 &fpscr. */
8585# define __NVRREG 34 /* includes v0-v31, vscr, & vrsave in
8686 split vectors */
......@@ -136,7 +136,7 @@ typedef struct {
136136 * either NULL (if this processor does not support the VMX feature) or the
137137 * address of the first quadword within the allocated (vmx_reserve) area.
138138 *
139 * The pointer (v_regs) of vector type (elf_vrreg_t) is essentually
139 * The pointer (v_regs) of vector type (elf_vrreg_t) is essentially
140140 * an array of 34 quadword entries. The entries with
141141 * indexes 0-31 contain the corresponding vector registers. The entry with
142142 * index 32 contains the vscr as the last word (offset 12) within the
lib/libc/include/powerpc64-linux-gnu/sys/user.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_USER_H
1919
lib/libc/include/powerpc64le-linux-gnu/bits/endian.h deleted-36
......@@ -1,36 +0,0 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
17
18/* PowerPC can be little or big endian. Hopefully gcc will know... */
19
20#ifndef _ENDIAN_H
21# error "Never use <bits/endian.h> directly; include <endian.h> instead."
22#endif
23
24#if defined __BIG_ENDIAN__ || defined _BIG_ENDIAN
25# if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN
26# error Both BIG_ENDIAN and LITTLE_ENDIAN defined!
27# endif
28# define __BYTE_ORDER __BIG_ENDIAN
29#else
30# if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN
31# define __BYTE_ORDER __LITTLE_ENDIAN
32# else
33# warning Cannot determine current byte order, assuming big-endian.
34# define __BYTE_ORDER __BIG_ENDIAN
35# endif
36#endif
\ No newline at end of file
lib/libc/include/powerpc64le-linux-gnu/bits/endianness.h created+16
......@@ -0,0 +1,16 @@
1#ifndef _BITS_ENDIANNESS_H
2#define _BITS_ENDIANNESS_H 1
3
4#ifndef _BITS_ENDIAN_H
5# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
6#endif
7
8/* PowerPC has selectable endianness. */
9#if defined __BIG_ENDIAN__ || defined _BIG_ENDIAN
10# define __BYTE_ORDER __BIG_ENDIAN
11#endif
12#if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN
13# define __BYTE_ORDER __LITTLE_ENDIAN
14#endif
15
16#endif /* bits/endianness.h */
\ No newline at end of file
lib/libc/include/powerpc64le-linux-gnu/bits/environments.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _UNISTD_H
1919# error "Never include this file directly. Use <unistd.h> instead"
lib/libc/include/powerpc64le-linux-gnu/bits/fcntl.h+2-2
......@@ -1,5 +1,5 @@
11/* O_*, F_*, FD_* bit values for Linux/PowerPC.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _FCNTL_H
2020# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
lib/libc/include/powerpc64le-linux-gnu/bits/fenv.h+3-3
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _FENV_H
1919# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
......@@ -170,7 +170,7 @@ extern const fenv_t __fe_nonieee_env;
170170
171171#endif
172172
173#if __GLIBC_USE (IEC_60559_BFP_EXT)
173#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
174174/* Type representing floating-point control modes. */
175175typedef double femode_t;
176176
lib/libc/include/powerpc64le-linux-gnu/bits/fenvinline.h+2-2
......@@ -1,5 +1,5 @@
11/* Inline floating-point environment handling functions for powerpc.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#if defined __GNUC__ && !defined _SOFT_FLOAT && !defined __NO_FPRS__
2020
lib/libc/include/powerpc64le-linux-gnu/bits/floatn.h+2-2
......@@ -1,5 +1,5 @@
11/* Macros to control TS 18661-3 glibc features on powerpc.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_FLOATN_H
2020#define _BITS_FLOATN_H
lib/libc/include/powerpc64le-linux-gnu/bits/fp-fast.h+2-2
......@@ -1,5 +1,5 @@
11/* Define FP_FAST_* macros. PowerPC version.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _MATH_H
2020# error "Never use <bits/fp-fast.h> directly; include <math.h> instead."
lib/libc/include/powerpc64le-linux-gnu/bits/hwcap.h+2-2
......@@ -1,5 +1,5 @@
11/* Defines for bits in AT_HWCAP and AT_HWCAP2.
2 Copyright (C) 2012-2019 Free Software Foundation, Inc.
2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#if !defined(_SYS_AUXV_H) && !defined(_SYSDEPS_SYSDEP_H)
2020# error "Never include <bits/hwcap.h> directly; use <sys/auxv.h> instead."
lib/libc/include/powerpc64le-linux-gnu/bits/ioctl-types.h+2-2
......@@ -1,5 +1,5 @@
11/* Structure types for pre-termios terminal ioctls. Linux/powerpc version.
2 Copyright (C) 2014-2019 Free Software Foundation, Inc.
2 Copyright (C) 2014-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_IOCTL_H
2020# error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead."
lib/libc/include/powerpc64le-linux-gnu/bits/ipc-perm.h created+36
......@@ -0,0 +1,36 @@
1/* struct ipc_perm definition. Linux/powerpc version.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _SYS_IPC_H
20# error "Never use <bits/ipc-perm.h> directly; include <sys/ipc.h> instead."
21#endif
22
23/* Data structure used to pass permission information to IPC operations. */
24struct ipc_perm
25 {
26 __key_t __key; /* Key. */
27 __uid_t uid; /* Owner's user ID. */
28 __gid_t gid; /* Owner's group ID. */
29 __uid_t cuid; /* Creator's user ID. */
30 __gid_t cgid; /* Creator's group ID. */
31 __mode_t mode; /* Read/write permission. */
32 __uint32_t __seq; /* Sequence number. */
33 __uint32_t __pad1;
34 __uint64_t __glibc_reserved1;
35 __uint64_t __glibc_reserved2;
36 };
\ No newline at end of file
lib/libc/include/powerpc64le-linux-gnu/bits/ipc.h deleted-54
......@@ -1,54 +0,0 @@
1/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_IPC_H
19# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
20#endif
21
22#include <bits/types.h>
23
24/* Mode bits for `msgget', `semget', and `shmget'. */
25#define IPC_CREAT 01000 /* Create key if key does not exist. */
26#define IPC_EXCL 02000 /* Fail if key exists. */
27#define IPC_NOWAIT 04000 /* Return error on wait. */
28
29/* Control commands for `msgctl', `semctl', and `shmctl'. */
30#define IPC_RMID 0 /* Remove identifier. */
31#define IPC_SET 1 /* Set `ipc_perm' options. */
32#define IPC_STAT 2 /* Get `ipc_perm' options. */
33#ifdef __USE_GNU
34# define IPC_INFO 3 /* See ipcs. */
35#endif
36
37/* Special key values. */
38#define IPC_PRIVATE ((__key_t) 0) /* Private key. */
39
40
41/* Data structure used to pass permission information to IPC operations. */
42struct ipc_perm
43 {
44 __key_t __key; /* Key. */
45 __uid_t uid; /* Owner's user ID. */
46 __gid_t gid; /* Owner's group ID. */
47 __uid_t cuid; /* Creator's user ID. */
48 __gid_t cgid; /* Creator's group ID. */
49 __mode_t mode; /* Read/write permission. */
50 __uint32_t __seq; /* Sequence number. */
51 __uint32_t __pad1;
52 __uint64_t __glibc_reserved1;
53 __uint64_t __glibc_reserved2;
54 };
\ No newline at end of file
lib/libc/include/powerpc64le-linux-gnu/bits/iscanonical.h+2-2
......@@ -1,5 +1,5 @@
11/* Define iscanonical macro. ldbl-128ibm version.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _MATH_H
2020# error "Never use <bits/iscanonical.h> directly; include <math.h> instead."
lib/libc/include/powerpc64le-linux-gnu/bits/link.h+2-2
......@@ -1,5 +1,5 @@
11/* Machine-specific declarations for dynamic linker interface. PowerPC version
2 Copyright (C) 2004-2019 Free Software Foundation, Inc.
2 Copyright (C) 2004-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _LINK_H
2020# error "Never include <bits/link.h> directly; use <link.h> instead."
lib/libc/include/powerpc64le-linux-gnu/bits/local_lim.h+2-2
......@@ -1,5 +1,5 @@
11/* Minimum guaranteed maximum values for system limits. Linux/PPC version.
2 Copyright (C) 1993-2019 Free Software Foundation, Inc.
2 Copyright (C) 1993-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; see the file COPYING.LIB. If
17 not, see <http://www.gnu.org/licenses/>. */
17 not, see <https://www.gnu.org/licenses/>. */
1818
1919/* The kernel header pollutes the namespace with the NR_OPEN symbol
2020 and defines LINK_MAX although filesystems have different maxima. A
lib/libc/include/powerpc64le-linux-gnu/bits/long-double.h+4-3
......@@ -1,5 +1,5 @@
11/* Properties of long double type. ldbl-opt version.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,11 +14,12 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef __NO_LONG_DOUBLE_MATH
2020# define __LONG_DOUBLE_MATH_OPTIONAL 1
2121# ifndef __LONG_DOUBLE_128__
2222# define __NO_LONG_DOUBLE_MATH 1
2323# endif
24#endif
\ No newline at end of file
24#endif
25#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file
lib/libc/include/powerpc64le-linux-gnu/bits/mman.h+4-2
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX memory map interface. Linux/PowerPC version.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_MMAN_H
2020# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
......@@ -36,6 +36,8 @@
3636# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */
3737# define MAP_STACK 0x20000 /* Allocation is for a stack. */
3838# define MAP_HUGETLB 0x40000 /* Create huge page mapping. */
39# define MAP_SYNC 0x80000 /* Perform synchronous page
40 faults for the mapping. */
3941# define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap
4042 underlying mapping. */
4143#endif
lib/libc/include/powerpc64le-linux-gnu/bits/msq-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct msqid_ds. PowerPC version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_MSG_H
2020# error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead."
lib/libc/include/powerpc64le-linux-gnu/bits/procfs.h+2-2
......@@ -1,5 +1,5 @@
11/* Types for registers for sys/procfs.h. PowerPC version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_PROCFS_H
2020# error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead."
lib/libc/include/powerpc64le-linux-gnu/bits/pthreadtypes-arch.h deleted-81
......@@ -1,81 +0,0 @@
1/* Machine-specific pthread type layouts. PowerPC version.
2 Copyright (C) 2003-2019 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19#ifndef _BITS_PTHREADTYPES_ARCH_H
20#define _BITS_PTHREADTYPES_ARCH_H 1
21
22#include <bits/wordsize.h>
23
24#if __WORDSIZE == 64
25# define __SIZEOF_PTHREAD_MUTEX_T 40
26# define __SIZEOF_PTHREAD_ATTR_T 56
27# define __SIZEOF_PTHREAD_RWLOCK_T 56
28# define __SIZEOF_PTHREAD_BARRIER_T 32
29#else
30# define __SIZEOF_PTHREAD_MUTEX_T 24
31# define __SIZEOF_PTHREAD_ATTR_T 36
32# define __SIZEOF_PTHREAD_RWLOCK_T 32
33# define __SIZEOF_PTHREAD_BARRIER_T 20
34#endif
35#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
36#define __SIZEOF_PTHREAD_COND_T 48
37#define __SIZEOF_PTHREAD_CONDATTR_T 4
38#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
39#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
40
41/* Definitions for internal mutex struct. */
42#define __PTHREAD_COMPAT_PADDING_MID
43#define __PTHREAD_COMPAT_PADDING_END
44#define __PTHREAD_MUTEX_LOCK_ELISION 1
45#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND (__WORDSIZE != 64)
46#define __PTHREAD_MUTEX_USE_UNION (__WORDSIZE != 64)
47
48#define __LOCK_ALIGNMENT
49#define __ONCE_ALIGNMENT
50
51struct __pthread_rwlock_arch_t
52{
53 unsigned int __readers;
54 unsigned int __writers;
55 unsigned int __wrphase_futex;
56 unsigned int __writers_futex;
57 unsigned int __pad3;
58 unsigned int __pad4;
59#if __WORDSIZE == 64
60 int __cur_writer;
61 int __shared;
62 unsigned char __rwelision;
63 unsigned char __pad1[7];
64 unsigned long int __pad2;
65 /* FLAGS must stay at this position in the structure to maintain
66 binary compatibility. */
67 unsigned int __flags;
68# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, {0, 0, 0, 0, 0, 0, 0 }
69#else
70 unsigned char __rwelision;
71 unsigned char __pad2;
72 unsigned char __shared;
73 /* FLAGS must stay at this position in the structure to maintain
74 binary compatibility. */
75 unsigned char __flags;
76 int __cur_writer;
77# define __PTHREAD_RWLOCK_ELISION_EXTRA 0
78#endif
79};
80
81#endif /* bits/pthreadtypes.h */
\ No newline at end of file
lib/libc/include/powerpc64le-linux-gnu/bits/sem-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct semid_ds. PowerPC version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SEM_H
2020# error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead."
lib/libc/include/powerpc64le-linux-gnu/bits/semaphore.h+2-2
......@@ -1,5 +1,5 @@
11/* Machine-specific POSIX semaphore type layouts. PowerPC version.
2 Copyright (C) 2003-2019 Free Software Foundation, Inc.
2 Copyright (C) 2003-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44 Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _SEMAPHORE_H
2121# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
lib/libc/include/powerpc64le-linux-gnu/bits/setjmp.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/* Define the machine-dependent type `jmp_buf'. PowerPC version. */
1919#ifndef _BITS_SETJMP_H
lib/libc/include/powerpc64le-linux-gnu/bits/shm-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct shmid_ds. PowerPC version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SHM_H
2020# error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead."
lib/libc/include/powerpc64le-linux-gnu/bits/sigstack.h+2-2
......@@ -1,5 +1,5 @@
11/* sigstack, sigaltstack definitions.
2 Copyright (C) 1998-2019 Free Software Foundation, Inc.
2 Copyright (C) 1998-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_SIGSTACK_H
2020#define _BITS_SIGSTACK_H 1
lib/libc/include/powerpc64le-linux-gnu/bits/socket-constants.h+2-2
......@@ -1,5 +1,5 @@
11/* Socket constants which vary among Linux architectures. Version for POWER.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SOCKET_H
2020# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
lib/libc/include/powerpc64le-linux-gnu/bits/stat.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#if !defined _SYS_STAT_H && !defined _FCNTL_H
1919# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
lib/libc/include/powerpc64le-linux-gnu/bits/struct_mutex.h created+63
......@@ -0,0 +1,63 @@
1/* PowerPC internal mutex struct definitions.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19#ifndef _THREAD_MUTEX_INTERNAL_H
20#define _THREAD_MUTEX_INTERNAL_H 1
21
22struct __pthread_mutex_s
23{
24 int __lock;
25 unsigned int __count;
26 int __owner;
27#if __WORDSIZE == 64
28 unsigned int __nusers;
29#endif
30 /* KIND must stay at this position in the structure to maintain
31 binary compatibility with static initializers. */
32 int __kind;
33#if __WORDSIZE == 64
34 short __spins;
35 short __elision;
36 __pthread_list_t __list;
37# define __PTHREAD_MUTEX_HAVE_PREV 1
38#else
39 unsigned int __nusers;
40 __extension__ union
41 {
42 struct
43 {
44 short __espins;
45 short __elision;
46# define __spins __elision_data.__espins
47# define __elision __elision_data.__elision
48 } __elision_data;
49 __pthread_slist_t __list;
50 };
51# define __PTHREAD_MUTEX_HAVE_PREV 0
52#endif
53};
54
55#if __WORDSIZE == 64
56# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
57 0, 0, 0, 0, __kind, 0, 0, { 0, 0 }
58#else
59# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
60 0, 0, 0, __kind, 0, { { 0, 0 } }
61#endif
62
63#endif
\ No newline at end of file
lib/libc/include/powerpc64le-linux-gnu/bits/struct_rwlock.h created+61
......@@ -0,0 +1,61 @@
1/* PowerPC internal rwlock struct definitions.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
3
4 This file is part of the GNU C Library.
5
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
19
20#ifndef _RWLOCK_INTERNAL_H
21#define _RWLOCK_INTERNAL_H
22
23struct __pthread_rwlock_arch_t
24{
25 unsigned int __readers;
26 unsigned int __writers;
27 unsigned int __wrphase_futex;
28 unsigned int __writers_futex;
29 unsigned int __pad3;
30 unsigned int __pad4;
31#if __WORDSIZE == 64
32 int __cur_writer;
33 int __shared;
34 unsigned char __rwelision;
35 unsigned char __pad1[7];
36 unsigned long int __pad2;
37 /* FLAGS must stay at this position in the structure to maintain
38 binary compatibility. */
39 unsigned int __flags;
40# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, {0, 0, 0, 0, 0, 0, 0 }
41#else
42 unsigned char __rwelision;
43 unsigned char __pad2;
44 unsigned char __shared;
45 /* FLAGS must stay at this position in the structure to maintain
46 binary compatibility. */
47 unsigned char __flags;
48 int __cur_writer;
49# define __PTHREAD_RWLOCK_ELISION_EXTRA 0
50#endif
51};
52
53#if __WORDSIZE == 64
54# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
55 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, __flags
56#else
57# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
58 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, 0, __flags, 0
59#endif
60
61#endif
\ No newline at end of file
lib/libc/include/powerpc64le-linux-gnu/bits/termios-baud.h+2-2
......@@ -1,5 +1,5 @@
11/* termios baud rate selection definitions. Linux/powerpc version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-baud.h> directly; use <termios.h> instead."
lib/libc/include/powerpc64le-linux-gnu/bits/termios-c_cc.h+2-2
......@@ -1,5 +1,5 @@
11/* termios c_cc symbolic constant definitions. Linux/powerpc version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-c_cc.h> directly; use <termios.h> instead."
lib/libc/include/powerpc64le-linux-gnu/bits/termios-c_cflag.h+2-2
......@@ -1,5 +1,5 @@
11/* termios control mode definitions. Linux/powerpc version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-c_cflag.h> directly; use <termios.h> instead."
lib/libc/include/powerpc64le-linux-gnu/bits/termios-c_iflag.h+2-2
......@@ -1,5 +1,5 @@
11/* termios input mode definitions. Linux/powerpc version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-c_iflags.h> directly; use <termios.h> instead."
lib/libc/include/powerpc64le-linux-gnu/bits/termios-c_lflag.h+2-2
......@@ -1,5 +1,5 @@
11/* termios local mode definitions. Linux/powerpc version.
2 Copyright (C) 2019i Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-c_lflag.h> directly; use <termios.h> instead."
lib/libc/include/powerpc64le-linux-gnu/bits/termios-c_oflag.h+2-2
......@@ -1,5 +1,5 @@
11/* termios output mode definitions. Linux/powerpc version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-c_oflag.h> directly; use <termios.h> instead."
lib/libc/include/powerpc64le-linux-gnu/bits/termios-misc.h+2-2
......@@ -1,5 +1,5 @@
11/* termios baud platform specific definitions. Linux/powerpc version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-misc.h> directly; use <termios.h> instead."
lib/libc/include/powerpc64le-linux-gnu/fpu_control.h+2-2
......@@ -1,5 +1,5 @@
11/* FPU control word definitions. PowerPC version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _FPU_CONTROL_H
2020#define _FPU_CONTROL_H
lib/libc/include/powerpc64le-linux-gnu/ieee754.h+4-4
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,14 +13,14 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _IEEE754_H
19
2019#define _IEEE754_H 1
20
2121#include <features.h>
2222
23#include <endian.h>
23#include <bits/endian.h>
2424
2525__BEGIN_DECLS
2626
lib/libc/include/powerpc64le-linux-gnu/sys/ptrace.h+12-3
......@@ -1,5 +1,5 @@
11/* `ptrace' debugger support interface. Linux/PowerPC version.
2 Copyright (C) 2001-2019 Free Software Foundation, Inc.
2 Copyright (C) 2001-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_PTRACE_H
2020#define _SYS_PTRACE_H 1
......@@ -38,6 +38,7 @@ __BEGIN_DECLS
3838# undef PTRACE_GETREGSET
3939# undef PTRACE_GETSIGINFO
4040# undef PTRACE_GETSIGMASK
41# undef PTRACE_GET_SYSCALL_INFO
4142# undef PTRACE_GETVRREGS
4243# undef PTRACE_GETVSRREGS
4344# undef PTRACE_INTERRUPT
......@@ -65,6 +66,10 @@ __BEGIN_DECLS
6566# undef PTRACE_SINGLEBLOCK
6667# undef PTRACE_SINGLESTEP
6768# undef PTRACE_SYSCALL
69# undef PTRACE_SYSCALL_INFO_NONE
70# undef PTRACE_SYSCALL_INFO_ENTRY
71# undef PTRACE_SYSCALL_INFO_EXIT
72# undef PTRACE_SYSCALL_INFO_SECCOMP
6873# undef PTRACE_TRACEME
6974#endif
7075
......@@ -241,8 +246,12 @@ enum __ptrace_request
241246#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER
242247
243248 /* Get seccomp BPF filter metadata. */
244 PTRACE_SECCOMP_GET_METADATA = 0x420d
249 PTRACE_SECCOMP_GET_METADATA = 0x420d,
245250#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
251
252 /* Get information about system call. */
253 PTRACE_GET_SYSCALL_INFO = 0x420e
254#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
246255};
247256
248257
lib/libc/include/powerpc64le-linux-gnu/sys/ucontext.h+6-6
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_UCONTEXT_H
1919#define _SYS_UCONTEXT_H 1
......@@ -75,12 +75,12 @@ typedef struct
7575 * a sigcontext. For older kernel (without Altivec) the sigcontext matches
7676 * the mcontext upto but not including the v_regs field. For kernels that
7777 * don't set AT_HWCAP or return AT_HWCAP without PPC_FEATURE_HAS_ALTIVEC the
78 * v_regs field may not exist and should not be referenced. The v_regd field
79 * can be refernced safely only after verifying that PPC_FEATURE_HAS_ALTIVEC
78 * v_regs field may not exist and should not be referenced. The v_regs field
79 * can be referenced safely only after verifying that PPC_FEATURE_HAS_ALTIVEC
8080 * is set in AT_HWCAP. */
8181
8282/* Number of general registers. */
83# define __NGREG 48 /* includes r0-r31, nip, msr, lr, etc. */
83# define __NGREG 48 /* includes r0-r31, nip, msr, lr, etc. */
8484# define __NFPREG 33 /* includes fp0-fp31 &fpscr. */
8585# define __NVRREG 34 /* includes v0-v31, vscr, & vrsave in
8686 split vectors */
......@@ -136,7 +136,7 @@ typedef struct {
136136 * either NULL (if this processor does not support the VMX feature) or the
137137 * address of the first quadword within the allocated (vmx_reserve) area.
138138 *
139 * The pointer (v_regs) of vector type (elf_vrreg_t) is essentually
139 * The pointer (v_regs) of vector type (elf_vrreg_t) is essentially
140140 * an array of 34 quadword entries. The entries with
141141 * indexes 0-31 contain the corresponding vector registers. The entry with
142142 * index 32 contains the vscr as the last word (offset 12) within the
lib/libc/include/powerpc64le-linux-gnu/sys/user.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_USER_H
1919
lib/libc/include/riscv64-linux-gnu/bits/endian.h deleted-5
......@@ -1,5 +0,0 @@
1#ifndef _ENDIAN_H
2# error "Never use <bits/endian.h> directly; include <endian.h> instead."
3#endif
4
5#define __BYTE_ORDER __LITTLE_ENDIAN
\ No newline at end of file
lib/libc/include/riscv64-linux-gnu/bits/endianness.h created+11
......@@ -0,0 +1,11 @@
1#ifndef _BITS_ENDIANNESS_H
2#define _BITS_ENDIANNESS_H 1
3
4#ifndef _BITS_ENDIAN_H
5# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
6#endif
7
8/* RISC-V is little-endian. */
9#define __BYTE_ORDER __LITTLE_ENDIAN
10
11#endif /* bits/endianness.h */
\ No newline at end of file
lib/libc/include/riscv64-linux-gnu/bits/fcntl.h+2-2
......@@ -1,5 +1,5 @@
11/* O_*, F_*, FD_* bit values for Linux / RISC-V.
2 Copyright (C) 2011-2019 Free Software Foundation, Inc.
2 Copyright (C) 2011-2020 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _FCNTL_H
2121# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
lib/libc/include/riscv64-linux-gnu/bits/fenv.h+3-3
......@@ -1,5 +1,5 @@
11/* Floating point environment, RISC-V version.
2 Copyright (C) 1998-2019 Free Software Foundation, Inc.
2 Copyright (C) 1998-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _FENV_H
2020# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
......@@ -65,7 +65,7 @@ typedef unsigned int fenv_t;
6565/* If the default argument is used we use this value. */
6666#define FE_DFL_ENV ((__const fenv_t *) -1)
6767
68#if __GLIBC_USE (IEC_60559_BFP_EXT)
68#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
6969/* Type representing floating-point control modes. */
7070typedef unsigned int femode_t;
7171
lib/libc/include/riscv64-linux-gnu/bits/floatn.h+2-2
......@@ -1,5 +1,5 @@
11/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_FLOATN_H
2020#define _BITS_FLOATN_H
lib/libc/include/riscv64-linux-gnu/bits/link.h+2-2
......@@ -1,5 +1,5 @@
11/* Machine-specific declarations for dynamic linker interface. RISC-V version.
2 Copyright (C) 2005-2019 Free Software Foundation, Inc.
2 Copyright (C) 2005-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _LINK_H
2020# error "Never include <bits/link.h> directly; use <link.h> instead."
lib/libc/include/riscv64-linux-gnu/bits/long-double.h+4-3
......@@ -1,5 +1,5 @@
11/* Properties of long double type. ldbl-128 version.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,8 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* long double is distinct from double, so there is nothing to
20 define here. */
\ No newline at end of file
20 define here. */
21#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file
lib/libc/include/riscv64-linux-gnu/bits/procfs.h+2-2
......@@ -1,5 +1,5 @@
11/* Types for registers for sys/procfs.h. RISC-V version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_PROCFS_H
2020# error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead."
lib/libc/include/riscv64-linux-gnu/bits/pthreadtypes-arch.h+3-30
......@@ -1,5 +1,5 @@
11/* Machine-specific pthread type layouts. RISC-V version.
2 Copyright (C) 2011-2019 Free Software Foundation, Inc.
2 Copyright (C) 2011-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,12 +14,12 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_PTHREADTYPES_ARCH_H
2020#define _BITS_PTHREADTYPES_ARCH_H 1
2121
22#include <endian.h>
22#include <bits/endian.h>
2323
2424#if __riscv_xlen == 64
2525# define __SIZEOF_PTHREAD_ATTR_T 56
......@@ -35,34 +35,7 @@
3535# error "rv32i-based systems are not supported"
3636#endif
3737
38#define __PTHREAD_COMPAT_PADDING_MID
39#define __PTHREAD_COMPAT_PADDING_END
40#define __PTHREAD_MUTEX_LOCK_ELISION 0
41#define __PTHREAD_MUTEX_USE_UNION 0
42#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 0
43
4438#define __LOCK_ALIGNMENT
4539#define __ONCE_ALIGNMENT
4640
47/* There is a lot of padding in this structure. While it's not strictly
48 necessary on RISC-V, we're going to leave it in to be on the safe side in
49 case it's needed in the future. Most other architectures have the padding,
50 so this gives us the same extensibility as everyone else has. */
51struct __pthread_rwlock_arch_t
52{
53 unsigned int __readers;
54 unsigned int __writers;
55 unsigned int __wrphase_futex;
56 unsigned int __writers_futex;
57 unsigned int __pad3;
58 unsigned int __pad4;
59 int __cur_writer;
60 int __shared;
61 unsigned long int __pad1;
62 unsigned long int __pad2;
63 unsigned int __flags;
64};
65
66#define __PTHREAD_RWLOCK_ELISION_EXTRA 0
67
6841#endif /* bits/pthreadtypes.h */
\ No newline at end of file
lib/libc/include/riscv64-linux-gnu/bits/semaphore.h+2-2
......@@ -1,5 +1,5 @@
11/* Machine-specific POSIX semaphore type layouts. RISC-V version.
2 Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 Copyright (C) 2002-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SEMAPHORE_H
2020# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
lib/libc/include/riscv64-linux-gnu/bits/setjmp.h+2-2
......@@ -1,5 +1,5 @@
11/* Define the machine-dependent type `jmp_buf'. RISC-V version.
2 Copyright (C) 2011-2019 Free Software Foundation, Inc.
2 Copyright (C) 2011-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _RISCV_BITS_SETJMP_H
2020#define _RISCV_BITS_SETJMP_H
lib/libc/include/riscv64-linux-gnu/bits/sigcontext.h+2-2
......@@ -1,5 +1,5 @@
11/* Machine-dependent signal context structure for Linux. RISC-V version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc. This file is part of the GNU C Library.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc. This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
55 modify it under the terms of the GNU Lesser General Public
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _BITS_SIGCONTEXT_H
1919#define _BITS_SIGCONTEXT_H 1
lib/libc/include/riscv64-linux-gnu/bits/stat.h+7-4
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2011-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2011-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33 Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#if !defined _SYS_STAT_H && !defined _FCNTL_H
2020# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
......@@ -23,7 +23,7 @@
2323#ifndef _BITS_STAT_H
2424#define _BITS_STAT_H 1
2525
26#include <endian.h>
26#include <bits/endian.h>
2727#include <bits/wordsize.h>
2828
2929/* 64-bit libc uses the kernel's 'struct stat', accessed via the
......@@ -42,7 +42,10 @@
4242
4343#if defined __USE_FILE_OFFSET64
4444# define __field64(type, type64, name) type64 name
45#elif __WORDSIZE == 64
45#elif __WORDSIZE == 64 || defined __INO_T_MATCHES_INO64_T
46# if defined __INO_T_MATCHES_INO64_T && !defined __OFF_T_MATCHES_OFF64_T
47# error "ino_t and off_t must both be the same type"
48# endif
4649# define __field64(type, type64, name) type name
4750#elif __BYTE_ORDER == __LITTLE_ENDIAN
4851# define __field64(type, type64, name) \
lib/libc/include/riscv64-linux-gnu/bits/statfs.h+4-4
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2011-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2011-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33 Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
44
......@@ -14,13 +14,13 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_STATFS_H
2020# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
2121#endif
2222
23#include <endian.h>
23#include <bits/endian.h>
2424#include <bits/types.h>
2525#include <bits/wordsize.h>
2626
......@@ -34,7 +34,7 @@
3434
3535#if defined __USE_FILE_OFFSET64
3636# define __field64(type, type64, name) type64 name
37#elif __WORDSIZE == 64
37#elif __WORDSIZE == 64 || __STATFS_MATCHES_STATFS64
3838# define __field64(type, type64, name) type name
3939#elif __BYTE_ORDER == __LITTLE_ENDIAN
4040# define __field64(type, type64, name) \
lib/libc/include/riscv64-linux-gnu/bits/struct_rwlock.h created+45
......@@ -0,0 +1,45 @@
1/* RISC-V internal rwlock struct definitions.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
3
4 This file is part of the GNU C Library.
5
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
19
20#ifndef _RWLOCK_INTERNAL_H
21#define _RWLOCK_INTERNAL_H
22
23/* There is a lot of padding in this structure. While it's not strictly
24 necessary on RISC-V, we're going to leave it in to be on the safe side in
25 case it's needed in the future. Most other architectures have the padding,
26 so this gives us the same extensibility as everyone else has. */
27struct __pthread_rwlock_arch_t
28{
29 unsigned int __readers;
30 unsigned int __writers;
31 unsigned int __wrphase_futex;
32 unsigned int __writers_futex;
33 unsigned int __pad3;
34 unsigned int __pad4;
35 int __cur_writer;
36 int __shared;
37 unsigned long int __pad1;
38 unsigned long int __pad2;
39 unsigned int __flags;
40};
41
42#define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
43 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags
44
45#endif
\ No newline at end of file
lib/libc/include/riscv64-linux-gnu/bits/typesizes.h+7-3
......@@ -1,5 +1,5 @@
11/* bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
2 Copyright (C) 2011-2019 Free Software Foundation, Inc.
2 Copyright (C) 2011-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44 Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library. If not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _BITS_TYPES_H
2121# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
......@@ -73,10 +73,14 @@
7373
7474/* And for __rlim_t and __rlim64_t. */
7575# define __RLIM_T_MATCHES_RLIM64_T 1
76
77/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
78# define __STATFS_MATCHES_STATFS64 1
7679#else
7780# define __RLIM_T_MATCHES_RLIM64_T 0
78#endif
7981
82# define __STATFS_MATCHES_STATFS64 0
83#endif
8084/* Number of descriptors that can fit in an `fd_set'. */
8185#define __FD_SETSIZE 1024
8286
lib/libc/include/riscv64-linux-gnu/bits/wordsize.h+2-2
......@@ -1,5 +1,5 @@
11/* Determine the wordsize from the preprocessor defines. RISC-V version.
2 Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 Copyright (C) 2002-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#if __riscv_xlen == (__SIZEOF_POINTER__ * 8)
2020# define __WORDSIZE __riscv_xlen
lib/libc/include/riscv64-linux-gnu/fpu_control.h+2-2
......@@ -1,5 +1,5 @@
11/* FPU control word bits. RISC-V version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _FPU_CONTROL_H
2020#define _FPU_CONTROL_H
lib/libc/include/riscv64-linux-gnu/ieee754.h+4-4
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,14 +13,14 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _IEEE754_H
19
2019#define _IEEE754_H 1
20
2121#include <features.h>
2222
23#include <endian.h>
23#include <bits/endian.h>
2424
2525__BEGIN_DECLS
2626
lib/libc/include/riscv64-linux-gnu/sys/asm.h+2-2
......@@ -1,5 +1,5 @@
11/* Miscellaneous macros.
2 Copyright (C) 2000-2019 Free Software Foundation, Inc.
2 Copyright (C) 2000-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_ASM_H
2020#define _SYS_ASM_H
lib/libc/include/riscv64-linux-gnu/sys/cachectl.h+2-2
......@@ -1,5 +1,5 @@
11/* RISC-V instruction cache flushing interface
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library. If not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _SYS_CACHECTL_H
2121#define _SYS_CACHECTL_H 1
lib/libc/include/riscv64-linux-gnu/sys/ucontext.h+2-2
......@@ -1,5 +1,5 @@
11/* struct ucontext definition, RISC-V version.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* Don't rely on this, the interface is currently messed up and may need to
2020 be broken to be fixed. */
lib/libc/include/riscv64-linux-gnu/sys/user.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2001-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_USER_H
1919#define _SYS_USER_H 1
lib/libc/include/s390x-linux-gnu/bits/elfclass.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2001-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
22 Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
33 This file is part of the GNU C Library.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* This file specifies the native word size of the machine, which indicates
2020 the ELF file class used for executables and shared objects on this
lib/libc/include/s390x-linux-gnu/bits/endian.h deleted-7
......@@ -1,7 +0,0 @@
1/* s390 is big-endian */
2
3#ifndef _ENDIAN_H
4# error "Never use <bits/endian.h> directly; include <endian.h> instead."
5#endif
6
7#define __BYTE_ORDER __BIG_ENDIAN
\ No newline at end of file
lib/libc/include/s390x-linux-gnu/bits/endianness.h created+11
......@@ -0,0 +1,11 @@
1#ifndef _BITS_ENDIANNESS_H
2#define _BITS_ENDIANNESS_H 1
3
4#ifndef _BITS_ENDIAN_H
5# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
6#endif
7
8/* S/390 is big-endian. */
9#define __BYTE_ORDER __BIG_ENDIAN
10
11#endif /* bits/endianness.h */
\ No newline at end of file
lib/libc/include/s390x-linux-gnu/bits/environments.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _UNISTD_H
1919# error "Never include this file directly. Use <unistd.h> instead"
lib/libc/include/s390x-linux-gnu/bits/fcntl.h+2-2
......@@ -1,5 +1,5 @@
11/* O_*, F_*, FD_* bit values for Linux.
2 Copyright (C) 2000-2019 Free Software Foundation, Inc.
2 Copyright (C) 2000-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _FCNTL_H
2020# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
lib/libc/include/s390x-linux-gnu/bits/fenv.h+3-3
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2000-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2000-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33 Contributed by Denis Joseph Barrow <djbarrow@de.ibm.com>.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _FENV_H
2020# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
......@@ -91,7 +91,7 @@ typedef struct
9191# define FE_NOMASK_ENV ((const fenv_t *) -2)
9292#endif
9393
94#if __GLIBC_USE (IEC_60559_BFP_EXT)
94#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
9595/* Type representing floating-point control modes. */
9696typedef unsigned int femode_t;
9797
lib/libc/include/s390x-linux-gnu/bits/floatn.h+2-2
......@@ -1,5 +1,5 @@
11/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_FLOATN_H
2020#define _BITS_FLOATN_H
lib/libc/include/s390x-linux-gnu/bits/flt-eval-method.h+2-2
......@@ -1,5 +1,5 @@
11/* Define __GLIBC_FLT_EVAL_METHOD. S/390 version.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _MATH_H
2020# error "Never use <bits/flt-eval-method.h> directly; include <math.h> instead."
lib/libc/include/s390x-linux-gnu/bits/hwcap.h+2-2
......@@ -1,5 +1,5 @@
11/* Defines for bits in AT_HWCAP.
2 Copyright (C) 2012-2019 Free Software Foundation, Inc.
2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_AUXV_H
2020# error "Never include <bits/hwcap.h> directly; use <sys/auxv.h> instead."
lib/libc/include/s390x-linux-gnu/bits/ipc.h deleted-60
......@@ -1,60 +0,0 @@
1/* Copyright (C) 2001-2019 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_IPC_H
19# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
20#endif
21
22#include <bits/types.h>
23#include <bits/wordsize.h>
24
25/* Mode bits for `msgget', `semget', and `shmget'. */
26#define IPC_CREAT 01000 /* Create key if key does not exist. */
27#define IPC_EXCL 02000 /* Fail if key exists. */
28#define IPC_NOWAIT 04000 /* Return error on wait. */
29
30/* Control commands for `msgctl', `semctl', and `shmctl'. */
31#define IPC_RMID 0 /* Remove identifier. */
32#define IPC_SET 1 /* Set `ipc_perm' options. */
33#define IPC_STAT 2 /* Get `ipc_perm' options. */
34#ifdef __USE_GNU
35#define IPC_INFO 3 /* See ipcs. */
36#endif
37
38/* Special key values. */
39#define IPC_PRIVATE ((__key_t) 0) /* Private key. */
40
41
42/* Data structure used to pass permission information to IPC operations. */
43struct ipc_perm
44 {
45 __key_t __key; /* Key. */
46 __uid_t uid; /* Owner's user ID. */
47 __gid_t gid; /* Owner's group ID. */
48 __uid_t cuid; /* Creator's user ID. */
49 __gid_t cgid; /* Creator's group ID. */
50#if __WORDSIZE == 64
51 __mode_t mode; /* Read/write permission. */
52#else
53 unsigned short int mode; /* Read/write permission. */
54 unsigned short int __pad1;
55#endif
56 unsigned short int __seq; /* Sequence number. */
57 unsigned short int __pad2;
58 unsigned long int __glibc_reserved1;
59 unsigned long int __glibc_reserved2;
60 };
\ No newline at end of file
lib/libc/include/s390x-linux-gnu/bits/link.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _LINK_H
1919# error "Never include <bits/link.h> directly; use <link.h> instead."
lib/libc/include/s390x-linux-gnu/bits/long-double.h+4-3
......@@ -1,5 +1,5 @@
11/* Properties of long double type. ldbl-opt version.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,11 +14,12 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef __NO_LONG_DOUBLE_MATH
2020# define __LONG_DOUBLE_MATH_OPTIONAL 1
2121# ifndef __LONG_DOUBLE_128__
2222# define __NO_LONG_DOUBLE_MATH 1
2323# endif
24#endif
\ No newline at end of file
24#endif
25#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file
lib/libc/include/s390x-linux-gnu/bits/procfs-extra.h+2-2
......@@ -1,5 +1,5 @@
11/* Extra sys/procfs.h definitions. S/390 version.
2 Copyright (C) 2000-2019 Free Software Foundation, Inc.
2 Copyright (C) 2000-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_PROCFS_H
2020# error "Never include <bits/procfs-extra.h> directly; use <sys/procfs.h> instead."
lib/libc/include/s390x-linux-gnu/bits/procfs-id.h+2-2
......@@ -1,5 +1,5 @@
11/* Types of pr_uid and pr_gid in struct elf_prpsinfo. S/390 version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _SYS_PROCFS_H
2121# error "Never include <bits/procfs-id.h> directly; use <sys/procfs.h> instead."
lib/libc/include/s390x-linux-gnu/bits/procfs.h+2-2
......@@ -1,5 +1,5 @@
11/* Types for registers for sys/procfs.h. S/390 version.
2 Copyright (C) 2000-2019 Free Software Foundation, Inc.
2 Copyright (C) 2000-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_PROCFS_H
2020# error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead."
lib/libc/include/s390x-linux-gnu/bits/pthreadtypes-arch.h deleted-79
......@@ -1,79 +0,0 @@
1/* Copyright (C) 2003-2019 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
17
18#ifndef _BITS_PTHREADTYPES_ARCH_H
19#define _BITS_PTHREADTYPES_ARCH_H 1
20
21#include <bits/wordsize.h>
22
23#if __WORDSIZE == 64
24# define __SIZEOF_PTHREAD_ATTR_T 56
25# define __SIZEOF_PTHREAD_MUTEX_T 40
26# define __SIZEOF_PTHREAD_RWLOCK_T 56
27# define __SIZEOF_PTHREAD_BARRIER_T 32
28#else
29# define __SIZEOF_PTHREAD_ATTR_T 36
30# define __SIZEOF_PTHREAD_MUTEX_T 24
31# define __SIZEOF_PTHREAD_RWLOCK_T 32
32# define __SIZEOF_PTHREAD_BARRIER_T 20
33#endif
34#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
35#define __SIZEOF_PTHREAD_CONDATTR_T 4
36#define __SIZEOF_PTHREAD_COND_T 48
37#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
38#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
39
40/* Definitions for internal mutex struct. */
41#define __PTHREAD_COMPAT_PADDING_MID
42#define __PTHREAD_COMPAT_PADDING_END
43#define __PTHREAD_MUTEX_LOCK_ELISION 1
44#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND (__WORDSIZE != 64)
45#define __PTHREAD_MUTEX_USE_UNION (__WORDSIZE != 64)
46
47#define __LOCK_ALIGNMENT
48#define __ONCE_ALIGNMENT
49
50struct __pthread_rwlock_arch_t
51{
52 unsigned int __readers;
53 unsigned int __writers;
54 unsigned int __wrphase_futex;
55 unsigned int __writers_futex;
56 unsigned int __pad3;
57 unsigned int __pad4;
58#if __WORDSIZE == 64
59 int __cur_writer;
60 int __shared;
61 unsigned long int __pad1;
62 unsigned long int __pad2;
63 /* FLAGS must stay at this position in the structure to maintain
64 binary compatibility. */
65 unsigned int __flags;
66# else
67 unsigned char __pad1;
68 unsigned char __pad2;
69 unsigned char __shared;
70 /* FLAGS must stay at this position in the structure to maintain
71 binary compatibility. */
72 unsigned char __flags;
73 int __cur_writer;
74#endif
75};
76
77#define __PTHREAD_RWLOCK_ELISION_EXTRA 0
78
79#endif /* bits/pthreadtypes.h */
\ No newline at end of file
lib/libc/include/s390x-linux-gnu/bits/semaphore.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2003-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2003-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33 Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 2003.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SEMAPHORE_H
2020# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
lib/libc/include/s390x-linux-gnu/bits/setjmp.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2000-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2000-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/* Define the machine-dependent type `jmp_buf'. IBM s390 version. */
1919
lib/libc/include/s390x-linux-gnu/bits/sigaction.h+2-2
......@@ -1,5 +1,5 @@
11/* Definitions for 31 & 64 bit S/390 sigaction.
2 Copyright (C) 2001-2019 Free Software Foundation, Inc.
2 Copyright (C) 2001-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_SIGACTION_H
2020#define _BITS_SIGACTION_H 1
lib/libc/include/s390x-linux-gnu/bits/stat.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2000-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2000-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#if !defined _SYS_STAT_H && !defined _FCNTL_H
1919# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
lib/libc/include/s390x-linux-gnu/bits/statfs.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_STATFS_H
1919# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
lib/libc/include/s390x-linux-gnu/bits/struct_mutex.h created+63
......@@ -0,0 +1,63 @@
1/* S390 internal mutex struct definitions.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19#ifndef _THREAD_MUTEX_INTERNAL_H
20#define _THREAD_MUTEX_INTERNAL_H 1
21
22struct __pthread_mutex_s
23{
24 int __lock;
25 unsigned int __count;
26 int __owner;
27#if __WORDSIZE == 64
28 unsigned int __nusers;
29#endif
30 /* KIND must stay at this position in the structure to maintain
31 binary compatibility with static initializers. */
32 int __kind;
33#if __WORDSIZE == 64
34 short __spins;
35 short __elision;
36 __pthread_list_t __list;
37# define __PTHREAD_MUTEX_HAVE_PREV 1
38#else
39 unsigned int __nusers;
40 __extension__ union
41 {
42 struct
43 {
44 short __espins;
45 short __elision;
46 } _d;
47# define __spins _d.__espins
48# define __elision _d.__elision
49 __pthread_slist_t __list;
50 };
51# define __PTHREAD_MUTEX_HAVE_PREV 0
52#endif
53};
54
55#if __WORDSIZE == 64
56# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
57 0, 0, 0, 0, __kind, 0, 0, { 0, 0 }
58#else
59# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
60 0, 0, 0, __kind, 0, { { 0, 0 } }
61#endif
62
63#endif
\ No newline at end of file
lib/libc/include/s390x-linux-gnu/bits/struct_rwlock.h created+58
......@@ -0,0 +1,58 @@
1/* S390 internal rwlock struct definitions.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
3
4 This file is part of the GNU C Library.
5
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
19
20#ifndef _RWLOCK_INTERNAL_H
21#define _RWLOCK_INTERNAL_H
22
23struct __pthread_rwlock_arch_t
24{
25 unsigned int __readers;
26 unsigned int __writers;
27 unsigned int __wrphase_futex;
28 unsigned int __writers_futex;
29 unsigned int __pad3;
30 unsigned int __pad4;
31#if __WORDSIZE == 64
32 int __cur_writer;
33 int __shared;
34 unsigned long int __pad1;
35 unsigned long int __pad2;
36 /* FLAGS must stay at this position in the structure to maintain
37 binary compatibility. */
38 unsigned int __flags;
39# else
40 unsigned char __pad1;
41 unsigned char __pad2;
42 unsigned char __shared;
43 /* FLAGS must stay at this position in the structure to maintain
44 binary compatibility. */
45 unsigned char __flags;
46 int __cur_writer;
47#endif
48};
49
50#if __WORDSIZE == 64
51# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
52 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags
53#else
54# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
55 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags, 0
56#endif
57
58#endif
\ No newline at end of file
lib/libc/include/s390x-linux-gnu/bits/typesizes.h+7-2
......@@ -1,5 +1,5 @@
11/* bits/typesizes.h -- underlying types for *_t. Linux/s390 version.
2 Copyright (C) 2003-2019 Free Software Foundation, Inc.
2 Copyright (C) 2003-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_TYPES_H
2020# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
......@@ -78,8 +78,13 @@
7878
7979/* And for __rlim_t and __rlim64_t. */
8080# define __RLIM_T_MATCHES_RLIM64_T 1
81
82/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
83# define __STATFS_MATCHES_STATFS64 1
8184#else
8285# define __RLIM_T_MATCHES_RLIM64_T 0
86
87# define __STATFS_MATCHES_STATFS64 0
8388#endif
8489
8590/* Number of descriptors that can fit in an `fd_set'. */
lib/libc/include/s390x-linux-gnu/bits/utmp.h+4-3
......@@ -1,5 +1,5 @@
11/* The `struct utmp' type, describing entries in the utmp file. GNU version.
2 Copyright (C) 1993-2019 Free Software Foundation, Inc.
2 Copyright (C) 1993-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _UTMP_H
2020# error "Never include <bits/utmp.h> directly; use <utmp.h> instead."
......@@ -61,7 +61,8 @@ struct utmp
6161 pid_t ut_pid; /* Process ID of login process. */
6262 char ut_line[UT_LINESIZE]
6363 __attribute_nonstring__; /* Devicename. */
64 char ut_id[4]; /* Inittab ID. */
64 char ut_id[4]
65 __attribute_nonstring__; /* Inittab ID. */
6566 char ut_user[UT_NAMESIZE]
6667 __attribute_nonstring__; /* Username. */
6768 char ut_host[UT_HOSTSIZE]
lib/libc/include/s390x-linux-gnu/bits/utmpx.h+10-6
......@@ -1,5 +1,5 @@
11/* Structures and definitions for the user accounting database. GNU version.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _UTMPX_H
2020# error "Never include <bits/utmpx.h> directly; use <utmpx.h> instead."
......@@ -56,10 +56,14 @@ struct utmpx
5656{
5757 short int ut_type; /* Type of login. */
5858 __pid_t ut_pid; /* Process ID of login process. */
59 char ut_line[__UT_LINESIZE]; /* Devicename. */
60 char ut_id[4]; /* Inittab ID. */
61 char ut_user[__UT_NAMESIZE]; /* Username. */
62 char ut_host[__UT_HOSTSIZE]; /* Hostname for remote login. */
59 char ut_line[__UT_LINESIZE]
60 __attribute_nonstring__; /* Devicename. */
61 char ut_id[4]
62 __attribute_nonstring__; /* Inittab ID. */
63 char ut_user[__UT_NAMESIZE]
64 __attribute_nonstring__; /* Username. */
65 char ut_host[__UT_HOSTSIZE]
66 __attribute_nonstring__; /* Hostname for remote login. */
6367 struct __exit_status ut_exit; /* Exit status of a process marked
6468 as DEAD_PROCESS. */
6569
lib/libc/include/s390x-linux-gnu/fpu_control.h+2-2
......@@ -1,5 +1,5 @@
11/* FPU control word definitions. Stub version.
2 Copyright (C) 2000-2019 Free Software Foundation, Inc.
2 Copyright (C) 2000-2020 Free Software Foundation, Inc.
33 Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com) and
44 Martin Schwidefsky (schwidefsky@de.ibm.com).
55 This file is part of the GNU C Library.
......@@ -16,7 +16,7 @@
1616
1717 You should have received a copy of the GNU Lesser General Public
1818 License along with the GNU C Library; if not, see
19 <http://www.gnu.org/licenses/>. */
19 <https://www.gnu.org/licenses/>. */
2020
2121#ifndef _FPU_CONTROL_H
2222#define _FPU_CONTROL_H
lib/libc/include/s390x-linux-gnu/ieee754.h+4-4
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,14 +13,14 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _IEEE754_H
19
2019#define _IEEE754_H 1
20
2121#include <features.h>
2222
23#include <endian.h>
23#include <bits/endian.h>
2424
2525__BEGIN_DECLS
2626
lib/libc/include/s390x-linux-gnu/sys/elf.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2000-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2000-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_ELF_H
1919#define _SYS_ELF_H 1
lib/libc/include/s390x-linux-gnu/sys/ptrace.h+11-2
......@@ -1,5 +1,5 @@
11/* `ptrace' debugger support interface. Linux/S390 version.
2 Copyright (C) 2000-2019 Free Software Foundation, Inc.
2 Copyright (C) 2000-2020 Free Software Foundation, Inc.
33 Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com).
44 This file is part of the GNU C Library.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _SYS_PTRACE_H
2121#define _SYS_PTRACE_H 1
......@@ -79,6 +79,11 @@ __BEGIN_DECLS
7979# undef PTRACE_EVENT_SECCOMP
8080# undef PTRACE_EVENT_STOP
8181# undef PTRACE_PEEKSIGINFO_SHARED
82# undef PTRACE_GET_SYSCALL_INFO
83# undef PTRACE_SYSCALL_INFO_NONE
84# undef PTRACE_SYSCALL_INFO_ENTRY
85# undef PTRACE_SYSCALL_INFO_EXIT
86# undef PTRACE_SYSCALL_INFO_SECCOMP
8287#endif
8388/* Type of the REQUEST argument to `ptrace.' */
8489enum __ptrace_request
......@@ -198,6 +203,10 @@ enum __ptrace_request
198203 PTRACE_SECCOMP_GET_METADATA = 0x420d,
199204#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
200205
206 /* Get information about system call. */
207 PTRACE_GET_SYSCALL_INFO = 0x420e,
208#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
209
201210 PTRACE_PEEKUSR_AREA = 0x5000,
202211#define PTRACE_PEEKUSR_AREA PTRACE_PEEKUSR_AREA
203212
lib/libc/include/s390x-linux-gnu/sys/ucontext.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2000-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2000-2020 Free Software Foundation, Inc.
22 Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com).
33 This file is part of the GNU C Library.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_UCONTEXT_H
2020#define _SYS_UCONTEXT_H 1
lib/libc/include/s390x-linux-gnu/sys/user.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2000-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2000-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_USER_H
1919#define _SYS_USER_H 1
lib/libc/include/sparc-linux-gnu/bits/endian.h deleted-12
......@@ -1,12 +0,0 @@
1/* Sparc is big-endian, but v9 supports endian conversion on loads/stores
2 and GCC supports such a mode. Be prepared. */
3
4#ifndef _ENDIAN_H
5# error "Never use <bits/endian.h> directly; include <endian.h> instead."
6#endif
7
8#ifdef __LITTLE_ENDIAN__
9# define __BYTE_ORDER __LITTLE_ENDIAN
10#else
11# define __BYTE_ORDER __BIG_ENDIAN
12#endif
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/endianness.h created+16
......@@ -0,0 +1,16 @@
1#ifndef _BITS_ENDIANNESS_H
2#define _BITS_ENDIANNESS_H 1
3
4#ifndef _BITS_ENDIAN_H
5# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
6#endif
7
8/* Sparc is big-endian, but v9 supports endian conversion on loads/stores
9 and GCC supports such a mode. Be prepared. */
10#ifdef __LITTLE_ENDIAN__
11# define __BYTE_ORDER __LITTLE_ENDIAN
12#else
13# define __BYTE_ORDER __BIG_ENDIAN
14#endif
15
16#endif /* bits/endianness.h */
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/environments.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _UNISTD_H
1919# error "Never include this file directly. Use <unistd.h> instead"
lib/libc/include/sparc-linux-gnu/bits/epoll.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_EPOLL_H
1919# error "Never use <bits/epoll.h> directly; include <sys/epoll.h> instead."
lib/libc/include/sparc-linux-gnu/bits/errno.h+2-2
......@@ -1,5 +1,5 @@
11/* Error constants. Linux/Sparc specific version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_ERRNO_H
2020#define _BITS_ERRNO_H 1
lib/libc/include/sparc-linux-gnu/bits/eventfd.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_EVENTFD_H
1919# error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead."
lib/libc/include/sparc-linux-gnu/bits/fcntl.h+2-2
......@@ -1,5 +1,5 @@
11/* O_*, F_*, FD_* bit values for Linux/SPARC.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _FCNTL_H
2020# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
lib/libc/include/sparc-linux-gnu/bits/fenv.h+3-3
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _FENV_H
1919# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
......@@ -92,7 +92,7 @@ typedef unsigned long int fenv_t;
9292# define __fenv_ldfsr(X) __asm__ __volatile__ ("ld %0,%%fsr" : : "m" (X))
9393#endif
9494
95#if __GLIBC_USE (IEC_60559_BFP_EXT)
95#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
9696/* Type representing floating-point control modes. */
9797typedef unsigned long int femode_t;
9898
lib/libc/include/sparc-linux-gnu/bits/floatn.h+2-2
......@@ -1,5 +1,5 @@
11/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_FLOATN_H
2020#define _BITS_FLOATN_H
lib/libc/include/sparc-linux-gnu/bits/hwcap.h+2-2
......@@ -1,5 +1,5 @@
11/* Defines for bits in AT_HWCAP.
2 Copyright (C) 2011-2019 Free Software Foundation, Inc.
2 Copyright (C) 2011-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#if !defined(_SYS_AUXV_H) && !defined(_SYSDEPS_SYSDEP_H)
2020# error "Never include <bits/hwcap.h> directly; use <sys/auxv.h> instead."
lib/libc/include/sparc-linux-gnu/bits/inotify.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_INOTIFY_H
1919# error "Never use <bits/inotify.h> directly; include <sys/inotify.h> instead."
lib/libc/include/sparc-linux-gnu/bits/ioctls.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_IOCTL_H
1919# error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead."
lib/libc/include/sparc-linux-gnu/bits/ipc-perm.h created+36
......@@ -0,0 +1,36 @@
1/* struct ipc_perm definition. Linux/sparc version.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _SYS_IPC_H
20# error "Never use <bits/ipc-perm.h> directly; include <sys/ipc.h> instead."
21#endif
22
23/* Data structure used to pass permission information to IPC operations. */
24struct ipc_perm
25 {
26 __key_t __key; /* Key. */
27 __uid_t uid; /* Owner's user ID. */
28 __gid_t gid; /* Owner's group ID. */
29 __uid_t cuid; /* Creator's user ID. */
30 __gid_t cgid; /* Creator's group ID. */
31 __mode_t mode; /* Read/write permission. */
32 unsigned short int __pad1;
33 unsigned short int __seq; /* Sequence number. */
34 __extension__ unsigned long long int __glibc_reserved1;
35 __extension__ unsigned long long int __glibc_reserved2;
36 };
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/ipc.h deleted-61
......@@ -1,61 +0,0 @@
1/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_IPC_H
19# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
20#endif
21
22#include <bits/types.h>
23#include <bits/wordsize.h>
24
25/* Mode bits for `msgget', `semget', and `shmget'. */
26#define IPC_CREAT 01000 /* Create key if key does not exist. */
27#define IPC_EXCL 02000 /* Fail if key exists. */
28#define IPC_NOWAIT 04000 /* Return error on wait. */
29
30/* Control commands for `msgctl', `semctl', and `shmctl'. */
31#define IPC_RMID 0 /* Remove identifier. */
32#define IPC_SET 1 /* Set `ipc_perm' options. */
33#define IPC_STAT 2 /* Get `ipc_perm' options. */
34#ifdef __USE_GNU
35# define IPC_INFO 3 /* See ipcs. */
36#endif
37
38/* Special key values. */
39#define IPC_PRIVATE ((__key_t) 0) /* Private key. */
40
41
42/* Data structure used to pass permission information to IPC operations. */
43struct ipc_perm
44 {
45 __key_t __key; /* Key. */
46 __uid_t uid; /* Owner's user ID. */
47 __gid_t gid; /* Owner's group ID. */
48 __uid_t cuid; /* Creator's user ID. */
49 __gid_t cgid; /* Creator's group ID. */
50#if __WORDSIZE == 32
51 unsigned short int __pad1;
52 unsigned short int mode; /* Read/write permission. */
53 unsigned short int __pad2;
54#else
55 __mode_t mode; /* Read/write permission. */
56 unsigned short int __pad1;
57#endif
58 unsigned short int __seq; /* Sequence number. */
59 __extension__ unsigned long long int __glibc_reserved1;
60 __extension__ unsigned long long int __glibc_reserved2;
61 };
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/link.h+2-2
......@@ -1,5 +1,5 @@
11/* Machine-specific audit interfaces for dynamic linker. SPARC version.
2 Copyright (C) 2005-2019 Free Software Foundation, Inc.
2 Copyright (C) 2005-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _LINK_H
2020# error "Never include <bits/link.h> directly; use <link.h> instead."
lib/libc/include/sparc-linux-gnu/bits/local_lim.h+2-2
......@@ -1,5 +1,5 @@
11/* Minimum guaranteed maximum values for system limits. Linux/SPARC version.
2 Copyright (C) 1993-2019 Free Software Foundation, Inc.
2 Copyright (C) 1993-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Library General Public
1616 License along with the GNU C Library; see the file COPYING.LIB. If
17 not, see <http://www.gnu.org/licenses/>. */
17 not, see <https://www.gnu.org/licenses/>. */
1818
1919/* The kernel header pollutes the namespace with the NR_OPEN symbol
2020 and defines LINK_MAX although filesystems have different maxima. A
lib/libc/include/sparc-linux-gnu/bits/long-double.h+4-3
......@@ -1,5 +1,5 @@
11/* Properties of long double type. SPARC version.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#include <bits/wordsize.h>
2020
......@@ -23,4 +23,5 @@
2323# ifndef __LONG_DOUBLE_128__
2424# define __NO_LONG_DOUBLE_MATH 1
2525# endif
26#endif
\ No newline at end of file
26#endif
27#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/mman.h+4-2
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX memory map interface. Linux/SPARC version.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_MMAN_H
2020# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
......@@ -36,6 +36,8 @@
3636# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */
3737# define MAP_STACK 0x20000 /* Allocation is for a stack. */
3838# define MAP_HUGETLB 0x40000 /* Create huge page mapping. */
39# define MAP_SYNC 0x80000 /* Perform synchronous page
40 faults for the mapping. */
3941# define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap
4042 underlying mapping. */
4143#endif
lib/libc/include/sparc-linux-gnu/bits/msq-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct msqid_ds. SPARC version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_MSG_H
2020# error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead."
lib/libc/include/sparc-linux-gnu/bits/poll.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_POLL_H
1919# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
lib/libc/include/sparc-linux-gnu/bits/procfs-extra.h+2-2
......@@ -1,5 +1,5 @@
11/* Extra sys/procfs.h definitions. SPARC version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_PROCFS_H
2020# error "Never include <bits/procfs-extra.h> directly; use <sys/procfs.h> instead."
lib/libc/include/sparc-linux-gnu/bits/procfs-id.h+2-2
......@@ -1,5 +1,5 @@
11/* Types of pr_uid and pr_gid in struct elf_prpsinfo. SPARC version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _SYS_PROCFS_H
2121# error "Never include <bits/procfs-id.h> directly; use <sys/procfs.h> instead."
lib/libc/include/sparc-linux-gnu/bits/procfs.h+2-2
......@@ -1,5 +1,5 @@
11/* Types for registers for sys/procfs.h. SPARC version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_PROCFS_H
2020# error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead."
lib/libc/include/sparc-linux-gnu/bits/pthreadtypes-arch.h deleted-81
......@@ -1,81 +0,0 @@
1/* Machine-specific pthread type layouts. SPARC version.
2 Copyright (C) 2003-2019 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19#ifndef _BITS_PTHREADTYPES_ARCH_H
20#define _BITS_PTHREADTYPES_ARCH_H 1
21
22#include <bits/wordsize.h>
23
24#if __WORDSIZE == 64
25# define __SIZEOF_PTHREAD_ATTR_T 56
26# define __SIZEOF_PTHREAD_MUTEX_T 40
27# define __SIZEOF_PTHREAD_CONDATTR_T 4
28# define __SIZEOF_PTHREAD_RWLOCK_T 56
29# define __SIZEOF_PTHREAD_BARRIER_T 32
30#else
31# define __SIZEOF_PTHREAD_ATTR_T 36
32# define __SIZEOF_PTHREAD_MUTEX_T 24
33# define __SIZEOF_PTHREAD_CONDATTR_T 4
34# define __SIZEOF_PTHREAD_RWLOCK_T 32
35# define __SIZEOF_PTHREAD_BARRIER_T 20
36#endif
37#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
38#define __SIZEOF_PTHREAD_COND_T 48
39#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
40#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
41
42/* Definitions for internal mutex struct. */
43#define __PTHREAD_COMPAT_PADDING_MID
44#define __PTHREAD_COMPAT_PADDING_END
45#define __PTHREAD_MUTEX_LOCK_ELISION 0
46#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND (__WORDSIZE != 64)
47#define __PTHREAD_MUTEX_USE_UNION (__WORDSIZE != 64)
48
49#define __LOCK_ALIGNMENT
50#define __ONCE_ALIGNMENT
51
52struct __pthread_rwlock_arch_t
53{
54 unsigned int __readers;
55 unsigned int __writers;
56 unsigned int __wrphase_futex;
57 unsigned int __writers_futex;
58 unsigned int __pad3;
59 unsigned int __pad4;
60#if __WORDSIZE == 64
61 int __cur_writer;
62 int __shared;
63 unsigned long int __pad1;
64 unsigned long int __pad2;
65 /* FLAGS must stay at this position in the structure to maintain
66 binary compatibility. */
67 unsigned int __flags;
68#else
69 unsigned char __pad1;
70 unsigned char __pad2;
71 unsigned char __shared;
72 /* FLAGS must stay at this position in the structure to maintain
73 binary compatibility. */
74 unsigned char __flags;
75 int __cur_writer;
76#endif
77};
78
79#define __PTHREAD_RWLOCK_ELISION_EXTRA 0
80
81#endif /* bits/pthreadtypes.h */
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/resource.h+2-2
......@@ -1,5 +1,5 @@
11/* Bit values & structures for resource limits. Linux/SPARC version.
2 Copyright (C) 1994-2019 Free Software Foundation, Inc.
2 Copyright (C) 1994-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_RESOURCE_H
2020# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
lib/libc/include/sparc-linux-gnu/bits/sem-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct semid_ds. SPARC version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SEM_H
2020# error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead."
lib/libc/include/sparc-linux-gnu/bits/semaphore.h+2-2
......@@ -1,5 +1,5 @@
11/* Machine-specific POSIX semaphore type layouts. SPARC version.
2 Copyright (C) 2003-2019 Free Software Foundation, Inc.
2 Copyright (C) 2003-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44 Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _SEMAPHORE_H
2121# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
lib/libc/include/sparc-linux-gnu/bits/setjmp.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _BITS_SETJMP_H
1919#define _BITS_SETJMP_H 1
lib/libc/include/sparc-linux-gnu/bits/shm-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct shmid_ds. SPARC version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SHM_H
2020# error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead."
lib/libc/include/sparc-linux-gnu/bits/shmlba.h+2-2
......@@ -1,5 +1,5 @@
11/* Define SHMLBA. SPARC version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SHM_H
2020# error "Never use <bits/shmlba.h> directly; include <sys/shm.h> instead."
lib/libc/include/sparc-linux-gnu/bits/sigaction.h+2-2
......@@ -1,5 +1,5 @@
11/* The proper definitions for Linux/SPARC sigaction.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_SIGACTION_H
2020#define _BITS_SIGACTION_H 1
lib/libc/include/sparc-linux-gnu/bits/sigcontext.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2000-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2000-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _BITS_SIGCONTEXT_H
1919#define _BITS_SIGCONTEXT_H 1
lib/libc/include/sparc-linux-gnu/bits/signalfd.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_SIGNALFD_H
1919# error "Never use <bits/signalfd.h> directly; include <sys/signalfd.h> instead."
lib/libc/include/sparc-linux-gnu/bits/signum.h+2-2
......@@ -1,5 +1,5 @@
11/* Signal number definitions. Linux/SPARC version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_SIGNUM_H
2020#define _BITS_SIGNUM_H 1
lib/libc/include/sparc-linux-gnu/bits/sigstack.h+2-2
......@@ -1,5 +1,5 @@
11/* sigstack, sigaltstack definitions.
2 Copyright (C) 1998-2019 Free Software Foundation, Inc.
2 Copyright (C) 1998-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_SIGSTACK_H
2020#define _BITS_SIGSTACK_H 1
lib/libc/include/sparc-linux-gnu/bits/socket-constants.h+2-2
......@@ -1,5 +1,5 @@
11/* Socket constants which vary among Linux architectures. Version for SPARC.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SOCKET_H
2020# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
lib/libc/include/sparc-linux-gnu/bits/socket_type.h+2-2
......@@ -1,5 +1,5 @@
11/* Define enum __socket_type for Linux/SPARC.
2 Copyright (C) 1991-2019 Free Software Foundation, Inc.
2 Copyright (C) 1991-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SOCKET_H
2020# error "Never include <bits/socket_type.h> directly; use <sys/socket.h> instead."
lib/libc/include/sparc-linux-gnu/bits/stat.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#if !defined _SYS_STAT_H && !defined _FCNTL_H
1919# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
lib/libc/include/sparc-linux-gnu/bits/struct_rwlock.h created+58
......@@ -0,0 +1,58 @@
1/* SPARC internal rwlock struct definitions.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
3
4 This file is part of the GNU C Library.
5
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
19
20#ifndef _RWLOCK_INTERNAL_H
21#define _RWLOCK_INTERNAL_H
22
23struct __pthread_rwlock_arch_t
24{
25 unsigned int __readers;
26 unsigned int __writers;
27 unsigned int __wrphase_futex;
28 unsigned int __writers_futex;
29 unsigned int __pad3;
30 unsigned int __pad4;
31#if __WORDSIZE == 64
32 int __cur_writer;
33 int __shared;
34 unsigned long int __pad1;
35 unsigned long int __pad2;
36 /* FLAGS must stay at this position in the structure to maintain
37 binary compatibility. */
38 unsigned int __flags;
39#else
40 unsigned char __pad1;
41 unsigned char __pad2;
42 unsigned char __shared;
43 /* FLAGS must stay at this position in the structure to maintain
44 binary compatibility. */
45 unsigned char __flags;
46 int __cur_writer;
47#endif
48};
49
50#if __WORDSIZE == 64
51# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
52 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags
53#else
54# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
55 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags, 0
56#endif
57
58#endif
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/termios-baud.h+2-2
......@@ -1,5 +1,5 @@
11/* termios baud rate selection definitions. Linux/sparc version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-baud.h> directly; use <termios.h> instead."
lib/libc/include/sparc-linux-gnu/bits/termios-c_cc.h+2-2
......@@ -1,5 +1,5 @@
11/* termios c_cc symbolic constant definitions. Linux/sparc version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-c_cc.h> directly; use <termios.h> instead."
lib/libc/include/sparc-linux-gnu/bits/termios-c_oflag.h+2-2
......@@ -1,5 +1,5 @@
11/* termios output mode definitions. Linux/sparc version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-c_oflag.h> directly; use <termios.h> instead."
lib/libc/include/sparc-linux-gnu/bits/termios-struct.h+2-2
......@@ -1,5 +1,5 @@
11/* struct termios definition. Linux/sparc version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-struct.h> directly; use <termios.h> instead."
lib/libc/include/sparc-linux-gnu/bits/timerfd.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2008-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_TIMERFD_H
1919# error "Never use <bits/timerfd.h> directly; include <sys/timerfd.h> instead."
lib/libc/include/sparc-linux-gnu/bits/typesizes.h+7-2
......@@ -1,5 +1,5 @@
11/* bits/typesizes.h -- underlying types for *_t. Linux/SPARC version.
2 Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 Copyright (C) 2002-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_TYPES_H
2020# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
......@@ -72,8 +72,13 @@
7272
7373/* And for __rlim_t and __rlim64_t. */
7474# define __RLIM_T_MATCHES_RLIM64_T 1
75
76/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
77# define __STATFS_MATCHES_STATFS64 1
7578#else
7679# define __RLIM_T_MATCHES_RLIM64_T 0
80
81# define __STATFS_MATCHES_STATFS64 0
7782#endif
7883
7984/* Number of descriptors that can fit in an `fd_set'. */
lib/libc/include/sparc-linux-gnu/fpu_control.h+2-2
......@@ -1,5 +1,5 @@
11/* FPU control word bits. SPARC version.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44 Contributed by Miguel de Icaza
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _FPU_CONTROL_H
2121#define _FPU_CONTROL_H 1
lib/libc/include/sparc-linux-gnu/ieee754.h+4-4
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,14 +13,14 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _IEEE754_H
19
2019#define _IEEE754_H 1
20
2121#include <features.h>
2222
23#include <endian.h>
23#include <bits/endian.h>
2424
2525__BEGIN_DECLS
2626
lib/libc/include/sparc-linux-gnu/sys/ptrace.h+7-3
......@@ -1,5 +1,5 @@
11/* `ptrace' debugger support interface. Linux/SPARC version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_PTRACE_H
2020#define _SYS_PTRACE_H 1
......@@ -217,8 +217,12 @@ enum __ptrace_request
217217#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER
218218
219219 /* Get seccomp BPF filter metadata. */
220 PTRACE_SECCOMP_GET_METADATA = 0x420d
220 PTRACE_SECCOMP_GET_METADATA = 0x420d,
221221#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
222
223 /* Get information about system call. */
224 PTRACE_GET_SYSCALL_INFO = 0x420e
225#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
222226};
223227
224228
lib/libc/include/sparc-linux-gnu/sys/ucontext.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_UCONTEXT_H
1919#define _SYS_UCONTEXT_H 1
lib/libc/include/sparc-linux-gnu/sys/user.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2003-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2003-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_USER_H
1919#define _SYS_USER_H 1
lib/libc/include/sparcv9-linux-gnu/bits/endian.h deleted-12
......@@ -1,12 +0,0 @@
1/* Sparc is big-endian, but v9 supports endian conversion on loads/stores
2 and GCC supports such a mode. Be prepared. */
3
4#ifndef _ENDIAN_H
5# error "Never use <bits/endian.h> directly; include <endian.h> instead."
6#endif
7
8#ifdef __LITTLE_ENDIAN__
9# define __BYTE_ORDER __LITTLE_ENDIAN
10#else
11# define __BYTE_ORDER __BIG_ENDIAN
12#endif
\ No newline at end of file
lib/libc/include/sparcv9-linux-gnu/bits/endianness.h created+16
......@@ -0,0 +1,16 @@
1#ifndef _BITS_ENDIANNESS_H
2#define _BITS_ENDIANNESS_H 1
3
4#ifndef _BITS_ENDIAN_H
5# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
6#endif
7
8/* Sparc is big-endian, but v9 supports endian conversion on loads/stores
9 and GCC supports such a mode. Be prepared. */
10#ifdef __LITTLE_ENDIAN__
11# define __BYTE_ORDER __LITTLE_ENDIAN
12#else
13# define __BYTE_ORDER __BIG_ENDIAN
14#endif
15
16#endif /* bits/endianness.h */
\ No newline at end of file
lib/libc/include/sparcv9-linux-gnu/bits/environments.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _UNISTD_H
1919# error "Never include this file directly. Use <unistd.h> instead"
lib/libc/include/sparcv9-linux-gnu/bits/epoll.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_EPOLL_H
1919# error "Never use <bits/epoll.h> directly; include <sys/epoll.h> instead."
lib/libc/include/sparcv9-linux-gnu/bits/errno.h+2-2
......@@ -1,5 +1,5 @@
11/* Error constants. Linux/Sparc specific version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_ERRNO_H
2020#define _BITS_ERRNO_H 1
lib/libc/include/sparcv9-linux-gnu/bits/eventfd.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_EVENTFD_H
1919# error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead."
lib/libc/include/sparcv9-linux-gnu/bits/fcntl.h+2-2
......@@ -1,5 +1,5 @@
11/* O_*, F_*, FD_* bit values for Linux/SPARC.
2 Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _FCNTL_H
2020# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
lib/libc/include/sparcv9-linux-gnu/bits/fenv.h+3-3
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _FENV_H
1919# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
......@@ -92,7 +92,7 @@ typedef unsigned long int fenv_t;
9292# define __fenv_ldfsr(X) __asm__ __volatile__ ("ld %0,%%fsr" : : "m" (X))
9393#endif
9494
95#if __GLIBC_USE (IEC_60559_BFP_EXT)
95#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
9696/* Type representing floating-point control modes. */
9797typedef unsigned long int femode_t;
9898
lib/libc/include/sparcv9-linux-gnu/bits/floatn.h+2-2
......@@ -1,5 +1,5 @@
11/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_FLOATN_H
2020#define _BITS_FLOATN_H
lib/libc/include/sparcv9-linux-gnu/bits/hwcap.h+2-2
......@@ -1,5 +1,5 @@
11/* Defines for bits in AT_HWCAP.
2 Copyright (C) 2011-2019 Free Software Foundation, Inc.
2 Copyright (C) 2011-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#if !defined(_SYS_AUXV_H) && !defined(_SYSDEPS_SYSDEP_H)
2020# error "Never include <bits/hwcap.h> directly; use <sys/auxv.h> instead."
lib/libc/include/sparcv9-linux-gnu/bits/inotify.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_INOTIFY_H
1919# error "Never use <bits/inotify.h> directly; include <sys/inotify.h> instead."
lib/libc/include/sparcv9-linux-gnu/bits/ioctls.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_IOCTL_H
1919# error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead."
lib/libc/include/sparcv9-linux-gnu/bits/ipc-perm.h created+36
......@@ -0,0 +1,36 @@
1/* struct ipc_perm definition. Linux/sparc version.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _SYS_IPC_H
20# error "Never use <bits/ipc-perm.h> directly; include <sys/ipc.h> instead."
21#endif
22
23/* Data structure used to pass permission information to IPC operations. */
24struct ipc_perm
25 {
26 __key_t __key; /* Key. */
27 __uid_t uid; /* Owner's user ID. */
28 __gid_t gid; /* Owner's group ID. */
29 __uid_t cuid; /* Creator's user ID. */
30 __gid_t cgid; /* Creator's group ID. */
31 __mode_t mode; /* Read/write permission. */
32 unsigned short int __pad1;
33 unsigned short int __seq; /* Sequence number. */
34 __extension__ unsigned long long int __glibc_reserved1;
35 __extension__ unsigned long long int __glibc_reserved2;
36 };
\ No newline at end of file
lib/libc/include/sparcv9-linux-gnu/bits/ipc.h deleted-61
......@@ -1,61 +0,0 @@
1/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_IPC_H
19# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
20#endif
21
22#include <bits/types.h>
23#include <bits/wordsize.h>
24
25/* Mode bits for `msgget', `semget', and `shmget'. */
26#define IPC_CREAT 01000 /* Create key if key does not exist. */
27#define IPC_EXCL 02000 /* Fail if key exists. */
28#define IPC_NOWAIT 04000 /* Return error on wait. */
29
30/* Control commands for `msgctl', `semctl', and `shmctl'. */
31#define IPC_RMID 0 /* Remove identifier. */
32#define IPC_SET 1 /* Set `ipc_perm' options. */
33#define IPC_STAT 2 /* Get `ipc_perm' options. */
34#ifdef __USE_GNU
35# define IPC_INFO 3 /* See ipcs. */
36#endif
37
38/* Special key values. */
39#define IPC_PRIVATE ((__key_t) 0) /* Private key. */
40
41
42/* Data structure used to pass permission information to IPC operations. */
43struct ipc_perm
44 {
45 __key_t __key; /* Key. */
46 __uid_t uid; /* Owner's user ID. */
47 __gid_t gid; /* Owner's group ID. */
48 __uid_t cuid; /* Creator's user ID. */
49 __gid_t cgid; /* Creator's group ID. */
50#if __WORDSIZE == 32
51 unsigned short int __pad1;
52 unsigned short int mode; /* Read/write permission. */
53 unsigned short int __pad2;
54#else
55 __mode_t mode; /* Read/write permission. */
56 unsigned short int __pad1;
57#endif
58 unsigned short int __seq; /* Sequence number. */
59 __extension__ unsigned long long int __glibc_reserved1;
60 __extension__ unsigned long long int __glibc_reserved2;
61 };
\ No newline at end of file
lib/libc/include/sparcv9-linux-gnu/bits/link.h+2-2
......@@ -1,5 +1,5 @@
11/* Machine-specific audit interfaces for dynamic linker. SPARC version.
2 Copyright (C) 2005-2019 Free Software Foundation, Inc.
2 Copyright (C) 2005-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _LINK_H
2020# error "Never include <bits/link.h> directly; use <link.h> instead."
lib/libc/include/sparcv9-linux-gnu/bits/local_lim.h+2-2
......@@ -1,5 +1,5 @@
11/* Minimum guaranteed maximum values for system limits. Linux/SPARC version.
2 Copyright (C) 1993-2019 Free Software Foundation, Inc.
2 Copyright (C) 1993-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Library General Public
1616 License along with the GNU C Library; see the file COPYING.LIB. If
17 not, see <http://www.gnu.org/licenses/>. */
17 not, see <https://www.gnu.org/licenses/>. */
1818
1919/* The kernel header pollutes the namespace with the NR_OPEN symbol
2020 and defines LINK_MAX although filesystems have different maxima. A
lib/libc/include/sparcv9-linux-gnu/bits/long-double.h+4-3
......@@ -1,5 +1,5 @@
11/* Properties of long double type. SPARC version.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#include <bits/wordsize.h>
2020
......@@ -23,4 +23,5 @@
2323# ifndef __LONG_DOUBLE_128__
2424# define __NO_LONG_DOUBLE_MATH 1
2525# endif
26#endif
\ No newline at end of file
26#endif
27#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file
lib/libc/include/sparcv9-linux-gnu/bits/mman.h+4-2
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX memory map interface. Linux/SPARC version.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_MMAN_H
2020# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
......@@ -36,6 +36,8 @@
3636# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */
3737# define MAP_STACK 0x20000 /* Allocation is for a stack. */
3838# define MAP_HUGETLB 0x40000 /* Create huge page mapping. */
39# define MAP_SYNC 0x80000 /* Perform synchronous page
40 faults for the mapping. */
3941# define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap
4042 underlying mapping. */
4143#endif
lib/libc/include/sparcv9-linux-gnu/bits/msq-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct msqid_ds. SPARC version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_MSG_H
2020# error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead."
lib/libc/include/sparcv9-linux-gnu/bits/poll.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_POLL_H
1919# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
lib/libc/include/sparcv9-linux-gnu/bits/procfs-extra.h+2-2
......@@ -1,5 +1,5 @@
11/* Extra sys/procfs.h definitions. SPARC version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_PROCFS_H
2020# error "Never include <bits/procfs-extra.h> directly; use <sys/procfs.h> instead."
lib/libc/include/sparcv9-linux-gnu/bits/procfs-id.h+2-2
......@@ -1,5 +1,5 @@
11/* Types of pr_uid and pr_gid in struct elf_prpsinfo. SPARC version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _SYS_PROCFS_H
2121# error "Never include <bits/procfs-id.h> directly; use <sys/procfs.h> instead."
lib/libc/include/sparcv9-linux-gnu/bits/procfs.h+2-2
......@@ -1,5 +1,5 @@
11/* Types for registers for sys/procfs.h. SPARC version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_PROCFS_H
2020# error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead."
lib/libc/include/sparcv9-linux-gnu/bits/pthreadtypes-arch.h deleted-81
......@@ -1,81 +0,0 @@
1/* Machine-specific pthread type layouts. SPARC version.
2 Copyright (C) 2003-2019 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19#ifndef _BITS_PTHREADTYPES_ARCH_H
20#define _BITS_PTHREADTYPES_ARCH_H 1
21
22#include <bits/wordsize.h>
23
24#if __WORDSIZE == 64
25# define __SIZEOF_PTHREAD_ATTR_T 56
26# define __SIZEOF_PTHREAD_MUTEX_T 40
27# define __SIZEOF_PTHREAD_CONDATTR_T 4
28# define __SIZEOF_PTHREAD_RWLOCK_T 56
29# define __SIZEOF_PTHREAD_BARRIER_T 32
30#else
31# define __SIZEOF_PTHREAD_ATTR_T 36
32# define __SIZEOF_PTHREAD_MUTEX_T 24
33# define __SIZEOF_PTHREAD_CONDATTR_T 4
34# define __SIZEOF_PTHREAD_RWLOCK_T 32
35# define __SIZEOF_PTHREAD_BARRIER_T 20
36#endif
37#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
38#define __SIZEOF_PTHREAD_COND_T 48
39#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
40#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
41
42/* Definitions for internal mutex struct. */
43#define __PTHREAD_COMPAT_PADDING_MID
44#define __PTHREAD_COMPAT_PADDING_END
45#define __PTHREAD_MUTEX_LOCK_ELISION 0
46#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND (__WORDSIZE != 64)
47#define __PTHREAD_MUTEX_USE_UNION (__WORDSIZE != 64)
48
49#define __LOCK_ALIGNMENT
50#define __ONCE_ALIGNMENT
51
52struct __pthread_rwlock_arch_t
53{
54 unsigned int __readers;
55 unsigned int __writers;
56 unsigned int __wrphase_futex;
57 unsigned int __writers_futex;
58 unsigned int __pad3;
59 unsigned int __pad4;
60#if __WORDSIZE == 64
61 int __cur_writer;
62 int __shared;
63 unsigned long int __pad1;
64 unsigned long int __pad2;
65 /* FLAGS must stay at this position in the structure to maintain
66 binary compatibility. */
67 unsigned int __flags;
68#else
69 unsigned char __pad1;
70 unsigned char __pad2;
71 unsigned char __shared;
72 /* FLAGS must stay at this position in the structure to maintain
73 binary compatibility. */
74 unsigned char __flags;
75 int __cur_writer;
76#endif
77};
78
79#define __PTHREAD_RWLOCK_ELISION_EXTRA 0
80
81#endif /* bits/pthreadtypes.h */
\ No newline at end of file
lib/libc/include/sparcv9-linux-gnu/bits/resource.h+2-2
......@@ -1,5 +1,5 @@
11/* Bit values & structures for resource limits. Linux/SPARC version.
2 Copyright (C) 1994-2019 Free Software Foundation, Inc.
2 Copyright (C) 1994-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_RESOURCE_H
2020# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
lib/libc/include/sparcv9-linux-gnu/bits/sem-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct semid_ds. SPARC version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SEM_H
2020# error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead."
lib/libc/include/sparcv9-linux-gnu/bits/semaphore.h+2-2
......@@ -1,5 +1,5 @@
11/* Machine-specific POSIX semaphore type layouts. SPARC version.
2 Copyright (C) 2003-2019 Free Software Foundation, Inc.
2 Copyright (C) 2003-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44 Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _SEMAPHORE_H
2121# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
lib/libc/include/sparcv9-linux-gnu/bits/setjmp.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _BITS_SETJMP_H
1919#define _BITS_SETJMP_H 1
lib/libc/include/sparcv9-linux-gnu/bits/shm-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct shmid_ds. SPARC version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SHM_H
2020# error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead."
lib/libc/include/sparcv9-linux-gnu/bits/shmlba.h+2-2
......@@ -1,5 +1,5 @@
11/* Define SHMLBA. SPARC version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SHM_H
2020# error "Never use <bits/shmlba.h> directly; include <sys/shm.h> instead."
lib/libc/include/sparcv9-linux-gnu/bits/sigaction.h+2-2
......@@ -1,5 +1,5 @@
11/* The proper definitions for Linux/SPARC sigaction.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_SIGACTION_H
2020#define _BITS_SIGACTION_H 1
lib/libc/include/sparcv9-linux-gnu/bits/sigcontext.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2000-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2000-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _BITS_SIGCONTEXT_H
1919#define _BITS_SIGCONTEXT_H 1
lib/libc/include/sparcv9-linux-gnu/bits/signalfd.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_SIGNALFD_H
1919# error "Never use <bits/signalfd.h> directly; include <sys/signalfd.h> instead."
lib/libc/include/sparcv9-linux-gnu/bits/signum.h+2-2
......@@ -1,5 +1,5 @@
11/* Signal number definitions. Linux/SPARC version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_SIGNUM_H
2020#define _BITS_SIGNUM_H 1
lib/libc/include/sparcv9-linux-gnu/bits/sigstack.h+2-2
......@@ -1,5 +1,5 @@
11/* sigstack, sigaltstack definitions.
2 Copyright (C) 1998-2019 Free Software Foundation, Inc.
2 Copyright (C) 1998-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_SIGSTACK_H
2020#define _BITS_SIGSTACK_H 1
lib/libc/include/sparcv9-linux-gnu/bits/socket-constants.h+2-2
......@@ -1,5 +1,5 @@
11/* Socket constants which vary among Linux architectures. Version for SPARC.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SOCKET_H
2020# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
lib/libc/include/sparcv9-linux-gnu/bits/socket_type.h+2-2
......@@ -1,5 +1,5 @@
11/* Define enum __socket_type for Linux/SPARC.
2 Copyright (C) 1991-2019 Free Software Foundation, Inc.
2 Copyright (C) 1991-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SOCKET_H
2020# error "Never include <bits/socket_type.h> directly; use <sys/socket.h> instead."
lib/libc/include/sparcv9-linux-gnu/bits/stat.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#if !defined _SYS_STAT_H && !defined _FCNTL_H
1919# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
lib/libc/include/sparcv9-linux-gnu/bits/struct_rwlock.h created+58
......@@ -0,0 +1,58 @@
1/* SPARC internal rwlock struct definitions.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
3
4 This file is part of the GNU C Library.
5
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
19
20#ifndef _RWLOCK_INTERNAL_H
21#define _RWLOCK_INTERNAL_H
22
23struct __pthread_rwlock_arch_t
24{
25 unsigned int __readers;
26 unsigned int __writers;
27 unsigned int __wrphase_futex;
28 unsigned int __writers_futex;
29 unsigned int __pad3;
30 unsigned int __pad4;
31#if __WORDSIZE == 64
32 int __cur_writer;
33 int __shared;
34 unsigned long int __pad1;
35 unsigned long int __pad2;
36 /* FLAGS must stay at this position in the structure to maintain
37 binary compatibility. */
38 unsigned int __flags;
39#else
40 unsigned char __pad1;
41 unsigned char __pad2;
42 unsigned char __shared;
43 /* FLAGS must stay at this position in the structure to maintain
44 binary compatibility. */
45 unsigned char __flags;
46 int __cur_writer;
47#endif
48};
49
50#if __WORDSIZE == 64
51# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
52 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags
53#else
54# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
55 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags, 0
56#endif
57
58#endif
\ No newline at end of file
lib/libc/include/sparcv9-linux-gnu/bits/termios-baud.h+2-2
......@@ -1,5 +1,5 @@
11/* termios baud rate selection definitions. Linux/sparc version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-baud.h> directly; use <termios.h> instead."
lib/libc/include/sparcv9-linux-gnu/bits/termios-c_cc.h+2-2
......@@ -1,5 +1,5 @@
11/* termios c_cc symbolic constant definitions. Linux/sparc version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-c_cc.h> directly; use <termios.h> instead."
lib/libc/include/sparcv9-linux-gnu/bits/termios-c_oflag.h+2-2
......@@ -1,5 +1,5 @@
11/* termios output mode definitions. Linux/sparc version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-c_oflag.h> directly; use <termios.h> instead."
lib/libc/include/sparcv9-linux-gnu/bits/termios-struct.h+2-2
......@@ -1,5 +1,5 @@
11/* struct termios definition. Linux/sparc version.
2 Copyright (C) 2019 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _TERMIOS_H
2020# error "Never include <bits/termios-struct.h> directly; use <termios.h> instead."
lib/libc/include/sparcv9-linux-gnu/bits/timerfd.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2008-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_TIMERFD_H
1919# error "Never use <bits/timerfd.h> directly; include <sys/timerfd.h> instead."
lib/libc/include/sparcv9-linux-gnu/bits/typesizes.h+7-2
......@@ -1,5 +1,5 @@
11/* bits/typesizes.h -- underlying types for *_t. Linux/SPARC version.
2 Copyright (C) 2002-2019 Free Software Foundation, Inc.
2 Copyright (C) 2002-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_TYPES_H
2020# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
......@@ -72,8 +72,13 @@
7272
7373/* And for __rlim_t and __rlim64_t. */
7474# define __RLIM_T_MATCHES_RLIM64_T 1
75
76/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
77# define __STATFS_MATCHES_STATFS64 1
7578#else
7679# define __RLIM_T_MATCHES_RLIM64_T 0
80
81# define __STATFS_MATCHES_STATFS64 0
7782#endif
7883
7984/* Number of descriptors that can fit in an `fd_set'. */
lib/libc/include/sparcv9-linux-gnu/fpu_control.h+2-2
......@@ -1,5 +1,5 @@
11/* FPU control word bits. SPARC version.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44 Contributed by Miguel de Icaza
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _FPU_CONTROL_H
2121#define _FPU_CONTROL_H 1
lib/libc/include/sparcv9-linux-gnu/ieee754.h+4-4
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,14 +13,14 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _IEEE754_H
19
2019#define _IEEE754_H 1
20
2121#include <features.h>
2222
23#include <endian.h>
23#include <bits/endian.h>
2424
2525__BEGIN_DECLS
2626
lib/libc/include/sparcv9-linux-gnu/sys/ptrace.h+7-3
......@@ -1,5 +1,5 @@
11/* `ptrace' debugger support interface. Linux/SPARC version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_PTRACE_H
2020#define _SYS_PTRACE_H 1
......@@ -217,8 +217,12 @@ enum __ptrace_request
217217#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER
218218
219219 /* Get seccomp BPF filter metadata. */
220 PTRACE_SECCOMP_GET_METADATA = 0x420d
220 PTRACE_SECCOMP_GET_METADATA = 0x420d,
221221#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
222
223 /* Get information about system call. */
224 PTRACE_GET_SYSCALL_INFO = 0x420e
225#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
222226};
223227
224228
lib/libc/include/sparcv9-linux-gnu/sys/ucontext.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_UCONTEXT_H
1919#define _SYS_UCONTEXT_H 1
lib/libc/include/sparcv9-linux-gnu/sys/user.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2003-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2003-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_USER_H
1919#define _SYS_USER_H 1
lib/libc/include/x86_64-linux-gnu/bits/endian.h deleted-7
......@@ -1,7 +0,0 @@
1/* i386/x86_64 are little-endian. */
2
3#ifndef _ENDIAN_H
4# error "Never use <bits/endian.h> directly; include <endian.h> instead."
5#endif
6
7#define __BYTE_ORDER __LITTLE_ENDIAN
\ No newline at end of file
lib/libc/include/x86_64-linux-gnu/bits/endianness.h created+11
......@@ -0,0 +1,11 @@
1#ifndef _BITS_ENDIANNESS_H
2#define _BITS_ENDIANNESS_H 1
3
4#ifndef _BITS_ENDIAN_H
5# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
6#endif
7
8/* i386/x86_64 are little-endian. */
9#define __BYTE_ORDER __LITTLE_ENDIAN
10
11#endif /* bits/endianness.h */
\ No newline at end of file
lib/libc/include/x86_64-linux-gnu/bits/environments.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _UNISTD_H
1919# error "Never include this file directly. Use <unistd.h> instead"
lib/libc/include/x86_64-linux-gnu/bits/epoll.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_EPOLL_H
1919# error "Never use <bits/epoll.h> directly; include <sys/epoll.h> instead."
lib/libc/include/x86_64-linux-gnu/bits/fcntl.h+2-2
......@@ -1,5 +1,5 @@
11/* O_*, F_*, FD_* bit values for Linux/x86.
2 Copyright (C) 2001-2019 Free Software Foundation, Inc.
2 Copyright (C) 2001-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _FCNTL_H
2020# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
lib/libc/include/x86_64-linux-gnu/bits/fenv.h+3-3
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _FENV_H
1919# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
......@@ -101,7 +101,7 @@ fenv_t;
101101# define FE_NOMASK_ENV ((const fenv_t *) -2)
102102#endif
103103
104#if __GLIBC_USE (IEC_60559_BFP_EXT)
104#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
105105/* Type representing floating-point control modes. */
106106typedef struct
107107 {
lib/libc/include/x86_64-linux-gnu/bits/floatn.h+2-2
......@@ -1,5 +1,5 @@
11/* Macros to control TS 18661-3 glibc features on x86.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_FLOATN_H
2020#define _BITS_FLOATN_H
lib/libc/include/x86_64-linux-gnu/bits/flt-eval-method.h+2-2
......@@ -1,5 +1,5 @@
11/* Define __GLIBC_FLT_EVAL_METHOD. x86 version.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _MATH_H
2020# error "Never use <bits/flt-eval-method.h> directly; include <math.h> instead."
lib/libc/include/x86_64-linux-gnu/bits/fp-logb.h+2-2
......@@ -1,5 +1,5 @@
11/* Define __FP_LOGB0_IS_MIN and __FP_LOGBNAN_IS_MIN. x86 version.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _MATH_H
2020# error "Never use <bits/fp-logb.h> directly; include <math.h> instead."
lib/libc/include/x86_64-linux-gnu/bits/indirect-return.h+2-2
......@@ -1,5 +1,5 @@
11/* Definition of __INDIRECT_RETURN. x86 version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _UCONTEXT_H
2020# error "Never include <bits/indirect-return.h> directly; use <ucontext.h> instead."
lib/libc/include/x86_64-linux-gnu/bits/ipctypes.h+2-2
......@@ -1,5 +1,5 @@
11/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM.
2 Copyright (C) 2012-2019 Free Software Foundation, Inc.
2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_IPC_H
2020# error "Never use <bits/ipctypes.h> directly; include <sys/ipc.h> instead."
lib/libc/include/x86_64-linux-gnu/bits/iscanonical.h+2-2
......@@ -1,5 +1,5 @@
11/* Define iscanonical macro. ldbl-96 version.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _MATH_H
2020# error "Never use <bits/iscanonical.h> directly; include <math.h> instead."
lib/libc/include/x86_64-linux-gnu/bits/link.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2004-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2004-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _LINK_H
1919# error "Never include <bits/link.h> directly; use <link.h> instead."
lib/libc/include/x86_64-linux-gnu/bits/long-double.h+4-3
......@@ -1,5 +1,5 @@
11/* Properties of long double type. ldbl-96 version.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,8 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* long double is distinct from double, so there is nothing to
20 define here. */
\ No newline at end of file
20 define here. */
21#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file
lib/libc/include/x86_64-linux-gnu/bits/math-vector.h+2-2
......@@ -1,5 +1,5 @@
11/* Platform-specific SIMD declarations of math functions.
2 Copyright (C) 2014-2019 Free Software Foundation, Inc.
2 Copyright (C) 2014-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _MATH_H
2020# error "Never include <bits/math-vector.h> directly;\
lib/libc/include/x86_64-linux-gnu/bits/mman.h+2-2
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX memory map interface. Linux/x86_64 version.
2 Copyright (C) 2001-2019 Free Software Foundation, Inc.
2 Copyright (C) 2001-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_MMAN_H
2020# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
lib/libc/include/x86_64-linux-gnu/bits/procfs-id.h+2-2
......@@ -1,5 +1,5 @@
11/* Types of pr_uid and pr_gid in struct elf_prpsinfo. x86 version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _SYS_PROCFS_H
2121# error "Never include <bits/procfs-id.h> directly; use <sys/procfs.h> instead."
lib/libc/include/x86_64-linux-gnu/bits/procfs.h+2-2
......@@ -1,5 +1,5 @@
11/* Types for registers for sys/procfs.h. x86 version.
2 Copyright (C) 2001-2019 Free Software Foundation, Inc.
2 Copyright (C) 2001-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_PROCFS_H
2020# error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead."
lib/libc/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h+2-53
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _BITS_PTHREADTYPES_ARCH_H
1919#define _BITS_PTHREADTYPES_ARCH_H 1
......@@ -24,20 +24,17 @@
2424# if __WORDSIZE == 64
2525# define __SIZEOF_PTHREAD_MUTEX_T 40
2626# define __SIZEOF_PTHREAD_ATTR_T 56
27# define __SIZEOF_PTHREAD_MUTEX_T 40
2827# define __SIZEOF_PTHREAD_RWLOCK_T 56
2928# define __SIZEOF_PTHREAD_BARRIER_T 32
3029# else
3130# define __SIZEOF_PTHREAD_MUTEX_T 32
3231# define __SIZEOF_PTHREAD_ATTR_T 32
33# define __SIZEOF_PTHREAD_MUTEX_T 32
3432# define __SIZEOF_PTHREAD_RWLOCK_T 44
3533# define __SIZEOF_PTHREAD_BARRIER_T 20
3634# endif
3735#else
3836# define __SIZEOF_PTHREAD_MUTEX_T 24
3937# define __SIZEOF_PTHREAD_ATTR_T 36
40# define __SIZEOF_PTHREAD_MUTEX_T 24
4138# define __SIZEOF_PTHREAD_RWLOCK_T 32
4239# define __SIZEOF_PTHREAD_BARRIER_T 20
4340#endif
......@@ -47,57 +44,9 @@
4744#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
4845#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
4946
50/* Definitions for internal mutex struct. */
51#define __PTHREAD_COMPAT_PADDING_MID
52#define __PTHREAD_COMPAT_PADDING_END
53#define __PTHREAD_MUTEX_LOCK_ELISION 1
54#ifdef __x86_64__
55# define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 0
56# define __PTHREAD_MUTEX_USE_UNION 0
57#else
58# define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 1
59# define __PTHREAD_MUTEX_USE_UNION 1
60#endif
61
6247#define __LOCK_ALIGNMENT
6348#define __ONCE_ALIGNMENT
6449
65struct __pthread_rwlock_arch_t
66{
67 unsigned int __readers;
68 unsigned int __writers;
69 unsigned int __wrphase_futex;
70 unsigned int __writers_futex;
71 unsigned int __pad3;
72 unsigned int __pad4;
73#ifdef __x86_64__
74 int __cur_writer;
75 int __shared;
76 signed char __rwelision;
77# ifdef __ILP32__
78 unsigned char __pad1[3];
79# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0 }
80# else
81 unsigned char __pad1[7];
82# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0, 0, 0, 0, 0 }
83# endif
84 unsigned long int __pad2;
85 /* FLAGS must stay at this position in the structure to maintain
86 binary compatibility. */
87 unsigned int __flags;
88# define __PTHREAD_RWLOCK_INT_FLAGS_SHARED 1
89#else
90 /* FLAGS must stay at this position in the structure to maintain
91 binary compatibility. */
92 unsigned char __flags;
93 unsigned char __shared;
94 signed char __rwelision;
95# define __PTHREAD_RWLOCK_ELISION_EXTRA 0
96 unsigned char __pad2;
97 int __cur_writer;
98#endif
99};
100
10150#ifndef __x86_64__
10251/* Extra attributes for the cleanup functions. */
10352# define __cleanup_fct_attribute __attribute__ ((__regparm__ (1)))
lib/libc/include/x86_64-linux-gnu/bits/select.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_SELECT_H
1919# error "Never use <bits/select.h> directly; include <sys/select.h> instead."
lib/libc/include/x86_64-linux-gnu/bits/sem-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct semid_ds. x86 version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SEM_H
2020# error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead."
lib/libc/include/x86_64-linux-gnu/bits/semaphore.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33 Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SEMAPHORE_H
2020# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
lib/libc/include/x86_64-linux-gnu/bits/setjmp.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2001-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/* Define the machine-dependent type `jmp_buf'. x86-64 version. */
1919#ifndef _BITS_SETJMP_H
lib/libc/include/x86_64-linux-gnu/bits/sigcontext.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _BITS_SIGCONTEXT_H
1919#define _BITS_SIGCONTEXT_H 1
lib/libc/include/x86_64-linux-gnu/bits/stat.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#if !defined _SYS_STAT_H && !defined _FCNTL_H
1919# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
lib/libc/include/x86_64-linux-gnu/bits/struct_mutex.h created+63
......@@ -0,0 +1,63 @@
1/* x86 internal mutex struct definitions.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19#ifndef _THREAD_MUTEX_INTERNAL_H
20#define _THREAD_MUTEX_INTERNAL_H 1
21
22struct __pthread_mutex_s
23{
24 int __lock;
25 unsigned int __count;
26 int __owner;
27#ifdef __x86_64__
28 unsigned int __nusers;
29#endif
30 /* KIND must stay at this position in the structure to maintain
31 binary compatibility with static initializers. */
32 int __kind;
33#ifdef __x86_64__
34 short __spins;
35 short __elision;
36 __pthread_list_t __list;
37# define __PTHREAD_MUTEX_HAVE_PREV 1
38#else
39 unsigned int __nusers;
40 __extension__ union
41 {
42 struct
43 {
44 short __espins;
45 short __eelision;
46# define __spins __elision_data.__espins
47# define __elision __elision_data.__eelision
48 } __elision_data;
49 __pthread_slist_t __list;
50 };
51# define __PTHREAD_MUTEX_HAVE_PREV 0
52#endif
53};
54
55#ifdef __x86_64__
56# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
57 0, 0, 0, 0, __kind, 0, 0, { 0, 0 }
58#else
59# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
60 0, 0, 0, __kind, 0, { { 0, 0 } }
61#endif
62
63#endif
\ No newline at end of file
lib/libc/include/x86_64-linux-gnu/bits/struct_rwlock.h created+65
......@@ -0,0 +1,65 @@
1/* x86 internal rwlock struct definitions.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
3
4 This file is part of the GNU C Library.
5
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
19
20#ifndef _RWLOCK_INTERNAL_H
21#define _RWLOCK_INTERNAL_H
22
23struct __pthread_rwlock_arch_t
24{
25 unsigned int __readers;
26 unsigned int __writers;
27 unsigned int __wrphase_futex;
28 unsigned int __writers_futex;
29 unsigned int __pad3;
30 unsigned int __pad4;
31#ifdef __x86_64__
32 int __cur_writer;
33 int __shared;
34 signed char __rwelision;
35# ifdef __ILP32__
36 unsigned char __pad1[3];
37# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0 }
38# else
39 unsigned char __pad1[7];
40# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0, 0, 0, 0, 0 }
41# endif
42 unsigned long int __pad2;
43 /* FLAGS must stay at this position in the structure to maintain
44 binary compatibility. */
45 unsigned int __flags;
46#else /* __x86_64__ */
47 /* FLAGS must stay at this position in the structure to maintain
48 binary compatibility. */
49 unsigned char __flags;
50 unsigned char __shared;
51 signed char __rwelision;
52 unsigned char __pad2;
53 int __cur_writer;
54#endif
55};
56
57#ifdef __x86_64__
58# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
59 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, __flags
60#else
61# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
62 0, 0, 0, 0, 0, 0, __flags, 0, 0, 0, 0
63#endif
64
65#endif
\ No newline at end of file
lib/libc/include/x86_64-linux-gnu/bits/sysctl.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2012-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2012-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#if defined __x86_64__ && defined __ILP32__
1919# error "sysctl system call is unsupported in x32 kernel"
lib/libc/include/x86_64-linux-gnu/bits/timesize.h+2-2
......@@ -1,5 +1,5 @@
11/* Bit size of the time_t type at glibc build time, x86-64 and x32 case.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#if defined __x86_64__ && defined __ILP32__
2020/* For x32, time is 64-bit even though word size is 32-bit. */
lib/libc/include/x86_64-linux-gnu/bits/typesizes.h+7-2
......@@ -1,5 +1,5 @@
11/* bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
2 Copyright (C) 2012-2019 Free Software Foundation, Inc.
2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_TYPES_H
2020# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
......@@ -84,8 +84,13 @@
8484
8585/* And for __rlim_t and __rlim64_t. */
8686# define __RLIM_T_MATCHES_RLIM64_T 1
87
88/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
89# define __STATFS_MATCHES_STATFS64 1
8790#else
8891# define __RLIM_T_MATCHES_RLIM64_T 0
92
93# define __STATFS_MATCHES_STATFS64 0
8994#endif
9095
9196/* Number of descriptors that can fit in an `fd_set'. */
lib/libc/include/x86_64-linux-gnu/finclude/math-vector-fortran.h+2-2
......@@ -1,5 +1,5 @@
11! Platform-specific declarations of SIMD math functions for Fortran. -*- f90 -*-
2! Copyright (C) 2019 Free Software Foundation, Inc.
2! Copyright (C) 2019-2020 Free Software Foundation, Inc.
33! This file is part of the GNU C Library.
44!
55! The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414!
1515! You should have received a copy of the GNU Lesser General Public
1616! License along with the GNU C Library; if not, see
17! <http://www.gnu.org/licenses/>.
17! <https://www.gnu.org/licenses/>.
1818
1919!GCC$ builtin (cos) attributes simd (notinbranch) if('x86_64')
2020!GCC$ builtin (cosf) attributes simd (notinbranch) if('x86_64')
lib/libc/include/x86_64-linux-gnu/fpu_control.h+2-2
......@@ -1,5 +1,5 @@
11/* FPU control word bits. x86 version.
2 Copyright (C) 1993-2019 Free Software Foundation, Inc.
2 Copyright (C) 1993-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44 Contributed by Olaf Flebbe.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _FPU_CONTROL_H
2121#define _FPU_CONTROL_H 1
lib/libc/include/x86_64-linux-gnu/sys/elf.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_ELF_H
1919#define _SYS_ELF_H 1
lib/libc/include/x86_64-linux-gnu/sys/ptrace.h+7-3
......@@ -1,5 +1,5 @@
11/* `ptrace' debugger support interface. Linux/x86 version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _SYS_PTRACE_H
2121#define _SYS_PTRACE_H 1
......@@ -186,8 +186,12 @@ enum __ptrace_request
186186#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER
187187
188188 /* Get seccomp BPF filter metadata. */
189 PTRACE_SECCOMP_GET_METADATA = 0x420d
189 PTRACE_SECCOMP_GET_METADATA = 0x420d,
190190#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
191
192 /* Get information about system call. */
193 PTRACE_GET_SYSCALL_INFO = 0x420e
194#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
191195};
192196
193197
lib/libc/include/x86_64-linux-gnu/sys/ucontext.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2001-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_UCONTEXT_H
1919#define _SYS_UCONTEXT_H 1
lib/libc/include/x86_64-linux-gnu/sys/user.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2001-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_USER_H
1919#define _SYS_USER_H 1
lib/libc/include/x86_64-linux-gnux32/bits/endian.h deleted-7
......@@ -1,7 +0,0 @@
1/* i386/x86_64 are little-endian. */
2
3#ifndef _ENDIAN_H
4# error "Never use <bits/endian.h> directly; include <endian.h> instead."
5#endif
6
7#define __BYTE_ORDER __LITTLE_ENDIAN
\ No newline at end of file
lib/libc/include/x86_64-linux-gnux32/bits/endianness.h created+11
......@@ -0,0 +1,11 @@
1#ifndef _BITS_ENDIANNESS_H
2#define _BITS_ENDIANNESS_H 1
3
4#ifndef _BITS_ENDIAN_H
5# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
6#endif
7
8/* i386/x86_64 are little-endian. */
9#define __BYTE_ORDER __LITTLE_ENDIAN
10
11#endif /* bits/endianness.h */
\ No newline at end of file
lib/libc/include/x86_64-linux-gnux32/bits/environments.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _UNISTD_H
1919# error "Never include this file directly. Use <unistd.h> instead"
lib/libc/include/x86_64-linux-gnux32/bits/epoll.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_EPOLL_H
1919# error "Never use <bits/epoll.h> directly; include <sys/epoll.h> instead."
lib/libc/include/x86_64-linux-gnux32/bits/fcntl.h+2-2
......@@ -1,5 +1,5 @@
11/* O_*, F_*, FD_* bit values for Linux/x86.
2 Copyright (C) 2001-2019 Free Software Foundation, Inc.
2 Copyright (C) 2001-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _FCNTL_H
2020# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
lib/libc/include/x86_64-linux-gnux32/bits/fenv.h+3-3
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _FENV_H
1919# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
......@@ -101,7 +101,7 @@ fenv_t;
101101# define FE_NOMASK_ENV ((const fenv_t *) -2)
102102#endif
103103
104#if __GLIBC_USE (IEC_60559_BFP_EXT)
104#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
105105/* Type representing floating-point control modes. */
106106typedef struct
107107 {
lib/libc/include/x86_64-linux-gnux32/bits/floatn.h+2-2
......@@ -1,5 +1,5 @@
11/* Macros to control TS 18661-3 glibc features on x86.
2 Copyright (C) 2017-2019 Free Software Foundation, Inc.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_FLOATN_H
2020#define _BITS_FLOATN_H
lib/libc/include/x86_64-linux-gnux32/bits/flt-eval-method.h+2-2
......@@ -1,5 +1,5 @@
11/* Define __GLIBC_FLT_EVAL_METHOD. x86 version.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _MATH_H
2020# error "Never use <bits/flt-eval-method.h> directly; include <math.h> instead."
lib/libc/include/x86_64-linux-gnux32/bits/fp-logb.h+2-2
......@@ -1,5 +1,5 @@
11/* Define __FP_LOGB0_IS_MIN and __FP_LOGBNAN_IS_MIN. x86 version.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _MATH_H
2020# error "Never use <bits/fp-logb.h> directly; include <math.h> instead."
lib/libc/include/x86_64-linux-gnux32/bits/indirect-return.h+2-2
......@@ -1,5 +1,5 @@
11/* Definition of __INDIRECT_RETURN. x86 version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _UCONTEXT_H
2020# error "Never include <bits/indirect-return.h> directly; use <ucontext.h> instead."
lib/libc/include/x86_64-linux-gnux32/bits/ipctypes.h+2-2
......@@ -1,5 +1,5 @@
11/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM.
2 Copyright (C) 2012-2019 Free Software Foundation, Inc.
2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_IPC_H
2020# error "Never use <bits/ipctypes.h> directly; include <sys/ipc.h> instead."
lib/libc/include/x86_64-linux-gnux32/bits/iscanonical.h+2-2
......@@ -1,5 +1,5 @@
11/* Define iscanonical macro. ldbl-96 version.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _MATH_H
2020# error "Never use <bits/iscanonical.h> directly; include <math.h> instead."
lib/libc/include/x86_64-linux-gnux32/bits/link.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2004-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2004-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _LINK_H
1919# error "Never include <bits/link.h> directly; use <link.h> instead."
lib/libc/include/x86_64-linux-gnux32/bits/long-double.h+4-3
......@@ -1,5 +1,5 @@
11/* Properties of long double type. ldbl-96 version.
2 Copyright (C) 2016-2019 Free Software Foundation, Inc.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,8 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919/* long double is distinct from double, so there is nothing to
20 define here. */
\ No newline at end of file
20 define here. */
21#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file
lib/libc/include/x86_64-linux-gnux32/bits/math-vector.h+2-2
......@@ -1,5 +1,5 @@
11/* Platform-specific SIMD declarations of math functions.
2 Copyright (C) 2014-2019 Free Software Foundation, Inc.
2 Copyright (C) 2014-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _MATH_H
2020# error "Never include <bits/math-vector.h> directly;\
lib/libc/include/x86_64-linux-gnux32/bits/mman.h+2-2
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX memory map interface. Linux/x86_64 version.
2 Copyright (C) 2001-2019 Free Software Foundation, Inc.
2 Copyright (C) 2001-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_MMAN_H
2020# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
lib/libc/include/x86_64-linux-gnux32/bits/procfs-id.h+2-2
......@@ -1,5 +1,5 @@
11/* Types of pr_uid and pr_gid in struct elf_prpsinfo. x86 version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _SYS_PROCFS_H
2121# error "Never include <bits/procfs-id.h> directly; use <sys/procfs.h> instead."
lib/libc/include/x86_64-linux-gnux32/bits/procfs.h+2-2
......@@ -1,5 +1,5 @@
11/* Types for registers for sys/procfs.h. x86 version.
2 Copyright (C) 2001-2019 Free Software Foundation, Inc.
2 Copyright (C) 2001-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_PROCFS_H
2020# error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead."
lib/libc/include/x86_64-linux-gnux32/bits/pthreadtypes-arch.h+2-53
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _BITS_PTHREADTYPES_ARCH_H
1919#define _BITS_PTHREADTYPES_ARCH_H 1
......@@ -24,20 +24,17 @@
2424# if __WORDSIZE == 64
2525# define __SIZEOF_PTHREAD_MUTEX_T 40
2626# define __SIZEOF_PTHREAD_ATTR_T 56
27# define __SIZEOF_PTHREAD_MUTEX_T 40
2827# define __SIZEOF_PTHREAD_RWLOCK_T 56
2928# define __SIZEOF_PTHREAD_BARRIER_T 32
3029# else
3130# define __SIZEOF_PTHREAD_MUTEX_T 32
3231# define __SIZEOF_PTHREAD_ATTR_T 32
33# define __SIZEOF_PTHREAD_MUTEX_T 32
3432# define __SIZEOF_PTHREAD_RWLOCK_T 44
3533# define __SIZEOF_PTHREAD_BARRIER_T 20
3634# endif
3735#else
3836# define __SIZEOF_PTHREAD_MUTEX_T 24
3937# define __SIZEOF_PTHREAD_ATTR_T 36
40# define __SIZEOF_PTHREAD_MUTEX_T 24
4138# define __SIZEOF_PTHREAD_RWLOCK_T 32
4239# define __SIZEOF_PTHREAD_BARRIER_T 20
4340#endif
......@@ -47,57 +44,9 @@
4744#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
4845#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
4946
50/* Definitions for internal mutex struct. */
51#define __PTHREAD_COMPAT_PADDING_MID
52#define __PTHREAD_COMPAT_PADDING_END
53#define __PTHREAD_MUTEX_LOCK_ELISION 1
54#ifdef __x86_64__
55# define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 0
56# define __PTHREAD_MUTEX_USE_UNION 0
57#else
58# define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 1
59# define __PTHREAD_MUTEX_USE_UNION 1
60#endif
61
6247#define __LOCK_ALIGNMENT
6348#define __ONCE_ALIGNMENT
6449
65struct __pthread_rwlock_arch_t
66{
67 unsigned int __readers;
68 unsigned int __writers;
69 unsigned int __wrphase_futex;
70 unsigned int __writers_futex;
71 unsigned int __pad3;
72 unsigned int __pad4;
73#ifdef __x86_64__
74 int __cur_writer;
75 int __shared;
76 signed char __rwelision;
77# ifdef __ILP32__
78 unsigned char __pad1[3];
79# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0 }
80# else
81 unsigned char __pad1[7];
82# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0, 0, 0, 0, 0 }
83# endif
84 unsigned long int __pad2;
85 /* FLAGS must stay at this position in the structure to maintain
86 binary compatibility. */
87 unsigned int __flags;
88# define __PTHREAD_RWLOCK_INT_FLAGS_SHARED 1
89#else
90 /* FLAGS must stay at this position in the structure to maintain
91 binary compatibility. */
92 unsigned char __flags;
93 unsigned char __shared;
94 signed char __rwelision;
95# define __PTHREAD_RWLOCK_ELISION_EXTRA 0
96 unsigned char __pad2;
97 int __cur_writer;
98#endif
99};
100
10150#ifndef __x86_64__
10251/* Extra attributes for the cleanup functions. */
10352# define __cleanup_fct_attribute __attribute__ ((__regparm__ (1)))
lib/libc/include/x86_64-linux-gnux32/bits/select.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_SELECT_H
1919# error "Never use <bits/select.h> directly; include <sys/select.h> instead."
lib/libc/include/x86_64-linux-gnux32/bits/sem-pad.h+2-2
......@@ -1,5 +1,5 @@
11/* Define where padding goes in struct semid_ds. x86 version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SYS_SEM_H
2020# error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead."
lib/libc/include/x86_64-linux-gnux32/bits/semaphore.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33 Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
44
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _SEMAPHORE_H
2020# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
lib/libc/include/x86_64-linux-gnux32/bits/setjmp.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2001-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818/* Define the machine-dependent type `jmp_buf'. x86-64 version. */
1919#ifndef _BITS_SETJMP_H
lib/libc/include/x86_64-linux-gnux32/bits/sigcontext.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _BITS_SIGCONTEXT_H
1919#define _BITS_SIGCONTEXT_H 1
lib/libc/include/x86_64-linux-gnux32/bits/stat.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#if !defined _SYS_STAT_H && !defined _FCNTL_H
1919# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
lib/libc/include/x86_64-linux-gnux32/bits/struct_mutex.h created+63
......@@ -0,0 +1,63 @@
1/* x86 internal mutex struct definitions.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19#ifndef _THREAD_MUTEX_INTERNAL_H
20#define _THREAD_MUTEX_INTERNAL_H 1
21
22struct __pthread_mutex_s
23{
24 int __lock;
25 unsigned int __count;
26 int __owner;
27#ifdef __x86_64__
28 unsigned int __nusers;
29#endif
30 /* KIND must stay at this position in the structure to maintain
31 binary compatibility with static initializers. */
32 int __kind;
33#ifdef __x86_64__
34 short __spins;
35 short __elision;
36 __pthread_list_t __list;
37# define __PTHREAD_MUTEX_HAVE_PREV 1
38#else
39 unsigned int __nusers;
40 __extension__ union
41 {
42 struct
43 {
44 short __espins;
45 short __eelision;
46# define __spins __elision_data.__espins
47# define __elision __elision_data.__eelision
48 } __elision_data;
49 __pthread_slist_t __list;
50 };
51# define __PTHREAD_MUTEX_HAVE_PREV 0
52#endif
53};
54
55#ifdef __x86_64__
56# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
57 0, 0, 0, 0, __kind, 0, 0, { 0, 0 }
58#else
59# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
60 0, 0, 0, __kind, 0, { { 0, 0 } }
61#endif
62
63#endif
\ No newline at end of file
lib/libc/include/x86_64-linux-gnux32/bits/struct_rwlock.h created+65
......@@ -0,0 +1,65 @@
1/* x86 internal rwlock struct definitions.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
3
4 This file is part of the GNU C Library.
5
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
19
20#ifndef _RWLOCK_INTERNAL_H
21#define _RWLOCK_INTERNAL_H
22
23struct __pthread_rwlock_arch_t
24{
25 unsigned int __readers;
26 unsigned int __writers;
27 unsigned int __wrphase_futex;
28 unsigned int __writers_futex;
29 unsigned int __pad3;
30 unsigned int __pad4;
31#ifdef __x86_64__
32 int __cur_writer;
33 int __shared;
34 signed char __rwelision;
35# ifdef __ILP32__
36 unsigned char __pad1[3];
37# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0 }
38# else
39 unsigned char __pad1[7];
40# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0, 0, 0, 0, 0 }
41# endif
42 unsigned long int __pad2;
43 /* FLAGS must stay at this position in the structure to maintain
44 binary compatibility. */
45 unsigned int __flags;
46#else /* __x86_64__ */
47 /* FLAGS must stay at this position in the structure to maintain
48 binary compatibility. */
49 unsigned char __flags;
50 unsigned char __shared;
51 signed char __rwelision;
52 unsigned char __pad2;
53 int __cur_writer;
54#endif
55};
56
57#ifdef __x86_64__
58# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
59 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, __flags
60#else
61# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
62 0, 0, 0, 0, 0, 0, __flags, 0, 0, 0, 0
63#endif
64
65#endif
\ No newline at end of file
lib/libc/include/x86_64-linux-gnux32/bits/sysctl.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2012-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2012-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#if defined __x86_64__ && defined __ILP32__
1919# error "sysctl system call is unsupported in x32 kernel"
lib/libc/include/x86_64-linux-gnux32/bits/timesize.h+2-2
......@@ -1,5 +1,5 @@
11/* Bit size of the time_t type at glibc build time, x86-64 and x32 case.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#if defined __x86_64__ && defined __ILP32__
2020/* For x32, time is 64-bit even though word size is 32-bit. */
lib/libc/include/x86_64-linux-gnux32/bits/typesizes.h+7-2
......@@ -1,5 +1,5 @@
11/* bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
2 Copyright (C) 2012-2019 Free Software Foundation, Inc.
2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414
1515 You should have received a copy of the GNU Lesser General Public
1616 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
17 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_TYPES_H
2020# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
......@@ -84,8 +84,13 @@
8484
8585/* And for __rlim_t and __rlim64_t. */
8686# define __RLIM_T_MATCHES_RLIM64_T 1
87
88/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
89# define __STATFS_MATCHES_STATFS64 1
8790#else
8891# define __RLIM_T_MATCHES_RLIM64_T 0
92
93# define __STATFS_MATCHES_STATFS64 0
8994#endif
9095
9196/* Number of descriptors that can fit in an `fd_set'. */
lib/libc/include/x86_64-linux-gnux32/finclude/math-vector-fortran.h+2-2
......@@ -1,5 +1,5 @@
11! Platform-specific declarations of SIMD math functions for Fortran. -*- f90 -*-
2! Copyright (C) 2019 Free Software Foundation, Inc.
2! Copyright (C) 2019-2020 Free Software Foundation, Inc.
33! This file is part of the GNU C Library.
44!
55! The GNU C Library is free software; you can redistribute it and/or
......@@ -14,7 +14,7 @@
1414!
1515! You should have received a copy of the GNU Lesser General Public
1616! License along with the GNU C Library; if not, see
17! <http://www.gnu.org/licenses/>.
17! <https://www.gnu.org/licenses/>.
1818
1919!GCC$ builtin (cos) attributes simd (notinbranch) if('x86_64')
2020!GCC$ builtin (cosf) attributes simd (notinbranch) if('x86_64')
lib/libc/include/x86_64-linux-gnux32/fpu_control.h+2-2
......@@ -1,5 +1,5 @@
11/* FPU control word bits. x86 version.
2 Copyright (C) 1993-2019 Free Software Foundation, Inc.
2 Copyright (C) 1993-2020 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44 Contributed by Olaf Flebbe.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _FPU_CONTROL_H
2121#define _FPU_CONTROL_H 1
lib/libc/include/x86_64-linux-gnux32/sys/elf.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2019 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_ELF_H
1919#define _SYS_ELF_H 1
lib/libc/include/x86_64-linux-gnux32/sys/ptrace.h+7-3
......@@ -1,5 +1,5 @@
11/* `ptrace' debugger support interface. Linux/x86 version.
2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -15,7 +15,7 @@
1515
1616 You should have received a copy of the GNU Lesser General Public
1717 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
18 <https://www.gnu.org/licenses/>. */
1919
2020#ifndef _SYS_PTRACE_H
2121#define _SYS_PTRACE_H 1
......@@ -186,8 +186,12 @@ enum __ptrace_request
186186#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER
187187
188188 /* Get seccomp BPF filter metadata. */
189 PTRACE_SECCOMP_GET_METADATA = 0x420d
189 PTRACE_SECCOMP_GET_METADATA = 0x420d,
190190#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
191
192 /* Get information about system call. */
193 PTRACE_GET_SYSCALL_INFO = 0x420e
194#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
191195};
192196
193197
lib/libc/include/x86_64-linux-gnux32/sys/ucontext.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2001-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_UCONTEXT_H
1919#define _SYS_UCONTEXT_H 1
lib/libc/include/x86_64-linux-gnux32/sys/user.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2001-2019 Free Software Foundation, Inc.
1/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -13,7 +13,7 @@
1313
1414 You should have received a copy of the GNU Lesser General Public
1515 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
16 <https://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_USER_H
1919#define _SYS_USER_H 1
lib/std/build.zig+2-2
......@@ -763,7 +763,7 @@ pub const Builder = struct {
763763 }
764764
765765 pub fn makePath(self: *Builder, path: []const u8) !void {
766 fs.makePath(self.allocator, self.pathFromRoot(path)) catch |err| {
766 fs.cwd().makePath(self.pathFromRoot(path)) catch |err| {
767767 warn("Unable to create path {}: {}\n", .{ path, @errorName(err) });
768768 return err;
769769 };
......@@ -2311,7 +2311,7 @@ pub const InstallDirStep = struct {
23112311 const rel_path = entry.path[full_src_dir.len + 1 ..];
23122312 const dest_path = try fs.path.join(self.builder.allocator, &[_][]const u8{ dest_prefix, rel_path });
23132313 switch (entry.kind) {
2314 .Directory => try fs.makePath(self.builder.allocator, dest_path),
2314 .Directory => try fs.cwd().makePath(dest_path),
23152315 .File => try self.builder.updateFile(entry.path, dest_path),
23162316 else => continue,
23172317 }
lib/std/build/emit_raw.zig+4-4
......@@ -213,11 +213,11 @@ pub const InstallRawStep = struct {
213213 builder: *Builder,
214214 artifact: *LibExeObjStep,
215215 dest_dir: InstallDir,
216 dest_filename: [] const u8,
216 dest_filename: []const u8,
217217
218218 const Self = @This();
219219
220 pub fn create(builder: *Builder, artifact: *LibExeObjStep, dest_filename: [] const u8) *Self {
220 pub fn create(builder: *Builder, artifact: *LibExeObjStep, dest_filename: []const u8) *Self {
221221 const self = builder.allocator.create(Self) catch unreachable;
222222 self.* = Self{
223223 .step = Step.init(builder.fmt("install raw binary {}", .{artifact.step.name}), builder.allocator, make),
......@@ -249,7 +249,7 @@ pub const InstallRawStep = struct {
249249 const full_src_path = self.artifact.getOutputPath();
250250 const full_dest_path = builder.getInstallPath(self.dest_dir, self.dest_filename);
251251
252 fs.makePath(builder.allocator, builder.getInstallPath(self.dest_dir, "")) catch unreachable;
252 fs.cwd().makePath(builder.getInstallPath(self.dest_dir, "")) catch unreachable;
253253 try emit_raw(builder.allocator, full_src_path, full_dest_path);
254254 }
255};
\ No newline at end of file
255};
lib/std/build/write_file.zig+1-1
......@@ -74,7 +74,7 @@ pub const WriteFileStep = struct {
7474 &hash_basename,
7575 });
7676 // TODO replace with something like fs.makePathAndOpenDir
77 fs.makePath(self.builder.allocator, self.output_dir) catch |err| {
77 fs.cwd().makePath(self.output_dir) catch |err| {
7878 warn("unable to make path {}: {}\n", .{ self.output_dir, @errorName(err) });
7979 return err;
8080 };
lib/std/c.zig+4-1
......@@ -75,6 +75,7 @@ pub extern "c" fn isatty(fd: fd_t) c_int;
7575pub extern "c" fn close(fd: fd_t) c_int;
7676pub extern "c" fn fstat(fd: fd_t, buf: *Stat) c_int;
7777pub extern "c" fn @"fstat$INODE64"(fd: fd_t, buf: *Stat) c_int;
78pub extern "c" fn fstatat(dirfd: fd_t, path: [*:0]const u8, stat_buf: *Stat, flags: u32) c_int;
7879pub extern "c" fn lseek(fd: fd_t, offset: off_t, whence: c_int) off_t;
7980pub extern "c" fn open(path: [*:0]const u8, oflag: c_uint, ...) c_int;
8081pub 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
101102pub extern "c" fn pipe(fds: *[2]fd_t) c_int;
102103pub extern "c" fn pipe2(fds: *[2]fd_t, flags: u32) c_int;
103104pub extern "c" fn mkdir(path: [*:0]const u8, mode: c_uint) c_int;
105pub extern "c" fn mkdirat(dirfd: fd_t, path: [*:0]const u8, mode: u32) c_int;
104106pub extern "c" fn symlink(existing: [*:0]const u8, new: [*:0]const u8) c_int;
105107pub extern "c" fn rename(old: [*:0]const u8, new: [*:0]const u8) c_int;
106108pub extern "c" fn chdir(path: [*:0]const u8) c_int;
109pub extern "c" fn fchdir(fd: fd_t) c_int;
107110pub extern "c" fn execve(path: [*:0]const u8, argv: [*:null]const ?[*:0]const u8, envp: [*:null]const ?[*:0]const u8) c_int;
108111pub extern "c" fn dup(fd: fd_t) c_int;
109112pub extern "c" fn dup2(old_fd: fd_t, new_fd: fd_t) c_int;
......@@ -142,7 +145,7 @@ pub extern "c" fn sendto(
142145 buf: *const c_void,
143146 len: usize,
144147 flags: u32,
145 dest_addr: *const sockaddr,
148 dest_addr: ?*const sockaddr,
146149 addrlen: socklen_t,
147150) isize;
148151
lib/std/c/darwin.zig+16
......@@ -55,6 +55,22 @@ pub extern "c" fn clock_get_time(clock_serv: clock_serv_t, cur_time: *mach_times
5555pub extern "c" fn host_get_clock_service(host: host_t, clock_id: clock_id_t, clock_serv: ?[*]clock_serv_t) kern_return_t;
5656pub extern "c" fn mach_port_deallocate(task: ipc_space_t, name: mach_port_name_t) kern_return_t;
5757
58pub const sf_hdtr = extern struct {
59 headers: [*]const iovec_const,
60 hdr_cnt: c_int,
61 trailers: [*]const iovec_const,
62 trl_cnt: c_int,
63};
64
65pub extern "c" fn sendfile(
66 out_fd: fd_t,
67 in_fd: fd_t,
68 offset: off_t,
69 len: *off_t,
70 sf_hdtr: ?*sf_hdtr,
71 flags: u32,
72) c_int;
73
5874pub fn sigaddset(set: *sigset_t, signo: u5) void {
5975 set.* |= @as(u32, 1) << (signo - 1);
6076}
lib/std/c/freebsd.zig+16
......@@ -8,6 +8,22 @@ pub extern "c" fn getdents(fd: c_int, buf_ptr: [*]u8, nbytes: usize) usize;
88pub extern "c" fn sigaltstack(ss: ?*stack_t, old_ss: ?*stack_t) c_int;
99pub extern "c" fn getrandom(buf_ptr: [*]u8, buf_len: usize, flags: c_uint) isize;
1010
11pub const sf_hdtr = extern struct {
12 headers: [*]const iovec_const,
13 hdr_cnt: c_int,
14 trailers: [*]const iovec_const,
15 trl_cnt: c_int,
16};
17pub extern "c" fn sendfile(
18 out_fd: fd_t,
19 in_fd: fd_t,
20 offset: ?*off_t,
21 nbytes: usize,
22 sf_hdtr: ?*sf_hdtr,
23 sbytes: ?*off_t,
24 flags: u32,
25) c_int;
26
1127pub const dl_iterate_phdr_callback = extern fn (info: *dl_phdr_info, size: usize, data: ?*c_void) c_int;
1228pub extern "c" fn dl_iterate_phdr(callback: dl_iterate_phdr_callback, data: ?*c_void) c_int;
1329
lib/std/c/linux.zig+7
......@@ -82,6 +82,13 @@ pub extern "c" fn sigaltstack(ss: ?*stack_t, old_ss: ?*stack_t) c_int;
8282
8383pub extern "c" fn memfd_create(name: [*:0]const u8, flags: c_uint) c_int;
8484
85pub extern "c" fn sendfile(
86 out_fd: fd_t,
87 in_fd: fd_t,
88 offset: ?*off_t,
89 count: usize,
90) isize;
91
8592pub const pthread_attr_t = extern struct {
8693 __size: [56]u8,
8794 __align: c_long,
lib/std/event/loop.zig+12-10
......@@ -236,7 +236,8 @@ pub const Loop = struct {
236236 var extra_thread_index: usize = 0;
237237 errdefer {
238238 // writing 8 bytes to an eventfd cannot fail
239 noasync os.write(self.os_data.final_eventfd, &wakeup_bytes) catch unreachable;
239 const amt = noasync os.write(self.os_data.final_eventfd, &wakeup_bytes) catch unreachable;
240 assert(amt == wakeup_bytes.len);
240241 while (extra_thread_index != 0) {
241242 extra_thread_index -= 1;
242243 self.extra_threads[extra_thread_index].wait();
......@@ -682,7 +683,8 @@ pub const Loop = struct {
682683 .linux => {
683684 self.posixFsRequest(&self.os_data.fs_end_request);
684685 // writing 8 bytes to an eventfd cannot fail
685 noasync os.write(self.os_data.final_eventfd, &wakeup_bytes) catch unreachable;
686 const amt = noasync os.write(self.os_data.final_eventfd, &wakeup_bytes) catch unreachable;
687 assert(amt == wakeup_bytes.len);
686688 return;
687689 },
688690 .macosx, .freebsd, .netbsd, .dragonfly => {
......@@ -831,7 +833,7 @@ pub const Loop = struct {
831833
832834 /// Performs an async `os.write` using a separate thread.
833835 /// `fd` must block and not return EAGAIN.
834 pub fn write(self: *Loop, fd: os.fd_t, bytes: []const u8) os.WriteError!void {
836 pub fn write(self: *Loop, fd: os.fd_t, bytes: []const u8) os.WriteError!usize {
835837 var req_node = Request.Node{
836838 .data = .{
837839 .msg = .{
......@@ -852,7 +854,7 @@ pub const Loop = struct {
852854
853855 /// Performs an async `os.writev` using a separate thread.
854856 /// `fd` must block and not return EAGAIN.
855 pub fn writev(self: *Loop, fd: os.fd_t, iov: []const os.iovec_const) os.WriteError!void {
857 pub fn writev(self: *Loop, fd: os.fd_t, iov: []const os.iovec_const) os.WriteError!usize {
856858 var req_node = Request.Node{
857859 .data = .{
858860 .msg = .{
......@@ -873,7 +875,7 @@ pub const Loop = struct {
873875
874876 /// Performs an async `os.pwritev` using a separate thread.
875877 /// `fd` must block and not return EAGAIN.
876 pub fn pwritev(self: *Loop, fd: os.fd_t, iov: []const os.iovec_const, offset: u64) os.WriteError!void {
878 pub fn pwritev(self: *Loop, fd: os.fd_t, iov: []const os.iovec_const, offset: u64) os.WriteError!usize {
877879 var req_node = Request.Node{
878880 .data = .{
879881 .msg = .{
......@@ -1137,7 +1139,7 @@ pub const Loop = struct {
11371139 pub const Write = struct {
11381140 fd: os.fd_t,
11391141 bytes: []const u8,
1140 result: Error!void,
1142 result: Error!usize,
11411143
11421144 pub const Error = os.WriteError;
11431145 };
......@@ -1145,7 +1147,7 @@ pub const Loop = struct {
11451147 pub const WriteV = struct {
11461148 fd: os.fd_t,
11471149 iov: []const os.iovec_const,
1148 result: Error!void,
1150 result: Error!usize,
11491151
11501152 pub const Error = os.WriteError;
11511153 };
......@@ -1154,9 +1156,9 @@ pub const Loop = struct {
11541156 fd: os.fd_t,
11551157 iov: []const os.iovec_const,
11561158 offset: usize,
1157 result: Error!void,
1159 result: Error!usize,
11581160
1159 pub const Error = os.WriteError;
1161 pub const Error = os.PWriteError;
11601162 };
11611163
11621164 pub const PReadV = struct {
......@@ -1165,7 +1167,7 @@ pub const Loop = struct {
11651167 offset: usize,
11661168 result: Error!usize,
11671169
1168 pub const Error = os.ReadError;
1170 pub const Error = os.PReadError;
11691171 };
11701172
11711173 pub const Open = struct {
lib/std/fs.zig+104-100
......@@ -123,47 +123,21 @@ pub fn updateFileMode(source_path: []const u8, dest_path: []const u8, mode: ?Fil
123123 }
124124 const actual_mode = mode orelse src_stat.mode;
125125
126 // TODO this logic could be made more efficient by calling makePath, once
127 // that API does not require an allocator
128 var atomic_file = make_atomic_file: while (true) {
129 const af = AtomicFile.init(dest_path, actual_mode) catch |err| switch (err) {
130 error.FileNotFound => {
131 var p = dest_path;
132 while (path.dirname(p)) |dirname| {
133 makeDir(dirname) catch |e| switch (e) {
134 error.FileNotFound => {
135 p = dirname;
136 continue;
137 },
138 else => return e,
139 };
140 continue :make_atomic_file;
141 } else {
142 return err;
143 }
144 },
145 else => |e| return e,
146 };
147 break af;
148 } else unreachable;
149 defer atomic_file.deinit();
126 if (path.dirname(dest_path)) |dirname| {
127 try cwd().makePath(dirname);
128 }
150129
151 const in_stream = &src_file.inStream().stream;
130 var atomic_file = try AtomicFile.init(dest_path, actual_mode);
131 defer atomic_file.deinit();
152132
153 var buf: [mem.page_size * 6]u8 = undefined;
154 while (true) {
155 const amt = try in_stream.readFull(buf[0..]);
156 try atomic_file.file.write(buf[0..amt]);
157 if (amt != buf.len) {
158 try atomic_file.file.updateTimes(src_stat.atime, src_stat.mtime);
159 try atomic_file.finish();
160 return PrevStatus.stale;
161 }
162 }
133 try atomic_file.file.writeFileAll(src_file, .{ .in_len = src_stat.size });
134 try atomic_file.file.updateTimes(src_stat.atime, src_stat.mtime);
135 try atomic_file.finish();
136 return PrevStatus.stale;
163137}
164138
165/// Guaranteed to be atomic. However until https://patchwork.kernel.org/patch/9636735/ is
166/// merged and readily available,
139/// Guaranteed to be atomic.
140/// On Linux, until https://patchwork.kernel.org/patch/9636735/ is merged and readily available,
167141/// there is a possibility of power loss or application termination leaving temporary files present
168142/// in the same directory as dest_path.
169143/// 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
207181 }
208182}
209183
184/// TODO update this API to avoid a getrandom syscall for every operation. It
185/// should accept a random interface.
186/// TODO rework this to integrate with Dir
210187pub const AtomicFile = struct {
211188 file: File,
212189 tmp_path_buf: [MAX_PATH_BYTES]u8,
......@@ -268,70 +245,42 @@ pub const AtomicFile = struct {
268245
269246 pub fn finish(self: *AtomicFile) !void {
270247 assert(!self.finished);
271 self.file.close();
272 self.finished = true;
273 if (builtin.os.tag == .windows) {
248 if (std.Target.current.os.tag == .windows) {
274249 const dest_path_w = try os.windows.sliceToPrefixedFileW(self.dest_path);
275250 const tmp_path_w = try os.windows.cStrToPrefixedFileW(@ptrCast([*:0]u8, &self.tmp_path_buf));
251 self.file.close();
252 self.finished = true;
276253 return os.renameW(&tmp_path_w, &dest_path_w);
254 } else {
255 const dest_path_c = try os.toPosixPath(self.dest_path);
256 self.file.close();
257 self.finished = true;
258 return os.renameC(@ptrCast([*:0]u8, &self.tmp_path_buf), &dest_path_c);
277259 }
278 const dest_path_c = try os.toPosixPath(self.dest_path);
279 return os.renameC(@ptrCast([*:0]u8, &self.tmp_path_buf), &dest_path_c);
280260 }
281261};
282262
283263const default_new_dir_mode = 0o755;
284264
285/// Create a new directory.
286pub fn makeDir(dir_path: []const u8) !void {
287 return os.mkdir(dir_path, default_new_dir_mode);
265/// Create a new directory, based on an absolute path.
266/// Asserts that the path is absolute. See `Dir.makeDir` for a function that operates
267/// on both absolute and relative paths.
268pub fn makeDirAbsolute(absolute_path: []const u8) !void {
269 assert(path.isAbsoluteC(absolute_path));
270 return os.mkdir(absolute_path, default_new_dir_mode);
288271}
289272
290/// Same as `makeDir` except the parameter is a null-terminated UTF8-encoded string.
291pub fn makeDirC(dir_path: [*:0]const u8) !void {
292 return os.mkdirC(dir_path, default_new_dir_mode);
273/// Same as `makeDirAbsolute` except the parameter is a null-terminated UTF8-encoded string.
274pub fn makeDirAbsoluteZ(absolute_path_z: [*:0]const u8) !void {
275 assert(path.isAbsoluteC(absolute_path_z));
276 return os.mkdirZ(absolute_path_z, default_new_dir_mode);
293277}
294278
295/// Same as `makeDir` except the parameter is a null-terminated UTF16LE-encoded string.
296pub fn makeDirW(dir_path: [*:0]const u16) !void {
297 return os.mkdirW(dir_path, default_new_dir_mode);
298}
299
300/// Calls makeDir recursively to make an entire path. Returns success if the path
301/// already exists and is a directory.
302/// This function is not atomic, and if it returns an error, the file system may
303/// have been modified regardless.
304/// TODO determine if we can remove the allocator requirement from this function
305pub fn makePath(allocator: *Allocator, full_path: []const u8) !void {
306 const resolved_path = try path.resolve(allocator, &[_][]const u8{full_path});
307 defer allocator.free(resolved_path);
308
309 var end_index: usize = resolved_path.len;
310 while (true) {
311 makeDir(resolved_path[0..end_index]) catch |err| switch (err) {
312 error.PathAlreadyExists => {
313 // TODO stat the file and return an error if it's not a directory
314 // this is important because otherwise a dangling symlink
315 // could cause an infinite loop
316 if (end_index == resolved_path.len) return;
317 },
318 error.FileNotFound => {
319 // march end_index backward until next path component
320 while (true) {
321 end_index -= 1;
322 if (path.isSep(resolved_path[end_index])) break;
323 }
324 continue;
325 },
326 else => return err,
327 };
328 if (end_index == resolved_path.len) return;
329 // march end_index forward until next path component
330 while (true) {
331 end_index += 1;
332 if (end_index == resolved_path.len or path.isSep(resolved_path[end_index])) break;
333 }
334 }
279/// Same as `makeDirAbsolute` except the parameter is a null-terminated WTF-16 encoded string.
280pub fn makeDirAbsoluteW(absolute_path_w: [*:0]const u16) !void {
281 assert(path.isAbsoluteWindowsW(absolute_path_w));
282 const handle = try os.windows.CreateDirectoryW(null, absolute_path_w, null);
283 os.windows.CloseHandle(handle);
335284}
336285
337286/// Returns `error.DirNotEmpty` if the directory is not empty.
......@@ -709,17 +658,19 @@ pub const Dir = struct {
709658 /// Call `File.close` to release the resource.
710659 /// Asserts that the path parameter has no null bytes.
711660 pub fn openFile(self: Dir, sub_path: []const u8, flags: File.OpenFlags) File.OpenError!File {
712 if (std.debug.runtime_safety) for (sub_path) |byte| assert(byte != 0);
713661 if (builtin.os.tag == .windows) {
714662 const path_w = try os.windows.sliceToPrefixedFileW(sub_path);
715663 return self.openFileW(&path_w, flags);
716664 }
717665 const path_c = try os.toPosixPath(sub_path);
718 return self.openFileC(&path_c, flags);
666 return self.openFileZ(&path_c, flags);
719667 }
720668
669 /// Deprecated; use `openFileZ`.
670 pub const openFileC = openFileZ;
671
721672 /// Same as `openFile` but the path parameter is null-terminated.
722 pub fn openFileC(self: Dir, sub_path: [*:0]const u8, flags: File.OpenFlags) File.OpenError!File {
673 pub fn openFileZ(self: Dir, sub_path: [*:0]const u8, flags: File.OpenFlags) File.OpenError!File {
723674 if (builtin.os.tag == .windows) {
724675 const path_w = try os.windows.cStrToPrefixedFileW(sub_path);
725676 return self.openFileW(&path_w, flags);
......@@ -759,7 +710,6 @@ pub const Dir = struct {
759710 /// Call `File.close` on the result when done.
760711 /// Asserts that the path parameter has no null bytes.
761712 pub fn createFile(self: Dir, sub_path: []const u8, flags: File.CreateFlags) File.OpenError!File {
762 if (std.debug.runtime_safety) for (sub_path) |byte| assert(byte != 0);
763713 if (builtin.os.tag == .windows) {
764714 const path_w = try os.windows.sliceToPrefixedFileW(sub_path);
765715 return self.createFileW(&path_w, flags);
......@@ -806,9 +756,9 @@ pub const Dir = struct {
806756 return self.openFile(sub_path, .{});
807757 }
808758
809 /// Deprecated; call `openFileC` directly.
759 /// Deprecated; call `openFileZ` directly.
810760 pub fn openReadC(self: Dir, sub_path: [*:0]const u8) File.OpenError!File {
811 return self.openFileC(sub_path, .{});
761 return self.openFileZ(sub_path, .{});
812762 }
813763
814764 /// Deprecated; call `openFileW` directly.
......@@ -882,6 +832,64 @@ pub const Dir = struct {
882832 }
883833 }
884834
835 pub fn makeDir(self: Dir, sub_path: []const u8) !void {
836 try os.mkdirat(self.fd, sub_path, default_new_dir_mode);
837 }
838
839 pub fn makeDirZ(self: Dir, sub_path: [*:0]const u8) !void {
840 try os.mkdiratC(self.fd, sub_path, default_new_dir_mode);
841 }
842
843 pub fn makeDirW(self: Dir, sub_path: [*:0]const u16) !void {
844 const handle = try os.windows.CreateDirectoryW(self.fd, sub_path, null);
845 os.windows.CloseHandle(handle);
846 }
847
848 /// Calls makeDir recursively to make an entire path. Returns success if the path
849 /// already exists and is a directory.
850 /// This function is not atomic, and if it returns an error, the file system may
851 /// have been modified regardless.
852 pub fn makePath(self: Dir, sub_path: []const u8) !void {
853 var end_index: usize = sub_path.len;
854 while (true) {
855 self.makeDir(sub_path[0..end_index]) catch |err| switch (err) {
856 error.PathAlreadyExists => {
857 // TODO stat the file and return an error if it's not a directory
858 // this is important because otherwise a dangling symlink
859 // could cause an infinite loop
860 if (end_index == sub_path.len) return;
861 },
862 error.FileNotFound => {
863 if (end_index == 0) return err;
864 // march end_index backward until next path component
865 while (true) {
866 end_index -= 1;
867 if (path.isSep(sub_path[end_index])) break;
868 }
869 continue;
870 },
871 else => return err,
872 };
873 if (end_index == sub_path.len) return;
874 // march end_index forward until next path component
875 while (true) {
876 end_index += 1;
877 if (end_index == sub_path.len or path.isSep(sub_path[end_index])) break;
878 }
879 }
880 }
881
882 /// Changes the current working directory to the open directory handle.
883 /// This modifies global state and can have surprising effects in multi-
884 /// threaded applications. Most applications and especially libraries should
885 /// not call this function as a general rule, however it can have use cases
886 /// in, for example, implementing a shell, or child process execution.
887 /// Not all targets support this. For example, WASI does not have the concept
888 /// of a current working directory.
889 pub fn setAsCwd(self: Dir) !void {
890 try os.fchdir(self.fd);
891 }
892
885893 /// Deprecated; call `openDirList` directly.
886894 pub fn openDir(self: Dir, sub_path: []const u8) OpenError!Dir {
887895 return self.openDirList(sub_path);
......@@ -900,7 +908,6 @@ pub const Dir = struct {
900908 ///
901909 /// Asserts that the path parameter has no null bytes.
902910 pub fn openDirTraverse(self: Dir, sub_path: []const u8) OpenError!Dir {
903 if (std.debug.runtime_safety) for (sub_path) |byte| assert(byte != 0);
904911 if (builtin.os.tag == .windows) {
905912 const sub_path_w = try os.windows.sliceToPrefixedFileW(sub_path);
906913 return self.openDirTraverseW(&sub_path_w);
......@@ -918,7 +925,6 @@ pub const Dir = struct {
918925 ///
919926 /// Asserts that the path parameter has no null bytes.
920927 pub fn openDirList(self: Dir, sub_path: []const u8) OpenError!Dir {
921 if (std.debug.runtime_safety) for (sub_path) |byte| assert(byte != 0);
922928 if (builtin.os.tag == .windows) {
923929 const sub_path_w = try os.windows.sliceToPrefixedFileW(sub_path);
924930 return self.openDirListW(&sub_path_w);
......@@ -1082,7 +1088,6 @@ pub const Dir = struct {
10821088 /// To delete a directory recursively, see `deleteTree`.
10831089 /// Asserts that the path parameter has no null bytes.
10841090 pub fn deleteDir(self: Dir, sub_path: []const u8) DeleteDirError!void {
1085 if (std.debug.runtime_safety) for (sub_path) |byte| assert(byte != 0);
10861091 if (builtin.os.tag == .windows) {
10871092 const sub_path_w = try os.windows.sliceToPrefixedFileW(sub_path);
10881093 return self.deleteDirW(&sub_path_w);
......@@ -1112,7 +1117,6 @@ pub const Dir = struct {
11121117 /// The return value is a slice of `buffer`, from index `0`.
11131118 /// Asserts that the path parameter has no null bytes.
11141119 pub fn readLink(self: Dir, sub_path: []const u8, buffer: *[MAX_PATH_BYTES]u8) ![]u8 {
1115 if (std.debug.runtime_safety) for (sub_path) |byte| assert(byte != 0);
11161120 const sub_path_c = try os.toPosixPath(sub_path);
11171121 return self.readLinkC(&sub_path_c, buffer);
11181122 }
......@@ -1329,7 +1333,7 @@ pub const Dir = struct {
13291333 pub fn writeFile(self: Dir, sub_path: []const u8, data: []const u8) !void {
13301334 var file = try self.createFile(sub_path, .{});
13311335 defer file.close();
1332 try file.write(data);
1336 try file.writeAll(data);
13331337 }
13341338
13351339 pub const AccessError = os.AccessError;
......@@ -1402,7 +1406,7 @@ pub fn openFileAbsolute(absolute_path: []const u8, flags: File.OpenFlags) File.O
14021406/// Same as `openFileAbsolute` but the path parameter is null-terminated.
14031407pub fn openFileAbsoluteC(absolute_path_c: [*:0]const u8, flags: File.OpenFlags) File.OpenError!File {
14041408 assert(path.isAbsoluteC(absolute_path_c));
1405 return cwd().openFileC(absolute_path_c, flags);
1409 return cwd().openFileZ(absolute_path_c, flags);
14061410}
14071411
14081412/// Same as `openFileAbsolute` but the path parameter is WTF-16 encoded.
lib/std/fs/file.zig+214-17
......@@ -228,63 +228,260 @@ pub const File = struct {
228228 }
229229
230230 pub const ReadError = os.ReadError;
231 pub const PReadError = os.PReadError;
231232
232233 pub fn read(self: File, buffer: []u8) ReadError!usize {
233234 if (need_async_thread and self.io_mode == .blocking and !self.async_block_allowed) {
234235 return std.event.Loop.instance.?.read(self.handle, buffer);
236 } else {
237 return os.read(self.handle, buffer);
238 }
239 }
240
241 pub fn readAll(self: File, buffer: []u8) ReadError!void {
242 var index: usize = 0;
243 while (index < buffer.len) {
244 index += try self.read(buffer[index..]);
235245 }
236 return os.read(self.handle, buffer);
237246 }
238247
239 pub fn pread(self: File, buffer: []u8, offset: u64) ReadError!usize {
248 pub fn pread(self: File, buffer: []u8, offset: u64) PReadError!usize {
240249 if (need_async_thread and self.io_mode == .blocking and !self.async_block_allowed) {
241 return std.event.Loop.instance.?.pread(self.handle, buffer);
250 return std.event.Loop.instance.?.pread(self.handle, buffer, offset);
251 } else {
252 return os.pread(self.handle, buffer, offset);
253 }
254 }
255
256 pub fn preadAll(self: File, buffer: []u8, offset: u64) PReadError!void {
257 var index: usize = 0;
258 while (index < buffer.len) {
259 index += try self.pread(buffer[index..], offset + index);
242260 }
243 return os.pread(self.handle, buffer, offset);
244261 }
245262
246263 pub fn readv(self: File, iovecs: []const os.iovec) ReadError!usize {
247264 if (need_async_thread and self.io_mode == .blocking and !self.async_block_allowed) {
248265 return std.event.Loop.instance.?.readv(self.handle, iovecs);
266 } else {
267 return os.readv(self.handle, iovecs);
249268 }
250 return os.readv(self.handle, iovecs);
251269 }
252270
253 pub fn preadv(self: File, iovecs: []const os.iovec, offset: u64) ReadError!usize {
271 /// The `iovecs` parameter is mutable because this function needs to mutate the fields in
272 /// order to handle partial reads from the underlying OS layer.
273 pub fn readvAll(self: File, iovecs: []os.iovec) ReadError!void {
274 if (iovecs.len == 0) return;
275
276 var i: usize = 0;
277 while (true) {
278 var amt = try self.readv(iovecs[i..]);
279 while (amt >= iovecs[i].iov_len) {
280 amt -= iovecs[i].iov_len;
281 i += 1;
282 if (i >= iovecs.len) return;
283 }
284 iovecs[i].iov_base += amt;
285 iovecs[i].iov_len -= amt;
286 }
287 }
288
289 pub fn preadv(self: File, iovecs: []const os.iovec, offset: u64) PReadError!usize {
254290 if (need_async_thread and self.io_mode == .blocking and !self.async_block_allowed) {
255291 return std.event.Loop.instance.?.preadv(self.handle, iovecs, offset);
292 } else {
293 return os.preadv(self.handle, iovecs, offset);
294 }
295 }
296
297 /// The `iovecs` parameter is mutable because this function needs to mutate the fields in
298 /// order to handle partial reads from the underlying OS layer.
299 pub fn preadvAll(self: File, iovecs: []const os.iovec, offset: u64) PReadError!void {
300 if (iovecs.len == 0) return;
301
302 var i: usize = 0;
303 var off: usize = 0;
304 while (true) {
305 var amt = try self.preadv(iovecs[i..], offset + off);
306 off += amt;
307 while (amt >= iovecs[i].iov_len) {
308 amt -= iovecs[i].iov_len;
309 i += 1;
310 if (i >= iovecs.len) return;
311 }
312 iovecs[i].iov_base += amt;
313 iovecs[i].iov_len -= amt;
256314 }
257 return os.preadv(self.handle, iovecs, offset);
258315 }
259316
260317 pub const WriteError = os.WriteError;
318 pub const PWriteError = os.PWriteError;
261319
262 pub fn write(self: File, bytes: []const u8) WriteError!void {
320 pub fn write(self: File, bytes: []const u8) WriteError!usize {
263321 if (need_async_thread and self.io_mode == .blocking and !self.async_block_allowed) {
264322 return std.event.Loop.instance.?.write(self.handle, bytes);
323 } else {
324 return os.write(self.handle, bytes);
325 }
326 }
327
328 pub fn writeAll(self: File, bytes: []const u8) WriteError!void {
329 var index: usize = 0;
330 while (index < bytes.len) {
331 index += try self.write(bytes[index..]);
265332 }
266 return os.write(self.handle, bytes);
267333 }
268334
269 pub fn pwrite(self: File, bytes: []const u8, offset: u64) WriteError!void {
335 pub fn pwrite(self: File, bytes: []const u8, offset: u64) PWriteError!usize {
270336 if (need_async_thread and self.io_mode == .blocking and !self.async_block_allowed) {
271337 return std.event.Loop.instance.?.pwrite(self.handle, bytes, offset);
338 } else {
339 return os.pwrite(self.handle, bytes, offset);
272340 }
273 return os.pwrite(self.handle, bytes, offset);
274341 }
275342
276 pub fn writev(self: File, iovecs: []const os.iovec_const) WriteError!void {
343 pub fn pwriteAll(self: File, bytes: []const u8, offset: u64) PWriteError!void {
344 var index: usize = 0;
345 while (index < bytes.len) {
346 index += try self.pwrite(bytes[index..], offset + index);
347 }
348 }
349
350 pub fn writev(self: File, iovecs: []const os.iovec_const) WriteError!usize {
277351 if (need_async_thread and self.io_mode == .blocking and !self.async_block_allowed) {
278352 return std.event.Loop.instance.?.writev(self.handle, iovecs);
353 } else {
354 return os.writev(self.handle, iovecs);
355 }
356 }
357
358 /// The `iovecs` parameter is mutable because this function needs to mutate the fields in
359 /// order to handle partial writes from the underlying OS layer.
360 pub fn writevAll(self: File, iovecs: []os.iovec_const) WriteError!void {
361 if (iovecs.len == 0) return;
362
363 var i: usize = 0;
364 while (true) {
365 var amt = try self.writev(iovecs[i..]);
366 while (amt >= iovecs[i].iov_len) {
367 amt -= iovecs[i].iov_len;
368 i += 1;
369 if (i >= iovecs.len) return;
370 }
371 iovecs[i].iov_base += amt;
372 iovecs[i].iov_len -= amt;
279373 }
280 return os.writev(self.handle, iovecs);
281374 }
282375
283 pub fn pwritev(self: File, iovecs: []const os.iovec_const, offset: usize) WriteError!void {
376 pub fn pwritev(self: File, iovecs: []os.iovec_const, offset: usize) PWriteError!usize {
284377 if (need_async_thread and self.io_mode == .blocking and !self.async_block_allowed) {
285 return std.event.Loop.instance.?.pwritev(self.handle, iovecs);
378 return std.event.Loop.instance.?.pwritev(self.handle, iovecs, offset);
379 } else {
380 return os.pwritev(self.handle, iovecs, offset);
381 }
382 }
383
384 /// The `iovecs` parameter is mutable because this function needs to mutate the fields in
385 /// order to handle partial writes from the underlying OS layer.
386 pub fn pwritevAll(self: File, iovecs: []os.iovec_const, offset: usize) PWriteError!void {
387 if (iovecs.len == 0) return;
388
389 var i: usize = 0;
390 var off: usize = 0;
391 while (true) {
392 var amt = try self.pwritev(iovecs[i..], offset + off);
393 off += amt;
394 while (amt >= iovecs[i].iov_len) {
395 amt -= iovecs[i].iov_len;
396 i += 1;
397 if (i >= iovecs.len) return;
398 }
399 iovecs[i].iov_base += amt;
400 iovecs[i].iov_len -= amt;
401 }
402 }
403
404 pub const WriteFileOptions = struct {
405 in_offset: u64 = 0,
406
407 /// `null` means the entire file. `0` means no bytes from the file.
408 /// When this is `null`, trailers must be sent in a separate writev() call
409 /// due to a flaw in the BSD sendfile API. Other operating systems, such as
410 /// Linux, already do this anyway due to API limitations.
411 /// If the size of the source file is known, passing the size here will save one syscall.
412 in_len: ?u64 = null,
413
414 headers_and_trailers: []os.iovec_const = &[0]os.iovec_const{},
415
416 /// The trailer count is inferred from `headers_and_trailers.len - header_count`
417 header_count: usize = 0,
418 };
419
420 pub const WriteFileError = os.SendFileError;
421
422 /// TODO integrate with async I/O
423 pub fn writeFileAll(self: File, in_file: File, args: WriteFileOptions) WriteFileError!void {
424 const count = blk: {
425 if (args.in_len) |l| {
426 if (l == 0) {
427 return self.writevAll(args.headers_and_trailers);
428 } else {
429 break :blk l;
430 }
431 } else {
432 break :blk 0;
433 }
434 };
435 const headers = args.headers_and_trailers[0..args.header_count];
436 const trailers = args.headers_and_trailers[args.header_count..];
437 const zero_iovec = &[0]os.iovec_const{};
438 // When reading the whole file, we cannot put the trailers in the sendfile() syscall,
439 // because we have no way to determine whether a partial write is past the end of the file or not.
440 const trls = if (count == 0) zero_iovec else trailers;
441 const offset = args.in_offset;
442 const out_fd = self.handle;
443 const in_fd = in_file.handle;
444 const flags = 0;
445 var amt: usize = 0;
446 hdrs: {
447 var i: usize = 0;
448 while (i < headers.len) {
449 amt = try os.sendfile(out_fd, in_fd, offset, count, headers[i..], trls, flags);
450 while (amt >= headers[i].iov_len) {
451 amt -= headers[i].iov_len;
452 i += 1;
453 if (i >= headers.len) break :hdrs;
454 }
455 headers[i].iov_base += amt;
456 headers[i].iov_len -= amt;
457 }
458 }
459 if (count == 0) {
460 var off: u64 = amt;
461 while (true) {
462 amt = try os.sendfile(out_fd, in_fd, offset + off, 0, zero_iovec, zero_iovec, flags);
463 if (amt == 0) break;
464 off += amt;
465 }
466 } else {
467 var off: u64 = amt;
468 while (off < count) {
469 amt = try os.sendfile(out_fd, in_fd, offset + off, count - off, zero_iovec, trailers, flags);
470 off += amt;
471 }
472 amt = @intCast(usize, off - count);
473 }
474 var i: usize = 0;
475 while (i < trailers.len) {
476 while (amt >= headers[i].iov_len) {
477 amt -= trailers[i].iov_len;
478 i += 1;
479 if (i >= trailers.len) return;
480 }
481 trailers[i].iov_base += amt;
482 trailers[i].iov_len -= amt;
483 amt = try os.writev(self.handle, trailers[i..]);
286484 }
287 return os.pwritev(self.handle, iovecs);
288485 }
289486
290487 pub fn inStream(file: File) InStream {
......@@ -335,7 +532,7 @@ pub const File = struct {
335532 pub const Error = WriteError;
336533 pub const Stream = io.OutStream(Error);
337534
338 fn writeFn(out_stream: *Stream, bytes: []const u8) Error!void {
535 fn writeFn(out_stream: *Stream, bytes: []const u8) Error!usize {
339536 const self = @fieldParentPtr(OutStream, "stream", out_stream);
340537 return self.file.write(bytes);
341538 }
lib/std/fs/watch.zig+2-3
......@@ -618,11 +618,10 @@ test "write a file, watch it, write it again" {
618618 // TODO re-enable this test
619619 if (true) return error.SkipZigTest;
620620
621 const allocator = std.heap.page_allocator;
622
623 try os.makePath(allocator, test_tmp_dir);
621 try fs.cwd().makePath(test_tmp_dir);
624622 defer os.deleteTree(test_tmp_dir) catch {};
625623
624 const allocator = std.heap.page_allocator;
626625 return testFsWatch(&allocator);
627626}
628627
lib/std/io.zig+25-17
......@@ -437,10 +437,11 @@ pub fn BitInStream(endian: builtin.Endian, comptime Error: type) type {
437437 };
438438}
439439
440/// This is a simple OutStream that writes to a fixed buffer, and returns an error
441/// when it runs out of space.
440/// This is a simple OutStream that writes to a fixed buffer. If the returned number
441/// of bytes written is less than requested, the buffer is full.
442/// Returns error.OutOfMemory when no bytes would be written.
442443pub const SliceOutStream = struct {
443 pub const Error = error{OutOfSpace};
444 pub const Error = error{OutOfMemory};
444445 pub const Stream = OutStream(Error);
445446
446447 stream: Stream,
......@@ -464,9 +465,11 @@ pub const SliceOutStream = struct {
464465 self.pos = 0;
465466 }
466467
467 fn writeFn(out_stream: *Stream, bytes: []const u8) Error!void {
468 fn writeFn(out_stream: *Stream, bytes: []const u8) Error!usize {
468469 const self = @fieldParentPtr(SliceOutStream, "stream", out_stream);
469470
471 if (bytes.len == 0) return 0;
472
470473 assert(self.pos <= self.slice.len);
471474
472475 const n = if (self.pos + bytes.len <= self.slice.len)
......@@ -477,9 +480,9 @@ pub const SliceOutStream = struct {
477480 std.mem.copy(u8, self.slice[self.pos .. self.pos + n], bytes[0..n]);
478481 self.pos += n;
479482
480 if (n < bytes.len) {
481 return Error.OutOfSpace;
482 }
483 if (n == 0) return error.OutOfMemory;
484
485 return n;
483486 }
484487};
485488
......@@ -508,7 +511,9 @@ pub const NullOutStream = struct {
508511 };
509512 }
510513
511 fn writeFn(out_stream: *Stream, bytes: []const u8) Error!void {}
514 fn writeFn(out_stream: *Stream, bytes: []const u8) Error!usize {
515 return bytes.len;
516 }
512517};
513518
514519test "io.NullOutStream" {
......@@ -536,10 +541,11 @@ pub fn CountingOutStream(comptime OutStreamError: type) type {
536541 };
537542 }
538543
539 fn writeFn(out_stream: *Stream, bytes: []const u8) OutStreamError!void {
544 fn writeFn(out_stream: *Stream, bytes: []const u8) OutStreamError!usize {
540545 const self = @fieldParentPtr(Self, "stream", out_stream);
541546 try self.child_stream.write(bytes);
542547 self.bytes_written += bytes.len;
548 return bytes.len;
543549 }
544550 };
545551}
......@@ -588,13 +594,14 @@ pub fn BufferedOutStreamCustom(comptime buffer_size: usize, comptime OutStreamEr
588594 }
589595 }
590596
591 fn writeFn(out_stream: *Stream, bytes: []const u8) Error!void {
597 fn writeFn(out_stream: *Stream, bytes: []const u8) Error!usize {
592598 const self = @fieldParentPtr(Self, "stream", out_stream);
593599 if (bytes.len >= self.fifo.writableLength()) {
594600 try self.flush();
595 return self.unbuffered_out_stream.write(bytes);
601 return self.unbuffered_out_stream.writeOnce(bytes);
596602 }
597603 self.fifo.writeAssumeCapacity(bytes);
604 return bytes.len;
598605 }
599606 };
600607}
......@@ -614,9 +621,10 @@ pub const BufferOutStream = struct {
614621 };
615622 }
616623
617 fn writeFn(out_stream: *Stream, bytes: []const u8) !void {
624 fn writeFn(out_stream: *Stream, bytes: []const u8) !usize {
618625 const self = @fieldParentPtr(BufferOutStream, "stream", out_stream);
619 return self.buffer.append(bytes);
626 try self.buffer.append(bytes);
627 return bytes.len;
620628 }
621629};
622630
......@@ -734,17 +742,17 @@ pub fn BitOutStream(endian: builtin.Endian, comptime Error: type) type {
734742 self.bit_count = 0;
735743 }
736744
737 pub fn write(self_stream: *Stream, buffer: []const u8) Error!void {
745 pub fn write(self_stream: *Stream, buffer: []const u8) Error!usize {
738746 var self = @fieldParentPtr(Self, "stream", self_stream);
739747
740 //@NOTE: I'm not sure this is a good idea, maybe flushBits should be forced
748 // TODO: I'm not sure this is a good idea, maybe flushBits should be forced
741749 if (self.bit_count > 0) {
742750 for (buffer) |b, i|
743751 try self.writeBits(b, u8_bit_count);
744 return;
752 return buffer.len;
745753 }
746754
747 return self.out_stream.write(buffer);
755 return self.out_stream.writeOnce(buffer);
748756 }
749757 };
750758}
lib/std/io/c_out_stream.zig+2-2
......@@ -20,10 +20,10 @@ pub const COutStream = struct {
2020 };
2121 }
2222
23 fn writeFn(out_stream: *Stream, bytes: []const u8) Error!void {
23 fn writeFn(out_stream: *Stream, bytes: []const u8) Error!usize {
2424 const self = @fieldParentPtr(COutStream, "stream", out_stream);
2525 const amt_written = std.c.fwrite(bytes.ptr, 1, bytes.len, self.c_file);
26 if (amt_written == bytes.len) return;
26 if (amt_written >= 0) return amt_written;
2727 switch (std.c._errno().*) {
2828 0 => unreachable,
2929 os.EINVAL => unreachable,
lib/std/io/out_stream.zig+10-3
......@@ -14,13 +14,13 @@ pub fn OutStream(comptime WriteError: type) type {
1414 const Self = @This();
1515 pub const Error = WriteError;
1616 pub const WriteFn = if (std.io.is_async)
17 async fn (self: *Self, bytes: []const u8) Error!void
17 async fn (self: *Self, bytes: []const u8) Error!usize
1818 else
19 fn (self: *Self, bytes: []const u8) Error!void;
19 fn (self: *Self, bytes: []const u8) Error!usize;
2020
2121 writeFn: WriteFn,
2222
23 pub fn write(self: *Self, bytes: []const u8) Error!void {
23 pub fn writeOnce(self: *Self, bytes: []const u8) Error!usize {
2424 if (std.io.is_async) {
2525 // Let's not be writing 0xaa in safe modes for upwards of 4 MiB for every stream write.
2626 @setRuntimeSafety(false);
......@@ -31,6 +31,13 @@ pub fn OutStream(comptime WriteError: type) type {
3131 }
3232 }
3333
34 pub fn write(self: *Self, bytes: []const u8) Error!void {
35 var index: usize = 0;
36 while (index != bytes.len) {
37 index += try self.writeOnce(bytes[index..]);
38 }
39 }
40
3441 pub fn print(self: *Self, comptime format: []const u8, args: var) Error!void {
3542 return std.fmt.format(self, Error, write, format, args);
3643 }
lib/std/io/test.zig+3-3
......@@ -134,13 +134,13 @@ test "SliceOutStream" {
134134 try ss.stream.write("world");
135135 expect(mem.eql(u8, ss.getWritten(), "Helloworld"));
136136
137 expectError(error.OutOfSpace, ss.stream.write("!"));
137 expectError(error.OutOfMemory, ss.stream.write("!"));
138138 expect(mem.eql(u8, ss.getWritten(), "Helloworld"));
139139
140140 ss.reset();
141141 expect(ss.getWritten().len == 0);
142142
143 expectError(error.OutOfSpace, ss.stream.write("Hello world!"));
143 expectError(error.OutOfMemory, ss.stream.write("Hello world!"));
144144 expect(mem.eql(u8, ss.getWritten(), "Hello worl"));
145145}
146146
......@@ -613,7 +613,7 @@ test "File seek ops" {
613613 fs.cwd().deleteFile(tmp_file_name) catch {};
614614 }
615615
616 try file.write(&([_]u8{0x55} ** 8192));
616 try file.writeAll(&([_]u8{0x55} ** 8192));
617617
618618 // Seek to the end
619619 try file.seekFromEnd(0);
lib/std/os.zig+571-183
......@@ -298,6 +298,11 @@ pub const ReadError = error{
298298/// buf.len. If 0 bytes were read, that means EOF.
299299/// If the application has a global event loop enabled, EAGAIN is handled
300300/// via the event loop. Otherwise EAGAIN results in error.WouldBlock.
301///
302/// Linux has a limit on how many bytes may be transferred in one `read` call, which is `0x7ffff000`
303/// on both 64-bit and 32-bit systems. This is due to using a signed C int as the return value, as
304/// well as stuffing the errno codes into the last `4096` values. This is noted on the `read` man page.
305/// For POSIX the limit is `math.maxInt(isize)`.
301306pub fn read(fd: fd_t, buf: []u8) ReadError!usize {
302307 if (builtin.os.tag == .windows) {
303308 return windows.ReadFile(fd, buf, null);
......@@ -316,8 +321,15 @@ pub fn read(fd: fd_t, buf: []u8) ReadError!usize {
316321 }
317322 }
318323
324 // Prevents EINVAL.
325 const max_count = switch (std.Target.current.os.tag) {
326 .linux => 0x7ffff000,
327 else => math.maxInt(isize),
328 };
329 const adjusted_len = math.min(max_count, buf.len);
330
319331 while (true) {
320 const rc = system.read(fd, buf.ptr, buf.len);
332 const rc = system.read(fd, buf.ptr, adjusted_len);
321333 switch (errno(rc)) {
322334 0 => return @intCast(usize, rc),
323335 EINTR => continue,
......@@ -352,32 +364,18 @@ pub fn read(fd: fd_t, buf: []u8) ReadError!usize {
352364/// * Windows
353365/// On these systems, the read races with concurrent writes to the same file descriptor.
354366pub fn readv(fd: fd_t, iov: []const iovec) ReadError!usize {
355 if (builtin.os.tag == .windows) {
356 // TODO batch these into parallel requests
357 var off: usize = 0;
358 var iov_i: usize = 0;
359 var inner_off: usize = 0;
360 while (true) {
361 const v = iov[iov_i];
362 const amt_read = try read(fd, v.iov_base[inner_off .. v.iov_len - inner_off]);
363 off += amt_read;
364 inner_off += amt_read;
365 if (inner_off == v.len) {
366 iov_i += 1;
367 inner_off = 0;
368 if (iov_i == iov.len) {
369 return off;
370 }
371 }
372 if (amt_read == 0) return off; // EOF
373 } else unreachable; // TODO https://github.com/ziglang/zig/issues/707
367 if (std.Target.current.os.tag == .windows) {
368 // TODO does Windows have a way to read an io vector?
369 if (iov.len == 0) return @as(usize, 0);
370 const first = iov[0];
371 return read(fd, first.iov_base[0..first.iov_len]);
374372 }
375373
376374 while (true) {
377375 // TODO handle the case when iov_len is too large and get rid of this @intCast
378 const rc = system.readv(fd, iov.ptr, @intCast(u32, iov.len));
376 const rc = system.readv(fd, iov.ptr, iov_count);
379377 switch (errno(rc)) {
380 0 => return @bitCast(usize, rc),
378 0 => return @intCast(usize, rc),
381379 EINTR => continue,
382380 EINVAL => unreachable,
383381 EFAULT => unreachable,
......@@ -397,6 +395,8 @@ pub fn readv(fd: fd_t, iov: []const iovec) ReadError!usize {
397395 }
398396}
399397
398pub const PReadError = ReadError || error{Unseekable};
399
400400/// Number of bytes read is returned. Upon reading end-of-file, zero is returned.
401401///
402402/// Retries when interrupted by a signal.
......@@ -405,7 +405,7 @@ pub fn readv(fd: fd_t, iov: []const iovec) ReadError!usize {
405405/// via the event loop. Otherwise EAGAIN results in `error.WouldBlock`.
406406/// On Windows, if the application has a global event loop enabled, I/O Completion Ports are
407407/// used to perform the I/O. `error.WouldBlock` is not possible on Windows.
408pub fn pread(fd: fd_t, buf: []u8, offset: u64) ReadError!usize {
408pub fn pread(fd: fd_t, buf: []u8, offset: u64) PReadError!usize {
409409 if (builtin.os.tag == .windows) {
410410 return windows.ReadFile(fd, buf, offset);
411411 }
......@@ -429,6 +429,9 @@ pub fn pread(fd: fd_t, buf: []u8, offset: u64) ReadError!usize {
429429 ENOBUFS => return error.SystemResources,
430430 ENOMEM => return error.SystemResources,
431431 ECONNRESET => return error.ConnectionResetByPeer,
432 ENXIO => return error.Unseekable,
433 ESPIPE => return error.Unseekable,
434 EOVERFLOW => return error.Unseekable,
432435 else => |err| return unexpectedErrno(err),
433436 }
434437 }
......@@ -448,75 +451,23 @@ pub fn pread(fd: fd_t, buf: []u8, offset: u64) ReadError!usize {
448451/// * Darwin
449452/// * Windows
450453/// On these systems, the read races with concurrent writes to the same file descriptor.
451pub fn preadv(fd: fd_t, iov: []const iovec, offset: u64) ReadError!usize {
452 if (comptime std.Target.current.isDarwin()) {
453 // Darwin does not have preadv but it does have pread.
454 var off: usize = 0;
455 var iov_i: usize = 0;
456 var inner_off: usize = 0;
457 while (true) {
458 const v = iov[iov_i];
459 const rc = darwin.pread(fd, v.iov_base + inner_off, v.iov_len - inner_off, offset + off);
460 const err = darwin.getErrno(rc);
461 switch (err) {
462 0 => {
463 const amt_read = @bitCast(usize, rc);
464 off += amt_read;
465 inner_off += amt_read;
466 if (inner_off == v.iov_len) {
467 iov_i += 1;
468 inner_off = 0;
469 if (iov_i == iov.len) {
470 return off;
471 }
472 }
473 if (rc == 0) return off; // EOF
474 continue;
475 },
476 EINTR => continue,
477 EINVAL => unreachable,
478 EFAULT => unreachable,
479 ESPIPE => unreachable, // fd is not seekable
480 EAGAIN => if (std.event.Loop.instance) |loop| {
481 loop.waitUntilFdReadable(fd);
482 continue;
483 } else {
484 return error.WouldBlock;
485 },
486 EBADF => unreachable, // always a race condition
487 EIO => return error.InputOutput,
488 EISDIR => return error.IsDir,
489 ENOBUFS => return error.SystemResources,
490 ENOMEM => return error.SystemResources,
491 else => return unexpectedErrno(err),
492 }
493 }
454pub fn preadv(fd: fd_t, iov: []const iovec, offset: u64) PReadError!usize {
455 const have_pread_but_not_preadv = switch (std.Target.current.os.tag) {
456 .windows, .macosx, .ios, .watchos, .tvos => true,
457 else => false,
458 };
459 if (have_pread_but_not_preadv) {
460 // We could loop here; but proper usage of `preadv` must handle partial reads anyway.
461 // So we simply read into the first vector only.
462 if (iov.len == 0) return @as(usize, 0);
463 const first = iov[0];
464 return pread(fd, first.iov_base[0..first.iov_len], offset);
494465 }
495466
496 if (builtin.os.tag == .windows) {
497 // TODO batch these into parallel requests
498 var off: usize = 0;
499 var iov_i: usize = 0;
500 var inner_off: usize = 0;
501 while (true) {
502 const v = iov[iov_i];
503 const amt_read = try pread(fd, v.iov_base[inner_off .. v.iov_len - inner_off], offset + off);
504 off += amt_read;
505 inner_off += amt_read;
506 if (inner_off == v.len) {
507 iov_i += 1;
508 inner_off = 0;
509 if (iov_i == iov.len) {
510 return off;
511 }
512 }
513 if (amt_read == 0) return off; // EOF
514 } else unreachable; // TODO https://github.com/ziglang/zig/issues/707
515 }
467 const iov_count = math.cast(u31, iov.len) catch math.maxInt(u31);
516468
517469 while (true) {
518 // TODO handle the case when iov_len is too large and get rid of this @intCast
519 const rc = system.preadv(fd, iov.ptr, @intCast(u32, iov.len), offset);
470 const rc = system.preadv(fd, iov.ptr, iov_count, offset);
520471 switch (errno(rc)) {
521472 0 => return @bitCast(usize, rc),
522473 EINTR => continue,
......@@ -533,6 +484,9 @@ pub fn preadv(fd: fd_t, iov: []const iovec, offset: u64) ReadError!usize {
533484 EISDIR => return error.IsDir,
534485 ENOBUFS => return error.SystemResources,
535486 ENOMEM => return error.SystemResources,
487 ENXIO => return error.Unseekable,
488 ESPIPE => return error.Unseekable,
489 EOVERFLOW => return error.Unseekable,
536490 else => |err| return unexpectedErrno(err),
537491 }
538492 }
......@@ -553,10 +507,28 @@ pub const WriteError = error{
553507 WouldBlock,
554508} || UnexpectedError;
555509
556/// Write to a file descriptor. Keeps trying if it gets interrupted.
557/// If the application has a global event loop enabled, EAGAIN is handled
558/// via the event loop. Otherwise EAGAIN results in error.WouldBlock.
559pub fn write(fd: fd_t, bytes: []const u8) WriteError!void {
510/// Write to a file descriptor.
511/// Retries when interrupted by a signal.
512/// Returns the number of bytes written. If nonzero bytes were supplied, this will be nonzero.
513///
514/// Note that a successful write() may transfer fewer than count bytes. Such partial writes can
515/// occur for various reasons; for example, because there was insufficient space on the disk
516/// device to write all of the requested bytes, or because a blocked write() to a socket, pipe, or
517/// similar was interrupted by a signal handler after it had transferred some, but before it had
518/// transferred all of the requested bytes. In the event of a partial write, the caller can make
519/// another write() call to transfer the remaining bytes. The subsequent call will either
520/// transfer further bytes or may result in an error (e.g., if the disk is now full).
521///
522/// For POSIX systems, if the application has a global event loop enabled, EAGAIN is handled
523/// via the event loop. Otherwise EAGAIN results in `error.WouldBlock`.
524/// On Windows, if the application has a global event loop enabled, I/O Completion Ports are
525/// used to perform the I/O. `error.WouldBlock` is not possible on Windows.
526///
527/// Linux has a limit on how many bytes may be transferred in one `write` call, which is `0x7ffff000`
528/// on both 64-bit and 32-bit systems. This is due to using a signed C int as the return value, as
529/// well as stuffing the errno codes into the last `4096` values. This is noted on the `write` man page.
530/// The corresponding POSIX limit is `math.maxInt(isize)`.
531pub fn write(fd: fd_t, bytes: []const u8) WriteError!usize {
560532 if (builtin.os.tag == .windows) {
561533 return windows.WriteFile(fd, bytes, null);
562534 }
......@@ -568,26 +540,21 @@ pub fn write(fd: fd_t, bytes: []const u8) WriteError!void {
568540 }};
569541 var nwritten: usize = undefined;
570542 switch (wasi.fd_write(fd, &ciovs, ciovs.len, &nwritten)) {
571 0 => return,
543 0 => return nwritten,
572544 else => |err| return unexpectedErrno(err),
573545 }
574546 }
575547
576 // Linux can return EINVAL when write amount is > 0x7ffff000
577 // See https://github.com/ziglang/zig/pull/743#issuecomment-363165856
578 // TODO audit this. Shawn Landden says that this is not actually true.
579 // if this logic should stay, move it to std.os.linux
580 const max_bytes_len = 0x7ffff000;
548 const max_count = switch (std.Target.current.os.tag) {
549 .linux => 0x7ffff000,
550 else => math.maxInt(isize),
551 };
552 const adjusted_len = math.min(max_count, bytes.len);
581553
582 var index: usize = 0;
583 while (index < bytes.len) {
584 const amt_to_write = math.min(bytes.len - index, @as(usize, max_bytes_len));
585 const rc = system.write(fd, bytes.ptr + index, amt_to_write);
554 while (true) {
555 const rc = system.write(fd, bytes.ptr, adjusted_len);
586556 switch (errno(rc)) {
587 0 => {
588 index += @intCast(usize, rc);
589 continue;
590 },
557 0 => return @intCast(usize, rc),
591558 EINTR => continue,
592559 EINVAL => unreachable,
593560 EFAULT => unreachable,
......@@ -611,14 +578,36 @@ pub fn write(fd: fd_t, bytes: []const u8) WriteError!void {
611578}
612579
613580/// Write multiple buffers to a file descriptor.
614/// If the application has a global event loop enabled, EAGAIN is handled
615/// via the event loop. Otherwise EAGAIN results in error.WouldBlock.
616pub fn writev(fd: fd_t, iov: []const iovec_const) WriteError!void {
581/// Retries when interrupted by a signal.
582/// Returns the number of bytes written. If nonzero bytes were supplied, this will be nonzero.
583///
584/// Note that a successful write() may transfer fewer bytes than supplied. Such partial writes can
585/// occur for various reasons; for example, because there was insufficient space on the disk
586/// device to write all of the requested bytes, or because a blocked write() to a socket, pipe, or
587/// similar was interrupted by a signal handler after it had transferred some, but before it had
588/// transferred all of the requested bytes. In the event of a partial write, the caller can make
589/// another write() call to transfer the remaining bytes. The subsequent call will either
590/// transfer further bytes or may result in an error (e.g., if the disk is now full).
591///
592/// For POSIX systems, if the application has a global event loop enabled, EAGAIN is handled
593/// via the event loop. Otherwise EAGAIN results in `error.WouldBlock`.
594/// On Windows, if the application has a global event loop enabled, I/O Completion Ports are
595/// used to perform the I/O. `error.WouldBlock` is not possible on Windows.
596///
597/// If `iov.len` is larger than will fit in a `u31`, a partial write will occur.
598pub fn writev(fd: fd_t, iov: []const iovec_const) WriteError!usize {
599 if (std.Target.current.os.tag == .windows) {
600 // TODO does Windows have a way to write an io vector?
601 if (iov.len == 0) return @as(usize, 0);
602 const first = iov[0];
603 return write(fd, first.iov_base[0..first.iov_len]);
604 }
605
606 const iov_count = math.cast(u31, iov.len) catch math.maxInt(u31);
617607 while (true) {
618 // TODO handle the case when iov_len is too large and get rid of this @intCast
619 const rc = system.writev(fd, iov.ptr, @intCast(u32, iov.len));
608 const rc = system.writev(fd, iov.ptr, iov_count);
620609 switch (errno(rc)) {
621 0 => return,
610 0 => return @intCast(usize, rc),
622611 EINTR => continue,
623612 EINVAL => unreachable,
624613 EFAULT => unreachable,
......@@ -641,23 +630,45 @@ pub fn writev(fd: fd_t, iov: []const iovec_const) WriteError!void {
641630 }
642631}
643632
633pub const PWriteError = WriteError || error{Unseekable};
634
644635/// Write to a file descriptor, with a position offset.
645///
646636/// Retries when interrupted by a signal.
637/// Returns the number of bytes written. If nonzero bytes were supplied, this will be nonzero.
638///
639/// Note that a successful write() may transfer fewer bytes than supplied. Such partial writes can
640/// occur for various reasons; for example, because there was insufficient space on the disk
641/// device to write all of the requested bytes, or because a blocked write() to a socket, pipe, or
642/// similar was interrupted by a signal handler after it had transferred some, but before it had
643/// transferred all of the requested bytes. In the event of a partial write, the caller can make
644/// another write() call to transfer the remaining bytes. The subsequent call will either
645/// transfer further bytes or may result in an error (e.g., if the disk is now full).
647646///
648647/// For POSIX systems, if the application has a global event loop enabled, EAGAIN is handled
649648/// via the event loop. Otherwise EAGAIN results in `error.WouldBlock`.
650649/// On Windows, if the application has a global event loop enabled, I/O Completion Ports are
651650/// used to perform the I/O. `error.WouldBlock` is not possible on Windows.
652pub fn pwrite(fd: fd_t, bytes: []const u8, offset: u64) WriteError!void {
651///
652/// Linux has a limit on how many bytes may be transferred in one `pwrite` call, which is `0x7ffff000`
653/// on both 64-bit and 32-bit systems. This is due to using a signed C int as the return value, as
654/// well as stuffing the errno codes into the last `4096` values. This is noted on the `write` man page.
655/// The corresponding POSIX limit is `math.maxInt(isize)`.
656pub fn pwrite(fd: fd_t, bytes: []const u8, offset: u64) PWriteError!usize {
653657 if (std.Target.current.os.tag == .windows) {
654658 return windows.WriteFile(fd, bytes, offset);
655659 }
656660
661 // Prevent EINVAL.
662 const max_count = switch (std.Target.current.os.tag) {
663 .linux => 0x7ffff000,
664 else => math.maxInt(isize),
665 };
666 const adjusted_len = math.min(max_count, bytes.len);
667
657668 while (true) {
658 const rc = system.pwrite(fd, bytes.ptr, bytes.len, offset);
669 const rc = system.pwrite(fd, bytes.ptr, adjusted_len, offset);
659670 switch (errno(rc)) {
660 0 => return,
671 0 => return @intCast(usize, rc),
661672 EINTR => continue,
662673 EINVAL => unreachable,
663674 EFAULT => unreachable,
......@@ -675,84 +686,54 @@ pub fn pwrite(fd: fd_t, bytes: []const u8, offset: u64) WriteError!void {
675686 ENOSPC => return error.NoSpaceLeft,
676687 EPERM => return error.AccessDenied,
677688 EPIPE => return error.BrokenPipe,
689 ENXIO => return error.Unseekable,
690 ESPIPE => return error.Unseekable,
691 EOVERFLOW => return error.Unseekable,
678692 else => |err| return unexpectedErrno(err),
679693 }
680694 }
681695}
682696
683697/// Write multiple buffers to a file descriptor, with a position offset.
684///
685698/// Retries when interrupted by a signal.
699/// Returns the number of bytes written. If nonzero bytes were supplied, this will be nonzero.
700///
701/// Note that a successful write() may transfer fewer than count bytes. Such partial writes can
702/// occur for various reasons; for example, because there was insufficient space on the disk
703/// device to write all of the requested bytes, or because a blocked write() to a socket, pipe, or
704/// similar was interrupted by a signal handler after it had transferred some, but before it had
705/// transferred all of the requested bytes. In the event of a partial write, the caller can make
706/// another write() call to transfer the remaining bytes. The subsequent call will either
707/// transfer further bytes or may result in an error (e.g., if the disk is now full).
686708///
687709/// If the application has a global event loop enabled, EAGAIN is handled
688710/// via the event loop. Otherwise EAGAIN results in `error.WouldBlock`.
689711///
690/// This operation is non-atomic on the following systems:
712/// The following systems do not have this syscall, and will return partial writes if more than one
713/// vector is provided:
691714/// * Darwin
692715/// * Windows
693/// On these systems, the write races with concurrent writes to the same file descriptor, and
694/// the file can be in a partially written state when an error occurs.
695pub fn pwritev(fd: fd_t, iov: []const iovec_const, offset: u64) WriteError!void {
696 if (comptime std.Target.current.isDarwin()) {
697 // Darwin does not have pwritev but it does have pwrite.
698 var off: usize = 0;
699 var iov_i: usize = 0;
700 var inner_off: usize = 0;
701 while (true) {
702 const v = iov[iov_i];
703 const rc = darwin.pwrite(fd, v.iov_base + inner_off, v.iov_len - inner_off, offset + off);
704 const err = darwin.getErrno(rc);
705 switch (err) {
706 0 => {
707 const amt_written = @bitCast(usize, rc);
708 off += amt_written;
709 inner_off += amt_written;
710 if (inner_off == v.iov_len) {
711 iov_i += 1;
712 inner_off = 0;
713 if (iov_i == iov.len) {
714 return;
715 }
716 }
717 continue;
718 },
719 EINTR => continue,
720 ESPIPE => unreachable, // `fd` is not seekable.
721 EINVAL => unreachable,
722 EFAULT => unreachable,
723 EAGAIN => if (std.event.Loop.instance) |loop| {
724 loop.waitUntilFdWritable(fd);
725 continue;
726 } else {
727 return error.WouldBlock;
728 },
729 EBADF => unreachable, // Always a race condition.
730 EDESTADDRREQ => unreachable, // `connect` was never called.
731 EDQUOT => return error.DiskQuota,
732 EFBIG => return error.FileTooBig,
733 EIO => return error.InputOutput,
734 ENOSPC => return error.NoSpaceLeft,
735 EPERM => return error.AccessDenied,
736 EPIPE => return error.BrokenPipe,
737 else => return unexpectedErrno(err),
738 }
739 }
740 }
716///
717/// If `iov.len` is larger than will fit in a `u31`, a partial write will occur.
718pub fn pwritev(fd: fd_t, iov: []const iovec_const, offset: u64) PWriteError!usize {
719 const have_pwrite_but_not_pwritev = switch (std.Target.current.os.tag) {
720 .windows, .macosx, .ios, .watchos, .tvos => true,
721 else => false,
722 };
741723
742 if (std.Target.current.os.tag == .windows) {
743 var off = offset;
744 for (iov) |item| {
745 try pwrite(fd, item.iov_base[0..item.iov_len], off);
746 off += buf.len;
747 }
748 return;
724 if (have_pwrite_but_not_pwritev) {
725 // We could loop here; but proper usage of `pwritev` must handle partial writes anyway.
726 // So we simply write the first vector only.
727 if (iov.len == 0) return @as(usize, 0);
728 const first = iov[0];
729 return pwrite(fd, first.iov_base[0..first.iov_len], offset);
749730 }
750731
732 const iov_count = math.cast(u31, iov.len) catch math.maxInt(u31);
751733 while (true) {
752 // TODO handle the case when iov_len is too large and get rid of this @intCast
753 const rc = system.pwritev(fd, iov.ptr, @intCast(u32, iov.len), offset);
734 const rc = system.pwritev(fd, iov.ptr, iov_count, offset);
754735 switch (errno(rc)) {
755 0 => return,
736 0 => return @intCast(usize, rc),
756737 EINTR => continue,
757738 EINVAL => unreachable,
758739 EFAULT => unreachable,
......@@ -770,6 +751,9 @@ pub fn pwritev(fd: fd_t, iov: []const iovec_const, offset: u64) WriteError!void
770751 ENOSPC => return error.NoSpaceLeft,
771752 EPERM => return error.AccessDenied,
772753 EPIPE => return error.BrokenPipe,
754 ENXIO => return error.Unseekable,
755 ESPIPE => return error.Unseekable,
756 EOVERFLOW => return error.Unseekable,
773757 else => |err| return unexpectedErrno(err),
774758 }
775759 }
......@@ -1371,7 +1355,6 @@ pub const UnlinkatError = UnlinkError || error{
13711355/// Delete a file name and possibly the file it refers to, based on an open directory handle.
13721356/// Asserts that the path parameter has no null bytes.
13731357pub fn unlinkat(dirfd: fd_t, file_path: []const u8, flags: u32) UnlinkatError!void {
1374 if (std.debug.runtime_safety) for (file_path) |byte| assert(byte != 0);
13751358 if (builtin.os.tag == .windows) {
13761359 const file_path_w = try windows.sliceToPrefixedFileW(file_path);
13771360 return unlinkatW(dirfd, &file_path_w, flags);
......@@ -1556,25 +1539,69 @@ pub const MakeDirError = error{
15561539 ReadOnlyFileSystem,
15571540 InvalidUtf8,
15581541 BadPathName,
1542 NoDevice,
15591543} || UnexpectedError;
15601544
1545pub fn mkdirat(dir_fd: fd_t, sub_dir_path: []const u8, mode: u32) MakeDirError!void {
1546 if (builtin.os.tag == .windows) {
1547 const sub_dir_path_w = try windows.sliceToPrefixedFileW(sub_dir_path);
1548 return mkdiratW(dir_fd, &sub_dir_path_w, mode);
1549 } else {
1550 const sub_dir_path_c = try toPosixPath(sub_dir_path);
1551 return mkdiratC(dir_fd, &sub_dir_path_c, mode);
1552 }
1553}
1554
1555pub fn mkdiratC(dir_fd: fd_t, sub_dir_path: [*:0]const u8, mode: u32) MakeDirError!void {
1556 if (builtin.os.tag == .windows) {
1557 const sub_dir_path_w = try windows.cStrToPrefixedFileW(sub_dir_path);
1558 return mkdiratW(dir_fd, &sub_dir_path_w, mode);
1559 }
1560 switch (errno(system.mkdirat(dir_fd, sub_dir_path, mode))) {
1561 0 => return,
1562 EACCES => return error.AccessDenied,
1563 EBADF => unreachable,
1564 EPERM => return error.AccessDenied,
1565 EDQUOT => return error.DiskQuota,
1566 EEXIST => return error.PathAlreadyExists,
1567 EFAULT => unreachable,
1568 ELOOP => return error.SymLinkLoop,
1569 EMLINK => return error.LinkQuotaExceeded,
1570 ENAMETOOLONG => return error.NameTooLong,
1571 ENOENT => return error.FileNotFound,
1572 ENOMEM => return error.SystemResources,
1573 ENOSPC => return error.NoSpaceLeft,
1574 ENOTDIR => return error.NotDir,
1575 EROFS => return error.ReadOnlyFileSystem,
1576 else => |err| return unexpectedErrno(err),
1577 }
1578}
1579
1580pub fn mkdiratW(dir_fd: fd_t, sub_path_w: [*:0]const u16, mode: u32) MakeDirError!void {
1581 const sub_dir_handle = try windows.CreateDirectoryW(dir_fd, sub_path_w, null);
1582 windows.CloseHandle(sub_dir_handle);
1583}
1584
15611585/// Create a directory.
15621586/// `mode` is ignored on Windows.
15631587pub fn mkdir(dir_path: []const u8, mode: u32) MakeDirError!void {
15641588 if (builtin.os.tag == .windows) {
1565 const dir_path_w = try windows.sliceToPrefixedFileW(dir_path);
1566 return windows.CreateDirectoryW(&dir_path_w, null);
1589 const sub_dir_handle = try windows.CreateDirectory(null, dir_path, null);
1590 windows.CloseHandle(sub_dir_handle);
1591 return;
15671592 } else {
15681593 const dir_path_c = try toPosixPath(dir_path);
1569 return mkdirC(&dir_path_c, mode);
1594 return mkdirZ(&dir_path_c, mode);
15701595 }
15711596}
15721597
15731598/// Same as `mkdir` but the parameter is a null-terminated UTF8-encoded string.
1574pub fn mkdirC(dir_path: [*:0]const u8, mode: u32) MakeDirError!void {
1599pub fn mkdirZ(dir_path: [*:0]const u8, mode: u32) MakeDirError!void {
15751600 if (builtin.os.tag == .windows) {
15761601 const dir_path_w = try windows.cStrToPrefixedFileW(dir_path);
1577 return windows.CreateDirectoryW(&dir_path_w, null);
1602 const sub_dir_handle = try windows.CreateDirectoryW(null, &dir_path_w, null);
1603 windows.CloseHandle(sub_dir_handle);
1604 return;
15781605 }
15791606 switch (errno(system.mkdir(dir_path, mode))) {
15801607 0 => return,
......@@ -1687,6 +1714,26 @@ pub fn chdirC(dir_path: [*:0]const u8) ChangeCurDirError!void {
16871714 }
16881715}
16891716
1717pub const FchdirError = error{
1718 AccessDenied,
1719 NotDir,
1720 FileSystem,
1721} || UnexpectedError;
1722
1723pub fn fchdir(dirfd: fd_t) FchdirError!void {
1724 while (true) {
1725 switch (errno(system.fchdir(dirfd))) {
1726 0 => return,
1727 EACCES => return error.AccessDenied,
1728 EBADF => unreachable,
1729 ENOTDIR => return error.NotDir,
1730 EINTR => continue,
1731 EIO => return error.FileSystem,
1732 else => |err| return unexpectedErrno(err),
1733 }
1734 }
1735}
1736
16901737pub const ReadLinkError = error{
16911738 AccessDenied,
16921739 FileSystem,
......@@ -2338,6 +2385,29 @@ pub fn fstat(fd: fd_t) FStatError!Stat {
23382385 }
23392386}
23402387
2388const FStatAtError = FStatError || error{NameTooLong};
2389
2390pub fn fstatat(dirfd: fd_t, pathname: []const u8, flags: u32) FStatAtError![]Stat {
2391 const pathname_c = try toPosixPath(pathname);
2392 return fstatatC(dirfd, &pathname_c, flags);
2393}
2394
2395pub fn fstatatC(dirfd: fd_t, pathname: [*:0]const u8, flags: u32) FStatAtError!Stat {
2396 var stat: Stat = undefined;
2397 switch (errno(system.fstatat(dirfd, pathname, &stat, flags))) {
2398 0 => return stat,
2399 EINVAL => unreachable,
2400 EBADF => unreachable, // Always a race condition.
2401 ENOMEM => return error.SystemResources,
2402 EACCES => return error.AccessDenied,
2403 EFAULT => unreachable,
2404 ENAMETOOLONG => return error.NameTooLong,
2405 ENOENT => return error.FileNotFound,
2406 ENOTDIR => return error.FileNotFound,
2407 else => |err| return unexpectedErrno(err),
2408 }
2409}
2410
23412411pub const KQueueError = error{
23422412 /// The per-process limit on the number of open file descriptors has been reached.
23432413 ProcessFdQuotaExceeded,
......@@ -3185,6 +3255,7 @@ pub fn sched_getaffinity(pid: pid_t) SchedGetAffinityError!cpu_set_t {
31853255/// Used to convert a slice to a null terminated slice on the stack.
31863256/// TODO https://github.com/ziglang/zig/issues/287
31873257pub fn toPosixPath(file_path: []const u8) ![PATH_MAX - 1:0]u8 {
3258 if (std.debug.runtime_safety) assert(std.mem.indexOfScalar(u8, file_path, 0) == null);
31883259 var path_with_null: [PATH_MAX - 1:0]u8 = undefined;
31893260 // >= rather than > to make room for the null byte
31903261 if (file_path.len >= PATH_MAX) return error.NameTooLong;
......@@ -3389,7 +3460,6 @@ pub const SendError = error{
33893460
33903461 /// The socket type requires that message be sent atomically, and the size of the message
33913462 /// to be sent made this impossible. The message is not transmitted.
3392 ///
33933463 MessageTooBig,
33943464
33953465 /// The output queue for a network interface was full. This generally indicates that the
......@@ -3498,6 +3568,324 @@ pub fn send(
34983568 return sendto(sockfd, buf, flags, null, 0);
34993569}
35003570
3571pub const SendFileError = PReadError || WriteError || SendError;
3572
3573fn count_iovec_bytes(iovs: []const iovec_const) usize {
3574 var count: usize = 0;
3575 for (iovs) |iov| {
3576 count += iov.iov_len;
3577 }
3578 return count;
3579}
3580
3581/// Transfer data between file descriptors, with optional headers and trailers.
3582/// Returns the number of bytes written, which can be zero.
3583///
3584/// The `sendfile` call copies `in_len` bytes from one file descriptor to another. When possible,
3585/// this is done within the operating system kernel, which can provide better performance
3586/// characteristics than transferring data from kernel to user space and back, such as with
3587/// `read` and `write` calls. When `in_len` is `0`, it means to copy until the end of the input file has been
3588/// reached. Note, however, that partial writes are still possible in this case.
3589///
3590/// `in_fd` must be a file descriptor opened for reading, and `out_fd` must be a file descriptor
3591/// opened for writing. They may be any kind of file descriptor; however, if `in_fd` is not a regular
3592/// file system file, it may cause this function to fall back to calling `read` and `write`, in which case
3593/// atomicity guarantees no longer apply.
3594///
3595/// Copying begins reading at `in_offset`. The input file descriptor seek position is ignored and not updated.
3596/// If the output file descriptor has a seek position, it is updated as bytes are written. When
3597/// `in_offset` is past the end of the input file, it successfully reads 0 bytes.
3598///
3599/// `flags` has different meanings per operating system; refer to the respective man pages.
3600///
3601/// These systems support atomically sending everything, including headers and trailers:
3602/// * macOS
3603/// * FreeBSD
3604///
3605/// These systems support in-kernel data copying, but headers and trailers are not sent atomically:
3606/// * Linux
3607///
3608/// Other systems fall back to calling `read` / `write`.
3609///
3610/// Linux has a limit on how many bytes may be transferred in one `sendfile` call, which is `0x7ffff000`
3611/// on both 64-bit and 32-bit systems. This is due to using a signed C int as the return value, as
3612/// well as stuffing the errno codes into the last `4096` values. This is cited on the `sendfile` man page.
3613/// The corresponding POSIX limit on this is `math.maxInt(isize)`.
3614pub fn sendfile(
3615 out_fd: fd_t,
3616 in_fd: fd_t,
3617 in_offset: u64,
3618 in_len: u64,
3619 headers: []const iovec_const,
3620 trailers: []const iovec_const,
3621 flags: u32,
3622) SendFileError!usize {
3623 var header_done = false;
3624 var total_written: usize = 0;
3625
3626 // Prevents EOVERFLOW.
3627 const size_t = @Type(std.builtin.TypeInfo{
3628 .Int = .{
3629 .is_signed = false,
3630 .bits = @typeInfo(usize).Int.bits - 1,
3631 },
3632 });
3633 const max_count = switch (std.Target.current.os.tag) {
3634 .linux => 0x7ffff000,
3635 else => math.maxInt(size_t),
3636 };
3637
3638 switch (std.Target.current.os.tag) {
3639 .linux => sf: {
3640 // sendfile() first appeared in Linux 2.2, glibc 2.1.
3641 const call_sf = comptime if (builtin.link_libc)
3642 std.c.versionCheck(.{ .major = 2, .minor = 1 }).ok
3643 else
3644 std.Target.current.os.version_range.linux.range.max.order(.{ .major = 2, .minor = 2 }) != .lt;
3645 if (!call_sf) break :sf;
3646
3647 if (headers.len != 0) {
3648 const amt = try writev(out_fd, headers);
3649 total_written += amt;
3650 if (amt < count_iovec_bytes(headers)) return total_written;
3651 header_done = true;
3652 }
3653
3654 // Here we match BSD behavior, making a zero count value send as many bytes as possible.
3655 const adjusted_count = if (in_len == 0) max_count else math.min(in_len, @as(size_t, max_count));
3656
3657 while (true) {
3658 var offset: off_t = @bitCast(off_t, in_offset);
3659 const rc = system.sendfile(out_fd, in_fd, &offset, adjusted_count);
3660 switch (errno(rc)) {
3661 0 => {
3662 const amt = @bitCast(usize, rc);
3663 total_written += amt;
3664 if (in_len == 0 and amt == 0) {
3665 // We have detected EOF from `in_fd`.
3666 break;
3667 } else if (amt < in_len) {
3668 return total_written;
3669 } else {
3670 break;
3671 }
3672 },
3673
3674 EBADF => unreachable, // Always a race condition.
3675 EFAULT => unreachable, // Segmentation fault.
3676 EOVERFLOW => unreachable, // We avoid passing too large of a `count`.
3677 ENOTCONN => unreachable, // `out_fd` is an unconnected socket.
3678
3679 EINVAL, ENOSYS => {
3680 // EINVAL could be any of the following situations:
3681 // * Descriptor is not valid or locked
3682 // * an mmap(2)-like operation is not available for in_fd
3683 // * count is negative
3684 // * out_fd has the O_APPEND flag set
3685 // Because of the "mmap(2)-like operation" possibility, we fall back to doing read/write
3686 // manually, the same as ENOSYS.
3687 break :sf;
3688 },
3689 EAGAIN => if (std.event.Loop.instance) |loop| {
3690 loop.waitUntilFdWritable(out_fd);
3691 continue;
3692 } else {
3693 return error.WouldBlock;
3694 },
3695 EIO => return error.InputOutput,
3696 EPIPE => return error.BrokenPipe,
3697 ENOMEM => return error.SystemResources,
3698 ENXIO => return error.Unseekable,
3699 ESPIPE => return error.Unseekable,
3700 else => |err| {
3701 const discard = unexpectedErrno(err);
3702 break :sf;
3703 },
3704 }
3705 }
3706
3707 if (trailers.len != 0) {
3708 total_written += try writev(out_fd, trailers);
3709 }
3710
3711 return total_written;
3712 },
3713 .freebsd => sf: {
3714 var hdtr_data: std.c.sf_hdtr = undefined;
3715 var hdtr: ?*std.c.sf_hdtr = null;
3716 if (headers.len != 0 or trailers.len != 0) {
3717 // Here we carefully avoid `@intCast` by returning partial writes when
3718 // too many io vectors are provided.
3719 const hdr_cnt = math.cast(u31, headers.len) catch math.maxInt(u31);
3720 if (headers.len > hdr_cnt) return writev(out_fd, headers);
3721
3722 const trl_cnt = math.cast(u31, trailers.len) catch math.maxInt(u31);
3723
3724 hdtr_data = std.c.sf_hdtr{
3725 .headers = headers.ptr,
3726 .hdr_cnt = hdr_cnt,
3727 .trailers = trailers.ptr,
3728 .trl_cnt = trl_cnt,
3729 };
3730 hdtr = &hdtr_data;
3731 }
3732
3733 const adjusted_count = math.min(in_len, max_count);
3734
3735 while (true) {
3736 var sbytes: off_t = undefined;
3737 const err = errno(system.sendfile(out_fd, in_fd, in_offset, adjusted_count, hdtr, &sbytes, flags));
3738 const amt = @bitCast(usize, sbytes);
3739 switch (err) {
3740 0 => return amt,
3741
3742 EBADF => unreachable, // Always a race condition.
3743 EFAULT => unreachable, // Segmentation fault.
3744 ENOTCONN => unreachable, // `out_fd` is an unconnected socket.
3745
3746 EINVAL, EOPNOTSUPP, ENOTSOCK, ENOSYS => {
3747 // EINVAL could be any of the following situations:
3748 // * The fd argument is not a regular file.
3749 // * The s argument is not a SOCK_STREAM type socket.
3750 // * The offset argument is negative.
3751 // Because of some of these possibilities, we fall back to doing read/write
3752 // manually, the same as ENOSYS.
3753 break :sf;
3754 },
3755
3756 EINTR => if (amt != 0) return amt else continue,
3757
3758 EAGAIN => if (amt != 0) {
3759 return amt;
3760 } else if (std.event.Loop.instance) |loop| {
3761 loop.waitUntilFdWritable(out_fd);
3762 continue;
3763 } else {
3764 return error.WouldBlock;
3765 },
3766
3767 EBUSY => if (amt != 0) {
3768 return amt;
3769 } else if (std.event.Loop.instance) |loop| {
3770 loop.waitUntilFdReadable(in_fd);
3771 continue;
3772 } else {
3773 return error.WouldBlock;
3774 },
3775
3776 EIO => return error.InputOutput,
3777 ENOBUFS => return error.SystemResources,
3778 EPIPE => return error.BrokenPipe,
3779
3780 else => {
3781 const discard = unexpectedErrno(err);
3782 if (amt != 0) {
3783 return amt;
3784 } else {
3785 break :sf;
3786 }
3787 },
3788 }
3789 }
3790 },
3791 .macosx, .ios, .tvos, .watchos => sf: {
3792 var hdtr_data: std.c.sf_hdtr = undefined;
3793 var hdtr: ?*std.c.sf_hdtr = null;
3794 if (headers.len != 0 or trailers.len != 0) {
3795 // Here we carefully avoid `@intCast` by returning partial writes when
3796 // too many io vectors are provided.
3797 const hdr_cnt = math.cast(u31, headers.len) catch math.maxInt(u31);
3798 if (headers.len > hdr_cnt) return writev(out_fd, headers);
3799
3800 const trl_cnt = math.cast(u31, trailers.len) catch math.maxInt(u31);
3801
3802 hdtr_data = std.c.sf_hdtr{
3803 .headers = headers.ptr,
3804 .hdr_cnt = hdr_cnt,
3805 .trailers = trailers.ptr,
3806 .trl_cnt = trl_cnt,
3807 };
3808 hdtr = &hdtr_data;
3809 }
3810
3811 const adjusted_count = math.min(in_len, @as(u63, max_count));
3812
3813 while (true) {
3814 var sbytes: off_t = adjusted_count;
3815 const signed_offset = @bitCast(i64, in_offset);
3816 const err = errno(system.sendfile(out_fd, in_fd, signed_offset, &sbytes, hdtr, flags));
3817 const amt = @bitCast(usize, sbytes);
3818 switch (err) {
3819 0 => return amt,
3820
3821 EFAULT => unreachable, // Segmentation fault.
3822 EINVAL => unreachable,
3823 ENOTCONN => unreachable, // `out_fd` is an unconnected socket.
3824
3825 // On macOS version 10.14.6, I observed Darwin return EBADF when
3826 // using sendfile on a valid open file descriptor of a file
3827 // system file.
3828 ENOTSUP, ENOTSOCK, ENOSYS, EBADF => break :sf,
3829
3830 EINTR => if (amt != 0) return amt else continue,
3831
3832 EAGAIN => if (amt != 0) {
3833 return amt;
3834 } else if (std.event.Loop.instance) |loop| {
3835 loop.waitUntilFdWritable(out_fd);
3836 continue;
3837 } else {
3838 return error.WouldBlock;
3839 },
3840
3841 EIO => return error.InputOutput,
3842 EPIPE => return error.BrokenPipe,
3843
3844 else => {
3845 const discard = unexpectedErrno(err);
3846 if (amt != 0) {
3847 return amt;
3848 } else {
3849 break :sf;
3850 }
3851 },
3852 }
3853 }
3854 },
3855 else => {}, // fall back to read/write
3856 }
3857
3858 if (headers.len != 0 and !header_done) {
3859 const amt = try writev(out_fd, headers);
3860 total_written += amt;
3861 if (amt < count_iovec_bytes(headers)) return total_written;
3862 }
3863
3864 rw: {
3865 var buf: [8 * 4096]u8 = undefined;
3866 // Here we match BSD behavior, making a zero count value send as many bytes as possible.
3867 const adjusted_count = if (in_len == 0) buf.len else math.min(buf.len, in_len);
3868 const amt_read = try pread(in_fd, buf[0..adjusted_count], in_offset);
3869 if (amt_read == 0) {
3870 if (in_len == 0) {
3871 // We have detected EOF from `in_fd`.
3872 break :rw;
3873 } else {
3874 return total_written;
3875 }
3876 }
3877 const amt_written = try write(out_fd, buf[0..amt_read]);
3878 total_written += amt_written;
3879 if (amt_written < in_len or in_len == 0) return total_written;
3880 }
3881
3882 if (trailers.len != 0) {
3883 total_written += try writev(out_fd, trailers);
3884 }
3885
3886 return total_written;
3887}
3888
35013889pub const PollError = error{
35023890 /// The kernel had no space to allocate file descriptor tables.
35033891 SystemResources,
lib/std/os/bits/darwin.zig+3
......@@ -926,6 +926,9 @@ pub const ESOCKTNOSUPPORT = 44;
926926/// Operation not supported
927927pub const ENOTSUP = 45;
928928
929/// Operation not supported. Alias of `ENOTSUP`.
930pub const EOPNOTSUPP = ENOTSUP;
931
929932/// Protocol family not supported
930933pub const EPFNOSUPPORT = 46;
931934
lib/std/os/bits/linux/arm64.zig+1
......@@ -82,6 +82,7 @@ pub const SYS_pread64 = 67;
8282pub const SYS_pwrite64 = 68;
8383pub const SYS_preadv = 69;
8484pub const SYS_pwritev = 70;
85pub const SYS_sendfile = 71;
8586pub const SYS_pselect6 = 72;
8687pub const SYS_ppoll = 73;
8788pub const SYS_signalfd4 = 74;
lib/std/os/linux.zig+58-4
......@@ -6,7 +6,7 @@
66// provide `rename` when only the `renameat` syscall exists.
77// * Does not support POSIX thread cancellation.
88const std = @import("../std.zig");
9const builtin = @import("builtin");
9const builtin = std.builtin;
1010const assert = std.debug.assert;
1111const maxInt = std.math.maxInt;
1212const elf = std.elf;
......@@ -39,6 +39,13 @@ pub fn getauxval(index: usize) usize {
3939 return 0;
4040}
4141
42// Some architectures require 64bit parameters for some syscalls to be passed in
43// even-aligned register pair
44const require_aligned_register_pair = //
45 std.Target.current.cpu.arch.isMIPS() or
46 std.Target.current.cpu.arch.isARM() or
47 std.Target.current.cpu.arch.isThumb();
48
4249/// Get the errno from a syscall return value, or 0 for no error.
4350pub fn getErrno(r: usize) u12 {
4451 const signed_r = @bitCast(isize, r);
......@@ -69,6 +76,10 @@ pub fn chdir(path: [*:0]const u8) usize {
6976 return syscall1(SYS_chdir, @ptrToInt(path));
7077}
7178
79pub fn fchdir(fd: fd_t) usize {
80 return syscall1(SYS_fchdir, @bitCast(usize, @as(isize, fd)));
81}
82
7283pub fn chroot(path: [*:0]const u8) usize {
7384 return syscall1(SYS_chroot, @ptrToInt(path));
7485}
......@@ -316,8 +327,31 @@ pub fn symlinkat(existing: [*:0]const u8, newfd: i32, newpath: [*:0]const u8) us
316327 return syscall3(SYS_symlinkat, @ptrToInt(existing), @bitCast(usize, @as(isize, newfd)), @ptrToInt(newpath));
317328}
318329
319pub fn pread(fd: i32, buf: [*]u8, count: usize, offset: usize) usize {
320 return syscall4(SYS_pread, @bitCast(usize, @as(isize, fd)), @ptrToInt(buf), count, offset);
330pub fn pread(fd: i32, buf: [*]u8, count: usize, offset: u64) usize {
331 if (@hasDecl(@This(), "SYS_pread64")) {
332 if (require_aligned_register_pair) {
333 return syscall6(
334 SYS_pread64,
335 @bitCast(usize, @as(isize, fd)),
336 @ptrToInt(buf),
337 count,
338 0,
339 @truncate(usize, offset),
340 @truncate(usize, offset >> 32),
341 );
342 } else {
343 return syscall5(
344 SYS_pread64,
345 @bitCast(usize, @as(isize, fd)),
346 @ptrToInt(buf),
347 count,
348 @truncate(usize, offset),
349 @truncate(usize, offset >> 32),
350 );
351 }
352 } else {
353 return syscall4(SYS_pread, @bitCast(usize, @as(isize, fd)), @ptrToInt(buf), count, offset);
354 }
321355}
322356
323357pub 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 {
333367}
334368
335369pub fn pipe(fd: *[2]i32) usize {
336 if (builtin.arch == .mipsel) {
370 if (comptime builtin.arch.isMIPS()) {
337371 return syscall_pipe(fd);
338372 } else if (@hasDecl(@This(), "SYS_pipe")) {
339373 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
846880 return syscall6(SYS_sendto, @bitCast(usize, @as(isize, fd)), @ptrToInt(buf), len, flags, @ptrToInt(addr), @intCast(usize, alen));
847881}
848882
883pub fn sendfile(outfd: i32, infd: i32, offset: ?*i64, count: usize) usize {
884 if (@hasDecl(@This(), "SYS_sendfile64")) {
885 return syscall4(
886 SYS_sendfile64,
887 @bitCast(usize, @as(isize, outfd)),
888 @bitCast(usize, @as(isize, infd)),
889 @ptrToInt(offset),
890 count,
891 );
892 } else {
893 return syscall4(
894 SYS_sendfile,
895 @bitCast(usize, @as(isize, outfd)),
896 @bitCast(usize, @as(isize, infd)),
897 @ptrToInt(offset),
898 count,
899 );
900 }
901}
902
849903pub fn socketpair(domain: i32, socket_type: i32, protocol: i32, fd: [2]i32) usize {
850904 if (builtin.arch == .i386) {
851905 return socketcall(SC_socketpair, &[4]usize{ @intCast(usize, domain), @intCast(usize, socket_type), @intCast(usize, protocol), @ptrToInt(&fd[0]) });
lib/std/os/test.zig+67-5
......@@ -16,7 +16,7 @@ const AtomicRmwOp = builtin.AtomicRmwOp;
1616const AtomicOrder = builtin.AtomicOrder;
1717
1818test "makePath, put some files in it, deleteTree" {
19 try fs.makePath(a, "os_test_tmp" ++ fs.path.sep_str ++ "b" ++ fs.path.sep_str ++ "c");
19 try fs.cwd().makePath("os_test_tmp" ++ fs.path.sep_str ++ "b" ++ fs.path.sep_str ++ "c");
2020 try io.writeFile("os_test_tmp" ++ fs.path.sep_str ++ "b" ++ fs.path.sep_str ++ "c" ++ fs.path.sep_str ++ "file.txt", "nonsense");
2121 try io.writeFile("os_test_tmp" ++ fs.path.sep_str ++ "b" ++ fs.path.sep_str ++ "file2.txt", "blah");
2222 try fs.deleteTree("os_test_tmp");
......@@ -28,7 +28,7 @@ test "makePath, put some files in it, deleteTree" {
2828}
2929
3030test "access file" {
31 try fs.makePath(a, "os_test_tmp");
31 try fs.cwd().makePath("os_test_tmp");
3232 if (fs.cwd().access("os_test_tmp" ++ fs.path.sep_str ++ "file.txt", .{})) |ok| {
3333 @panic("expected error");
3434 } else |err| {
......@@ -44,6 +44,68 @@ fn testThreadIdFn(thread_id: *Thread.Id) void {
4444 thread_id.* = Thread.getCurrentId();
4545}
4646
47test "sendfile" {
48 try fs.cwd().makePath("os_test_tmp");
49 defer fs.deleteTree("os_test_tmp") catch {};
50
51 var dir = try fs.cwd().openDirList("os_test_tmp");
52 defer dir.close();
53
54 const line1 = "line1\n";
55 const line2 = "second line\n";
56 var vecs = [_]os.iovec_const{
57 .{
58 .iov_base = line1,
59 .iov_len = line1.len,
60 },
61 .{
62 .iov_base = line2,
63 .iov_len = line2.len,
64 },
65 };
66
67 var src_file = try dir.createFileC("sendfile1.txt", .{ .read = true });
68 defer src_file.close();
69
70 try src_file.writevAll(&vecs);
71
72 var dest_file = try dir.createFileC("sendfile2.txt", .{ .read = true });
73 defer dest_file.close();
74
75 const header1 = "header1\n";
76 const header2 = "second header\n";
77 const trailer1 = "trailer1\n";
78 const trailer2 = "second trailer\n";
79 var hdtr = [_]os.iovec_const{
80 .{
81 .iov_base = header1,
82 .iov_len = header1.len,
83 },
84 .{
85 .iov_base = header2,
86 .iov_len = header2.len,
87 },
88 .{
89 .iov_base = trailer1,
90 .iov_len = trailer1.len,
91 },
92 .{
93 .iov_base = trailer2,
94 .iov_len = trailer2.len,
95 },
96 };
97
98 var written_buf: [header1.len + header2.len + 10 + trailer1.len + trailer2.len]u8 = undefined;
99 try dest_file.writeFileAll(src_file, .{
100 .in_offset = 1,
101 .in_len = 10,
102 .headers_and_trailers = &hdtr,
103 .header_count = 2,
104 });
105 try dest_file.preadAll(&written_buf, 0);
106 expect(mem.eql(u8, &written_buf, "header1\nsecond header\nine1\nsecontrailer1\nsecond trailer\n"));
107}
108
47109test "std.Thread.getCurrentId" {
48110 if (builtin.single_threaded) return error.SkipZigTest;
49111
......@@ -103,7 +165,7 @@ test "AtomicFile" {
103165 {
104166 var af = try fs.AtomicFile.init(test_out_file, File.default_mode);
105167 defer af.deinit();
106 try af.file.write(test_content);
168 try af.file.writeAll(test_content);
107169 try af.finish();
108170 }
109171 const content = try io.readFileAlloc(testing.allocator, test_out_file);
......@@ -226,7 +288,7 @@ test "pipe" {
226288 return error.SkipZigTest;
227289
228290 var fds = try os.pipe();
229 try os.write(fds[1], "hello");
291 expect((try os.write(fds[1], "hello")) == 5);
230292 var buf: [16]u8 = undefined;
231293 expect((try os.read(fds[0], buf[0..])) == 5);
232294 testing.expectEqualSlices(u8, buf[0..5], "hello");
......@@ -248,7 +310,7 @@ test "memfd_create" {
248310 else => |e| return e,
249311 };
250312 defer std.os.close(fd);
251 try std.os.write(fd, "test");
313 expect((try std.os.write(fd, "test")) == 4);
252314 try std.os.lseek_SET(fd, 0);
253315
254316 var buf: [10]u8 = undefined;
lib/std/os/windows.zig+69-16
......@@ -337,7 +337,7 @@ pub fn GetQueuedCompletionStatus(
337337}
338338
339339pub fn CloseHandle(hObject: HANDLE) void {
340 assert(kernel32.CloseHandle(hObject) != 0);
340 assert(ntdll.NtClose(hObject) == .SUCCESS);
341341}
342342
343343pub fn FindClose(hFindFile: HANDLE) void {
......@@ -424,7 +424,7 @@ pub const WriteFileError = error{
424424 Unexpected,
425425};
426426
427pub fn WriteFile(handle: HANDLE, bytes: []const u8, offset: ?u64) WriteFileError!void {
427pub fn WriteFile(handle: HANDLE, bytes: []const u8, offset: ?u64) WriteFileError!usize {
428428 if (std.event.Loop.instance) |loop| {
429429 // TODO support async WriteFile with no offset
430430 const off = offset.?;
......@@ -445,8 +445,8 @@ pub fn WriteFile(handle: HANDLE, bytes: []const u8, offset: ?u64) WriteFileError
445445 _ = CreateIoCompletionPort(fd, loop.os_data.io_port, undefined, undefined);
446446 loop.beginOneEvent();
447447 suspend {
448 // TODO replace this @intCast with a loop that writes all the bytes
449 _ = kernel32.WriteFile(fd, bytes.ptr, @intCast(windows.DWORD, bytes.len), null, &resume_node.base.overlapped);
448 const adjusted_len = math.cast(windows.DWORD, bytes.len) catch maxInt(windows.DWORD);
449 _ = kernel32.WriteFile(fd, bytes.ptr, adjusted_len, null, &resume_node.base.overlapped);
450450 }
451451 var bytes_transferred: windows.DWORD = undefined;
452452 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
460460 else => |err| return windows.unexpectedError(err),
461461 }
462462 }
463 return bytes_transferred;
463464 } else {
464465 var bytes_written: DWORD = undefined;
465466 var overlapped_data: OVERLAPPED = undefined;
......@@ -473,18 +474,19 @@ pub fn WriteFile(handle: HANDLE, bytes: []const u8, offset: ?u64) WriteFileError
473474 };
474475 break :blk &overlapped_data;
475476 } else null;
476 // TODO replace this @intCast with a loop that writes all the bytes
477 if (kernel32.WriteFile(handle, bytes.ptr, @intCast(u32, bytes.len), &bytes_written, overlapped) == 0) {
477 const adjusted_len = math.cast(u32, bytes.len) catch maxInt(u32);
478 if (kernel32.WriteFile(handle, bytes.ptr, adjusted_len, &bytes_written, overlapped) == 0) {
478479 switch (kernel32.GetLastError()) {
479480 .INVALID_USER_BUFFER => return error.SystemResources,
480481 .NOT_ENOUGH_MEMORY => return error.SystemResources,
481482 .OPERATION_ABORTED => return error.OperationAborted,
482483 .NOT_ENOUGH_QUOTA => return error.SystemResources,
483 .IO_PENDING => unreachable, // this function is for blocking files only
484 .IO_PENDING => unreachable,
484485 .BROKEN_PIPE => return error.BrokenPipe,
485486 else => |err| return unexpectedError(err),
486487 }
487488 }
489 return bytes_written;
488490 }
489491}
490492
......@@ -584,23 +586,74 @@ pub fn MoveFileExW(old_path: [*:0]const u16, new_path: [*:0]const u16, flags: DW
584586}
585587
586588pub const CreateDirectoryError = error{
589 NameTooLong,
587590 PathAlreadyExists,
588591 FileNotFound,
592 NoDevice,
593 AccessDenied,
589594 Unexpected,
590595};
591596
592pub fn CreateDirectory(pathname: []const u8, attrs: ?*SECURITY_ATTRIBUTES) CreateDirectoryError!void {
597/// Returns an open directory handle which the caller is responsible for closing with `CloseHandle`.
598pub fn CreateDirectory(dir: ?HANDLE, pathname: []const u8, sa: ?*SECURITY_ATTRIBUTES) CreateDirectoryError!HANDLE {
593599 const pathname_w = try sliceToPrefixedFileW(pathname);
594 return CreateDirectoryW(&pathname_w, attrs);
600 return CreateDirectoryW(dir, &pathname_w, sa);
595601}
596602
597pub fn CreateDirectoryW(pathname: [*:0]const u16, attrs: ?*SECURITY_ATTRIBUTES) CreateDirectoryError!void {
598 if (kernel32.CreateDirectoryW(pathname, attrs) == 0) {
599 switch (kernel32.GetLastError()) {
600 .ALREADY_EXISTS => return error.PathAlreadyExists,
601 .PATH_NOT_FOUND => return error.FileNotFound,
602 else => |err| return unexpectedError(err),
603 }
603/// Same as `CreateDirectory` except takes a WTF-16 encoded path.
604pub fn CreateDirectoryW(
605 dir: ?HANDLE,
606 sub_path_w: [*:0]const u16,
607 sa: ?*SECURITY_ATTRIBUTES,
608) CreateDirectoryError!HANDLE {
609 const path_len_bytes = math.cast(u16, mem.toSliceConst(u16, sub_path_w).len * 2) catch |err| switch (err) {
610 error.Overflow => return error.NameTooLong,
611 };
612 var nt_name = UNICODE_STRING{
613 .Length = path_len_bytes,
614 .MaximumLength = path_len_bytes,
615 .Buffer = @intToPtr([*]u16, @ptrToInt(sub_path_w)),
616 };
617
618 if (sub_path_w[0] == '.' and sub_path_w[1] == 0) {
619 // Windows does not recognize this, but it does work with empty string.
620 nt_name.Length = 0;
621 }
622
623 var attr = OBJECT_ATTRIBUTES{
624 .Length = @sizeOf(OBJECT_ATTRIBUTES),
625 .RootDirectory = if (std.fs.path.isAbsoluteWindowsW(sub_path_w)) null else dir,
626 .Attributes = 0, // Note we do not use OBJ_CASE_INSENSITIVE here.
627 .ObjectName = &nt_name,
628 .SecurityDescriptor = if (sa) |ptr| ptr.lpSecurityDescriptor else null,
629 .SecurityQualityOfService = null,
630 };
631 var io: IO_STATUS_BLOCK = undefined;
632 var result_handle: HANDLE = undefined;
633 const rc = ntdll.NtCreateFile(
634 &result_handle,
635 GENERIC_READ | SYNCHRONIZE,
636 &attr,
637 &io,
638 null,
639 FILE_ATTRIBUTE_NORMAL,
640 FILE_SHARE_READ,
641 FILE_CREATE,
642 FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT,
643 null,
644 0,
645 );
646 switch (rc) {
647 .SUCCESS => return result_handle,
648 .OBJECT_NAME_INVALID => unreachable,
649 .OBJECT_NAME_NOT_FOUND => return error.FileNotFound,
650 .OBJECT_PATH_NOT_FOUND => return error.FileNotFound,
651 .NO_MEDIA_IN_DEVICE => return error.NoDevice,
652 .INVALID_PARAMETER => unreachable,
653 .ACCESS_DENIED => return error.AccessDenied,
654 .OBJECT_PATH_SYNTAX_BAD => unreachable,
655 .OBJECT_NAME_COLLISION => return error.PathAlreadyExists,
656 else => return unexpectedStatus(rc),
604657 }
605658}
606659
lib/std/special/docs/index.html+96-13
......@@ -2,6 +2,7 @@
22<html lang="en">
33 <head>
44 <meta charset="utf-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1">
56 <title>Documentation - Zig</title>
67 <link rel="icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAgklEQVR4AWMYWuD7EllJIM4G4g4g5oIJ/odhOJ8wToOxSTXgNxDHoeiBMfA4+wGShjyYOCkG/IGqWQziEzYAoUAeiF9D5U+DxEg14DRU7jWIT5IBIOdCxf+A+CQZAAoopEB7QJwBCBwHiip8UYmRdrAlDpIMgApwQZNnNii5Dq0MBgCxxycBnwEd+wAAAABJRU5ErkJggg==">
78 <style>
......@@ -25,6 +26,8 @@
2526 --search-sh-color: rgba(0, 0, 0, 0.18);
2627 --help-sh-color: rgba(0, 0, 0, 0.75);
2728 }
29
30 html, body { margin: 0; padding:0; height: 100%; }
2831
2932 a {
3033 text-decoration: none;
......@@ -69,6 +72,7 @@
6972 max-width: 15vw;
7073 min-width: 9.5rem;
7174 overflow: auto;
75 -webkit-overflow-scrolling: touch;
7276 overflow-wrap: break-word;
7377 flex-shrink: 0;
7478 flex-grow: 0;
......@@ -79,6 +83,7 @@
7983 .flex-right {
8084 display: flex;
8185 overflow: auto;
86 -webkit-overflow-scrolling: touch;
8287 flex-grow: 1;
8388 flex-shrink: 1;
8489
......@@ -175,6 +180,8 @@
175180 border-bottom-color: var(--tx-color);
176181 outline: none;
177182 transition: border-bottom-color 0.35s, background 0.35s, box-shadow 0.35s;
183 border-radius: 0;
184 -webkit-appearance: none;
178185 }
179186
180187 .docs .search:focus {
......@@ -258,12 +265,12 @@
258265 font-weight: bold;
259266 }
260267
261 #listFnExamples {
268 .examples {
262269 list-style-type: none;
263270 margin: 0;
264271 padding: 0;
265272 }
266 #listFnExamples li {
273 .examples li {
267274 padding: 0.5em 0;
268275 white-space: nowrap;
269276 overflow-x: auto;
......@@ -435,6 +442,76 @@
435442 }
436443
437444 }
445
446 @media only screen and (max-width: 750px) {
447 .canvas {
448 overflow: auto;
449 }
450 .flex-main {
451 flex-direction: column;
452 display: block;
453 }
454 .sidebar {
455 min-width: calc(100vw - 2.8rem);
456 padding-left: 1.4rem;
457 padding-right: 1.4rem;
458 }
459 .logo {
460 max-width: 6.5rem;
461 }
462 .flex-main > .flex-filler {
463 display: none;
464 }
465 .flex-main > .flex-right > .flex-filler {
466 display: none;
467 }
468 .flex-main > .flex-right > .wrap {
469 max-width: 100vw;
470 }
471 .flex-main > .flex-right > .wrap > .docs {
472 padding-right: 1.4rem;
473 background: transparent;
474 }
475 .packages {
476 display: flex;
477 flex-wrap: wrap;
478 }
479 .table-container table {
480 display: flex;
481 flex-direction: column;
482 }
483 .table-container tr {
484 display: flex;
485 flex-direction: column;
486 }
487 .examples {
488 overflow-x: scroll;
489 -webkit-overflow-scrolling: touch;
490 max-width: 100vw;
491 margin-left: -1.4rem;
492 margin-right: -1.4rem;
493 }
494 .examples li {
495 width: max-content;
496 padding-left: 1.4rem;
497 padding-right: 1.4rem;
498 }
499 .mobile-scroll-container {
500 overflow-x: scroll;
501 -webkit-overflow-scrolling: touch;
502 margin-left: -1.4rem;
503 margin-right: -1.4rem;
504 max-width: 100vw;
505 }
506 .mobile-scroll-container > .scroll-item {
507 margin-left: 1.4rem;
508 margin-right: 1.4rem;
509 box-sizing: border-box;
510 width: max-content;
511 display: inline-block;
512 min-width: calc(100% - 2.8rem);
513 }
514 }
438515 </style>
439516 </head>
440517 <body class="canvas">
......@@ -471,7 +548,7 @@
471548 <p id="status">Loading...</p>
472549 <div id="sectNav" class="hidden"><ul id="listNav"></ul></div>
473550 <div id="fnProto" class="hidden">
474 <pre id="fnProtoCode"></pre>
551 <div class="mobile-scroll-container"><pre id="fnProtoCode" class="scroll-item"></pre></div>
475552 </div>
476553 <h1 id="hdrName" class="hidden"></h1>
477554 <div id="fnNoExamples" class="hidden">
......@@ -518,21 +595,27 @@
518595 </div>
519596 <div id="sectGlobalVars" class="hidden">
520597 <h2>Global Variables</h2>
521 <table>
522 <tbody id="listGlobalVars"></tbody>
523 </table>
598 <div class="table-container">
599 <table>
600 <tbody id="listGlobalVars"></tbody>
601 </table>
602 </div>
524603 </div>
525604 <div id="sectFns" class="hidden">
526605 <h2>Functions</h2>
527 <table>
528 <tbody id="listFns"></tbody>
529 </table>
606 <div class="table-container">
607 <table>
608 <tbody id="listFns"></tbody>
609 </table>
610 </div>
530611 </div>
531612 <div id="sectValues" class="hidden">
532613 <h2>Values</h2>
533 <table>
534 <tbody id="listValues"></tbody>
535 </table>
614 <div class="table-container">
615 <table>
616 <tbody id="listValues"></tbody>
617 </table>
618 </div>
536619 </div>
537620 <div id="sectErrSets" class="hidden">
538621 <h2>Error Sets</h2>
......@@ -540,7 +623,7 @@
540623 </div>
541624 <div id="fnExamples" class="hidden">
542625 <h2>Examples</h2>
543 <ul id="listFnExamples"></ul>
626 <ul id="listFnExamples" class="examples"></ul>
544627 </div>
545628 </section>
546629 </div>
lib/std/special/docs/main.js+2-2
......@@ -1086,7 +1086,7 @@
10861086 var fieldNode = zigAnalysis.astNodes[containerNode.fields[i]];
10871087 var divDom = domListFields.children[i];
10881088
1089 var html = '<pre>' + escapeHtml(fieldNode.name);
1089 var html = '<div class="mobile-scroll-container"><pre class="scroll-item">' + escapeHtml(fieldNode.name);
10901090
10911091 if (container.kind === typeKinds.Enum) {
10921092 html += ' = <span class="tok-number">' + field + '</span>';
......@@ -1099,7 +1099,7 @@
10991099 }
11001100 }
11011101
1102 html += ',</pre>';
1102 html += ',</pre></div>';
11031103
11041104 var docs = fieldNode.docs;
11051105 if (docs != null) {
lib/std/target.zig+6-1
......@@ -146,7 +146,6 @@ pub const Target = struct {
146146 .freestanding,
147147 .ananas,
148148 .cloudabi,
149 .dragonfly,
150149 .fuchsia,
151150 .kfreebsd,
152151 .lv2,
......@@ -215,6 +214,12 @@ pub const Target = struct {
215214 .max = .{ .major = 6, .minor = 6 },
216215 },
217216 },
217 .dragonfly => return .{
218 .semver = .{
219 .min = .{ .major = 5, .minor = 8 },
220 .max = .{ .major = 5, .minor = 8 },
221 },
222 },
218223
219224 .linux => return .{
220225 .linux = .{
lib/std/zig/cross_target.zig+12-10
......@@ -102,7 +102,6 @@ pub const CrossTarget = struct {
102102 .freestanding,
103103 .ananas,
104104 .cloudabi,
105 .dragonfly,
106105 .fuchsia,
107106 .kfreebsd,
108107 .lv2,
......@@ -135,10 +134,11 @@ pub const CrossTarget = struct {
135134 .freebsd,
136135 .macosx,
137136 .ios,
138 .netbsd,
139 .openbsd,
140137 .tvos,
141138 .watchos,
139 .netbsd,
140 .openbsd,
141 .dragonfly,
142142 => {
143143 self.os_version_min = .{ .semver = os.version_range.semver.min };
144144 self.os_version_max = .{ .semver = os.version_range.semver.max };
......@@ -355,8 +355,10 @@ pub const CrossTarget = struct {
355355 }
356356
357357 pub fn getCpuModel(self: CrossTarget) *const Target.Cpu.Model {
358 if (self.cpu_model) |cpu_model| return cpu_model;
359 return self.getCpu().model;
358 return switch (self.cpu_model) {
359 .explicit => |cpu_model| cpu_model,
360 else => self.getCpu().model,
361 };
360362 }
361363
362364 pub fn getCpuFeatures(self: CrossTarget) Target.Cpu.Feature.Set {
......@@ -645,7 +647,7 @@ pub const CrossTarget = struct {
645647 self.glibc_version = SemVer{ .major = major, .minor = minor, .patch = patch };
646648 }
647649
648 pub fn getObjectFormat(self: CrossTarget) ObjectFormat {
650 pub fn getObjectFormat(self: CrossTarget) Target.ObjectFormat {
649651 return Target.getObjectFormatSimple(self.getOsTag(), self.getCpuArch());
650652 }
651653
......@@ -675,9 +677,7 @@ pub const CrossTarget = struct {
675677 .freestanding,
676678 .ananas,
677679 .cloudabi,
678 .dragonfly,
679680 .fuchsia,
680 .ios,
681681 .kfreebsd,
682682 .lv2,
683683 .solaris,
......@@ -692,8 +692,6 @@ pub const CrossTarget = struct {
692692 .amdhsa,
693693 .ps4,
694694 .elfiamcu,
695 .tvos,
696 .watchos,
697695 .mesa3d,
698696 .contiki,
699697 .amdpal,
......@@ -707,9 +705,13 @@ pub const CrossTarget = struct {
707705
708706 .freebsd,
709707 .macosx,
708 .ios,
709 .tvos,
710 .watchos,
710711 .netbsd,
711712 .openbsd,
712713 .linux,
714 .dragonfly,
713715 => {
714716 var range_it = mem.separate(version_text, "...");
715717
lib/std/zig/render.zig+5-4
......@@ -29,7 +29,7 @@ pub fn render(allocator: *mem.Allocator, stream: var, tree: *ast.Tree) (@TypeOf(
2929 source_index: usize,
3030 source: []const u8,
3131
32 fn write(iface_stream: *Stream, bytes: []const u8) StreamError!void {
32 fn write(iface_stream: *Stream, bytes: []const u8) StreamError!usize {
3333 const self = @fieldParentPtr(MyStream, "stream", iface_stream);
3434
3535 if (!self.anything_changed_ptr.*) {
......@@ -45,7 +45,7 @@ pub fn render(allocator: *mem.Allocator, stream: var, tree: *ast.Tree) (@TypeOf(
4545 }
4646 }
4747
48 try self.child_stream.write(bytes);
48 return self.child_stream.writeOnce(bytes);
4949 }
5050 };
5151 var my_stream = MyStream{
......@@ -2443,14 +2443,15 @@ const FindByteOutStream = struct {
24432443 };
24442444 }
24452445
2446 fn writeFn(out_stream: *Stream, bytes: []const u8) Error!void {
2446 fn writeFn(out_stream: *Stream, bytes: []const u8) Error!usize {
24472447 const self = @fieldParentPtr(Self, "stream", out_stream);
2448 if (self.byte_found) return;
2448 if (self.byte_found) return bytes.len;
24492449 self.byte_found = blk: {
24502450 for (bytes) |b|
24512451 if (b == self.byte) break :blk true;
24522452 break :blk false;
24532453 };
2454 return bytes.len;
24542455 }
24552456};
24562457
lib/std/zig/system.zig+1
......@@ -796,6 +796,7 @@ pub const NativeTargetInfo = struct {
796796 error.SystemResources => return error.SystemResources,
797797 error.IsDir => return error.UnableToReadElfFile,
798798 error.BrokenPipe => return error.UnableToReadElfFile,
799 error.Unseekable => return error.UnableToReadElfFile,
799800 error.ConnectionResetByPeer => return error.UnableToReadElfFile,
800801 error.Unexpected => return error.Unexpected,
801802 error.InputOutput => return error.FileSystem,
src-self-hosted/compilation.zig+1-1
......@@ -1176,7 +1176,7 @@ pub const Compilation = struct {
11761176 defer self.gpa().free(zig_dir_path);
11771177
11781178 const tmp_dir = try fs.path.join(self.arena(), &[_][]const u8{ zig_dir_path, comp_dir_name[0..] });
1179 try fs.makePath(self.gpa(), tmp_dir);
1179 try fs.cwd().makePath(tmp_dir);
11801180 return tmp_dir;
11811181 }
11821182
src-self-hosted/introspect.zig+21-2
......@@ -8,13 +8,32 @@ const warn = std.debug.warn;
88
99/// Caller must free result
1010pub fn testZigInstallPrefix(allocator: *mem.Allocator, test_path: []const u8) ![]u8 {
11 const test_zig_dir = try fs.path.join(allocator, &[_][]const u8{ test_path, "lib", "zig" });
11 {
12 const test_zig_dir = try fs.path.join(allocator, &[_][]const u8{ test_path, "lib", "zig" });
13 errdefer allocator.free(test_zig_dir);
14
15 const test_index_file = try fs.path.join(allocator, &[_][]const u8{ test_zig_dir, "std", "std.zig" });
16 defer allocator.free(test_index_file);
17
18 if (fs.cwd().openFile(test_index_file, .{})) |file| {
19 file.close();
20 return test_zig_dir;
21 } else |err| switch (err) {
22 error.FileNotFound => {
23 allocator.free(test_zig_dir);
24 },
25 else => |e| return e,
26 }
27 }
28
29 // Also try without "zig"
30 const test_zig_dir = try fs.path.join(allocator, &[_][]const u8{ test_path, "lib" });
1231 errdefer allocator.free(test_zig_dir);
1332
1433 const test_index_file = try fs.path.join(allocator, &[_][]const u8{ test_zig_dir, "std", "std.zig" });
1534 defer allocator.free(test_index_file);
1635
17 var file = try fs.cwd().openRead(test_index_file);
36 const file = try fs.cwd().openFile(test_index_file, .{});
1837 file.close();
1938
2039 return test_zig_dir;
src-self-hosted/print_targets.zig+35-46
......@@ -4,6 +4,9 @@ const io = std.io;
44const mem = std.mem;
55const Allocator = mem.Allocator;
66const Target = std.Target;
7const assert = std.debug.assert;
8
9const introspect = @import("introspect.zig");
710
811// TODO this is hard-coded until self-hosted gains this information canonically
912const available_libcs = [_][]const u8{
......@@ -55,57 +58,40 @@ const available_libcs = [_][]const u8{
5558 "x86_64-windows-gnu",
5659};
5760
58// TODO this is hard-coded until self-hosted gains this information canonically
59const available_glibcs = [_][]const u8{
60 "2.0",
61 "2.1",
62 "2.1.1",
63 "2.1.2",
64 "2.1.3",
65 "2.2",
66 "2.2.1",
67 "2.2.2",
68 "2.2.3",
69 "2.2.4",
70 "2.2.5",
71 "2.2.6",
72 "2.3",
73 "2.3.2",
74 "2.3.3",
75 "2.3.4",
76 "2.4",
77 "2.5",
78 "2.6",
79 "2.7",
80 "2.8",
81 "2.9",
82 "2.10",
83 "2.11",
84 "2.12",
85 "2.13",
86 "2.14",
87 "2.15",
88 "2.16",
89 "2.17",
90 "2.18",
91 "2.19",
92 "2.22",
93 "2.23",
94 "2.24",
95 "2.25",
96 "2.26",
97 "2.27",
98 "2.28",
99 "2.29",
100 "2.30",
101};
102
10361pub fn cmdTargets(
10462 allocator: *Allocator,
10563 args: []const []const u8,
10664 stdout: *io.OutStream(fs.File.WriteError),
10765 native_target: Target,
10866) !void {
67 const available_glibcs = blk: {
68 const zig_lib_dir = introspect.resolveZigLibDir(allocator) catch |err| {
69 std.debug.warn("unable to find zig installation directory: {}\n", .{@errorName(err)});
70 std.process.exit(1);
71 };
72 defer allocator.free(zig_lib_dir);
73
74 var dir = try std.fs.cwd().openDirList(zig_lib_dir);
75 defer dir.close();
76
77 const vers_txt = try dir.readFileAlloc(allocator, "libc/glibc/vers.txt", 10 * 1024);
78 defer allocator.free(vers_txt);
79
80 var list = std.ArrayList(std.builtin.Version).init(allocator);
81 defer list.deinit();
82
83 var it = mem.tokenize(vers_txt, "\r\n");
84 while (it.next()) |line| {
85 const prefix = "GLIBC_";
86 assert(mem.startsWith(u8, line, prefix));
87 const adjusted_line = line[prefix.len..];
88 const ver = try std.builtin.Version.parse(adjusted_line);
89 try list.append(ver);
90 }
91 break :blk list.toOwnedSlice();
92 };
93 defer allocator.free(available_glibcs);
94
10995 const BOS = io.BufferedOutStream(fs.File.WriteError);
11096 var bos = BOS.init(stdout);
11197 var jws = std.json.WriteStream(BOS.Stream, 6).init(&bos.stream);
......@@ -150,7 +136,10 @@ pub fn cmdTargets(
150136 try jws.beginArray();
151137 for (available_glibcs) |glibc| {
152138 try jws.arrayElem();
153 try jws.emitString(glibc);
139
140 const tmp = try std.fmt.allocPrint(allocator, "{}", .{glibc});
141 defer allocator.free(tmp);
142 try jws.emitString(tmp);
154143 }
155144 try jws.endArray();
156145
src-self-hosted/test.zig+3-3
......@@ -56,7 +56,7 @@ pub const TestContext = struct {
5656 self.zig_lib_dir = try introspect.resolveZigLibDir(allocator);
5757 errdefer allocator.free(self.zig_lib_dir);
5858
59 try std.fs.makePath(allocator, tmp_dir_name);
59 try std.fs.cwd().makePath(tmp_dir_name);
6060 errdefer std.fs.deleteTree(tmp_dir_name) catch {};
6161 }
6262
......@@ -85,7 +85,7 @@ pub const TestContext = struct {
8585 const file1_path = try std.fs.path.join(allocator, [_][]const u8{ tmp_dir_name, file_index, file1 });
8686
8787 if (std.fs.path.dirname(file1_path)) |dirname| {
88 try std.fs.makePath(allocator, dirname);
88 try std.fs.cwd().makePath(dirname);
8989 }
9090
9191 // TODO async I/O
......@@ -119,7 +119,7 @@ pub const TestContext = struct {
119119
120120 const output_file = try std.fmt.allocPrint(allocator, "{}-out{}", .{ file1_path, (Target{ .Native = {} }).exeFileExt() });
121121 if (std.fs.path.dirname(file1_path)) |dirname| {
122 try std.fs.makePath(allocator, dirname);
122 try std.fs.cwd().makePath(dirname);
123123 }
124124
125125 // TODO async I/O
src/codegen.cpp+59-51
......@@ -10386,6 +10386,61 @@ static void resolve_out_paths(CodeGen *g) {
1038610386 }
1038710387}
1038810388
10389static void output_type_information(CodeGen *g) {
10390 if (g->enable_dump_analysis) {
10391 const char *analysis_json_filename = buf_ptr(buf_sprintf("%s" OS_SEP "%s-analysis.json",
10392 buf_ptr(g->output_dir), buf_ptr(g->root_out_name)));
10393 FILE *f = fopen(analysis_json_filename, "wb");
10394 if (f == nullptr) {
10395 fprintf(stderr, "Unable to open '%s': %s\n", analysis_json_filename, strerror(errno));
10396 exit(1);
10397 }
10398 zig_print_analysis_dump(g, f, " ", "\n");
10399 if (fclose(f) != 0) {
10400 fprintf(stderr, "Unable to write '%s': %s\n", analysis_json_filename, strerror(errno));
10401 exit(1);
10402 }
10403 }
10404 if (g->enable_doc_generation) {
10405 Error err;
10406 Buf *doc_dir_path = buf_sprintf("%s" OS_SEP "docs", buf_ptr(g->output_dir));
10407 if ((err = os_make_path(doc_dir_path))) {
10408 fprintf(stderr, "Unable to create directory %s: %s\n", buf_ptr(doc_dir_path), err_str(err));
10409 exit(1);
10410 }
10411 Buf *index_html_src_path = buf_sprintf("%s" OS_SEP "special" OS_SEP "docs" OS_SEP "index.html",
10412 buf_ptr(g->zig_std_dir));
10413 Buf *index_html_dest_path = buf_sprintf("%s" OS_SEP "index.html", buf_ptr(doc_dir_path));
10414 Buf *main_js_src_path = buf_sprintf("%s" OS_SEP "special" OS_SEP "docs" OS_SEP "main.js",
10415 buf_ptr(g->zig_std_dir));
10416 Buf *main_js_dest_path = buf_sprintf("%s" OS_SEP "main.js", buf_ptr(doc_dir_path));
10417
10418 if ((err = os_copy_file(index_html_src_path, index_html_dest_path))) {
10419 fprintf(stderr, "Unable to copy %s to %s: %s\n", buf_ptr(index_html_src_path),
10420 buf_ptr(index_html_dest_path), err_str(err));
10421 exit(1);
10422 }
10423 if ((err = os_copy_file(main_js_src_path, main_js_dest_path))) {
10424 fprintf(stderr, "Unable to copy %s to %s: %s\n", buf_ptr(main_js_src_path),
10425 buf_ptr(main_js_dest_path), err_str(err));
10426 exit(1);
10427 }
10428 const char *data_js_filename = buf_ptr(buf_sprintf("%s" OS_SEP "data.js", buf_ptr(doc_dir_path)));
10429 FILE *f = fopen(data_js_filename, "wb");
10430 if (f == nullptr) {
10431 fprintf(stderr, "Unable to open '%s': %s\n", data_js_filename, strerror(errno));
10432 exit(1);
10433 }
10434 fprintf(f, "zigAnalysis=");
10435 zig_print_analysis_dump(g, f, "", "");
10436 fprintf(f, ";");
10437 if (fclose(f) != 0) {
10438 fprintf(stderr, "Unable to write '%s': %s\n", data_js_filename, strerror(errno));
10439 exit(1);
10440 }
10441 }
10442}
10443
1038910444void codegen_build_and_link(CodeGen *g) {
1039010445 Error err;
1039110446 assert(g->out_type != OutTypeUnknown);
......@@ -10460,6 +10515,10 @@ void codegen_build_and_link(CodeGen *g) {
1046010515 }
1046110516 resolve_out_paths(g);
1046210517
10518 if (g->enable_dump_analysis || g->enable_doc_generation) {
10519 output_type_information(g);
10520 }
10521
1046310522 if (need_llvm_module(g)) {
1046410523 codegen_add_time_event(g, "Code Generation");
1046510524 {
......@@ -10487,57 +10546,6 @@ void codegen_build_and_link(CodeGen *g) {
1048710546 gen_h_file(g);
1048810547 }
1048910548 }
10490 if (g->enable_dump_analysis) {
10491 const char *analysis_json_filename = buf_ptr(buf_sprintf("%s" OS_SEP "%s-analysis.json",
10492 buf_ptr(g->output_dir), buf_ptr(g->root_out_name)));
10493 FILE *f = fopen(analysis_json_filename, "wb");
10494 if (f == nullptr) {
10495 fprintf(stderr, "Unable to open '%s': %s\n", analysis_json_filename, strerror(errno));
10496 exit(1);
10497 }
10498 zig_print_analysis_dump(g, f, " ", "\n");
10499 if (fclose(f) != 0) {
10500 fprintf(stderr, "Unable to write '%s': %s\n", analysis_json_filename, strerror(errno));
10501 exit(1);
10502 }
10503 }
10504 if (g->enable_doc_generation) {
10505 Buf *doc_dir_path = buf_sprintf("%s" OS_SEP "docs", buf_ptr(g->output_dir));
10506 if ((err = os_make_path(doc_dir_path))) {
10507 fprintf(stderr, "Unable to create directory %s: %s\n", buf_ptr(doc_dir_path), err_str(err));
10508 exit(1);
10509 }
10510 Buf *index_html_src_path = buf_sprintf("%s" OS_SEP "special" OS_SEP "docs" OS_SEP "index.html",
10511 buf_ptr(g->zig_std_dir));
10512 Buf *index_html_dest_path = buf_sprintf("%s" OS_SEP "index.html", buf_ptr(doc_dir_path));
10513 Buf *main_js_src_path = buf_sprintf("%s" OS_SEP "special" OS_SEP "docs" OS_SEP "main.js",
10514 buf_ptr(g->zig_std_dir));
10515 Buf *main_js_dest_path = buf_sprintf("%s" OS_SEP "main.js", buf_ptr(doc_dir_path));
10516
10517 if ((err = os_copy_file(index_html_src_path, index_html_dest_path))) {
10518 fprintf(stderr, "Unable to copy %s to %s: %s\n", buf_ptr(index_html_src_path),
10519 buf_ptr(index_html_dest_path), err_str(err));
10520 exit(1);
10521 }
10522 if ((err = os_copy_file(main_js_src_path, main_js_dest_path))) {
10523 fprintf(stderr, "Unable to copy %s to %s: %s\n", buf_ptr(main_js_src_path),
10524 buf_ptr(main_js_dest_path), err_str(err));
10525 exit(1);
10526 }
10527 const char *data_js_filename = buf_ptr(buf_sprintf("%s" OS_SEP "data.js", buf_ptr(doc_dir_path)));
10528 FILE *f = fopen(data_js_filename, "wb");
10529 if (f == nullptr) {
10530 fprintf(stderr, "Unable to open '%s': %s\n", data_js_filename, strerror(errno));
10531 exit(1);
10532 }
10533 fprintf(f, "zigAnalysis=");
10534 zig_print_analysis_dump(g, f, "", "");
10535 fprintf(f, ";");
10536 if (fclose(f) != 0) {
10537 fprintf(stderr, "Unable to write '%s': %s\n", data_js_filename, strerror(errno));
10538 exit(1);
10539 }
10540 }
1054110549
1054210550 // If we're outputting assembly or llvm IR we skip linking.
1054310551 // If we're making a library or executable we must link.
test/cli.zig+1-1
......@@ -37,7 +37,7 @@ pub fn main() !void {
3737 };
3838 for (test_fns) |testFn| {
3939 try fs.deleteTree(dir_path);
40 try fs.makeDir(dir_path);
40 try fs.cwd().makeDir(dir_path);
4141 try testFn(zig_exe, dir_path);
4242 }
4343}
test/standalone/cat/main.zig+2-1
......@@ -42,6 +42,7 @@ fn usage(exe: []const u8) !void {
4242 return error.Invalid;
4343}
4444
45// TODO use copy_file_range
4546fn cat_file(stdout: fs.File, file: fs.File) !void {
4647 var buf: [1024 * 4]u8 = undefined;
4748
......@@ -55,7 +56,7 @@ fn cat_file(stdout: fs.File, file: fs.File) !void {
5556 break;
5657 }
5758
58 stdout.write(buf[0..bytes_read]) catch |err| {
59 stdout.writeAll(buf[0..bytes_read]) catch |err| {
5960 warn("Unable to write to stdout: {}\n", .{@errorName(err)});
6061 return err;
6162 };
test/standalone/hello_world/hello.zig+1-4
......@@ -1,8 +1,5 @@
11const std = @import("std");
22
33pub fn main() !void {
4 const stdout_file = std.io.getStdOut();
5 // If this program encounters pipe failure when printing to stdout, exit
6 // with an error.
7 try stdout_file.write("Hello, world!\n");
4 try std.io.getStdOut().writeAll("Hello, World!\n");
85}
tools/process_headers.zig+20-19
......@@ -11,10 +11,9 @@
1111// You'll then have to manually update Zig source repo with these new files.
1212
1313const std = @import("std");
14const builtin = @import("builtin");
15const Arch = builtin.Arch;
16const Abi = builtin.Abi;
17const Os = builtin.Os;
14const Arch = std.Target.Cpu.Arch;
15const Abi = std.Target.Abi;
16const OsTag = std.Target.Os.Tag;
1817const assert = std.debug.assert;
1918
2019const LibCTarget = struct {
......@@ -29,12 +28,12 @@ const MultiArch = union(enum) {
2928 mips,
3029 mips64,
3130 powerpc64,
32 specific: @TagType(Arch),
31 specific: Arch,
3332
3433 fn eql(a: MultiArch, b: MultiArch) bool {
3534 if (@enumToInt(a) != @enumToInt(b))
3635 return false;
37 if (@TagType(MultiArch)(a) != .specific)
36 if (a != .specific)
3837 return true;
3938 return a.specific == b.specific;
4039 }
......@@ -221,7 +220,7 @@ const musl_targets = [_]LibCTarget{
221220
222221const DestTarget = struct {
223222 arch: MultiArch,
224 os: Os,
223 os: OsTag,
225224 abi: Abi,
226225
227226 fn hash(a: DestTarget) u32 {
......@@ -305,8 +304,8 @@ pub fn main() !void {
305304 // TODO compiler crashed when I wrote this the canonical way
306305 var libc_targets: []const LibCTarget = undefined;
307306 switch (vendor) {
308 .musl => libc_targets = musl_targets,
309 .glibc => libc_targets = glibc_targets,
307 .musl => libc_targets = &musl_targets,
308 .glibc => libc_targets = &glibc_targets,
310309 }
311310
312311 var path_table = PathTable.init(allocator);
......@@ -340,15 +339,17 @@ pub fn main() !void {
340339 try dir_stack.append(target_include_dir);
341340
342341 while (dir_stack.popOrNull()) |full_dir_name| {
343 var dir = std.fs.Dir.cwd().openDirList(full_dir_name) catch |err| switch (err) {
342 var dir = std.fs.cwd().openDirList(full_dir_name) catch |err| switch (err) {
344343 error.FileNotFound => continue :search,
345344 error.AccessDenied => continue :search,
346345 else => return err,
347346 };
348347 defer dir.close();
349348
350 while (try dir.next()) |entry| {
351 const full_path = try std.fs.path.join(allocator, [_][]const u8{ full_dir_name, entry.name });
349 var dir_it = dir.iterate();
350
351 while (try dir_it.next()) |entry| {
352 const full_path = try std.fs.path.join(allocator, &[_][]const u8{ full_dir_name, entry.name });
352353 switch (entry.kind) {
353354 .Directory => try dir_stack.append(full_path),
354355 .File => {
......@@ -396,8 +397,8 @@ pub fn main() !void {
396397 std.debug.warn("warning: libc target not found: {}\n", .{libc_target.name});
397398 }
398399 }
399 std.debug.warn("summary: {Bi:2} could be reduced to {Bi:2}\n", .{total_bytes, total_bytes - max_bytes_saved});
400 try std.fs.makePath(allocator, out_dir);
400 std.debug.warn("summary: {Bi:2} could be reduced to {Bi:2}\n", .{ total_bytes, total_bytes - max_bytes_saved });
401 try std.fs.cwd().makePath(out_dir);
401402
402403 var missed_opportunity_bytes: usize = 0;
403404 // 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 {
417418 var best_contents = contents_list.popOrNull().?;
418419 if (best_contents.hit_count > 1) {
419420 // worth it to make it generic
420 const full_path = try std.fs.path.join(allocator, [_][]const u8{ out_dir, generic_name, path_kv.key });
421 try std.fs.makePath(allocator, std.fs.path.dirname(full_path).?);
421 const full_path = try std.fs.path.join(allocator, &[_][]const u8{ out_dir, generic_name, path_kv.key });
422 try std.fs.cwd().makePath(std.fs.path.dirname(full_path).?);
422423 try std.io.writeFile(full_path, best_contents.bytes);
423424 best_contents.is_generic = true;
424425 while (contents_list.popOrNull()) |contender| {
425426 if (contender.hit_count > 1) {
426427 const this_missed_bytes = contender.hit_count * contender.bytes.len;
427428 missed_opportunity_bytes += this_missed_bytes;
428 std.debug.warn("Missed opportunity ({Bi:2}): {}\n", .{this_missed_bytes, path_kv.key});
429 std.debug.warn("Missed opportunity ({Bi:2}): {}\n", .{ this_missed_bytes, path_kv.key });
429430 } else break;
430431 }
431432 }
......@@ -444,8 +445,8 @@ pub fn main() !void {
444445 @tagName(dest_target.os),
445446 @tagName(dest_target.abi),
446447 });
447 const full_path = try std.fs.path.join(allocator, [_][]const u8{ out_dir, out_subpath, path_kv.key });
448 try std.fs.makePath(allocator, std.fs.path.dirname(full_path).?);
448 const full_path = try std.fs.path.join(allocator, &[_][]const u8{ out_dir, out_subpath, path_kv.key });
449 try std.fs.cwd().makePath(std.fs.path.dirname(full_path).?);
449450 try std.io.writeFile(full_path, contents.bytes);
450451 }
451452 }
tools/update_glibc.zig+38-35
......@@ -1,5 +1,4 @@
11const std = @import("std");
2const builtin = @import("builtin");
32const fs = std.fs;
43const fmt = std.fmt;
54const assert = std.debug.assert;
......@@ -11,8 +10,8 @@ const AbiList = struct {
1110 path: []const u8,
1211};
1312const ZigTarget = struct {
14 arch: @TagType(builtin.Arch),
15 abi: builtin.Abi,
13 arch: std.Target.Cpu.Arch,
14 abi: std.Target.Abi,
1615};
1716
1817const lib_names = [_][]const u8{
......@@ -27,18 +26,18 @@ const lib_names = [_][]const u8{
2726// n64/n32 are hardcoded elsewhere, based on .gnuabi64/.gnuabin32
2827const abi_lists = [_]AbiList{
2928 AbiList{
30 .targets = [_]ZigTarget{
29 .targets = &[_]ZigTarget{
3130 ZigTarget{ .arch = .aarch64, .abi = .gnu },
3231 ZigTarget{ .arch = .aarch64_be, .abi = .gnu },
3332 },
3433 .path = "aarch64",
3534 },
3635 AbiList{
37 .targets = [_]ZigTarget{ZigTarget{ .arch = .s390x, .abi = .gnu }},
36 .targets = &[_]ZigTarget{ZigTarget{ .arch = .s390x, .abi = .gnu }},
3837 .path = "s390/s390-64",
3938 },
4039 AbiList{
41 .targets = [_]ZigTarget{
40 .targets = &[_]ZigTarget{
4241 ZigTarget{ .arch = .arm, .abi = .gnueabi },
4342 ZigTarget{ .arch = .armeb, .abi = .gnueabi },
4443 ZigTarget{ .arch = .arm, .abi = .gnueabihf },
......@@ -47,66 +46,66 @@ const abi_lists = [_]AbiList{
4746 .path = "arm",
4847 },
4948 AbiList{
50 .targets = [_]ZigTarget{
49 .targets = &[_]ZigTarget{
5150 ZigTarget{ .arch = .sparc, .abi = .gnu },
5251 ZigTarget{ .arch = .sparcel, .abi = .gnu },
5352 },
5453 .path = "sparc/sparc32",
5554 },
5655 AbiList{
57 .targets = [_]ZigTarget{ZigTarget{ .arch = .sparcv9, .abi = .gnu }},
56 .targets = &[_]ZigTarget{ZigTarget{ .arch = .sparcv9, .abi = .gnu }},
5857 .path = "sparc/sparc64",
5958 },
6059 AbiList{
61 .targets = [_]ZigTarget{
60 .targets = &[_]ZigTarget{
6261 ZigTarget{ .arch = .mips64el, .abi = .gnuabi64 },
6362 ZigTarget{ .arch = .mips64, .abi = .gnuabi64 },
6463 },
6564 .path = "mips/mips64",
6665 },
6766 AbiList{
68 .targets = [_]ZigTarget{
67 .targets = &[_]ZigTarget{
6968 ZigTarget{ .arch = .mips64el, .abi = .gnuabin32 },
7069 ZigTarget{ .arch = .mips64, .abi = .gnuabin32 },
7170 },
7271 .path = "mips/mips64",
7372 },
7473 AbiList{
75 .targets = [_]ZigTarget{
74 .targets = &[_]ZigTarget{
7675 ZigTarget{ .arch = .mipsel, .abi = .gnueabihf },
7776 ZigTarget{ .arch = .mips, .abi = .gnueabihf },
7877 },
7978 .path = "mips/mips32",
8079 },
8180 AbiList{
82 .targets = [_]ZigTarget{
81 .targets = &[_]ZigTarget{
8382 ZigTarget{ .arch = .mipsel, .abi = .gnueabi },
8483 ZigTarget{ .arch = .mips, .abi = .gnueabi },
8584 },
8685 .path = "mips/mips32",
8786 },
8887 AbiList{
89 .targets = [_]ZigTarget{ZigTarget{ .arch = .x86_64, .abi = .gnu }},
88 .targets = &[_]ZigTarget{ZigTarget{ .arch = .x86_64, .abi = .gnu }},
9089 .path = "x86_64/64",
9190 },
9291 AbiList{
93 .targets = [_]ZigTarget{ZigTarget{ .arch = .x86_64, .abi = .gnux32 }},
92 .targets = &[_]ZigTarget{ZigTarget{ .arch = .x86_64, .abi = .gnux32 }},
9493 .path = "x86_64/x32",
9594 },
9695 AbiList{
97 .targets = [_]ZigTarget{ZigTarget{ .arch = .i386, .abi = .gnu }},
96 .targets = &[_]ZigTarget{ZigTarget{ .arch = .i386, .abi = .gnu }},
9897 .path = "i386",
9998 },
10099 AbiList{
101 .targets = [_]ZigTarget{ZigTarget{ .arch = .powerpc64le, .abi = .gnu }},
100 .targets = &[_]ZigTarget{ZigTarget{ .arch = .powerpc64le, .abi = .gnu }},
102101 .path = "powerpc/powerpc64/le",
103102 },
104103 AbiList{
105 .targets = [_]ZigTarget{ZigTarget{ .arch = .powerpc64, .abi = .gnu }},
104 .targets = &[_]ZigTarget{ZigTarget{ .arch = .powerpc64, .abi = .gnu }},
106105 .path = "powerpc/powerpc64/be",
107106 },
108107 AbiList{
109 .targets = [_]ZigTarget{
108 .targets = &[_]ZigTarget{
110109 ZigTarget{ .arch = .powerpc, .abi = .gnueabi },
111110 ZigTarget{ .arch = .powerpc, .abi = .gnueabihf },
112111 },
......@@ -137,8 +136,8 @@ pub fn main() !void {
137136 const in_glibc_dir = args[1]; // path to the unzipped tarball of glibc, e.g. ~/downloads/glibc-2.25
138137 const zig_src_dir = args[2]; // path to the source checkout of zig, lib dir, e.g. ~/zig-src/lib
139138
140 const prefix = try fs.path.join(allocator, [_][]const u8{ in_glibc_dir, "sysdeps", "unix", "sysv", "linux" });
141 const glibc_out_dir = try fs.path.join(allocator, [_][]const u8{ zig_src_dir, "libc", "glibc" });
139 const prefix = try fs.path.join(allocator, &[_][]const u8{ in_glibc_dir, "sysdeps", "unix", "sysv", "linux" });
140 const glibc_out_dir = try fs.path.join(allocator, &[_][]const u8{ zig_src_dir, "libc", "glibc" });
142141
143142 var global_fn_set = std.StringHashMap(Function).init(allocator);
144143 var global_ver_set = std.StringHashMap(usize).init(allocator);
......@@ -158,26 +157,30 @@ pub fn main() !void {
158157 const basename = try fmt.allocPrint(allocator, "lib{}.abilist", .{lib_name});
159158 const abi_list_filename = blk: {
160159 if (abi_list.targets[0].abi == .gnuabi64 and std.mem.eql(u8, lib_name, "c")) {
161 break :blk try fs.path.join(allocator, [_][]const u8{ prefix, abi_list.path, "n64", basename });
160 break :blk try fs.path.join(allocator, &[_][]const u8{ prefix, abi_list.path, "n64", basename });
162161 } else if (abi_list.targets[0].abi == .gnuabin32 and std.mem.eql(u8, lib_name, "c")) {
163 break :blk try fs.path.join(allocator, [_][]const u8{ prefix, abi_list.path, "n32", basename });
162 break :blk try fs.path.join(allocator, &[_][]const u8{ prefix, abi_list.path, "n32", basename });
164163 } else if (abi_list.targets[0].arch != .arm and
165164 abi_list.targets[0].abi == .gnueabihf and
166165 (std.mem.eql(u8, lib_name, "c") or
167166 (std.mem.eql(u8, lib_name, "m") and abi_list.targets[0].arch == .powerpc)))
168167 {
169 break :blk try fs.path.join(allocator, [_][]const u8{ prefix, abi_list.path, "fpu", basename });
168 break :blk try fs.path.join(allocator, &[_][]const u8{ prefix, abi_list.path, "fpu", basename });
170169 } else if (abi_list.targets[0].arch != .arm and
171170 abi_list.targets[0].abi == .gnueabi and
172171 (std.mem.eql(u8, lib_name, "c") or
173172 (std.mem.eql(u8, lib_name, "m") and abi_list.targets[0].arch == .powerpc)))
174173 {
175 break :blk try fs.path.join(allocator, [_][]const u8{ prefix, abi_list.path, "nofpu", basename });
174 break :blk try fs.path.join(allocator, &[_][]const u8{ prefix, abi_list.path, "nofpu", basename });
175 } else if (abi_list.targets[0].arch == .arm) {
176 break :blk try fs.path.join(allocator, &[_][]const u8{ prefix, abi_list.path, "le", basename });
177 } else if (abi_list.targets[0].arch == .armeb) {
178 break :blk try fs.path.join(allocator, &[_][]const u8{ prefix, abi_list.path, "be", basename });
176179 }
177 break :blk try fs.path.join(allocator, [_][]const u8{ prefix, abi_list.path, basename });
180 break :blk try fs.path.join(allocator, &[_][]const u8{ prefix, abi_list.path, basename });
178181 };
179182 const contents = std.io.readFileAlloc(allocator, abi_list_filename) catch |err| {
180 std.debug.warn("unable to open {}: {}\n", .{abi_list_filename, err});
183 std.debug.warn("unable to open {}: {}\n", .{ abi_list_filename, err });
181184 std.process.exit(1);
182185 };
183186 var lines_it = std.mem.tokenize(contents, "\n");
......@@ -228,8 +231,8 @@ pub fn main() !void {
228231 break :blk list.toSliceConst();
229232 };
230233 {
231 const vers_txt_path = try fs.path.join(allocator, [_][]const u8{ glibc_out_dir, "vers.txt" });
232 const vers_txt_file = try fs.File.openWrite(vers_txt_path);
234 const vers_txt_path = try fs.path.join(allocator, &[_][]const u8{ glibc_out_dir, "vers.txt" });
235 const vers_txt_file = try fs.cwd().createFile(vers_txt_path, .{});
233236 defer vers_txt_file.close();
234237 var buffered = std.io.BufferedOutStream(fs.File.WriteError).init(&vers_txt_file.outStream().stream);
235238 const vers_txt = &buffered.stream;
......@@ -240,15 +243,15 @@ pub fn main() !void {
240243 try buffered.flush();
241244 }
242245 {
243 const fns_txt_path = try fs.path.join(allocator, [_][]const u8{ glibc_out_dir, "fns.txt" });
244 const fns_txt_file = try fs.File.openWrite(fns_txt_path);
246 const fns_txt_path = try fs.path.join(allocator, &[_][]const u8{ glibc_out_dir, "fns.txt" });
247 const fns_txt_file = try fs.cwd().createFile(fns_txt_path, .{});
245248 defer fns_txt_file.close();
246249 var buffered = std.io.BufferedOutStream(fs.File.WriteError).init(&fns_txt_file.outStream().stream);
247250 const fns_txt = &buffered.stream;
248251 for (global_fn_list) |name, i| {
249252 const kv = global_fn_set.get(name).?;
250253 kv.value.index = i;
251 try fns_txt.print("{} {}\n", .{name, kv.value.lib});
254 try fns_txt.print("{} {}\n", .{ name, kv.value.lib });
252255 }
253256 try buffered.flush();
254257 }
......@@ -271,8 +274,8 @@ pub fn main() !void {
271274 }
272275
273276 {
274 const abilist_txt_path = try fs.path.join(allocator, [_][]const u8{ glibc_out_dir, "abi.txt" });
275 const abilist_txt_file = try fs.File.openWrite(abilist_txt_path);
277 const abilist_txt_path = try fs.path.join(allocator, &[_][]const u8{ glibc_out_dir, "abi.txt" });
278 const abilist_txt_file = try fs.cwd().createFile(abilist_txt_path, .{});
276279 defer abilist_txt_file.close();
277280 var buffered = std.io.BufferedOutStream(fs.File.WriteError).init(&abilist_txt_file.outStream().stream);
278281 const abilist_txt = &buffered.stream;
......@@ -282,7 +285,7 @@ pub fn main() !void {
282285 const fn_vers_list = &target_functions.get(@ptrToInt(abi_list)).?.value.fn_vers_list;
283286 for (abi_list.targets) |target, it_i| {
284287 if (it_i != 0) try abilist_txt.writeByte(' ');
285 try abilist_txt.print("{}-linux-{}", .{@tagName(target.arch), @tagName(target.abi)});
288 try abilist_txt.print("{}-linux-{}", .{ @tagName(target.arch), @tagName(target.abi) });
286289 }
287290 try abilist_txt.writeByte('\n');
288291 // next, each line implicitly corresponds to a function
......@@ -304,7 +307,7 @@ pub fn main() !void {
304307}
305308
306309pub fn strCmpLessThan(a: []const u8, b: []const u8) bool {
307 return std.mem.compare(u8, a, b) == .LessThan;
310 return std.mem.order(u8, a, b) == .lt;
308311}
309312
310313pub fn versionLessThan(a: []const u8, b: []const u8) bool {