From: oetiker Date: Tue, 25 Aug 2009 09:01:16 +0000 (+0000) Subject: detect if stdint.h is available. if not, use inttypes. this should fix #239 and make... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3772c60cb9e58ccd70d1f91deeb40a0f4075f9f6;p=rrdtool-all.git detect if stdint.h is available. if not, use inttypes. this should fix #239 and make compilation on solaris 9 work. git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1906 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/program/configure.ac b/program/configure.ac index 49f1281d..65aa310c 100644 --- a/program/configure.ac +++ b/program/configure.ac @@ -182,7 +182,7 @@ CONFIGURE_PART(Checking for Header Files) dnl Checks for header files. AC_HEADER_STDC AC_HEADER_DIRENT -AC_CHECK_HEADERS(libgen.h features.h sys/stat.h sys/types.h fcntl.h locale.h fp_class.h malloc.h unistd.h ieeefp.h math.h sys/times.h sys/param.h sys/resource.h signal.h float.h stdio.h stdlib.h errno.h string.h ctype.h) +AC_CHECK_HEADERS(stdint.h inttypes.h libgen.h features.h sys/stat.h sys/types.h fcntl.h locale.h fp_class.h malloc.h unistd.h ieeefp.h math.h sys/times.h sys/param.h sys/resource.h signal.h float.h stdio.h stdlib.h errno.h string.h ctype.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST diff --git a/program/src/rrd_client.h b/program/src/rrd_client.h index 90b78f8d..787c2b6d 100644 --- a/program/src/rrd_client.h +++ b/program/src/rrd_client.h @@ -22,8 +22,24 @@ #ifndef __RRD_CLIENT_H #define __RRD_CLIENT_H 1 +#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) && !defined(HAVE_CONFIG_H) +#include "../win32/config.h" +#else +#ifdef HAVE_CONFIG_H +#include "../rrd_config.h" +#endif +#endif + #ifndef WIN32 -#include +# ifdef HAVE_STDINT_H +# include +# else +# ifdef HAVE_INTTYPES_H +# include +# else +# error "you should have stdint.h or inttypes.h to compile this" +# endif +# endif #else # include typedef signed char int8_t; diff --git a/program/src/rrd_daemon.c b/program/src/rrd_daemon.c index b4bc1ee0..16b5df59 100644 --- a/program/src/rrd_daemon.c +++ b/program/src/rrd_daemon.c @@ -77,11 +77,13 @@ #include #ifndef WIN32 -#include +#ifdef HAVE_STDINT_H +# include +#endif #include #include #include -# include +#include #else