Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F133528781
D32498.id96917.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D32498.id96917.diff
View Options
Index: bin/hdrtest/Makefile
===================================================================
--- /dev/null
+++ bin/hdrtest/Makefile
@@ -0,0 +1,44 @@
+#
+# A number of header files in sys/* have, going back to 7th Edition Unix in
+# 1979, reqiured other files (like sys/types.h) to compile. Likewise the 4BSD
+# networking code has had prerequisites. However, going back to around the turn
+# of the century, other systems have made them be independently includable
+# (wide-spread header include protection post-dates 7th edition Unix by maybe 4
+# or 5 years judging from netnews sources). Start down the path of making them
+# all independently includable by creating this test that fails buildworld when
+# they are not.
+#
+PROG= hdrtest
+SRCS= hdrtest.c
+INTERNALPROG= This is a compile-only test
+MAN=
+
+# Some files have to be clean for extra defines too...
+#CFLAGS.event.c= -D_WANT_KEVENT32 -D_WANT_FREEBSD11_KEVENT
+
+.include "goodfiles.inc"
+
+.for h in ${HDRS}
+SRCS+= ${h:R}.c
+CLEANFILES+=${h:R}.c
+${h:R}.c:
+ echo "#include <$h>" > ${.TARGET}
+.endfor
+
+#
+# Target to make the current known good list. Only run it when this hdrtest is
+# building so the list never shrinks (except when files are removed entirely
+# that are on the list).
+#
+goodfiles.inc!
+ @(cd ${SRCTOP}/sys; \
+ echo "# DO NOT EDIT-- this file is automatically @""generated."; \
+ echo "HDRS= \\"; \
+ for i in sys/*.h; do \
+ echo "#include <$$i>" | \
+ ${CC} ${CFLAGS} -xc - -c -o /dev/null 2> /dev/null && \
+ echo " $$i \\"; \
+ done; \
+ echo) > ${.CURDIR}/goodfiles.inc
+
+.include <bsd.prog.mk>
Index: bin/hdrtest/goodfiles.inc
===================================================================
--- /dev/null
+++ bin/hdrtest/goodfiles.inc
@@ -0,0 +1,163 @@
+# DO NOT EDIT-- this file is automatically @generated.
+HDRS= \
+ sys/_bitset.h \
+ sys/_bus_dma.h \
+ sys/_clock_id.h \
+ sys/_cpuset.h \
+ sys/_domainset.h \
+ sys/_eventhandler.h \
+ sys/_iovec.h \
+ sys/_null.h \
+ sys/_pthreadtypes.h \
+ sys/_stdarg.h \
+ sys/_termios.h \
+ sys/_timespec.h \
+ sys/_timeval.h \
+ sys/_types.h \
+ sys/_uio.h \
+ sys/_umtx.h \
+ sys/_winsize.h \
+ sys/abi_compat.h \
+ sys/acl.h \
+ sys/aio.h \
+ sys/arb.h \
+ sys/asan.h \
+ sys/assym.h \
+ sys/auxv.h \
+ sys/bitset.h \
+ sys/blockcount.h \
+ sys/boot.h \
+ sys/bufobj.h \
+ sys/capsicum.h \
+ sys/cdefs.h \
+ sys/cdio.h \
+ sys/chio.h \
+ sys/ck.h \
+ sys/clock.h \
+ sys/cnv.h \
+ sys/compressor.h \
+ sys/condvar.h \
+ sys/consio.h \
+ sys/csan.h \
+ sys/ctype.h \
+ sys/devicestat.h \
+ sys/dirent.h \
+ sys/disk.h \
+ sys/disklabel.h \
+ sys/dkstat.h \
+ sys/dnv.h \
+ sys/elf.h \
+ sys/endian.h \
+ sys/errno.h \
+ sys/event.h \
+ sys/eventfd.h \
+ sys/fbio.h \
+ sys/fcntl.h \
+ sys/fdcio.h \
+ sys/file.h \
+ sys/filio.h \
+ sys/gsb_crc32.h \
+ sys/hash.h \
+ sys/imgact_binmisc.h \
+ sys/ioccom.h \
+ sys/ioctl.h \
+ sys/ipc.h \
+ sys/joystick.h \
+ sys/kbio.h \
+ sys/kcov.h \
+ sys/kenv.h \
+ sys/kern_prefetch.h \
+ sys/kerneldump.h \
+ sys/kpilite.h \
+ sys/kthread.h \
+ sys/ktr.h \
+ sys/ktr_class.h \
+ sys/limits.h \
+ sys/link_elf.h \
+ sys/lockstat.h \
+ sys/malloc.h \
+ sys/mchain.h \
+ sys/mman.h \
+ sys/mount.h \
+ sys/mouse.h \
+ sys/mqueue.h \
+ sys/msan.h \
+ sys/msg.h \
+ sys/mtio.h \
+ sys/nlist_aout.h \
+ sys/nv.h \
+ sys/param.h \
+ sys/pcpu.h \
+ sys/pidctrl.h \
+ sys/poll.h \
+ sys/priv.h \
+ sys/procctl.h \
+ sys/procdesc.h \
+ sys/procfs.h \
+ sys/protosw.h \
+ sys/ptio.h \
+ sys/ptrace.h \
+ sys/queue.h \
+ sys/random.h \
+ sys/rangelock.h \
+ sys/rangeset.h \
+ sys/rctl.h \
+ sys/reboot.h \
+ sys/reg.h \
+ sys/regression.h \
+ sys/resource.h \
+ sys/sched.h \
+ sys/sdt.h \
+ sys/select.h \
+ sys/selinfo.h \
+ sys/sem.h \
+ sys/seqc.h \
+ sys/serial.h \
+ sys/shm.h \
+ sys/signal.h \
+ sys/sleepqueue.h \
+ sys/slicer.h \
+ sys/smp.h \
+ sys/sndstat.h \
+ sys/snoop.h \
+ sys/sockbuf.h \
+ sys/socket.h \
+ sys/sockio.h \
+ sys/soundcard.h \
+ sys/specialfd.h \
+ sys/spigenio.h \
+ sys/stat.h \
+ sys/statvfs.h \
+ sys/stdatomic.h \
+ sys/stddef.h \
+ sys/stdint.h \
+ sys/syscall.h \
+ sys/sysctl.h \
+ sys/sysent.h \
+ sys/syslog.h \
+ sys/sysproto.h \
+ sys/thr.h \
+ sys/tim_filter.h \
+ sys/time.h \
+ sys/timers.h \
+ sys/times.h \
+ sys/timespec.h \
+ sys/timex.h \
+ sys/tree.h \
+ sys/tslog.h \
+ sys/tty.h \
+ sys/ttycom.h \
+ sys/ttydefaults.h \
+ sys/turnstile.h \
+ sys/types.h \
+ sys/ucontext.h \
+ sys/ucred.h \
+ sys/uio.h \
+ sys/umtxvar.h \
+ sys/un.h \
+ sys/unistd.h \
+ sys/utsname.h \
+ sys/vmem.h \
+ sys/wait.h \
+ sys/watchdog.h \
+
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Oct 27, 10:48 AM (12 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
24267800
Default Alt Text
D32498.id96917.diff (4 KB)
Attached To
Mode
D32498: Test various header files to ensure they can be included by themselves.
Attached
Detach File
Event Timeline
Log In to Comment