X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=rrd_config.h.in;h=303bac7f39dce8b59289ab5b2f3d2dd0f8bd7696;hb=faf5ce730dcfdb0556d84ed69c64d20269b57070;hp=9190c629752813094657ec9a3b00fc81ba30f390;hpb=ecfac614b914cef110a81ac665997a9b186da500;p=pkg-rrdtool.git diff --git a/rrd_config.h.in b/rrd_config.h.in index 9190c62..303bac7 100644 --- a/rrd_config.h.in +++ b/rrd_config.h.in @@ -14,6 +14,13 @@ /* realloc does not support NULL as argument */ #undef NO_NULL_REALLOC +/* lets enable madvise defines in NetBSD */ +#if defined(__NetBSD__) +# if !defined(_NETBSD_SOURCE) +# define _NETBSD_SOURCE +# endif +#endif + /* Define to 1 if you have the `chdir' function. */ @@ -50,6 +57,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H +/* Define to 1 if you have the header file. */ +#undef HAVE_FEATURES_H + /* Define to 1 if you have the `finite' function. */ #undef HAVE_FINITE @@ -125,6 +135,12 @@ /* Define to 1 if you have a working `mmap' system call. */ #undef HAVE_MMAP +/* Define to 1 if you have the `msync' function. */ +#undef HAVE_MSYNC + +/* Define to 1 if you have the `munmap' function. */ +#undef HAVE_MUNMAP + /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H @@ -134,6 +150,9 @@ /* Define to 1 if you have the `posix_fadvise' function. */ #undef HAVE_POSIX_FADVISE +/* Define to 1 if you have the `posix_madvise' function. */ +#undef HAVE_POSIX_MADVISE + /* Define if you have POSIX threads libraries and header files. */ #undef HAVE_PTHREAD @@ -174,6 +193,9 @@ */ #undef HAVE_SYS_DIR_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_MMAN_H + /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_NDIR_H @@ -250,12 +272,96 @@ #undef const -/* enable posix_fadvise on linux */ -#if defined(HAVE_POSIX_FADVISE) && defined(HAVE_FCNTL_H) +#ifdef HAVE_FEATURES_H #define _XOPEN_SOURCE 600 +#undef _BSD_SOURCE /* comment to prevent configure from modifying this line */ +#define _BSD_SOURCE 1 +# include +#endif + +#ifdef HAVE_ERRNO_H +# include +#endif + +#if defined(HAVE_SYS_MMAN_H) +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + +#ifdef HAVE_SYS_PARAM_H +# include +#endif +#ifndef MAXPATH +# ifdef PATH_MAX +# define MAXPATH PATH_MAX +# endif +#endif +#ifndef MAXPATH +/* else try the BSD variant */ +# ifdef MAXPATHLEN +# define MAXPATH MAXPATHLEN +# endif +#endif + +#if !defined HAVE_MADVISE && defined HAVE_POSIX_MADVISE +/* use posix_madvise family */ +# define madvise posix_madvise +# define MADV_NORMAL POSIX_MADV_NORMAL +# define MADV_RANDOM POSIX_MADV_RANDOM +# define MADV_SEQUENTIAL POSIX_MADV_SEQUENTIAL +# define MADV_WILLNEED POSIX_MADV_WILLNEED +# define MADV_DONTNEED POSIX_MADV_DONTNEED +#endif + +#if defined POSIX_MADV_RANDOM && !defined MADV_RANDOM +#define MADV_RANDOM POSIX_MADV_RANDOM +#endif + + + +#if defined HAVE_MADVISE || defined HAVE_POSIX_MADVISE +# define USE_MADVISE 1 +#endif + +#ifdef HAVE_SYS_STAT_H +# include +#endif + +#ifdef HAVE_FCNTL_H #include #endif +#ifdef HAVE_UNISTD_H +# include +#endif + +#ifdef TIME_WITH_SYS_TIME +# include +# include +#else +# ifdef HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif + +#ifdef HAVE_SYS_TIMES_H +# include +#endif + +#ifdef HAVE_SYS_RESOURCE_H +# include +#if (defined(__svr4__) && defined(__sun__)) +/* Solaris headers (pre 2.6) don't have a getrusage prototype. + Use this instead. */ +extern int getrusage(int, struct rusage *); +#endif /* __svr4__ && __sun__ */ +#endif + /* define strrchr, strchr and memcpy, memmove in terms of bsd funcs make sure you are NOT using bcopy, index or rindex in the code */ @@ -302,12 +408,15 @@ char *strchr (), *strrchr (); /* for Solaris */ #if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASS)) # define HAVE_ISINF 1 +# ifdef isinf +# undef isinf /* confuse autoconf */ +# endif # define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF) #endif /* solaris 10 it defines isnan such that only forte can compile it ... bad bad */ #if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS)) -# undef isnan +# undef isnan /* confuse autoconf to NOT remove this */ # define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN) #endif