AH_BOTTOM([
/* make sure that we pickup the correct stuff from all headers */
#define _XOPEN_SOURCE 600
AH_BOTTOM([
/* make sure that we pickup the correct stuff from all headers */
#define _XOPEN_SOURCE 600
# include <features.h>
#endif
# include <features.h>
#endif
# include <sys/types.h>
#endif
# include <sys/types.h>
#endif
# include <sys/param.h>
#endif
#ifndef MAXPATH
# include <sys/param.h>
#endif
#ifndef MAXPATH
# include <errno.h>
#endif
# include <errno.h>
#endif
# include <sys/mman.h>
#endif
#if !defined HAVE_MADVISE && defined HAVE_POSIX_MADVISE
# include <sys/mman.h>
#endif
#if !defined HAVE_MADVISE && defined HAVE_POSIX_MADVISE
# define USE_MADVISE 1
#endif
# define USE_MADVISE 1
#endif
# include <sys/stat.h>
#endif
# include <sys/stat.h>
#endif
#include <fcntl.h>
#endif
#include <fcntl.h>
#endif
# include <unistd.h>
#endif
# include <unistd.h>
#endif
+#ifdef TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#else
# include <sys/time.h>
# include <time.h>
#else
# include <sys/time.h>
# else
# include <time.h>
# endif
#endif
# include <sys/time.h>
# else
# include <time.h>
# endif
#endif
# include <sys/times.h>
#endif
# include <sys/times.h>
#endif
+#ifdef HAVE_SYS_RESOURCE_H
# include <sys/resource.h>
#if (defined(__svr4__) && defined(__sun__))
/* Solaris headers (pre 2.6) don't have a getrusage prototype.
# include <sys/resource.h>
#if (defined(__svr4__) && defined(__sun__))
/* Solaris headers (pre 2.6) don't have a getrusage prototype.
# include <malloc/malloc.h>
#endif
# include <malloc/malloc.h>
#endif
# include <stdio.h>
#endif
# include <stdio.h>
#endif
# include <stdlib.h>
#endif
# include <stdlib.h>
#endif
# include <ctype.h>
#endif
# include <ctype.h>
#endif
# include <dirent.h>
# define NAMLEN(dirent) strlen((dirent)->d_name)
#else
# define dirent direct
# define NAMLEN(dirent) (dirent)->d_namlen
# include <dirent.h>
# define NAMLEN(dirent) strlen((dirent)->d_name)
#else
# define dirent direct
# define NAMLEN(dirent) (dirent)->d_namlen
# include <sys/ndir.h>
# endif
# include <sys/ndir.h>
# endif
# include <sys/dir.h>
# endif
# include <sys/dir.h>
# endif
# include <ndir.h>
# endif
#endif
# include <ndir.h>
# endif
#endif
AC_CHECK_HEADERS(sys/mman.h)
AC_FUNC_MMAP
AC_CHECK_FUNCS(mmap munmap)
AC_CHECK_HEADERS(sys/mman.h)
AC_FUNC_MMAP
AC_CHECK_FUNCS(mmap munmap)
- AC_CHECK_DECLS(madvise, [], [], [#if HAVE_SYS_MMAN_H
+ AC_CHECK_DECLS(madvise, [], [], [#ifdef HAVE_SYS_MMAN_H
# include <sys/mman.h>
#endif])
if test "x$ac_cv_have_decl_madvise" = "xyes";
# include <sys/mman.h>
#endif])
if test "x$ac_cv_have_decl_madvise" = "xyes";