Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/kdump deal with the stdbool.h mess defining bool in ...
details: https://anonhg.NetBSD.org/src/rev/f2f4caa366db
branches: trunk
changeset: 357317:f2f4caa366db
user: christos <christos%NetBSD.org@localhost>
date: Sun Nov 05 17:44:28 2017 +0000
description:
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.
diffstat:
usr.bin/kdump/mkioctls | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diffs (37 lines):
diff -r 07b9397502f2 -r f2f4caa366db usr.bin/kdump/mkioctls
--- a/usr.bin/kdump/mkioctls Sun Nov 05 16:27:18 2017 +0000
+++ b/usr.bin/kdump/mkioctls Sun Nov 05 17:44:28 2017 +0000
@@ -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 <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 \
Home |
Main Index |
Thread Index |
Old Index