]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Remove tls.h inclusion from internal errno.h
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 4 Feb 2020 13:29:04 +0000 (10:29 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 13 Nov 2020 15:59:19 +0000 (12:59 -0300)
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.

71 files changed:
include/errno.h
io/lchmod.c
malloc/reallocarray.c
misc/ustat.c
nss/nss_fgetent_r.c
posix/execl.c
posix/execle.c
posix/execlp.c
posix/spawn_faction_addchdir.c
pwd/putpwent.c
signal/sigempty.c
signal/sigismem.c
sysdeps/generic/internal-signals.h
sysdeps/ieee754/ldbl-128ibm/mpn2ldbl.c
sysdeps/mach/hurd/mmap64.c
sysdeps/mach/hurd/waitid.c
sysdeps/microblaze/backtrace.c
sysdeps/nptl/futex-internal.h
sysdeps/unix/sysv/linux/adjtime.c
sysdeps/unix/sysv/linux/clock_getcpuclockid.c
sysdeps/unix/sysv/linux/faccessat.c
sysdeps/unix/sysv/linux/ftime.c
sysdeps/unix/sysv/linux/ftruncate64.c
sysdeps/unix/sysv/linux/generic/chmod.c
sysdeps/unix/sysv/linux/generic/chown.c
sysdeps/unix/sysv/linux/generic/dup2.c
sysdeps/unix/sysv/linux/generic/epoll_create.c
sysdeps/unix/sysv/linux/generic/inotify_init.c
sysdeps/unix/sysv/linux/generic/lchown.c
sysdeps/unix/sysv/linux/generic/link.c
sysdeps/unix/sysv/linux/generic/pipe.c
sysdeps/unix/sysv/linux/generic/readlink.c
sysdeps/unix/sysv/linux/generic/rmdir.c
sysdeps/unix/sysv/linux/generic/symlink.c
sysdeps/unix/sysv/linux/generic/unlink.c
sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c
sysdeps/unix/sysv/linux/generic/wordsize-32/overflow.h
sysdeps/unix/sysv/linux/generic/wordsize-32/sendfile.c
sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c
sysdeps/unix/sysv/linux/getentropy.c
sysdeps/unix/sysv/linux/getrlimit.c
sysdeps/unix/sysv/linux/getrlimit64.c
sysdeps/unix/sysv/linux/gettimeofday.c
sysdeps/unix/sysv/linux/hppa/sysdep.h
sysdeps/unix/sysv/linux/internal-signals.h
sysdeps/unix/sysv/linux/libc_fatal.c
sysdeps/unix/sysv/linux/microblaze/sysdep.h
sysdeps/unix/sysv/linux/mknodat.c
sysdeps/unix/sysv/linux/netlink_assert_response.c
sysdeps/unix/sysv/linux/posix_fadvise64.c
sysdeps/unix/sysv/linux/prlimit.c
sysdeps/unix/sysv/linux/readahead.c
sysdeps/unix/sysv/linux/riscv/sysconf.c
sysdeps/unix/sysv/linux/s390/s390-32/utmp32.c
sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.c
sysdeps/unix/sysv/linux/semop.c
sysdeps/unix/sysv/linux/setrlimit.c
sysdeps/unix/sysv/linux/setrlimit64.c
sysdeps/unix/sysv/linux/settimezone.c
sysdeps/unix/sysv/linux/shmget.c
sysdeps/unix/sysv/linux/socketcall.h
sysdeps/unix/sysv/linux/speed.c
sysdeps/unix/sysv/linux/statx.c
sysdeps/unix/sysv/linux/sysctl.c
sysdeps/unix/sysv/linux/sysdep.h
sysdeps/unix/sysv/linux/truncate64.c
sysdeps/unix/sysv/linux/ustat.c
sysdeps/unix/sysv/linux/xmknod.c
sysdeps/unix/sysv/linux/xmknodat.c
sysdeps/unix/sysv/linux/xstatconv.c
sysdeps/x86_64/stackinfo.h

index 457114b27a77868b2913825e4d9d77e792fb4a8d..c361a785c24b928fd3f6b58ef11090b0efb9390b 100644 (file)
@@ -22,8 +22,6 @@ extern int rtld_errno attribute_hidden;
 
 # elif IS_IN_LIB && !IS_IN (rtld)
 
-#  include <tls.h>
-
 #  undef  errno
 #  if IS_IN (libc)
 #   define errno __libc_errno
index 8b788034ee382630c070d9f4a163b8594c9bffee..3a0f714576c321801c10f082caa6f216e686d7b9 100644 (file)
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
-#include <errno.h>
 #include <fcntl.h>
-#include <sys/types.h>
-#include <unistd.h>
+#include <sys/stat.h>
 
 /* Change the protections of FILE to MODE.  */
 int
index aca689e2c5bb153d66523e5fe1d58e215dd4d15b..20b02152208332ca522a3048a6f6edb5a2da9990 100644 (file)
@@ -17,6 +17,7 @@
    not, see <https://www.gnu.org/licenses/>.  */
 
 #include <errno.h>
+#include <stdlib.h>
 #include <malloc.h>
 
 void *
index a1b057f640b7b58e4bfca7afa0b32365032994dd..ad75c5c1bfb5e6b54371b2835a4bca6a4b1ec2fd 100644 (file)
@@ -23,6 +23,7 @@
 
 # include <unistd.h>
 # include <errno.h>
+# include <sys/types.h>
 
 struct ustat
  {
index 8f7c5b5cc7dae1a4a658585a0dde79c25a8803dc..7fecde7e8fe7c259a2927018f79176c838cd2f59 100644 (file)
@@ -18,6 +18,7 @@
 
 #include <errno.h>
 #include <nss_files.h>
+#include <stdbool.h>
 
 int
 __nss_fgetent_r (FILE *fp, void *result, char *buffer, size_t buffer_length,
index 8d319a4528652e3d9f61f047b3908bd8064b82ff..61aef661263d60588a9bdde68d9f979de08ad2f3 100644 (file)
@@ -19,6 +19,7 @@
 #include <errno.h>
 #include <stdarg.h>
 #include <sys/param.h>
+#include <stddef.h>
 
 /* Execute PATH with all arguments after PATH until
    a NULL pointer and environment from `environ'.  */
index 7539ce6b8de37f74f6e6c994c15ec277a45860d3..f6608ee11280588b381bc56677cfe7214085dd61 100644 (file)
@@ -19,6 +19,7 @@
 #include <stdarg.h>
 #include <errno.h>
 #include <sys/param.h>
+#include <stddef.h>
 
 /* Execute PATH with all arguments after PATH until a NULL pointer,
    and the argument after that for environment.  */
index 9eaca5fd253b1a620b85952c785827424b5ae606..476196217662f3e066659d825c9bb9075b7a5ca0 100644 (file)
@@ -19,6 +19,7 @@
 #include <stdarg.h>
 #include <errno.h>
 #include <sys/param.h>
+#include <stddef.h>
 
 /* Execute FILE, searching in the `PATH' environment variable if
    it contains no slashes, with all arguments after FILE until a
index 6558628547f025ea675a2c18471d12da6e125e6c..20a3ba92ab7087d6b257f716b32e004721d8354c 100644 (file)
@@ -19,7 +19,7 @@
 #include <errno.h>
 #include <spawn.h>
 #include <string.h>
-
+#include <stdlib.h>
 #include "spawn_int.h"
 
 int
index a6673acbf2e4b752fc7ed9f85e2e4c2103bf7dee..baf312a6fe162c4a04f8ee0d0bd3086e1e109e09 100644 (file)
@@ -18,6 +18,7 @@
 #include <errno.h>
 #include <stdio.h>
 #include <pwd.h>
+#include <stdlib.h>
 #include <nss.h>
 
 #define _S(x)  x ?: ""
index 31b11450271f400a5f84c97770f69f19c1599294..01848c82d5757d34ef1d4bdac3847351a1744fcf 100644 (file)
@@ -18,6 +18,7 @@
 #include <errno.h>
 #include <signal.h>
 #include <sigsetops.h>
+#include <stddef.h>
 
 /* Clear all signals from SET.  */
 int
index 728d58f7a392d18e0c7612f1df32ede957fea244..c788ca83b126be7af61ceb5d9549dcb3ec70a2c9 100644 (file)
@@ -17,6 +17,7 @@
 
 #include <errno.h>
 #include <signal.h>
+#include <stddef.h>
 #include <sigsetops.h>
 
 /* Return 1 if SIGNO is in SET, 0 if not.  */
index 73a0c29d8275bc158c7983063510964aaec98a6f..cd675e4fd4a3c113a4686226ff820e199cbf66f2 100644 (file)
@@ -22,6 +22,7 @@
 #include <signal.h>
 #include <sigsetops.h>
 #include <stdbool.h>
+#include <stddef.h>
 
 static inline bool
 __is_internal_signal (int sig)
index f77253e5203b2966ff143fb3a71a38c888083b8f..6ced407e2669d56a692be5bf89aa5d14d5902c78 100644 (file)
@@ -20,9 +20,6 @@
 #include <float.h>
 #include <math.h>
 
-/* Need to set this when including gmp headers after system headers.  */
-#define HAVE_ALLOCA 1
-
 #include "gmp.h"
 #include "gmp-impl.h"
 
index 6d8566b5b1a0ed0ac5ec45cb43c24f3f8df3ec5e..23d7ca7f34e494e8ea4b441c6c4c24294b92878e 100644 (file)
@@ -18,6 +18,7 @@
 #include <errno.h>
 #include <sys/mman.h>
 #include <sys/types.h>
+#include <mach/port.h>
 
 /* Map addresses starting near ADDR and extending for LEN bytes.  From
    OFFSET into the file FD describes according to PROT and FLAGS.  If ADDR
index dce72339dd7619eb213be452fd087b1a2378fc12..044a1dd8e3c39a2e082cfa0d0943514a9d636e59 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <errno.h>
 #include <sys/wait.h>
+#include <stddef.h>
 
 int
 __waitid (idtype_t idtype, id_t id, siginfo_t *infop, int options)
index 8af5a4d7f51dcbd608dd7c2dc1e59cc6571cbad9..f4a4b69df5c9605744239e1e027bf560211ec7ed 100644 (file)
@@ -17,6 +17,7 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 #include <sysdep.h>
 #include <signal.h>
index cd356e4fa83b9231472fd82ce6dc441de5d515f6..c27d0cdac8d8e20c4cf155b439a139c7b69fd0cd 100644 (file)
@@ -23,6 +23,7 @@
 #include <sys/time.h>
 #include <stdio.h>
 #include <stdbool.h>
+#include <lowlevellock-futex.h>
 #include <libc-diag.h>
 
 /* This file defines futex operations used internally in glibc.  A futex
index 6d1d1b6af2890d078ee2025c809de70750f5d740..8e7c8cc5da55461f66fb8724b7cd01a38eda3c23 100644 (file)
@@ -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)
index 7d2e6d6bfe3fe39c88f90a9336a5aaf618f18615..1eb780a164c14a5929ac1d23ab27558f646314b1 100644 (file)
@@ -20,6 +20,7 @@
 #include <time.h>
 #include <unistd.h>
 #include "kernel-posix-cpu-timers.h"
+#include <sysdep.h>
 #include <shlib-compat.h>
 
 int
index b697053da1cfd36b48f20a3611fa88231e7974eb..5d078371b5f9cce19935ab6c12078067d37b8aa0 100644 (file)
    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>
 
 
index 1755fcf9675a71d4790d5b52c7cd3a195cebe55c..2f43b7650d0a3207cbbe2b3abf66099451a68d92 100644 (file)
@@ -18,6 +18,7 @@
 
 #include <features.h>
 #include <sys/timeb.h>
+#include <time.h>
 #include <errno.h>
 
 int
index 606a0e86e09f653dfe3916c03b405bda7bedca88..3d43a5a90f7233a4a15caf325f41f03e958d0abe 100644 (file)
@@ -17,7 +17,6 @@
 
 #include <unistd.h>
 #include <sysdep.h>
-#include <errno.h>
 
 #ifndef __NR_ftruncate64
 # define __NR_ftruncate64 __NR_ftruncate
index b9631a9103b83f1c029d33db1b4e0c8bb2c38a6a..802e4006eeece1bccf7bebf057d7027f5233cf77 100644 (file)
    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
index d676eefab4183ecdb486c56cc2ea83db7856fdd3..57a81834dba947545262df3d9e99987acbb98164 100644 (file)
    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
index 32592f9450415775ee816e2065eff43e7ed21cb2..dfa348b375c4b3f506869c8f3e76dbe2849b72cf 100644 (file)
    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.  */
index e3eac4a7ac76565dba932c8fd60ed22985874464..1715c6d9bf622868c2c06dd2899fec9116dd6620 100644 (file)
    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)
 
index 7f841248503c02d5cf9e2f91c711d464e6f47d25..25a323f7e737693c1aa8d8b651288fb4408f0a16 100644 (file)
    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)
 
index a483241fd369feb6e26ea80569adaba3216bc486..379079e8cafa39c1449db27b505e9cd4cc1d5fc4 100644 (file)
    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
index a038ba140854dcaef1e46cdc8af426bf4c28f55c..1baa6b5e6a756c0a5a9749aa4abbbee01d674a8c 100644 (file)
    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
index 5d4a95f3e7b0a9655db987b19ce01357a17011f2..52f3231cb8f71dedacca538ff2db1f1bdf803647 100644 (file)
@@ -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;
index 721f84e3dde3a28f04da00b2525918d8f17a70b7..6f690a9750664ef8b34e1e7ef9828a4741d04bfe 100644 (file)
@@ -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.
index e357a10e8d4f1b533b30483fbd39d901d45db436..f9d721f3db36d4b5c30ed5aa425966ed8faa56a9 100644 (file)
    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
index cddc11acf031543c14b3bb99b9c6292031d36e66..2c358f54c9ff04899bf539e08ba256408e0b8b62 100644 (file)
    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
index 7908d0a5760bc652afc63b2bffcc80a3828ad649..8df55753a02ed23e88fb255909e294e6f06de0ee 100644 (file)
    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
index 93d9d94a0a61daac689380c6cdb977d707798ac6..f80b56b3038513624209250991105f7e42793da1 100644 (file)
    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"
index c5e028625ab1b87d39c8d9d991b521cd7a214baa..e200f6319ba1b2065bb11c3f1d8fcb651fbc6404 100644 (file)
@@ -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
index c556a37cd4c1a5dc83c293cce36c58cd6df964b7..72e2d49d1a08de2deeb182ccd83200a44e4f3943 100644 (file)
@@ -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.  */
index 7421501b4a40b171fff10c6b2a7ff42f6c6256e1..4484341075cb2189f708e5ae92577079599948c6 100644 (file)
@@ -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"
index 2f3a4e469206e3b6ed9dc54e97fd569b9bc561c0..02cf46ff42d05675db1e89f7384339fd70182034 100644 (file)
@@ -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.  */
index ecb34dd7425a91b9242f85cdad651a0455ebca87..339d943bd26979f1bef9cfc6d74e4d8c9ef6b859 100644 (file)
@@ -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
index 0f9a2f493635650951506384d3d2cacf9feaa69e..e06ffd1a16bb924f2c7eeec25b65d7c26af088a9 100644 (file)
@@ -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
index cb57bc9cf2520258293a4e399b7157d89f17bd67..1c92e6d64357893c541117538f490b9203e4e18e 100644 (file)
    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
index 7f8da30d23eb0c28379d8e63824889e35846bfcc..531fe2beed033f974f1c9ed5fcda67800654f7a8 100644 (file)
@@ -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>
index 35f2de04c525835b2ad09abd5f024406d8396b59..8455ca8de10526971d5cd266b3b811cadd8e82a9 100644 (file)
@@ -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.  */
index 7e22c0fc32900d92a2e7c837fb2071dea1b0ae5a..6f568eed5165e44b8e7fade766ddcc7d3f28d21f 100644 (file)
@@ -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)
index d500172114991d1139f818bff040eaa7c401dc43..6fd96adbf0f249d7cc86dff63a9cc5b67ef7d021 100644 (file)
@@ -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>
index fdb8f1951a3d3cc625e57856e764db82e785d097..279a4404f5c07ee2aedfff0de612f991427f9582 100644 (file)
@@ -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)
index 5fc0920bb049009894351736c9eabbbc97e7e950..5bacf7377f080f2b991b6b83c0f722cf4be2c858 100644 (file)
@@ -19,6 +19,7 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <stdio.h>
+#include <stdbool.h>
 #include <sys/socket.h>
 
 #include "netlinkaccess.h"
index 9787ab4c7cfcabc798c39927596b9458bcc66a66..7323c82a0725c2473c343586a14969a2ee251bcb 100644 (file)
@@ -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);
index aa74a52eb7c192c88d53c19b6147cf9f654d6613..e12eb4e9bca8a1779e0c6930bd901c6f75c25dff 100644 (file)
    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,
index a189c3ac79c9cd641a517b932fa3f97cf58d66fe..ad01a0aed8cc33fe28124c6f2cf3bd6629a082b8 100644 (file)
@@ -17,7 +17,7 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include <fcntl.h>
-#include <errno.h>
+#include <sys/types.h>
 #include <sysdep.h>
 
 ssize_t
index 02b469cc65bbfedd5a633d7f4aba2d8d76df6513..5a99577332997f253137fd5965f25f14aeaa8d25 100644 (file)
@@ -18,6 +18,7 @@
 #include <errno.h>
 #include <unistd.h>
 #include <sys/auxv.h>
+#include <stdbool.h>
 
 static long int linux_sysconf (int name);
 
index e4b82512f65272a28fcd7528a5197643072d8551..fa4b244728300ce8f5903d205276a72b61e93e77 100644 (file)
@@ -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"
index 3f78fa62dbabcb716767d11b309233ff1b0aa9b4..bdfe396d59f168582018efbca3907cc83e041961 100644 (file)
@@ -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"
index e955f0cd31f19466b316c02671f3c04f9bace55b..ab790ea40f0341ee1a56b8a324ed2d57b0ff69e7 100644 (file)
@@ -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.  */
 
index 8611d577a4723cc23a14d370b0af4f0a52a0e468..6648fad5c0f282d1ee09a95b1acaa8154480e980 100644 (file)
@@ -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
index e4c5bab437d134ef47f39afbdb961d7e47e88b38..02c94e3c73d4294be58b8331bbf3d29830fd41c9 100644 (file)
@@ -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
index fa463866f39a0b749d5df202648b9b4fa50a109b..163956275f8f26ea9ffd247f1c7eabe08736fdf2 100644 (file)
@@ -18,6 +18,7 @@
 
 #include <errno.h>
 #include <sys/time.h>
+#include <stddef.h>
 #include <sysdep.h>
 
 /* Set the system-wide timezone.
index 71de81c365527857b204927ca12a08f3e619e69f..6ea788351b37bcce5c1b1e8fbac587eb4967bedf 100644 (file)
    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.  */
index 75c2a6404d5244b2046a36af391f19adf2b28056..b9975f92b4328b813b96fb8a8826b98ae158616a 100644 (file)
@@ -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.
index c02a06a379c46c6c3863de398860da809abbdc55..d7d74ddb67a82b59ebe7a68ec63094ac4fa3aca1 100644 (file)
@@ -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
index 9721fc12a5592c3dcda6de8a693c03f68742e122..cea6eefb7e3953ea421728a9d9b94a15dd66a6b7 100644 (file)
@@ -18,7 +18,7 @@
 
 #include <errno.h>
 #include <sys/stat.h>
-
+#include <sysdep.h>
 #include "statx_generic.c"
 
 int
index 389b9582269fd174fa0bb5b3e018a0c4c27f0022..479ba386bdb55152976d6986b1dcae7a24b65f15 100644 (file)
@@ -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)
index 5e7b6c57657b4e106452e17ea3f252e1f6e44522..71ecc19cd53cc0fd89b01847b670d534c0488d0d 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <bits/wordsize.h>
 #include <kernel-features.h>
+#include <endian.h>
 #include <errno.h>
 
 #undef INTERNAL_SYSCALL_ERROR_P
index d4b46574dceab2c1729eabafdf06c32ecd88146b..ac43a2b5422973ed7df87c91daf7c454e1b789fe 100644 (file)
@@ -17,7 +17,6 @@
 
 #include <unistd.h>
 #include <sysdep.h>
-#include <errno.h>
 
 #ifndef __NR_truncate64
 # define __NR_truncate64 __NR_truncate
index 51f20a2a732529bbff9cb0594e9fec504346a733..e38b7927056acfe32baa89f1af385307588dbd44 100644 (file)
@@ -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)                                   \
index 82bb0bd953259733c0f51b99e422e99e20340241..10e874a514782e2925e44c2a951e14fac5a33d25 100644 (file)
@@ -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)
index fae3fe54d119af6bb7905adc5d9f4ef84facacd5..17ffea16c9671a6f8da4b76c356be23f7909c651 100644 (file)
@@ -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)
index 3622a82cd099875b4f1adcceff1eddb865133d3a..b100e0778301b81d2ab4fbd104f8674295d6ac11 100644 (file)
@@ -19,6 +19,7 @@
 #include <errno.h>
 #include <sys/stat.h>
 #include <kernel_stat.h>
+#include <sysdep.h>
 
 #if STAT_IS_KERNEL_STAT
 
index 7bcb3b1499af3a2dad88e4d665bebb9081703806..4a4e54cd767c0ab2c141b64937cf95796dec3fd7 100644 (file)
 
 #include <elf.h>
 
+#ifdef __ILP32__
+# define RSP_REG "esp"
+#else
+# define RSP_REG "rsp"
+#endif
+
 /* On x86_64 the stack grows down.  */
 #define _STACK_GROWS_DOWN      1
 
    for which they need to act as barriers as well, hence the additional
    (unnecessary) parameters.  */
 #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) \
   ({ ptrdiff_t d__;                                            \
-     asm volatile ("sub %%" RSP_LP " , %0" : "=r" (d__) : "0" (ptr));  \
+     asm volatile ("sub %%" RSP_REG " , %0" : "=r" (d__) : "0" (ptr)); \
      d__; })
 
 #endif /* stackinfo.h */