From patchwork Mon Nov 9 20:18:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 40984 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E01963973016; Mon, 9 Nov 2020 20:18:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E01963973016 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1604953125; bh=RtnMgyBnLrCaoYGBdYIG/7FxutgZ4VoQaejzJZdlRHI=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=vhsE3kH2IleRKoZFjZw/upUNaouCL5JXWARklfq2HY49RguaaEDLQi3MXhM4lPu3l Zzt8l14V7/4YO/pJYGY/fUkmoxR1KsdfEv3IOnkYe3ro0ten59bFsRNLrUwMrCWJPN eLglOsQMQF8d9gf6vXHSlaaIZ55cUTEaKeWWn2zM= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) by sourceware.org (Postfix) with ESMTPS id CC983396ECAD for ; Mon, 9 Nov 2020 20:18:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CC983396ECAD Received: by mail-qk1-x741.google.com with SMTP id q5so5050377qkc.12 for ; Mon, 09 Nov 2020 12:18:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RtnMgyBnLrCaoYGBdYIG/7FxutgZ4VoQaejzJZdlRHI=; b=kMvN2ldNsU8dip9BKF25L8n+RGBK+FOPnvU3KuITBV/nwUTB3SFtdUIl6sI5EbrtG0 Egu530i57j1BxIM4qS53RGFzlDmJADLk2wHGWRE7TZYsIsf5Qdip5LHepaRRbs28s2mK 6uFSSCJqQxdI7tV/FpRMpqx/qED53x6ze2cF9axH8qFnvpxWkSCa5RMxVfulLrv2NUEl aB4pepbXosHxKopkM1VE4G4fJ/mkGbedyskEAvbZ4bIHO1PIY4JefIxzVAiWxEQ2n0xB 7UkM4wL817MM5/8IPMu5qQFqkW31SlgC0yy91hRq6r+vEk2CIrTB2Ilik9K8buoBQYCk 8ssw== X-Gm-Message-State: AOAM532Cat23ON2ipa8e6EXfo6FBqobJXdeL7M4ncHpUpoqVxdHcCPVB xViPGPZ/ukOrIdmRdgJYr6KzPw6I5vd+lw== X-Google-Smtp-Source: ABdhPJzEjhHatjuo6ZI8NXBC1l0fefbf9ZRXw92f956e5Sy0JZkITY/cRzzU4QD2n6zYAWzzfKiYIQ== X-Received: by 2002:a37:ac02:: with SMTP id e2mr10978455qkm.243.1604953119253; Mon, 09 Nov 2020 12:18:39 -0800 (PST) Received: from localhost.localdomain ([177.194.48.209]) by smtp.googlemail.com with ESMTPSA id z2sm6843407qkl.22.2020.11.09.12.18.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Nov 2020 12:18:38 -0800 (PST) To: libc-alpha@sourceware.org Subject: [PATCH 03/23] Remove tls.h inclusion from internal errno.h Date: Mon, 9 Nov 2020 17:18:06 -0300 Message-Id: <20201109201826.120534-4-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201109201826.120534-1-adhemerval.zanella@linaro.org> References: <20201109201826.120534-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-14.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" 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. --- include/errno.h | 2 -- io/lchmod.c | 4 +--- malloc/reallocarray.c | 1 + misc/ustat.c | 1 + nss/nss_fgetent_r.c | 1 + posix/execl.c | 1 + posix/execle.c | 1 + posix/execlp.c | 1 + posix/spawn_faction_addchdir.c | 2 +- pwd/putpwent.c | 1 + signal/sigempty.c | 1 + signal/sigismem.c | 1 + sysdeps/generic/internal-signals.h | 1 + sysdeps/ieee754/ldbl-128ibm/mpn2ldbl.c | 3 --- sysdeps/mach/hurd/mmap64.c | 1 + sysdeps/mach/hurd/waitid.c | 1 + sysdeps/microblaze/backtrace.c | 1 + sysdeps/nptl/futex-internal.h | 1 + sysdeps/unix/sysv/linux/adjtime.c | 1 + sysdeps/unix/sysv/linux/clock_getcpuclockid.c | 1 + sysdeps/unix/sysv/linux/faccessat.c | 6 +----- sysdeps/unix/sysv/linux/ftime.c | 1 + sysdeps/unix/sysv/linux/ftruncate64.c | 1 - sysdeps/unix/sysv/linux/generic/chmod.c | 4 +--- sysdeps/unix/sysv/linux/generic/chown.c | 4 +--- sysdeps/unix/sysv/linux/generic/dup2.c | 3 +-- sysdeps/unix/sysv/linux/generic/epoll_create.c | 5 +---- sysdeps/unix/sysv/linux/generic/inotify_init.c | 5 +---- sysdeps/unix/sysv/linux/generic/lchown.c | 4 +--- sysdeps/unix/sysv/linux/generic/link.c | 3 +-- sysdeps/unix/sysv/linux/generic/pipe.c | 3 +-- sysdeps/unix/sysv/linux/generic/readlink.c | 2 +- sysdeps/unix/sysv/linux/generic/rmdir.c | 4 +--- sysdeps/unix/sysv/linux/generic/symlink.c | 3 +-- sysdeps/unix/sysv/linux/generic/unlink.c | 4 +--- sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c | 2 +- sysdeps/unix/sysv/linux/generic/wordsize-32/overflow.h | 1 + sysdeps/unix/sysv/linux/generic/wordsize-32/sendfile.c | 2 ++ sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c | 2 +- sysdeps/unix/sysv/linux/getentropy.c | 1 + sysdeps/unix/sysv/linux/getrlimit.c | 3 +-- sysdeps/unix/sysv/linux/getrlimit64.c | 1 + sysdeps/unix/sysv/linux/gettimeofday.c | 7 ++++--- sysdeps/unix/sysv/linux/hppa/sysdep.h | 2 ++ sysdeps/unix/sysv/linux/internal-signals.h | 1 + sysdeps/unix/sysv/linux/libc_fatal.c | 2 ++ sysdeps/unix/sysv/linux/microblaze/sysdep.h | 2 ++ sysdeps/unix/sysv/linux/mknodat.c | 1 + sysdeps/unix/sysv/linux/netlink_assert_response.c | 1 + sysdeps/unix/sysv/linux/posix_fadvise64.c | 1 + sysdeps/unix/sysv/linux/prlimit.c | 4 +--- sysdeps/unix/sysv/linux/readahead.c | 2 +- sysdeps/unix/sysv/linux/s390/s390-32/utmp32.c | 2 +- sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.c | 2 +- sysdeps/unix/sysv/linux/semop.c | 2 +- sysdeps/unix/sysv/linux/setrlimit.c | 3 +-- sysdeps/unix/sysv/linux/setrlimit64.c | 1 + sysdeps/unix/sysv/linux/settimezone.c | 1 + sysdeps/unix/sysv/linux/shmget.c | 3 ++- sysdeps/unix/sysv/linux/socketcall.h | 2 ++ sysdeps/unix/sysv/linux/speed.c | 2 +- sysdeps/unix/sysv/linux/statx.c | 2 +- sysdeps/unix/sysv/linux/sysctl.c | 1 + sysdeps/unix/sysv/linux/sysdep.h | 1 + sysdeps/unix/sysv/linux/truncate64.c | 1 - sysdeps/unix/sysv/linux/ustat.c | 2 +- sysdeps/unix/sysv/linux/xmknod.c | 1 + sysdeps/unix/sysv/linux/xmknodat.c | 1 + sysdeps/unix/sysv/linux/xstatconv.c | 1 + sysdeps/x86_64/stackinfo.h | 10 ++++++++-- 70 files changed, 82 insertions(+), 70 deletions(-) diff --git a/include/errno.h b/include/errno.h index 457114b27a..c361a785c2 100644 --- a/include/errno.h +++ b/include/errno.h @@ -22,8 +22,6 @@ extern int rtld_errno attribute_hidden; # elif IS_IN_LIB && !IS_IN (rtld) -# include - # undef errno # if IS_IN (libc) # define errno __libc_errno diff --git a/io/lchmod.c b/io/lchmod.c index 8b788034ee..3a0f714576 100644 --- a/io/lchmod.c +++ b/io/lchmod.c @@ -16,10 +16,8 @@ License along with the GNU C Library; if not, see . */ -#include #include -#include -#include +#include /* Change the protections of FILE to MODE. */ int diff --git a/malloc/reallocarray.c b/malloc/reallocarray.c index aca689e2c5..20b0215220 100644 --- a/malloc/reallocarray.c +++ b/malloc/reallocarray.c @@ -17,6 +17,7 @@ not, see . */ #include +#include #include void * diff --git a/misc/ustat.c b/misc/ustat.c index a1b057f640..ad75c5c1bf 100644 --- a/misc/ustat.c +++ b/misc/ustat.c @@ -23,6 +23,7 @@ # include # include +# include struct ustat { diff --git a/nss/nss_fgetent_r.c b/nss/nss_fgetent_r.c index 8f7c5b5cc7..7fecde7e8f 100644 --- a/nss/nss_fgetent_r.c +++ b/nss/nss_fgetent_r.c @@ -18,6 +18,7 @@ #include #include +#include int __nss_fgetent_r (FILE *fp, void *result, char *buffer, size_t buffer_length, diff --git a/posix/execl.c b/posix/execl.c index 8d319a4528..61aef66126 100644 --- a/posix/execl.c +++ b/posix/execl.c @@ -19,6 +19,7 @@ #include #include #include +#include /* Execute PATH with all arguments after PATH until a NULL pointer and environment from `environ'. */ diff --git a/posix/execle.c b/posix/execle.c index 7539ce6b8d..f6608ee112 100644 --- a/posix/execle.c +++ b/posix/execle.c @@ -19,6 +19,7 @@ #include #include #include +#include /* Execute PATH with all arguments after PATH until a NULL pointer, and the argument after that for environment. */ diff --git a/posix/execlp.c b/posix/execlp.c index 9eaca5fd25..4761962176 100644 --- a/posix/execlp.c +++ b/posix/execlp.c @@ -19,6 +19,7 @@ #include #include #include +#include /* Execute FILE, searching in the `PATH' environment variable if it contains no slashes, with all arguments after FILE until a diff --git a/posix/spawn_faction_addchdir.c b/posix/spawn_faction_addchdir.c index 6558628547..20a3ba92ab 100644 --- a/posix/spawn_faction_addchdir.c +++ b/posix/spawn_faction_addchdir.c @@ -19,7 +19,7 @@ #include #include #include - +#include #include "spawn_int.h" int diff --git a/pwd/putpwent.c b/pwd/putpwent.c index a6673acbf2..baf312a6fe 100644 --- a/pwd/putpwent.c +++ b/pwd/putpwent.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #define _S(x) x ?: "" diff --git a/signal/sigempty.c b/signal/sigempty.c index 31b1145027..01848c82d5 100644 --- a/signal/sigempty.c +++ b/signal/sigempty.c @@ -18,6 +18,7 @@ #include #include #include +#include /* Clear all signals from SET. */ int diff --git a/signal/sigismem.c b/signal/sigismem.c index 728d58f7a3..c788ca83b1 100644 --- a/signal/sigismem.c +++ b/signal/sigismem.c @@ -17,6 +17,7 @@ #include #include +#include #include /* Return 1 if SIGNO is in SET, 0 if not. */ diff --git a/sysdeps/generic/internal-signals.h b/sysdeps/generic/internal-signals.h index 73a0c29d82..cd675e4fd4 100644 --- a/sysdeps/generic/internal-signals.h +++ b/sysdeps/generic/internal-signals.h @@ -22,6 +22,7 @@ #include #include #include +#include static inline bool __is_internal_signal (int sig) diff --git a/sysdeps/ieee754/ldbl-128ibm/mpn2ldbl.c b/sysdeps/ieee754/ldbl-128ibm/mpn2ldbl.c index f77253e520..6ced407e26 100644 --- a/sysdeps/ieee754/ldbl-128ibm/mpn2ldbl.c +++ b/sysdeps/ieee754/ldbl-128ibm/mpn2ldbl.c @@ -20,9 +20,6 @@ #include #include -/* Need to set this when including gmp headers after system headers. */ -#define HAVE_ALLOCA 1 - #include "gmp.h" #include "gmp-impl.h" diff --git a/sysdeps/mach/hurd/mmap64.c b/sysdeps/mach/hurd/mmap64.c index 6d8566b5b1..23d7ca7f34 100644 --- a/sysdeps/mach/hurd/mmap64.c +++ b/sysdeps/mach/hurd/mmap64.c @@ -18,6 +18,7 @@ #include #include #include +#include /* Map addresses starting near ADDR and extending for LEN bytes. From OFFSET into the file FD describes according to PROT and FLAGS. If ADDR diff --git a/sysdeps/mach/hurd/waitid.c b/sysdeps/mach/hurd/waitid.c index dce72339dd..044a1dd8e3 100644 --- a/sysdeps/mach/hurd/waitid.c +++ b/sysdeps/mach/hurd/waitid.c @@ -19,6 +19,7 @@ #include #include +#include int __waitid (idtype_t idtype, id_t id, siginfo_t *infop, int options) diff --git a/sysdeps/microblaze/backtrace.c b/sysdeps/microblaze/backtrace.c index 8af5a4d7f5..f4a4b69df5 100644 --- a/sysdeps/microblaze/backtrace.c +++ b/sysdeps/microblaze/backtrace.c @@ -17,6 +17,7 @@ . */ #include +#include #include #include #include diff --git a/sysdeps/nptl/futex-internal.h b/sysdeps/nptl/futex-internal.h index cd356e4fa8..c27d0cdac8 100644 --- a/sysdeps/nptl/futex-internal.h +++ b/sysdeps/nptl/futex-internal.h @@ -23,6 +23,7 @@ #include #include #include +#include #include /* This file defines futex operations used internally in glibc. A futex diff --git a/sysdeps/unix/sysv/linux/adjtime.c b/sysdeps/unix/sysv/linux/adjtime.c index 6d1d1b6af2..8e7c8cc5da 100644 --- a/sysdeps/unix/sysv/linux/adjtime.c +++ b/sysdeps/unix/sysv/linux/adjtime.c @@ -19,6 +19,7 @@ #include #include #include +#include #define MAX_SEC (INT_MAX / 1000000L - 2) #define MIN_SEC (INT_MIN / 1000000L + 2) diff --git a/sysdeps/unix/sysv/linux/clock_getcpuclockid.c b/sysdeps/unix/sysv/linux/clock_getcpuclockid.c index 7d2e6d6bfe..1eb780a164 100644 --- a/sysdeps/unix/sysv/linux/clock_getcpuclockid.c +++ b/sysdeps/unix/sysv/linux/clock_getcpuclockid.c @@ -20,6 +20,7 @@ #include #include #include "kernel-posix-cpu-timers.h" +#include #include int diff --git a/sysdeps/unix/sysv/linux/faccessat.c b/sysdeps/unix/sysv/linux/faccessat.c index b697053da1..5d078371b5 100644 --- a/sysdeps/unix/sysv/linux/faccessat.c +++ b/sysdeps/unix/sysv/linux/faccessat.c @@ -16,14 +16,10 @@ License along with the GNU C Library; if not, see . */ -#include #include -#include -#include -#include #include #include -#include +#include #include diff --git a/sysdeps/unix/sysv/linux/ftime.c b/sysdeps/unix/sysv/linux/ftime.c index 1755fcf967..2f43b7650d 100644 --- a/sysdeps/unix/sysv/linux/ftime.c +++ b/sysdeps/unix/sysv/linux/ftime.c @@ -18,6 +18,7 @@ #include #include +#include #include int diff --git a/sysdeps/unix/sysv/linux/ftruncate64.c b/sysdeps/unix/sysv/linux/ftruncate64.c index 606a0e86e0..3d43a5a90f 100644 --- a/sysdeps/unix/sysv/linux/ftruncate64.c +++ b/sysdeps/unix/sysv/linux/ftruncate64.c @@ -17,7 +17,6 @@ #include #include -#include #ifndef __NR_ftruncate64 # define __NR_ftruncate64 __NR_ftruncate diff --git a/sysdeps/unix/sysv/linux/generic/chmod.c b/sysdeps/unix/sysv/linux/generic/chmod.c index b9631a9103..802e4006ee 100644 --- a/sysdeps/unix/sysv/linux/generic/chmod.c +++ b/sysdeps/unix/sysv/linux/generic/chmod.c @@ -16,11 +16,9 @@ License along with the GNU C Library. If not, see . */ -#include -#include #include -#include #include +#include /* Change the protections of FILE to MODE. */ int diff --git a/sysdeps/unix/sysv/linux/generic/chown.c b/sysdeps/unix/sysv/linux/generic/chown.c index d676eefab4..57a81834db 100644 --- a/sysdeps/unix/sysv/linux/generic/chown.c +++ b/sysdeps/unix/sysv/linux/generic/chown.c @@ -16,11 +16,9 @@ License along with the GNU C Library. If not, see . */ -#include -#include #include #include -#include +#include /* Change the owner and group of FILE. */ int diff --git a/sysdeps/unix/sysv/linux/generic/dup2.c b/sysdeps/unix/sysv/linux/generic/dup2.c index 32592f9450..dfa348b375 100644 --- a/sysdeps/unix/sysv/linux/generic/dup2.c +++ b/sysdeps/unix/sysv/linux/generic/dup2.c @@ -16,10 +16,9 @@ License along with the GNU C Library. If not, see . */ -#include #include -#include #include +#include /* Duplicate FD to FD2, closing the old FD2 and making FD2 be open the same file as FD is. Return FD2 or -1. */ diff --git a/sysdeps/unix/sysv/linux/generic/epoll_create.c b/sysdeps/unix/sysv/linux/generic/epoll_create.c index e3eac4a7ac..1715c6d9bf 100644 --- a/sysdeps/unix/sysv/linux/generic/epoll_create.c +++ b/sysdeps/unix/sysv/linux/generic/epoll_create.c @@ -16,11 +16,8 @@ License along with the GNU C Library. If not, see . */ -#include -#include -#include -#include #include +#include libc_hidden_proto (epoll_create) diff --git a/sysdeps/unix/sysv/linux/generic/inotify_init.c b/sysdeps/unix/sysv/linux/generic/inotify_init.c index 7f84124850..25a323f7e7 100644 --- a/sysdeps/unix/sysv/linux/generic/inotify_init.c +++ b/sysdeps/unix/sysv/linux/generic/inotify_init.c @@ -16,11 +16,8 @@ License along with the GNU C Library. If not, see . */ -#include -#include -#include -#include #include +#include libc_hidden_proto (inotify_init) diff --git a/sysdeps/unix/sysv/linux/generic/lchown.c b/sysdeps/unix/sysv/linux/generic/lchown.c index a483241fd3..379079e8ca 100644 --- a/sysdeps/unix/sysv/linux/generic/lchown.c +++ b/sysdeps/unix/sysv/linux/generic/lchown.c @@ -16,11 +16,9 @@ License along with the GNU C Library. If not, see . */ -#include -#include #include #include -#include +#include /* Change the owner and group of FILE. */ int diff --git a/sysdeps/unix/sysv/linux/generic/link.c b/sysdeps/unix/sysv/linux/generic/link.c index a038ba1408..1baa6b5e6a 100644 --- a/sysdeps/unix/sysv/linux/generic/link.c +++ b/sysdeps/unix/sysv/linux/generic/link.c @@ -16,10 +16,9 @@ License along with the GNU C Library. If not, see . */ -#include -#include #include #include +#include /* Make a link to FROM called TO. */ int diff --git a/sysdeps/unix/sysv/linux/generic/pipe.c b/sysdeps/unix/sysv/linux/generic/pipe.c index 5d4a95f3e7..52f3231cb8 100644 --- a/sysdeps/unix/sysv/linux/generic/pipe.c +++ b/sysdeps/unix/sysv/linux/generic/pipe.c @@ -16,9 +16,8 @@ License along with the GNU C Library. If not, see . */ -#include #include -#include +#include /* Create a one-way communication channel (__pipe). If successful, two file descriptors are stored in PIPEDES; diff --git a/sysdeps/unix/sysv/linux/generic/readlink.c b/sysdeps/unix/sysv/linux/generic/readlink.c index 721f84e3dd..6f690a9750 100644 --- a/sysdeps/unix/sysv/linux/generic/readlink.c +++ b/sysdeps/unix/sysv/linux/generic/readlink.c @@ -16,9 +16,9 @@ License along with the GNU C Library. If not, see . */ -#include #include #include +#include /* Read the contents of the symbolic link PATH into no more than LEN bytes of BUF. The contents are not null-terminated. diff --git a/sysdeps/unix/sysv/linux/generic/rmdir.c b/sysdeps/unix/sysv/linux/generic/rmdir.c index e357a10e8d..f9d721f3db 100644 --- a/sysdeps/unix/sysv/linux/generic/rmdir.c +++ b/sysdeps/unix/sysv/linux/generic/rmdir.c @@ -16,11 +16,9 @@ License along with the GNU C Library. If not, see . */ -#include -#include #include #include - +#include /* Remove the directory PATH. */ int diff --git a/sysdeps/unix/sysv/linux/generic/symlink.c b/sysdeps/unix/sysv/linux/generic/symlink.c index cddc11acf0..2c358f54c9 100644 --- a/sysdeps/unix/sysv/linux/generic/symlink.c +++ b/sysdeps/unix/sysv/linux/generic/symlink.c @@ -16,10 +16,9 @@ License along with the GNU C Library. If not, see . */ -#include -#include #include #include +#include /* Make a link to FROM called TO. */ int diff --git a/sysdeps/unix/sysv/linux/generic/unlink.c b/sysdeps/unix/sysv/linux/generic/unlink.c index 7908d0a576..8df55753a0 100644 --- a/sysdeps/unix/sysv/linux/generic/unlink.c +++ b/sysdeps/unix/sysv/linux/generic/unlink.c @@ -16,11 +16,9 @@ License along with the GNU C Library. If not, see . */ -#include -#include #include #include - +#include /* Remove the link named NAME. */ int diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c index 93d9d94a0a..f80b56b303 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c @@ -16,10 +16,10 @@ License along with the GNU C Library. If not, see . */ -#include #include #include #include +#include #if !STATFS_IS_STATFS64 #include "overflow.h" diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/overflow.h b/sysdeps/unix/sysv/linux/generic/wordsize-32/overflow.h index c5e028625a..e200f6319b 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/overflow.h +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/overflow.h @@ -19,6 +19,7 @@ #include #include +#include /* 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 diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/sendfile.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/sendfile.c index c556a37cd4..72e2d49d1a 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/sendfile.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/sendfile.c @@ -17,7 +17,9 @@ . */ #include +#include #include +#include /* Send COUNT bytes from file associated with IN_FD starting at OFFSET to descriptor OUT_FD. */ diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c index 7421501b4a..4484341075 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include #if !STATFS_IS_STATFS64 #include "overflow.h" diff --git a/sysdeps/unix/sysv/linux/getentropy.c b/sysdeps/unix/sysv/linux/getentropy.c index 2f3a4e4692..02cf46ff42 100644 --- a/sysdeps/unix/sysv/linux/getentropy.c +++ b/sysdeps/unix/sysv/linux/getentropy.c @@ -20,6 +20,7 @@ #include #include #include +#include /* Write LENGTH bytes of randomness starting at BUFFER. Return 0 on success and -1 on failure. */ diff --git a/sysdeps/unix/sysv/linux/getrlimit.c b/sysdeps/unix/sysv/linux/getrlimit.c index ecb34dd742..339d943bd2 100644 --- a/sysdeps/unix/sysv/linux/getrlimit.c +++ b/sysdeps/unix/sysv/linux/getrlimit.c @@ -16,9 +16,8 @@ License along with the GNU C Library. If not, see . */ -#include #include -#include +#include #include #if !__RLIM_T_MATCHES_RLIM64_T diff --git a/sysdeps/unix/sysv/linux/getrlimit64.c b/sysdeps/unix/sysv/linux/getrlimit64.c index 0f9a2f4936..e06ffd1a16 100644 --- a/sysdeps/unix/sysv/linux/getrlimit64.c +++ b/sysdeps/unix/sysv/linux/getrlimit64.c @@ -18,6 +18,7 @@ #include #include +#include #include /* Add this redirection so the strong_alias for __RLIM_T_MATCHES_RLIM64_T diff --git a/sysdeps/unix/sysv/linux/gettimeofday.c b/sysdeps/unix/sysv/linux/gettimeofday.c index cb57bc9cf2..1c92e6d643 100644 --- a/sysdeps/unix/sysv/linux/gettimeofday.c +++ b/sysdeps/unix/sysv/linux/gettimeofday.c @@ -16,15 +16,16 @@ License along with the GNU C Library; if not, see . */ +#include +#include + /* Optimize the function call by setting the PLT directly to vDSO symbol. */ #ifdef USE_IFUNC_GETTIMEOFDAY -# include -# include # include # include # ifdef SHARED -# include +# include # include static int diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h b/sysdeps/unix/sysv/linux/hppa/sysdep.h index 7f8da30d23..531fe2beed 100644 --- a/sysdeps/unix/sysv/linux/hppa/sysdep.h +++ b/sysdeps/unix/sysv/linux/hppa/sysdep.h @@ -28,6 +28,8 @@ /* Defines RTLD_PRIVATE_ERRNO. */ #include +#include + /* In order to get __set_errno() definition in INLINE_SYSCALL. */ #ifndef __ASSEMBLER__ #include diff --git a/sysdeps/unix/sysv/linux/internal-signals.h b/sysdeps/unix/sysv/linux/internal-signals.h index 35f2de04c5..8455ca8de1 100644 --- a/sysdeps/unix/sysv/linux/internal-signals.h +++ b/sysdeps/unix/sysv/linux/internal-signals.h @@ -23,6 +23,7 @@ #include #include #include +#include #include /* The signal used for asynchronous cancelation. */ diff --git a/sysdeps/unix/sysv/linux/libc_fatal.c b/sysdeps/unix/sysv/linux/libc_fatal.c index 52fcd9761b..486c65e600 100644 --- a/sysdeps/unix/sysv/linux/libc_fatal.c +++ b/sysdeps/unix/sysv/linux/libc_fatal.c @@ -18,6 +18,8 @@ #include #include +#include +#include static bool writev_for_fatal (int fd, const struct iovec *iov, size_t niov, size_t total) diff --git a/sysdeps/unix/sysv/linux/microblaze/sysdep.h b/sysdeps/unix/sysv/linux/microblaze/sysdep.h index d500172114..6fd96adbf0 100644 --- a/sysdeps/unix/sysv/linux/microblaze/sysdep.h +++ b/sysdeps/unix/sysv/linux/microblaze/sysdep.h @@ -26,6 +26,8 @@ /* Defines RTLD_PRIVATE_ERRNO. */ #include +#include + /* In order to get __set_errno() definition in INLINE_SYSCALL. */ #ifndef __ASSEMBLER__ # include diff --git a/sysdeps/unix/sysv/linux/mknodat.c b/sysdeps/unix/sysv/linux/mknodat.c index fdb8f1951a..279a4404f5 100644 --- a/sysdeps/unix/sysv/linux/mknodat.c +++ b/sysdeps/unix/sysv/linux/mknodat.c @@ -19,6 +19,7 @@ #include #include #include +#include int __mknodat (int fd, const char *path, mode_t mode, dev_t dev) diff --git a/sysdeps/unix/sysv/linux/netlink_assert_response.c b/sysdeps/unix/sysv/linux/netlink_assert_response.c index 5fc0920bb0..5bacf7377f 100644 --- a/sysdeps/unix/sysv/linux/netlink_assert_response.c +++ b/sysdeps/unix/sysv/linux/netlink_assert_response.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include "netlinkaccess.h" diff --git a/sysdeps/unix/sysv/linux/posix_fadvise64.c b/sysdeps/unix/sysv/linux/posix_fadvise64.c index 6ef425cf22..4a1fc0225b 100644 --- a/sysdeps/unix/sysv/linux/posix_fadvise64.c +++ b/sysdeps/unix/sysv/linux/posix_fadvise64.c @@ -17,6 +17,7 @@ #include #include +#include #include int __posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise); diff --git a/sysdeps/unix/sysv/linux/prlimit.c b/sysdeps/unix/sysv/linux/prlimit.c index aa74a52eb7..e12eb4e9bc 100644 --- a/sysdeps/unix/sysv/linux/prlimit.c +++ b/sysdeps/unix/sysv/linux/prlimit.c @@ -15,10 +15,8 @@ License along with the GNU C Library; if not, see . */ -#include #include -#include - +#include int prlimit (__pid_t pid, enum __rlimit_resource resource, diff --git a/sysdeps/unix/sysv/linux/readahead.c b/sysdeps/unix/sysv/linux/readahead.c index a189c3ac79..ad01a0aed8 100644 --- a/sysdeps/unix/sysv/linux/readahead.c +++ b/sysdeps/unix/sysv/linux/readahead.c @@ -17,7 +17,7 @@ . */ #include -#include +#include #include ssize_t diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/utmp32.c b/sysdeps/unix/sysv/linux/s390/s390-32/utmp32.c index e4b82512f6..fa4b244728 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/utmp32.c +++ b/sysdeps/unix/sysv/linux/s390/s390-32/utmp32.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include "utmp32.h" #include "utmp-convert.h" diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.c b/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.c index 3f78fa62db..bdfe396d59 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.c +++ b/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include "utmp32.h" #include "utmp-convert.h" diff --git a/sysdeps/unix/sysv/linux/semop.c b/sysdeps/unix/sysv/linux/semop.c index e955f0cd31..ab790ea40f 100644 --- a/sysdeps/unix/sysv/linux/semop.c +++ b/sysdeps/unix/sysv/linux/semop.c @@ -17,9 +17,9 @@ . */ #include +#include #include #include -#include /* Perform user-defined atomical operation of array of semaphores. */ diff --git a/sysdeps/unix/sysv/linux/setrlimit.c b/sysdeps/unix/sysv/linux/setrlimit.c index 8611d577a4..6648fad5c0 100644 --- a/sysdeps/unix/sysv/linux/setrlimit.c +++ b/sysdeps/unix/sysv/linux/setrlimit.c @@ -16,9 +16,8 @@ License along with the GNU C Library. If not, see . */ -#include #include -#include +#include #include #if !__RLIM_T_MATCHES_RLIM64_T diff --git a/sysdeps/unix/sysv/linux/setrlimit64.c b/sysdeps/unix/sysv/linux/setrlimit64.c index e4c5bab437..02c94e3c73 100644 --- a/sysdeps/unix/sysv/linux/setrlimit64.c +++ b/sysdeps/unix/sysv/linux/setrlimit64.c @@ -18,6 +18,7 @@ #include #include +#include #include /* Add this redirection so the strong_alias for __RLIM_T_MATCHES_RLIM64_T diff --git a/sysdeps/unix/sysv/linux/settimezone.c b/sysdeps/unix/sysv/linux/settimezone.c index fa463866f3..163956275f 100644 --- a/sysdeps/unix/sysv/linux/settimezone.c +++ b/sysdeps/unix/sysv/linux/settimezone.c @@ -18,6 +18,7 @@ #include #include +#include #include /* Set the system-wide timezone. diff --git a/sysdeps/unix/sysv/linux/shmget.c b/sysdeps/unix/sysv/linux/shmget.c index 71de81c365..6ea788351b 100644 --- a/sysdeps/unix/sysv/linux/shmget.c +++ b/sysdeps/unix/sysv/linux/shmget.c @@ -16,9 +16,10 @@ License along with the GNU C Library; if not, see . */ +#include +#include #include #include -#include /* Return an identifier for an shared memory segment of at least size SIZE which is associated with KEY. */ diff --git a/sysdeps/unix/sysv/linux/socketcall.h b/sysdeps/unix/sysv/linux/socketcall.h index 75c2a6404d..b9975f92b4 100644 --- a/sysdeps/unix/sysv/linux/socketcall.h +++ b/sysdeps/unix/sysv/linux/socketcall.h @@ -19,6 +19,8 @@ #ifndef _SYS_SOCKETCALL_H #define _SYS_SOCKETCALL_H 1 +#include + /* 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. diff --git a/sysdeps/unix/sysv/linux/speed.c b/sysdeps/unix/sysv/linux/speed.c index c02a06a379..d7d74ddb67 100644 --- a/sysdeps/unix/sysv/linux/speed.c +++ b/sysdeps/unix/sysv/linux/speed.c @@ -19,7 +19,7 @@ #include #include #include - +#include /* 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 diff --git a/sysdeps/unix/sysv/linux/statx.c b/sysdeps/unix/sysv/linux/statx.c index 9721fc12a5..cea6eefb7e 100644 --- a/sysdeps/unix/sysv/linux/statx.c +++ b/sysdeps/unix/sysv/linux/statx.c @@ -18,7 +18,7 @@ #include #include - +#include #include "statx_generic.c" int diff --git a/sysdeps/unix/sysv/linux/sysctl.c b/sysdeps/unix/sysv/linux/sysctl.c index 389b958226..479ba386bd 100644 --- a/sysdeps/unix/sysv/linux/sysctl.c +++ b/sysdeps/unix/sysv/linux/sysctl.c @@ -17,6 +17,7 @@ . */ #include +#include #include #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_32) diff --git a/sysdeps/unix/sysv/linux/sysdep.h b/sysdeps/unix/sysv/linux/sysdep.h index 3fa29dd588..9750c0418e 100644 --- a/sysdeps/unix/sysv/linux/sysdep.h +++ b/sysdeps/unix/sysv/linux/sysdep.h @@ -20,6 +20,7 @@ #include #include +#include #include #ifndef __ASSEMBLER__ diff --git a/sysdeps/unix/sysv/linux/truncate64.c b/sysdeps/unix/sysv/linux/truncate64.c index d4b46574dc..ac43a2b542 100644 --- a/sysdeps/unix/sysv/linux/truncate64.c +++ b/sysdeps/unix/sysv/linux/truncate64.c @@ -17,7 +17,6 @@ #include #include -#include #ifndef __NR_truncate64 # define __NR_truncate64 __NR_truncate diff --git a/sysdeps/unix/sysv/linux/ustat.c b/sysdeps/unix/sysv/linux/ustat.c index 51f20a2a73..e38b792705 100644 --- a/sysdeps/unix/sysv/linux/ustat.c +++ b/sysdeps/unix/sysv/linux/ustat.c @@ -23,7 +23,7 @@ #if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_28) # include -# include +# include # ifndef DEV_TO_KDEV # define DEV_TO_KDEV(__dev) \ diff --git a/sysdeps/unix/sysv/linux/xmknod.c b/sysdeps/unix/sysv/linux/xmknod.c index 82bb0bd953..10e874a514 100644 --- a/sysdeps/unix/sysv/linux/xmknod.c +++ b/sysdeps/unix/sysv/linux/xmknod.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33) diff --git a/sysdeps/unix/sysv/linux/xmknodat.c b/sysdeps/unix/sysv/linux/xmknodat.c index fae3fe54d1..17ffea16c9 100644 --- a/sysdeps/unix/sysv/linux/xmknodat.c +++ b/sysdeps/unix/sysv/linux/xmknodat.c @@ -17,6 +17,7 @@ #include #include +#include #include #if SHLIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33) diff --git a/sysdeps/unix/sysv/linux/xstatconv.c b/sysdeps/unix/sysv/linux/xstatconv.c index 3622a82cd0..b100e07783 100644 --- a/sysdeps/unix/sysv/linux/xstatconv.c +++ b/sysdeps/unix/sysv/linux/xstatconv.c @@ -19,6 +19,7 @@ #include #include #include +#include #if STAT_IS_KERNEL_STAT diff --git a/sysdeps/x86_64/stackinfo.h b/sysdeps/x86_64/stackinfo.h index 7bcb3b1499..4a4e54cd76 100644 --- a/sysdeps/x86_64/stackinfo.h +++ b/sysdeps/x86_64/stackinfo.h @@ -23,6 +23,12 @@ #include +#ifdef __ILP32__ +# define RSP_REG "esp" +#else +# define RSP_REG "rsp" +#endif + /* On x86_64 the stack grows down. */ #define _STACK_GROWS_DOWN 1 @@ -34,10 +40,10 @@ 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 */