mirror of
https://sourceware.org/git/glibc.git
synced 2025-10-12 19:04:54 +03:00
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:
@@ -19,6 +19,7 @@
|
||||
#include <limits.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/timex.h>
|
||||
#include <sysdep.h>
|
||||
|
||||
#define MAX_SEC (INT_MAX / 1000000L - 2)
|
||||
#define MIN_SEC (INT_MIN / 1000000L + 2)
|
||||
|
@@ -20,6 +20,7 @@
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
#include "kernel-posix-cpu-timers.h"
|
||||
#include <sysdep.h>
|
||||
#include <shlib-compat.h>
|
||||
|
||||
int
|
||||
|
@@ -16,14 +16,10 @@
|
||||
License along with the GNU C Library; if not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <alloca.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sysdep.h>
|
||||
|
||||
|
||||
|
@@ -18,6 +18,7 @@
|
||||
|
||||
#include <features.h>
|
||||
#include <sys/timeb.h>
|
||||
#include <time.h>
|
||||
#include <errno.h>
|
||||
|
||||
int
|
||||
|
@@ -17,7 +17,6 @@
|
||||
|
||||
#include <unistd.h>
|
||||
#include <sysdep.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifndef __NR_ftruncate64
|
||||
# define __NR_ftruncate64 __NR_ftruncate
|
||||
|
@@ -16,11 +16,9 @@
|
||||
License along with the GNU C Library. If not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <errno.h>
|
||||
#include <stddef.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <sysdep.h>
|
||||
|
||||
/* Change the protections of FILE to MODE. */
|
||||
int
|
||||
|
@@ -16,11 +16,9 @@
|
||||
License along with the GNU C Library. If not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <errno.h>
|
||||
#include <stddef.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/types.h>
|
||||
#include <sysdep.h>
|
||||
|
||||
/* Change the owner and group of FILE. */
|
||||
int
|
||||
|
@@ -16,10 +16,9 @@
|
||||
License along with the GNU C Library. If not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <limits.h>
|
||||
#include <unistd.h>
|
||||
#include <sysdep.h>
|
||||
|
||||
/* Duplicate FD to FD2, closing the old FD2 and making FD2 be
|
||||
open the same file as FD is. Return FD2 or -1. */
|
||||
|
@@ -16,11 +16,8 @@
|
||||
License along with the GNU C Library. If not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <stddef.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/epoll.h>
|
||||
#include <sysdep.h>
|
||||
|
||||
libc_hidden_proto (epoll_create)
|
||||
|
||||
|
@@ -16,11 +16,8 @@
|
||||
License along with the GNU C Library. If not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <stddef.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/inotify.h>
|
||||
#include <sysdep.h>
|
||||
|
||||
libc_hidden_proto (inotify_init)
|
||||
|
||||
|
@@ -16,11 +16,9 @@
|
||||
License along with the GNU C Library. If not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <errno.h>
|
||||
#include <stddef.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/types.h>
|
||||
#include <sysdep.h>
|
||||
|
||||
/* Change the owner and group of FILE. */
|
||||
int
|
||||
|
@@ -16,10 +16,9 @@
|
||||
License along with the GNU C Library. If not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <errno.h>
|
||||
#include <stddef.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <sysdep.h>
|
||||
|
||||
/* Make a link to FROM called TO. */
|
||||
int
|
||||
|
@@ -16,9 +16,8 @@
|
||||
License along with the GNU C Library. If not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <stddef.h>
|
||||
#include <sysdep.h>
|
||||
|
||||
/* Create a one-way communication channel (__pipe).
|
||||
If successful, two file descriptors are stored in PIPEDES;
|
||||
|
@@ -16,9 +16,9 @@
|
||||
License along with the GNU C Library. If not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <sysdep.h>
|
||||
|
||||
/* Read the contents of the symbolic link PATH into no more than
|
||||
LEN bytes of BUF. The contents are not null-terminated.
|
||||
|
@@ -16,11 +16,9 @@
|
||||
License along with the GNU C Library. If not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <errno.h>
|
||||
#include <stddef.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include <sysdep.h>
|
||||
|
||||
/* Remove the directory PATH. */
|
||||
int
|
||||
|
@@ -16,10 +16,9 @@
|
||||
License along with the GNU C Library. If not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <errno.h>
|
||||
#include <stddef.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <sysdep.h>
|
||||
|
||||
/* Make a link to FROM called TO. */
|
||||
int
|
||||
|
@@ -16,11 +16,9 @@
|
||||
License along with the GNU C Library. If not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <errno.h>
|
||||
#include <stddef.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include <sysdep.h>
|
||||
|
||||
/* Remove the link named NAME. */
|
||||
int
|
||||
|
@@ -16,10 +16,10 @@
|
||||
License along with the GNU C Library. If not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <errno.h>
|
||||
#include <sys/statfs.h>
|
||||
#include <kernel_stat.h>
|
||||
#include <stddef.h>
|
||||
#include <sysdep.h>
|
||||
|
||||
#if !STATFS_IS_STATFS64
|
||||
#include "overflow.h"
|
||||
|
@@ -19,6 +19,7 @@
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <sys/statfs.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
/* 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
|
||||
|
@@ -17,7 +17,9 @@
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <sys/sendfile.h>
|
||||
#include <stddef.h>
|
||||
#include <errno.h>
|
||||
#include <sysdep.h>
|
||||
|
||||
/* Send COUNT bytes from file associated with IN_FD starting at OFFSET to
|
||||
descriptor OUT_FD. */
|
||||
|
@@ -19,7 +19,7 @@
|
||||
#include <errno.h>
|
||||
#include <sys/statfs.h>
|
||||
#include <kernel_stat.h>
|
||||
#include <stddef.h>
|
||||
#include <sysdep.h>
|
||||
|
||||
#if !STATFS_IS_STATFS64
|
||||
#include "overflow.h"
|
||||
|
@@ -20,6 +20,7 @@
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <sysdep.h>
|
||||
|
||||
/* Write LENGTH bytes of randomness starting at BUFFER. Return 0 on
|
||||
success and -1 on failure. */
|
||||
|
@@ -16,9 +16,8 @@
|
||||
License along with the GNU C Library. If not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <errno.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/types.h>
|
||||
#include <sysdep.h>
|
||||
#include <shlib-compat.h>
|
||||
|
||||
#if !__RLIM_T_MATCHES_RLIM64_T
|
||||
|
@@ -18,6 +18,7 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <sysdep.h>
|
||||
#include <shlib-compat.h>
|
||||
|
||||
/* Add this redirection so the strong_alias for __RLIM_T_MATCHES_RLIM64_T
|
||||
|
@@ -16,15 +16,16 @@
|
||||
License along with the GNU C Library; if not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <time.h>
|
||||
#include <string.h>
|
||||
|
||||
/* Optimize the function call by setting the PLT directly to vDSO symbol. */
|
||||
#ifdef USE_IFUNC_GETTIMEOFDAY
|
||||
# include <time.h>
|
||||
# include <string.h>
|
||||
# include <sysdep.h>
|
||||
# include <sysdep-vdso.h>
|
||||
|
||||
# ifdef SHARED
|
||||
# include <dl-vdso.h>
|
||||
# include <dl-vdso.h>
|
||||
# include <libc-vdso.h>
|
||||
|
||||
static int
|
||||
|
@@ -28,6 +28,8 @@
|
||||
/* Defines RTLD_PRIVATE_ERRNO. */
|
||||
#include <dl-sysdep.h>
|
||||
|
||||
#include <tls.h>
|
||||
|
||||
/* In order to get __set_errno() definition in INLINE_SYSCALL. */
|
||||
#ifndef __ASSEMBLER__
|
||||
#include <errno.h>
|
||||
|
@@ -23,6 +23,7 @@
|
||||
#include <sigsetops.h>
|
||||
#include <stdbool.h>
|
||||
#include <limits.h>
|
||||
#include <stddef.h>
|
||||
#include <sysdep.h>
|
||||
|
||||
/* The signal used for asynchronous cancelation. */
|
||||
|
@@ -18,6 +18,8 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <sys/uio.h>
|
||||
#include <stdbool.h>
|
||||
#include <sysdep.h>
|
||||
|
||||
static bool
|
||||
writev_for_fatal (int fd, const struct iovec *iov, size_t niov, size_t total)
|
||||
|
@@ -26,6 +26,8 @@
|
||||
/* Defines RTLD_PRIVATE_ERRNO. */
|
||||
#include <dl-sysdep.h>
|
||||
|
||||
#include <tls.h>
|
||||
|
||||
/* In order to get __set_errno() definition in INLINE_SYSCALL. */
|
||||
#ifndef __ASSEMBLER__
|
||||
# include <errno.h>
|
||||
|
@@ -19,6 +19,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
#include <sysdep.h>
|
||||
|
||||
int
|
||||
__mknodat (int fd, const char *path, mode_t mode, dev_t dev)
|
||||
|
@@ -19,6 +19,7 @@
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include "netlinkaccess.h"
|
||||
|
@@ -17,6 +17,7 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <sysdep.h>
|
||||
#include <shlib-compat.h>
|
||||
|
||||
int __posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise);
|
||||
|
@@ -15,10 +15,8 @@
|
||||
License along with the GNU C Library; if not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <errno.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
#include <sysdep.h>
|
||||
|
||||
int
|
||||
prlimit (__pid_t pid, enum __rlimit_resource resource,
|
||||
|
@@ -17,7 +17,7 @@
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <sysdep.h>
|
||||
|
||||
ssize_t
|
||||
|
@@ -18,6 +18,7 @@
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/auxv.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
static long int linux_sysconf (int name);
|
||||
|
||||
|
@@ -19,7 +19,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <utmp.h>
|
||||
#include <errno.h>
|
||||
#include <libc-symbols.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "utmp32.h"
|
||||
#include "utmp-convert.h"
|
||||
|
@@ -19,7 +19,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <utmp.h>
|
||||
#include <errno.h>
|
||||
#include <libc-symbols.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "utmp32.h"
|
||||
#include "utmp-convert.h"
|
||||
|
@@ -17,9 +17,9 @@
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <sys/sem.h>
|
||||
#include <stddef.h>
|
||||
#include <ipc_priv.h>
|
||||
#include <sysdep.h>
|
||||
#include <errno.h>
|
||||
|
||||
/* Perform user-defined atomical operation of array of semaphores. */
|
||||
|
||||
|
@@ -16,9 +16,8 @@
|
||||
License along with the GNU C Library. If not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <errno.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/types.h>
|
||||
#include <sysdep.h>
|
||||
#include <shlib-compat.h>
|
||||
|
||||
#if !__RLIM_T_MATCHES_RLIM64_T
|
||||
|
@@ -18,6 +18,7 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <sysdep.h>
|
||||
#include <shlib-compat.h>
|
||||
|
||||
/* Add this redirection so the strong_alias for __RLIM_T_MATCHES_RLIM64_T
|
||||
|
@@ -18,6 +18,7 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <sys/time.h>
|
||||
#include <stddef.h>
|
||||
#include <sysdep.h>
|
||||
|
||||
/* Set the system-wide timezone.
|
||||
|
@@ -16,9 +16,10 @@
|
||||
License along with the GNU C Library; if not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <sys/msg.h>
|
||||
#include <stddef.h>
|
||||
#include <ipc_priv.h>
|
||||
#include <sysdep.h>
|
||||
#include <errno.h>
|
||||
|
||||
/* Return an identifier for an shared memory segment of at least size SIZE
|
||||
which is associated with KEY. */
|
||||
|
@@ -19,6 +19,8 @@
|
||||
#ifndef _SYS_SOCKETCALL_H
|
||||
#define _SYS_SOCKETCALL_H 1
|
||||
|
||||
#include <sysdep.h>
|
||||
|
||||
/* Define unique numbers for the operations permitted on socket. Linux
|
||||
uses a single system call for all these functions. The relevant code
|
||||
file is /usr/include/linux/net.h.
|
||||
|
@@ -19,7 +19,7 @@
|
||||
#include <stddef.h>
|
||||
#include <errno.h>
|
||||
#include <termios.h>
|
||||
|
||||
#include <sysdep.h>
|
||||
|
||||
/* 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
|
||||
|
@@ -18,7 +18,7 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <sysdep.h>
|
||||
#include "statx_generic.c"
|
||||
|
||||
int
|
||||
|
@@ -17,6 +17,7 @@
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <errno.h>
|
||||
#include <stddef.h>
|
||||
#include <shlib-compat.h>
|
||||
|
||||
#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_32)
|
||||
|
@@ -20,6 +20,7 @@
|
||||
|
||||
#include <bits/wordsize.h>
|
||||
#include <kernel-features.h>
|
||||
#include <endian.h>
|
||||
#include <errno.h>
|
||||
|
||||
#undef INTERNAL_SYSCALL_ERROR_P
|
||||
|
@@ -17,7 +17,6 @@
|
||||
|
||||
#include <unistd.h>
|
||||
#include <sysdep.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifndef __NR_truncate64
|
||||
# define __NR_truncate64 __NR_truncate
|
||||
|
@@ -23,7 +23,7 @@
|
||||
#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_28)
|
||||
|
||||
# include <sysdep.h>
|
||||
# include <errno.h>
|
||||
# include <sys/types.h>
|
||||
|
||||
# ifndef DEV_TO_KDEV
|
||||
# define DEV_TO_KDEV(__dev) \
|
||||
|
@@ -19,6 +19,7 @@
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <sysdep.h>
|
||||
#include <shlib-compat.h>
|
||||
|
||||
#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
|
||||
|
@@ -17,6 +17,7 @@
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
#include <sysdep.h>
|
||||
#include <shlib-compat.h>
|
||||
|
||||
#if SHLIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33)
|
||||
|
@@ -19,6 +19,7 @@
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
#include <kernel_stat.h>
|
||||
#include <sysdep.h>
|
||||
|
||||
#if STAT_IS_KERNEL_STAT
|
||||
|
||||
|
Reference in New Issue
Block a user