Skip to content

Commit 9faeb29

Browse files
committed
test-includes: add LINTING_HEADERS #define to test poisoned headers
Some headers include poisons to ensure they're not used in improper situations. Add a LINTING_HEADERS #define to allow the header test to check these poisoned headers.
1 parent d56e6eb commit 9faeb29

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

sys/sys/intr.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,15 @@
2929

3030
#ifndef _SYS_INTR_H_
3131
#define _SYS_INTR_H_
32+
#ifndef LINTING_HEADERS
3233
#ifndef INTRNG
3334
#error Need INTRNG for this file
3435
#endif
3536

3637
#ifndef __MACHINE_INTERRUPT_H__
3738
#error "sys/intr.h included without architecture interrupt header!"
3839
#endif
40+
#endif
3941

4042
/* FreeBSD standard interrupt controller interface */
4143

tools/build/test-includes/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ HDRS!= (cd ${SRCTOP}/sys; ls sys/[!_]*.h | sort ; ls net*/[!_]*.h | sort)
2020
NO_PIC= yes
2121

2222
# Some files have to be clean for extra defines too...
23-
CFLAGS.event.c= -D_WANT_KEVENT32 -D_WANT_FREEBSD11_KEVENT
23+
CFLAGS.event.c= -D_WANT_KEVENT32 -D_WANT_FREEBSD11_KEVENT -DLINTING_HEADERS
2424

2525
# We currently support C89 and newer compilers. Catch the odd little fussy
2626
# details like __inline that the header files must follow to support C89.

tools/build/test-includes/badfiles.inc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ BADHDRS= \
5454
sys/imgact_aout.h \
5555
sys/imgact_elf.h \
5656
sys/interrupt.h \
57-
sys/intr.h \
5857
sys/ioctl_compat.h \
5958
sys/iov.h \
6059
sys/iov_schema.h \

0 commit comments

Comments
 (0)