Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/librumpuser check that sys/cdefs.h builds with -Werror (...
details: https://anonhg.NetBSD.org/src/rev/9c0cc81d4543
branches: trunk
changeset: 335327:9c0cc81d4543
user: pooka <pooka%NetBSD.org@localhost>
date: Sat Jan 03 13:16:41 2015 +0000
description:
check that sys/cdefs.h builds with -Werror (not the case on alpine linux
where it contains an unconditional #warning)
diffstat:
lib/librumpuser/configure | 17 ++++++++++++++++-
lib/librumpuser/configure.ac | 7 ++++++-
2 files changed, 22 insertions(+), 2 deletions(-)
diffs (58 lines):
diff -r d43b78a032b5 -r 9c0cc81d4543 lib/librumpuser/configure
--- a/lib/librumpuser/configure Sat Jan 03 11:48:04 2015 +0000
+++ b/lib/librumpuser/configure Sat Jan 03 13:16:41 2015 +0000
@@ -3646,7 +3646,7 @@
done
-for ac_header in sys/cdefs.h sys/param.h sys/sysctl.h sys/disk.h \
+for ac_header in sys/param.h sys/sysctl.h sys/disk.h \
sys/disklabel.h sys/dkio.h sys/atomic.h paths.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -4096,6 +4096,21 @@
SAVE_CFLAGS="${CFLAGS}"
CFLAGS="${SAVE_CFLAGS} -Werror"
+
+for ac_header in sys/cdefs.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "sys/cdefs.h" "ac_cv_header_sys_cdefs_h" "#include <sys/cdefs.h>
+"
+if test "x$ac_cv_header_sys_cdefs_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_CDEFS_H 1
+_ACEOF
+
+fi
+
+done
+
+
SAVE_LIBS="${LIBS}"
LIBS="${LIBS} -lpthread"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for two-argument pthread_setname_np()" >&5
diff -r d43b78a032b5 -r 9c0cc81d4543 lib/librumpuser/configure.ac
--- a/lib/librumpuser/configure.ac Sat Jan 03 11:48:04 2015 +0000
+++ b/lib/librumpuser/configure.ac Sat Jan 03 13:16:41 2015 +0000
@@ -19,7 +19,7 @@
AC_SYS_LARGEFILE
-AC_CHECK_HEADERS([sys/cdefs.h sys/param.h sys/sysctl.h sys/disk.h \
+AC_CHECK_HEADERS([sys/param.h sys/sysctl.h sys/disk.h \
sys/disklabel.h sys/dkio.h sys/atomic.h paths.h])
AC_CANONICAL_TARGET
@@ -52,6 +52,11 @@
dnl
SAVE_CFLAGS="${CFLAGS}"
CFLAGS="${SAVE_CFLAGS} -Werror"
+
+dnl check sys/cdefs.h creatively to process only with cc, not cpp
+dnl (sys/cdefs.h in at least in musl contains a #warning)
+AC_CHECK_HEADERS([sys/cdefs.h], [], [], [#include <sys/cdefs.h>])
+
SAVE_LIBS="${LIBS}"
LIBS="${LIBS} -lpthread"
AC_MSG_CHECKING([for two-argument pthread_setname_np()])
Home |
Main Index |
Thread Index |
Old Index