Include <kernel-features.h> explicitly where required.

This patch makes files using __ASSUME_* macros include
<kernel-features.h> 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
<kernel-features.h> 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.

	* nptl/pthread_cond_wait.c: Include <kernel-features.h>.
	* 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.
This commit is contained in:
Joseph Myers 2014-06-20 23:24:00 +00:00
parent d710902750
commit 9bc6103d04
10 changed files with 19 additions and 0 deletions

View File

@ -1,5 +1,15 @@
2014-06-20 Joseph Myers <joseph@codesourcery.com>
* nptl/pthread_cond_wait.c: Include <kernel-features.h>.
* 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.
* nptl/sysdeps/unix/sysv/linux/mq_notify.c: Do not include
<kernel-features.h>.
(init_mq_netlink): Remove conditional have_sock_cloexec

View File

@ -22,6 +22,7 @@
#include <lowlevellock.h>
#include <pthread.h>
#include <pthreadP.h>
#include <kernel-features.h>
#include <shlib-compat.h>
#include <stap-probe.h>

View File

@ -21,6 +21,7 @@
#include <lowlevellock.h>
#include <pthread.h>
#include <pthreadP.h>
#include <kernel-features.h>
/* Try to acquire read lock for RWLOCK or return after specfied time. */

View File

@ -21,6 +21,7 @@
#include <lowlevellock.h>
#include <pthread.h>
#include <pthreadP.h>
#include <kernel-features.h>
/* Try to acquire write lock for RWLOCK or return after specfied time. */

View File

@ -21,6 +21,7 @@
#include <lowlevellock.h>
#include <sys/time.h>
#include <pthreadP.h>
#include <kernel-features.h>
int

View File

@ -50,6 +50,7 @@
#ifdef HAVE_INOTIFY
# include <sys/inotify.h>
#endif
#include <kernel-features.h>
/* Get libc version number. */
#include <version.h>

View File

@ -1,5 +1,6 @@
#include <sysdep.h>
#include <tls.h>
#include <kernel-features.h>
RESULT offsetof (struct pthread, result)
TID offsetof (struct pthread, tid)

View File

@ -1,5 +1,6 @@
#include <sysdep.h>
#include <tls.h>
#include <kernel-features.h>
--

View File

@ -1,5 +1,6 @@
#include <sysdep.h>
#include <tls.h>
#include <kernel-features.h>
RESULT offsetof (struct pthread, result)
TID offsetof (struct pthread, tid)

View File

@ -1,5 +1,6 @@
#include <sysdep.h>
#include <tls.h>
#include <kernel-features.h>
RESULT offsetof (struct pthread, result)
TID offsetof (struct pthread, tid)