Module Name: src Committed By: christos Date: Sun Nov 5 17:44:29 UTC 2017
Modified Files: src/usr.bin/kdump: mkioctls Log Message: deal with the stdbool.h mess defining bool in <net/if.h> and <net/route.h> and then xf86Opt.h wanting to define a struct field called bool. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/usr.bin/kdump/mkioctls Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/kdump/mkioctls diff -u src/usr.bin/kdump/mkioctls:1.45 src/usr.bin/kdump/mkioctls:1.46 --- src/usr.bin/kdump/mkioctls:1.45 Wed Oct 21 20:29:58 2015 +++ src/usr.bin/kdump/mkioctls Sun Nov 5 12:44:28 2017 @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: mkioctls,v 1.45 2015/10/22 00:29:58 christos Exp $ +# $NetBSD: mkioctls,v 1.46 2017/11/05 17:44:28 christos Exp $ # # Copyright (c) 1994 # The Regents of the University of California. All rights reserved. @@ -79,11 +79,26 @@ echo "#include <dev/pci/mlyreg.h>" echo "#include <prop/proplib.h>" echo +# kernel headers <sys/*.h> and <net/*.h> should not include stdbool.h +# but they do; then xf86Opt.h needs a bool struct field. + +needundef=true for i do + case $i in + *X11*) + if $needundef; then + echo "#undef bool" + needundef=false; + fi;; + esac echo "#include <$i>" done | ${SED} -e "s,${DESTDIR}/usr/include/,,g" +if ! $needundef; then + echo "#define bool _Bool" +fi + ${CC} -E -nostdinc -isystem ${DESTDIR}/usr/include \ -I${DESTDIR}/usr/X11R7/include \ -I${DESTDIR}/usr/X11R7/include/pixman-1 \