jorton 2004/05/27 14:12:47 Modified: . Tag: APR_0_9_BRANCH configure.in Log: * configure.in: Safer check for fstat64; fix HP-UX 11 build. Revision Changes Path No revision No revision 1.535.2.11 +17 -1 apr/configure.in Index: configure.in =================================================================== RCS file: /home/cvs/apr/configure.in,v retrieving revision 1.535.2.10 retrieving revision 1.535.2.11 diff -d -u -r1.535.2.10 -r1.535.2.11 --- configure.in 24 May 2004 10:06:38 -0000 1.535.2.10 +++ configure.in 27 May 2004 21:12:47 -0000 1.535.2.11 @@ -802,7 +802,7 @@ dnl ----------------------------- Checks for Any required Functions dnl Checks for library functions. (N.B. poll is further down) -AC_CHECK_FUNCS(alloca calloc strcasecmp stricmp setsid isinf isnan fstat64) +AC_CHECK_FUNCS(alloca calloc strcasecmp stricmp setsid isinf isnan) AC_CHECK_FUNCS(getenv putenv setenv unsetenv) AC_CHECK_FUNCS(setrlimit, [ have_setrlimit="1" ], [ have_setrlimit="0" ]) AC_CHECK_FUNCS(getrlimit, [ have_getrlimit="1" ], [ have_getrlimit="0" ]) @@ -1866,6 +1866,22 @@ AC_CHECK_HEADERS(langinfo.h) AC_CHECK_FUNCS(nl_langinfo) + +dnl Random late checks... + +# AC_CHECK_FUNCS is not sufficient since the function may be usable when +# struct stat64 is not exposed (e.g. HP-UX). Note that fstat64 only +# happens to be usable on Linux because -D_GNU_SOURCE is picked up +# by the earlier crypt_r check. +AC_CACHE_CHECK([for usable fstat64], [apr_cv_func_fstat64], + [AC_TRY_COMPILE([#include +#include +#include ], [struct stat64 st; fstat64(0, &st);], + [apr_cv_func_fstat64=yes], [apr_cv_func_fstat64=no])]) +if test $apr_cv_func_fstat64 = yes; then + AC_DEFINE(HAVE_FSTAT64, 1, [Define if fstat64 can be used]) +fi + dnl ----------------------------- Finalize the variables