# AC_HEADER_STDC
AC_CHECK_HEADERS(malloc.h \
fcntl.h search.h termios.h \
- unistd.h strings.h \
+ unistd.h strings.h stat.h \
sys/time.h sys/types.h sys/select.h \
sys/stat.h sys/mman.h \
sys/ioctl.h sys/inotify.h crt_externs.h)
# Checks for library functions
AC_CHECK_FUNCS([lrand48 drand48 srand48 setmode setenv getenv \
- cbrt vsnprintf _NSGetEnviron])
+ cbrt vsnprintf _NSGetEnviron mallopt mallinfo mstats getpagesize])
AC_REPLACE_FUNCS([strcasecmp strncasecmp strcasestr])
# Written by Kiem-Phong Vo (08/15/95).
####################################################################
-lib getpagesize
-hdr stat
-sys stat
-typ ssize_t
-hdr malloc
-lib mallopt
-lib mallinfo
-lib mstats
-
std malloc note{ stuck with standard malloc }end noexecute{
_BEGIN_EXTERNS_
extern void _exit(int);
** Written by Kiem-Phong Vo, kpv@research.att.com, 01/16/94.
*/
-#if _hdr_stat
+#if HAVE_STAT_H
#include <stat.h>
#else
-#if _sys_stat
+#if HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
#endif
return (*Vmregion->meth.alignf) (Vmregion, size, _Vmpagesize);
}
-#if _hdr_malloc
+#ifdef HAVE_MALLOC_H
#define calloc ______calloc
#define free ______free
/* in Windows, this is a macro defined in malloc.h and not a function */
#undef alloca
-#if _lib_mallopt
+#ifdef HAVE_MALLOPT
int mallopt(int cmd, int value)
{
VMFLINIT();
}
#endif
-#if _lib_mallinfo
+#ifdef HAVE_MALLINFO
struct mallinfo mallinfo(void)
{
Vmstat_t sb;
}
#endif
-#if _lib_mstats
+#ifdef HAVE_MSTATS
struct mstats mstats(void)
{
Vmstat_t sb;
}
#endif
-#endif/*_hdr_malloc*/
+#endif/* HAVE_MALLOC_H */
#endif /*_std_malloc || _BLD_INSTRUMENT_ || cray*/
#define COUNT(n) ((n) += 1)
#endif /*DEBUG*/
#define VMPAGESIZE 8192
-#if _lib_getpagesize
+#if HAVE_GETPAGESIZE
#define GETPAGESIZE(x) ((x) ? (x) : \
(((x)=getpagesize()) < VMPAGESIZE ? ((x)=VMPAGESIZE) : (x)) )
#else
extern void _cleanup(void);
/* for vmdcsbrk.c */
-#if !_typ_ssize_t
- typedef int ssize_t;
-#endif
#if !defined(_WIN32)
extern Vmuchar_t *sbrk(ssize_t);
#endif
#ifndef _def_atexit_vmalloc
#define _def_atexit_vmalloc 1
-#undef _sys_types
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-#undef _lib_getpagesize
-#define _lib_getpagesize 0 /* getpagesize() in default lib(s) */
-
-#undef _sys_stat
-#define _sys_stat 1 /* #include <sys/stat.h> ok */
-
-#undef _typ_ssize_t
-#define _typ_ssize_t 1 /* ssize_t is a type */
-
-#undef _hdr_malloc
-#define _hdr_malloc 1 /* #include <malloc.h> ok */
+#endif