about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2010-05-29 13:06:19 +0200
committerAlexander Barton <alex@barton.de>2010-06-09 11:49:57 +0200
commitb849e63fbfcddae7c770944816544c4799856042 (patch)
treecd6b701d597847adddef6eed81c705df3ff463d2
parent55190f2d3ddf9b4bd43b0555df784c95eed82390 (diff)
downloadngircd-b849e63fbfcddae7c770944816544c4799856042.tar.gz
ngircd-b849e63fbfcddae7c770944816544c4799856042.zip
configure: make implicit declarations fatal
from bugzilla #105:
"ngircd-16 works great under openbsd4.7/i386, but it segfaults on
openbsd4.7/amd64."

Caused by missing function prototypes and the resulting truncation of
pointer to int.

Lets try to catch these bugs during compilation instead of SIGSEGV.
-rw-r--r--configure.in1
1 files changed, 1 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 6d9312d4..8526af60 100644
--- a/configure.in
+++ b/configure.in
@@ -542,6 +542,7 @@ AC_DEFINE_UNQUOTED(TARGET_OS, "$target_os" )
 
 # Add additional CFLAGS, eventually specified on the command line, but after
 # running this configure script. Useful for "-Werror" for example.
+test "$GCC" = "yes" && CFLAGS="$CFLAGS -Werror=implicit-function-declaration"
 test -n "$CFLAGS_END" && CFLAGS="$CFLAGS $CFLAGS_END"
 
 # -- Generate files --