Remove tls.h inclusion from internal errno.h

The tls.h inclusion is not really required and limits possible
definition on more arch specific headers.

This is a cleanup to allow inline functions on sysdep.h, more
specifically on i386 and ia64 which requires to access some tls
definitions its own.

No semantic changes expected, checked with a build against all
affected ABIs.
This commit is contained in:
Adhemerval Zanella 2020-02-04 10:29:04 -03:00
parent 26f7c72a99
commit 01bd62517c
71 changed files with 83 additions and 70 deletions

View file

@ -22,8 +22,6 @@ extern int rtld_errno attribute_hidden;
# elif IS_IN_LIB && !IS_IN (rtld) # elif IS_IN_LIB && !IS_IN (rtld)
# include <tls.h>
# undef errno # undef errno
# if IS_IN (libc) # if IS_IN (libc)
# define errno __libc_errno # define errno __libc_errno

View file

@ -16,10 +16,8 @@
License along with the GNU C Library; if not, see License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */ <https://www.gnu.org/licenses/>. */
#include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#include <sys/types.h> #include <sys/stat.h>
#include <unistd.h>
/* Change the protections of FILE to MODE. */ /* Change the protections of FILE to MODE. */
int int

View file

@ -17,6 +17,7 @@
not, see <https://www.gnu.org/licenses/>. */ not, see <https://www.gnu.org/licenses/>. */
#include <errno.h> #include <errno.h>
#include <stdlib.h>
#include <malloc.h> #include <malloc.h>
void * void *

View file

@ -23,6 +23,7 @@
# include <unistd.h> # include <unistd.h>
# include <errno.h> # include <errno.h>
# include <sys/types.h>
struct ustat struct ustat
{ {

View file

@ -18,6 +18,7 @@
#include <errno.h> #include <errno.h>
#include <nss_files.h> #include <nss_files.h>
#include <stdbool.h>
int int
__nss_fgetent_r (FILE *fp, void *result, char *buffer, size_t buffer_length, __nss_fgetent_r (FILE *fp, void *result, char *buffer, size_t buffer_length,

View file

@ -19,6 +19,7 @@
#include <errno.h> #include <errno.h>
#include <stdarg.h> #include <stdarg.h>
#include <sys/param.h> #include <sys/param.h>
#include <stddef.h>
/* Execute PATH with all arguments after PATH until /* Execute PATH with all arguments after PATH until
a NULL pointer and environment from `environ'. */ a NULL pointer and environment from `environ'. */

View file

@ -19,6 +19,7 @@
#include <stdarg.h> #include <stdarg.h>
#include <errno.h> #include <errno.h>
#include <sys/param.h> #include <sys/param.h>
#include <stddef.h>
/* Execute PATH with all arguments after PATH until a NULL pointer, /* Execute PATH with all arguments after PATH until a NULL pointer,
and the argument after that for environment. */ and the argument after that for environment. */

View file

@ -19,6 +19,7 @@
#include <stdarg.h> #include <stdarg.h>
#include <errno.h> #include <errno.h>
#include <sys/param.h> #include <sys/param.h>
#include <stddef.h>
/* Execute FILE, searching in the `PATH' environment variable if /* Execute FILE, searching in the `PATH' environment variable if
it contains no slashes, with all arguments after FILE until a it contains no slashes, with all arguments after FILE until a

View file

@ -19,7 +19,7 @@
#include <errno.h> #include <errno.h>
#include <spawn.h> #include <spawn.h>
#include <string.h> #include <string.h>
#include <stdlib.h>
#include "spawn_int.h" #include "spawn_int.h"
int int

View file

@ -18,6 +18,7 @@
#include <errno.h> #include <errno.h>
#include <stdio.h> #include <stdio.h>
#include <pwd.h> #include <pwd.h>
#include <stdlib.h>
#include <nss.h> #include <nss.h>
#define _S(x) x ?: "" #define _S(x) x ?: ""

View file

@ -18,6 +18,7 @@
#include <errno.h> #include <errno.h>
#include <signal.h> #include <signal.h>
#include <sigsetops.h> #include <sigsetops.h>
#include <stddef.h>
/* Clear all signals from SET. */ /* Clear all signals from SET. */
int int

View file

@ -17,6 +17,7 @@
#include <errno.h> #include <errno.h>
#include <signal.h> #include <signal.h>
#include <stddef.h>
#include <sigsetops.h> #include <sigsetops.h>
/* Return 1 if SIGNO is in SET, 0 if not. */ /* Return 1 if SIGNO is in SET, 0 if not. */

View file

@ -22,6 +22,7 @@
#include <signal.h> #include <signal.h>
#include <sigsetops.h> #include <sigsetops.h>
#include <stdbool.h> #include <stdbool.h>
#include <stddef.h>
static inline bool static inline bool
__is_internal_signal (int sig) __is_internal_signal (int sig)

View file

@ -20,9 +20,6 @@
#include <float.h> #include <float.h>
#include <math.h> #include <math.h>
/* Need to set this when including gmp headers after system headers. */
#define HAVE_ALLOCA 1
#include "gmp.h" #include "gmp.h"
#include "gmp-impl.h" #include "gmp-impl.h"

View file

@ -18,6 +18,7 @@
#include <errno.h> #include <errno.h>
#include <sys/mman.h> #include <sys/mman.h>
#include <sys/types.h> #include <sys/types.h>
#include <mach/port.h>
/* Map addresses starting near ADDR and extending for LEN bytes. From /* Map addresses starting near ADDR and extending for LEN bytes. From
OFFSET into the file FD describes according to PROT and FLAGS. If ADDR OFFSET into the file FD describes according to PROT and FLAGS. If ADDR

View file

@ -19,6 +19,7 @@
#include <errno.h> #include <errno.h>
#include <sys/wait.h> #include <sys/wait.h>
#include <stddef.h>
int int
__waitid (idtype_t idtype, id_t id, siginfo_t *infop, int options) __waitid (idtype_t idtype, id_t id, siginfo_t *infop, int options)

View file

@ -17,6 +17,7 @@
<https://www.gnu.org/licenses/>. */ <https://www.gnu.org/licenses/>. */
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <string.h> #include <string.h>
#include <sysdep.h> #include <sysdep.h>
#include <signal.h> #include <signal.h>

View file

@ -23,6 +23,7 @@
#include <sys/time.h> #include <sys/time.h>
#include <stdio.h> #include <stdio.h>
#include <stdbool.h> #include <stdbool.h>
#include <lowlevellock-futex.h>
#include <libc-diag.h> #include <libc-diag.h>
/* This file defines futex operations used internally in glibc. A futex /* This file defines futex operations used internally in glibc. A futex

View file

@ -19,6 +19,7 @@
#include <limits.h> #include <limits.h>
#include <sys/time.h> #include <sys/time.h>
#include <sys/timex.h> #include <sys/timex.h>
#include <sysdep.h>
#define MAX_SEC (INT_MAX / 1000000L - 2) #define MAX_SEC (INT_MAX / 1000000L - 2)
#define MIN_SEC (INT_MIN / 1000000L + 2) #define MIN_SEC (INT_MIN / 1000000L + 2)

View file

@ -20,6 +20,7 @@
#include <time.h> #include <time.h>
#include <unistd.h> #include <unistd.h>
#include "kernel-posix-cpu-timers.h" #include "kernel-posix-cpu-timers.h"
#include <sysdep.h>
#include <shlib-compat.h> #include <shlib-compat.h>
int int

View file

@ -16,14 +16,10 @@
License along with the GNU C Library; if not, see License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */ <https://www.gnu.org/licenses/>. */
#include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#include <stddef.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h> #include <unistd.h>
#include <sys/types.h> #include <sys/types.h>
#include <alloca.h> #include <sys/stat.h>
#include <sysdep.h> #include <sysdep.h>

View file

@ -18,6 +18,7 @@
#include <features.h> #include <features.h>
#include <sys/timeb.h> #include <sys/timeb.h>
#include <time.h>
#include <errno.h> #include <errno.h>
int int

View file

@ -17,7 +17,6 @@
#include <unistd.h> #include <unistd.h>
#include <sysdep.h> #include <sysdep.h>
#include <errno.h>
#ifndef __NR_ftruncate64 #ifndef __NR_ftruncate64
# define __NR_ftruncate64 __NR_ftruncate # define __NR_ftruncate64 __NR_ftruncate

View file

@ -16,11 +16,9 @@
License along with the GNU C Library. If not, see License along with the GNU C Library. If not, see
<https://www.gnu.org/licenses/>. */ <https://www.gnu.org/licenses/>. */
#include <errno.h>
#include <stddef.h>
#include <fcntl.h> #include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h> #include <sys/types.h>
#include <sysdep.h>
/* Change the protections of FILE to MODE. */ /* Change the protections of FILE to MODE. */
int int

View file

@ -16,11 +16,9 @@
License along with the GNU C Library. If not, see License along with the GNU C Library. If not, see
<https://www.gnu.org/licenses/>. */ <https://www.gnu.org/licenses/>. */
#include <errno.h>
#include <stddef.h>
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#include <sys/types.h> #include <sysdep.h>
/* Change the owner and group of FILE. */ /* Change the owner and group of FILE. */
int int

View file

@ -16,10 +16,9 @@
License along with the GNU C Library. If not, see License along with the GNU C Library. If not, see
<https://www.gnu.org/licenses/>. */ <https://www.gnu.org/licenses/>. */
#include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#include <limits.h>
#include <unistd.h> #include <unistd.h>
#include <sysdep.h>
/* Duplicate FD to FD2, closing the old FD2 and making FD2 be /* Duplicate FD to FD2, closing the old FD2 and making FD2 be
open the same file as FD is. Return FD2 or -1. */ open the same file as FD is. Return FD2 or -1. */

View file

@ -16,11 +16,8 @@
License along with the GNU C Library. If not, see License along with the GNU C Library. If not, see
<https://www.gnu.org/licenses/>. */ <https://www.gnu.org/licenses/>. */
#include <stddef.h>
#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/epoll.h> #include <sys/epoll.h>
#include <sysdep.h>
libc_hidden_proto (epoll_create) libc_hidden_proto (epoll_create)

View file

@ -16,11 +16,8 @@
License along with the GNU C Library. If not, see License along with the GNU C Library. If not, see
<https://www.gnu.org/licenses/>. */ <https://www.gnu.org/licenses/>. */
#include <stddef.h>
#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/inotify.h> #include <sys/inotify.h>
#include <sysdep.h>
libc_hidden_proto (inotify_init) libc_hidden_proto (inotify_init)

View file

@ -16,11 +16,9 @@
License along with the GNU C Library. If not, see License along with the GNU C Library. If not, see
<https://www.gnu.org/licenses/>. */ <https://www.gnu.org/licenses/>. */
#include <errno.h>
#include <stddef.h>
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#include <sys/types.h> #include <sysdep.h>
/* Change the owner and group of FILE. */ /* Change the owner and group of FILE. */
int int

View file

@ -16,10 +16,9 @@
License along with the GNU C Library. If not, see License along with the GNU C Library. If not, see
<https://www.gnu.org/licenses/>. */ <https://www.gnu.org/licenses/>. */
#include <errno.h>
#include <stddef.h>
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#include <sysdep.h>
/* Make a link to FROM called TO. */ /* Make a link to FROM called TO. */
int int

View file

@ -16,9 +16,8 @@
License along with the GNU C Library. If not, see License along with the GNU C Library. If not, see
<https://www.gnu.org/licenses/>. */ <https://www.gnu.org/licenses/>. */
#include <errno.h>
#include <unistd.h> #include <unistd.h>
#include <stddef.h> #include <sysdep.h>
/* Create a one-way communication channel (__pipe). /* Create a one-way communication channel (__pipe).
If successful, two file descriptors are stored in PIPEDES; If successful, two file descriptors are stored in PIPEDES;

View file

@ -16,9 +16,9 @@
License along with the GNU C Library. If not, see License along with the GNU C Library. If not, see
<https://www.gnu.org/licenses/>. */ <https://www.gnu.org/licenses/>. */
#include <errno.h>
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#include <sysdep.h>
/* Read the contents of the symbolic link PATH into no more than /* Read the contents of the symbolic link PATH into no more than
LEN bytes of BUF. The contents are not null-terminated. LEN bytes of BUF. The contents are not null-terminated.

View file

@ -16,11 +16,9 @@
License along with the GNU C Library. If not, see License along with the GNU C Library. If not, see
<https://www.gnu.org/licenses/>. */ <https://www.gnu.org/licenses/>. */
#include <errno.h>
#include <stddef.h>
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#include <sysdep.h>
/* Remove the directory PATH. */ /* Remove the directory PATH. */
int int

View file

@ -16,10 +16,9 @@
License along with the GNU C Library. If not, see License along with the GNU C Library. If not, see
<https://www.gnu.org/licenses/>. */ <https://www.gnu.org/licenses/>. */
#include <errno.h>
#include <stddef.h>
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#include <sysdep.h>
/* Make a link to FROM called TO. */ /* Make a link to FROM called TO. */
int int

View file

@ -16,11 +16,9 @@
License along with the GNU C Library. If not, see License along with the GNU C Library. If not, see
<https://www.gnu.org/licenses/>. */ <https://www.gnu.org/licenses/>. */
#include <errno.h>
#include <stddef.h>
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#include <sysdep.h>
/* Remove the link named NAME. */ /* Remove the link named NAME. */
int int

View file

@ -16,10 +16,10 @@
License along with the GNU C Library. If not, see License along with the GNU C Library. If not, see
<https://www.gnu.org/licenses/>. */ <https://www.gnu.org/licenses/>. */
#include <errno.h>
#include <sys/statfs.h> #include <sys/statfs.h>
#include <kernel_stat.h> #include <kernel_stat.h>
#include <stddef.h> #include <stddef.h>
#include <sysdep.h>
#if !STATFS_IS_STATFS64 #if !STATFS_IS_STATFS64
#include "overflow.h" #include "overflow.h"

View file

@ -19,6 +19,7 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/statfs.h> #include <sys/statfs.h>
#include <sys/types.h>
/* Test for overflows of structures where we ask the kernel to fill them /* Test for overflows of structures where we ask the kernel to fill them
in with standard 64-bit syscalls but return them through APIs that in with standard 64-bit syscalls but return them through APIs that

View file

@ -17,7 +17,9 @@
<https://www.gnu.org/licenses/>. */ <https://www.gnu.org/licenses/>. */
#include <sys/sendfile.h> #include <sys/sendfile.h>
#include <stddef.h>
#include <errno.h> #include <errno.h>
#include <sysdep.h>
/* Send COUNT bytes from file associated with IN_FD starting at OFFSET to /* Send COUNT bytes from file associated with IN_FD starting at OFFSET to
descriptor OUT_FD. */ descriptor OUT_FD. */

View file

@ -19,7 +19,7 @@
#include <errno.h> #include <errno.h>
#include <sys/statfs.h> #include <sys/statfs.h>
#include <kernel_stat.h> #include <kernel_stat.h>
#include <stddef.h> #include <sysdep.h>
#if !STATFS_IS_STATFS64 #if !STATFS_IS_STATFS64
#include "overflow.h" #include "overflow.h"

View file

@ -20,6 +20,7 @@
#include <assert.h> #include <assert.h>
#include <errno.h> #include <errno.h>
#include <unistd.h> #include <unistd.h>
#include <sysdep.h>
/* Write LENGTH bytes of randomness starting at BUFFER. Return 0 on /* Write LENGTH bytes of randomness starting at BUFFER. Return 0 on
success and -1 on failure. */ success and -1 on failure. */

View file

@ -16,9 +16,8 @@
License along with the GNU C Library. If not, see License along with the GNU C Library. If not, see
<https://www.gnu.org/licenses/>. */ <https://www.gnu.org/licenses/>. */
#include <errno.h>
#include <sys/resource.h> #include <sys/resource.h>
#include <sys/types.h> #include <sysdep.h>
#include <shlib-compat.h> #include <shlib-compat.h>
#if !__RLIM_T_MATCHES_RLIM64_T #if !__RLIM_T_MATCHES_RLIM64_T

View file

@ -18,6 +18,7 @@
#include <errno.h> #include <errno.h>
#include <sys/types.h> #include <sys/types.h>
#include <sysdep.h>
#include <shlib-compat.h> #include <shlib-compat.h>
/* Add this redirection so the strong_alias for __RLIM_T_MATCHES_RLIM64_T /* Add this redirection so the strong_alias for __RLIM_T_MATCHES_RLIM64_T

View file

@ -16,15 +16,16 @@
License along with the GNU C Library; if not, see License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */ <https://www.gnu.org/licenses/>. */
#include <time.h>
#include <string.h>
/* Optimize the function call by setting the PLT directly to vDSO symbol. */ /* Optimize the function call by setting the PLT directly to vDSO symbol. */
#ifdef USE_IFUNC_GETTIMEOFDAY #ifdef USE_IFUNC_GETTIMEOFDAY
# include <time.h>
# include <string.h>
# include <sysdep.h> # include <sysdep.h>
# include <sysdep-vdso.h> # include <sysdep-vdso.h>
# ifdef SHARED # ifdef SHARED
# include <dl-vdso.h> # include <dl-vdso.h>
# include <libc-vdso.h> # include <libc-vdso.h>
static int static int

View file

@ -28,6 +28,8 @@
/* Defines RTLD_PRIVATE_ERRNO. */ /* Defines RTLD_PRIVATE_ERRNO. */
#include <dl-sysdep.h> #include <dl-sysdep.h>
#include <tls.h>
/* In order to get __set_errno() definition in INLINE_SYSCALL. */ /* In order to get __set_errno() definition in INLINE_SYSCALL. */
#ifndef __ASSEMBLER__ #ifndef __ASSEMBLER__
#include <errno.h> #include <errno.h>

View file

@ -23,6 +23,7 @@
#include <sigsetops.h> #include <sigsetops.h>
#include <stdbool.h> #include <stdbool.h>
#include <limits.h> #include <limits.h>
#include <stddef.h>
#include <sysdep.h> #include <sysdep.h>
/* The signal used for asynchronous cancelation. */ /* The signal used for asynchronous cancelation. */

View file

@ -18,6 +18,8 @@
#include <errno.h> #include <errno.h>
#include <sys/uio.h> #include <sys/uio.h>
#include <stdbool.h>
#include <sysdep.h>
static bool static bool
writev_for_fatal (int fd, const struct iovec *iov, size_t niov, size_t total) writev_for_fatal (int fd, const struct iovec *iov, size_t niov, size_t total)

View file

@ -26,6 +26,8 @@
/* Defines RTLD_PRIVATE_ERRNO. */ /* Defines RTLD_PRIVATE_ERRNO. */
#include <dl-sysdep.h> #include <dl-sysdep.h>
#include <tls.h>
/* In order to get __set_errno() definition in INLINE_SYSCALL. */ /* In order to get __set_errno() definition in INLINE_SYSCALL. */
#ifndef __ASSEMBLER__ #ifndef __ASSEMBLER__
# include <errno.h> # include <errno.h>

View file

@ -19,6 +19,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <errno.h> #include <errno.h>
#include <sysdep.h>
int int
__mknodat (int fd, const char *path, mode_t mode, dev_t dev) __mknodat (int fd, const char *path, mode_t mode, dev_t dev)

View file

@ -19,6 +19,7 @@
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#include <stdio.h> #include <stdio.h>
#include <stdbool.h>
#include <sys/socket.h> #include <sys/socket.h>
#include "netlinkaccess.h" #include "netlinkaccess.h"

View file

@ -17,6 +17,7 @@
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#include <sysdep.h>
#include <shlib-compat.h> #include <shlib-compat.h>
int __posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise); int __posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise);

View file

@ -15,10 +15,8 @@
License along with the GNU C Library; if not, see License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */ <https://www.gnu.org/licenses/>. */
#include <errno.h>
#include <sys/resource.h> #include <sys/resource.h>
#include <sys/syscall.h> #include <sysdep.h>
int int
prlimit (__pid_t pid, enum __rlimit_resource resource, prlimit (__pid_t pid, enum __rlimit_resource resource,

View file

@ -17,7 +17,7 @@
<https://www.gnu.org/licenses/>. */ <https://www.gnu.org/licenses/>. */
#include <fcntl.h> #include <fcntl.h>
#include <errno.h> #include <sys/types.h>
#include <sysdep.h> #include <sysdep.h>
ssize_t ssize_t

View file

@ -18,6 +18,7 @@
#include <errno.h> #include <errno.h>
#include <unistd.h> #include <unistd.h>
#include <sys/auxv.h> #include <sys/auxv.h>
#include <stdbool.h>
static long int linux_sysconf (int name); static long int linux_sysconf (int name);

View file

@ -19,7 +19,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <utmp.h> #include <utmp.h>
#include <errno.h> #include <errno.h>
#include <libc-symbols.h> #include <stdlib.h>
#include "utmp32.h" #include "utmp32.h"
#include "utmp-convert.h" #include "utmp-convert.h"

View file

@ -19,7 +19,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <utmp.h> #include <utmp.h>
#include <errno.h> #include <errno.h>
#include <libc-symbols.h> #include <stdlib.h>
#include "utmp32.h" #include "utmp32.h"
#include "utmp-convert.h" #include "utmp-convert.h"

View file

@ -17,9 +17,9 @@
<https://www.gnu.org/licenses/>. */ <https://www.gnu.org/licenses/>. */
#include <sys/sem.h> #include <sys/sem.h>
#include <stddef.h>
#include <ipc_priv.h> #include <ipc_priv.h>
#include <sysdep.h> #include <sysdep.h>
#include <errno.h>
/* Perform user-defined atomical operation of array of semaphores. */ /* Perform user-defined atomical operation of array of semaphores. */

View file

@ -16,9 +16,8 @@
License along with the GNU C Library. If not, see License along with the GNU C Library. If not, see
<https://www.gnu.org/licenses/>. */ <https://www.gnu.org/licenses/>. */
#include <errno.h>
#include <sys/resource.h> #include <sys/resource.h>
#include <sys/types.h> #include <sysdep.h>
#include <shlib-compat.h> #include <shlib-compat.h>
#if !__RLIM_T_MATCHES_RLIM64_T #if !__RLIM_T_MATCHES_RLIM64_T

View file

@ -18,6 +18,7 @@
#include <errno.h> #include <errno.h>
#include <sys/types.h> #include <sys/types.h>
#include <sysdep.h>
#include <shlib-compat.h> #include <shlib-compat.h>
/* Add this redirection so the strong_alias for __RLIM_T_MATCHES_RLIM64_T /* Add this redirection so the strong_alias for __RLIM_T_MATCHES_RLIM64_T

View file

@ -18,6 +18,7 @@
#include <errno.h> #include <errno.h>
#include <sys/time.h> #include <sys/time.h>
#include <stddef.h>
#include <sysdep.h> #include <sysdep.h>
/* Set the system-wide timezone. /* Set the system-wide timezone.

View file

@ -16,9 +16,10 @@
License along with the GNU C Library; if not, see License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */ <https://www.gnu.org/licenses/>. */
#include <sys/msg.h>
#include <stddef.h>
#include <ipc_priv.h> #include <ipc_priv.h>
#include <sysdep.h> #include <sysdep.h>
#include <errno.h>
/* Return an identifier for an shared memory segment of at least size SIZE /* Return an identifier for an shared memory segment of at least size SIZE
which is associated with KEY. */ which is associated with KEY. */

View file

@ -19,6 +19,8 @@
#ifndef _SYS_SOCKETCALL_H #ifndef _SYS_SOCKETCALL_H
#define _SYS_SOCKETCALL_H 1 #define _SYS_SOCKETCALL_H 1
#include <sysdep.h>
/* Define unique numbers for the operations permitted on socket. Linux /* Define unique numbers for the operations permitted on socket. Linux
uses a single system call for all these functions. The relevant code uses a single system call for all these functions. The relevant code
file is /usr/include/linux/net.h. file is /usr/include/linux/net.h.

View file

@ -19,7 +19,7 @@
#include <stddef.h> #include <stddef.h>
#include <errno.h> #include <errno.h>
#include <termios.h> #include <termios.h>
#include <sysdep.h>
/* This is a gross hack around a kernel bug. If the cfsetispeed functions /* This is a gross hack around a kernel bug. If the cfsetispeed functions
is called with the SPEED argument set to zero this means use the same is called with the SPEED argument set to zero this means use the same

View file

@ -18,7 +18,7 @@
#include <errno.h> #include <errno.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sysdep.h>
#include "statx_generic.c" #include "statx_generic.c"
int int

View file

@ -17,6 +17,7 @@
<https://www.gnu.org/licenses/>. */ <https://www.gnu.org/licenses/>. */
#include <errno.h> #include <errno.h>
#include <stddef.h>
#include <shlib-compat.h> #include <shlib-compat.h>
#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_32) #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_32)

View file

@ -20,6 +20,7 @@
#include <bits/wordsize.h> #include <bits/wordsize.h>
#include <kernel-features.h> #include <kernel-features.h>
#include <endian.h>
#include <errno.h> #include <errno.h>
#undef INTERNAL_SYSCALL_ERROR_P #undef INTERNAL_SYSCALL_ERROR_P

View file

@ -17,7 +17,6 @@
#include <unistd.h> #include <unistd.h>
#include <sysdep.h> #include <sysdep.h>
#include <errno.h>
#ifndef __NR_truncate64 #ifndef __NR_truncate64
# define __NR_truncate64 __NR_truncate # define __NR_truncate64 __NR_truncate

View file

@ -23,7 +23,7 @@
#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_28) #if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_28)
# include <sysdep.h> # include <sysdep.h>
# include <errno.h> # include <sys/types.h>
# ifndef DEV_TO_KDEV # ifndef DEV_TO_KDEV
# define DEV_TO_KDEV(__dev) \ # define DEV_TO_KDEV(__dev) \

View file

@ -19,6 +19,7 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
#include <errno.h> #include <errno.h>
#include <sysdep.h>
#include <shlib-compat.h> #include <shlib-compat.h>
#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33) #if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)

View file

@ -17,6 +17,7 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <errno.h> #include <errno.h>
#include <sysdep.h>
#include <shlib-compat.h> #include <shlib-compat.h>
#if SHLIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33) #if SHLIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33)

View file

@ -19,6 +19,7 @@
#include <errno.h> #include <errno.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <kernel_stat.h> #include <kernel_stat.h>
#include <sysdep.h>
#if STAT_IS_KERNEL_STAT #if STAT_IS_KERNEL_STAT

View file

@ -23,6 +23,12 @@
#include <elf.h> #include <elf.h>
#ifdef __ILP32__
# define RSP_REG "esp"
#else
# define RSP_REG "rsp"
#endif
/* On x86_64 the stack grows down. */ /* On x86_64 the stack grows down. */
#define _STACK_GROWS_DOWN 1 #define _STACK_GROWS_DOWN 1
@ -34,10 +40,10 @@
for which they need to act as barriers as well, hence the additional for which they need to act as barriers as well, hence the additional
(unnecessary) parameters. */ (unnecessary) parameters. */
#define stackinfo_get_sp() \ #define stackinfo_get_sp() \
({ void *p__; asm volatile ("mov %%" RSP_LP ", %0" : "=r" (p__)); p__; }) ({ void *p__; asm volatile ("mov %%" RSP_REG ", %0" : "=r" (p__)); p__; })
#define stackinfo_sub_sp(ptr) \ #define stackinfo_sub_sp(ptr) \
({ ptrdiff_t d__; \ ({ ptrdiff_t d__; \
asm volatile ("sub %%" RSP_LP " , %0" : "=r" (d__) : "0" (ptr)); \ asm volatile ("sub %%" RSP_REG " , %0" : "=r" (d__) : "0" (ptr)); \
d__; }) d__; })
#endif /* stackinfo.h */ #endif /* stackinfo.h */