From patchwork Fri Jun 20 21:28:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 1627 Received: (qmail 12312 invoked by alias); 20 Jun 2014 21:28:52 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 12295 invoked by uid 89); 20 Jun 2014 21:28:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Date: Fri, 20 Jun 2014 21:28:43 +0000 From: "Joseph S. Myers" To: Subject: Include explicitly where required Message-ID: MIME-Version: 1.0 This patch makes files using __ASSUME_* macros include explicitly, rather than relying on some other header (such as tls.h, lowlevellock.h or pthreadP.h) to include it implicitly. (I omitted cases where I've already posted or am testing the patch that stops the file from needing __ASSUME_* at all.) This accords with the general principle of making source files include the headers for anything they use, and also helps make it safe to remove includes from any file that doesn't use __ASSUME_* (some of those may be stray includes left behind after increasing the minimum kernel version, others may never have been needed or may have become obsolete after some other change). Tested x86_64 that the disassembly of installed shared libraries is unchanged by this patch. 2014-06-20 Joseph Myers * nptl/pthread_cond_wait.c: Include . * nptl/pthread_rwlock_timedrdlock.c: Likewise. * nptl/pthread_rwlock_timedwrlock.c: Likewise. * nptl/sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise. * nscd/nscd.c: Likewise. * sysdeps/i386/nptl/tcb-offsets.sym: Likewise. * sysdeps/powerpc/nptl/tcb-offsets.sym: Likewise. * sysdeps/sh/nptl/tcb-offsets.sym: Likewise. * sysdeps/x86_64/nptl/tcb-offsets.sym: Likewise. diff --git a/nptl/pthread_cond_wait.c b/nptl/pthread_cond_wait.c index 9d2dfce..fc5eac4 100644 --- a/nptl/pthread_cond_wait.c +++ b/nptl/pthread_cond_wait.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include diff --git a/nptl/pthread_rwlock_timedrdlock.c b/nptl/pthread_rwlock_timedrdlock.c index 81b2ee4..340ae3d 100644 --- a/nptl/pthread_rwlock_timedrdlock.c +++ b/nptl/pthread_rwlock_timedrdlock.c @@ -21,6 +21,7 @@ #include #include #include +#include /* Try to acquire read lock for RWLOCK or return after specfied time. */ diff --git a/nptl/pthread_rwlock_timedwrlock.c b/nptl/pthread_rwlock_timedwrlock.c index 26f2139..be94a20 100644 --- a/nptl/pthread_rwlock_timedwrlock.c +++ b/nptl/pthread_rwlock_timedwrlock.c @@ -21,6 +21,7 @@ #include #include #include +#include /* Try to acquire write lock for RWLOCK or return after specfied time. */ diff --git a/nptl/sysdeps/unix/sysv/linux/lowlevelrobustlock.c b/nptl/sysdeps/unix/sysv/linux/lowlevelrobustlock.c index c894b1e..3525807 100644 --- a/nptl/sysdeps/unix/sysv/linux/lowlevelrobustlock.c +++ b/nptl/sysdeps/unix/sysv/linux/lowlevelrobustlock.c @@ -21,6 +21,7 @@ #include #include #include +#include int diff --git a/nscd/nscd.c b/nscd/nscd.c index 5680378..a4c71e9 100644 --- a/nscd/nscd.c +++ b/nscd/nscd.c @@ -50,6 +50,7 @@ #ifdef HAVE_INOTIFY # include #endif +#include /* Get libc version number. */ #include diff --git a/sysdeps/i386/nptl/tcb-offsets.sym b/sysdeps/i386/nptl/tcb-offsets.sym index 69f9deb..7bdf161 100644 --- a/sysdeps/i386/nptl/tcb-offsets.sym +++ b/sysdeps/i386/nptl/tcb-offsets.sym @@ -1,5 +1,6 @@ #include #include +#include RESULT offsetof (struct pthread, result) TID offsetof (struct pthread, tid) diff --git a/sysdeps/powerpc/nptl/tcb-offsets.sym b/sysdeps/powerpc/nptl/tcb-offsets.sym index eac5b5c..f996759 100644 --- a/sysdeps/powerpc/nptl/tcb-offsets.sym +++ b/sysdeps/powerpc/nptl/tcb-offsets.sym @@ -1,5 +1,6 @@ #include #include +#include -- diff --git a/sysdeps/sh/nptl/tcb-offsets.sym b/sysdeps/sh/nptl/tcb-offsets.sym index 753b72b..ac63b5b 100644 --- a/sysdeps/sh/nptl/tcb-offsets.sym +++ b/sysdeps/sh/nptl/tcb-offsets.sym @@ -1,5 +1,6 @@ #include #include +#include RESULT offsetof (struct pthread, result) TID offsetof (struct pthread, tid) diff --git a/sysdeps/x86_64/nptl/tcb-offsets.sym b/sysdeps/x86_64/nptl/tcb-offsets.sym index cf86375..729d1da 100644 --- a/sysdeps/x86_64/nptl/tcb-offsets.sym +++ b/sysdeps/x86_64/nptl/tcb-offsets.sym @@ -1,5 +1,6 @@ #include #include +#include RESULT offsetof (struct pthread, result) TID offsetof (struct pthread, tid)