mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
update glibc headers to 2.30
This commit is contained in:
parent
99fd42404a
commit
45ab9d5fd6
@ -50,4 +50,7 @@
|
||||
#define HWCAP_USCAT (1 << 25)
|
||||
#define HWCAP_ILRCPC (1 << 26)
|
||||
#define HWCAP_FLAGM (1 << 27)
|
||||
#define HWCAP_SSBS (1 << 28)
|
||||
#define HWCAP_SSBS (1 << 28)
|
||||
#define HWCAP_SB (1 << 29)
|
||||
#define HWCAP_PACA (1 << 30)
|
||||
#define HWCAP_PACG (1UL << 31)
|
||||
@ -13,15 +13,9 @@
|
||||
#define __stub___compat_query_module
|
||||
#define __stub___compat_uselib
|
||||
#define __stub_chflags
|
||||
#define __stub_fattach
|
||||
#define __stub_fchflags
|
||||
#define __stub_fdetach
|
||||
#define __stub_getmsg
|
||||
#define __stub_getpmsg
|
||||
#define __stub_gtty
|
||||
#define __stub_lchmod
|
||||
#define __stub_putmsg
|
||||
#define __stub_putpmsg
|
||||
#define __stub_revoke
|
||||
#define __stub_setlogin
|
||||
#define __stub_sigreturn
|
||||
|
||||
@ -50,4 +50,7 @@
|
||||
#define HWCAP_USCAT (1 << 25)
|
||||
#define HWCAP_ILRCPC (1 << 26)
|
||||
#define HWCAP_FLAGM (1 << 27)
|
||||
#define HWCAP_SSBS (1 << 28)
|
||||
#define HWCAP_SSBS (1 << 28)
|
||||
#define HWCAP_SB (1 << 29)
|
||||
#define HWCAP_PACA (1 << 30)
|
||||
#define HWCAP_PACG (1UL << 31)
|
||||
@ -13,15 +13,9 @@
|
||||
#define __stub___compat_query_module
|
||||
#define __stub___compat_uselib
|
||||
#define __stub_chflags
|
||||
#define __stub_fattach
|
||||
#define __stub_fchflags
|
||||
#define __stub_fdetach
|
||||
#define __stub_getmsg
|
||||
#define __stub_getpmsg
|
||||
#define __stub_gtty
|
||||
#define __stub_lchmod
|
||||
#define __stub_putmsg
|
||||
#define __stub_putpmsg
|
||||
#define __stub_revoke
|
||||
#define __stub_setlogin
|
||||
#define __stub_sigreturn
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/* bits/xtitypes.h -- Define some types used by <bits/stropts.h>. x86-64.
|
||||
Copyright (C) 2002-2019 Free Software Foundation, Inc.
|
||||
/* System-specific extensions of <dirent.h>. Linux version.
|
||||
Copyright (C) 2019 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -16,18 +16,18 @@
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _STROPTS_H
|
||||
# error "Never include <bits/xtitypes.h> directly; use <stropts.h> instead."
|
||||
#ifndef _DIRENT_H
|
||||
# error "Never include <bits/dirent_ext.h> directly; use <dirent.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef _BITS_XTITYPES_H
|
||||
#define _BITS_XTITYPES_H 1
|
||||
__BEGIN_DECLS
|
||||
|
||||
#include <bits/types.h>
|
||||
#ifdef __USE_GNU
|
||||
/* Read from the directory descriptor FD into LENGTH bytes at BUFFER.
|
||||
Return the number of bytes read on success (0 for end of
|
||||
directory), and -1 for failure. */
|
||||
extern __ssize_t getdents64 (int __fd, void *__buffer, size_t __length)
|
||||
__THROW __nonnull ((2));
|
||||
#endif
|
||||
|
||||
/* This type is used by some structs in <bits/stropts.h>. */
|
||||
typedef __SLONG32_TYPE __t_scalar_t;
|
||||
typedef __ULONG32_TYPE __t_uscalar_t;
|
||||
|
||||
|
||||
#endif /* bits/xtitypes.h */
|
||||
__END_DECLS
|
||||
@ -284,6 +284,8 @@ struct f_owner_ex
|
||||
# define F_SEAL_SHRINK 0x0002 /* Prevent file from shrinking. */
|
||||
# define F_SEAL_GROW 0x0004 /* Prevent file from growing. */
|
||||
# define F_SEAL_WRITE 0x0008 /* Prevent writes. */
|
||||
# define F_SEAL_FUTURE_WRITE 0x0010 /* Prevent future writes while
|
||||
mapped. */
|
||||
#endif
|
||||
|
||||
#ifdef __USE_GNU
|
||||
|
||||
@ -192,6 +192,7 @@ struct in_pktinfo
|
||||
#define IPV6_JOIN_ANYCAST 27
|
||||
#define IPV6_LEAVE_ANYCAST 28
|
||||
#define IPV6_MULTICAST_ALL 29
|
||||
#define IPV6_ROUTER_ALERT_ISOLATE 30
|
||||
#define IPV6_IPSEC_POLICY 34
|
||||
#define IPV6_XFRM_POLICY 35
|
||||
#define IPV6_HDRINCL 36
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/* bits/xtitypes.h -- Define some types used by <bits/stropts.h>. Generic.
|
||||
Copyright (C) 2002-2019 Free Software Foundation, Inc.
|
||||
/* System-specific extensions of <signal.h>, Linux version.
|
||||
Copyright (C) 2019 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -16,18 +16,16 @@
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _STROPTS_H
|
||||
# error "Never include <bits/xtitypes.h> directly; use <stropts.h> instead."
|
||||
#ifndef _SIGNAL_H
|
||||
# error "Never include <bits/signal_ext.h> directly; use <signal.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef _BITS_XTITYPES_H
|
||||
#define _BITS_XTITYPES_H 1
|
||||
#ifdef __USE_GNU
|
||||
|
||||
#include <bits/types.h>
|
||||
/* Send SIGNAL to the thread TID in the thread group (process)
|
||||
identified by TGID. This function behaves like kill, but also
|
||||
fails with ESRCH if the specified TID does not belong to the
|
||||
specified thread group. */
|
||||
extern int tgkill (__pid_t __tgid, __pid_t __tid, int __signal);
|
||||
|
||||
/* This type is used by some structs in <bits/stropts.h>. */
|
||||
typedef __SLONGWORD_TYPE __t_scalar_t;
|
||||
typedef __ULONGWORD_TYPE __t_uscalar_t;
|
||||
|
||||
|
||||
#endif /* bits/xtitypes.h */
|
||||
#endif /* __USE_GNU */
|
||||
@ -1,5 +1,5 @@
|
||||
/* bits/xtitypes.h -- Define some types used by <bits/stropts.h>. x86-64.
|
||||
Copyright (C) 2002-2019 Free Software Foundation, Inc.
|
||||
/* Socket constants which vary among Linux architectures.
|
||||
Copyright (C) 2019 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -16,18 +16,23 @@
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _STROPTS_H
|
||||
# error "Never include <bits/xtitypes.h> directly; use <stropts.h> instead."
|
||||
#ifndef _SYS_SOCKET_H
|
||||
# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef _BITS_XTITYPES_H
|
||||
#define _BITS_XTITYPES_H 1
|
||||
|
||||
#include <bits/types.h>
|
||||
|
||||
/* This type is used by some structs in <bits/stropts.h>. */
|
||||
typedef __SLONG32_TYPE __t_scalar_t;
|
||||
typedef __ULONG32_TYPE __t_uscalar_t;
|
||||
|
||||
|
||||
#endif /* bits/xtitypes.h */
|
||||
#define SOL_SOCKET 1
|
||||
#define SO_ACCEPTCONN 30
|
||||
#define SO_BROADCAST 6
|
||||
#define SO_DONTROUTE 5
|
||||
#define SO_ERROR 4
|
||||
#define SO_KEEPALIVE 9
|
||||
#define SO_LINGER 13
|
||||
#define SO_OOBINLINE 10
|
||||
#define SO_RCVBUF 8
|
||||
#define SO_RCVLOWAT 18
|
||||
#define SO_RCVTIMEO 20
|
||||
#define SO_REUSEADDR 2
|
||||
#define SO_SNDBUF 7
|
||||
#define SO_SNDLOWAT 19
|
||||
#define SO_SNDTIMEO 21
|
||||
#define SO_TYPE 3
|
||||
@ -349,98 +349,12 @@ struct ucred
|
||||
};
|
||||
#endif
|
||||
|
||||
/* Ugly workaround for unclean kernel headers. */
|
||||
#ifndef __USE_MISC
|
||||
# ifndef FIOGETOWN
|
||||
# define __SYS_SOCKET_H_undef_FIOGETOWN
|
||||
# endif
|
||||
# ifndef FIOSETOWN
|
||||
# define __SYS_SOCKET_H_undef_FIOSETOWN
|
||||
# endif
|
||||
# ifndef SIOCATMARK
|
||||
# define __SYS_SOCKET_H_undef_SIOCATMARK
|
||||
# endif
|
||||
# ifndef SIOCGPGRP
|
||||
# define __SYS_SOCKET_H_undef_SIOCGPGRP
|
||||
# endif
|
||||
# ifndef SIOCGSTAMP
|
||||
# define __SYS_SOCKET_H_undef_SIOCGSTAMP
|
||||
# endif
|
||||
# ifndef SIOCGSTAMPNS
|
||||
# define __SYS_SOCKET_H_undef_SIOCGSTAMPNS
|
||||
# endif
|
||||
# ifndef SIOCSPGRP
|
||||
# define __SYS_SOCKET_H_undef_SIOCSPGRP
|
||||
# endif
|
||||
#endif
|
||||
#ifndef IOCSIZE_MASK
|
||||
# define __SYS_SOCKET_H_undef_IOCSIZE_MASK
|
||||
#endif
|
||||
#ifndef IOCSIZE_SHIFT
|
||||
# define __SYS_SOCKET_H_undef_IOCSIZE_SHIFT
|
||||
#endif
|
||||
#ifndef IOC_IN
|
||||
# define __SYS_SOCKET_H_undef_IOC_IN
|
||||
#endif
|
||||
#ifndef IOC_INOUT
|
||||
# define __SYS_SOCKET_H_undef_IOC_INOUT
|
||||
#endif
|
||||
#ifndef IOC_OUT
|
||||
# define __SYS_SOCKET_H_undef_IOC_OUT
|
||||
#endif
|
||||
|
||||
/* Get socket manipulation related informations from kernel headers. */
|
||||
#include <asm/socket.h>
|
||||
|
||||
#ifndef __USE_MISC
|
||||
# ifdef __SYS_SOCKET_H_undef_FIOGETOWN
|
||||
# undef __SYS_SOCKET_H_undef_FIOGETOWN
|
||||
# undef FIOGETOWN
|
||||
# endif
|
||||
# ifdef __SYS_SOCKET_H_undef_FIOSETOWN
|
||||
# undef __SYS_SOCKET_H_undef_FIOSETOWN
|
||||
# undef FIOSETOWN
|
||||
# endif
|
||||
# ifdef __SYS_SOCKET_H_undef_SIOCATMARK
|
||||
# undef __SYS_SOCKET_H_undef_SIOCATMARK
|
||||
# undef SIOCATMARK
|
||||
# endif
|
||||
# ifdef __SYS_SOCKET_H_undef_SIOCGPGRP
|
||||
# undef __SYS_SOCKET_H_undef_SIOCGPGRP
|
||||
# undef SIOCGPGRP
|
||||
# endif
|
||||
# ifdef __SYS_SOCKET_H_undef_SIOCGSTAMP
|
||||
# undef __SYS_SOCKET_H_undef_SIOCGSTAMP
|
||||
# undef SIOCGSTAMP
|
||||
# endif
|
||||
# ifdef __SYS_SOCKET_H_undef_SIOCGSTAMPNS
|
||||
# undef __SYS_SOCKET_H_undef_SIOCGSTAMPNS
|
||||
# undef SIOCGSTAMPNS
|
||||
# endif
|
||||
# ifdef __SYS_SOCKET_H_undef_SIOCSPGRP
|
||||
# undef __SYS_SOCKET_H_undef_SIOCSPGRP
|
||||
# undef SIOCSPGRP
|
||||
# endif
|
||||
#endif
|
||||
#ifdef __SYS_SOCKET_H_undef_IOCSIZE_MASK
|
||||
# undef __SYS_SOCKET_H_undef_IOCSIZE_MASK
|
||||
# undef IOCSIZE_MASK
|
||||
#endif
|
||||
#ifdef __SYS_SOCKET_H_undef_IOCSIZE_SHIFT
|
||||
# undef __SYS_SOCKET_H_undef_IOCSIZE_SHIFT
|
||||
# undef IOCSIZE_SHIFT
|
||||
#endif
|
||||
#ifdef __SYS_SOCKET_H_undef_IOC_IN
|
||||
# undef __SYS_SOCKET_H_undef_IOC_IN
|
||||
# undef IOC_IN
|
||||
#endif
|
||||
#ifdef __SYS_SOCKET_H_undef_IOC_INOUT
|
||||
# undef __SYS_SOCKET_H_undef_IOC_INOUT
|
||||
# undef IOC_INOUT
|
||||
#endif
|
||||
#ifdef __SYS_SOCKET_H_undef_IOC_OUT
|
||||
# undef __SYS_SOCKET_H_undef_IOC_OUT
|
||||
# undef IOC_OUT
|
||||
#ifdef __USE_MISC
|
||||
# include <bits/types/time_t.h>
|
||||
# include <asm/socket.h>
|
||||
#else
|
||||
# define SO_DEBUG 1
|
||||
# include <bits/socket-constants.h>
|
||||
#endif
|
||||
|
||||
/* Structure used to manipulate the SO_LINGER option. */
|
||||
|
||||
60
lib/libc/include/generic-glibc/bits/statx-generic.h
Normal file
60
lib/libc/include/generic-glibc/bits/statx-generic.h
Normal file
@ -0,0 +1,60 @@
|
||||
/* Generic statx-related definitions and declarations.
|
||||
Copyright (C) 2018-2019 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* This interface is based on <linux/stat.h> in Linux. */
|
||||
|
||||
#ifndef _SYS_STAT_H
|
||||
# error Never include <bits/statx-generic.h> directly, include <sys/stat.h> instead.
|
||||
#endif
|
||||
|
||||
#include <bits/types/struct_statx_timestamp.h>
|
||||
#include <bits/types/struct_statx.h>
|
||||
|
||||
#ifndef STATX_TYPE
|
||||
# define STATX_TYPE 0x0001U
|
||||
# define STATX_MODE 0x0002U
|
||||
# define STATX_NLINK 0x0004U
|
||||
# define STATX_UID 0x0008U
|
||||
# define STATX_GID 0x0010U
|
||||
# define STATX_ATIME 0x0020U
|
||||
# define STATX_MTIME 0x0040U
|
||||
# define STATX_CTIME 0x0080U
|
||||
# define STATX_INO 0x0100U
|
||||
# define STATX_SIZE 0x0200U
|
||||
# define STATX_BLOCKS 0x0400U
|
||||
# define STATX_BASIC_STATS 0x07ffU
|
||||
# define STATX_ALL 0x0fffU
|
||||
# define STATX_BTIME 0x0800U
|
||||
# define STATX__RESERVED 0x80000000U
|
||||
|
||||
# define STATX_ATTR_COMPRESSED 0x0004
|
||||
# define STATX_ATTR_IMMUTABLE 0x0010
|
||||
# define STATX_ATTR_APPEND 0x0020
|
||||
# define STATX_ATTR_NODUMP 0x0040
|
||||
# define STATX_ATTR_ENCRYPTED 0x0800
|
||||
# define STATX_ATTR_AUTOMOUNT 0x1000
|
||||
#endif /* !STATX_TYPE */
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* Fill *BUF with information about PATH in DIRFD. */
|
||||
int statx (int __dirfd, const char *__restrict __path, int __flags,
|
||||
unsigned int __mask, struct statx *__restrict __buf)
|
||||
__THROW __nonnull ((2, 5));
|
||||
|
||||
__END_DECLS
|
||||
@ -1,4 +1,4 @@
|
||||
/* statx-related definitions and declarations.
|
||||
/* statx-related definitions and declarations. Linux version.
|
||||
Copyright (C) 2018-2019 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@ -19,73 +19,19 @@
|
||||
/* This interface is based on <linux/stat.h> in Linux. */
|
||||
|
||||
#ifndef _SYS_STAT_H
|
||||
# error Never include <bits/stat.x.h> directly, include <sys/stat.h> instead.
|
||||
# error Never include <bits/statx.h> directly, include <sys/stat.h> instead.
|
||||
#endif
|
||||
|
||||
struct statx_timestamp
|
||||
{
|
||||
__int64_t tv_sec;
|
||||
__uint32_t tv_nsec;
|
||||
__int32_t __statx_timestamp_pad1[1];
|
||||
};
|
||||
/* Use the Linux kernel header if available. */
|
||||
|
||||
/* Warning: The kernel may add additional fields to this struct in the
|
||||
future. Only use this struct for calling the statx function, not
|
||||
for storing data. (Expansion will be controlled by the mask
|
||||
argument of the statx function.) */
|
||||
struct statx
|
||||
{
|
||||
__uint32_t stx_mask;
|
||||
__uint32_t stx_blksize;
|
||||
__uint64_t stx_attributes;
|
||||
__uint32_t stx_nlink;
|
||||
__uint32_t stx_uid;
|
||||
__uint32_t stx_gid;
|
||||
__uint16_t stx_mode;
|
||||
__uint16_t __statx_pad1[1];
|
||||
__uint64_t stx_ino;
|
||||
__uint64_t stx_size;
|
||||
__uint64_t stx_blocks;
|
||||
__uint64_t stx_attributes_mask;
|
||||
struct statx_timestamp stx_atime;
|
||||
struct statx_timestamp stx_btime;
|
||||
struct statx_timestamp stx_ctime;
|
||||
struct statx_timestamp stx_mtime;
|
||||
__uint32_t stx_rdev_major;
|
||||
__uint32_t stx_rdev_minor;
|
||||
__uint32_t stx_dev_major;
|
||||
__uint32_t stx_dev_minor;
|
||||
__uint64_t __statx_pad2[14];
|
||||
};
|
||||
/* Use "" to work around incorrect macro expansion of the
|
||||
__has_include argument (GCC PR 80005). */
|
||||
#if __glibc_has_include ("linux/stat.h")
|
||||
# include "linux/stat.h"
|
||||
# ifdef STATX_TYPE
|
||||
# define __statx_timestamp_defined 1
|
||||
# define __statx_defined 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define STATX_TYPE 0x0001U
|
||||
#define STATX_MODE 0x0002U
|
||||
#define STATX_NLINK 0x0004U
|
||||
#define STATX_UID 0x0008U
|
||||
#define STATX_GID 0x0010U
|
||||
#define STATX_ATIME 0x0020U
|
||||
#define STATX_MTIME 0x0040U
|
||||
#define STATX_CTIME 0x0080U
|
||||
#define STATX_INO 0x0100U
|
||||
#define STATX_SIZE 0x0200U
|
||||
#define STATX_BLOCKS 0x0400U
|
||||
#define STATX_BASIC_STATS 0x07ffU
|
||||
#define STATX_ALL 0x0fffU
|
||||
#define STATX_BTIME 0x0800U
|
||||
#define STATX__RESERVED 0x80000000U
|
||||
|
||||
#define STATX_ATTR_COMPRESSED 0x0004
|
||||
#define STATX_ATTR_IMMUTABLE 0x0010
|
||||
#define STATX_ATTR_APPEND 0x0020
|
||||
#define STATX_ATTR_NODUMP 0x0040
|
||||
#define STATX_ATTR_ENCRYPTED 0x0800
|
||||
#define STATX_ATTR_AUTOMOUNT 0x1000
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* Fill *BUF with information about PATH in DIRFD. */
|
||||
int statx (int __dirfd, const char *__restrict __path, int __flags,
|
||||
unsigned int __mask, struct statx *__restrict __buf)
|
||||
__THROW __nonnull ((2, 5));
|
||||
|
||||
__END_DECLS
|
||||
#include <bits/statx-generic.h>
|
||||
@ -1,230 +0,0 @@
|
||||
/* Copyright (C) 1998-2019 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _STROPTS_H
|
||||
# error "Never include <bits/stropts.h> directly; use <stropts.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef _BITS_STROPTS_H
|
||||
#define _BITS_STROPTS_H 1
|
||||
|
||||
#include <bits/types.h>
|
||||
|
||||
/* Macros used as `request' argument to `ioctl'. */
|
||||
#define __SID ('S' << 8)
|
||||
|
||||
#define I_NREAD (__SID | 1) /* Counts the number of data bytes in the data
|
||||
block in the first message. */
|
||||
#define I_PUSH (__SID | 2) /* Push STREAMS module onto top of the current
|
||||
STREAM, just below the STREAM head. */
|
||||
#define I_POP (__SID | 3) /* Remove STREAMS module from just below the
|
||||
STREAM head. */
|
||||
#define I_LOOK (__SID | 4) /* Retrieve the name of the module just below
|
||||
the STREAM head and place it in a character
|
||||
string. */
|
||||
#define I_FLUSH (__SID | 5) /* Flush all input and/or output. */
|
||||
#define I_SRDOPT (__SID | 6) /* Sets the read mode. */
|
||||
#define I_GRDOPT (__SID | 7) /* Returns the current read mode setting. */
|
||||
#define I_STR (__SID | 8) /* Construct an internal STREAMS `ioctl'
|
||||
message and send that message downstream. */
|
||||
#define I_SETSIG (__SID | 9) /* Inform the STREAM head that the process
|
||||
wants the SIGPOLL signal issued. */
|
||||
#define I_GETSIG (__SID |10) /* Return the events for which the calling
|
||||
process is currently registered to be sent
|
||||
a SIGPOLL signal. */
|
||||
#define I_FIND (__SID |11) /* Compares the names of all modules currently
|
||||
present in the STREAM to the name pointed to
|
||||
by `arg'. */
|
||||
#define I_LINK (__SID |12) /* Connect two STREAMs. */
|
||||
#define I_UNLINK (__SID |13) /* Disconnects the two STREAMs. */
|
||||
#define I_PEEK (__SID |15) /* Allows a process to retrieve the information
|
||||
in the first message on the STREAM head read
|
||||
queue without taking the message off the
|
||||
queue. */
|
||||
#define I_FDINSERT (__SID |16) /* Create a message from the specified
|
||||
buffer(s), adds information about another
|
||||
STREAM, and send the message downstream. */
|
||||
#define I_SENDFD (__SID |17) /* Requests the STREAM associated with `fildes'
|
||||
to send a message, containing a file
|
||||
pointer, to the STREAM head at the other end
|
||||
of a STREAMS pipe. */
|
||||
#define I_RECVFD (__SID |14) /* Non-EFT definition. */
|
||||
#define I_SWROPT (__SID |19) /* Set the write mode. */
|
||||
#define I_GWROPT (__SID |20) /* Return the current write mode setting. */
|
||||
#define I_LIST (__SID |21) /* List all the module names on the STREAM, up
|
||||
to and including the topmost driver name. */
|
||||
#define I_PLINK (__SID |22) /* Connect two STREAMs with a persistent
|
||||
link. */
|
||||
#define I_PUNLINK (__SID |23) /* Disconnect the two STREAMs that were
|
||||
connected with a persistent link. */
|
||||
#define I_FLUSHBAND (__SID |28) /* Flush only band specified. */
|
||||
#define I_CKBAND (__SID |29) /* Check if the message of a given priority
|
||||
band exists on the STREAM head read
|
||||
queue. */
|
||||
#define I_GETBAND (__SID |30) /* Return the priority band of the first
|
||||
message on the STREAM head read queue. */
|
||||
#define I_ATMARK (__SID |31) /* See if the current message on the STREAM
|
||||
head read queue is "marked" by some module
|
||||
downstream. */
|
||||
#define I_SETCLTIME (__SID |32) /* Set the time the STREAM head will delay when
|
||||
a STREAM is closing and there is data on
|
||||
the write queues. */
|
||||
#define I_GETCLTIME (__SID |33) /* Get current value for closing timeout. */
|
||||
#define I_CANPUT (__SID |34) /* Check if a certain band is writable. */
|
||||
|
||||
|
||||
/* Used in `I_LOOK' request. */
|
||||
#define FMNAMESZ 8 /* compatibility w/UnixWare/Solaris. */
|
||||
|
||||
/* Flush options. */
|
||||
#define FLUSHR 0x01 /* Flush read queues. */
|
||||
#define FLUSHW 0x02 /* Flush write queues. */
|
||||
#define FLUSHRW 0x03 /* Flush read and write queues. */
|
||||
#ifdef __USE_GNU
|
||||
# define FLUSHBAND 0x04 /* Flush only specified band. */
|
||||
#endif
|
||||
|
||||
/* Possible arguments for `I_SETSIG'. */
|
||||
#define S_INPUT 0x0001 /* A message, other than a high-priority
|
||||
message, has arrived. */
|
||||
#define S_HIPRI 0x0002 /* A high-priority message is present. */
|
||||
#define S_OUTPUT 0x0004 /* The write queue for normal data is no longer
|
||||
full. */
|
||||
#define S_MSG 0x0008 /* A STREAMS signal message that contains the
|
||||
SIGPOLL signal reaches the front of the
|
||||
STREAM head read queue. */
|
||||
#define S_ERROR 0x0010 /* Notification of an error condition. */
|
||||
#define S_HANGUP 0x0020 /* Notification of a hangup. */
|
||||
#define S_RDNORM 0x0040 /* A normal message has arrived. */
|
||||
#define S_WRNORM S_OUTPUT
|
||||
#define S_RDBAND 0x0080 /* A message with a non-zero priority has
|
||||
arrived. */
|
||||
#define S_WRBAND 0x0100 /* The write queue for a non-zero priority
|
||||
band is no longer full. */
|
||||
#define S_BANDURG 0x0200 /* When used in conjunction with S_RDBAND,
|
||||
SIGURG is generated instead of SIGPOLL when
|
||||
a priority message reaches the front of the
|
||||
STREAM head read queue. */
|
||||
|
||||
/* Option for `I_PEEK'. */
|
||||
#define RS_HIPRI 0x01 /* Only look for high-priority messages. */
|
||||
|
||||
/* Options for `I_SRDOPT'. */
|
||||
#define RNORM 0x0000 /* Byte-STREAM mode, the default. */
|
||||
#define RMSGD 0x0001 /* Message-discard mode. */
|
||||
#define RMSGN 0x0002 /* Message-nondiscard mode. */
|
||||
#define RPROTDAT 0x0004 /* Deliver the control part of a message as
|
||||
data. */
|
||||
#define RPROTDIS 0x0008 /* Discard the control part of a message,
|
||||
delivering any data part. */
|
||||
#define RPROTNORM 0x0010 /* Fail `read' with EBADMSG if a message
|
||||
containing a control part is at the front
|
||||
of the STREAM head read queue. */
|
||||
#ifdef __USE_GNU
|
||||
# define RPROTMASK 0x001C /* The RPROT bits */
|
||||
#endif
|
||||
|
||||
/* Possible mode for `I_SWROPT'. */
|
||||
#define SNDZERO 0x001 /* Send a zero-length message downstream when a
|
||||
`write' of 0 bytes occurs. */
|
||||
#ifdef __USE_GNU
|
||||
# define SNDPIPE 0x002 /* Send SIGPIPE on write and putmsg if
|
||||
sd_werror is set. */
|
||||
#endif
|
||||
|
||||
/* Arguments for `I_ATMARK'. */
|
||||
#define ANYMARK 0x01 /* Check if the message is marked. */
|
||||
#define LASTMARK 0x02 /* Check if the message is the last one marked
|
||||
on the queue. */
|
||||
|
||||
/* Argument for `I_UNLINK'. */
|
||||
#ifdef __USE_GNU
|
||||
# define MUXID_ALL (-1) /* Unlink all STREAMs linked to the STREAM
|
||||
associated with `fildes'. */
|
||||
#endif
|
||||
|
||||
|
||||
/* Macros for `getmsg', `getpmsg', `putmsg' and `putpmsg'. */
|
||||
#define MSG_HIPRI 0x01 /* Send/receive high priority message. */
|
||||
#define MSG_ANY 0x02 /* Receive any message. */
|
||||
#define MSG_BAND 0x04 /* Receive message from specified band. */
|
||||
|
||||
/* Values returned by getmsg and getpmsg */
|
||||
#define MORECTL 1 /* More control information is left in
|
||||
message. */
|
||||
#define MOREDATA 2 /* More data is left in message. */
|
||||
|
||||
|
||||
/* Structure used for the I_FLUSHBAND ioctl on streams. */
|
||||
struct bandinfo
|
||||
{
|
||||
unsigned char bi_pri;
|
||||
int bi_flag;
|
||||
};
|
||||
|
||||
struct strbuf
|
||||
{
|
||||
int maxlen; /* Maximum buffer length. */
|
||||
int len; /* Length of data. */
|
||||
char *buf; /* Pointer to buffer. */
|
||||
};
|
||||
|
||||
struct strpeek
|
||||
{
|
||||
struct strbuf ctlbuf;
|
||||
struct strbuf databuf;
|
||||
t_uscalar_t flags; /* UnixWare/Solaris compatibility. */
|
||||
};
|
||||
|
||||
struct strfdinsert
|
||||
{
|
||||
struct strbuf ctlbuf;
|
||||
struct strbuf databuf;
|
||||
t_uscalar_t flags; /* UnixWare/Solaris compatibility. */
|
||||
int fildes;
|
||||
int offset;
|
||||
};
|
||||
|
||||
struct strioctl
|
||||
{
|
||||
int ic_cmd;
|
||||
int ic_timout;
|
||||
int ic_len;
|
||||
char *ic_dp;
|
||||
};
|
||||
|
||||
struct strrecvfd
|
||||
{
|
||||
int fd;
|
||||
uid_t uid;
|
||||
gid_t gid;
|
||||
char __fill[8]; /* UnixWare/Solaris compatibility */
|
||||
};
|
||||
|
||||
|
||||
struct str_mlist
|
||||
{
|
||||
char l_name[FMNAMESZ + 1];
|
||||
};
|
||||
|
||||
struct str_list
|
||||
{
|
||||
int sl_nmods;
|
||||
struct str_mlist *sl_modlist;
|
||||
};
|
||||
|
||||
#endif /* bits/stropts.h */
|
||||
@ -1,11 +1,11 @@
|
||||
/* Generated at libc build time from syscall list. */
|
||||
/* The system call list corresponds to kernel 4.20. */
|
||||
/* The system call list corresponds to kernel 5.2. */
|
||||
|
||||
#ifndef _SYSCALL_H
|
||||
# error "Never use <bits/syscall.h> directly; include <sys/syscall.h> instead."
|
||||
#endif
|
||||
|
||||
#define __GLIBC_LINUX_VERSION_CODE 267264
|
||||
#define __GLIBC_LINUX_VERSION_CODE 328192
|
||||
|
||||
#ifdef __NR_FAST_atomic_update
|
||||
# define SYS_FAST_atomic_update __NR_FAST_atomic_update
|
||||
@ -115,6 +115,10 @@
|
||||
# define SYS_break __NR_break
|
||||
#endif
|
||||
|
||||
#ifdef __NR_breakpoint
|
||||
# define SYS_breakpoint __NR_breakpoint
|
||||
#endif
|
||||
|
||||
#ifdef __NR_brk
|
||||
# define SYS_brk __NR_brk
|
||||
#endif
|
||||
@ -159,22 +163,42 @@
|
||||
# define SYS_clock_adjtime __NR_clock_adjtime
|
||||
#endif
|
||||
|
||||
#ifdef __NR_clock_adjtime64
|
||||
# define SYS_clock_adjtime64 __NR_clock_adjtime64
|
||||
#endif
|
||||
|
||||
#ifdef __NR_clock_getres
|
||||
# define SYS_clock_getres __NR_clock_getres
|
||||
#endif
|
||||
|
||||
#ifdef __NR_clock_getres_time64
|
||||
# define SYS_clock_getres_time64 __NR_clock_getres_time64
|
||||
#endif
|
||||
|
||||
#ifdef __NR_clock_gettime
|
||||
# define SYS_clock_gettime __NR_clock_gettime
|
||||
#endif
|
||||
|
||||
#ifdef __NR_clock_gettime64
|
||||
# define SYS_clock_gettime64 __NR_clock_gettime64
|
||||
#endif
|
||||
|
||||
#ifdef __NR_clock_nanosleep
|
||||
# define SYS_clock_nanosleep __NR_clock_nanosleep
|
||||
#endif
|
||||
|
||||
#ifdef __NR_clock_nanosleep_time64
|
||||
# define SYS_clock_nanosleep_time64 __NR_clock_nanosleep_time64
|
||||
#endif
|
||||
|
||||
#ifdef __NR_clock_settime
|
||||
# define SYS_clock_settime __NR_clock_settime
|
||||
#endif
|
||||
|
||||
#ifdef __NR_clock_settime64
|
||||
# define SYS_clock_settime64 __NR_clock_settime64
|
||||
#endif
|
||||
|
||||
#ifdef __NR_clone
|
||||
# define SYS_clone __NR_clone
|
||||
#endif
|
||||
@ -367,6 +391,10 @@
|
||||
# define SYS_fork __NR_fork
|
||||
#endif
|
||||
|
||||
#ifdef __NR_fp_udfiex_crtl
|
||||
# define SYS_fp_udfiex_crtl __NR_fp_udfiex_crtl
|
||||
#endif
|
||||
|
||||
#ifdef __NR_free_hugepages
|
||||
# define SYS_free_hugepages __NR_free_hugepages
|
||||
#endif
|
||||
@ -375,10 +403,26 @@
|
||||
# define SYS_fremovexattr __NR_fremovexattr
|
||||
#endif
|
||||
|
||||
#ifdef __NR_fsconfig
|
||||
# define SYS_fsconfig __NR_fsconfig
|
||||
#endif
|
||||
|
||||
#ifdef __NR_fsetxattr
|
||||
# define SYS_fsetxattr __NR_fsetxattr
|
||||
#endif
|
||||
|
||||
#ifdef __NR_fsmount
|
||||
# define SYS_fsmount __NR_fsmount
|
||||
#endif
|
||||
|
||||
#ifdef __NR_fsopen
|
||||
# define SYS_fsopen __NR_fsopen
|
||||
#endif
|
||||
|
||||
#ifdef __NR_fspick
|
||||
# define SYS_fspick __NR_fspick
|
||||
#endif
|
||||
|
||||
#ifdef __NR_fstat
|
||||
# define SYS_fstat __NR_fstat
|
||||
#endif
|
||||
@ -419,6 +463,10 @@
|
||||
# define SYS_futex __NR_futex
|
||||
#endif
|
||||
|
||||
#ifdef __NR_futex_time64
|
||||
# define SYS_futex_time64 __NR_futex_time64
|
||||
#endif
|
||||
|
||||
#ifdef __NR_futimesat
|
||||
# define SYS_futimesat __NR_futimesat
|
||||
#endif
|
||||
@ -439,6 +487,10 @@
|
||||
# define SYS_get_thread_area __NR_get_thread_area
|
||||
#endif
|
||||
|
||||
#ifdef __NR_get_tls
|
||||
# define SYS_get_tls __NR_get_tls
|
||||
#endif
|
||||
|
||||
#ifdef __NR_getcpu
|
||||
# define SYS_getcpu __NR_getcpu
|
||||
#endif
|
||||
@ -655,6 +707,10 @@
|
||||
# define SYS_io_pgetevents __NR_io_pgetevents
|
||||
#endif
|
||||
|
||||
#ifdef __NR_io_pgetevents_time64
|
||||
# define SYS_io_pgetevents_time64 __NR_io_pgetevents_time64
|
||||
#endif
|
||||
|
||||
#ifdef __NR_io_setup
|
||||
# define SYS_io_setup __NR_io_setup
|
||||
#endif
|
||||
@ -663,6 +719,18 @@
|
||||
# define SYS_io_submit __NR_io_submit
|
||||
#endif
|
||||
|
||||
#ifdef __NR_io_uring_enter
|
||||
# define SYS_io_uring_enter __NR_io_uring_enter
|
||||
#endif
|
||||
|
||||
#ifdef __NR_io_uring_register
|
||||
# define SYS_io_uring_register __NR_io_uring_register
|
||||
#endif
|
||||
|
||||
#ifdef __NR_io_uring_setup
|
||||
# define SYS_io_uring_setup __NR_io_uring_setup
|
||||
#endif
|
||||
|
||||
#ifdef __NR_ioctl
|
||||
# define SYS_ioctl __NR_ioctl
|
||||
#endif
|
||||
@ -847,6 +915,10 @@
|
||||
# define SYS_mount __NR_mount
|
||||
#endif
|
||||
|
||||
#ifdef __NR_move_mount
|
||||
# define SYS_move_mount __NR_move_mount
|
||||
#endif
|
||||
|
||||
#ifdef __NR_move_pages
|
||||
# define SYS_move_pages __NR_move_pages
|
||||
#endif
|
||||
@ -875,10 +947,18 @@
|
||||
# define SYS_mq_timedreceive __NR_mq_timedreceive
|
||||
#endif
|
||||
|
||||
#ifdef __NR_mq_timedreceive_time64
|
||||
# define SYS_mq_timedreceive_time64 __NR_mq_timedreceive_time64
|
||||
#endif
|
||||
|
||||
#ifdef __NR_mq_timedsend
|
||||
# define SYS_mq_timedsend __NR_mq_timedsend
|
||||
#endif
|
||||
|
||||
#ifdef __NR_mq_timedsend_time64
|
||||
# define SYS_mq_timedsend_time64 __NR_mq_timedsend_time64
|
||||
#endif
|
||||
|
||||
#ifdef __NR_mq_unlink
|
||||
# define SYS_mq_unlink __NR_mq_unlink
|
||||
#endif
|
||||
@ -951,6 +1031,10 @@
|
||||
# define SYS_old_adjtimex __NR_old_adjtimex
|
||||
#endif
|
||||
|
||||
#ifdef __NR_old_getpagesize
|
||||
# define SYS_old_getpagesize __NR_old_getpagesize
|
||||
#endif
|
||||
|
||||
#ifdef __NR_oldfstat
|
||||
# define SYS_oldfstat __NR_oldfstat
|
||||
#endif
|
||||
@ -983,6 +1067,10 @@
|
||||
# define SYS_open_by_handle_at __NR_open_by_handle_at
|
||||
#endif
|
||||
|
||||
#ifdef __NR_open_tree
|
||||
# define SYS_open_tree __NR_open_tree
|
||||
#endif
|
||||
|
||||
#ifdef __NR_openat
|
||||
# define SYS_openat __NR_openat
|
||||
#endif
|
||||
@ -1459,6 +1547,10 @@
|
||||
# define SYS_personality __NR_personality
|
||||
#endif
|
||||
|
||||
#ifdef __NR_pidfd_send_signal
|
||||
# define SYS_pidfd_send_signal __NR_pidfd_send_signal
|
||||
#endif
|
||||
|
||||
#ifdef __NR_pipe
|
||||
# define SYS_pipe __NR_pipe
|
||||
#endif
|
||||
@ -1491,6 +1583,10 @@
|
||||
# define SYS_ppoll __NR_ppoll
|
||||
#endif
|
||||
|
||||
#ifdef __NR_ppoll_time64
|
||||
# define SYS_ppoll_time64 __NR_ppoll_time64
|
||||
#endif
|
||||
|
||||
#ifdef __NR_prctl
|
||||
# define SYS_prctl __NR_prctl
|
||||
#endif
|
||||
@ -1531,6 +1627,10 @@
|
||||
# define SYS_pselect6 __NR_pselect6
|
||||
#endif
|
||||
|
||||
#ifdef __NR_pselect6_time64
|
||||
# define SYS_pselect6_time64 __NR_pselect6_time64
|
||||
#endif
|
||||
|
||||
#ifdef __NR_ptrace
|
||||
# define SYS_ptrace __NR_ptrace
|
||||
#endif
|
||||
@ -1599,6 +1699,10 @@
|
||||
# define SYS_recvmmsg __NR_recvmmsg
|
||||
#endif
|
||||
|
||||
#ifdef __NR_recvmmsg_time64
|
||||
# define SYS_recvmmsg_time64 __NR_recvmmsg_time64
|
||||
#endif
|
||||
|
||||
#ifdef __NR_recvmsg
|
||||
# define SYS_recvmsg __NR_recvmsg
|
||||
#endif
|
||||
@ -1671,6 +1775,10 @@
|
||||
# define SYS_rt_sigtimedwait __NR_rt_sigtimedwait
|
||||
#endif
|
||||
|
||||
#ifdef __NR_rt_sigtimedwait_time64
|
||||
# define SYS_rt_sigtimedwait_time64 __NR_rt_sigtimedwait_time64
|
||||
#endif
|
||||
|
||||
#ifdef __NR_rt_tgsigqueueinfo
|
||||
# define SYS_rt_tgsigqueueinfo __NR_rt_tgsigqueueinfo
|
||||
#endif
|
||||
@ -1731,6 +1839,10 @@
|
||||
# define SYS_sched_rr_get_interval __NR_sched_rr_get_interval
|
||||
#endif
|
||||
|
||||
#ifdef __NR_sched_rr_get_interval_time64
|
||||
# define SYS_sched_rr_get_interval_time64 __NR_sched_rr_get_interval_time64
|
||||
#endif
|
||||
|
||||
#ifdef __NR_sched_set_affinity
|
||||
# define SYS_sched_set_affinity __NR_sched_set_affinity
|
||||
#endif
|
||||
@ -1783,6 +1895,10 @@
|
||||
# define SYS_semtimedop __NR_semtimedop
|
||||
#endif
|
||||
|
||||
#ifdef __NR_semtimedop_time64
|
||||
# define SYS_semtimedop_time64 __NR_semtimedop_time64
|
||||
#endif
|
||||
|
||||
#ifdef __NR_send
|
||||
# define SYS_send __NR_send
|
||||
#endif
|
||||
@ -1823,6 +1939,10 @@
|
||||
# define SYS_set_tid_address __NR_set_tid_address
|
||||
#endif
|
||||
|
||||
#ifdef __NR_set_tls
|
||||
# define SYS_set_tls __NR_set_tls
|
||||
#endif
|
||||
|
||||
#ifdef __NR_setdomainname
|
||||
# define SYS_setdomainname __NR_setdomainname
|
||||
#endif
|
||||
@ -2171,10 +2291,18 @@
|
||||
# define SYS_timer_gettime __NR_timer_gettime
|
||||
#endif
|
||||
|
||||
#ifdef __NR_timer_gettime64
|
||||
# define SYS_timer_gettime64 __NR_timer_gettime64
|
||||
#endif
|
||||
|
||||
#ifdef __NR_timer_settime
|
||||
# define SYS_timer_settime __NR_timer_settime
|
||||
#endif
|
||||
|
||||
#ifdef __NR_timer_settime64
|
||||
# define SYS_timer_settime64 __NR_timer_settime64
|
||||
#endif
|
||||
|
||||
#ifdef __NR_timerfd
|
||||
# define SYS_timerfd __NR_timerfd
|
||||
#endif
|
||||
@ -2187,10 +2315,18 @@
|
||||
# define SYS_timerfd_gettime __NR_timerfd_gettime
|
||||
#endif
|
||||
|
||||
#ifdef __NR_timerfd_gettime64
|
||||
# define SYS_timerfd_gettime64 __NR_timerfd_gettime64
|
||||
#endif
|
||||
|
||||
#ifdef __NR_timerfd_settime
|
||||
# define SYS_timerfd_settime __NR_timerfd_settime
|
||||
#endif
|
||||
|
||||
#ifdef __NR_timerfd_settime64
|
||||
# define SYS_timerfd_settime64 __NR_timerfd_settime64
|
||||
#endif
|
||||
|
||||
#ifdef __NR_times
|
||||
# define SYS_times __NR_times
|
||||
#endif
|
||||
@ -2211,6 +2347,10 @@
|
||||
# define SYS_tuxcall __NR_tuxcall
|
||||
#endif
|
||||
|
||||
#ifdef __NR_udftrap
|
||||
# define SYS_udftrap __NR_udftrap
|
||||
#endif
|
||||
|
||||
#ifdef __NR_ugetrlimit
|
||||
# define SYS_ugetrlimit __NR_ugetrlimit
|
||||
#endif
|
||||
@ -2255,6 +2395,14 @@
|
||||
# define SYS_userfaultfd __NR_userfaultfd
|
||||
#endif
|
||||
|
||||
#ifdef __NR_usr26
|
||||
# define SYS_usr26 __NR_usr26
|
||||
#endif
|
||||
|
||||
#ifdef __NR_usr32
|
||||
# define SYS_usr32 __NR_usr32
|
||||
#endif
|
||||
|
||||
#ifdef __NR_ustat
|
||||
# define SYS_ustat __NR_ustat
|
||||
#endif
|
||||
@ -2267,6 +2415,10 @@
|
||||
# define SYS_utimensat __NR_utimensat
|
||||
#endif
|
||||
|
||||
#ifdef __NR_utimensat_time64
|
||||
# define SYS_utimensat_time64 __NR_utimensat_time64
|
||||
#endif
|
||||
|
||||
#ifdef __NR_utimes
|
||||
# define SYS_utimes __NR_utimes
|
||||
#endif
|
||||
|
||||
@ -87,7 +87,7 @@ __extension__ typedef unsigned long long int __uintmax_t;
|
||||
32 -- "natural" 32-bit type (always int)
|
||||
64 -- "natural" 64-bit type (long or long long)
|
||||
LONG32 -- 32-bit type, traditionally long
|
||||
QUAD -- 64-bit type, always long long
|
||||
QUAD -- 64-bit type, traditionally long long
|
||||
WORD -- natural type of __WORDSIZE bits (int or long)
|
||||
LONGWORD -- type of __WORDSIZE bits, traditionally long
|
||||
|
||||
@ -113,14 +113,14 @@ __extension__ typedef unsigned long long int __uintmax_t;
|
||||
#define __SLONGWORD_TYPE long int
|
||||
#define __ULONGWORD_TYPE unsigned long int
|
||||
#if __WORDSIZE == 32
|
||||
# define __SQUAD_TYPE __quad_t
|
||||
# define __UQUAD_TYPE __u_quad_t
|
||||
# define __SQUAD_TYPE __int64_t
|
||||
# define __UQUAD_TYPE __uint64_t
|
||||
# define __SWORD_TYPE int
|
||||
# define __UWORD_TYPE unsigned int
|
||||
# define __SLONG32_TYPE long int
|
||||
# define __ULONG32_TYPE unsigned long int
|
||||
# define __S64_TYPE __quad_t
|
||||
# define __U64_TYPE __u_quad_t
|
||||
# define __S64_TYPE __int64_t
|
||||
# define __U64_TYPE __uint64_t
|
||||
/* We want __extension__ before typedef's that use nonstandard base types
|
||||
such as `long long' in C89 mode. */
|
||||
# define __STD_TYPE __extension__ typedef
|
||||
@ -213,10 +213,13 @@ __STD_TYPE __U32_TYPE __socklen_t;
|
||||
It is not currently necessary for this to be machine-specific. */
|
||||
typedef int __sig_atomic_t;
|
||||
|
||||
#if __TIMESIZE == 64
|
||||
/* Seconds since the Epoch, visible to user code when time_t is too
|
||||
narrow only for consistency with the old way of widening too-narrow
|
||||
types. User code should never use __time64_t. */
|
||||
#if __TIMESIZE == 64 && defined __LIBC
|
||||
# define __time64_t __time_t
|
||||
#else
|
||||
__STD_TYPE __TIME64_T_TYPE __time64_t; /* Seconds since the Epoch. */
|
||||
#elif __TIMESIZE != 64
|
||||
__STD_TYPE __TIME64_T_TYPE __time64_t;
|
||||
#endif
|
||||
|
||||
#undef __STD_TYPE
|
||||
|
||||
55
lib/libc/include/generic-glibc/bits/types/struct_statx.h
Normal file
55
lib/libc/include/generic-glibc/bits/types/struct_statx.h
Normal file
@ -0,0 +1,55 @@
|
||||
/* Definition of the generic version of struct statx.
|
||||
Copyright (C) 2018-2019 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _SYS_STAT_H
|
||||
# error Never include <bits/types/struct_statx.h> directly, include <sys/stat.h> instead.
|
||||
#endif
|
||||
|
||||
#ifndef __statx_defined
|
||||
#define __statx_defined 1
|
||||
|
||||
/* Warning: The kernel may add additional fields to this struct in the
|
||||
future. Only use this struct for calling the statx function, not
|
||||
for storing data. (Expansion will be controlled by the mask
|
||||
argument of the statx function.) */
|
||||
struct statx
|
||||
{
|
||||
__uint32_t stx_mask;
|
||||
__uint32_t stx_blksize;
|
||||
__uint64_t stx_attributes;
|
||||
__uint32_t stx_nlink;
|
||||
__uint32_t stx_uid;
|
||||
__uint32_t stx_gid;
|
||||
__uint16_t stx_mode;
|
||||
__uint16_t __statx_pad1[1];
|
||||
__uint64_t stx_ino;
|
||||
__uint64_t stx_size;
|
||||
__uint64_t stx_blocks;
|
||||
__uint64_t stx_attributes_mask;
|
||||
struct statx_timestamp stx_atime;
|
||||
struct statx_timestamp stx_btime;
|
||||
struct statx_timestamp stx_ctime;
|
||||
struct statx_timestamp stx_mtime;
|
||||
__uint32_t stx_rdev_major;
|
||||
__uint32_t stx_rdev_minor;
|
||||
__uint32_t stx_dev_major;
|
||||
__uint32_t stx_dev_minor;
|
||||
__uint64_t __statx_pad2[14];
|
||||
};
|
||||
|
||||
#endif /* __statx_defined */
|
||||
@ -1,5 +1,5 @@
|
||||
/* bits/xtitypes.h -- Define some types used by <bits/stropts.h>. S390/S390x
|
||||
Copyright (C) 2002-2019 Free Software Foundation, Inc.
|
||||
/* Definition of the generic version of struct statx_timestamp.
|
||||
Copyright (C) 2018-2019 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -16,18 +16,18 @@
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _STROPTS_H
|
||||
# error "Never include <bits/xtitypes.h> directly; use <stropts.h> instead."
|
||||
#ifndef _SYS_STAT_H
|
||||
# error Never include <bits/types/struct_statx_timestamp.h> directly, include <sys/stat.h> instead.
|
||||
#endif
|
||||
|
||||
#ifndef _BITS_XTITYPES_H
|
||||
#define _BITS_XTITYPES_H 1
|
||||
#ifndef __statx_timestamp_defined
|
||||
#define __statx_timestamp_defined 1
|
||||
|
||||
#include <bits/types.h>
|
||||
struct statx_timestamp
|
||||
{
|
||||
__int64_t tv_sec;
|
||||
__uint32_t tv_nsec;
|
||||
__int32_t __statx_timestamp_pad1[1];
|
||||
};
|
||||
|
||||
/* This type is used by some structs in <bits/stropts.h>. */
|
||||
typedef __S32_TYPE __t_scalar_t;
|
||||
typedef __U32_TYPE __t_uscalar_t;
|
||||
|
||||
|
||||
#endif /* bits/xtitypes.h */
|
||||
#endif /* __statx_timestamp_defined */
|
||||
@ -401,4 +401,6 @@ extern int versionsort64 (const struct dirent64 **__e1,
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#include <bits/dirent_ext.h>
|
||||
|
||||
#endif /* dirent.h */
|
||||
@ -180,7 +180,19 @@ typedef struct
|
||||
{
|
||||
size_t dls_size; /* Size in bytes of the whole buffer. */
|
||||
unsigned int dls_cnt; /* Number of elements in `dls_serpath'. */
|
||||
# if __GNUC_PREREQ (3, 0)
|
||||
/* The zero-length array avoids an unwanted array subscript check by
|
||||
the compiler, while the surrounding anonymous union preserves the
|
||||
historic size of the type. At the time of writing, GNU C does
|
||||
not support structs with flexible array members in unions. */
|
||||
__extension__ union
|
||||
{
|
||||
Dl_serpath dls_serpath[0]; /* Actually longer, dls_cnt elements. */
|
||||
Dl_serpath __dls_serpath_pad[1];
|
||||
};
|
||||
# else
|
||||
Dl_serpath dls_serpath[1]; /* Actually longer, dls_cnt elements. */
|
||||
# endif
|
||||
} Dl_serinfo;
|
||||
#endif /* __USE_GNU */
|
||||
|
||||
|
||||
@ -360,7 +360,7 @@ typedef struct
|
||||
#define EM_RISCV 243 /* RISC-V */
|
||||
|
||||
#define EM_BPF 247 /* Linux BPF -- in-kernel virtual machine */
|
||||
#define EM_CSKY 252 /* C_SKY */
|
||||
#define EM_CSKY 252 /* C-SKY */
|
||||
|
||||
#define EM_NUM 253
|
||||
|
||||
@ -809,9 +809,16 @@ typedef struct
|
||||
#define NT_ARM_SYSTEM_CALL 0x404 /* ARM system call number */
|
||||
#define NT_ARM_SVE 0x405 /* ARM Scalable Vector Extension
|
||||
registers */
|
||||
#define NT_ARM_PAC_MASK 0x406 /* ARM pointer authentication
|
||||
code masks. */
|
||||
#define NT_ARM_PACA_KEYS 0x407 /* ARM pointer authentication
|
||||
address keys. */
|
||||
#define NT_ARM_PACG_KEYS 0x408 /* ARM pointer authentication
|
||||
generic key. */
|
||||
#define NT_VMCOREDD 0x700 /* Vmcore Device Dump Note. */
|
||||
#define NT_MIPS_DSP 0x800 /* MIPS DSP ASE registers. */
|
||||
#define NT_MIPS_FP_MODE 0x801 /* MIPS floating-point mode. */
|
||||
#define NT_MIPS_MSA 0x802 /* MIPS SIMD registers. */
|
||||
|
||||
/* Legal values for the note segment descriptor types for object files. */
|
||||
|
||||
@ -987,6 +994,9 @@ typedef struct
|
||||
#define DF_1_SINGLETON 0x02000000 /* Singleton symbols are used. */
|
||||
#define DF_1_STUB 0x04000000
|
||||
#define DF_1_PIE 0x08000000
|
||||
#define DF_1_KMOD 0x10000000
|
||||
#define DF_1_WEAKFILTER 0x20000000
|
||||
#define DF_1_NOCOMMON 0x40000000
|
||||
|
||||
/* Flags for the feature selection in DT_FEATURE_1. */
|
||||
#define DTF_1_PARINIT 0x00000001
|
||||
@ -2854,6 +2864,13 @@ enum
|
||||
#define R_AARCH64_TLSDESC 1031 /* TLS Descriptor. */
|
||||
#define R_AARCH64_IRELATIVE 1032 /* STT_GNU_IFUNC relocation. */
|
||||
|
||||
/* AArch64 specific values for the Dyn d_tag field. */
|
||||
#define DT_AARCH64_VARIANT_PCS (DT_LOPROC + 5)
|
||||
#define DT_AARCH64_NUM 6
|
||||
|
||||
/* AArch64 specific values for the st_other field. */
|
||||
#define STO_AARCH64_VARIANT_PCS 0x80
|
||||
|
||||
/* ARM relocs. */
|
||||
|
||||
#define R_ARM_NONE 0 /* No reloc */
|
||||
@ -3022,7 +3039,7 @@ enum
|
||||
/* Keep this the last entry. */
|
||||
#define R_ARM_NUM 256
|
||||
|
||||
/* csky */
|
||||
/* C-SKY */
|
||||
#define R_CKCORE_NONE 0 /* no reloc */
|
||||
#define R_CKCORE_ADDR32 1 /* direct 32 bit (S + A) */
|
||||
#define R_CKCORE_PCRELIMM8BY4 2 /* disp ((S + A - P) >> 2) & 0xff */
|
||||
@ -3086,6 +3103,17 @@ enum
|
||||
#define R_CKCORE_TLS_DTPOFF32 57
|
||||
#define R_CKCORE_TLS_TPOFF32 58
|
||||
|
||||
/* C-SKY elf header definition. */
|
||||
#define EF_CSKY_ABIMASK 0XF0000000
|
||||
#define EF_CSKY_OTHER 0X0FFF0000
|
||||
#define EF_CSKY_PROCESSOR 0X0000FFFF
|
||||
|
||||
#define EF_CSKY_ABIV1 0X10000000
|
||||
#define EF_CSKY_ABIV2 0X20000000
|
||||
|
||||
/* C-SKY attributes section. */
|
||||
#define SHT_CSKY_ATTRIBUTES (SHT_LOPROC + 1)
|
||||
|
||||
/* IA-64 specific declarations. */
|
||||
|
||||
/* Processor specific flags for the Ehdr e_flags field. */
|
||||
|
||||
@ -439,7 +439,7 @@
|
||||
/* Major and minor version number of the GNU C library package. Use
|
||||
these macros to test for features in specific releases. */
|
||||
#define __GLIBC__ 2
|
||||
#define __GLIBC_MINOR__ 29
|
||||
#define __GLIBC_MINOR__ 30
|
||||
|
||||
#define __GLIBC_PREREQ(maj, min) \
|
||||
((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
|
||||
|
||||
@ -86,6 +86,8 @@ struct __gconv_step
|
||||
struct __gconv_loaded_object *__shlib_handle;
|
||||
const char *__modname;
|
||||
|
||||
/* For internal use by glibc. (Accesses to this member must occur
|
||||
when the internal __gconv_lock mutex is acquired). */
|
||||
int __counter;
|
||||
|
||||
char *__from_name;
|
||||
@ -142,13 +144,4 @@ typedef struct __gconv_info
|
||||
__extension__ struct __gconv_step_data __data[0];
|
||||
} *__gconv_t;
|
||||
|
||||
/* Transliteration using the locale's data. */
|
||||
extern int __gconv_transliterate (struct __gconv_step *step,
|
||||
struct __gconv_step_data *step_data,
|
||||
const unsigned char *inbufstart,
|
||||
const unsigned char **inbufp,
|
||||
const unsigned char *inbufend,
|
||||
unsigned char **outbufstart,
|
||||
size_t *irreversible);
|
||||
|
||||
#endif /* gconv.h */
|
||||
@ -8,9 +8,7 @@
|
||||
#endif
|
||||
|
||||
#define __stub_chflags
|
||||
#define __stub_fattach
|
||||
#define __stub_fchflags
|
||||
#define __stub_fdetach
|
||||
#define __stub_gtty
|
||||
#define __stub_lchmod
|
||||
#define __stub_revoke
|
||||
|
||||
@ -8,15 +8,9 @@
|
||||
#endif
|
||||
|
||||
#define __stub_chflags
|
||||
#define __stub_fattach
|
||||
#define __stub_fchflags
|
||||
#define __stub_fdetach
|
||||
#define __stub_getmsg
|
||||
#define __stub_gtty
|
||||
#define __stub_lchmod
|
||||
#define __stub_pkey_alloc
|
||||
#define __stub_pkey_free
|
||||
#define __stub_putmsg
|
||||
#define __stub_revoke
|
||||
#define __stub_setlogin
|
||||
#define __stub_sigreturn
|
||||
@ -11,15 +11,9 @@
|
||||
#define __stub___compat_get_kernel_syms
|
||||
#define __stub___compat_query_module
|
||||
#define __stub_chflags
|
||||
#define __stub_fattach
|
||||
#define __stub_fchflags
|
||||
#define __stub_fdetach
|
||||
#define __stub_getmsg
|
||||
#define __stub_getpmsg
|
||||
#define __stub_gtty
|
||||
#define __stub_lchmod
|
||||
#define __stub_putmsg
|
||||
#define __stub_putpmsg
|
||||
#define __stub_revoke
|
||||
#define __stub_setlogin
|
||||
#define __stub_sigreturn
|
||||
|
||||
@ -10,9 +10,7 @@
|
||||
#define __stub___compat_bdflush
|
||||
#define __stub___compat_uselib
|
||||
#define __stub_chflags
|
||||
#define __stub_fattach
|
||||
#define __stub_fchflags
|
||||
#define __stub_fdetach
|
||||
#define __stub_gtty
|
||||
#define __stub_lchmod
|
||||
#define __stub_revoke
|
||||
|
||||
@ -10,9 +10,7 @@
|
||||
#define __stub___compat_bdflush
|
||||
#define __stub___compat_uselib
|
||||
#define __stub_chflags
|
||||
#define __stub_fattach
|
||||
#define __stub_fchflags
|
||||
#define __stub_fdetach
|
||||
#define __stub_gtty
|
||||
#define __stub_lchmod
|
||||
#define __stub_revoke
|
||||
|
||||
@ -8,9 +8,7 @@
|
||||
#endif
|
||||
|
||||
#define __stub_chflags
|
||||
#define __stub_fattach
|
||||
#define __stub_fchflags
|
||||
#define __stub_fdetach
|
||||
#define __stub_gtty
|
||||
#define __stub_lchmod
|
||||
#define __stub_revoke
|
||||
|
||||
@ -11,15 +11,9 @@
|
||||
#define __stub___compat_get_kernel_syms
|
||||
#define __stub___compat_query_module
|
||||
#define __stub_chflags
|
||||
#define __stub_fattach
|
||||
#define __stub_fchflags
|
||||
#define __stub_fdetach
|
||||
#define __stub_getmsg
|
||||
#define __stub_getpmsg
|
||||
#define __stub_gtty
|
||||
#define __stub_lchmod
|
||||
#define __stub_putmsg
|
||||
#define __stub_putpmsg
|
||||
#define __stub_revoke
|
||||
#define __stub_setlogin
|
||||
#define __stub_sigreturn
|
||||
|
||||
@ -35,11 +35,12 @@
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* Allocate SIZE bytes of memory. */
|
||||
extern void *malloc (size_t __size) __THROW __attribute_malloc__ __wur;
|
||||
extern void *malloc (size_t __size) __THROW __attribute_malloc__
|
||||
__attribute_alloc_size__ ((1)) __wur;
|
||||
|
||||
/* Allocate NMEMB elements of SIZE bytes each, all initialized to 0. */
|
||||
extern void *calloc (size_t __nmemb, size_t __size)
|
||||
__THROW __attribute_malloc__ __wur;
|
||||
__THROW __attribute_malloc__ __attribute_alloc_size__ ((1, 2)) __wur;
|
||||
|
||||
/* Re-allocate the previously allocated block in __ptr, making the new
|
||||
block SIZE bytes long. */
|
||||
@ -47,7 +48,7 @@ __THROW __attribute_malloc__ __wur;
|
||||
the same pointer that was passed to it, aliasing needs to be allowed
|
||||
between objects pointed by the old and new pointers. */
|
||||
extern void *realloc (void *__ptr, size_t __size)
|
||||
__THROW __attribute_warn_unused_result__;
|
||||
__THROW __attribute_warn_unused_result__ __attribute_alloc_size__ ((2));
|
||||
|
||||
/* Re-allocate the previously allocated block in PTR, making the new
|
||||
block large enough for NMEMB elements of SIZE bytes each. */
|
||||
@ -55,21 +56,23 @@ __THROW __attribute_warn_unused_result__;
|
||||
the same pointer that was passed to it, aliasing needs to be allowed
|
||||
between objects pointed by the old and new pointers. */
|
||||
extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
|
||||
__THROW __attribute_warn_unused_result__;
|
||||
__THROW __attribute_warn_unused_result__ __attribute_alloc_size__ ((2, 3));
|
||||
|
||||
/* Free a block allocated by `malloc', `realloc' or `calloc'. */
|
||||
extern void free (void *__ptr) __THROW;
|
||||
|
||||
/* Allocate SIZE bytes allocated to ALIGNMENT bytes. */
|
||||
extern void *memalign (size_t __alignment, size_t __size)
|
||||
__THROW __attribute_malloc__ __wur;
|
||||
__THROW __attribute_malloc__ __attribute_alloc_size__ ((2)) __wur;
|
||||
|
||||
/* Allocate SIZE bytes on a page boundary. */
|
||||
extern void *valloc (size_t __size) __THROW __attribute_malloc__ __wur;
|
||||
extern void *valloc (size_t __size) __THROW __attribute_malloc__
|
||||
__attribute_alloc_size__ ((1)) __wur;
|
||||
|
||||
/* Equivalent to valloc(minimum-page-that-holds(n)), that is, round up
|
||||
__size to nearest pagesize. */
|
||||
extern void *pvalloc (size_t __size) __THROW __attribute_malloc__ __wur;
|
||||
extern void *pvalloc (size_t __size) __THROW __attribute_malloc__
|
||||
__attribute_alloc_size__ ((1)) __wur;
|
||||
|
||||
/* Underlying allocation function; successive calls should return
|
||||
contiguous pieces of memory. */
|
||||
@ -156,9 +159,6 @@ extern void *(*__MALLOC_HOOK_VOLATILE __memalign_hook)(size_t __alignment,
|
||||
__MALLOC_DEPRECATED;
|
||||
extern void (*__MALLOC_HOOK_VOLATILE __after_morecore_hook) (void);
|
||||
|
||||
/* Activate a standard set of debugging hooks. */
|
||||
extern void __malloc_check_init (void) __THROW __MALLOC_DEPRECATED;
|
||||
|
||||
|
||||
__END_DECLS
|
||||
#endif /* malloc.h */
|
||||
@ -874,7 +874,8 @@ enum
|
||||
the __SUPPORT_SNAN__ check may be skipped for those versions. */
|
||||
|
||||
/* Return number of classification appropriate for X. */
|
||||
# if __GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__ \
|
||||
# if ((__GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__) \
|
||||
|| __glibc_clang_prereq (2,8)) \
|
||||
&& (!defined __OPTIMIZE_SIZE__ || defined __cplusplus)
|
||||
/* The check for __cplusplus allows the use of the builtin, even
|
||||
when optimization for size is on. This is provided for
|
||||
@ -889,7 +890,7 @@ enum
|
||||
# endif
|
||||
|
||||
/* Return nonzero value if sign of X is negative. */
|
||||
# if __GNUC_PREREQ (6,0)
|
||||
# if __GNUC_PREREQ (6,0) || __glibc_clang_prereq (3,3)
|
||||
# define signbit(x) __builtin_signbit (x)
|
||||
# elif defined __cplusplus
|
||||
/* In C++ mode, __MATH_TG cannot be used, because it relies on
|
||||
@ -907,14 +908,16 @@ enum
|
||||
# endif
|
||||
|
||||
/* Return nonzero value if X is not +-Inf or NaN. */
|
||||
# if __GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__
|
||||
# if (__GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__) \
|
||||
|| __glibc_clang_prereq (2,8)
|
||||
# define isfinite(x) __builtin_isfinite (x)
|
||||
# else
|
||||
# define isfinite(x) __MATH_TG ((x), __finite, (x))
|
||||
# endif
|
||||
|
||||
/* Return nonzero value if X is neither zero, subnormal, Inf, nor NaN. */
|
||||
# if __GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__
|
||||
# if (__GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__) \
|
||||
|| __glibc_clang_prereq (2,8)
|
||||
# define isnormal(x) __builtin_isnormal (x)
|
||||
# else
|
||||
# define isnormal(x) (fpclassify (x) == FP_NORMAL)
|
||||
@ -922,7 +925,8 @@ enum
|
||||
|
||||
/* Return nonzero value if X is a NaN. We could use `fpclassify' but
|
||||
we already have this functions `__isnan' and it is faster. */
|
||||
# if __GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__
|
||||
# if (__GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__) \
|
||||
|| __glibc_clang_prereq (2,8)
|
||||
# define isnan(x) __builtin_isnan (x)
|
||||
# else
|
||||
# define isnan(x) __MATH_TG ((x), __isnan, (x))
|
||||
@ -939,7 +943,8 @@ enum
|
||||
# define isinf(x) \
|
||||
(__builtin_types_compatible_p (__typeof (x), _Float128) \
|
||||
? __isinff128 (x) : __builtin_isinf_sign (x))
|
||||
# elif __GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__
|
||||
# elif (__GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__) \
|
||||
|| __glibc_clang_prereq (3,7)
|
||||
# define isinf(x) __builtin_isinf_sign (x)
|
||||
# else
|
||||
# define isinf(x) __MATH_TG ((x), __isinf, (x))
|
||||
|
||||
@ -86,6 +86,7 @@ struct igmp {
|
||||
|
||||
#define IGMP_MTRACE_RESP 0x1e /* traceroute resp.(to sender)*/
|
||||
#define IGMP_MTRACE 0x1f /* mcast traceroute messages */
|
||||
#define IGMP_MRDISC_ADV 0x30 /* From RFC4286. */
|
||||
|
||||
#define IGMP_MAX_HOST_REPORT_DELAY 10 /* max delay for response to */
|
||||
/* query (in seconds) according */
|
||||
|
||||
@ -204,6 +204,7 @@ enum
|
||||
#define INADDR_UNSPEC_GROUP ((in_addr_t) 0xe0000000) /* 224.0.0.0 */
|
||||
#define INADDR_ALLHOSTS_GROUP ((in_addr_t) 0xe0000001) /* 224.0.0.1 */
|
||||
#define INADDR_ALLRTRS_GROUP ((in_addr_t) 0xe0000002) /* 224.0.0.2 */
|
||||
#define INADDR_ALLSNOOPERS_GROUP ((in_addr_t) 0xe000006a) /* 224.0.0.106 */
|
||||
#define INADDR_MAX_LOCAL_GROUP ((in_addr_t) 0xe00000ff) /* 224.0.0.255 */
|
||||
|
||||
#if !__USE_KERNEL_IPV6_DEFS
|
||||
|
||||
@ -82,6 +82,7 @@ struct udphdr
|
||||
#define UDP_NO_CHECK6_RX 102 /* Disable accepting checksum for UDP
|
||||
over IPv6. */
|
||||
#define UDP_SEGMENT 103 /* Set GSO segmentation size. */
|
||||
#define UDP_GRO 104 /* This socket can receive UDP GRO packets. */
|
||||
|
||||
/* UDP encapsulation types */
|
||||
#define UDP_ENCAP_ESPINUDP_NON_IKE 1 /* draft-ietf-ipsec-nat-t-ike-00/01 */
|
||||
|
||||
@ -770,6 +770,13 @@ extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
|
||||
__abstime) __THROWNL __nonnull ((1, 2));
|
||||
#endif
|
||||
|
||||
#ifdef __USE_GNU
|
||||
extern int pthread_mutex_clocklock (pthread_mutex_t *__restrict __mutex,
|
||||
clockid_t __clockid,
|
||||
const struct timespec *__restrict
|
||||
__abstime) __THROWNL __nonnull ((1, 3));
|
||||
#endif
|
||||
|
||||
/* Unlock a mutex. */
|
||||
extern int pthread_mutex_unlock (pthread_mutex_t *__mutex)
|
||||
__THROWNL __nonnull ((1));
|
||||
@ -909,6 +916,13 @@ extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
|
||||
__abstime) __THROWNL __nonnull ((1, 2));
|
||||
# endif
|
||||
|
||||
# ifdef __USE_GNU
|
||||
extern int pthread_rwlock_clockrdlock (pthread_rwlock_t *__restrict __rwlock,
|
||||
clockid_t __clockid,
|
||||
const struct timespec *__restrict
|
||||
__abstime) __THROWNL __nonnull ((1, 3));
|
||||
# endif
|
||||
|
||||
/* Acquire write lock for RWLOCK. */
|
||||
extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock)
|
||||
__THROWNL __nonnull ((1));
|
||||
@ -924,6 +938,13 @@ extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
|
||||
__abstime) __THROWNL __nonnull ((1, 2));
|
||||
# endif
|
||||
|
||||
# ifdef __USE_GNU
|
||||
extern int pthread_rwlock_clockwrlock (pthread_rwlock_t *__restrict __rwlock,
|
||||
clockid_t __clockid,
|
||||
const struct timespec *__restrict
|
||||
__abstime) __THROWNL __nonnull ((1, 3));
|
||||
# endif
|
||||
|
||||
/* Unlock RWLOCK. */
|
||||
extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock)
|
||||
__THROWNL __nonnull ((1));
|
||||
@ -1003,6 +1024,21 @@ extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
|
||||
const struct timespec *__restrict __abstime)
|
||||
__nonnull ((1, 2, 3));
|
||||
|
||||
# ifdef __USE_GNU
|
||||
/* Wait for condition variable COND to be signaled or broadcast until
|
||||
ABSTIME measured by the specified clock. MUTEX is assumed to be
|
||||
locked before. CLOCK is the clock to use. ABSTIME is an absolute
|
||||
time specification against CLOCK's epoch.
|
||||
|
||||
This function is a cancellation point and therefore not marked with
|
||||
__THROW. */
|
||||
extern int pthread_cond_clockwait (pthread_cond_t *__restrict __cond,
|
||||
pthread_mutex_t *__restrict __mutex,
|
||||
__clockid_t __clock_id,
|
||||
const struct timespec *__restrict __abstime)
|
||||
__nonnull ((1, 2, 4));
|
||||
# endif
|
||||
|
||||
/* Functions for handling condition variable attributes. */
|
||||
|
||||
/* Initialize condition variable attribute ATTR. */
|
||||
|
||||
@ -115,11 +115,7 @@ struct res_sym {
|
||||
#define RES_DEFNAMES 0x00000080 /* use default domain name */
|
||||
#define RES_STAYOPEN 0x00000100 /* Keep TCP socket open */
|
||||
#define RES_DNSRCH 0x00000200 /* search up local domain tree */
|
||||
#define RES_INSECURE1 0x00000400 /* type 1 security disabled */
|
||||
#define RES_INSECURE2 0x00000800 /* type 2 security disabled */
|
||||
#define RES_NOALIASES 0x00001000 /* shuts off HOSTALIASES feature */
|
||||
#define RES_USE_INET6 \
|
||||
__glibc_macro_warning ("RES_USE_INET6 is deprecated") 0x00002000
|
||||
#define RES_ROTATE 0x00004000 /* rotate ns list after each query */
|
||||
#define RES_NOCHECKNAME \
|
||||
__glibc_macro_warning ("RES_NOCHECKNAME is deprecated") 0x00008000
|
||||
|
||||
@ -150,6 +150,13 @@ typedef void (*__action_fn_t) (const void *__nodep, VISIT __value,
|
||||
extern void twalk (const void *__root, __action_fn_t __action);
|
||||
|
||||
#ifdef __USE_GNU
|
||||
/* Like twalk, but pass down a closure parameter instead of the
|
||||
level. */
|
||||
extern void twalk_r (const void *__root,
|
||||
void (*) (const void *__nodep, VISIT __value,
|
||||
void *__closure),
|
||||
void *__closure);
|
||||
|
||||
/* Callback type for function to free a tree node. If the keys are atomic
|
||||
data this function should do nothing. */
|
||||
typedef void (*__free_fn_t) (void *__nodep);
|
||||
|
||||
@ -33,24 +33,26 @@ __BEGIN_DECLS
|
||||
/* Initialize semaphore object SEM to VALUE. If PSHARED then share it
|
||||
with other processes. */
|
||||
extern int sem_init (sem_t *__sem, int __pshared, unsigned int __value)
|
||||
__THROW;
|
||||
__THROW __nonnull ((1));
|
||||
|
||||
/* Free resources associated with semaphore object SEM. */
|
||||
extern int sem_destroy (sem_t *__sem) __THROW;
|
||||
extern int sem_destroy (sem_t *__sem) __THROW __nonnull ((1));
|
||||
|
||||
/* Open a named semaphore NAME with open flags OFLAG. */
|
||||
extern sem_t *sem_open (const char *__name, int __oflag, ...) __THROW;
|
||||
extern sem_t *sem_open (const char *__name, int __oflag, ...)
|
||||
__THROW __nonnull ((1));
|
||||
|
||||
/* Close descriptor for named semaphore SEM. */
|
||||
extern int sem_close (sem_t *__sem) __THROW;
|
||||
extern int sem_close (sem_t *__sem) __THROW __nonnull ((1));
|
||||
|
||||
/* Remove named semaphore NAME. */
|
||||
extern int sem_unlink (const char *__name) __THROW;
|
||||
extern int sem_unlink (const char *__name) __THROW __nonnull ((1));
|
||||
|
||||
/* Wait for SEM being posted.
|
||||
|
||||
This function is a cancellation point and therefore not marked with
|
||||
__THROW. */
|
||||
extern int sem_wait (sem_t *__sem);
|
||||
extern int sem_wait (sem_t *__sem) __nonnull ((1));
|
||||
|
||||
#ifdef __USE_XOPEN2K
|
||||
/* Similar to `sem_wait' but wait only until ABSTIME.
|
||||
@ -58,18 +60,26 @@ extern int sem_wait (sem_t *__sem);
|
||||
This function is a cancellation point and therefore not marked with
|
||||
__THROW. */
|
||||
extern int sem_timedwait (sem_t *__restrict __sem,
|
||||
const struct timespec *__restrict __abstime);
|
||||
const struct timespec *__restrict __abstime)
|
||||
__nonnull ((1, 2));
|
||||
#endif
|
||||
|
||||
#ifdef __USE_GNU
|
||||
extern int sem_clockwait (sem_t *__restrict __sem,
|
||||
clockid_t clock,
|
||||
const struct timespec *__restrict __abstime)
|
||||
__nonnull ((1, 3));
|
||||
#endif
|
||||
|
||||
/* Test whether SEM is posted. */
|
||||
extern int sem_trywait (sem_t *__sem) __THROWNL;
|
||||
extern int sem_trywait (sem_t *__sem) __THROWNL __nonnull ((1));
|
||||
|
||||
/* Post SEM. */
|
||||
extern int sem_post (sem_t *__sem) __THROWNL;
|
||||
extern int sem_post (sem_t *__sem) __THROWNL __nonnull ((1));
|
||||
|
||||
/* Get current value of SEM and store it in *SVAL. */
|
||||
extern int sem_getvalue (sem_t *__restrict __sem, int *__restrict __sval)
|
||||
__THROW;
|
||||
__THROW __nonnull ((1, 2));
|
||||
|
||||
|
||||
__END_DECLS
|
||||
|
||||
@ -370,6 +370,9 @@ extern int __libc_current_sigrtmax (void) __THROW;
|
||||
#define SIGRTMIN (__libc_current_sigrtmin ())
|
||||
#define SIGRTMAX (__libc_current_sigrtmax ())
|
||||
|
||||
/* System-specific extensions. */
|
||||
#include <bits/signal_ext.h>
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* not signal.h */
|
||||
@ -536,10 +536,11 @@ extern int lcong48_r (unsigned short int __param[7],
|
||||
#endif /* Use misc or X/Open. */
|
||||
|
||||
/* Allocate SIZE bytes of memory. */
|
||||
extern void *malloc (size_t __size) __THROW __attribute_malloc__ __wur;
|
||||
extern void *malloc (size_t __size) __THROW __attribute_malloc__
|
||||
__attribute_alloc_size__ ((1)) __wur;
|
||||
/* Allocate NMEMB elements of SIZE bytes each, all initialized to 0. */
|
||||
extern void *calloc (size_t __nmemb, size_t __size)
|
||||
__THROW __attribute_malloc__ __wur;
|
||||
__THROW __attribute_malloc__ __attribute_alloc_size__ ((1, 2)) __wur;
|
||||
|
||||
/* Re-allocate the previously allocated block
|
||||
in PTR, making the new block SIZE bytes long. */
|
||||
@ -547,7 +548,7 @@ extern void *calloc (size_t __nmemb, size_t __size)
|
||||
the same pointer that was passed to it, aliasing needs to be allowed
|
||||
between objects pointed by the old and new pointers. */
|
||||
extern void *realloc (void *__ptr, size_t __size)
|
||||
__THROW __attribute_warn_unused_result__;
|
||||
__THROW __attribute_warn_unused_result__ __attribute_alloc_size__ ((2));
|
||||
|
||||
#ifdef __USE_MISC
|
||||
/* Re-allocate the previously allocated block in PTR, making the new
|
||||
@ -556,7 +557,8 @@ extern void *realloc (void *__ptr, size_t __size)
|
||||
the same pointer that was passed to it, aliasing needs to be allowed
|
||||
between objects pointed by the old and new pointers. */
|
||||
extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
|
||||
__THROW __attribute_warn_unused_result__;
|
||||
__THROW __attribute_warn_unused_result__
|
||||
__attribute_alloc_size__ ((2, 3));
|
||||
#endif
|
||||
|
||||
/* Free a block allocated by `malloc', `realloc' or `calloc'. */
|
||||
@ -569,7 +571,8 @@ extern void free (void *__ptr) __THROW;
|
||||
#if (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K) \
|
||||
|| defined __USE_MISC
|
||||
/* Allocate SIZE bytes on a page boundary. The storage cannot be freed. */
|
||||
extern void *valloc (size_t __size) __THROW __attribute_malloc__ __wur;
|
||||
extern void *valloc (size_t __size) __THROW __attribute_malloc__
|
||||
__attribute_alloc_size__ ((1)) __wur;
|
||||
#endif
|
||||
|
||||
#ifdef __USE_XOPEN2K
|
||||
|
||||
@ -1,92 +0,0 @@
|
||||
/* Copyright (C) 1998-2019 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _STROPTS_H
|
||||
#define _STROPTS_H 1
|
||||
|
||||
#include <features.h>
|
||||
#include <bits/types.h>
|
||||
#include <bits/xtitypes.h>
|
||||
|
||||
#ifndef __gid_t_defined
|
||||
typedef __gid_t gid_t;
|
||||
# define __gid_t_defined
|
||||
#endif
|
||||
|
||||
#ifndef __uid_t_defined
|
||||
typedef __uid_t uid_t;
|
||||
# define __uid_t_defined
|
||||
#endif
|
||||
|
||||
typedef __t_scalar_t t_scalar_t;
|
||||
typedef __t_uscalar_t t_uscalar_t;
|
||||
|
||||
/* Get system specific constants. */
|
||||
#include <bits/stropts.h>
|
||||
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* Test whether FILDES is associated with a STREAM-based file. */
|
||||
extern int isastream (int __fildes) __THROW;
|
||||
|
||||
/* Receive next message from a STREAMS file.
|
||||
|
||||
This function is a cancellation point and therefore not marked with
|
||||
__THROW. */
|
||||
extern int getmsg (int __fildes, struct strbuf *__restrict __ctlptr,
|
||||
struct strbuf *__restrict __dataptr,
|
||||
int *__restrict __flagsp);
|
||||
|
||||
/* Receive next message from a STREAMS file, with *FLAGSP allowing to
|
||||
control which message.
|
||||
|
||||
This function is a cancellation point and therefore not marked with
|
||||
__THROW. */
|
||||
extern int getpmsg (int __fildes, struct strbuf *__restrict __ctlptr,
|
||||
struct strbuf *__restrict __dataptr,
|
||||
int *__restrict __bandp, int *__restrict __flagsp);
|
||||
|
||||
/* Perform the I/O control operation specified by REQUEST on FD.
|
||||
One argument may follow; its presence and type depend on REQUEST.
|
||||
Return value depends on REQUEST. Usually -1 indicates error. */
|
||||
extern int ioctl (int __fd, unsigned long int __request, ...) __THROW;
|
||||
|
||||
/* Send a message on a STREAM.
|
||||
|
||||
This function is a cancellation point and therefore not marked with
|
||||
__THROW. */
|
||||
extern int putmsg (int __fildes, const struct strbuf *__ctlptr,
|
||||
const struct strbuf *__dataptr, int __flags);
|
||||
|
||||
/* Send a message on a STREAM to the BAND.
|
||||
|
||||
This function is a cancellation point and therefore not marked with
|
||||
__THROW. */
|
||||
extern int putpmsg (int __fildes, const struct strbuf *__ctlptr,
|
||||
const struct strbuf *__dataptr, int __band, int __flags);
|
||||
|
||||
/* Attach a STREAMS-based file descriptor FILDES to a file PATH in the
|
||||
file system name space. */
|
||||
extern int fattach (int __fildes, const char *__path) __THROW;
|
||||
|
||||
/* Detach a name PATH from a STREAMS-based file descriptor. */
|
||||
extern int fdetach (const char *__path) __THROW;
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* stropts.h */
|
||||
@ -412,6 +412,14 @@
|
||||
# define __glibc_has_attribute(attr) 0
|
||||
#endif
|
||||
|
||||
#ifdef __has_include
|
||||
/* Do not use a function-like macro, so that __has_include can inhibit
|
||||
macro expansion. */
|
||||
# define __glibc_has_include __has_include
|
||||
#else
|
||||
# define __glibc_has_include(header) 0
|
||||
#endif
|
||||
|
||||
#if (!defined _Noreturn \
|
||||
&& (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
|
||||
&& !__GNUC_PREREQ (4,7))
|
||||
|
||||
42
lib/libc/include/generic-glibc/sys/ifunc.h
Normal file
42
lib/libc/include/generic-glibc/sys/ifunc.h
Normal file
@ -0,0 +1,42 @@
|
||||
/* Definitions used by AArch64 indirect function resolvers.
|
||||
Copyright (C) 2019 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _SYS_IFUNC_H
|
||||
#define _SYS_IFUNC_H
|
||||
|
||||
/* A second argument is passed to the ifunc resolver. */
|
||||
#define _IFUNC_ARG_HWCAP (1ULL << 62)
|
||||
|
||||
/* The prototype of a gnu indirect function resolver on AArch64 is
|
||||
|
||||
ElfW(Addr) ifunc_resolver (uint64_t, const __ifunc_arg_t *);
|
||||
|
||||
the first argument should have the _IFUNC_ARG_HWCAP bit set and
|
||||
the remaining bits should match the AT_HWCAP settings. */
|
||||
|
||||
/* Second argument to an ifunc resolver. */
|
||||
struct __ifunc_arg_t
|
||||
{
|
||||
unsigned long _size; /* Size of the struct, so it can grow. */
|
||||
unsigned long _hwcap;
|
||||
unsigned long _hwcap2;
|
||||
};
|
||||
|
||||
typedef struct __ifunc_arg_t __ifunc_arg_t;
|
||||
|
||||
#endif
|
||||
@ -12,36 +12,172 @@
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library. If not, see
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _SYS_IO_H
|
||||
|
||||
#define _SYS_IO_H 1
|
||||
|
||||
#include <features.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* If TURN_ON is TRUE, request for permission to do direct i/o on the
|
||||
port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O
|
||||
permission off for that range. This call requires root privileges. */
|
||||
extern int ioperm (unsigned long int __from, unsigned long int __num,
|
||||
int __turn_on) __THROW;
|
||||
permission off for that range. This call requires root privileges.
|
||||
|
||||
/* Set the I/O privilege level to LEVEL. If LEVEL is nonzero,
|
||||
permission to access any I/O port is granted. This call requires
|
||||
root privileges. */
|
||||
Portability note: not all Linux platforms support this call. Most
|
||||
platforms based on the PC I/O architecture probably will, however.
|
||||
E.g., Linux/Alpha for Alpha PCs supports this. */
|
||||
extern int ioperm (unsigned long int __from, unsigned long int __num,
|
||||
int __turn_on) __THROW;
|
||||
|
||||
/* Set the I/O privilege level to LEVEL. If LEVEL>3, permission to
|
||||
access any I/O port is granted. This call requires root
|
||||
privileges. */
|
||||
extern int iopl (int __level) __THROW;
|
||||
|
||||
/* The functions that actually perform reads and writes. */
|
||||
extern unsigned char inb (unsigned long int __port) __THROW;
|
||||
extern unsigned short int inw (unsigned long int __port) __THROW;
|
||||
extern unsigned long int inl (unsigned long int __port) __THROW;
|
||||
#if defined __GNUC__ && __GNUC__ >= 2
|
||||
|
||||
extern void outb (unsigned char __value, unsigned long int __port) __THROW;
|
||||
extern void outw (unsigned short __value, unsigned long int __port) __THROW;
|
||||
extern void outl (unsigned long __value, unsigned long int __port) __THROW;
|
||||
static __inline unsigned char
|
||||
inb (unsigned short int __port)
|
||||
{
|
||||
unsigned char _v;
|
||||
|
||||
__asm__ __volatile__ ("inb %w1,%0":"=a" (_v):"Nd" (__port));
|
||||
return _v;
|
||||
}
|
||||
|
||||
static __inline unsigned char
|
||||
inb_p (unsigned short int __port)
|
||||
{
|
||||
unsigned char _v;
|
||||
|
||||
__asm__ __volatile__ ("inb %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
|
||||
return _v;
|
||||
}
|
||||
|
||||
static __inline unsigned short int
|
||||
inw (unsigned short int __port)
|
||||
{
|
||||
unsigned short _v;
|
||||
|
||||
__asm__ __volatile__ ("inw %w1,%0":"=a" (_v):"Nd" (__port));
|
||||
return _v;
|
||||
}
|
||||
|
||||
static __inline unsigned short int
|
||||
inw_p (unsigned short int __port)
|
||||
{
|
||||
unsigned short int _v;
|
||||
|
||||
__asm__ __volatile__ ("inw %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
|
||||
return _v;
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
inl (unsigned short int __port)
|
||||
{
|
||||
unsigned int _v;
|
||||
|
||||
__asm__ __volatile__ ("inl %w1,%0":"=a" (_v):"Nd" (__port));
|
||||
return _v;
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
inl_p (unsigned short int __port)
|
||||
{
|
||||
unsigned int _v;
|
||||
__asm__ __volatile__ ("inl %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
|
||||
return _v;
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outb (unsigned char __value, unsigned short int __port)
|
||||
{
|
||||
__asm__ __volatile__ ("outb %b0,%w1": :"a" (__value), "Nd" (__port));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outb_p (unsigned char __value, unsigned short int __port)
|
||||
{
|
||||
__asm__ __volatile__ ("outb %b0,%w1\noutb %%al,$0x80": :"a" (__value),
|
||||
"Nd" (__port));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outw (unsigned short int __value, unsigned short int __port)
|
||||
{
|
||||
__asm__ __volatile__ ("outw %w0,%w1": :"a" (__value), "Nd" (__port));
|
||||
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outw_p (unsigned short int __value, unsigned short int __port)
|
||||
{
|
||||
__asm__ __volatile__ ("outw %w0,%w1\noutb %%al,$0x80": :"a" (__value),
|
||||
"Nd" (__port));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outl (unsigned int __value, unsigned short int __port)
|
||||
{
|
||||
__asm__ __volatile__ ("outl %0,%w1": :"a" (__value), "Nd" (__port));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outl_p (unsigned int __value, unsigned short int __port)
|
||||
{
|
||||
__asm__ __volatile__ ("outl %0,%w1\noutb %%al,$0x80": :"a" (__value),
|
||||
"Nd" (__port));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
insb (unsigned short int __port, void *__addr, unsigned long int __count)
|
||||
{
|
||||
__asm__ __volatile__ ("cld ; rep ; insb":"=D" (__addr), "=c" (__count)
|
||||
:"d" (__port), "0" (__addr), "1" (__count));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
insw (unsigned short int __port, void *__addr, unsigned long int __count)
|
||||
{
|
||||
__asm__ __volatile__ ("cld ; rep ; insw":"=D" (__addr), "=c" (__count)
|
||||
:"d" (__port), "0" (__addr), "1" (__count));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
insl (unsigned short int __port, void *__addr, unsigned long int __count)
|
||||
{
|
||||
__asm__ __volatile__ ("cld ; rep ; insl":"=D" (__addr), "=c" (__count)
|
||||
:"d" (__port), "0" (__addr), "1" (__count));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outsb (unsigned short int __port, const void *__addr,
|
||||
unsigned long int __count)
|
||||
{
|
||||
__asm__ __volatile__ ("cld ; rep ; outsb":"=S" (__addr), "=c" (__count)
|
||||
:"d" (__port), "0" (__addr), "1" (__count));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outsw (unsigned short int __port, const void *__addr,
|
||||
unsigned long int __count)
|
||||
{
|
||||
__asm__ __volatile__ ("cld ; rep ; outsw":"=S" (__addr), "=c" (__count)
|
||||
:"d" (__port), "0" (__addr), "1" (__count));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outsl (unsigned short int __port, const void *__addr,
|
||||
unsigned long int __count)
|
||||
{
|
||||
__asm__ __volatile__ ("cld ; rep ; outsl":"=S" (__addr), "=c" (__count)
|
||||
:"d" (__port), "0" (__addr), "1" (__count));
|
||||
}
|
||||
|
||||
#endif /* GNU C */
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* _SYS_IO_H */
|
||||
@ -1 +0,0 @@
|
||||
#include <stropts.h>
|
||||
@ -18,6 +18,8 @@
|
||||
#ifndef _SYS_SYSCTL_H
|
||||
#define _SYS_SYSCTL_H 1
|
||||
|
||||
#warning "The <sys/sysctl.h> header is deprecated and will be removed."
|
||||
|
||||
#include <features.h>
|
||||
#define __need_size_t
|
||||
#include <stddef.h>
|
||||
@ -66,7 +68,8 @@ __BEGIN_DECLS
|
||||
|
||||
/* Read or write system parameters. */
|
||||
extern int sysctl (int *__name, int __nlen, void *__oldval,
|
||||
size_t *__oldlenp, void *__newval, size_t __newlen) __THROW;
|
||||
size_t *__oldlenp, void *__newval, size_t __newlen) __THROW
|
||||
__attribute_deprecated__;
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
||||
@ -154,37 +154,20 @@ typedef unsigned int uint;
|
||||
|
||||
#include <bits/stdint-intn.h>
|
||||
|
||||
#if !__GNUC_PREREQ (2, 7)
|
||||
|
||||
/* These were defined by ISO C without the first `_'. */
|
||||
typedef unsigned char u_int8_t;
|
||||
typedef unsigned short int u_int16_t;
|
||||
typedef unsigned int u_int32_t;
|
||||
# if __WORDSIZE == 64
|
||||
typedef unsigned long int u_int64_t;
|
||||
# else
|
||||
__extension__ typedef unsigned long long int u_int64_t;
|
||||
# endif
|
||||
|
||||
typedef int register_t;
|
||||
|
||||
#else
|
||||
|
||||
/* For GCC 2.7 and later, we can use specific type-size attributes. */
|
||||
# define __u_intN_t(N, MODE) \
|
||||
typedef unsigned int u_int##N##_t __attribute__ ((__mode__ (MODE)))
|
||||
|
||||
__u_intN_t (8, __QI__);
|
||||
__u_intN_t (16, __HI__);
|
||||
__u_intN_t (32, __SI__);
|
||||
__u_intN_t (64, __DI__);
|
||||
typedef __uint8_t u_int8_t;
|
||||
typedef __uint16_t u_int16_t;
|
||||
typedef __uint32_t u_int32_t;
|
||||
typedef __uint64_t u_int64_t;
|
||||
|
||||
#if __GNUC_PREREQ (2, 7)
|
||||
typedef int register_t __attribute__ ((__mode__ (__word__)));
|
||||
|
||||
#else
|
||||
typedef int register_t;
|
||||
#endif
|
||||
|
||||
/* Some code from BIND tests this macro to see if the types above are
|
||||
defined. */
|
||||
#endif
|
||||
#define __BIT_TYPES_DEFINED__ 1
|
||||
|
||||
|
||||
|
||||
@ -1,183 +0,0 @@
|
||||
/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _SYS_IO_H
|
||||
#define _SYS_IO_H 1
|
||||
|
||||
#include <features.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* If TURN_ON is TRUE, request for permission to do direct i/o on the
|
||||
port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O
|
||||
permission off for that range. This call requires root privileges.
|
||||
|
||||
Portability note: not all Linux platforms support this call. Most
|
||||
platforms based on the PC I/O architecture probably will, however.
|
||||
E.g., Linux/Alpha for Alpha PCs supports this. */
|
||||
extern int ioperm (unsigned long int __from, unsigned long int __num,
|
||||
int __turn_on) __THROW;
|
||||
|
||||
/* Set the I/O privilege level to LEVEL. If LEVEL>3, permission to
|
||||
access any I/O port is granted. This call requires root
|
||||
privileges. */
|
||||
extern int iopl (int __level) __THROW;
|
||||
|
||||
#if defined __GNUC__ && __GNUC__ >= 2
|
||||
|
||||
static __inline unsigned char
|
||||
inb (unsigned short int __port)
|
||||
{
|
||||
unsigned char _v;
|
||||
|
||||
__asm__ __volatile__ ("inb %w1,%0":"=a" (_v):"Nd" (__port));
|
||||
return _v;
|
||||
}
|
||||
|
||||
static __inline unsigned char
|
||||
inb_p (unsigned short int __port)
|
||||
{
|
||||
unsigned char _v;
|
||||
|
||||
__asm__ __volatile__ ("inb %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
|
||||
return _v;
|
||||
}
|
||||
|
||||
static __inline unsigned short int
|
||||
inw (unsigned short int __port)
|
||||
{
|
||||
unsigned short _v;
|
||||
|
||||
__asm__ __volatile__ ("inw %w1,%0":"=a" (_v):"Nd" (__port));
|
||||
return _v;
|
||||
}
|
||||
|
||||
static __inline unsigned short int
|
||||
inw_p (unsigned short int __port)
|
||||
{
|
||||
unsigned short int _v;
|
||||
|
||||
__asm__ __volatile__ ("inw %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
|
||||
return _v;
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
inl (unsigned short int __port)
|
||||
{
|
||||
unsigned int _v;
|
||||
|
||||
__asm__ __volatile__ ("inl %w1,%0":"=a" (_v):"Nd" (__port));
|
||||
return _v;
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
inl_p (unsigned short int __port)
|
||||
{
|
||||
unsigned int _v;
|
||||
__asm__ __volatile__ ("inl %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
|
||||
return _v;
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outb (unsigned char __value, unsigned short int __port)
|
||||
{
|
||||
__asm__ __volatile__ ("outb %b0,%w1": :"a" (__value), "Nd" (__port));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outb_p (unsigned char __value, unsigned short int __port)
|
||||
{
|
||||
__asm__ __volatile__ ("outb %b0,%w1\noutb %%al,$0x80": :"a" (__value),
|
||||
"Nd" (__port));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outw (unsigned short int __value, unsigned short int __port)
|
||||
{
|
||||
__asm__ __volatile__ ("outw %w0,%w1": :"a" (__value), "Nd" (__port));
|
||||
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outw_p (unsigned short int __value, unsigned short int __port)
|
||||
{
|
||||
__asm__ __volatile__ ("outw %w0,%w1\noutb %%al,$0x80": :"a" (__value),
|
||||
"Nd" (__port));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outl (unsigned int __value, unsigned short int __port)
|
||||
{
|
||||
__asm__ __volatile__ ("outl %0,%w1": :"a" (__value), "Nd" (__port));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outl_p (unsigned int __value, unsigned short int __port)
|
||||
{
|
||||
__asm__ __volatile__ ("outl %0,%w1\noutb %%al,$0x80": :"a" (__value),
|
||||
"Nd" (__port));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
insb (unsigned short int __port, void *__addr, unsigned long int __count)
|
||||
{
|
||||
__asm__ __volatile__ ("cld ; rep ; insb":"=D" (__addr), "=c" (__count)
|
||||
:"d" (__port), "0" (__addr), "1" (__count));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
insw (unsigned short int __port, void *__addr, unsigned long int __count)
|
||||
{
|
||||
__asm__ __volatile__ ("cld ; rep ; insw":"=D" (__addr), "=c" (__count)
|
||||
:"d" (__port), "0" (__addr), "1" (__count));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
insl (unsigned short int __port, void *__addr, unsigned long int __count)
|
||||
{
|
||||
__asm__ __volatile__ ("cld ; rep ; insl":"=D" (__addr), "=c" (__count)
|
||||
:"d" (__port), "0" (__addr), "1" (__count));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outsb (unsigned short int __port, const void *__addr,
|
||||
unsigned long int __count)
|
||||
{
|
||||
__asm__ __volatile__ ("cld ; rep ; outsb":"=S" (__addr), "=c" (__count)
|
||||
:"d" (__port), "0" (__addr), "1" (__count));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outsw (unsigned short int __port, const void *__addr,
|
||||
unsigned long int __count)
|
||||
{
|
||||
__asm__ __volatile__ ("cld ; rep ; outsw":"=S" (__addr), "=c" (__count)
|
||||
:"d" (__port), "0" (__addr), "1" (__count));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outsl (unsigned short int __port, const void *__addr,
|
||||
unsigned long int __count)
|
||||
{
|
||||
__asm__ __volatile__ ("cld ; rep ; outsl":"=S" (__addr), "=c" (__count)
|
||||
:"d" (__port), "0" (__addr), "1" (__count));
|
||||
}
|
||||
|
||||
#endif /* GNU C */
|
||||
|
||||
__END_DECLS
|
||||
#endif /* _SYS_IO_H */
|
||||
38
lib/libc/include/mips-linux-gnu/bits/socket-constants.h
Normal file
38
lib/libc/include/mips-linux-gnu/bits/socket-constants.h
Normal file
@ -0,0 +1,38 @@
|
||||
/* Socket constants which vary among Linux architectures. Version for MIPS.
|
||||
Copyright (C) 2019 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _SYS_SOCKET_H
|
||||
# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
|
||||
#endif
|
||||
|
||||
#define SOL_SOCKET 65535
|
||||
#define SO_ACCEPTCONN 4105
|
||||
#define SO_BROADCAST 32
|
||||
#define SO_DONTROUTE 16
|
||||
#define SO_ERROR 4103
|
||||
#define SO_KEEPALIVE 8
|
||||
#define SO_LINGER 128
|
||||
#define SO_OOBINLINE 256
|
||||
#define SO_RCVBUF 4098
|
||||
#define SO_RCVLOWAT 4100
|
||||
#define SO_RCVTIMEO 4102
|
||||
#define SO_REUSEADDR 4
|
||||
#define SO_SNDBUF 4097
|
||||
#define SO_SNDLOWAT 4099
|
||||
#define SO_SNDTIMEO 4101
|
||||
#define SO_TYPE 4104
|
||||
@ -0,0 +1,38 @@
|
||||
/* Socket constants which vary among Linux architectures. Version for MIPS.
|
||||
Copyright (C) 2019 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _SYS_SOCKET_H
|
||||
# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
|
||||
#endif
|
||||
|
||||
#define SOL_SOCKET 65535
|
||||
#define SO_ACCEPTCONN 4105
|
||||
#define SO_BROADCAST 32
|
||||
#define SO_DONTROUTE 16
|
||||
#define SO_ERROR 4103
|
||||
#define SO_KEEPALIVE 8
|
||||
#define SO_LINGER 128
|
||||
#define SO_OOBINLINE 256
|
||||
#define SO_RCVBUF 4098
|
||||
#define SO_RCVLOWAT 4100
|
||||
#define SO_RCVTIMEO 4102
|
||||
#define SO_REUSEADDR 4
|
||||
#define SO_SNDBUF 4097
|
||||
#define SO_SNDLOWAT 4099
|
||||
#define SO_SNDTIMEO 4101
|
||||
#define SO_TYPE 4104
|
||||
@ -0,0 +1,38 @@
|
||||
/* Socket constants which vary among Linux architectures. Version for MIPS.
|
||||
Copyright (C) 2019 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _SYS_SOCKET_H
|
||||
# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
|
||||
#endif
|
||||
|
||||
#define SOL_SOCKET 65535
|
||||
#define SO_ACCEPTCONN 4105
|
||||
#define SO_BROADCAST 32
|
||||
#define SO_DONTROUTE 16
|
||||
#define SO_ERROR 4103
|
||||
#define SO_KEEPALIVE 8
|
||||
#define SO_LINGER 128
|
||||
#define SO_OOBINLINE 256
|
||||
#define SO_RCVBUF 4098
|
||||
#define SO_RCVLOWAT 4100
|
||||
#define SO_RCVTIMEO 4102
|
||||
#define SO_REUSEADDR 4
|
||||
#define SO_SNDBUF 4097
|
||||
#define SO_SNDLOWAT 4099
|
||||
#define SO_SNDTIMEO 4101
|
||||
#define SO_TYPE 4104
|
||||
@ -0,0 +1,38 @@
|
||||
/* Socket constants which vary among Linux architectures. Version for MIPS.
|
||||
Copyright (C) 2019 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _SYS_SOCKET_H
|
||||
# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
|
||||
#endif
|
||||
|
||||
#define SOL_SOCKET 65535
|
||||
#define SO_ACCEPTCONN 4105
|
||||
#define SO_BROADCAST 32
|
||||
#define SO_DONTROUTE 16
|
||||
#define SO_ERROR 4103
|
||||
#define SO_KEEPALIVE 8
|
||||
#define SO_LINGER 128
|
||||
#define SO_OOBINLINE 256
|
||||
#define SO_RCVBUF 4098
|
||||
#define SO_RCVLOWAT 4100
|
||||
#define SO_RCVTIMEO 4102
|
||||
#define SO_REUSEADDR 4
|
||||
#define SO_SNDBUF 4097
|
||||
#define SO_SNDLOWAT 4099
|
||||
#define SO_SNDTIMEO 4101
|
||||
#define SO_TYPE 4104
|
||||
@ -0,0 +1,38 @@
|
||||
/* Socket constants which vary among Linux architectures. Version for MIPS.
|
||||
Copyright (C) 2019 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _SYS_SOCKET_H
|
||||
# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
|
||||
#endif
|
||||
|
||||
#define SOL_SOCKET 65535
|
||||
#define SO_ACCEPTCONN 4105
|
||||
#define SO_BROADCAST 32
|
||||
#define SO_DONTROUTE 16
|
||||
#define SO_ERROR 4103
|
||||
#define SO_KEEPALIVE 8
|
||||
#define SO_LINGER 128
|
||||
#define SO_OOBINLINE 256
|
||||
#define SO_RCVBUF 4098
|
||||
#define SO_RCVLOWAT 4100
|
||||
#define SO_RCVTIMEO 4102
|
||||
#define SO_REUSEADDR 4
|
||||
#define SO_SNDBUF 4097
|
||||
#define SO_SNDLOWAT 4099
|
||||
#define SO_SNDTIMEO 4101
|
||||
#define SO_TYPE 4104
|
||||
38
lib/libc/include/mipsel-linux-gnu/bits/socket-constants.h
Normal file
38
lib/libc/include/mipsel-linux-gnu/bits/socket-constants.h
Normal file
@ -0,0 +1,38 @@
|
||||
/* Socket constants which vary among Linux architectures. Version for MIPS.
|
||||
Copyright (C) 2019 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _SYS_SOCKET_H
|
||||
# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
|
||||
#endif
|
||||
|
||||
#define SOL_SOCKET 65535
|
||||
#define SO_ACCEPTCONN 4105
|
||||
#define SO_BROADCAST 32
|
||||
#define SO_DONTROUTE 16
|
||||
#define SO_ERROR 4103
|
||||
#define SO_KEEPALIVE 8
|
||||
#define SO_LINGER 128
|
||||
#define SO_OOBINLINE 256
|
||||
#define SO_RCVBUF 4098
|
||||
#define SO_RCVLOWAT 4100
|
||||
#define SO_RCVTIMEO 4102
|
||||
#define SO_REUSEADDR 4
|
||||
#define SO_SNDBUF 4097
|
||||
#define SO_SNDLOWAT 4099
|
||||
#define SO_SNDTIMEO 4101
|
||||
#define SO_TYPE 4104
|
||||
@ -18,13 +18,36 @@
|
||||
|
||||
#if defined __GNUC__ && !defined _SOFT_FLOAT && !defined __NO_FPRS__
|
||||
|
||||
/* Inline definition for fegetround. */
|
||||
# define __fegetround() \
|
||||
(__extension__ ({ int __fegetround_result; \
|
||||
__asm__ __volatile__ \
|
||||
("mcrfs 7,7 ; mfcr %0" \
|
||||
: "=r"(__fegetround_result) : : "cr7"); \
|
||||
__fegetround_result & 3; }))
|
||||
/* Inline definitions for fegetround. */
|
||||
# define __fegetround_ISA300() \
|
||||
(__extension__ ({ \
|
||||
union { double __d; unsigned long long __ll; } __u; \
|
||||
__asm__ __volatile__ ( \
|
||||
".machine push; .machine \"power9\"; mffsl %0; .machine pop" \
|
||||
: "=f" (__u.__d)); \
|
||||
__u.__ll & 0x0000000000000003LL; \
|
||||
}))
|
||||
|
||||
# define __fegetround_ISA2() \
|
||||
(__extension__ ({ \
|
||||
int __fegetround_result; \
|
||||
__asm__ __volatile__ ("mcrfs 7,7 ; mfcr %0" \
|
||||
: "=r"(__fegetround_result) : : "cr7"); \
|
||||
__fegetround_result & 3; \
|
||||
}))
|
||||
|
||||
# ifdef _ARCH_PWR9
|
||||
# define __fegetround() __fegetround_ISA300()
|
||||
# elif defined __BUILTIN_CPU_SUPPORTS__
|
||||
# define __fegetround() \
|
||||
(__glibc_likely (__builtin_cpu_supports ("arch_3_00")) \
|
||||
? __fegetround_ISA300() \
|
||||
: __fegetround_ISA2() \
|
||||
)
|
||||
# else
|
||||
# define __fegetround() __fegetround_ISA2()
|
||||
# endif
|
||||
|
||||
# define fegetround() __fegetround ()
|
||||
|
||||
# ifndef __NO_MATH_INLINES
|
||||
|
||||
38
lib/libc/include/powerpc-linux-gnu/bits/socket-constants.h
Normal file
38
lib/libc/include/powerpc-linux-gnu/bits/socket-constants.h
Normal file
@ -0,0 +1,38 @@
|
||||
/* Socket constants which vary among Linux architectures. Version for POWER.
|
||||
Copyright (C) 2019 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _SYS_SOCKET_H
|
||||
# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
|
||||
#endif
|
||||
|
||||
#define SOL_SOCKET 1
|
||||
#define SO_ACCEPTCONN 30
|
||||
#define SO_BROADCAST 6
|
||||
#define SO_DONTROUTE 5
|
||||
#define SO_ERROR 4
|
||||
#define SO_KEEPALIVE 9
|
||||
#define SO_LINGER 13
|
||||
#define SO_OOBINLINE 10
|
||||
#define SO_RCVBUF 8
|
||||
#define SO_RCVLOWAT 16
|
||||
#define SO_RCVTIMEO 18
|
||||
#define SO_REUSEADDR 2
|
||||
#define SO_SNDBUF 7
|
||||
#define SO_SNDLOWAT 17
|
||||
#define SO_SNDTIMEO 19
|
||||
#define SO_TYPE 3
|
||||
@ -19,6 +19,10 @@
|
||||
#ifndef _FPU_CONTROL_H
|
||||
#define _FPU_CONTROL_H
|
||||
|
||||
#if defined __SPE__ || (defined __NO_FPRS__ && !defined _SOFT_FLOAT)
|
||||
# error "SPE/e500 is no longer supported"
|
||||
#endif
|
||||
|
||||
#ifdef _SOFT_FLOAT
|
||||
|
||||
# define _FPU_RESERVED 0xffffffff
|
||||
@ -28,41 +32,6 @@ typedef unsigned int fpu_control_t;
|
||||
# define _FPU_SETCW(cw) (void) (cw)
|
||||
extern fpu_control_t __fpu_control;
|
||||
|
||||
#elif defined __NO_FPRS__ /* e500 */
|
||||
|
||||
/* rounding control */
|
||||
# define _FPU_RC_NEAREST 0x00 /* RECOMMENDED */
|
||||
# define _FPU_RC_DOWN 0x03
|
||||
# define _FPU_RC_UP 0x02
|
||||
# define _FPU_RC_ZERO 0x01
|
||||
|
||||
/* masking of interrupts */
|
||||
# define _FPU_MASK_ZM 0x10 /* zero divide */
|
||||
# define _FPU_MASK_OM 0x04 /* overflow */
|
||||
# define _FPU_MASK_UM 0x08 /* underflow */
|
||||
# define _FPU_MASK_XM 0x40 /* inexact */
|
||||
# define _FPU_MASK_IM 0x20 /* invalid operation */
|
||||
|
||||
# define _FPU_RESERVED 0x00c10080 /* These bits are reserved and not changed. */
|
||||
|
||||
/* Correct IEEE semantics require traps to be enabled at the hardware
|
||||
level; the kernel then does the emulation and determines whether
|
||||
generation of signals from those traps was enabled using prctl. */
|
||||
# define _FPU_DEFAULT 0x0000003c /* Default value. */
|
||||
# define _FPU_IEEE _FPU_DEFAULT
|
||||
|
||||
/* Type of the control word. */
|
||||
typedef unsigned int fpu_control_t;
|
||||
|
||||
/* Macros for accessing the hardware control word. */
|
||||
# define _FPU_GETCW(cw) \
|
||||
__asm__ volatile ("mfspefscr %0" : "=r" (cw))
|
||||
# define _FPU_SETCW(cw) \
|
||||
__asm__ volatile ("mtspefscr %0" : : "r" (cw))
|
||||
|
||||
/* Default control word set at startup. */
|
||||
extern fpu_control_t __fpu_control;
|
||||
|
||||
#else /* PowerPC 6xx floating-point. */
|
||||
|
||||
/* rounding control */
|
||||
@ -71,6 +40,8 @@ extern fpu_control_t __fpu_control;
|
||||
# define _FPU_RC_UP 0x02
|
||||
# define _FPU_RC_ZERO 0x01
|
||||
|
||||
# define _FPU_MASK_RC (_FPU_RC_NEAREST|_FPU_RC_DOWN|_FPU_RC_UP|_FPU_RC_ZERO)
|
||||
|
||||
# define _FPU_MASK_NI 0x04 /* non-ieee mode */
|
||||
|
||||
/* masking of interrupts */
|
||||
@ -96,20 +67,43 @@ typedef unsigned int fpu_control_t;
|
||||
/* Macros for accessing the hardware control word. */
|
||||
# define _FPU_GETCW(cw) \
|
||||
({union { double __d; unsigned long long __ll; } __u; \
|
||||
register double __fr; \
|
||||
__asm__ ("mffs %0" : "=f" (__fr)); \
|
||||
__u.__d = __fr; \
|
||||
__asm__ __volatile__("mffs %0" : "=f" (__u.__d)); \
|
||||
(cw) = (fpu_control_t) __u.__ll; \
|
||||
(fpu_control_t) __u.__ll; \
|
||||
})
|
||||
|
||||
# define _FPU_GET_RC_ISA300() \
|
||||
({union { double __d; unsigned long long __ll; } __u; \
|
||||
__asm__ __volatile__( \
|
||||
".machine push; .machine \"power9\"; mffsl %0; .machine pop" \
|
||||
: "=f" (__u.__d)); \
|
||||
(fpu_control_t) (__u.__ll & _FPU_MASK_RC); \
|
||||
})
|
||||
|
||||
# ifdef _ARCH_PWR9
|
||||
# define _FPU_GET_RC() _FPU_GET_RC_ISA300()
|
||||
# elif defined __BUILTIN_CPU_SUPPORTS__
|
||||
# define _FPU_GET_RC() \
|
||||
({fpu_control_t __rc; \
|
||||
__rc = __glibc_likely (__builtin_cpu_supports ("arch_3_00")) \
|
||||
? _FPU_GET_RC_ISA300 () \
|
||||
: _FPU_GETCW (__rc) & _FPU_MASK_RC; \
|
||||
__rc; \
|
||||
})
|
||||
# else
|
||||
# define _FPU_GET_RC() \
|
||||
({fpu_control_t __rc = _FPU_GETCW (__rc) & _FPU_MASK_RC; \
|
||||
__rc; \
|
||||
})
|
||||
# endif
|
||||
|
||||
# define _FPU_SETCW(cw) \
|
||||
{ union { double __d; unsigned long long __ll; } __u; \
|
||||
register double __fr; \
|
||||
__u.__ll = 0xfff80000LL << 32; /* This is a QNaN. */ \
|
||||
__u.__ll |= (cw) & 0xffffffffLL; \
|
||||
__fr = __u.__d; \
|
||||
__asm__ ("mtfsf 255,%0" : : "f" (__fr)); \
|
||||
__asm__ __volatile__("mtfsf 255,%0" : : "f" (__fr)); \
|
||||
}
|
||||
|
||||
/* Default control word set at startup. */
|
||||
|
||||
@ -18,13 +18,36 @@
|
||||
|
||||
#if defined __GNUC__ && !defined _SOFT_FLOAT && !defined __NO_FPRS__
|
||||
|
||||
/* Inline definition for fegetround. */
|
||||
# define __fegetround() \
|
||||
(__extension__ ({ int __fegetround_result; \
|
||||
__asm__ __volatile__ \
|
||||
("mcrfs 7,7 ; mfcr %0" \
|
||||
: "=r"(__fegetround_result) : : "cr7"); \
|
||||
__fegetround_result & 3; }))
|
||||
/* Inline definitions for fegetround. */
|
||||
# define __fegetround_ISA300() \
|
||||
(__extension__ ({ \
|
||||
union { double __d; unsigned long long __ll; } __u; \
|
||||
__asm__ __volatile__ ( \
|
||||
".machine push; .machine \"power9\"; mffsl %0; .machine pop" \
|
||||
: "=f" (__u.__d)); \
|
||||
__u.__ll & 0x0000000000000003LL; \
|
||||
}))
|
||||
|
||||
# define __fegetround_ISA2() \
|
||||
(__extension__ ({ \
|
||||
int __fegetround_result; \
|
||||
__asm__ __volatile__ ("mcrfs 7,7 ; mfcr %0" \
|
||||
: "=r"(__fegetround_result) : : "cr7"); \
|
||||
__fegetround_result & 3; \
|
||||
}))
|
||||
|
||||
# ifdef _ARCH_PWR9
|
||||
# define __fegetround() __fegetround_ISA300()
|
||||
# elif defined __BUILTIN_CPU_SUPPORTS__
|
||||
# define __fegetround() \
|
||||
(__glibc_likely (__builtin_cpu_supports ("arch_3_00")) \
|
||||
? __fegetround_ISA300() \
|
||||
: __fegetround_ISA2() \
|
||||
)
|
||||
# else
|
||||
# define __fegetround() __fegetround_ISA2()
|
||||
# endif
|
||||
|
||||
# define fegetround() __fegetround ()
|
||||
|
||||
# ifndef __NO_MATH_INLINES
|
||||
|
||||
38
lib/libc/include/powerpc64-linux-gnu/bits/socket-constants.h
Normal file
38
lib/libc/include/powerpc64-linux-gnu/bits/socket-constants.h
Normal file
@ -0,0 +1,38 @@
|
||||
/* Socket constants which vary among Linux architectures. Version for POWER.
|
||||
Copyright (C) 2019 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _SYS_SOCKET_H
|
||||
# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
|
||||
#endif
|
||||
|
||||
#define SOL_SOCKET 1
|
||||
#define SO_ACCEPTCONN 30
|
||||
#define SO_BROADCAST 6
|
||||
#define SO_DONTROUTE 5
|
||||
#define SO_ERROR 4
|
||||
#define SO_KEEPALIVE 9
|
||||
#define SO_LINGER 13
|
||||
#define SO_OOBINLINE 10
|
||||
#define SO_RCVBUF 8
|
||||
#define SO_RCVLOWAT 16
|
||||
#define SO_RCVTIMEO 18
|
||||
#define SO_REUSEADDR 2
|
||||
#define SO_SNDBUF 7
|
||||
#define SO_SNDLOWAT 17
|
||||
#define SO_SNDTIMEO 19
|
||||
#define SO_TYPE 3
|
||||
@ -19,6 +19,10 @@
|
||||
#ifndef _FPU_CONTROL_H
|
||||
#define _FPU_CONTROL_H
|
||||
|
||||
#if defined __SPE__ || (defined __NO_FPRS__ && !defined _SOFT_FLOAT)
|
||||
# error "SPE/e500 is no longer supported"
|
||||
#endif
|
||||
|
||||
#ifdef _SOFT_FLOAT
|
||||
|
||||
# define _FPU_RESERVED 0xffffffff
|
||||
@ -28,41 +32,6 @@ typedef unsigned int fpu_control_t;
|
||||
# define _FPU_SETCW(cw) (void) (cw)
|
||||
extern fpu_control_t __fpu_control;
|
||||
|
||||
#elif defined __NO_FPRS__ /* e500 */
|
||||
|
||||
/* rounding control */
|
||||
# define _FPU_RC_NEAREST 0x00 /* RECOMMENDED */
|
||||
# define _FPU_RC_DOWN 0x03
|
||||
# define _FPU_RC_UP 0x02
|
||||
# define _FPU_RC_ZERO 0x01
|
||||
|
||||
/* masking of interrupts */
|
||||
# define _FPU_MASK_ZM 0x10 /* zero divide */
|
||||
# define _FPU_MASK_OM 0x04 /* overflow */
|
||||
# define _FPU_MASK_UM 0x08 /* underflow */
|
||||
# define _FPU_MASK_XM 0x40 /* inexact */
|
||||
# define _FPU_MASK_IM 0x20 /* invalid operation */
|
||||
|
||||
# define _FPU_RESERVED 0x00c10080 /* These bits are reserved and not changed. */
|
||||
|
||||
/* Correct IEEE semantics require traps to be enabled at the hardware
|
||||
level; the kernel then does the emulation and determines whether
|
||||
generation of signals from those traps was enabled using prctl. */
|
||||
# define _FPU_DEFAULT 0x0000003c /* Default value. */
|
||||
# define _FPU_IEEE _FPU_DEFAULT
|
||||
|
||||
/* Type of the control word. */
|
||||
typedef unsigned int fpu_control_t;
|
||||
|
||||
/* Macros for accessing the hardware control word. */
|
||||
# define _FPU_GETCW(cw) \
|
||||
__asm__ volatile ("mfspefscr %0" : "=r" (cw))
|
||||
# define _FPU_SETCW(cw) \
|
||||
__asm__ volatile ("mtspefscr %0" : : "r" (cw))
|
||||
|
||||
/* Default control word set at startup. */
|
||||
extern fpu_control_t __fpu_control;
|
||||
|
||||
#else /* PowerPC 6xx floating-point. */
|
||||
|
||||
/* rounding control */
|
||||
@ -71,6 +40,8 @@ extern fpu_control_t __fpu_control;
|
||||
# define _FPU_RC_UP 0x02
|
||||
# define _FPU_RC_ZERO 0x01
|
||||
|
||||
# define _FPU_MASK_RC (_FPU_RC_NEAREST|_FPU_RC_DOWN|_FPU_RC_UP|_FPU_RC_ZERO)
|
||||
|
||||
# define _FPU_MASK_NI 0x04 /* non-ieee mode */
|
||||
|
||||
/* masking of interrupts */
|
||||
@ -96,20 +67,43 @@ typedef unsigned int fpu_control_t;
|
||||
/* Macros for accessing the hardware control word. */
|
||||
# define _FPU_GETCW(cw) \
|
||||
({union { double __d; unsigned long long __ll; } __u; \
|
||||
register double __fr; \
|
||||
__asm__ ("mffs %0" : "=f" (__fr)); \
|
||||
__u.__d = __fr; \
|
||||
__asm__ __volatile__("mffs %0" : "=f" (__u.__d)); \
|
||||
(cw) = (fpu_control_t) __u.__ll; \
|
||||
(fpu_control_t) __u.__ll; \
|
||||
})
|
||||
|
||||
# define _FPU_GET_RC_ISA300() \
|
||||
({union { double __d; unsigned long long __ll; } __u; \
|
||||
__asm__ __volatile__( \
|
||||
".machine push; .machine \"power9\"; mffsl %0; .machine pop" \
|
||||
: "=f" (__u.__d)); \
|
||||
(fpu_control_t) (__u.__ll & _FPU_MASK_RC); \
|
||||
})
|
||||
|
||||
# ifdef _ARCH_PWR9
|
||||
# define _FPU_GET_RC() _FPU_GET_RC_ISA300()
|
||||
# elif defined __BUILTIN_CPU_SUPPORTS__
|
||||
# define _FPU_GET_RC() \
|
||||
({fpu_control_t __rc; \
|
||||
__rc = __glibc_likely (__builtin_cpu_supports ("arch_3_00")) \
|
||||
? _FPU_GET_RC_ISA300 () \
|
||||
: _FPU_GETCW (__rc) & _FPU_MASK_RC; \
|
||||
__rc; \
|
||||
})
|
||||
# else
|
||||
# define _FPU_GET_RC() \
|
||||
({fpu_control_t __rc = _FPU_GETCW (__rc) & _FPU_MASK_RC; \
|
||||
__rc; \
|
||||
})
|
||||
# endif
|
||||
|
||||
# define _FPU_SETCW(cw) \
|
||||
{ union { double __d; unsigned long long __ll; } __u; \
|
||||
register double __fr; \
|
||||
__u.__ll = 0xfff80000LL << 32; /* This is a QNaN. */ \
|
||||
__u.__ll |= (cw) & 0xffffffffLL; \
|
||||
__fr = __u.__d; \
|
||||
__asm__ ("mtfsf 255,%0" : : "f" (__fr)); \
|
||||
__asm__ __volatile__("mtfsf 255,%0" : : "f" (__fr)); \
|
||||
}
|
||||
|
||||
/* Default control word set at startup. */
|
||||
|
||||
@ -8,9 +8,7 @@
|
||||
#endif
|
||||
|
||||
#define __stub_chflags
|
||||
#define __stub_fattach
|
||||
#define __stub_fchflags
|
||||
#define __stub_fdetach
|
||||
#define __stub_gtty
|
||||
#define __stub_lchmod
|
||||
#define __stub_revoke
|
||||
|
||||
@ -18,13 +18,36 @@
|
||||
|
||||
#if defined __GNUC__ && !defined _SOFT_FLOAT && !defined __NO_FPRS__
|
||||
|
||||
/* Inline definition for fegetround. */
|
||||
# define __fegetround() \
|
||||
(__extension__ ({ int __fegetround_result; \
|
||||
__asm__ __volatile__ \
|
||||
("mcrfs 7,7 ; mfcr %0" \
|
||||
: "=r"(__fegetround_result) : : "cr7"); \
|
||||
__fegetround_result & 3; }))
|
||||
/* Inline definitions for fegetround. */
|
||||
# define __fegetround_ISA300() \
|
||||
(__extension__ ({ \
|
||||
union { double __d; unsigned long long __ll; } __u; \
|
||||
__asm__ __volatile__ ( \
|
||||
".machine push; .machine \"power9\"; mffsl %0; .machine pop" \
|
||||
: "=f" (__u.__d)); \
|
||||
__u.__ll & 0x0000000000000003LL; \
|
||||
}))
|
||||
|
||||
# define __fegetround_ISA2() \
|
||||
(__extension__ ({ \
|
||||
int __fegetround_result; \
|
||||
__asm__ __volatile__ ("mcrfs 7,7 ; mfcr %0" \
|
||||
: "=r"(__fegetround_result) : : "cr7"); \
|
||||
__fegetround_result & 3; \
|
||||
}))
|
||||
|
||||
# ifdef _ARCH_PWR9
|
||||
# define __fegetround() __fegetround_ISA300()
|
||||
# elif defined __BUILTIN_CPU_SUPPORTS__
|
||||
# define __fegetround() \
|
||||
(__glibc_likely (__builtin_cpu_supports ("arch_3_00")) \
|
||||
? __fegetround_ISA300() \
|
||||
: __fegetround_ISA2() \
|
||||
)
|
||||
# else
|
||||
# define __fegetround() __fegetround_ISA2()
|
||||
# endif
|
||||
|
||||
# define fegetround() __fegetround ()
|
||||
|
||||
# ifndef __NO_MATH_INLINES
|
||||
|
||||
@ -0,0 +1,38 @@
|
||||
/* Socket constants which vary among Linux architectures. Version for POWER.
|
||||
Copyright (C) 2019 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _SYS_SOCKET_H
|
||||
# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
|
||||
#endif
|
||||
|
||||
#define SOL_SOCKET 1
|
||||
#define SO_ACCEPTCONN 30
|
||||
#define SO_BROADCAST 6
|
||||
#define SO_DONTROUTE 5
|
||||
#define SO_ERROR 4
|
||||
#define SO_KEEPALIVE 9
|
||||
#define SO_LINGER 13
|
||||
#define SO_OOBINLINE 10
|
||||
#define SO_RCVBUF 8
|
||||
#define SO_RCVLOWAT 16
|
||||
#define SO_RCVTIMEO 18
|
||||
#define SO_REUSEADDR 2
|
||||
#define SO_SNDBUF 7
|
||||
#define SO_SNDLOWAT 17
|
||||
#define SO_SNDTIMEO 19
|
||||
#define SO_TYPE 3
|
||||
@ -19,6 +19,10 @@
|
||||
#ifndef _FPU_CONTROL_H
|
||||
#define _FPU_CONTROL_H
|
||||
|
||||
#if defined __SPE__ || (defined __NO_FPRS__ && !defined _SOFT_FLOAT)
|
||||
# error "SPE/e500 is no longer supported"
|
||||
#endif
|
||||
|
||||
#ifdef _SOFT_FLOAT
|
||||
|
||||
# define _FPU_RESERVED 0xffffffff
|
||||
@ -28,41 +32,6 @@ typedef unsigned int fpu_control_t;
|
||||
# define _FPU_SETCW(cw) (void) (cw)
|
||||
extern fpu_control_t __fpu_control;
|
||||
|
||||
#elif defined __NO_FPRS__ /* e500 */
|
||||
|
||||
/* rounding control */
|
||||
# define _FPU_RC_NEAREST 0x00 /* RECOMMENDED */
|
||||
# define _FPU_RC_DOWN 0x03
|
||||
# define _FPU_RC_UP 0x02
|
||||
# define _FPU_RC_ZERO 0x01
|
||||
|
||||
/* masking of interrupts */
|
||||
# define _FPU_MASK_ZM 0x10 /* zero divide */
|
||||
# define _FPU_MASK_OM 0x04 /* overflow */
|
||||
# define _FPU_MASK_UM 0x08 /* underflow */
|
||||
# define _FPU_MASK_XM 0x40 /* inexact */
|
||||
# define _FPU_MASK_IM 0x20 /* invalid operation */
|
||||
|
||||
# define _FPU_RESERVED 0x00c10080 /* These bits are reserved and not changed. */
|
||||
|
||||
/* Correct IEEE semantics require traps to be enabled at the hardware
|
||||
level; the kernel then does the emulation and determines whether
|
||||
generation of signals from those traps was enabled using prctl. */
|
||||
# define _FPU_DEFAULT 0x0000003c /* Default value. */
|
||||
# define _FPU_IEEE _FPU_DEFAULT
|
||||
|
||||
/* Type of the control word. */
|
||||
typedef unsigned int fpu_control_t;
|
||||
|
||||
/* Macros for accessing the hardware control word. */
|
||||
# define _FPU_GETCW(cw) \
|
||||
__asm__ volatile ("mfspefscr %0" : "=r" (cw))
|
||||
# define _FPU_SETCW(cw) \
|
||||
__asm__ volatile ("mtspefscr %0" : : "r" (cw))
|
||||
|
||||
/* Default control word set at startup. */
|
||||
extern fpu_control_t __fpu_control;
|
||||
|
||||
#else /* PowerPC 6xx floating-point. */
|
||||
|
||||
/* rounding control */
|
||||
@ -71,6 +40,8 @@ extern fpu_control_t __fpu_control;
|
||||
# define _FPU_RC_UP 0x02
|
||||
# define _FPU_RC_ZERO 0x01
|
||||
|
||||
# define _FPU_MASK_RC (_FPU_RC_NEAREST|_FPU_RC_DOWN|_FPU_RC_UP|_FPU_RC_ZERO)
|
||||
|
||||
# define _FPU_MASK_NI 0x04 /* non-ieee mode */
|
||||
|
||||
/* masking of interrupts */
|
||||
@ -96,20 +67,43 @@ typedef unsigned int fpu_control_t;
|
||||
/* Macros for accessing the hardware control word. */
|
||||
# define _FPU_GETCW(cw) \
|
||||
({union { double __d; unsigned long long __ll; } __u; \
|
||||
register double __fr; \
|
||||
__asm__ ("mffs %0" : "=f" (__fr)); \
|
||||
__u.__d = __fr; \
|
||||
__asm__ __volatile__("mffs %0" : "=f" (__u.__d)); \
|
||||
(cw) = (fpu_control_t) __u.__ll; \
|
||||
(fpu_control_t) __u.__ll; \
|
||||
})
|
||||
|
||||
# define _FPU_GET_RC_ISA300() \
|
||||
({union { double __d; unsigned long long __ll; } __u; \
|
||||
__asm__ __volatile__( \
|
||||
".machine push; .machine \"power9\"; mffsl %0; .machine pop" \
|
||||
: "=f" (__u.__d)); \
|
||||
(fpu_control_t) (__u.__ll & _FPU_MASK_RC); \
|
||||
})
|
||||
|
||||
# ifdef _ARCH_PWR9
|
||||
# define _FPU_GET_RC() _FPU_GET_RC_ISA300()
|
||||
# elif defined __BUILTIN_CPU_SUPPORTS__
|
||||
# define _FPU_GET_RC() \
|
||||
({fpu_control_t __rc; \
|
||||
__rc = __glibc_likely (__builtin_cpu_supports ("arch_3_00")) \
|
||||
? _FPU_GET_RC_ISA300 () \
|
||||
: _FPU_GETCW (__rc) & _FPU_MASK_RC; \
|
||||
__rc; \
|
||||
})
|
||||
# else
|
||||
# define _FPU_GET_RC() \
|
||||
({fpu_control_t __rc = _FPU_GETCW (__rc) & _FPU_MASK_RC; \
|
||||
__rc; \
|
||||
})
|
||||
# endif
|
||||
|
||||
# define _FPU_SETCW(cw) \
|
||||
{ union { double __d; unsigned long long __ll; } __u; \
|
||||
register double __fr; \
|
||||
__u.__ll = 0xfff80000LL << 32; /* This is a QNaN. */ \
|
||||
__u.__ll |= (cw) & 0xffffffffLL; \
|
||||
__fr = __u.__d; \
|
||||
__asm__ ("mtfsf 255,%0" : : "f" (__fr)); \
|
||||
__asm__ __volatile__("mtfsf 255,%0" : : "f" (__fr)); \
|
||||
}
|
||||
|
||||
/* Default control word set at startup. */
|
||||
|
||||
@ -8,9 +8,7 @@
|
||||
#endif
|
||||
|
||||
#define __stub_chflags
|
||||
#define __stub_fattach
|
||||
#define __stub_fchflags
|
||||
#define __stub_fdetach
|
||||
#define __stub_gtty
|
||||
#define __stub_lchmod
|
||||
#define __stub_revoke
|
||||
|
||||
@ -13,9 +13,7 @@
|
||||
#define __stub___compat_query_module
|
||||
#define __stub___compat_uselib
|
||||
#define __stub_chflags
|
||||
#define __stub_fattach
|
||||
#define __stub_fchflags
|
||||
#define __stub_fdetach
|
||||
#define __stub_feclearexcept
|
||||
#define __stub_fedisableexcept
|
||||
#define __stub_feenableexcept
|
||||
@ -33,12 +31,8 @@
|
||||
#define __stub_fesetround
|
||||
#define __stub_fetestexcept
|
||||
#define __stub_feupdateenv
|
||||
#define __stub_getmsg
|
||||
#define __stub_getpmsg
|
||||
#define __stub_gtty
|
||||
#define __stub_lchmod
|
||||
#define __stub_putmsg
|
||||
#define __stub_putpmsg
|
||||
#define __stub_revoke
|
||||
#define __stub_setlogin
|
||||
#define __stub_sigreturn
|
||||
|
||||
@ -38,4 +38,8 @@
|
||||
#define HWCAP_S390_VX 2048
|
||||
#define HWCAP_S390_VXD 4096
|
||||
#define HWCAP_S390_VXE 8192
|
||||
#define HWCAP_S390_GS 16384
|
||||
#define HWCAP_S390_GS 16384
|
||||
#define HWCAP_S390_VXRS_EXT2 32768
|
||||
#define HWCAP_S390_VXRS_PDE 65536
|
||||
#define HWCAP_S390_SORT 131072
|
||||
#define HWCAP_S390_DFLT 262144
|
||||
38
lib/libc/include/sparc-linux-gnu/bits/socket-constants.h
Normal file
38
lib/libc/include/sparc-linux-gnu/bits/socket-constants.h
Normal file
@ -0,0 +1,38 @@
|
||||
/* Socket constants which vary among Linux architectures. Version for SPARC.
|
||||
Copyright (C) 2019 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _SYS_SOCKET_H
|
||||
# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
|
||||
#endif
|
||||
|
||||
#define SOL_SOCKET 65535
|
||||
#define SO_ACCEPTCONN 32768
|
||||
#define SO_BROADCAST 32
|
||||
#define SO_DONTROUTE 16
|
||||
#define SO_ERROR 4103
|
||||
#define SO_KEEPALIVE 8
|
||||
#define SO_LINGER 128
|
||||
#define SO_OOBINLINE 256
|
||||
#define SO_RCVBUF 4098
|
||||
#define SO_RCVLOWAT 2048
|
||||
#define SO_RCVTIMEO 8192
|
||||
#define SO_REUSEADDR 4
|
||||
#define SO_SNDBUF 4097
|
||||
#define SO_SNDLOWAT 4096
|
||||
#define SO_SNDTIMEO 16384
|
||||
#define SO_TYPE 4104
|
||||
@ -1,26 +0,0 @@
|
||||
/* This file is automatically generated.
|
||||
It defines a symbol `__stub_FUNCTION' for each function
|
||||
in the C library which is a stub, meaning it will fail
|
||||
every time called, usually setting errno to ENOSYS. */
|
||||
|
||||
#ifdef _LIBC
|
||||
#error Applications may not define the macro _LIBC
|
||||
#endif
|
||||
|
||||
#define __stub_chflags
|
||||
#define __stub_fattach
|
||||
#define __stub_fchflags
|
||||
#define __stub_fdetach
|
||||
#define __stub_getmsg
|
||||
#define __stub_getpmsg
|
||||
#define __stub_gtty
|
||||
#define __stub_lchmod
|
||||
#define __stub_pkey_alloc
|
||||
#define __stub_pkey_free
|
||||
#define __stub_putmsg
|
||||
#define __stub_putpmsg
|
||||
#define __stub_revoke
|
||||
#define __stub_setlogin
|
||||
#define __stub_sigreturn
|
||||
#define __stub_sstk
|
||||
#define __stub_stty
|
||||
38
lib/libc/include/sparcv9-linux-gnu/bits/socket-constants.h
Normal file
38
lib/libc/include/sparcv9-linux-gnu/bits/socket-constants.h
Normal file
@ -0,0 +1,38 @@
|
||||
/* Socket constants which vary among Linux architectures. Version for SPARC.
|
||||
Copyright (C) 2019 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _SYS_SOCKET_H
|
||||
# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
|
||||
#endif
|
||||
|
||||
#define SOL_SOCKET 65535
|
||||
#define SO_ACCEPTCONN 32768
|
||||
#define SO_BROADCAST 32
|
||||
#define SO_DONTROUTE 16
|
||||
#define SO_ERROR 4103
|
||||
#define SO_KEEPALIVE 8
|
||||
#define SO_LINGER 128
|
||||
#define SO_OOBINLINE 256
|
||||
#define SO_RCVBUF 4098
|
||||
#define SO_RCVLOWAT 2048
|
||||
#define SO_RCVTIMEO 8192
|
||||
#define SO_REUSEADDR 4
|
||||
#define SO_SNDBUF 4097
|
||||
#define SO_SNDLOWAT 4096
|
||||
#define SO_SNDTIMEO 16384
|
||||
#define SO_TYPE 4104
|
||||
@ -1,26 +0,0 @@
|
||||
/* This file is automatically generated.
|
||||
It defines a symbol `__stub_FUNCTION' for each function
|
||||
in the C library which is a stub, meaning it will fail
|
||||
every time called, usually setting errno to ENOSYS. */
|
||||
|
||||
#ifdef _LIBC
|
||||
#error Applications may not define the macro _LIBC
|
||||
#endif
|
||||
|
||||
#define __stub_chflags
|
||||
#define __stub_fattach
|
||||
#define __stub_fchflags
|
||||
#define __stub_fdetach
|
||||
#define __stub_getmsg
|
||||
#define __stub_getpmsg
|
||||
#define __stub_gtty
|
||||
#define __stub_lchmod
|
||||
#define __stub_pkey_alloc
|
||||
#define __stub_pkey_free
|
||||
#define __stub_putmsg
|
||||
#define __stub_putpmsg
|
||||
#define __stub_revoke
|
||||
#define __stub_setlogin
|
||||
#define __stub_sigreturn
|
||||
#define __stub_sstk
|
||||
#define __stub_stty
|
||||
@ -9,13 +9,9 @@
|
||||
|
||||
#define __stub___compat_bdflush
|
||||
#define __stub_chflags
|
||||
#define __stub_fattach
|
||||
#define __stub_fchflags
|
||||
#define __stub_fdetach
|
||||
#define __stub_getmsg
|
||||
#define __stub_gtty
|
||||
#define __stub_lchmod
|
||||
#define __stub_putmsg
|
||||
#define __stub_revoke
|
||||
#define __stub_setlogin
|
||||
#define __stub_sigreturn
|
||||
|
||||
@ -1,183 +0,0 @@
|
||||
/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _SYS_IO_H
|
||||
#define _SYS_IO_H 1
|
||||
|
||||
#include <features.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* If TURN_ON is TRUE, request for permission to do direct i/o on the
|
||||
port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O
|
||||
permission off for that range. This call requires root privileges.
|
||||
|
||||
Portability note: not all Linux platforms support this call. Most
|
||||
platforms based on the PC I/O architecture probably will, however.
|
||||
E.g., Linux/Alpha for Alpha PCs supports this. */
|
||||
extern int ioperm (unsigned long int __from, unsigned long int __num,
|
||||
int __turn_on) __THROW;
|
||||
|
||||
/* Set the I/O privilege level to LEVEL. If LEVEL>3, permission to
|
||||
access any I/O port is granted. This call requires root
|
||||
privileges. */
|
||||
extern int iopl (int __level) __THROW;
|
||||
|
||||
#if defined __GNUC__ && __GNUC__ >= 2
|
||||
|
||||
static __inline unsigned char
|
||||
inb (unsigned short int __port)
|
||||
{
|
||||
unsigned char _v;
|
||||
|
||||
__asm__ __volatile__ ("inb %w1,%0":"=a" (_v):"Nd" (__port));
|
||||
return _v;
|
||||
}
|
||||
|
||||
static __inline unsigned char
|
||||
inb_p (unsigned short int __port)
|
||||
{
|
||||
unsigned char _v;
|
||||
|
||||
__asm__ __volatile__ ("inb %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
|
||||
return _v;
|
||||
}
|
||||
|
||||
static __inline unsigned short int
|
||||
inw (unsigned short int __port)
|
||||
{
|
||||
unsigned short _v;
|
||||
|
||||
__asm__ __volatile__ ("inw %w1,%0":"=a" (_v):"Nd" (__port));
|
||||
return _v;
|
||||
}
|
||||
|
||||
static __inline unsigned short int
|
||||
inw_p (unsigned short int __port)
|
||||
{
|
||||
unsigned short int _v;
|
||||
|
||||
__asm__ __volatile__ ("inw %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
|
||||
return _v;
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
inl (unsigned short int __port)
|
||||
{
|
||||
unsigned int _v;
|
||||
|
||||
__asm__ __volatile__ ("inl %w1,%0":"=a" (_v):"Nd" (__port));
|
||||
return _v;
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
inl_p (unsigned short int __port)
|
||||
{
|
||||
unsigned int _v;
|
||||
__asm__ __volatile__ ("inl %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
|
||||
return _v;
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outb (unsigned char __value, unsigned short int __port)
|
||||
{
|
||||
__asm__ __volatile__ ("outb %b0,%w1": :"a" (__value), "Nd" (__port));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outb_p (unsigned char __value, unsigned short int __port)
|
||||
{
|
||||
__asm__ __volatile__ ("outb %b0,%w1\noutb %%al,$0x80": :"a" (__value),
|
||||
"Nd" (__port));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outw (unsigned short int __value, unsigned short int __port)
|
||||
{
|
||||
__asm__ __volatile__ ("outw %w0,%w1": :"a" (__value), "Nd" (__port));
|
||||
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outw_p (unsigned short int __value, unsigned short int __port)
|
||||
{
|
||||
__asm__ __volatile__ ("outw %w0,%w1\noutb %%al,$0x80": :"a" (__value),
|
||||
"Nd" (__port));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outl (unsigned int __value, unsigned short int __port)
|
||||
{
|
||||
__asm__ __volatile__ ("outl %0,%w1": :"a" (__value), "Nd" (__port));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outl_p (unsigned int __value, unsigned short int __port)
|
||||
{
|
||||
__asm__ __volatile__ ("outl %0,%w1\noutb %%al,$0x80": :"a" (__value),
|
||||
"Nd" (__port));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
insb (unsigned short int __port, void *__addr, unsigned long int __count)
|
||||
{
|
||||
__asm__ __volatile__ ("cld ; rep ; insb":"=D" (__addr), "=c" (__count)
|
||||
:"d" (__port), "0" (__addr), "1" (__count));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
insw (unsigned short int __port, void *__addr, unsigned long int __count)
|
||||
{
|
||||
__asm__ __volatile__ ("cld ; rep ; insw":"=D" (__addr), "=c" (__count)
|
||||
:"d" (__port), "0" (__addr), "1" (__count));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
insl (unsigned short int __port, void *__addr, unsigned long int __count)
|
||||
{
|
||||
__asm__ __volatile__ ("cld ; rep ; insl":"=D" (__addr), "=c" (__count)
|
||||
:"d" (__port), "0" (__addr), "1" (__count));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outsb (unsigned short int __port, const void *__addr,
|
||||
unsigned long int __count)
|
||||
{
|
||||
__asm__ __volatile__ ("cld ; rep ; outsb":"=S" (__addr), "=c" (__count)
|
||||
:"d" (__port), "0" (__addr), "1" (__count));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outsw (unsigned short int __port, const void *__addr,
|
||||
unsigned long int __count)
|
||||
{
|
||||
__asm__ __volatile__ ("cld ; rep ; outsw":"=S" (__addr), "=c" (__count)
|
||||
:"d" (__port), "0" (__addr), "1" (__count));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outsl (unsigned short int __port, const void *__addr,
|
||||
unsigned long int __count)
|
||||
{
|
||||
__asm__ __volatile__ ("cld ; rep ; outsl":"=S" (__addr), "=c" (__count)
|
||||
:"d" (__port), "0" (__addr), "1" (__count));
|
||||
}
|
||||
|
||||
#endif /* GNU C */
|
||||
|
||||
__END_DECLS
|
||||
#endif /* _SYS_IO_H */
|
||||
@ -1,33 +0,0 @@
|
||||
/* bits/xtitypes.h -- Define some types used by <bits/stropts.h>. x86-64.
|
||||
Copyright (C) 2002-2019 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _STROPTS_H
|
||||
# error "Never include <bits/xtitypes.h> directly; use <stropts.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef _BITS_XTITYPES_H
|
||||
#define _BITS_XTITYPES_H 1
|
||||
|
||||
#include <bits/types.h>
|
||||
|
||||
/* This type is used by some structs in <bits/stropts.h>. */
|
||||
typedef __SLONG32_TYPE __t_scalar_t;
|
||||
typedef __ULONG32_TYPE __t_uscalar_t;
|
||||
|
||||
|
||||
#endif /* bits/xtitypes.h */
|
||||
@ -14,13 +14,9 @@
|
||||
#define __stub___compat_query_module
|
||||
#define __stub___compat_uselib
|
||||
#define __stub_chflags
|
||||
#define __stub_fattach
|
||||
#define __stub_fchflags
|
||||
#define __stub_fdetach
|
||||
#define __stub_getmsg
|
||||
#define __stub_gtty
|
||||
#define __stub_lchmod
|
||||
#define __stub_putmsg
|
||||
#define __stub_revoke
|
||||
#define __stub_setlogin
|
||||
#define __stub_sigreturn
|
||||
|
||||
@ -1,183 +0,0 @@
|
||||
/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _SYS_IO_H
|
||||
#define _SYS_IO_H 1
|
||||
|
||||
#include <features.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* If TURN_ON is TRUE, request for permission to do direct i/o on the
|
||||
port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O
|
||||
permission off for that range. This call requires root privileges.
|
||||
|
||||
Portability note: not all Linux platforms support this call. Most
|
||||
platforms based on the PC I/O architecture probably will, however.
|
||||
E.g., Linux/Alpha for Alpha PCs supports this. */
|
||||
extern int ioperm (unsigned long int __from, unsigned long int __num,
|
||||
int __turn_on) __THROW;
|
||||
|
||||
/* Set the I/O privilege level to LEVEL. If LEVEL>3, permission to
|
||||
access any I/O port is granted. This call requires root
|
||||
privileges. */
|
||||
extern int iopl (int __level) __THROW;
|
||||
|
||||
#if defined __GNUC__ && __GNUC__ >= 2
|
||||
|
||||
static __inline unsigned char
|
||||
inb (unsigned short int __port)
|
||||
{
|
||||
unsigned char _v;
|
||||
|
||||
__asm__ __volatile__ ("inb %w1,%0":"=a" (_v):"Nd" (__port));
|
||||
return _v;
|
||||
}
|
||||
|
||||
static __inline unsigned char
|
||||
inb_p (unsigned short int __port)
|
||||
{
|
||||
unsigned char _v;
|
||||
|
||||
__asm__ __volatile__ ("inb %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
|
||||
return _v;
|
||||
}
|
||||
|
||||
static __inline unsigned short int
|
||||
inw (unsigned short int __port)
|
||||
{
|
||||
unsigned short _v;
|
||||
|
||||
__asm__ __volatile__ ("inw %w1,%0":"=a" (_v):"Nd" (__port));
|
||||
return _v;
|
||||
}
|
||||
|
||||
static __inline unsigned short int
|
||||
inw_p (unsigned short int __port)
|
||||
{
|
||||
unsigned short int _v;
|
||||
|
||||
__asm__ __volatile__ ("inw %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
|
||||
return _v;
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
inl (unsigned short int __port)
|
||||
{
|
||||
unsigned int _v;
|
||||
|
||||
__asm__ __volatile__ ("inl %w1,%0":"=a" (_v):"Nd" (__port));
|
||||
return _v;
|
||||
}
|
||||
|
||||
static __inline unsigned int
|
||||
inl_p (unsigned short int __port)
|
||||
{
|
||||
unsigned int _v;
|
||||
__asm__ __volatile__ ("inl %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
|
||||
return _v;
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outb (unsigned char __value, unsigned short int __port)
|
||||
{
|
||||
__asm__ __volatile__ ("outb %b0,%w1": :"a" (__value), "Nd" (__port));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outb_p (unsigned char __value, unsigned short int __port)
|
||||
{
|
||||
__asm__ __volatile__ ("outb %b0,%w1\noutb %%al,$0x80": :"a" (__value),
|
||||
"Nd" (__port));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outw (unsigned short int __value, unsigned short int __port)
|
||||
{
|
||||
__asm__ __volatile__ ("outw %w0,%w1": :"a" (__value), "Nd" (__port));
|
||||
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outw_p (unsigned short int __value, unsigned short int __port)
|
||||
{
|
||||
__asm__ __volatile__ ("outw %w0,%w1\noutb %%al,$0x80": :"a" (__value),
|
||||
"Nd" (__port));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outl (unsigned int __value, unsigned short int __port)
|
||||
{
|
||||
__asm__ __volatile__ ("outl %0,%w1": :"a" (__value), "Nd" (__port));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outl_p (unsigned int __value, unsigned short int __port)
|
||||
{
|
||||
__asm__ __volatile__ ("outl %0,%w1\noutb %%al,$0x80": :"a" (__value),
|
||||
"Nd" (__port));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
insb (unsigned short int __port, void *__addr, unsigned long int __count)
|
||||
{
|
||||
__asm__ __volatile__ ("cld ; rep ; insb":"=D" (__addr), "=c" (__count)
|
||||
:"d" (__port), "0" (__addr), "1" (__count));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
insw (unsigned short int __port, void *__addr, unsigned long int __count)
|
||||
{
|
||||
__asm__ __volatile__ ("cld ; rep ; insw":"=D" (__addr), "=c" (__count)
|
||||
:"d" (__port), "0" (__addr), "1" (__count));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
insl (unsigned short int __port, void *__addr, unsigned long int __count)
|
||||
{
|
||||
__asm__ __volatile__ ("cld ; rep ; insl":"=D" (__addr), "=c" (__count)
|
||||
:"d" (__port), "0" (__addr), "1" (__count));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outsb (unsigned short int __port, const void *__addr,
|
||||
unsigned long int __count)
|
||||
{
|
||||
__asm__ __volatile__ ("cld ; rep ; outsb":"=S" (__addr), "=c" (__count)
|
||||
:"d" (__port), "0" (__addr), "1" (__count));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outsw (unsigned short int __port, const void *__addr,
|
||||
unsigned long int __count)
|
||||
{
|
||||
__asm__ __volatile__ ("cld ; rep ; outsw":"=S" (__addr), "=c" (__count)
|
||||
:"d" (__port), "0" (__addr), "1" (__count));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outsl (unsigned short int __port, const void *__addr,
|
||||
unsigned long int __count)
|
||||
{
|
||||
__asm__ __volatile__ ("cld ; rep ; outsl":"=S" (__addr), "=c" (__count)
|
||||
:"d" (__port), "0" (__addr), "1" (__count));
|
||||
}
|
||||
|
||||
#endif /* GNU C */
|
||||
|
||||
__END_DECLS
|
||||
#endif /* _SYS_IO_H */
|
||||
Loading…
x
Reference in New Issue
Block a user