authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-09-07 14:59:38-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-09-07 14:59:38-04:00
log45ab9d5fd6c581d6879eae8a58c67a7b5b18fadf
tree6841ae04163a30f08689e71cbfbd07032e932fc2
parent99fd42404a5aa98e15bc1ceaf56bcc0fe570943f
signaturelock-open Commit is signed but in an unrecognized format.

update glibc headers to 2.30


89 files changed, 1581 insertions(+), 1709 deletions(-)

lib/libc/include/aarch64-linux-gnu/bits/hwcap.h+4-1
......@@ -50,4 +50,7 @@
5050#define HWCAP_USCAT (1 << 25)
5151#define HWCAP_ILRCPC (1 << 26)
5252#define HWCAP_FLAGM (1 << 27)
53#define HWCAP_SSBS (1 << 28)
\ No newline at end of file
53#define HWCAP_SSBS (1 << 28)
54#define HWCAP_SB (1 << 29)
55#define HWCAP_PACA (1 << 30)
56#define HWCAP_PACG (1UL << 31)
\ No newline at end of file
lib/libc/include/aarch64-linux-gnu/gnu/stubs-lp64.h-6
......@@ -13,15 +13,9 @@
1313#define __stub___compat_query_module
1414#define __stub___compat_uselib
1515#define __stub_chflags
16#define __stub_fattach
1716#define __stub_fchflags
18#define __stub_fdetach
19#define __stub_getmsg
20#define __stub_getpmsg
2117#define __stub_gtty
2218#define __stub_lchmod
23#define __stub_putmsg
24#define __stub_putpmsg
2519#define __stub_revoke
2620#define __stub_setlogin
2721#define __stub_sigreturn
lib/libc/include/aarch64_be-linux-gnu/bits/hwcap.h+4-1
......@@ -50,4 +50,7 @@
5050#define HWCAP_USCAT (1 << 25)
5151#define HWCAP_ILRCPC (1 << 26)
5252#define HWCAP_FLAGM (1 << 27)
53#define HWCAP_SSBS (1 << 28)
\ No newline at end of file
53#define HWCAP_SSBS (1 << 28)
54#define HWCAP_SB (1 << 29)
55#define HWCAP_PACA (1 << 30)
56#define HWCAP_PACG (1UL << 31)
\ No newline at end of file
lib/libc/include/aarch64_be-linux-gnu/gnu/stubs-lp64_be.h-6
......@@ -13,15 +13,9 @@
1313#define __stub___compat_query_module
1414#define __stub___compat_uselib
1515#define __stub_chflags
16#define __stub_fattach
1716#define __stub_fchflags
18#define __stub_fdetach
19#define __stub_getmsg
20#define __stub_getpmsg
2117#define __stub_gtty
2218#define __stub_lchmod
23#define __stub_putmsg
24#define __stub_putpmsg
2519#define __stub_revoke
2620#define __stub_setlogin
2721#define __stub_sigreturn
lib/libc/include/generic-glibc/bits/dirent_ext.h created+33
......@@ -0,0 +1,33 @@
1/* System-specific extensions of <dirent.h>. Linux version.
2 Copyright (C) 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 _DIRENT_H
20# error "Never include <bits/dirent_ext.h> directly; use <dirent.h> instead."
21#endif
22
23__BEGIN_DECLS
24
25#ifdef __USE_GNU
26/* Read from the directory descriptor FD into LENGTH bytes at BUFFER.
27 Return the number of bytes read on success (0 for end of
28 directory), and -1 for failure. */
29extern __ssize_t getdents64 (int __fd, void *__buffer, size_t __length)
30 __THROW __nonnull ((2));
31#endif
32
33__END_DECLS
\ No newline at end of file
lib/libc/include/generic-glibc/bits/fcntl-linux.h+2
......@@ -284,6 +284,8 @@ struct f_owner_ex
284284# define F_SEAL_SHRINK 0x0002 /* Prevent file from shrinking. */
285285# define F_SEAL_GROW 0x0004 /* Prevent file from growing. */
286286# define F_SEAL_WRITE 0x0008 /* Prevent writes. */
287# define F_SEAL_FUTURE_WRITE 0x0010 /* Prevent future writes while
288 mapped. */
287289#endif
288290
289291#ifdef __USE_GNU
lib/libc/include/generic-glibc/bits/in.h+1
......@@ -192,6 +192,7 @@ struct in_pktinfo
192192#define IPV6_JOIN_ANYCAST 27
193193#define IPV6_LEAVE_ANYCAST 28
194194#define IPV6_MULTICAST_ALL 29
195#define IPV6_ROUTER_ALERT_ISOLATE 30
195196#define IPV6_IPSEC_POLICY 34
196197#define IPV6_XFRM_POLICY 35
197198#define IPV6_HDRINCL 36
lib/libc/include/generic-glibc/bits/math-vector-fortran.h deleted-19
......@@ -1,19 +0,0 @@
1! Platform-specific declarations of SIMD math functions for Fortran. -*- f90 -*-
2! Copyright (C) 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! No SIMD math functions are available for this platform.
\ No newline at end of file
lib/libc/include/generic-glibc/bits/signal_ext.h created+31
......@@ -0,0 +1,31 @@
1/* System-specific extensions of <signal.h>, Linux version.
2 Copyright (C) 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 _SIGNAL_H
20# error "Never include <bits/signal_ext.h> directly; use <signal.h> instead."
21#endif
22
23#ifdef __USE_GNU
24
25/* Send SIGNAL to the thread TID in the thread group (process)
26 identified by TGID. This function behaves like kill, but also
27 fails with ESRCH if the specified TID does not belong to the
28 specified thread group. */
29extern int tgkill (__pid_t __tgid, __pid_t __tid, int __signal);
30
31#endif /* __USE_GNU */
\ No newline at end of file
lib/libc/include/generic-glibc/bits/socket-constants.h created+38
......@@ -0,0 +1,38 @@
1/* Socket constants which vary among Linux architectures.
2 Copyright (C) 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 _SYS_SOCKET_H
20# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
21#endif
22
23#define SOL_SOCKET 1
24#define SO_ACCEPTCONN 30
25#define SO_BROADCAST 6
26#define SO_DONTROUTE 5
27#define SO_ERROR 4
28#define SO_KEEPALIVE 9
29#define SO_LINGER 13
30#define SO_OOBINLINE 10
31#define SO_RCVBUF 8
32#define SO_RCVLOWAT 18
33#define SO_RCVTIMEO 20
34#define SO_REUSEADDR 2
35#define SO_SNDBUF 7
36#define SO_SNDLOWAT 19
37#define SO_SNDTIMEO 21
38#define SO_TYPE 3
\ No newline at end of file
lib/libc/include/generic-glibc/bits/socket.h+6-92
......@@ -349,98 +349,12 @@ struct ucred
349349};
350350#endif
351351
352/* Ugly workaround for unclean kernel headers. */
353#ifndef __USE_MISC
354# ifndef FIOGETOWN
355# define __SYS_SOCKET_H_undef_FIOGETOWN
356# endif
357# ifndef FIOSETOWN
358# define __SYS_SOCKET_H_undef_FIOSETOWN
359# endif
360# ifndef SIOCATMARK
361# define __SYS_SOCKET_H_undef_SIOCATMARK
362# endif
363# ifndef SIOCGPGRP
364# define __SYS_SOCKET_H_undef_SIOCGPGRP
365# endif
366# ifndef SIOCGSTAMP
367# define __SYS_SOCKET_H_undef_SIOCGSTAMP
368# endif
369# ifndef SIOCGSTAMPNS
370# define __SYS_SOCKET_H_undef_SIOCGSTAMPNS
371# endif
372# ifndef SIOCSPGRP
373# define __SYS_SOCKET_H_undef_SIOCSPGRP
374# endif
375#endif
376#ifndef IOCSIZE_MASK
377# define __SYS_SOCKET_H_undef_IOCSIZE_MASK
378#endif
379#ifndef IOCSIZE_SHIFT
380# define __SYS_SOCKET_H_undef_IOCSIZE_SHIFT
381#endif
382#ifndef IOC_IN
383# define __SYS_SOCKET_H_undef_IOC_IN
384#endif
385#ifndef IOC_INOUT
386# define __SYS_SOCKET_H_undef_IOC_INOUT
387#endif
388#ifndef IOC_OUT
389# define __SYS_SOCKET_H_undef_IOC_OUT
390#endif
391
392/* Get socket manipulation related informations from kernel headers. */
393#include <asm/socket.h>
394
395#ifndef __USE_MISC
396# ifdef __SYS_SOCKET_H_undef_FIOGETOWN
397# undef __SYS_SOCKET_H_undef_FIOGETOWN
398# undef FIOGETOWN
399# endif
400# ifdef __SYS_SOCKET_H_undef_FIOSETOWN
401# undef __SYS_SOCKET_H_undef_FIOSETOWN
402# undef FIOSETOWN
403# endif
404# ifdef __SYS_SOCKET_H_undef_SIOCATMARK
405# undef __SYS_SOCKET_H_undef_SIOCATMARK
406# undef SIOCATMARK
407# endif
408# ifdef __SYS_SOCKET_H_undef_SIOCGPGRP
409# undef __SYS_SOCKET_H_undef_SIOCGPGRP
410# undef SIOCGPGRP
411# endif
412# ifdef __SYS_SOCKET_H_undef_SIOCGSTAMP
413# undef __SYS_SOCKET_H_undef_SIOCGSTAMP
414# undef SIOCGSTAMP
415# endif
416# ifdef __SYS_SOCKET_H_undef_SIOCGSTAMPNS
417# undef __SYS_SOCKET_H_undef_SIOCGSTAMPNS
418# undef SIOCGSTAMPNS
419# endif
420# ifdef __SYS_SOCKET_H_undef_SIOCSPGRP
421# undef __SYS_SOCKET_H_undef_SIOCSPGRP
422# undef SIOCSPGRP
423# endif
424#endif
425#ifdef __SYS_SOCKET_H_undef_IOCSIZE_MASK
426# undef __SYS_SOCKET_H_undef_IOCSIZE_MASK
427# undef IOCSIZE_MASK
428#endif
429#ifdef __SYS_SOCKET_H_undef_IOCSIZE_SHIFT
430# undef __SYS_SOCKET_H_undef_IOCSIZE_SHIFT
431# undef IOCSIZE_SHIFT
432#endif
433#ifdef __SYS_SOCKET_H_undef_IOC_IN
434# undef __SYS_SOCKET_H_undef_IOC_IN
435# undef IOC_IN
436#endif
437#ifdef __SYS_SOCKET_H_undef_IOC_INOUT
438# undef __SYS_SOCKET_H_undef_IOC_INOUT
439# undef IOC_INOUT
440#endif
441#ifdef __SYS_SOCKET_H_undef_IOC_OUT
442# undef __SYS_SOCKET_H_undef_IOC_OUT
443# undef IOC_OUT
352#ifdef __USE_MISC
353# include <bits/types/time_t.h>
354# include <asm/socket.h>
355#else
356# define SO_DEBUG 1
357# include <bits/socket-constants.h>
444358#endif
445359
446360/* Structure used to manipulate the SO_LINGER option. */
lib/libc/include/generic-glibc/bits/statx-generic.h created+60
......@@ -0,0 +1,60 @@
1/* Generic statx-related definitions and declarations.
2 Copyright (C) 2018-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/* This interface is based on <linux/stat.h> in Linux. */
20
21#ifndef _SYS_STAT_H
22# error Never include <bits/statx-generic.h> directly, include <sys/stat.h> instead.
23#endif
24
25#include <bits/types/struct_statx_timestamp.h>
26#include <bits/types/struct_statx.h>
27
28#ifndef STATX_TYPE
29# define STATX_TYPE 0x0001U
30# define STATX_MODE 0x0002U
31# define STATX_NLINK 0x0004U
32# define STATX_UID 0x0008U
33# define STATX_GID 0x0010U
34# define STATX_ATIME 0x0020U
35# define STATX_MTIME 0x0040U
36# define STATX_CTIME 0x0080U
37# define STATX_INO 0x0100U
38# define STATX_SIZE 0x0200U
39# define STATX_BLOCKS 0x0400U
40# define STATX_BASIC_STATS 0x07ffU
41# define STATX_ALL 0x0fffU
42# define STATX_BTIME 0x0800U
43# define STATX__RESERVED 0x80000000U
44
45# define STATX_ATTR_COMPRESSED 0x0004
46# define STATX_ATTR_IMMUTABLE 0x0010
47# define STATX_ATTR_APPEND 0x0020
48# define STATX_ATTR_NODUMP 0x0040
49# define STATX_ATTR_ENCRYPTED 0x0800
50# define STATX_ATTR_AUTOMOUNT 0x1000
51#endif /* !STATX_TYPE */
52
53__BEGIN_DECLS
54
55/* Fill *BUF with information about PATH in DIRFD. */
56int statx (int __dirfd, const char *__restrict __path, int __flags,
57 unsigned int __mask, struct statx *__restrict __buf)
58 __THROW __nonnull ((2, 5));
59
60__END_DECLS
\ No newline at end of file
lib/libc/include/generic-glibc/bits/statx.h+13-67
......@@ -1,4 +1,4 @@
1/* statx-related definitions and declarations.
1/* statx-related definitions and declarations. Linux version.
22 Copyright (C) 2018-2019 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
......@@ -19,73 +19,19 @@
1919/* This interface is based on <linux/stat.h> in Linux. */
2020
2121#ifndef _SYS_STAT_H
22# error Never include <bits/stat.x.h> directly, include <sys/stat.h> instead.
22# error Never include <bits/statx.h> directly, include <sys/stat.h> instead.
2323#endif
2424
25struct statx_timestamp
26{
27 __int64_t tv_sec;
28 __uint32_t tv_nsec;
29 __int32_t __statx_timestamp_pad1[1];
30};
25/* Use the Linux kernel header if available. */
3126
32/* Warning: The kernel may add additional fields to this struct in the
33 future. Only use this struct for calling the statx function, not
34 for storing data. (Expansion will be controlled by the mask
35 argument of the statx function.) */
36struct statx
37{
38 __uint32_t stx_mask;
39 __uint32_t stx_blksize;
40 __uint64_t stx_attributes;
41 __uint32_t stx_nlink;
42 __uint32_t stx_uid;
43 __uint32_t stx_gid;
44 __uint16_t stx_mode;
45 __uint16_t __statx_pad1[1];
46 __uint64_t stx_ino;
47 __uint64_t stx_size;
48 __uint64_t stx_blocks;
49 __uint64_t stx_attributes_mask;
50 struct statx_timestamp stx_atime;
51 struct statx_timestamp stx_btime;
52 struct statx_timestamp stx_ctime;
53 struct statx_timestamp stx_mtime;
54 __uint32_t stx_rdev_major;
55 __uint32_t stx_rdev_minor;
56 __uint32_t stx_dev_major;
57 __uint32_t stx_dev_minor;
58 __uint64_t __statx_pad2[14];
59};
60
61#define STATX_TYPE 0x0001U
62#define STATX_MODE 0x0002U
63#define STATX_NLINK 0x0004U
64#define STATX_UID 0x0008U
65#define STATX_GID 0x0010U
66#define STATX_ATIME 0x0020U
67#define STATX_MTIME 0x0040U
68#define STATX_CTIME 0x0080U
69#define STATX_INO 0x0100U
70#define STATX_SIZE 0x0200U
71#define STATX_BLOCKS 0x0400U
72#define STATX_BASIC_STATS 0x07ffU
73#define STATX_ALL 0x0fffU
74#define STATX_BTIME 0x0800U
75#define STATX__RESERVED 0x80000000U
76
77#define STATX_ATTR_COMPRESSED 0x0004
78#define STATX_ATTR_IMMUTABLE 0x0010
79#define STATX_ATTR_APPEND 0x0020
80#define STATX_ATTR_NODUMP 0x0040
81#define STATX_ATTR_ENCRYPTED 0x0800
82#define STATX_ATTR_AUTOMOUNT 0x1000
83
84__BEGIN_DECLS
85
86/* Fill *BUF with information about PATH in DIRFD. */
87int statx (int __dirfd, const char *__restrict __path, int __flags,
88 unsigned int __mask, struct statx *__restrict __buf)
89 __THROW __nonnull ((2, 5));
27/* Use "" to work around incorrect macro expansion of the
28 __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
34# endif
35#endif
9036
91__END_DECLS
\ No newline at end of file
37#include <bits/statx-generic.h>
\ No newline at end of file
lib/libc/include/generic-glibc/bits/stropts.h deleted-230
......@@ -1,230 +0,0 @@
1/* Copyright (C) 1998-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 _STROPTS_H
19# error "Never include <bits/stropts.h> directly; use <stropts.h> instead."
20#endif
21
22#ifndef _BITS_STROPTS_H
23#define _BITS_STROPTS_H 1
24
25#include <bits/types.h>
26
27/* Macros used as `request' argument to `ioctl'. */
28#define __SID ('S' << 8)
29
30#define I_NREAD (__SID | 1) /* Counts the number of data bytes in the data
31 block in the first message. */
32#define I_PUSH (__SID | 2) /* Push STREAMS module onto top of the current
33 STREAM, just below the STREAM head. */
34#define I_POP (__SID | 3) /* Remove STREAMS module from just below the
35 STREAM head. */
36#define I_LOOK (__SID | 4) /* Retrieve the name of the module just below
37 the STREAM head and place it in a character
38 string. */
39#define I_FLUSH (__SID | 5) /* Flush all input and/or output. */
40#define I_SRDOPT (__SID | 6) /* Sets the read mode. */
41#define I_GRDOPT (__SID | 7) /* Returns the current read mode setting. */
42#define I_STR (__SID | 8) /* Construct an internal STREAMS `ioctl'
43 message and send that message downstream. */
44#define I_SETSIG (__SID | 9) /* Inform the STREAM head that the process
45 wants the SIGPOLL signal issued. */
46#define I_GETSIG (__SID |10) /* Return the events for which the calling
47 process is currently registered to be sent
48 a SIGPOLL signal. */
49#define I_FIND (__SID |11) /* Compares the names of all modules currently
50 present in the STREAM to the name pointed to
51 by `arg'. */
52#define I_LINK (__SID |12) /* Connect two STREAMs. */
53#define I_UNLINK (__SID |13) /* Disconnects the two STREAMs. */
54#define I_PEEK (__SID |15) /* Allows a process to retrieve the information
55 in the first message on the STREAM head read
56 queue without taking the message off the
57 queue. */
58#define I_FDINSERT (__SID |16) /* Create a message from the specified
59 buffer(s), adds information about another
60 STREAM, and send the message downstream. */
61#define I_SENDFD (__SID |17) /* Requests the STREAM associated with `fildes'
62 to send a message, containing a file
63 pointer, to the STREAM head at the other end
64 of a STREAMS pipe. */
65#define I_RECVFD (__SID |14) /* Non-EFT definition. */
66#define I_SWROPT (__SID |19) /* Set the write mode. */
67#define I_GWROPT (__SID |20) /* Return the current write mode setting. */
68#define I_LIST (__SID |21) /* List all the module names on the STREAM, up
69 to and including the topmost driver name. */
70#define I_PLINK (__SID |22) /* Connect two STREAMs with a persistent
71 link. */
72#define I_PUNLINK (__SID |23) /* Disconnect the two STREAMs that were
73 connected with a persistent link. */
74#define I_FLUSHBAND (__SID |28) /* Flush only band specified. */
75#define I_CKBAND (__SID |29) /* Check if the message of a given priority
76 band exists on the STREAM head read
77 queue. */
78#define I_GETBAND (__SID |30) /* Return the priority band of the first
79 message on the STREAM head read queue. */
80#define I_ATMARK (__SID |31) /* See if the current message on the STREAM
81 head read queue is "marked" by some module
82 downstream. */
83#define I_SETCLTIME (__SID |32) /* Set the time the STREAM head will delay when
84 a STREAM is closing and there is data on
85 the write queues. */
86#define I_GETCLTIME (__SID |33) /* Get current value for closing timeout. */
87#define I_CANPUT (__SID |34) /* Check if a certain band is writable. */
88
89
90/* Used in `I_LOOK' request. */
91#define FMNAMESZ 8 /* compatibility w/UnixWare/Solaris. */
92
93/* Flush options. */
94#define FLUSHR 0x01 /* Flush read queues. */
95#define FLUSHW 0x02 /* Flush write queues. */
96#define FLUSHRW 0x03 /* Flush read and write queues. */
97#ifdef __USE_GNU
98# define FLUSHBAND 0x04 /* Flush only specified band. */
99#endif
100
101/* Possible arguments for `I_SETSIG'. */
102#define S_INPUT 0x0001 /* A message, other than a high-priority
103 message, has arrived. */
104#define S_HIPRI 0x0002 /* A high-priority message is present. */
105#define S_OUTPUT 0x0004 /* The write queue for normal data is no longer
106 full. */
107#define S_MSG 0x0008 /* A STREAMS signal message that contains the
108 SIGPOLL signal reaches the front of the
109 STREAM head read queue. */
110#define S_ERROR 0x0010 /* Notification of an error condition. */
111#define S_HANGUP 0x0020 /* Notification of a hangup. */
112#define S_RDNORM 0x0040 /* A normal message has arrived. */
113#define S_WRNORM S_OUTPUT
114#define S_RDBAND 0x0080 /* A message with a non-zero priority has
115 arrived. */
116#define S_WRBAND 0x0100 /* The write queue for a non-zero priority
117 band is no longer full. */
118#define S_BANDURG 0x0200 /* When used in conjunction with S_RDBAND,
119 SIGURG is generated instead of SIGPOLL when
120 a priority message reaches the front of the
121 STREAM head read queue. */
122
123/* Option for `I_PEEK'. */
124#define RS_HIPRI 0x01 /* Only look for high-priority messages. */
125
126/* Options for `I_SRDOPT'. */
127#define RNORM 0x0000 /* Byte-STREAM mode, the default. */
128#define RMSGD 0x0001 /* Message-discard mode. */
129#define RMSGN 0x0002 /* Message-nondiscard mode. */
130#define RPROTDAT 0x0004 /* Deliver the control part of a message as
131 data. */
132#define RPROTDIS 0x0008 /* Discard the control part of a message,
133 delivering any data part. */
134#define RPROTNORM 0x0010 /* Fail `read' with EBADMSG if a message
135 containing a control part is at the front
136 of the STREAM head read queue. */
137#ifdef __USE_GNU
138# define RPROTMASK 0x001C /* The RPROT bits */
139#endif
140
141/* Possible mode for `I_SWROPT'. */
142#define SNDZERO 0x001 /* Send a zero-length message downstream when a
143 `write' of 0 bytes occurs. */
144#ifdef __USE_GNU
145# define SNDPIPE 0x002 /* Send SIGPIPE on write and putmsg if
146 sd_werror is set. */
147#endif
148
149/* Arguments for `I_ATMARK'. */
150#define ANYMARK 0x01 /* Check if the message is marked. */
151#define LASTMARK 0x02 /* Check if the message is the last one marked
152 on the queue. */
153
154/* Argument for `I_UNLINK'. */
155#ifdef __USE_GNU
156# define MUXID_ALL (-1) /* Unlink all STREAMs linked to the STREAM
157 associated with `fildes'. */
158#endif
159
160
161/* Macros for `getmsg', `getpmsg', `putmsg' and `putpmsg'. */
162#define MSG_HIPRI 0x01 /* Send/receive high priority message. */
163#define MSG_ANY 0x02 /* Receive any message. */
164#define MSG_BAND 0x04 /* Receive message from specified band. */
165
166/* Values returned by getmsg and getpmsg */
167#define MORECTL 1 /* More control information is left in
168 message. */
169#define MOREDATA 2 /* More data is left in message. */
170
171
172/* Structure used for the I_FLUSHBAND ioctl on streams. */
173struct bandinfo
174 {
175 unsigned char bi_pri;
176 int bi_flag;
177 };
178
179struct strbuf
180 {
181 int maxlen; /* Maximum buffer length. */
182 int len; /* Length of data. */
183 char *buf; /* Pointer to buffer. */
184 };
185
186struct strpeek
187 {
188 struct strbuf ctlbuf;
189 struct strbuf databuf;
190 t_uscalar_t flags; /* UnixWare/Solaris compatibility. */
191 };
192
193struct strfdinsert
194 {
195 struct strbuf ctlbuf;
196 struct strbuf databuf;
197 t_uscalar_t flags; /* UnixWare/Solaris compatibility. */
198 int fildes;
199 int offset;
200 };
201
202struct strioctl
203 {
204 int ic_cmd;
205 int ic_timout;
206 int ic_len;
207 char *ic_dp;
208 };
209
210struct strrecvfd
211 {
212 int fd;
213 uid_t uid;
214 gid_t gid;
215 char __fill[8]; /* UnixWare/Solaris compatibility */
216 };
217
218
219struct str_mlist
220 {
221 char l_name[FMNAMESZ + 1];
222 };
223
224struct str_list
225 {
226 int sl_nmods;
227 struct str_mlist *sl_modlist;
228 };
229
230#endif /* bits/stropts.h */
\ No newline at end of file
lib/libc/include/generic-glibc/bits/syscall.h+154-2
......@@ -1,11 +1,11 @@
11/* Generated at libc build time from syscall list. */
2/* The system call list corresponds to kernel 4.20. */
2/* The system call list corresponds to kernel 5.2. */
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 267264
8#define __GLIBC_LINUX_VERSION_CODE 328192
99
1010#ifdef __NR_FAST_atomic_update
1111# define SYS_FAST_atomic_update __NR_FAST_atomic_update
......@@ -115,6 +115,10 @@
115115# define SYS_break __NR_break
116116#endif
117117
118#ifdef __NR_breakpoint
119# define SYS_breakpoint __NR_breakpoint
120#endif
121
118122#ifdef __NR_brk
119123# define SYS_brk __NR_brk
120124#endif
......@@ -159,22 +163,42 @@
159163# define SYS_clock_adjtime __NR_clock_adjtime
160164#endif
161165
166#ifdef __NR_clock_adjtime64
167# define SYS_clock_adjtime64 __NR_clock_adjtime64
168#endif
169
162170#ifdef __NR_clock_getres
163171# define SYS_clock_getres __NR_clock_getres
164172#endif
165173
174#ifdef __NR_clock_getres_time64
175# define SYS_clock_getres_time64 __NR_clock_getres_time64
176#endif
177
166178#ifdef __NR_clock_gettime
167179# define SYS_clock_gettime __NR_clock_gettime
168180#endif
169181
182#ifdef __NR_clock_gettime64
183# define SYS_clock_gettime64 __NR_clock_gettime64
184#endif
185
170186#ifdef __NR_clock_nanosleep
171187# define SYS_clock_nanosleep __NR_clock_nanosleep
172188#endif
173189
190#ifdef __NR_clock_nanosleep_time64
191# define SYS_clock_nanosleep_time64 __NR_clock_nanosleep_time64
192#endif
193
174194#ifdef __NR_clock_settime
175195# define SYS_clock_settime __NR_clock_settime
176196#endif
177197
198#ifdef __NR_clock_settime64
199# define SYS_clock_settime64 __NR_clock_settime64
200#endif
201
178202#ifdef __NR_clone
179203# define SYS_clone __NR_clone
180204#endif
......@@ -367,6 +391,10 @@
367391# define SYS_fork __NR_fork
368392#endif
369393
394#ifdef __NR_fp_udfiex_crtl
395# define SYS_fp_udfiex_crtl __NR_fp_udfiex_crtl
396#endif
397
370398#ifdef __NR_free_hugepages
371399# define SYS_free_hugepages __NR_free_hugepages
372400#endif
......@@ -375,10 +403,26 @@
375403# define SYS_fremovexattr __NR_fremovexattr
376404#endif
377405
406#ifdef __NR_fsconfig
407# define SYS_fsconfig __NR_fsconfig
408#endif
409
378410#ifdef __NR_fsetxattr
379411# define SYS_fsetxattr __NR_fsetxattr
380412#endif
381413
414#ifdef __NR_fsmount
415# define SYS_fsmount __NR_fsmount
416#endif
417
418#ifdef __NR_fsopen
419# define SYS_fsopen __NR_fsopen
420#endif
421
422#ifdef __NR_fspick
423# define SYS_fspick __NR_fspick
424#endif
425
382426#ifdef __NR_fstat
383427# define SYS_fstat __NR_fstat
384428#endif
......@@ -419,6 +463,10 @@
419463# define SYS_futex __NR_futex
420464#endif
421465
466#ifdef __NR_futex_time64
467# define SYS_futex_time64 __NR_futex_time64
468#endif
469
422470#ifdef __NR_futimesat
423471# define SYS_futimesat __NR_futimesat
424472#endif
......@@ -439,6 +487,10 @@
439487# define SYS_get_thread_area __NR_get_thread_area
440488#endif
441489
490#ifdef __NR_get_tls
491# define SYS_get_tls __NR_get_tls
492#endif
493
442494#ifdef __NR_getcpu
443495# define SYS_getcpu __NR_getcpu
444496#endif
......@@ -655,6 +707,10 @@
655707# define SYS_io_pgetevents __NR_io_pgetevents
656708#endif
657709
710#ifdef __NR_io_pgetevents_time64
711# define SYS_io_pgetevents_time64 __NR_io_pgetevents_time64
712#endif
713
658714#ifdef __NR_io_setup
659715# define SYS_io_setup __NR_io_setup
660716#endif
......@@ -663,6 +719,18 @@
663719# define SYS_io_submit __NR_io_submit
664720#endif
665721
722#ifdef __NR_io_uring_enter
723# define SYS_io_uring_enter __NR_io_uring_enter
724#endif
725
726#ifdef __NR_io_uring_register
727# define SYS_io_uring_register __NR_io_uring_register
728#endif
729
730#ifdef __NR_io_uring_setup
731# define SYS_io_uring_setup __NR_io_uring_setup
732#endif
733
666734#ifdef __NR_ioctl
667735# define SYS_ioctl __NR_ioctl
668736#endif
......@@ -847,6 +915,10 @@
847915# define SYS_mount __NR_mount
848916#endif
849917
918#ifdef __NR_move_mount
919# define SYS_move_mount __NR_move_mount
920#endif
921
850922#ifdef __NR_move_pages
851923# define SYS_move_pages __NR_move_pages
852924#endif
......@@ -875,10 +947,18 @@
875947# define SYS_mq_timedreceive __NR_mq_timedreceive
876948#endif
877949
950#ifdef __NR_mq_timedreceive_time64
951# define SYS_mq_timedreceive_time64 __NR_mq_timedreceive_time64
952#endif
953
878954#ifdef __NR_mq_timedsend
879955# define SYS_mq_timedsend __NR_mq_timedsend
880956#endif
881957
958#ifdef __NR_mq_timedsend_time64
959# define SYS_mq_timedsend_time64 __NR_mq_timedsend_time64
960#endif
961
882962#ifdef __NR_mq_unlink
883963# define SYS_mq_unlink __NR_mq_unlink
884964#endif
......@@ -951,6 +1031,10 @@
9511031# define SYS_old_adjtimex __NR_old_adjtimex
9521032#endif
9531033
1034#ifdef __NR_old_getpagesize
1035# define SYS_old_getpagesize __NR_old_getpagesize
1036#endif
1037
9541038#ifdef __NR_oldfstat
9551039# define SYS_oldfstat __NR_oldfstat
9561040#endif
......@@ -983,6 +1067,10 @@
9831067# define SYS_open_by_handle_at __NR_open_by_handle_at
9841068#endif
9851069
1070#ifdef __NR_open_tree
1071# define SYS_open_tree __NR_open_tree
1072#endif
1073
9861074#ifdef __NR_openat
9871075# define SYS_openat __NR_openat
9881076#endif
......@@ -1459,6 +1547,10 @@
14591547# define SYS_personality __NR_personality
14601548#endif
14611549
1550#ifdef __NR_pidfd_send_signal
1551# define SYS_pidfd_send_signal __NR_pidfd_send_signal
1552#endif
1553
14621554#ifdef __NR_pipe
14631555# define SYS_pipe __NR_pipe
14641556#endif
......@@ -1491,6 +1583,10 @@
14911583# define SYS_ppoll __NR_ppoll
14921584#endif
14931585
1586#ifdef __NR_ppoll_time64
1587# define SYS_ppoll_time64 __NR_ppoll_time64
1588#endif
1589
14941590#ifdef __NR_prctl
14951591# define SYS_prctl __NR_prctl
14961592#endif
......@@ -1531,6 +1627,10 @@
15311627# define SYS_pselect6 __NR_pselect6
15321628#endif
15331629
1630#ifdef __NR_pselect6_time64
1631# define SYS_pselect6_time64 __NR_pselect6_time64
1632#endif
1633
15341634#ifdef __NR_ptrace
15351635# define SYS_ptrace __NR_ptrace
15361636#endif
......@@ -1599,6 +1699,10 @@
15991699# define SYS_recvmmsg __NR_recvmmsg
16001700#endif
16011701
1702#ifdef __NR_recvmmsg_time64
1703# define SYS_recvmmsg_time64 __NR_recvmmsg_time64
1704#endif
1705
16021706#ifdef __NR_recvmsg
16031707# define SYS_recvmsg __NR_recvmsg
16041708#endif
......@@ -1671,6 +1775,10 @@
16711775# define SYS_rt_sigtimedwait __NR_rt_sigtimedwait
16721776#endif
16731777
1778#ifdef __NR_rt_sigtimedwait_time64
1779# define SYS_rt_sigtimedwait_time64 __NR_rt_sigtimedwait_time64
1780#endif
1781
16741782#ifdef __NR_rt_tgsigqueueinfo
16751783# define SYS_rt_tgsigqueueinfo __NR_rt_tgsigqueueinfo
16761784#endif
......@@ -1731,6 +1839,10 @@
17311839# define SYS_sched_rr_get_interval __NR_sched_rr_get_interval
17321840#endif
17331841
1842#ifdef __NR_sched_rr_get_interval_time64
1843# define SYS_sched_rr_get_interval_time64 __NR_sched_rr_get_interval_time64
1844#endif
1845
17341846#ifdef __NR_sched_set_affinity
17351847# define SYS_sched_set_affinity __NR_sched_set_affinity
17361848#endif
......@@ -1783,6 +1895,10 @@
17831895# define SYS_semtimedop __NR_semtimedop
17841896#endif
17851897
1898#ifdef __NR_semtimedop_time64
1899# define SYS_semtimedop_time64 __NR_semtimedop_time64
1900#endif
1901
17861902#ifdef __NR_send
17871903# define SYS_send __NR_send
17881904#endif
......@@ -1823,6 +1939,10 @@
18231939# define SYS_set_tid_address __NR_set_tid_address
18241940#endif
18251941
1942#ifdef __NR_set_tls
1943# define SYS_set_tls __NR_set_tls
1944#endif
1945
18261946#ifdef __NR_setdomainname
18271947# define SYS_setdomainname __NR_setdomainname
18281948#endif
......@@ -2171,10 +2291,18 @@
21712291# define SYS_timer_gettime __NR_timer_gettime
21722292#endif
21732293
2294#ifdef __NR_timer_gettime64
2295# define SYS_timer_gettime64 __NR_timer_gettime64
2296#endif
2297
21742298#ifdef __NR_timer_settime
21752299# define SYS_timer_settime __NR_timer_settime
21762300#endif
21772301
2302#ifdef __NR_timer_settime64
2303# define SYS_timer_settime64 __NR_timer_settime64
2304#endif
2305
21782306#ifdef __NR_timerfd
21792307# define SYS_timerfd __NR_timerfd
21802308#endif
......@@ -2187,10 +2315,18 @@
21872315# define SYS_timerfd_gettime __NR_timerfd_gettime
21882316#endif
21892317
2318#ifdef __NR_timerfd_gettime64
2319# define SYS_timerfd_gettime64 __NR_timerfd_gettime64
2320#endif
2321
21902322#ifdef __NR_timerfd_settime
21912323# define SYS_timerfd_settime __NR_timerfd_settime
21922324#endif
21932325
2326#ifdef __NR_timerfd_settime64
2327# define SYS_timerfd_settime64 __NR_timerfd_settime64
2328#endif
2329
21942330#ifdef __NR_times
21952331# define SYS_times __NR_times
21962332#endif
......@@ -2211,6 +2347,10 @@
22112347# define SYS_tuxcall __NR_tuxcall
22122348#endif
22132349
2350#ifdef __NR_udftrap
2351# define SYS_udftrap __NR_udftrap
2352#endif
2353
22142354#ifdef __NR_ugetrlimit
22152355# define SYS_ugetrlimit __NR_ugetrlimit
22162356#endif
......@@ -2255,6 +2395,14 @@
22552395# define SYS_userfaultfd __NR_userfaultfd
22562396#endif
22572397
2398#ifdef __NR_usr26
2399# define SYS_usr26 __NR_usr26
2400#endif
2401
2402#ifdef __NR_usr32
2403# define SYS_usr32 __NR_usr32
2404#endif
2405
22582406#ifdef __NR_ustat
22592407# define SYS_ustat __NR_ustat
22602408#endif
......@@ -2267,6 +2415,10 @@
22672415# define SYS_utimensat __NR_utimensat
22682416#endif
22692417
2418#ifdef __NR_utimensat_time64
2419# define SYS_utimensat_time64 __NR_utimensat_time64
2420#endif
2421
22702422#ifdef __NR_utimes
22712423# define SYS_utimes __NR_utimes
22722424#endif
lib/libc/include/generic-glibc/bits/types.h+11-8
......@@ -87,7 +87,7 @@ __extension__ typedef unsigned long long int __uintmax_t;
8787 32 -- "natural" 32-bit type (always int)
8888 64 -- "natural" 64-bit type (long or long long)
8989 LONG32 -- 32-bit type, traditionally long
90 QUAD -- 64-bit type, always long long
90 QUAD -- 64-bit type, traditionally long long
9191 WORD -- natural type of __WORDSIZE bits (int or long)
9292 LONGWORD -- type of __WORDSIZE bits, traditionally long
9393
......@@ -113,14 +113,14 @@ __extension__ typedef unsigned long long int __uintmax_t;
113113#define __SLONGWORD_TYPE long int
114114#define __ULONGWORD_TYPE unsigned long int
115115#if __WORDSIZE == 32
116# define __SQUAD_TYPE __quad_t
117# define __UQUAD_TYPE __u_quad_t
116# define __SQUAD_TYPE __int64_t
117# define __UQUAD_TYPE __uint64_t
118118# define __SWORD_TYPE int
119119# define __UWORD_TYPE unsigned int
120120# define __SLONG32_TYPE long int
121121# define __ULONG32_TYPE unsigned long int
122# define __S64_TYPE __quad_t
123# define __U64_TYPE __u_quad_t
122# define __S64_TYPE __int64_t
123# define __U64_TYPE __uint64_t
124124/* We want __extension__ before typedef's that use nonstandard base types
125125 such as `long long' in C89 mode. */
126126# define __STD_TYPE __extension__ typedef
......@@ -213,10 +213,13 @@ __STD_TYPE __U32_TYPE __socklen_t;
213213 It is not currently necessary for this to be machine-specific. */
214214typedef int __sig_atomic_t;
215215
216#if __TIMESIZE == 64
216/* Seconds since the Epoch, visible to user code when time_t is too
217 narrow only for consistency with the old way of widening too-narrow
218 types. User code should never use __time64_t. */
219#if __TIMESIZE == 64 && defined __LIBC
217220# define __time64_t __time_t
218#else
219__STD_TYPE __TIME64_T_TYPE __time64_t; /* Seconds since the Epoch. */
221#elif __TIMESIZE != 64
222__STD_TYPE __TIME64_T_TYPE __time64_t;
220223#endif
221224
222225#undef __STD_TYPE
lib/libc/include/generic-glibc/bits/types/struct_statx.h created+55
......@@ -0,0 +1,55 @@
1/* Definition of the generic version of struct statx.
2 Copyright (C) 2018-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 _SYS_STAT_H
20# error Never include <bits/types/struct_statx.h> directly, include <sys/stat.h> instead.
21#endif
22
23#ifndef __statx_defined
24#define __statx_defined 1
25
26/* Warning: The kernel may add additional fields to this struct in the
27 future. Only use this struct for calling the statx function, not
28 for storing data. (Expansion will be controlled by the mask
29 argument of the statx function.) */
30struct statx
31{
32 __uint32_t stx_mask;
33 __uint32_t stx_blksize;
34 __uint64_t stx_attributes;
35 __uint32_t stx_nlink;
36 __uint32_t stx_uid;
37 __uint32_t stx_gid;
38 __uint16_t stx_mode;
39 __uint16_t __statx_pad1[1];
40 __uint64_t stx_ino;
41 __uint64_t stx_size;
42 __uint64_t stx_blocks;
43 __uint64_t stx_attributes_mask;
44 struct statx_timestamp stx_atime;
45 struct statx_timestamp stx_btime;
46 struct statx_timestamp stx_ctime;
47 struct statx_timestamp stx_mtime;
48 __uint32_t stx_rdev_major;
49 __uint32_t stx_rdev_minor;
50 __uint32_t stx_dev_major;
51 __uint32_t stx_dev_minor;
52 __uint64_t __statx_pad2[14];
53};
54
55#endif /* __statx_defined */
\ No newline at end of file
lib/libc/include/generic-glibc/bits/types/struct_statx_timestamp.h created+33
......@@ -0,0 +1,33 @@
1/* Definition of the generic version of struct statx_timestamp.
2 Copyright (C) 2018-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 _SYS_STAT_H
20# error Never include <bits/types/struct_statx_timestamp.h> directly, include <sys/stat.h> instead.
21#endif
22
23#ifndef __statx_timestamp_defined
24#define __statx_timestamp_defined 1
25
26struct statx_timestamp
27{
28 __int64_t tv_sec;
29 __uint32_t tv_nsec;
30 __int32_t __statx_timestamp_pad1[1];
31};
32
33#endif /* __statx_timestamp_defined */
\ No newline at end of file
lib/libc/include/generic-glibc/bits/xtitypes.h deleted-33
......@@ -1,33 +0,0 @@
1/* bits/xtitypes.h -- Define some types used by <bits/stropts.h>. Generic.
2 Copyright (C) 2002-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 _STROPTS_H
20# error "Never include <bits/xtitypes.h> directly; use <stropts.h> instead."
21#endif
22
23#ifndef _BITS_XTITYPES_H
24#define _BITS_XTITYPES_H 1
25
26#include <bits/types.h>
27
28/* This type is used by some structs in <bits/stropts.h>. */
29typedef __SLONGWORD_TYPE __t_scalar_t;
30typedef __ULONGWORD_TYPE __t_uscalar_t;
31
32
33#endif /* bits/xtitypes.h */
\ No newline at end of file
lib/libc/include/generic-glibc/dirent.h+2
......@@ -401,4 +401,6 @@ extern int versionsort64 (const struct dirent64 **__e1,
401401
402402__END_DECLS
403403
404#include <bits/dirent_ext.h>
405
404406#endif /* dirent.h */
\ No newline at end of file
lib/libc/include/generic-glibc/dlfcn.h+12
......@@ -180,7 +180,19 @@ typedef struct
180180{
181181 size_t dls_size; /* Size in bytes of the whole buffer. */
182182 unsigned int dls_cnt; /* Number of elements in `dls_serpath'. */
183# if __GNUC_PREREQ (3, 0)
184 /* The zero-length array avoids an unwanted array subscript check by
185 the compiler, while the surrounding anonymous union preserves the
186 historic size of the type. At the time of writing, GNU C does
187 not support structs with flexible array members in unions. */
188 __extension__ union
189 {
190 Dl_serpath dls_serpath[0]; /* Actually longer, dls_cnt elements. */
191 Dl_serpath __dls_serpath_pad[1];
192 };
193# else
183194 Dl_serpath dls_serpath[1]; /* Actually longer, dls_cnt elements. */
195# endif
184196} Dl_serinfo;
185197#endif /* __USE_GNU */
186198
lib/libc/include/generic-glibc/elf.h+30-2
......@@ -360,7 +360,7 @@ typedef struct
360360#define EM_RISCV 243 /* RISC-V */
361361
362362#define EM_BPF 247 /* Linux BPF -- in-kernel virtual machine */
363#define EM_CSKY 252 /* C_SKY */
363#define EM_CSKY 252 /* C-SKY */
364364
365365#define EM_NUM 253
366366
......@@ -809,9 +809,16 @@ typedef struct
809809#define NT_ARM_SYSTEM_CALL 0x404 /* ARM system call number */
810810#define NT_ARM_SVE 0x405 /* ARM Scalable Vector Extension
811811 registers */
812#define NT_ARM_PAC_MASK 0x406 /* ARM pointer authentication
813 code masks. */
814#define NT_ARM_PACA_KEYS 0x407 /* ARM pointer authentication
815 address keys. */
816#define NT_ARM_PACG_KEYS 0x408 /* ARM pointer authentication
817 generic key. */
812818#define NT_VMCOREDD 0x700 /* Vmcore Device Dump Note. */
813819#define NT_MIPS_DSP 0x800 /* MIPS DSP ASE registers. */
814820#define NT_MIPS_FP_MODE 0x801 /* MIPS floating-point mode. */
821#define NT_MIPS_MSA 0x802 /* MIPS SIMD registers. */
815822
816823/* Legal values for the note segment descriptor types for object files. */
817824
......@@ -987,6 +994,9 @@ typedef struct
987994#define DF_1_SINGLETON 0x02000000 /* Singleton symbols are used. */
988995#define DF_1_STUB 0x04000000
989996#define DF_1_PIE 0x08000000
997#define DF_1_KMOD 0x10000000
998#define DF_1_WEAKFILTER 0x20000000
999#define DF_1_NOCOMMON 0x40000000
9901000
9911001/* Flags for the feature selection in DT_FEATURE_1. */
9921002#define DTF_1_PARINIT 0x00000001
......@@ -2854,6 +2864,13 @@ enum
28542864#define R_AARCH64_TLSDESC 1031 /* TLS Descriptor. */
28552865#define R_AARCH64_IRELATIVE 1032 /* STT_GNU_IFUNC relocation. */
28562866
2867/* AArch64 specific values for the Dyn d_tag field. */
2868#define DT_AARCH64_VARIANT_PCS (DT_LOPROC + 5)
2869#define DT_AARCH64_NUM 6
2870
2871/* AArch64 specific values for the st_other field. */
2872#define STO_AARCH64_VARIANT_PCS 0x80
2873
28572874/* ARM relocs. */
28582875
28592876#define R_ARM_NONE 0 /* No reloc */
......@@ -3022,7 +3039,7 @@ enum
30223039/* Keep this the last entry. */
30233040#define R_ARM_NUM 256
30243041
3025/* csky */
3042/* C-SKY */
30263043#define R_CKCORE_NONE 0 /* no reloc */
30273044#define R_CKCORE_ADDR32 1 /* direct 32 bit (S + A) */
30283045#define R_CKCORE_PCRELIMM8BY4 2 /* disp ((S + A - P) >> 2) & 0xff */
......@@ -3086,6 +3103,17 @@ enum
30863103#define R_CKCORE_TLS_DTPOFF32 57
30873104#define R_CKCORE_TLS_TPOFF32 58
30883105
3106/* C-SKY elf header definition. */
3107#define EF_CSKY_ABIMASK 0XF0000000
3108#define EF_CSKY_OTHER 0X0FFF0000
3109#define EF_CSKY_PROCESSOR 0X0000FFFF
3110
3111#define EF_CSKY_ABIV1 0X10000000
3112#define EF_CSKY_ABIV2 0X20000000
3113
3114/* C-SKY attributes section. */
3115#define SHT_CSKY_ATTRIBUTES (SHT_LOPROC + 1)
3116
30893117/* IA-64 specific declarations. */
30903118
30913119/* Processor specific flags for the Ehdr e_flags field. */
lib/libc/include/generic-glibc/features.h+1-1
......@@ -439,7 +439,7 @@
439439/* Major and minor version number of the GNU C library package. Use
440440 these macros to test for features in specific releases. */
441441#define __GLIBC__ 2
442#define __GLIBC_MINOR__ 29
442#define __GLIBC_MINOR__ 30
443443
444444#define __GLIBC_PREREQ(maj, min) \
445445 ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
lib/libc/include/generic-glibc/finclude/math-vector-fortran.h created+19
......@@ -0,0 +1,19 @@
1! Platform-specific declarations of SIMD math functions for Fortran. -*- f90 -*-
2! Copyright (C) 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! No SIMD math functions are available for this platform.
\ No newline at end of file
lib/libc/include/generic-glibc/gconv.h+2-9
......@@ -86,6 +86,8 @@ struct __gconv_step
8686 struct __gconv_loaded_object *__shlib_handle;
8787 const char *__modname;
8888
89 /* For internal use by glibc. (Accesses to this member must occur
90 when the internal __gconv_lock mutex is acquired). */
8991 int __counter;
9092
9193 char *__from_name;
......@@ -142,13 +144,4 @@ typedef struct __gconv_info
142144 __extension__ struct __gconv_step_data __data[0];
143145} *__gconv_t;
144146
145/* Transliteration using the locale's data. */
146extern int __gconv_transliterate (struct __gconv_step *step,
147 struct __gconv_step_data *step_data,
148 const unsigned char *inbufstart,
149 const unsigned char **inbufp,
150 const unsigned char *inbufend,
151 unsigned char **outbufstart,
152 size_t *irreversible);
153
154147#endif /* gconv.h */
\ No newline at end of file
lib/libc/include/generic-glibc/gnu/stubs-32.h-2
......@@ -8,9 +8,7 @@
88#endif
99
1010#define __stub_chflags
11#define __stub_fattach
1211#define __stub_fchflags
13#define __stub_fdetach
1412#define __stub_gtty
1513#define __stub_lchmod
1614#define __stub_revoke
lib/libc/include/generic-glibc/gnu/stubs-64.h created+18
......@@ -0,0 +1,18 @@
1/* This file is automatically generated.
2 It defines a symbol `__stub_FUNCTION' for each function
3 in the C library which is a stub, meaning it will fail
4 every time called, usually setting errno to ENOSYS. */
5
6#ifdef _LIBC
7 #error Applications may not define the macro _LIBC
8#endif
9
10#define __stub_chflags
11#define __stub_fchflags
12#define __stub_gtty
13#define __stub_lchmod
14#define __stub_revoke
15#define __stub_setlogin
16#define __stub_sigreturn
17#define __stub_sstk
18#define __stub_stty
\ No newline at end of file
lib/libc/include/generic-glibc/gnu/stubs-hard.h-6
......@@ -11,15 +11,9 @@
1111#define __stub___compat_get_kernel_syms
1212#define __stub___compat_query_module
1313#define __stub_chflags
14#define __stub_fattach
1514#define __stub_fchflags
16#define __stub_fdetach
17#define __stub_getmsg
18#define __stub_getpmsg
1915#define __stub_gtty
2016#define __stub_lchmod
21#define __stub_putmsg
22#define __stub_putpmsg
2317#define __stub_revoke
2418#define __stub_setlogin
2519#define __stub_sigreturn
lib/libc/include/generic-glibc/gnu/stubs-n32_hard.h-2
......@@ -10,9 +10,7 @@
1010#define __stub___compat_bdflush
1111#define __stub___compat_uselib
1212#define __stub_chflags
13#define __stub_fattach
1413#define __stub_fchflags
15#define __stub_fdetach
1614#define __stub_gtty
1715#define __stub_lchmod
1816#define __stub_revoke
lib/libc/include/generic-glibc/gnu/stubs-n64_hard.h-2
......@@ -10,9 +10,7 @@
1010#define __stub___compat_bdflush
1111#define __stub___compat_uselib
1212#define __stub_chflags
13#define __stub_fattach
1413#define __stub_fchflags
15#define __stub_fdetach
1614#define __stub_gtty
1715#define __stub_lchmod
1816#define __stub_revoke
lib/libc/include/generic-glibc/gnu/stubs-o32_hard.h-2
......@@ -8,9 +8,7 @@
88#endif
99
1010#define __stub_chflags
11#define __stub_fattach
1211#define __stub_fchflags
13#define __stub_fdetach
1412#define __stub_gtty
1513#define __stub_lchmod
1614#define __stub_revoke
lib/libc/include/generic-glibc/gnu/stubs-soft.h-6
......@@ -11,15 +11,9 @@
1111#define __stub___compat_get_kernel_syms
1212#define __stub___compat_query_module
1313#define __stub_chflags
14#define __stub_fattach
1514#define __stub_fchflags
16#define __stub_fdetach
17#define __stub_getmsg
18#define __stub_getpmsg
1915#define __stub_gtty
2016#define __stub_lchmod
21#define __stub_putmsg
22#define __stub_putpmsg
2317#define __stub_revoke
2418#define __stub_setlogin
2519#define __stub_sigreturn
lib/libc/include/generic-glibc/malloc.h+10-10
......@@ -35,11 +35,12 @@
3535__BEGIN_DECLS
3636
3737/* Allocate SIZE bytes of memory. */
38extern void *malloc (size_t __size) __THROW __attribute_malloc__ __wur;
38extern void *malloc (size_t __size) __THROW __attribute_malloc__
39 __attribute_alloc_size__ ((1)) __wur;
3940
4041/* Allocate NMEMB elements of SIZE bytes each, all initialized to 0. */
4142extern void *calloc (size_t __nmemb, size_t __size)
42__THROW __attribute_malloc__ __wur;
43__THROW __attribute_malloc__ __attribute_alloc_size__ ((1, 2)) __wur;
4344
4445/* Re-allocate the previously allocated block in __ptr, making the new
4546 block SIZE bytes long. */
......@@ -47,7 +48,7 @@ __THROW __attribute_malloc__ __wur;
4748 the same pointer that was passed to it, aliasing needs to be allowed
4849 between objects pointed by the old and new pointers. */
4950extern void *realloc (void *__ptr, size_t __size)
50__THROW __attribute_warn_unused_result__;
51__THROW __attribute_warn_unused_result__ __attribute_alloc_size__ ((2));
5152
5253/* Re-allocate the previously allocated block in PTR, making the new
5354 block large enough for NMEMB elements of SIZE bytes each. */
......@@ -55,21 +56,23 @@ __THROW __attribute_warn_unused_result__;
5556 the same pointer that was passed to it, aliasing needs to be allowed
5657 between objects pointed by the old and new pointers. */
5758extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
58__THROW __attribute_warn_unused_result__;
59__THROW __attribute_warn_unused_result__ __attribute_alloc_size__ ((2, 3));
5960
6061/* Free a block allocated by `malloc', `realloc' or `calloc'. */
6162extern void free (void *__ptr) __THROW;
6263
6364/* Allocate SIZE bytes allocated to ALIGNMENT bytes. */
6465extern void *memalign (size_t __alignment, size_t __size)
65__THROW __attribute_malloc__ __wur;
66__THROW __attribute_malloc__ __attribute_alloc_size__ ((2)) __wur;
6667
6768/* Allocate SIZE bytes on a page boundary. */
68extern void *valloc (size_t __size) __THROW __attribute_malloc__ __wur;
69extern void *valloc (size_t __size) __THROW __attribute_malloc__
70 __attribute_alloc_size__ ((1)) __wur;
6971
7072/* Equivalent to valloc(minimum-page-that-holds(n)), that is, round up
7173 __size to nearest pagesize. */
72extern void *pvalloc (size_t __size) __THROW __attribute_malloc__ __wur;
74extern void *pvalloc (size_t __size) __THROW __attribute_malloc__
75 __attribute_alloc_size__ ((1)) __wur;
7376
7477/* Underlying allocation function; successive calls should return
7578 contiguous pieces of memory. */
......@@ -156,9 +159,6 @@ extern void *(*__MALLOC_HOOK_VOLATILE __memalign_hook)(size_t __alignment,
156159__MALLOC_DEPRECATED;
157160extern void (*__MALLOC_HOOK_VOLATILE __after_morecore_hook) (void);
158161
159/* Activate a standard set of debugging hooks. */
160extern void __malloc_check_init (void) __THROW __MALLOC_DEPRECATED;
161
162162
163163__END_DECLS
164164#endif /* malloc.h */
\ No newline at end of file
lib/libc/include/generic-glibc/math.h+11-6
......@@ -874,7 +874,8 @@ enum
874874 the __SUPPORT_SNAN__ check may be skipped for those versions. */
875875
876876/* Return number of classification appropriate for X. */
877# if __GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__ \
877# if ((__GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__) \
878 || __glibc_clang_prereq (2,8)) \
878879 && (!defined __OPTIMIZE_SIZE__ || defined __cplusplus)
879880 /* The check for __cplusplus allows the use of the builtin, even
880881 when optimization for size is on. This is provided for
......@@ -889,7 +890,7 @@ enum
889890# endif
890891
891892/* Return nonzero value if sign of X is negative. */
892# if __GNUC_PREREQ (6,0)
893# if __GNUC_PREREQ (6,0) || __glibc_clang_prereq (3,3)
893894# define signbit(x) __builtin_signbit (x)
894895# elif defined __cplusplus
895896 /* In C++ mode, __MATH_TG cannot be used, because it relies on
......@@ -907,14 +908,16 @@ enum
907908# endif
908909
909910/* Return nonzero value if X is not +-Inf or NaN. */
910# if __GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__
911# if (__GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__) \
912 || __glibc_clang_prereq (2,8)
911913# define isfinite(x) __builtin_isfinite (x)
912914# else
913915# define isfinite(x) __MATH_TG ((x), __finite, (x))
914916# endif
915917
916918/* Return nonzero value if X is neither zero, subnormal, Inf, nor NaN. */
917# if __GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__
919# if (__GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__) \
920 || __glibc_clang_prereq (2,8)
918921# define isnormal(x) __builtin_isnormal (x)
919922# else
920923# define isnormal(x) (fpclassify (x) == FP_NORMAL)
......@@ -922,7 +925,8 @@ enum
922925
923926/* Return nonzero value if X is a NaN. We could use `fpclassify' but
924927 we already have this functions `__isnan' and it is faster. */
925# if __GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__
928# if (__GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__) \
929 || __glibc_clang_prereq (2,8)
926930# define isnan(x) __builtin_isnan (x)
927931# else
928932# define isnan(x) __MATH_TG ((x), __isnan, (x))
......@@ -939,7 +943,8 @@ enum
939943# define isinf(x) \
940944 (__builtin_types_compatible_p (__typeof (x), _Float128) \
941945 ? __isinff128 (x) : __builtin_isinf_sign (x))
942# elif __GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__
946# elif (__GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__) \
947 || __glibc_clang_prereq (3,7)
943948# define isinf(x) __builtin_isinf_sign (x)
944949# else
945950# define isinf(x) __MATH_TG ((x), __isinf, (x))
lib/libc/include/generic-glibc/netinet/igmp.h+1
......@@ -86,6 +86,7 @@ struct igmp {
8686
8787#define IGMP_MTRACE_RESP 0x1e /* traceroute resp.(to sender)*/
8888#define IGMP_MTRACE 0x1f /* mcast traceroute messages */
89#define IGMP_MRDISC_ADV 0x30 /* From RFC4286. */
8990
9091#define IGMP_MAX_HOST_REPORT_DELAY 10 /* max delay for response to */
9192 /* query (in seconds) according */
lib/libc/include/generic-glibc/netinet/in.h+1
......@@ -204,6 +204,7 @@ enum
204204#define INADDR_UNSPEC_GROUP ((in_addr_t) 0xe0000000) /* 224.0.0.0 */
205205#define INADDR_ALLHOSTS_GROUP ((in_addr_t) 0xe0000001) /* 224.0.0.1 */
206206#define INADDR_ALLRTRS_GROUP ((in_addr_t) 0xe0000002) /* 224.0.0.2 */
207#define INADDR_ALLSNOOPERS_GROUP ((in_addr_t) 0xe000006a) /* 224.0.0.106 */
207208#define INADDR_MAX_LOCAL_GROUP ((in_addr_t) 0xe00000ff) /* 224.0.0.255 */
208209
209210#if !__USE_KERNEL_IPV6_DEFS
lib/libc/include/generic-glibc/netinet/udp.h+1
......@@ -82,6 +82,7 @@ struct udphdr
8282#define UDP_NO_CHECK6_RX 102 /* Disable accepting checksum for UDP
8383 over IPv6. */
8484#define UDP_SEGMENT 103 /* Set GSO segmentation size. */
85#define UDP_GRO 104 /* This socket can receive UDP GRO packets. */
8586
8687/* UDP encapsulation types */
8788#define UDP_ENCAP_ESPINUDP_NON_IKE 1 /* draft-ietf-ipsec-nat-t-ike-00/01 */
lib/libc/include/generic-glibc/pthread.h+36
......@@ -770,6 +770,13 @@ extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
770770 __abstime) __THROWNL __nonnull ((1, 2));
771771#endif
772772
773#ifdef __USE_GNU
774extern int pthread_mutex_clocklock (pthread_mutex_t *__restrict __mutex,
775 clockid_t __clockid,
776 const struct timespec *__restrict
777 __abstime) __THROWNL __nonnull ((1, 3));
778#endif
779
773780/* Unlock a mutex. */
774781extern int pthread_mutex_unlock (pthread_mutex_t *__mutex)
775782 __THROWNL __nonnull ((1));
......@@ -909,6 +916,13 @@ extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
909916 __abstime) __THROWNL __nonnull ((1, 2));
910917# endif
911918
919# ifdef __USE_GNU
920extern int pthread_rwlock_clockrdlock (pthread_rwlock_t *__restrict __rwlock,
921 clockid_t __clockid,
922 const struct timespec *__restrict
923 __abstime) __THROWNL __nonnull ((1, 3));
924# endif
925
912926/* Acquire write lock for RWLOCK. */
913927extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock)
914928 __THROWNL __nonnull ((1));
......@@ -924,6 +938,13 @@ extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
924938 __abstime) __THROWNL __nonnull ((1, 2));
925939# endif
926940
941# ifdef __USE_GNU
942extern int pthread_rwlock_clockwrlock (pthread_rwlock_t *__restrict __rwlock,
943 clockid_t __clockid,
944 const struct timespec *__restrict
945 __abstime) __THROWNL __nonnull ((1, 3));
946# endif
947
927948/* Unlock RWLOCK. */
928949extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock)
929950 __THROWNL __nonnull ((1));
......@@ -1003,6 +1024,21 @@ extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
10031024 const struct timespec *__restrict __abstime)
10041025 __nonnull ((1, 2, 3));
10051026
1027# ifdef __USE_GNU
1028/* Wait for condition variable COND to be signaled or broadcast until
1029 ABSTIME measured by the specified clock. MUTEX is assumed to be
1030 locked before. CLOCK is the clock to use. ABSTIME is an absolute
1031 time specification against CLOCK's epoch.
1032
1033 This function is a cancellation point and therefore not marked with
1034 __THROW. */
1035extern int pthread_cond_clockwait (pthread_cond_t *__restrict __cond,
1036 pthread_mutex_t *__restrict __mutex,
1037 __clockid_t __clock_id,
1038 const struct timespec *__restrict __abstime)
1039 __nonnull ((1, 2, 4));
1040# endif
1041
10061042/* Functions for handling condition variable attributes. */
10071043
10081044/* Initialize condition variable attribute ATTR. */
lib/libc/include/generic-glibc/resolv.h-4
......@@ -115,11 +115,7 @@ struct res_sym {
115115#define RES_DEFNAMES 0x00000080 /* use default domain name */
116116#define RES_STAYOPEN 0x00000100 /* Keep TCP socket open */
117117#define RES_DNSRCH 0x00000200 /* search up local domain tree */
118#define RES_INSECURE1 0x00000400 /* type 1 security disabled */
119#define RES_INSECURE2 0x00000800 /* type 2 security disabled */
120118#define RES_NOALIASES 0x00001000 /* shuts off HOSTALIASES feature */
121#define RES_USE_INET6 \
122 __glibc_macro_warning ("RES_USE_INET6 is deprecated") 0x00002000
123119#define RES_ROTATE 0x00004000 /* rotate ns list after each query */
124120#define RES_NOCHECKNAME \
125121 __glibc_macro_warning ("RES_NOCHECKNAME is deprecated") 0x00008000
lib/libc/include/generic-glibc/search.h+7
......@@ -150,6 +150,13 @@ typedef void (*__action_fn_t) (const void *__nodep, VISIT __value,
150150extern void twalk (const void *__root, __action_fn_t __action);
151151
152152#ifdef __USE_GNU
153/* Like twalk, but pass down a closure parameter instead of the
154 level. */
155extern void twalk_r (const void *__root,
156 void (*) (const void *__nodep, VISIT __value,
157 void *__closure),
158 void *__closure);
159
153160/* Callback type for function to free a tree node. If the keys are atomic
154161 data this function should do nothing. */
155162typedef void (*__free_fn_t) (void *__nodep);
lib/libc/include/generic-glibc/semaphore.h+20-10
......@@ -33,24 +33,26 @@ __BEGIN_DECLS
3333/* Initialize semaphore object SEM to VALUE. If PSHARED then share it
3434 with other processes. */
3535extern int sem_init (sem_t *__sem, int __pshared, unsigned int __value)
36 __THROW;
36 __THROW __nonnull ((1));
37
3738/* Free resources associated with semaphore object SEM. */
38extern int sem_destroy (sem_t *__sem) __THROW;
39extern int sem_destroy (sem_t *__sem) __THROW __nonnull ((1));
3940
4041/* Open a named semaphore NAME with open flags OFLAG. */
41extern sem_t *sem_open (const char *__name, int __oflag, ...) __THROW;
42extern sem_t *sem_open (const char *__name, int __oflag, ...)
43 __THROW __nonnull ((1));
4244
4345/* Close descriptor for named semaphore SEM. */
44extern int sem_close (sem_t *__sem) __THROW;
46extern int sem_close (sem_t *__sem) __THROW __nonnull ((1));
4547
4648/* Remove named semaphore NAME. */
47extern int sem_unlink (const char *__name) __THROW;
49extern int sem_unlink (const char *__name) __THROW __nonnull ((1));
4850
4951/* Wait for SEM being posted.
5052
5153 This function is a cancellation point and therefore not marked with
5254 __THROW. */
53extern int sem_wait (sem_t *__sem);
55extern int sem_wait (sem_t *__sem) __nonnull ((1));
5456
5557#ifdef __USE_XOPEN2K
5658/* Similar to `sem_wait' but wait only until ABSTIME.
......@@ -58,18 +60,26 @@ extern int sem_wait (sem_t *__sem);
5860 This function is a cancellation point and therefore not marked with
5961 __THROW. */
6062extern int sem_timedwait (sem_t *__restrict __sem,
61 const struct timespec *__restrict __abstime);
63 const struct timespec *__restrict __abstime)
64 __nonnull ((1, 2));
65#endif
66
67#ifdef __USE_GNU
68extern int sem_clockwait (sem_t *__restrict __sem,
69 clockid_t clock,
70 const struct timespec *__restrict __abstime)
71 __nonnull ((1, 3));
6272#endif
6373
6474/* Test whether SEM is posted. */
65extern int sem_trywait (sem_t *__sem) __THROWNL;
75extern int sem_trywait (sem_t *__sem) __THROWNL __nonnull ((1));
6676
6777/* Post SEM. */
68extern int sem_post (sem_t *__sem) __THROWNL;
78extern int sem_post (sem_t *__sem) __THROWNL __nonnull ((1));
6979
7080/* Get current value of SEM and store it in *SVAL. */
7181extern int sem_getvalue (sem_t *__restrict __sem, int *__restrict __sval)
72 __THROW;
82 __THROW __nonnull ((1, 2));
7383
7484
7585__END_DECLS
lib/libc/include/generic-glibc/signal.h+3
......@@ -370,6 +370,9 @@ extern int __libc_current_sigrtmax (void) __THROW;
370370#define SIGRTMIN (__libc_current_sigrtmin ())
371371#define SIGRTMAX (__libc_current_sigrtmax ())
372372
373/* System-specific extensions. */
374#include <bits/signal_ext.h>
375
373376__END_DECLS
374377
375378#endif /* not signal.h */
\ No newline at end of file
lib/libc/include/generic-glibc/stdlib.h+8-5
......@@ -536,10 +536,11 @@ extern int lcong48_r (unsigned short int __param[7],
536536#endif /* Use misc or X/Open. */
537537
538538/* Allocate SIZE bytes of memory. */
539extern void *malloc (size_t __size) __THROW __attribute_malloc__ __wur;
539extern void *malloc (size_t __size) __THROW __attribute_malloc__
540 __attribute_alloc_size__ ((1)) __wur;
540541/* Allocate NMEMB elements of SIZE bytes each, all initialized to 0. */
541542extern void *calloc (size_t __nmemb, size_t __size)
542 __THROW __attribute_malloc__ __wur;
543 __THROW __attribute_malloc__ __attribute_alloc_size__ ((1, 2)) __wur;
543544
544545/* Re-allocate the previously allocated block
545546 in PTR, making the new block SIZE bytes long. */
......@@ -547,7 +548,7 @@ extern void *calloc (size_t __nmemb, size_t __size)
547548 the same pointer that was passed to it, aliasing needs to be allowed
548549 between objects pointed by the old and new pointers. */
549550extern void *realloc (void *__ptr, size_t __size)
550 __THROW __attribute_warn_unused_result__;
551 __THROW __attribute_warn_unused_result__ __attribute_alloc_size__ ((2));
551552
552553#ifdef __USE_MISC
553554/* Re-allocate the previously allocated block in PTR, making the new
......@@ -556,7 +557,8 @@ extern void *realloc (void *__ptr, size_t __size)
556557 the same pointer that was passed to it, aliasing needs to be allowed
557558 between objects pointed by the old and new pointers. */
558559extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
559 __THROW __attribute_warn_unused_result__;
560 __THROW __attribute_warn_unused_result__
561 __attribute_alloc_size__ ((2, 3));
560562#endif
561563
562564/* Free a block allocated by `malloc', `realloc' or `calloc'. */
......@@ -569,7 +571,8 @@ extern void free (void *__ptr) __THROW;
569571#if (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K) \
570572 || defined __USE_MISC
571573/* Allocate SIZE bytes on a page boundary. The storage cannot be freed. */
572extern void *valloc (size_t __size) __THROW __attribute_malloc__ __wur;
574extern void *valloc (size_t __size) __THROW __attribute_malloc__
575 __attribute_alloc_size__ ((1)) __wur;
573576#endif
574577
575578#ifdef __USE_XOPEN2K
lib/libc/include/generic-glibc/stropts.h deleted-92
......@@ -1,92 +0,0 @@
1/* Copyright (C) 1998-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 _STROPTS_H
19#define _STROPTS_H 1
20
21#include <features.h>
22#include <bits/types.h>
23#include <bits/xtitypes.h>
24
25#ifndef __gid_t_defined
26typedef __gid_t gid_t;
27# define __gid_t_defined
28#endif
29
30#ifndef __uid_t_defined
31typedef __uid_t uid_t;
32# define __uid_t_defined
33#endif
34
35typedef __t_scalar_t t_scalar_t;
36typedef __t_uscalar_t t_uscalar_t;
37
38/* Get system specific constants. */
39#include <bits/stropts.h>
40
41
42__BEGIN_DECLS
43
44/* Test whether FILDES is associated with a STREAM-based file. */
45extern int isastream (int __fildes) __THROW;
46
47/* Receive next message from a STREAMS file.
48
49 This function is a cancellation point and therefore not marked with
50 __THROW. */
51extern int getmsg (int __fildes, struct strbuf *__restrict __ctlptr,
52 struct strbuf *__restrict __dataptr,
53 int *__restrict __flagsp);
54
55/* Receive next message from a STREAMS file, with *FLAGSP allowing to
56 control which message.
57
58 This function is a cancellation point and therefore not marked with
59 __THROW. */
60extern int getpmsg (int __fildes, struct strbuf *__restrict __ctlptr,
61 struct strbuf *__restrict __dataptr,
62 int *__restrict __bandp, int *__restrict __flagsp);
63
64/* Perform the I/O control operation specified by REQUEST on FD.
65 One argument may follow; its presence and type depend on REQUEST.
66 Return value depends on REQUEST. Usually -1 indicates error. */
67extern int ioctl (int __fd, unsigned long int __request, ...) __THROW;
68
69/* Send a message on a STREAM.
70
71 This function is a cancellation point and therefore not marked with
72 __THROW. */
73extern int putmsg (int __fildes, const struct strbuf *__ctlptr,
74 const struct strbuf *__dataptr, int __flags);
75
76/* Send a message on a STREAM to the BAND.
77
78 This function is a cancellation point and therefore not marked with
79 __THROW. */
80extern int putpmsg (int __fildes, const struct strbuf *__ctlptr,
81 const struct strbuf *__dataptr, int __band, int __flags);
82
83/* Attach a STREAMS-based file descriptor FILDES to a file PATH in the
84 file system name space. */
85extern int fattach (int __fildes, const char *__path) __THROW;
86
87/* Detach a name PATH from a STREAMS-based file descriptor. */
88extern int fdetach (const char *__path) __THROW;
89
90__END_DECLS
91
92#endif /* stropts.h */
\ No newline at end of file
lib/libc/include/generic-glibc/sys/cdefs.h+8
......@@ -412,6 +412,14 @@
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
415423#if (!defined _Noreturn \
416424 && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
417425 && !__GNUC_PREREQ (4,7))
lib/libc/include/generic-glibc/sys/ifunc.h created+42
......@@ -0,0 +1,42 @@
1/* Definitions used by AArch64 indirect function resolvers.
2 Copyright (C) 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 _SYS_IFUNC_H
20#define _SYS_IFUNC_H
21
22/* A second argument is passed to the ifunc resolver. */
23#define _IFUNC_ARG_HWCAP (1ULL << 62)
24
25/* The prototype of a gnu indirect function resolver on AArch64 is
26
27 ElfW(Addr) ifunc_resolver (uint64_t, const __ifunc_arg_t *);
28
29 the first argument should have the _IFUNC_ARG_HWCAP bit set and
30 the remaining bits should match the AT_HWCAP settings. */
31
32/* Second argument to an ifunc resolver. */
33struct __ifunc_arg_t
34{
35 unsigned long _size; /* Size of the struct, so it can grow. */
36 unsigned long _hwcap;
37 unsigned long _hwcap2;
38};
39
40typedef struct __ifunc_arg_t __ifunc_arg_t;
41
42#endif
\ No newline at end of file
lib/libc/include/generic-glibc/sys/io.h+151-15
......@@ -12,36 +12,172 @@
1212 Lesser General Public License for more details.
1313
1414 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library. If not, see
15 License along with the GNU C Library; if not, see
1616 <http://www.gnu.org/licenses/>. */
1717
1818#ifndef _SYS_IO_H
19
2019#define _SYS_IO_H 1
20
2121#include <features.h>
2222
2323__BEGIN_DECLS
2424
2525/* If TURN_ON is TRUE, request for permission to do direct i/o on the
2626 port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O
27 permission off for that range. This call requires root privileges. */
27 permission off for that range. This call requires root privileges.
28
29 Portability note: not all Linux platforms support this call. Most
30 platforms based on the PC I/O architecture probably will, however.
31 E.g., Linux/Alpha for Alpha PCs supports this. */
2832extern int ioperm (unsigned long int __from, unsigned long int __num,
29 int __turn_on) __THROW;
33 int __turn_on) __THROW;
3034
31/* Set the I/O privilege level to LEVEL. If LEVEL is nonzero,
32 permission to access any I/O port is granted. This call requires
33 root privileges. */
35/* Set the I/O privilege level to LEVEL. If LEVEL>3, permission to
36 access any I/O port is granted. This call requires root
37 privileges. */
3438extern int iopl (int __level) __THROW;
3539
36/* The functions that actually perform reads and writes. */
37extern unsigned char inb (unsigned long int __port) __THROW;
38extern unsigned short int inw (unsigned long int __port) __THROW;
39extern unsigned long int inl (unsigned long int __port) __THROW;
40#if defined __GNUC__ && __GNUC__ >= 2
4041
41extern void outb (unsigned char __value, unsigned long int __port) __THROW;
42extern void outw (unsigned short __value, unsigned long int __port) __THROW;
43extern void outl (unsigned long __value, unsigned long int __port) __THROW;
42static __inline unsigned char
43inb (unsigned short int __port)
44{
45 unsigned char _v;
4446
45__END_DECLS
47 __asm__ __volatile__ ("inb %w1,%0":"=a" (_v):"Nd" (__port));
48 return _v;
49}
50
51static __inline unsigned char
52inb_p (unsigned short int __port)
53{
54 unsigned char _v;
55
56 __asm__ __volatile__ ("inb %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
57 return _v;
58}
59
60static __inline unsigned short int
61inw (unsigned short int __port)
62{
63 unsigned short _v;
64
65 __asm__ __volatile__ ("inw %w1,%0":"=a" (_v):"Nd" (__port));
66 return _v;
67}
68
69static __inline unsigned short int
70inw_p (unsigned short int __port)
71{
72 unsigned short int _v;
73
74 __asm__ __volatile__ ("inw %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
75 return _v;
76}
77
78static __inline unsigned int
79inl (unsigned short int __port)
80{
81 unsigned int _v;
82
83 __asm__ __volatile__ ("inl %w1,%0":"=a" (_v):"Nd" (__port));
84 return _v;
85}
86
87static __inline unsigned int
88inl_p (unsigned short int __port)
89{
90 unsigned int _v;
91 __asm__ __volatile__ ("inl %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
92 return _v;
93}
94
95static __inline void
96outb (unsigned char __value, unsigned short int __port)
97{
98 __asm__ __volatile__ ("outb %b0,%w1": :"a" (__value), "Nd" (__port));
99}
46100
101static __inline void
102outb_p (unsigned char __value, unsigned short int __port)
103{
104 __asm__ __volatile__ ("outb %b0,%w1\noutb %%al,$0x80": :"a" (__value),
105 "Nd" (__port));
106}
107
108static __inline void
109outw (unsigned short int __value, unsigned short int __port)
110{
111 __asm__ __volatile__ ("outw %w0,%w1": :"a" (__value), "Nd" (__port));
112
113}
114
115static __inline void
116outw_p (unsigned short int __value, unsigned short int __port)
117{
118 __asm__ __volatile__ ("outw %w0,%w1\noutb %%al,$0x80": :"a" (__value),
119 "Nd" (__port));
120}
121
122static __inline void
123outl (unsigned int __value, unsigned short int __port)
124{
125 __asm__ __volatile__ ("outl %0,%w1": :"a" (__value), "Nd" (__port));
126}
127
128static __inline void
129outl_p (unsigned int __value, unsigned short int __port)
130{
131 __asm__ __volatile__ ("outl %0,%w1\noutb %%al,$0x80": :"a" (__value),
132 "Nd" (__port));
133}
134
135static __inline void
136insb (unsigned short int __port, void *__addr, unsigned long int __count)
137{
138 __asm__ __volatile__ ("cld ; rep ; insb":"=D" (__addr), "=c" (__count)
139 :"d" (__port), "0" (__addr), "1" (__count));
140}
141
142static __inline void
143insw (unsigned short int __port, void *__addr, unsigned long int __count)
144{
145 __asm__ __volatile__ ("cld ; rep ; insw":"=D" (__addr), "=c" (__count)
146 :"d" (__port), "0" (__addr), "1" (__count));
147}
148
149static __inline void
150insl (unsigned short int __port, void *__addr, unsigned long int __count)
151{
152 __asm__ __volatile__ ("cld ; rep ; insl":"=D" (__addr), "=c" (__count)
153 :"d" (__port), "0" (__addr), "1" (__count));
154}
155
156static __inline void
157outsb (unsigned short int __port, const void *__addr,
158 unsigned long int __count)
159{
160 __asm__ __volatile__ ("cld ; rep ; outsb":"=S" (__addr), "=c" (__count)
161 :"d" (__port), "0" (__addr), "1" (__count));
162}
163
164static __inline void
165outsw (unsigned short int __port, const void *__addr,
166 unsigned long int __count)
167{
168 __asm__ __volatile__ ("cld ; rep ; outsw":"=S" (__addr), "=c" (__count)
169 :"d" (__port), "0" (__addr), "1" (__count));
170}
171
172static __inline void
173outsl (unsigned short int __port, const void *__addr,
174 unsigned long int __count)
175{
176 __asm__ __volatile__ ("cld ; rep ; outsl":"=S" (__addr), "=c" (__count)
177 :"d" (__port), "0" (__addr), "1" (__count));
178}
179
180#endif /* GNU C */
181
182__END_DECLS
47183#endif /* _SYS_IO_H */
\ No newline at end of file
lib/libc/include/generic-glibc/sys/stropts.h deleted-1
......@@ -1 +0,0 @@
1#include <stropts.h>
\ No newline at end of file
lib/libc/include/generic-glibc/sys/sysctl.h+4-1
......@@ -18,6 +18,8 @@
1818#ifndef _SYS_SYSCTL_H
1919#define _SYS_SYSCTL_H 1
2020
21#warning "The <sys/sysctl.h> header is deprecated and will be removed."
22
2123#include <features.h>
2224#define __need_size_t
2325#include <stddef.h>
......@@ -66,7 +68,8 @@ __BEGIN_DECLS
6668
6769/* Read or write system parameters. */
6870extern int sysctl (int *__name, int __nlen, void *__oldval,
69 size_t *__oldlenp, void *__newval, size_t __newlen) __THROW;
71 size_t *__oldlenp, void *__newval, size_t __newlen) __THROW
72 __attribute_deprecated__;
7073
7174__END_DECLS
7275
lib/libc/include/generic-glibc/sys/types.h+8-25
......@@ -154,37 +154,20 @@ typedef unsigned int uint;
154154
155155#include <bits/stdint-intn.h>
156156
157#if !__GNUC_PREREQ (2, 7)
158
159157/* These were defined by ISO C without the first `_'. */
160typedef unsigned char u_int8_t;
161typedef unsigned short int u_int16_t;
162typedef unsigned int u_int32_t;
163# if __WORDSIZE == 64
164typedef unsigned long int u_int64_t;
165# else
166__extension__ typedef unsigned long long int u_int64_t;
167# endif
168
169typedef int register_t;
170
171#else
172
173/* For GCC 2.7 and later, we can use specific type-size attributes. */
174# define __u_intN_t(N, MODE) \
175 typedef unsigned int u_int##N##_t __attribute__ ((__mode__ (MODE)))
176
177__u_intN_t (8, __QI__);
178__u_intN_t (16, __HI__);
179__u_intN_t (32, __SI__);
180__u_intN_t (64, __DI__);
158typedef __uint8_t u_int8_t;
159typedef __uint16_t u_int16_t;
160typedef __uint32_t u_int32_t;
161typedef __uint64_t u_int64_t;
181162
163#if __GNUC_PREREQ (2, 7)
182164typedef int register_t __attribute__ ((__mode__ (__word__)));
183
165#else
166typedef int register_t;
167#endif
184168
185169/* Some code from BIND tests this macro to see if the types above are
186170 defined. */
187#endif
188171#define __BIT_TYPES_DEFINED__ 1
189172
190173
lib/libc/include/i386-linux-gnu/bits/math-vector-fortran.h deleted-43
......@@ -1,43 +0,0 @@
1! Platform-specific declarations of SIMD math functions for Fortran. -*- f90 -*-
2! Copyright (C) 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!GCC$ builtin (cos) attributes simd (notinbranch) if('x86_64')
20!GCC$ builtin (cosf) attributes simd (notinbranch) if('x86_64')
21!GCC$ builtin (sin) attributes simd (notinbranch) if('x86_64')
22!GCC$ builtin (sinf) attributes simd (notinbranch) if('x86_64')
23!GCC$ builtin (sincos) attributes simd (notinbranch) if('x86_64')
24!GCC$ builtin (sincosf) attributes simd (notinbranch) if('x86_64')
25!GCC$ builtin (log) attributes simd (notinbranch) if('x86_64')
26!GCC$ builtin (logf) attributes simd (notinbranch) if('x86_64')
27!GCC$ builtin (exp) attributes simd (notinbranch) if('x86_64')
28!GCC$ builtin (expf) attributes simd (notinbranch) if('x86_64')
29!GCC$ builtin (pow) attributes simd (notinbranch) if('x86_64')
30!GCC$ builtin (powf) attributes simd (notinbranch) if('x86_64')
31
32!GCC$ builtin (cos) attributes simd (notinbranch) if('x32')
33!GCC$ builtin (cosf) attributes simd (notinbranch) if('x32')
34!GCC$ builtin (sin) attributes simd (notinbranch) if('x32')
35!GCC$ builtin (sinf) attributes simd (notinbranch) if('x32')
36!GCC$ builtin (sincos) attributes simd (notinbranch) if('x32')
37!GCC$ builtin (sincosf) attributes simd (notinbranch) if('x32')
38!GCC$ builtin (log) attributes simd (notinbranch) if('x32')
39!GCC$ builtin (logf) attributes simd (notinbranch) if('x32')
40!GCC$ builtin (exp) attributes simd (notinbranch) if('x32')
41!GCC$ builtin (expf) attributes simd (notinbranch) if('x32')
42!GCC$ builtin (pow) attributes simd (notinbranch) if('x32')
43!GCC$ builtin (powf) attributes simd (notinbranch) if('x32')
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/xtitypes.h deleted-33
......@@ -1,33 +0,0 @@
1/* bits/xtitypes.h -- Define some types used by <bits/stropts.h>. x86-64.
2 Copyright (C) 2002-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 _STROPTS_H
20# error "Never include <bits/xtitypes.h> directly; use <stropts.h> instead."
21#endif
22
23#ifndef _BITS_XTITYPES_H
24#define _BITS_XTITYPES_H 1
25
26#include <bits/types.h>
27
28/* This type is used by some structs in <bits/stropts.h>. */
29typedef __SLONG32_TYPE __t_scalar_t;
30typedef __ULONG32_TYPE __t_uscalar_t;
31
32
33#endif /* bits/xtitypes.h */
\ No newline at end of file
lib/libc/include/i386-linux-gnu/finclude/math-vector-fortran.h created+43
......@@ -0,0 +1,43 @@
1! Platform-specific declarations of SIMD math functions for Fortran. -*- f90 -*-
2! Copyright (C) 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!GCC$ builtin (cos) attributes simd (notinbranch) if('x86_64')
20!GCC$ builtin (cosf) attributes simd (notinbranch) if('x86_64')
21!GCC$ builtin (sin) attributes simd (notinbranch) if('x86_64')
22!GCC$ builtin (sinf) attributes simd (notinbranch) if('x86_64')
23!GCC$ builtin (sincos) attributes simd (notinbranch) if('x86_64')
24!GCC$ builtin (sincosf) attributes simd (notinbranch) if('x86_64')
25!GCC$ builtin (log) attributes simd (notinbranch) if('x86_64')
26!GCC$ builtin (logf) attributes simd (notinbranch) if('x86_64')
27!GCC$ builtin (exp) attributes simd (notinbranch) if('x86_64')
28!GCC$ builtin (expf) attributes simd (notinbranch) if('x86_64')
29!GCC$ builtin (pow) attributes simd (notinbranch) if('x86_64')
30!GCC$ builtin (powf) attributes simd (notinbranch) if('x86_64')
31
32!GCC$ builtin (cos) attributes simd (notinbranch) if('x32')
33!GCC$ builtin (cosf) attributes simd (notinbranch) if('x32')
34!GCC$ builtin (sin) attributes simd (notinbranch) if('x32')
35!GCC$ builtin (sinf) attributes simd (notinbranch) if('x32')
36!GCC$ builtin (sincos) attributes simd (notinbranch) if('x32')
37!GCC$ builtin (sincosf) attributes simd (notinbranch) if('x32')
38!GCC$ builtin (log) attributes simd (notinbranch) if('x32')
39!GCC$ builtin (logf) attributes simd (notinbranch) if('x32')
40!GCC$ builtin (exp) attributes simd (notinbranch) if('x32')
41!GCC$ builtin (expf) attributes simd (notinbranch) if('x32')
42!GCC$ builtin (pow) attributes simd (notinbranch) if('x32')
43!GCC$ builtin (powf) attributes simd (notinbranch) if('x32')
\ No newline at end of file
lib/libc/include/i386-linux-gnu/sys/io.h deleted-183
......@@ -1,183 +0,0 @@
1/* Copyright (C) 1996-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_IO_H
19#define _SYS_IO_H 1
20
21#include <features.h>
22
23__BEGIN_DECLS
24
25/* If TURN_ON is TRUE, request for permission to do direct i/o on the
26 port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O
27 permission off for that range. This call requires root privileges.
28
29 Portability note: not all Linux platforms support this call. Most
30 platforms based on the PC I/O architecture probably will, however.
31 E.g., Linux/Alpha for Alpha PCs supports this. */
32extern int ioperm (unsigned long int __from, unsigned long int __num,
33 int __turn_on) __THROW;
34
35/* Set the I/O privilege level to LEVEL. If LEVEL>3, permission to
36 access any I/O port is granted. This call requires root
37 privileges. */
38extern int iopl (int __level) __THROW;
39
40#if defined __GNUC__ && __GNUC__ >= 2
41
42static __inline unsigned char
43inb (unsigned short int __port)
44{
45 unsigned char _v;
46
47 __asm__ __volatile__ ("inb %w1,%0":"=a" (_v):"Nd" (__port));
48 return _v;
49}
50
51static __inline unsigned char
52inb_p (unsigned short int __port)
53{
54 unsigned char _v;
55
56 __asm__ __volatile__ ("inb %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
57 return _v;
58}
59
60static __inline unsigned short int
61inw (unsigned short int __port)
62{
63 unsigned short _v;
64
65 __asm__ __volatile__ ("inw %w1,%0":"=a" (_v):"Nd" (__port));
66 return _v;
67}
68
69static __inline unsigned short int
70inw_p (unsigned short int __port)
71{
72 unsigned short int _v;
73
74 __asm__ __volatile__ ("inw %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
75 return _v;
76}
77
78static __inline unsigned int
79inl (unsigned short int __port)
80{
81 unsigned int _v;
82
83 __asm__ __volatile__ ("inl %w1,%0":"=a" (_v):"Nd" (__port));
84 return _v;
85}
86
87static __inline unsigned int
88inl_p (unsigned short int __port)
89{
90 unsigned int _v;
91 __asm__ __volatile__ ("inl %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
92 return _v;
93}
94
95static __inline void
96outb (unsigned char __value, unsigned short int __port)
97{
98 __asm__ __volatile__ ("outb %b0,%w1": :"a" (__value), "Nd" (__port));
99}
100
101static __inline void
102outb_p (unsigned char __value, unsigned short int __port)
103{
104 __asm__ __volatile__ ("outb %b0,%w1\noutb %%al,$0x80": :"a" (__value),
105 "Nd" (__port));
106}
107
108static __inline void
109outw (unsigned short int __value, unsigned short int __port)
110{
111 __asm__ __volatile__ ("outw %w0,%w1": :"a" (__value), "Nd" (__port));
112
113}
114
115static __inline void
116outw_p (unsigned short int __value, unsigned short int __port)
117{
118 __asm__ __volatile__ ("outw %w0,%w1\noutb %%al,$0x80": :"a" (__value),
119 "Nd" (__port));
120}
121
122static __inline void
123outl (unsigned int __value, unsigned short int __port)
124{
125 __asm__ __volatile__ ("outl %0,%w1": :"a" (__value), "Nd" (__port));
126}
127
128static __inline void
129outl_p (unsigned int __value, unsigned short int __port)
130{
131 __asm__ __volatile__ ("outl %0,%w1\noutb %%al,$0x80": :"a" (__value),
132 "Nd" (__port));
133}
134
135static __inline void
136insb (unsigned short int __port, void *__addr, unsigned long int __count)
137{
138 __asm__ __volatile__ ("cld ; rep ; insb":"=D" (__addr), "=c" (__count)
139 :"d" (__port), "0" (__addr), "1" (__count));
140}
141
142static __inline void
143insw (unsigned short int __port, void *__addr, unsigned long int __count)
144{
145 __asm__ __volatile__ ("cld ; rep ; insw":"=D" (__addr), "=c" (__count)
146 :"d" (__port), "0" (__addr), "1" (__count));
147}
148
149static __inline void
150insl (unsigned short int __port, void *__addr, unsigned long int __count)
151{
152 __asm__ __volatile__ ("cld ; rep ; insl":"=D" (__addr), "=c" (__count)
153 :"d" (__port), "0" (__addr), "1" (__count));
154}
155
156static __inline void
157outsb (unsigned short int __port, const void *__addr,
158 unsigned long int __count)
159{
160 __asm__ __volatile__ ("cld ; rep ; outsb":"=S" (__addr), "=c" (__count)
161 :"d" (__port), "0" (__addr), "1" (__count));
162}
163
164static __inline void
165outsw (unsigned short int __port, const void *__addr,
166 unsigned long int __count)
167{
168 __asm__ __volatile__ ("cld ; rep ; outsw":"=S" (__addr), "=c" (__count)
169 :"d" (__port), "0" (__addr), "1" (__count));
170}
171
172static __inline void
173outsl (unsigned short int __port, const void *__addr,
174 unsigned long int __count)
175{
176 __asm__ __volatile__ ("cld ; rep ; outsl":"=S" (__addr), "=c" (__count)
177 :"d" (__port), "0" (__addr), "1" (__count));
178}
179
180#endif /* GNU C */
181
182__END_DECLS
183#endif /* _SYS_IO_H */
\ No newline at end of file
lib/libc/include/mips-linux-gnu/bits/socket-constants.h created+38
......@@ -0,0 +1,38 @@
1/* Socket constants which vary among Linux architectures. Version for MIPS.
2 Copyright (C) 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 _SYS_SOCKET_H
20# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
21#endif
22
23#define SOL_SOCKET 65535
24#define SO_ACCEPTCONN 4105
25#define SO_BROADCAST 32
26#define SO_DONTROUTE 16
27#define SO_ERROR 4103
28#define SO_KEEPALIVE 8
29#define SO_LINGER 128
30#define SO_OOBINLINE 256
31#define SO_RCVBUF 4098
32#define SO_RCVLOWAT 4100
33#define SO_RCVTIMEO 4102
34#define SO_REUSEADDR 4
35#define SO_SNDBUF 4097
36#define SO_SNDLOWAT 4099
37#define SO_SNDTIMEO 4101
38#define SO_TYPE 4104
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabi64/bits/socket-constants.h created+38
......@@ -0,0 +1,38 @@
1/* Socket constants which vary among Linux architectures. Version for MIPS.
2 Copyright (C) 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 _SYS_SOCKET_H
20# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
21#endif
22
23#define SOL_SOCKET 65535
24#define SO_ACCEPTCONN 4105
25#define SO_BROADCAST 32
26#define SO_DONTROUTE 16
27#define SO_ERROR 4103
28#define SO_KEEPALIVE 8
29#define SO_LINGER 128
30#define SO_OOBINLINE 256
31#define SO_RCVBUF 4098
32#define SO_RCVLOWAT 4100
33#define SO_RCVTIMEO 4102
34#define SO_REUSEADDR 4
35#define SO_SNDBUF 4097
36#define SO_SNDLOWAT 4099
37#define SO_SNDTIMEO 4101
38#define SO_TYPE 4104
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabin32/bits/socket-constants.h created+38
......@@ -0,0 +1,38 @@
1/* Socket constants which vary among Linux architectures. Version for MIPS.
2 Copyright (C) 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 _SYS_SOCKET_H
20# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
21#endif
22
23#define SOL_SOCKET 65535
24#define SO_ACCEPTCONN 4105
25#define SO_BROADCAST 32
26#define SO_DONTROUTE 16
27#define SO_ERROR 4103
28#define SO_KEEPALIVE 8
29#define SO_LINGER 128
30#define SO_OOBINLINE 256
31#define SO_RCVBUF 4098
32#define SO_RCVLOWAT 4100
33#define SO_RCVTIMEO 4102
34#define SO_REUSEADDR 4
35#define SO_SNDBUF 4097
36#define SO_SNDLOWAT 4099
37#define SO_SNDTIMEO 4101
38#define SO_TYPE 4104
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabi64/bits/socket-constants.h created+38
......@@ -0,0 +1,38 @@
1/* Socket constants which vary among Linux architectures. Version for MIPS.
2 Copyright (C) 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 _SYS_SOCKET_H
20# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
21#endif
22
23#define SOL_SOCKET 65535
24#define SO_ACCEPTCONN 4105
25#define SO_BROADCAST 32
26#define SO_DONTROUTE 16
27#define SO_ERROR 4103
28#define SO_KEEPALIVE 8
29#define SO_LINGER 128
30#define SO_OOBINLINE 256
31#define SO_RCVBUF 4098
32#define SO_RCVLOWAT 4100
33#define SO_RCVTIMEO 4102
34#define SO_REUSEADDR 4
35#define SO_SNDBUF 4097
36#define SO_SNDLOWAT 4099
37#define SO_SNDTIMEO 4101
38#define SO_TYPE 4104
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabin32/bits/socket-constants.h created+38
......@@ -0,0 +1,38 @@
1/* Socket constants which vary among Linux architectures. Version for MIPS.
2 Copyright (C) 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 _SYS_SOCKET_H
20# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
21#endif
22
23#define SOL_SOCKET 65535
24#define SO_ACCEPTCONN 4105
25#define SO_BROADCAST 32
26#define SO_DONTROUTE 16
27#define SO_ERROR 4103
28#define SO_KEEPALIVE 8
29#define SO_LINGER 128
30#define SO_OOBINLINE 256
31#define SO_RCVBUF 4098
32#define SO_RCVLOWAT 4100
33#define SO_RCVTIMEO 4102
34#define SO_REUSEADDR 4
35#define SO_SNDBUF 4097
36#define SO_SNDLOWAT 4099
37#define SO_SNDTIMEO 4101
38#define SO_TYPE 4104
\ No newline at end of file
lib/libc/include/mipsel-linux-gnu/bits/socket-constants.h created+38
......@@ -0,0 +1,38 @@
1/* Socket constants which vary among Linux architectures. Version for MIPS.
2 Copyright (C) 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 _SYS_SOCKET_H
20# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
21#endif
22
23#define SOL_SOCKET 65535
24#define SO_ACCEPTCONN 4105
25#define SO_BROADCAST 32
26#define SO_DONTROUTE 16
27#define SO_ERROR 4103
28#define SO_KEEPALIVE 8
29#define SO_LINGER 128
30#define SO_OOBINLINE 256
31#define SO_RCVBUF 4098
32#define SO_RCVLOWAT 4100
33#define SO_RCVTIMEO 4102
34#define SO_REUSEADDR 4
35#define SO_SNDBUF 4097
36#define SO_SNDLOWAT 4099
37#define SO_SNDTIMEO 4101
38#define SO_TYPE 4104
\ No newline at end of file
lib/libc/include/powerpc-linux-gnu/bits/fenvinline.h+30-7
......@@ -18,13 +18,36 @@
1818
1919#if defined __GNUC__ && !defined _SOFT_FLOAT && !defined __NO_FPRS__
2020
21/* Inline definition for fegetround. */
22# define __fegetround() \
23 (__extension__ ({ int __fegetround_result; \
24 __asm__ __volatile__ \
25 ("mcrfs 7,7 ; mfcr %0" \
26 : "=r"(__fegetround_result) : : "cr7"); \
27 __fegetround_result & 3; }))
21/* Inline definitions for fegetround. */
22# define __fegetround_ISA300() \
23 (__extension__ ({ \
24 union { double __d; unsigned long long __ll; } __u; \
25 __asm__ __volatile__ ( \
26 ".machine push; .machine \"power9\"; mffsl %0; .machine pop" \
27 : "=f" (__u.__d)); \
28 __u.__ll & 0x0000000000000003LL; \
29 }))
30
31# define __fegetround_ISA2() \
32 (__extension__ ({ \
33 int __fegetround_result; \
34 __asm__ __volatile__ ("mcrfs 7,7 ; mfcr %0" \
35 : "=r"(__fegetround_result) : : "cr7"); \
36 __fegetround_result & 3; \
37 }))
38
39# ifdef _ARCH_PWR9
40# define __fegetround() __fegetround_ISA300()
41# elif defined __BUILTIN_CPU_SUPPORTS__
42# define __fegetround() \
43 (__glibc_likely (__builtin_cpu_supports ("arch_3_00")) \
44 ? __fegetround_ISA300() \
45 : __fegetround_ISA2() \
46 )
47# else
48# define __fegetround() __fegetround_ISA2()
49# endif
50
2851# define fegetround() __fegetround ()
2952
3053# ifndef __NO_MATH_INLINES
lib/libc/include/powerpc-linux-gnu/bits/socket-constants.h created+38
......@@ -0,0 +1,38 @@
1/* Socket constants which vary among Linux architectures. Version for POWER.
2 Copyright (C) 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 _SYS_SOCKET_H
20# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
21#endif
22
23#define SOL_SOCKET 1
24#define SO_ACCEPTCONN 30
25#define SO_BROADCAST 6
26#define SO_DONTROUTE 5
27#define SO_ERROR 4
28#define SO_KEEPALIVE 9
29#define SO_LINGER 13
30#define SO_OOBINLINE 10
31#define SO_RCVBUF 8
32#define SO_RCVLOWAT 16
33#define SO_RCVTIMEO 18
34#define SO_REUSEADDR 2
35#define SO_SNDBUF 7
36#define SO_SNDLOWAT 17
37#define SO_SNDTIMEO 19
38#define SO_TYPE 3
\ No newline at end of file
lib/libc/include/powerpc-linux-gnu/fpu_control.h+33-39
......@@ -19,6 +19,10 @@
1919#ifndef _FPU_CONTROL_H
2020#define _FPU_CONTROL_H
2121
22#if defined __SPE__ || (defined __NO_FPRS__ && !defined _SOFT_FLOAT)
23# error "SPE/e500 is no longer supported"
24#endif
25
2226#ifdef _SOFT_FLOAT
2327
2428# define _FPU_RESERVED 0xffffffff
......@@ -28,41 +32,6 @@ typedef unsigned int fpu_control_t;
2832# define _FPU_SETCW(cw) (void) (cw)
2933extern fpu_control_t __fpu_control;
3034
31#elif defined __NO_FPRS__ /* e500 */
32
33/* rounding control */
34# define _FPU_RC_NEAREST 0x00 /* RECOMMENDED */
35# define _FPU_RC_DOWN 0x03
36# define _FPU_RC_UP 0x02
37# define _FPU_RC_ZERO 0x01
38
39/* masking of interrupts */
40# define _FPU_MASK_ZM 0x10 /* zero divide */
41# define _FPU_MASK_OM 0x04 /* overflow */
42# define _FPU_MASK_UM 0x08 /* underflow */
43# define _FPU_MASK_XM 0x40 /* inexact */
44# define _FPU_MASK_IM 0x20 /* invalid operation */
45
46# define _FPU_RESERVED 0x00c10080 /* These bits are reserved and not changed. */
47
48/* Correct IEEE semantics require traps to be enabled at the hardware
49 level; the kernel then does the emulation and determines whether
50 generation of signals from those traps was enabled using prctl. */
51# define _FPU_DEFAULT 0x0000003c /* Default value. */
52# define _FPU_IEEE _FPU_DEFAULT
53
54/* Type of the control word. */
55typedef unsigned int fpu_control_t;
56
57/* Macros for accessing the hardware control word. */
58# define _FPU_GETCW(cw) \
59 __asm__ volatile ("mfspefscr %0" : "=r" (cw))
60# define _FPU_SETCW(cw) \
61 __asm__ volatile ("mtspefscr %0" : : "r" (cw))
62
63/* Default control word set at startup. */
64extern fpu_control_t __fpu_control;
65
6635#else /* PowerPC 6xx floating-point. */
6736
6837/* rounding control */
......@@ -71,6 +40,8 @@ extern fpu_control_t __fpu_control;
7140# define _FPU_RC_UP 0x02
7241# define _FPU_RC_ZERO 0x01
7342
43# define _FPU_MASK_RC (_FPU_RC_NEAREST|_FPU_RC_DOWN|_FPU_RC_UP|_FPU_RC_ZERO)
44
7445# define _FPU_MASK_NI 0x04 /* non-ieee mode */
7546
7647/* masking of interrupts */
......@@ -96,20 +67,43 @@ typedef unsigned int fpu_control_t;
9667/* Macros for accessing the hardware control word. */
9768# define _FPU_GETCW(cw) \
9869 ({union { double __d; unsigned long long __ll; } __u; \
99 register double __fr; \
100 __asm__ ("mffs %0" : "=f" (__fr)); \
101 __u.__d = __fr; \
70 __asm__ __volatile__("mffs %0" : "=f" (__u.__d)); \
10271 (cw) = (fpu_control_t) __u.__ll; \
10372 (fpu_control_t) __u.__ll; \
10473 })
10574
75# define _FPU_GET_RC_ISA300() \
76 ({union { double __d; unsigned long long __ll; } __u; \
77 __asm__ __volatile__( \
78 ".machine push; .machine \"power9\"; mffsl %0; .machine pop" \
79 : "=f" (__u.__d)); \
80 (fpu_control_t) (__u.__ll & _FPU_MASK_RC); \
81 })
82
83# ifdef _ARCH_PWR9
84# define _FPU_GET_RC() _FPU_GET_RC_ISA300()
85# elif defined __BUILTIN_CPU_SUPPORTS__
86# define _FPU_GET_RC() \
87 ({fpu_control_t __rc; \
88 __rc = __glibc_likely (__builtin_cpu_supports ("arch_3_00")) \
89 ? _FPU_GET_RC_ISA300 () \
90 : _FPU_GETCW (__rc) & _FPU_MASK_RC; \
91 __rc; \
92 })
93# else
94# define _FPU_GET_RC() \
95 ({fpu_control_t __rc = _FPU_GETCW (__rc) & _FPU_MASK_RC; \
96 __rc; \
97 })
98# endif
99
106100# define _FPU_SETCW(cw) \
107101 { union { double __d; unsigned long long __ll; } __u; \
108102 register double __fr; \
109103 __u.__ll = 0xfff80000LL << 32; /* This is a QNaN. */ \
110104 __u.__ll |= (cw) & 0xffffffffLL; \
111105 __fr = __u.__d; \
112 __asm__ ("mtfsf 255,%0" : : "f" (__fr)); \
106 __asm__ __volatile__("mtfsf 255,%0" : : "f" (__fr)); \
113107 }
114108
115109/* Default control word set at startup. */
lib/libc/include/powerpc64-linux-gnu/bits/fenvinline.h+30-7
......@@ -18,13 +18,36 @@
1818
1919#if defined __GNUC__ && !defined _SOFT_FLOAT && !defined __NO_FPRS__
2020
21/* Inline definition for fegetround. */
22# define __fegetround() \
23 (__extension__ ({ int __fegetround_result; \
24 __asm__ __volatile__ \
25 ("mcrfs 7,7 ; mfcr %0" \
26 : "=r"(__fegetround_result) : : "cr7"); \
27 __fegetround_result & 3; }))
21/* Inline definitions for fegetround. */
22# define __fegetround_ISA300() \
23 (__extension__ ({ \
24 union { double __d; unsigned long long __ll; } __u; \
25 __asm__ __volatile__ ( \
26 ".machine push; .machine \"power9\"; mffsl %0; .machine pop" \
27 : "=f" (__u.__d)); \
28 __u.__ll & 0x0000000000000003LL; \
29 }))
30
31# define __fegetround_ISA2() \
32 (__extension__ ({ \
33 int __fegetround_result; \
34 __asm__ __volatile__ ("mcrfs 7,7 ; mfcr %0" \
35 : "=r"(__fegetround_result) : : "cr7"); \
36 __fegetround_result & 3; \
37 }))
38
39# ifdef _ARCH_PWR9
40# define __fegetround() __fegetround_ISA300()
41# elif defined __BUILTIN_CPU_SUPPORTS__
42# define __fegetround() \
43 (__glibc_likely (__builtin_cpu_supports ("arch_3_00")) \
44 ? __fegetround_ISA300() \
45 : __fegetround_ISA2() \
46 )
47# else
48# define __fegetround() __fegetround_ISA2()
49# endif
50
2851# define fegetround() __fegetround ()
2952
3053# ifndef __NO_MATH_INLINES
lib/libc/include/powerpc64-linux-gnu/bits/socket-constants.h created+38
......@@ -0,0 +1,38 @@
1/* Socket constants which vary among Linux architectures. Version for POWER.
2 Copyright (C) 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 _SYS_SOCKET_H
20# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
21#endif
22
23#define SOL_SOCKET 1
24#define SO_ACCEPTCONN 30
25#define SO_BROADCAST 6
26#define SO_DONTROUTE 5
27#define SO_ERROR 4
28#define SO_KEEPALIVE 9
29#define SO_LINGER 13
30#define SO_OOBINLINE 10
31#define SO_RCVBUF 8
32#define SO_RCVLOWAT 16
33#define SO_RCVTIMEO 18
34#define SO_REUSEADDR 2
35#define SO_SNDBUF 7
36#define SO_SNDLOWAT 17
37#define SO_SNDTIMEO 19
38#define SO_TYPE 3
\ No newline at end of file
lib/libc/include/powerpc64-linux-gnu/fpu_control.h+33-39
......@@ -19,6 +19,10 @@
1919#ifndef _FPU_CONTROL_H
2020#define _FPU_CONTROL_H
2121
22#if defined __SPE__ || (defined __NO_FPRS__ && !defined _SOFT_FLOAT)
23# error "SPE/e500 is no longer supported"
24#endif
25
2226#ifdef _SOFT_FLOAT
2327
2428# define _FPU_RESERVED 0xffffffff
......@@ -28,41 +32,6 @@ typedef unsigned int fpu_control_t;
2832# define _FPU_SETCW(cw) (void) (cw)
2933extern fpu_control_t __fpu_control;
3034
31#elif defined __NO_FPRS__ /* e500 */
32
33/* rounding control */
34# define _FPU_RC_NEAREST 0x00 /* RECOMMENDED */
35# define _FPU_RC_DOWN 0x03
36# define _FPU_RC_UP 0x02
37# define _FPU_RC_ZERO 0x01
38
39/* masking of interrupts */
40# define _FPU_MASK_ZM 0x10 /* zero divide */
41# define _FPU_MASK_OM 0x04 /* overflow */
42# define _FPU_MASK_UM 0x08 /* underflow */
43# define _FPU_MASK_XM 0x40 /* inexact */
44# define _FPU_MASK_IM 0x20 /* invalid operation */
45
46# define _FPU_RESERVED 0x00c10080 /* These bits are reserved and not changed. */
47
48/* Correct IEEE semantics require traps to be enabled at the hardware
49 level; the kernel then does the emulation and determines whether
50 generation of signals from those traps was enabled using prctl. */
51# define _FPU_DEFAULT 0x0000003c /* Default value. */
52# define _FPU_IEEE _FPU_DEFAULT
53
54/* Type of the control word. */
55typedef unsigned int fpu_control_t;
56
57/* Macros for accessing the hardware control word. */
58# define _FPU_GETCW(cw) \
59 __asm__ volatile ("mfspefscr %0" : "=r" (cw))
60# define _FPU_SETCW(cw) \
61 __asm__ volatile ("mtspefscr %0" : : "r" (cw))
62
63/* Default control word set at startup. */
64extern fpu_control_t __fpu_control;
65
6635#else /* PowerPC 6xx floating-point. */
6736
6837/* rounding control */
......@@ -71,6 +40,8 @@ extern fpu_control_t __fpu_control;
7140# define _FPU_RC_UP 0x02
7241# define _FPU_RC_ZERO 0x01
7342
43# define _FPU_MASK_RC (_FPU_RC_NEAREST|_FPU_RC_DOWN|_FPU_RC_UP|_FPU_RC_ZERO)
44
7445# define _FPU_MASK_NI 0x04 /* non-ieee mode */
7546
7647/* masking of interrupts */
......@@ -96,20 +67,43 @@ typedef unsigned int fpu_control_t;
9667/* Macros for accessing the hardware control word. */
9768# define _FPU_GETCW(cw) \
9869 ({union { double __d; unsigned long long __ll; } __u; \
99 register double __fr; \
100 __asm__ ("mffs %0" : "=f" (__fr)); \
101 __u.__d = __fr; \
70 __asm__ __volatile__("mffs %0" : "=f" (__u.__d)); \
10271 (cw) = (fpu_control_t) __u.__ll; \
10372 (fpu_control_t) __u.__ll; \
10473 })
10574
75# define _FPU_GET_RC_ISA300() \
76 ({union { double __d; unsigned long long __ll; } __u; \
77 __asm__ __volatile__( \
78 ".machine push; .machine \"power9\"; mffsl %0; .machine pop" \
79 : "=f" (__u.__d)); \
80 (fpu_control_t) (__u.__ll & _FPU_MASK_RC); \
81 })
82
83# ifdef _ARCH_PWR9
84# define _FPU_GET_RC() _FPU_GET_RC_ISA300()
85# elif defined __BUILTIN_CPU_SUPPORTS__
86# define _FPU_GET_RC() \
87 ({fpu_control_t __rc; \
88 __rc = __glibc_likely (__builtin_cpu_supports ("arch_3_00")) \
89 ? _FPU_GET_RC_ISA300 () \
90 : _FPU_GETCW (__rc) & _FPU_MASK_RC; \
91 __rc; \
92 })
93# else
94# define _FPU_GET_RC() \
95 ({fpu_control_t __rc = _FPU_GETCW (__rc) & _FPU_MASK_RC; \
96 __rc; \
97 })
98# endif
99
106100# define _FPU_SETCW(cw) \
107101 { union { double __d; unsigned long long __ll; } __u; \
108102 register double __fr; \
109103 __u.__ll = 0xfff80000LL << 32; /* This is a QNaN. */ \
110104 __u.__ll |= (cw) & 0xffffffffLL; \
111105 __fr = __u.__d; \
112 __asm__ ("mtfsf 255,%0" : : "f" (__fr)); \
106 __asm__ __volatile__("mtfsf 255,%0" : : "f" (__fr)); \
113107 }
114108
115109/* Default control word set at startup. */
lib/libc/include/powerpc64-linux-gnu/gnu/stubs-64-v1.h-2
......@@ -8,9 +8,7 @@
88#endif
99
1010#define __stub_chflags
11#define __stub_fattach
1211#define __stub_fchflags
13#define __stub_fdetach
1412#define __stub_gtty
1513#define __stub_lchmod
1614#define __stub_revoke
lib/libc/include/powerpc64le-linux-gnu/bits/fenvinline.h+30-7
......@@ -18,13 +18,36 @@
1818
1919#if defined __GNUC__ && !defined _SOFT_FLOAT && !defined __NO_FPRS__
2020
21/* Inline definition for fegetround. */
22# define __fegetround() \
23 (__extension__ ({ int __fegetround_result; \
24 __asm__ __volatile__ \
25 ("mcrfs 7,7 ; mfcr %0" \
26 : "=r"(__fegetround_result) : : "cr7"); \
27 __fegetround_result & 3; }))
21/* Inline definitions for fegetround. */
22# define __fegetround_ISA300() \
23 (__extension__ ({ \
24 union { double __d; unsigned long long __ll; } __u; \
25 __asm__ __volatile__ ( \
26 ".machine push; .machine \"power9\"; mffsl %0; .machine pop" \
27 : "=f" (__u.__d)); \
28 __u.__ll & 0x0000000000000003LL; \
29 }))
30
31# define __fegetround_ISA2() \
32 (__extension__ ({ \
33 int __fegetround_result; \
34 __asm__ __volatile__ ("mcrfs 7,7 ; mfcr %0" \
35 : "=r"(__fegetround_result) : : "cr7"); \
36 __fegetround_result & 3; \
37 }))
38
39# ifdef _ARCH_PWR9
40# define __fegetround() __fegetround_ISA300()
41# elif defined __BUILTIN_CPU_SUPPORTS__
42# define __fegetround() \
43 (__glibc_likely (__builtin_cpu_supports ("arch_3_00")) \
44 ? __fegetround_ISA300() \
45 : __fegetround_ISA2() \
46 )
47# else
48# define __fegetround() __fegetround_ISA2()
49# endif
50
2851# define fegetround() __fegetround ()
2952
3053# ifndef __NO_MATH_INLINES
lib/libc/include/powerpc64le-linux-gnu/bits/socket-constants.h created+38
......@@ -0,0 +1,38 @@
1/* Socket constants which vary among Linux architectures. Version for POWER.
2 Copyright (C) 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 _SYS_SOCKET_H
20# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
21#endif
22
23#define SOL_SOCKET 1
24#define SO_ACCEPTCONN 30
25#define SO_BROADCAST 6
26#define SO_DONTROUTE 5
27#define SO_ERROR 4
28#define SO_KEEPALIVE 9
29#define SO_LINGER 13
30#define SO_OOBINLINE 10
31#define SO_RCVBUF 8
32#define SO_RCVLOWAT 16
33#define SO_RCVTIMEO 18
34#define SO_REUSEADDR 2
35#define SO_SNDBUF 7
36#define SO_SNDLOWAT 17
37#define SO_SNDTIMEO 19
38#define SO_TYPE 3
\ No newline at end of file
lib/libc/include/powerpc64le-linux-gnu/fpu_control.h+33-39
......@@ -19,6 +19,10 @@
1919#ifndef _FPU_CONTROL_H
2020#define _FPU_CONTROL_H
2121
22#if defined __SPE__ || (defined __NO_FPRS__ && !defined _SOFT_FLOAT)
23# error "SPE/e500 is no longer supported"
24#endif
25
2226#ifdef _SOFT_FLOAT
2327
2428# define _FPU_RESERVED 0xffffffff
......@@ -28,41 +32,6 @@ typedef unsigned int fpu_control_t;
2832# define _FPU_SETCW(cw) (void) (cw)
2933extern fpu_control_t __fpu_control;
3034
31#elif defined __NO_FPRS__ /* e500 */
32
33/* rounding control */
34# define _FPU_RC_NEAREST 0x00 /* RECOMMENDED */
35# define _FPU_RC_DOWN 0x03
36# define _FPU_RC_UP 0x02
37# define _FPU_RC_ZERO 0x01
38
39/* masking of interrupts */
40# define _FPU_MASK_ZM 0x10 /* zero divide */
41# define _FPU_MASK_OM 0x04 /* overflow */
42# define _FPU_MASK_UM 0x08 /* underflow */
43# define _FPU_MASK_XM 0x40 /* inexact */
44# define _FPU_MASK_IM 0x20 /* invalid operation */
45
46# define _FPU_RESERVED 0x00c10080 /* These bits are reserved and not changed. */
47
48/* Correct IEEE semantics require traps to be enabled at the hardware
49 level; the kernel then does the emulation and determines whether
50 generation of signals from those traps was enabled using prctl. */
51# define _FPU_DEFAULT 0x0000003c /* Default value. */
52# define _FPU_IEEE _FPU_DEFAULT
53
54/* Type of the control word. */
55typedef unsigned int fpu_control_t;
56
57/* Macros for accessing the hardware control word. */
58# define _FPU_GETCW(cw) \
59 __asm__ volatile ("mfspefscr %0" : "=r" (cw))
60# define _FPU_SETCW(cw) \
61 __asm__ volatile ("mtspefscr %0" : : "r" (cw))
62
63/* Default control word set at startup. */
64extern fpu_control_t __fpu_control;
65
6635#else /* PowerPC 6xx floating-point. */
6736
6837/* rounding control */
......@@ -71,6 +40,8 @@ extern fpu_control_t __fpu_control;
7140# define _FPU_RC_UP 0x02
7241# define _FPU_RC_ZERO 0x01
7342
43# define _FPU_MASK_RC (_FPU_RC_NEAREST|_FPU_RC_DOWN|_FPU_RC_UP|_FPU_RC_ZERO)
44
7445# define _FPU_MASK_NI 0x04 /* non-ieee mode */
7546
7647/* masking of interrupts */
......@@ -96,20 +67,43 @@ typedef unsigned int fpu_control_t;
9667/* Macros for accessing the hardware control word. */
9768# define _FPU_GETCW(cw) \
9869 ({union { double __d; unsigned long long __ll; } __u; \
99 register double __fr; \
100 __asm__ ("mffs %0" : "=f" (__fr)); \
101 __u.__d = __fr; \
70 __asm__ __volatile__("mffs %0" : "=f" (__u.__d)); \
10271 (cw) = (fpu_control_t) __u.__ll; \
10372 (fpu_control_t) __u.__ll; \
10473 })
10574
75# define _FPU_GET_RC_ISA300() \
76 ({union { double __d; unsigned long long __ll; } __u; \
77 __asm__ __volatile__( \
78 ".machine push; .machine \"power9\"; mffsl %0; .machine pop" \
79 : "=f" (__u.__d)); \
80 (fpu_control_t) (__u.__ll & _FPU_MASK_RC); \
81 })
82
83# ifdef _ARCH_PWR9
84# define _FPU_GET_RC() _FPU_GET_RC_ISA300()
85# elif defined __BUILTIN_CPU_SUPPORTS__
86# define _FPU_GET_RC() \
87 ({fpu_control_t __rc; \
88 __rc = __glibc_likely (__builtin_cpu_supports ("arch_3_00")) \
89 ? _FPU_GET_RC_ISA300 () \
90 : _FPU_GETCW (__rc) & _FPU_MASK_RC; \
91 __rc; \
92 })
93# else
94# define _FPU_GET_RC() \
95 ({fpu_control_t __rc = _FPU_GETCW (__rc) & _FPU_MASK_RC; \
96 __rc; \
97 })
98# endif
99
106100# define _FPU_SETCW(cw) \
107101 { union { double __d; unsigned long long __ll; } __u; \
108102 register double __fr; \
109103 __u.__ll = 0xfff80000LL << 32; /* This is a QNaN. */ \
110104 __u.__ll |= (cw) & 0xffffffffLL; \
111105 __fr = __u.__d; \
112 __asm__ ("mtfsf 255,%0" : : "f" (__fr)); \
106 __asm__ __volatile__("mtfsf 255,%0" : : "f" (__fr)); \
113107 }
114108
115109/* Default control word set at startup. */
lib/libc/include/powerpc64le-linux-gnu/gnu/stubs-64-v2.h-2
......@@ -8,9 +8,7 @@
88#endif
99
1010#define __stub_chflags
11#define __stub_fattach
1211#define __stub_fchflags
13#define __stub_fdetach
1412#define __stub_gtty
1513#define __stub_lchmod
1614#define __stub_revoke
lib/libc/include/riscv64-linux-gnu/gnu/stubs-lp64.h-6
......@@ -13,9 +13,7 @@
1313#define __stub___compat_query_module
1414#define __stub___compat_uselib
1515#define __stub_chflags
16#define __stub_fattach
1716#define __stub_fchflags
18#define __stub_fdetach
1917#define __stub_feclearexcept
2018#define __stub_fedisableexcept
2119#define __stub_feenableexcept
......@@ -33,12 +31,8 @@
3331#define __stub_fesetround
3432#define __stub_fetestexcept
3533#define __stub_feupdateenv
36#define __stub_getmsg
37#define __stub_getpmsg
3834#define __stub_gtty
3935#define __stub_lchmod
40#define __stub_putmsg
41#define __stub_putpmsg
4236#define __stub_revoke
4337#define __stub_setlogin
4438#define __stub_sigreturn
lib/libc/include/s390x-linux-gnu/bits/hwcap.h+5-1
......@@ -38,4 +38,8 @@
3838#define HWCAP_S390_VX 2048
3939#define HWCAP_S390_VXD 4096
4040#define HWCAP_S390_VXE 8192
41#define HWCAP_S390_GS 16384
\ No newline at end of file
41#define HWCAP_S390_GS 16384
42#define HWCAP_S390_VXRS_EXT2 32768
43#define HWCAP_S390_VXRS_PDE 65536
44#define HWCAP_S390_SORT 131072
45#define HWCAP_S390_DFLT 262144
\ No newline at end of file
lib/libc/include/s390x-linux-gnu/bits/xtitypes.h deleted-33
......@@ -1,33 +0,0 @@
1/* bits/xtitypes.h -- Define some types used by <bits/stropts.h>. S390/S390x
2 Copyright (C) 2002-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 _STROPTS_H
20# error "Never include <bits/xtitypes.h> directly; use <stropts.h> instead."
21#endif
22
23#ifndef _BITS_XTITYPES_H
24#define _BITS_XTITYPES_H 1
25
26#include <bits/types.h>
27
28/* This type is used by some structs in <bits/stropts.h>. */
29typedef __S32_TYPE __t_scalar_t;
30typedef __U32_TYPE __t_uscalar_t;
31
32
33#endif /* bits/xtitypes.h */
\ No newline at end of file
lib/libc/include/s390x-linux-gnu/gnu/stubs-64.h deleted-24
......@@ -1,24 +0,0 @@
1/* This file is automatically generated.
2 It defines a symbol `__stub_FUNCTION' for each function
3 in the C library which is a stub, meaning it will fail
4 every time called, usually setting errno to ENOSYS. */
5
6#ifdef _LIBC
7 #error Applications may not define the macro _LIBC
8#endif
9
10#define __stub_chflags
11#define __stub_fattach
12#define __stub_fchflags
13#define __stub_fdetach
14#define __stub_getmsg
15#define __stub_gtty
16#define __stub_lchmod
17#define __stub_pkey_alloc
18#define __stub_pkey_free
19#define __stub_putmsg
20#define __stub_revoke
21#define __stub_setlogin
22#define __stub_sigreturn
23#define __stub_sstk
24#define __stub_stty
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/socket-constants.h created+38
......@@ -0,0 +1,38 @@
1/* Socket constants which vary among Linux architectures. Version for SPARC.
2 Copyright (C) 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 _SYS_SOCKET_H
20# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
21#endif
22
23#define SOL_SOCKET 65535
24#define SO_ACCEPTCONN 32768
25#define SO_BROADCAST 32
26#define SO_DONTROUTE 16
27#define SO_ERROR 4103
28#define SO_KEEPALIVE 8
29#define SO_LINGER 128
30#define SO_OOBINLINE 256
31#define SO_RCVBUF 4098
32#define SO_RCVLOWAT 2048
33#define SO_RCVTIMEO 8192
34#define SO_REUSEADDR 4
35#define SO_SNDBUF 4097
36#define SO_SNDLOWAT 4096
37#define SO_SNDTIMEO 16384
38#define SO_TYPE 4104
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/gnu/stubs-64.h deleted-26
......@@ -1,26 +0,0 @@
1/* This file is automatically generated.
2 It defines a symbol `__stub_FUNCTION' for each function
3 in the C library which is a stub, meaning it will fail
4 every time called, usually setting errno to ENOSYS. */
5
6#ifdef _LIBC
7 #error Applications may not define the macro _LIBC
8#endif
9
10#define __stub_chflags
11#define __stub_fattach
12#define __stub_fchflags
13#define __stub_fdetach
14#define __stub_getmsg
15#define __stub_getpmsg
16#define __stub_gtty
17#define __stub_lchmod
18#define __stub_pkey_alloc
19#define __stub_pkey_free
20#define __stub_putmsg
21#define __stub_putpmsg
22#define __stub_revoke
23#define __stub_setlogin
24#define __stub_sigreturn
25#define __stub_sstk
26#define __stub_stty
\ No newline at end of file
lib/libc/include/sparcv9-linux-gnu/bits/socket-constants.h created+38
......@@ -0,0 +1,38 @@
1/* Socket constants which vary among Linux architectures. Version for SPARC.
2 Copyright (C) 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 _SYS_SOCKET_H
20# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
21#endif
22
23#define SOL_SOCKET 65535
24#define SO_ACCEPTCONN 32768
25#define SO_BROADCAST 32
26#define SO_DONTROUTE 16
27#define SO_ERROR 4103
28#define SO_KEEPALIVE 8
29#define SO_LINGER 128
30#define SO_OOBINLINE 256
31#define SO_RCVBUF 4098
32#define SO_RCVLOWAT 2048
33#define SO_RCVTIMEO 8192
34#define SO_REUSEADDR 4
35#define SO_SNDBUF 4097
36#define SO_SNDLOWAT 4096
37#define SO_SNDTIMEO 16384
38#define SO_TYPE 4104
\ No newline at end of file
lib/libc/include/sparcv9-linux-gnu/gnu/stubs-32.h deleted-26
......@@ -1,26 +0,0 @@
1/* This file is automatically generated.
2 It defines a symbol `__stub_FUNCTION' for each function
3 in the C library which is a stub, meaning it will fail
4 every time called, usually setting errno to ENOSYS. */
5
6#ifdef _LIBC
7 #error Applications may not define the macro _LIBC
8#endif
9
10#define __stub_chflags
11#define __stub_fattach
12#define __stub_fchflags
13#define __stub_fdetach
14#define __stub_getmsg
15#define __stub_getpmsg
16#define __stub_gtty
17#define __stub_lchmod
18#define __stub_pkey_alloc
19#define __stub_pkey_free
20#define __stub_putmsg
21#define __stub_putpmsg
22#define __stub_revoke
23#define __stub_setlogin
24#define __stub_sigreturn
25#define __stub_sstk
26#define __stub_stty
\ No newline at end of file
lib/libc/include/x86_64-linux-gnu/bits/math-vector-fortran.h deleted-43
......@@ -1,43 +0,0 @@
1! Platform-specific declarations of SIMD math functions for Fortran. -*- f90 -*-
2! Copyright (C) 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!GCC$ builtin (cos) attributes simd (notinbranch) if('x86_64')
20!GCC$ builtin (cosf) attributes simd (notinbranch) if('x86_64')
21!GCC$ builtin (sin) attributes simd (notinbranch) if('x86_64')
22!GCC$ builtin (sinf) attributes simd (notinbranch) if('x86_64')
23!GCC$ builtin (sincos) attributes simd (notinbranch) if('x86_64')
24!GCC$ builtin (sincosf) attributes simd (notinbranch) if('x86_64')
25!GCC$ builtin (log) attributes simd (notinbranch) if('x86_64')
26!GCC$ builtin (logf) attributes simd (notinbranch) if('x86_64')
27!GCC$ builtin (exp) attributes simd (notinbranch) if('x86_64')
28!GCC$ builtin (expf) attributes simd (notinbranch) if('x86_64')
29!GCC$ builtin (pow) attributes simd (notinbranch) if('x86_64')
30!GCC$ builtin (powf) attributes simd (notinbranch) if('x86_64')
31
32!GCC$ builtin (cos) attributes simd (notinbranch) if('x32')
33!GCC$ builtin (cosf) attributes simd (notinbranch) if('x32')
34!GCC$ builtin (sin) attributes simd (notinbranch) if('x32')
35!GCC$ builtin (sinf) attributes simd (notinbranch) if('x32')
36!GCC$ builtin (sincos) attributes simd (notinbranch) if('x32')
37!GCC$ builtin (sincosf) attributes simd (notinbranch) if('x32')
38!GCC$ builtin (log) attributes simd (notinbranch) if('x32')
39!GCC$ builtin (logf) attributes simd (notinbranch) if('x32')
40!GCC$ builtin (exp) attributes simd (notinbranch) if('x32')
41!GCC$ builtin (expf) attributes simd (notinbranch) if('x32')
42!GCC$ builtin (pow) attributes simd (notinbranch) if('x32')
43!GCC$ builtin (powf) attributes simd (notinbranch) if('x32')
\ No newline at end of file
lib/libc/include/x86_64-linux-gnu/bits/xtitypes.h deleted-33
......@@ -1,33 +0,0 @@
1/* bits/xtitypes.h -- Define some types used by <bits/stropts.h>. x86-64.
2 Copyright (C) 2002-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 _STROPTS_H
20# error "Never include <bits/xtitypes.h> directly; use <stropts.h> instead."
21#endif
22
23#ifndef _BITS_XTITYPES_H
24#define _BITS_XTITYPES_H 1
25
26#include <bits/types.h>
27
28/* This type is used by some structs in <bits/stropts.h>. */
29typedef __SLONG32_TYPE __t_scalar_t;
30typedef __ULONG32_TYPE __t_uscalar_t;
31
32
33#endif /* bits/xtitypes.h */
\ No newline at end of file
lib/libc/include/x86_64-linux-gnu/finclude/math-vector-fortran.h created+43
......@@ -0,0 +1,43 @@
1! Platform-specific declarations of SIMD math functions for Fortran. -*- f90 -*-
2! Copyright (C) 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!GCC$ builtin (cos) attributes simd (notinbranch) if('x86_64')
20!GCC$ builtin (cosf) attributes simd (notinbranch) if('x86_64')
21!GCC$ builtin (sin) attributes simd (notinbranch) if('x86_64')
22!GCC$ builtin (sinf) attributes simd (notinbranch) if('x86_64')
23!GCC$ builtin (sincos) attributes simd (notinbranch) if('x86_64')
24!GCC$ builtin (sincosf) attributes simd (notinbranch) if('x86_64')
25!GCC$ builtin (log) attributes simd (notinbranch) if('x86_64')
26!GCC$ builtin (logf) attributes simd (notinbranch) if('x86_64')
27!GCC$ builtin (exp) attributes simd (notinbranch) if('x86_64')
28!GCC$ builtin (expf) attributes simd (notinbranch) if('x86_64')
29!GCC$ builtin (pow) attributes simd (notinbranch) if('x86_64')
30!GCC$ builtin (powf) attributes simd (notinbranch) if('x86_64')
31
32!GCC$ builtin (cos) attributes simd (notinbranch) if('x32')
33!GCC$ builtin (cosf) attributes simd (notinbranch) if('x32')
34!GCC$ builtin (sin) attributes simd (notinbranch) if('x32')
35!GCC$ builtin (sinf) attributes simd (notinbranch) if('x32')
36!GCC$ builtin (sincos) attributes simd (notinbranch) if('x32')
37!GCC$ builtin (sincosf) attributes simd (notinbranch) if('x32')
38!GCC$ builtin (log) attributes simd (notinbranch) if('x32')
39!GCC$ builtin (logf) attributes simd (notinbranch) if('x32')
40!GCC$ builtin (exp) attributes simd (notinbranch) if('x32')
41!GCC$ builtin (expf) attributes simd (notinbranch) if('x32')
42!GCC$ builtin (pow) attributes simd (notinbranch) if('x32')
43!GCC$ builtin (powf) attributes simd (notinbranch) if('x32')
\ No newline at end of file
lib/libc/include/x86_64-linux-gnu/gnu/stubs-64.h-4
......@@ -9,13 +9,9 @@
99
1010#define __stub___compat_bdflush
1111#define __stub_chflags
12#define __stub_fattach
1312#define __stub_fchflags
14#define __stub_fdetach
15#define __stub_getmsg
1613#define __stub_gtty
1714#define __stub_lchmod
18#define __stub_putmsg
1915#define __stub_revoke
2016#define __stub_setlogin
2117#define __stub_sigreturn
lib/libc/include/x86_64-linux-gnu/sys/io.h deleted-183
......@@ -1,183 +0,0 @@
1/* Copyright (C) 1996-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_IO_H
19#define _SYS_IO_H 1
20
21#include <features.h>
22
23__BEGIN_DECLS
24
25/* If TURN_ON is TRUE, request for permission to do direct i/o on the
26 port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O
27 permission off for that range. This call requires root privileges.
28
29 Portability note: not all Linux platforms support this call. Most
30 platforms based on the PC I/O architecture probably will, however.
31 E.g., Linux/Alpha for Alpha PCs supports this. */
32extern int ioperm (unsigned long int __from, unsigned long int __num,
33 int __turn_on) __THROW;
34
35/* Set the I/O privilege level to LEVEL. If LEVEL>3, permission to
36 access any I/O port is granted. This call requires root
37 privileges. */
38extern int iopl (int __level) __THROW;
39
40#if defined __GNUC__ && __GNUC__ >= 2
41
42static __inline unsigned char
43inb (unsigned short int __port)
44{
45 unsigned char _v;
46
47 __asm__ __volatile__ ("inb %w1,%0":"=a" (_v):"Nd" (__port));
48 return _v;
49}
50
51static __inline unsigned char
52inb_p (unsigned short int __port)
53{
54 unsigned char _v;
55
56 __asm__ __volatile__ ("inb %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
57 return _v;
58}
59
60static __inline unsigned short int
61inw (unsigned short int __port)
62{
63 unsigned short _v;
64
65 __asm__ __volatile__ ("inw %w1,%0":"=a" (_v):"Nd" (__port));
66 return _v;
67}
68
69static __inline unsigned short int
70inw_p (unsigned short int __port)
71{
72 unsigned short int _v;
73
74 __asm__ __volatile__ ("inw %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
75 return _v;
76}
77
78static __inline unsigned int
79inl (unsigned short int __port)
80{
81 unsigned int _v;
82
83 __asm__ __volatile__ ("inl %w1,%0":"=a" (_v):"Nd" (__port));
84 return _v;
85}
86
87static __inline unsigned int
88inl_p (unsigned short int __port)
89{
90 unsigned int _v;
91 __asm__ __volatile__ ("inl %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
92 return _v;
93}
94
95static __inline void
96outb (unsigned char __value, unsigned short int __port)
97{
98 __asm__ __volatile__ ("outb %b0,%w1": :"a" (__value), "Nd" (__port));
99}
100
101static __inline void
102outb_p (unsigned char __value, unsigned short int __port)
103{
104 __asm__ __volatile__ ("outb %b0,%w1\noutb %%al,$0x80": :"a" (__value),
105 "Nd" (__port));
106}
107
108static __inline void
109outw (unsigned short int __value, unsigned short int __port)
110{
111 __asm__ __volatile__ ("outw %w0,%w1": :"a" (__value), "Nd" (__port));
112
113}
114
115static __inline void
116outw_p (unsigned short int __value, unsigned short int __port)
117{
118 __asm__ __volatile__ ("outw %w0,%w1\noutb %%al,$0x80": :"a" (__value),
119 "Nd" (__port));
120}
121
122static __inline void
123outl (unsigned int __value, unsigned short int __port)
124{
125 __asm__ __volatile__ ("outl %0,%w1": :"a" (__value), "Nd" (__port));
126}
127
128static __inline void
129outl_p (unsigned int __value, unsigned short int __port)
130{
131 __asm__ __volatile__ ("outl %0,%w1\noutb %%al,$0x80": :"a" (__value),
132 "Nd" (__port));
133}
134
135static __inline void
136insb (unsigned short int __port, void *__addr, unsigned long int __count)
137{
138 __asm__ __volatile__ ("cld ; rep ; insb":"=D" (__addr), "=c" (__count)
139 :"d" (__port), "0" (__addr), "1" (__count));
140}
141
142static __inline void
143insw (unsigned short int __port, void *__addr, unsigned long int __count)
144{
145 __asm__ __volatile__ ("cld ; rep ; insw":"=D" (__addr), "=c" (__count)
146 :"d" (__port), "0" (__addr), "1" (__count));
147}
148
149static __inline void
150insl (unsigned short int __port, void *__addr, unsigned long int __count)
151{
152 __asm__ __volatile__ ("cld ; rep ; insl":"=D" (__addr), "=c" (__count)
153 :"d" (__port), "0" (__addr), "1" (__count));
154}
155
156static __inline void
157outsb (unsigned short int __port, const void *__addr,
158 unsigned long int __count)
159{
160 __asm__ __volatile__ ("cld ; rep ; outsb":"=S" (__addr), "=c" (__count)
161 :"d" (__port), "0" (__addr), "1" (__count));
162}
163
164static __inline void
165outsw (unsigned short int __port, const void *__addr,
166 unsigned long int __count)
167{
168 __asm__ __volatile__ ("cld ; rep ; outsw":"=S" (__addr), "=c" (__count)
169 :"d" (__port), "0" (__addr), "1" (__count));
170}
171
172static __inline void
173outsl (unsigned short int __port, const void *__addr,
174 unsigned long int __count)
175{
176 __asm__ __volatile__ ("cld ; rep ; outsl":"=S" (__addr), "=c" (__count)
177 :"d" (__port), "0" (__addr), "1" (__count));
178}
179
180#endif /* GNU C */
181
182__END_DECLS
183#endif /* _SYS_IO_H */
\ No newline at end of file
lib/libc/include/x86_64-linux-gnux32/bits/math-vector-fortran.h deleted-43
......@@ -1,43 +0,0 @@
1! Platform-specific declarations of SIMD math functions for Fortran. -*- f90 -*-
2! Copyright (C) 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!GCC$ builtin (cos) attributes simd (notinbranch) if('x86_64')
20!GCC$ builtin (cosf) attributes simd (notinbranch) if('x86_64')
21!GCC$ builtin (sin) attributes simd (notinbranch) if('x86_64')
22!GCC$ builtin (sinf) attributes simd (notinbranch) if('x86_64')
23!GCC$ builtin (sincos) attributes simd (notinbranch) if('x86_64')
24!GCC$ builtin (sincosf) attributes simd (notinbranch) if('x86_64')
25!GCC$ builtin (log) attributes simd (notinbranch) if('x86_64')
26!GCC$ builtin (logf) attributes simd (notinbranch) if('x86_64')
27!GCC$ builtin (exp) attributes simd (notinbranch) if('x86_64')
28!GCC$ builtin (expf) attributes simd (notinbranch) if('x86_64')
29!GCC$ builtin (pow) attributes simd (notinbranch) if('x86_64')
30!GCC$ builtin (powf) attributes simd (notinbranch) if('x86_64')
31
32!GCC$ builtin (cos) attributes simd (notinbranch) if('x32')
33!GCC$ builtin (cosf) attributes simd (notinbranch) if('x32')
34!GCC$ builtin (sin) attributes simd (notinbranch) if('x32')
35!GCC$ builtin (sinf) attributes simd (notinbranch) if('x32')
36!GCC$ builtin (sincos) attributes simd (notinbranch) if('x32')
37!GCC$ builtin (sincosf) attributes simd (notinbranch) if('x32')
38!GCC$ builtin (log) attributes simd (notinbranch) if('x32')
39!GCC$ builtin (logf) attributes simd (notinbranch) if('x32')
40!GCC$ builtin (exp) attributes simd (notinbranch) if('x32')
41!GCC$ builtin (expf) attributes simd (notinbranch) if('x32')
42!GCC$ builtin (pow) attributes simd (notinbranch) if('x32')
43!GCC$ builtin (powf) attributes simd (notinbranch) if('x32')
\ No newline at end of file
lib/libc/include/x86_64-linux-gnux32/bits/xtitypes.h deleted-33
......@@ -1,33 +0,0 @@
1/* bits/xtitypes.h -- Define some types used by <bits/stropts.h>. x86-64.
2 Copyright (C) 2002-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 _STROPTS_H
20# error "Never include <bits/xtitypes.h> directly; use <stropts.h> instead."
21#endif
22
23#ifndef _BITS_XTITYPES_H
24#define _BITS_XTITYPES_H 1
25
26#include <bits/types.h>
27
28/* This type is used by some structs in <bits/stropts.h>. */
29typedef __SLONG32_TYPE __t_scalar_t;
30typedef __ULONG32_TYPE __t_uscalar_t;
31
32
33#endif /* bits/xtitypes.h */
\ No newline at end of file
lib/libc/include/x86_64-linux-gnux32/finclude/math-vector-fortran.h created+43
......@@ -0,0 +1,43 @@
1! Platform-specific declarations of SIMD math functions for Fortran. -*- f90 -*-
2! Copyright (C) 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!GCC$ builtin (cos) attributes simd (notinbranch) if('x86_64')
20!GCC$ builtin (cosf) attributes simd (notinbranch) if('x86_64')
21!GCC$ builtin (sin) attributes simd (notinbranch) if('x86_64')
22!GCC$ builtin (sinf) attributes simd (notinbranch) if('x86_64')
23!GCC$ builtin (sincos) attributes simd (notinbranch) if('x86_64')
24!GCC$ builtin (sincosf) attributes simd (notinbranch) if('x86_64')
25!GCC$ builtin (log) attributes simd (notinbranch) if('x86_64')
26!GCC$ builtin (logf) attributes simd (notinbranch) if('x86_64')
27!GCC$ builtin (exp) attributes simd (notinbranch) if('x86_64')
28!GCC$ builtin (expf) attributes simd (notinbranch) if('x86_64')
29!GCC$ builtin (pow) attributes simd (notinbranch) if('x86_64')
30!GCC$ builtin (powf) attributes simd (notinbranch) if('x86_64')
31
32!GCC$ builtin (cos) attributes simd (notinbranch) if('x32')
33!GCC$ builtin (cosf) attributes simd (notinbranch) if('x32')
34!GCC$ builtin (sin) attributes simd (notinbranch) if('x32')
35!GCC$ builtin (sinf) attributes simd (notinbranch) if('x32')
36!GCC$ builtin (sincos) attributes simd (notinbranch) if('x32')
37!GCC$ builtin (sincosf) attributes simd (notinbranch) if('x32')
38!GCC$ builtin (log) attributes simd (notinbranch) if('x32')
39!GCC$ builtin (logf) attributes simd (notinbranch) if('x32')
40!GCC$ builtin (exp) attributes simd (notinbranch) if('x32')
41!GCC$ builtin (expf) attributes simd (notinbranch) if('x32')
42!GCC$ builtin (pow) attributes simd (notinbranch) if('x32')
43!GCC$ builtin (powf) attributes simd (notinbranch) if('x32')
\ No newline at end of file
lib/libc/include/x86_64-linux-gnux32/gnu/stubs-x32.h-4
......@@ -14,13 +14,9 @@
1414#define __stub___compat_query_module
1515#define __stub___compat_uselib
1616#define __stub_chflags
17#define __stub_fattach
1817#define __stub_fchflags
19#define __stub_fdetach
20#define __stub_getmsg
2118#define __stub_gtty
2219#define __stub_lchmod
23#define __stub_putmsg
2420#define __stub_revoke
2521#define __stub_setlogin
2622#define __stub_sigreturn
lib/libc/include/x86_64-linux-gnux32/sys/io.h deleted-183
......@@ -1,183 +0,0 @@
1/* Copyright (C) 1996-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_IO_H
19#define _SYS_IO_H 1
20
21#include <features.h>
22
23__BEGIN_DECLS
24
25/* If TURN_ON is TRUE, request for permission to do direct i/o on the
26 port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O
27 permission off for that range. This call requires root privileges.
28
29 Portability note: not all Linux platforms support this call. Most
30 platforms based on the PC I/O architecture probably will, however.
31 E.g., Linux/Alpha for Alpha PCs supports this. */
32extern int ioperm (unsigned long int __from, unsigned long int __num,
33 int __turn_on) __THROW;
34
35/* Set the I/O privilege level to LEVEL. If LEVEL>3, permission to
36 access any I/O port is granted. This call requires root
37 privileges. */
38extern int iopl (int __level) __THROW;
39
40#if defined __GNUC__ && __GNUC__ >= 2
41
42static __inline unsigned char
43inb (unsigned short int __port)
44{
45 unsigned char _v;
46
47 __asm__ __volatile__ ("inb %w1,%0":"=a" (_v):"Nd" (__port));
48 return _v;
49}
50
51static __inline unsigned char
52inb_p (unsigned short int __port)
53{
54 unsigned char _v;
55
56 __asm__ __volatile__ ("inb %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
57 return _v;
58}
59
60static __inline unsigned short int
61inw (unsigned short int __port)
62{
63 unsigned short _v;
64
65 __asm__ __volatile__ ("inw %w1,%0":"=a" (_v):"Nd" (__port));
66 return _v;
67}
68
69static __inline unsigned short int
70inw_p (unsigned short int __port)
71{
72 unsigned short int _v;
73
74 __asm__ __volatile__ ("inw %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
75 return _v;
76}
77
78static __inline unsigned int
79inl (unsigned short int __port)
80{
81 unsigned int _v;
82
83 __asm__ __volatile__ ("inl %w1,%0":"=a" (_v):"Nd" (__port));
84 return _v;
85}
86
87static __inline unsigned int
88inl_p (unsigned short int __port)
89{
90 unsigned int _v;
91 __asm__ __volatile__ ("inl %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
92 return _v;
93}
94
95static __inline void
96outb (unsigned char __value, unsigned short int __port)
97{
98 __asm__ __volatile__ ("outb %b0,%w1": :"a" (__value), "Nd" (__port));
99}
100
101static __inline void
102outb_p (unsigned char __value, unsigned short int __port)
103{
104 __asm__ __volatile__ ("outb %b0,%w1\noutb %%al,$0x80": :"a" (__value),
105 "Nd" (__port));
106}
107
108static __inline void
109outw (unsigned short int __value, unsigned short int __port)
110{
111 __asm__ __volatile__ ("outw %w0,%w1": :"a" (__value), "Nd" (__port));
112
113}
114
115static __inline void
116outw_p (unsigned short int __value, unsigned short int __port)
117{
118 __asm__ __volatile__ ("outw %w0,%w1\noutb %%al,$0x80": :"a" (__value),
119 "Nd" (__port));
120}
121
122static __inline void
123outl (unsigned int __value, unsigned short int __port)
124{
125 __asm__ __volatile__ ("outl %0,%w1": :"a" (__value), "Nd" (__port));
126}
127
128static __inline void
129outl_p (unsigned int __value, unsigned short int __port)
130{
131 __asm__ __volatile__ ("outl %0,%w1\noutb %%al,$0x80": :"a" (__value),
132 "Nd" (__port));
133}
134
135static __inline void
136insb (unsigned short int __port, void *__addr, unsigned long int __count)
137{
138 __asm__ __volatile__ ("cld ; rep ; insb":"=D" (__addr), "=c" (__count)
139 :"d" (__port), "0" (__addr), "1" (__count));
140}
141
142static __inline void
143insw (unsigned short int __port, void *__addr, unsigned long int __count)
144{
145 __asm__ __volatile__ ("cld ; rep ; insw":"=D" (__addr), "=c" (__count)
146 :"d" (__port), "0" (__addr), "1" (__count));
147}
148
149static __inline void
150insl (unsigned short int __port, void *__addr, unsigned long int __count)
151{
152 __asm__ __volatile__ ("cld ; rep ; insl":"=D" (__addr), "=c" (__count)
153 :"d" (__port), "0" (__addr), "1" (__count));
154}
155
156static __inline void
157outsb (unsigned short int __port, const void *__addr,
158 unsigned long int __count)
159{
160 __asm__ __volatile__ ("cld ; rep ; outsb":"=S" (__addr), "=c" (__count)
161 :"d" (__port), "0" (__addr), "1" (__count));
162}
163
164static __inline void
165outsw (unsigned short int __port, const void *__addr,
166 unsigned long int __count)
167{
168 __asm__ __volatile__ ("cld ; rep ; outsw":"=S" (__addr), "=c" (__count)
169 :"d" (__port), "0" (__addr), "1" (__count));
170}
171
172static __inline void
173outsl (unsigned short int __port, const void *__addr,
174 unsigned long int __count)
175{
176 __asm__ __volatile__ ("cld ; rep ; outsl":"=S" (__addr), "=c" (__count)
177 :"d" (__port), "0" (__addr), "1" (__count));
178}
179
180#endif /* GNU C */
181
182__END_DECLS
183#endif /* _SYS_IO_H */
\ No newline at end of file