summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl DeBisschop <kdebisschop@users.sourceforge.net>2003-07-21 11:53:26 (GMT)
committerKarl DeBisschop <kdebisschop@users.sourceforge.net>2003-07-21 11:53:26 (GMT)
commit97ecfa6226bea7c09f78b2b92d807e73467ffc08 (patch)
tree64976001badfb160994d606e1e055f15fb680258
parentf6d1cc53a803f0bc6787fa90ee327018734b099e (diff)
downloadmonitoring-plugins-97ecfa6226bea7c09f78b2b92d807e73467ffc08.tar.gz
test GNU_SOURCE and include features.h if present to clear warning about asprintf definition
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@596 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r--configure.in5
-rw-r--r--plugins/common.h8
2 files changed, 10 insertions, 3 deletions
diff --git a/configure.in b/configure.in
index b618c77..a6261c6 100644
--- a/configure.in
+++ b/configure.in
@@ -21,6 +21,7 @@ dnl Figure out how to invoke "install" and what install options to use.
21AC_PROG_INSTALL 21AC_PROG_INSTALL
22AC_SUBST(INSTALL) 22AC_SUBST(INSTALL)
23 23
24AC_GNU_SOURCE
24AC_PROG_CC 25AC_PROG_CC
25AC_PROG_CPP 26AC_PROG_CPP
26AC_PROG_GCC_TRADITIONAL 27AC_PROG_GCC_TRADITIONAL
@@ -31,6 +32,8 @@ AC_MINIX
31AC_PROG_MAKE_SET 32AC_PROG_MAKE_SET
32AC_PROG_AWK 33AC_PROG_AWK
33 34
35
36
34saved_srcdir=$srcdir 37saved_srcdir=$srcdir
35srcdir=$srcdir/lib 38srcdir=$srcdir/lib
36test -f $srcdir/getloadavg.c \ 39test -f $srcdir/getloadavg.c \
@@ -469,7 +472,7 @@ AC_HEADER_STDC
469AC_HEADER_TIME 472AC_HEADER_TIME
470AC_HEADER_SYS_WAIT 473AC_HEADER_SYS_WAIT
471AC_CHECK_HEADERS(signal.h strings.h string.h syslog.h uio.h errno.h regex.h sys/types.h sys/time.h sys/socket.h sys/loadavg.h) 474AC_CHECK_HEADERS(signal.h strings.h string.h syslog.h uio.h errno.h regex.h sys/types.h sys/time.h sys/socket.h sys/loadavg.h)
472AC_CHECK_HEADERS(stdarg.h sys/unistd.h ctype.h stdlib.h) 475AC_CHECK_HEADERS(features.h stdarg.h sys/unistd.h ctype.h stdlib.h)
473AC_CHECK_HEADERS(limits.h sys/param.h sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h fcntl.h sys/statfs.h sys/dustat.h sys/statvfs.h) 476AC_CHECK_HEADERS(limits.h sys/param.h sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h fcntl.h sys/statfs.h sys/dustat.h sys/statvfs.h)
474 477
475# Define HAVE_INTTYPES_H if <inttypes.h> exists, 478# Define HAVE_INTTYPES_H if <inttypes.h> exists,
diff --git a/plugins/common.h b/plugins/common.h
index 280333e..4877eee 100644
--- a/plugins/common.h
+++ b/plugins/common.h
@@ -30,12 +30,16 @@
30 * 30 *
31 *****************************************************************************/ 31 *****************************************************************************/
32 32
33#include "config.h"
34
35#ifdef HAVE_FEATURES_H
36#include <features.h>
37#endif
38
33#include <stdio.h> /* obligatory includes */ 39#include <stdio.h> /* obligatory includes */
34#include <stdlib.h> 40#include <stdlib.h>
35#include <errno.h> 41#include <errno.h>
36 42
37#include "config.h"
38
39#ifdef HAVE_STRINGS_H 43#ifdef HAVE_STRINGS_H
40#include <strings.h> 44#include <strings.h>
41#endif 45#endif