glibc/sysdeps/unix/sysv/linux
Zack Weinberg 4775578486 Installed header hygiene (BZ#20366): Test of installed headers.
This adds a test to ensure that the problems fixed in the last several
patches do not recur.  Each directory checks the headers that it
installs for two properties: first, each header must be compilable in
isolation, as both C and C++, under a representative combination of
language and library conformance levels; second, there is a blacklist
of identifiers that may not appear in any installed header, currently
consisting of the legacy BSD typedefs.  (There is an exemption for the
headers that define those typedefs, and for the RPC headers.  It may be
necessary to make this more sophisticated if we add more stuff to the
blacklist in the future.)

In order for this test to work correctly, every wrapper header
that actually defines something must guard those definitions with
 #ifndef _ISOMAC.  This is the existing mechanism used by the conform/
tests to tell wrapper headers not to define anything that the public
header wouldn't, and not to use anything from libc-symbols.h.  conform/
only cares for headers that we need to check for standards conformance,
whereas this test applies to *every* header.  (Headers in include/ that
are either installed directly, or are internal-use-only and do *not*
correspond to any installed header, are not affected.)

	* scripts/check-installed-headers.sh: New script.
	* Rules: In each directory that defines header files to be installed,
	run check-installed-headers.sh on them as a special test.
	* Makefile: Likewise for the headers installed at top level.

	* include/aliases.h, include/alloca.h, include/argz.h
	* include/arpa/nameser.h, include/arpa/nameser_compat.h
	* include/elf.h, include/envz.h, include/err.h
	* include/execinfo.h, include/fpu_control.h, include/getopt.h
	* include/gshadow.h, include/ifaddrs.h, include/libintl.h
	* include/link.h, include/malloc.h, include/mcheck.h
	* include/mntent.h, include/netinet/ether.h
	* include/nss.h, include/obstack.h, include/printf.h
	* include/pty.h, include/resolv.h, include/rpc/auth.h
	* include/rpc/auth_des.h, include/rpc/auth_unix.h
	* include/rpc/clnt.h, include/rpc/des_crypt.h
	* include/rpc/key_prot.h, include/rpc/netdb.h
	* include/rpc/pmap_clnt.h, include/rpc/pmap_prot.h
	* include/rpc/pmap_rmt.h, include/rpc/rpc.h
	* include/rpc/rpc_msg.h, include/rpc/svc.h
	* include/rpc/svc_auth.h, include/rpc/xdr.h
	* include/rpcsvc/nis_callback.h, include/rpcsvc/nislib.h
	* include/rpcsvc/yp.h, include/rpcsvc/ypclnt.h
	* include/rpcsvc/ypupd.h, include/shadow.h
	* include/stdio_ext.h, include/sys/epoll.h
	* include/sys/file.h, include/sys/gmon.h, include/sys/ioctl.h
	* include/sys/prctl.h, include/sys/profil.h
	* include/sys/statfs.h, include/sys/sysctl.h
	* include/sys/sysinfo.h, include/ttyent.h, include/utmp.h
	* sysdeps/arm/nacl/include/bits/setjmp.h
	* sysdeps/mips/include/sys/asm.h
	* sysdeps/unix/sysv/linux/include/sys/sysinfo.h
	* sysdeps/unix/sysv/linux/include/sys/timex.h
	* sysdeps/x86/fpu/include/bits/fenv.h:
	Add #ifndef _ISOMAC guard around internal declarations.
	Add multiple-inclusion guard if not already present.
2016-09-23 08:43:56 -04:00
..
aarch64 Installed-header hygiene (BZ#20366): stack_t. 2016-09-23 08:43:56 -04:00
alpha Installed-header hygiene (BZ#20366): stack_t. 2016-09-23 08:43:56 -04:00
arm Installed-header hygiene (BZ#20366): stack_t. 2016-09-23 08:43:56 -04:00
bits Installed-header hygiene (BZ#20366): stack_t. 2016-09-23 08:43:56 -04:00
generic Consolidate pwritev/pwritev64 implementations 2016-06-06 19:12:36 -03:00
hppa Installed-header hygiene (BZ#20366): stack_t. 2016-09-23 08:43:56 -04:00
i386 Add femode_t functions. 2016-09-07 16:40:09 +00:00
ia64 Installed-header hygiene (BZ#20366): stack_t. 2016-09-23 08:43:56 -04:00
include/sys Installed header hygiene (BZ#20366): Test of installed headers. 2016-09-23 08:43:56 -04:00
m68k Installed-header hygiene (BZ#20366): stack_t. 2016-09-23 08:43:56 -04:00
microblaze Add femode_t functions. 2016-09-07 16:40:09 +00:00
mips Installed-header hygiene (BZ#20366): stack_t. 2016-09-23 08:43:56 -04:00
net Installed-header hygiene (BZ#20366): time.h types. 2016-09-23 08:43:56 -04:00
netash
netatalk
netax25
neteconet
netinet Installed-header hygiene (BZ#20366): obsolete BSD u_* types. 2016-09-23 08:43:56 -04:00
netipx Installed-header hygiene (BZ#20366): obsolete BSD u_* types. 2016-09-23 08:43:56 -04:00
netiucv Add missing iucv related defines. 2016-04-27 09:08:29 +02:00
netpacket
netrom
netrose Installed-header hygiene (BZ#20366): Simple self-contained fixes. 2016-09-23 08:43:55 -04:00
nfs
nios2 Installed-header hygiene (BZ#20366): stack_t. 2016-09-23 08:43:56 -04:00
powerpc Installed-header hygiene (BZ#20366): stack_t. 2016-09-23 08:43:56 -04:00
s390 Installed-header hygiene (BZ#20366): stack_t. 2016-09-23 08:43:56 -04:00
scsi
sh Installed-header hygiene (BZ#20366): stack_t. 2016-09-23 08:43:56 -04:00
sparc Installed-header hygiene (BZ#20366): stack_t. 2016-09-23 08:43:56 -04:00
sys Installed-header hygiene (BZ#20366): time.h types. 2016-09-23 08:43:56 -04:00
tile Installed-header hygiene (BZ#20366): stack_t. 2016-09-23 08:43:56 -04:00
wordsize-64 Consolidate pwritev/pwritev64 implementations 2016-06-06 19:12:36 -03:00
x86 Installed-header hygiene (BZ#20366): stack_t. 2016-09-23 08:43:56 -04:00
x86_64 Add femode_t functions. 2016-09-07 16:40:09 +00:00
Implies
Makefile Base <sys/quota.h> on Linux kernel headers [BZ #20525] 2016-09-01 15:53:13 +02:00
Versions
_G_config.h
_exit.c
a.out.h
accept.c
accept4.c
adjtime.c
aio_misc.h
aio_sigqueue.c
arch-fork.h
bind.c
check_native.c network: recvmsg and sendmsg standard compliance (BZ#16919) 2016-05-25 17:39:01 -03:00
check_pf.c network: recvmsg and sendmsg standard compliance (BZ#16919) 2016-05-25 17:39:01 -03:00
clock.c
clock_getcpuclockid.c
clock_getres.c
clock_gettime.c
clock_nanosleep.c
clock_settime.c
cmsg_nxthdr.c
configure
configure.ac
connect.c
createthread.c
default-sched.h
device-nrs.h
dl-brk.c
dl-execstack.c
dl-fxstatat64.c
dl-getcwd.c
dl-librecon.h
dl-openat64.c
dl-opendir.c
dl-origin.c
dl-osinfo.h
dl-sbrk.c
dl-sysdep.c
dl-sysdep.h
dl-vdso.c
dl-vdso.h
dl-writev.h
epoll_pwait.c
errqueue.h
eventfd_read.c
eventfd_write.c
exit-thread.h
faccessat.c
fallocate.c
fallocate64.c
fatal-prepare.h
fchmodat.c
fcntl.c
fd_to_filename.h
fexecve.c
fips-private.h
fpathconf.c
fstatfs64.c
fstatvfs.c
fstatvfs64.c
ftime.c
ftruncate64.c
futex-internal.h
futimens.c Assume __NR_utimensat is always defined 2016-03-23 23:35:08 +01:00
futimes.c
futimesat.c
fxstat.c
fxstat64.c
fxstatat.c
fxstatat64.c
gai_sigqueue.c
getclktck.c
getcwd.c
getdents.c
getdents64.c
getdirentries.c
getdirentries64.c
getdtsz.c
gethostid.c
getipv4sourcefilter.c
getloadavg.c
getlogin.c
getlogin_r.c
getpagesize.c
getpeername.c
getpid.c
getpriority.c
getpt.c
getrlimit64.c
getsockname.c
getsockopt.c
getsourcefilter.c
getsysstats.c
gettimeofday.c
grantpt.c
if_index.c
ifaddrs.c network: recvmsg and sendmsg standard compliance (BZ#16919) 2016-05-25 17:39:01 -03:00
ifreq.c
internal_statvfs.c
internal_statvfs64.c
ipc_priv.h
kernel-features.h Remove __ASSUME_FUTEX_LOCK_PI 2016-06-13 08:36:34 -03:00
kernel-posix-cpu-timers.h
kernel-posix-timers.h
kernel_sigaction.h
kernel_stat.h
kernel_termios.h
ldd-rewrite.sed
lddlibc4.c
ldsodefs.h Fix build with HAVE_AUX_VECTOR 2016-04-11 10:27:25 +02:00
libc_fatal.c
linux_fsinfo.h
listen.c
llseek.c
local-setxid.h
lowlevellock-futex.h
lseek64.c
lutimes.c Assume __NR_utimensat is always defined 2016-03-23 23:35:08 +01:00
lxstat.c
lxstat64.c
malloc-sysdep.h
mmap64.c
mq_close.c
mq_getattr.c
mq_notify.c
mq_open.c
mq_receive.c
mq_send.c
mq_unlink.c
msgctl.c
msgget.c
msgrcv.c
msgsnd.c
netlink_assert_response.c
netlinkaccess.h
nice.c
not-cancel.h
nptl-signals.h Refactor Linux raise implementation (BZ#15368) 2016-07-13 17:08:51 +01:00
nscd_setup_thread.c
ntp_gettime.c
ntp_gettimex.c
open64.c
openat.c
openat64.c
opendir.c
opensock.c
pathconf.c
pathconf.h
paths.h
personality.c
posix_fadvise.c
posix_fadvise64.c
posix_fallocate.c
posix_fallocate64.c
posix_madvise.c
ppoll.c
pread.c Remove __ASSUME_OFF_DIFF_OFF64 definition 2016-07-08 14:28:08 -03:00
pread64.c Remove __ASSUME_OFF_DIFF_OFF64 definition 2016-07-08 14:28:08 -03:00
preadv.c Remove __ASSUME_OFF_DIFF_OFF64 definition 2016-07-08 14:28:08 -03:00
preadv64.c Remove __ASSUME_OFF_DIFF_OFF64 definition 2016-07-08 14:28:08 -03:00
prlimit.c
prof-freq.c
profil.c
pselect.c
pt-raise.c Refactor Linux raise implementation (BZ#15368) 2016-07-13 17:08:51 +01:00
pthread-pids.h
pthread_getaffinity.c
pthread_getcpuclockid.c
pthread_getname.c
pthread_kill.c
pthread_setaffinity.c
pthread_setname.c
pthread_sigmask.c
pthread_sigqueue.c
ptrace.c
ptsname.c
pwrite.c Remove __ASSUME_OFF_DIFF_OFF64 definition 2016-07-08 14:28:08 -03:00
pwrite64.c Remove __ASSUME_OFF_DIFF_OFF64 definition 2016-07-08 14:28:08 -03:00
pwritev.c Remove __ASSUME_OFF_DIFF_OFF64 definition 2016-07-08 14:28:08 -03:00
pwritev64.c Remove __ASSUME_OFF_DIFF_OFF64 definition 2016-07-08 14:28:08 -03:00
raise.c Refactor Linux raise implementation (BZ#15368) 2016-07-13 17:08:51 +01:00
readahead.c
readdir64.c
readdir64_r.c
readonly-area.c
reboot.c
recv.c
recvfrom.c
recvmmsg.c Revert {send,sendm,recv,recvm}msg conformance changes 2016-06-10 11:58:16 -03:00
recvmsg.c Revert {send,sendm,recv,recvm}msg conformance changes 2016-06-10 11:58:16 -03:00
remove.c
sa_len.c
safe-fatal.h
sched_getaffinity.c
sched_getcpu.c
sched_setaffinity.c
segfault.c
semctl.c
semget.c
semop.c
semtimedop.c
send.c
sendmmsg.c Revert {send,sendm,recv,recvm}msg conformance changes 2016-06-10 11:58:16 -03:00
sendmsg.c Revert {send,sendm,recv,recvm}msg conformance changes 2016-06-10 11:58:16 -03:00
sendto.c
setegid.c
seteuid.c
setgid.c
setgroups.c
sethostid.c
setipv4sourcefilter.c
setregid.c
setresgid.c
setresuid.c
setreuid.c
setrlimit64.c
setsockopt.c
setsourcefilter.c
setuid.c
shlib-versions
shm-directory.c
shmat.c
shmctl.c
shmdt.c
shmget.c
shutdown.c
sigaction.c
siglist.h
signal.c
signalfd.c
sigpending.c
sigprocmask.c
sigqueue.c
sigreturn.c
sigset-cvt-mask.h
sigstack.c
sigsuspend.c
sigtimedwait.c
sigwait.c
sigwaitinfo.c
sizes.h
socket.c
socketcall.h
socketpair.c
spawni.c posix: Correctly block/unblock all signals on Linux posix_spawn 2016-09-20 17:18:15 -03:00
speed.c
statfs64.c
statvfs.c
statvfs64.c
sync_file_range.c
syscalls.list
sysconf.c
sysctl.c
sysctl.mk
sysdep-vdso.h
sysdep.h Fix LO_HI_LONG definition 2016-07-08 15:41:21 -03:00
syslog.c
system.c
tcdrain.c
tcflow.c
tcflush.c
tcgetattr.c
tcgetpgrp.c
tcsendbrk.c
tcsetattr.c
tcsetpgrp.c
termio.h
time.c
timer_create.c
timer_delete.c
timer_getoverr.c
timer_gettime.c
timer_routines.c
timer_settime.c
times.c Expand comments in Linux times() implementation. 2016-06-19 15:47:00 -04:00
timespec_get.c
truncate64.c
tst-affinity-pid.c
tst-affinity.c
tst-align-clone.c
tst-clone.c
tst-clone2.c Fix clone (CLONE_VM) pid/tid reset (BZ#19957) 2016-04-29 18:19:30 -03:00
tst-fanotify.c
tst-getpid1.c
tst-personality.c
tst-quota.c Base <sys/quota.h> on Linux kernel headers [BZ #20525] 2016-09-01 15:53:13 +02:00
tst-setgetname.c
tst-skeleton-affinity.c
tst-skeleton-thread-affinity.c
tst-thread-affinity-pthread.c
tst-thread-affinity-pthread2.c
tst-thread-affinity-sched.c
ttyname.c
ttyname_r.c
ualarm.c
umount.S
umount2.S
unlockpt.c
updwtmp.c
ustat.c
utimensat.c Assume __NR_utimensat is always defined 2016-03-23 23:35:08 +01:00
utimes.c
utmp_file.c
vfork.c
wait.c Remove union wait [BZ #19613] 2016-04-14 08:54:57 +02:00
wait3.c
waitid.c
waitpid.c
xmknod.c
xmknodat.c
xstat.c
xstat64.c
xstatconv.c
xstatconv.h