Skip to content
Snippets Groups Projects
Commit 06b9a39d authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Added some more statfs tests:

On SGI statfs() takes 4 args, and
the statfs-struct doesn't have the f_bavail member.

Rev: src/modules/files/configure.in:1.20
parent d974264c
No related branches found
No related tags found
No related merge requests found
......@@ -105,6 +105,58 @@ fi
else :; fi
if test x$ac_cv_func_statfs = xyes ; then
AC_MSG_CHECKING(if statfs takes 2(Standard) or 4(SGI) arguments)
AC_CACHE_VAL(pike_cv_func_sgi_statfs, [
AC_TRY_RUN([
#ifdef HAVE_SYS_MOUNT_H
#include <sys/mount.h>
#endif
#ifdef HAVE_SYS_STATFS_H
#include <sys/statfs.h>
#endif
int main()
{
exit(0);
/* NOT REACHED */
statfs((char *)0, (struct statfs *)0);
}
],pike_cv_func_sgi_statfs=no,pike_cv_func_sgi_statfs=yes)
])
if test x$pike_cv_func_sgi_statfs = xyes ; then
AC_MSG_RESULT(SGI style)
AC_DEFINE(HAVE_SGI_STATFS)
else
AC_MSG_RESULT(Standard)
fi
AC_MSG_CHECKING(if the struct statfs has the member f_bavail)
AC_CACHE_VAL(pike_cv_struct_statfs_f_bavail, [
AC_TRY_COMPILE([
#ifdef HAVE_SYS_MOUNT_H
#include <sys/mount.h>
#endif
#ifdef HAVE_SYS_STATFS_H
#include <sys/statfs.h>
#endif
], [
int main(int argc, char **argv)
{
struct statfs st;
st.f_bavail = 0;
return(st.f_bavail);
}
], [ pike_cv_struct_statfs_f_bavail=yes ],
[ pike_cv_struct_statfs_f_bavail=no ])
])
AC_MSG_RESULT($pike_cv_struct_statfs_f_bavail)
if test x$pike_cv_struct_statfs_f_bavail = xyes; then
AC_DEFINE(HAVE_STATFS_F_BAVAIL)
else :; fi
else :; fi
AC_MSG_CHECKING(for working (and failsafe) strerror)
AC_CACHE_VAL(pike_cv_func_failsafe_strerror,
[
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment