Commit b859a686 authored by Alexandre Julliard's avatar Alexandre Julliard

Added check for f_namelen in struct statfs.

parent 5b8d5131
...@@ -18901,6 +18901,143 @@ _ACEOF ...@@ -18901,6 +18901,143 @@ _ACEOF
fi fi
echo "$as_me:$LINENO: checking for struct statfs.f_namelen" >&5
echo $ECHO_N "checking for struct statfs.f_namelen... $ECHO_C" >&6
if test "${ac_cv_member_struct_statfs_f_namelen+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <sys/types.h>
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif
#ifdef STATFS_DEFINED_BY_SYS_MOUNT
# include <sys/mount.h>
#else
# ifdef STATFS_DEFINED_BY_SYS_VFS
# include <sys/vfs.h>
# else
# ifdef STATFS_DEFINED_BY_SYS_STATFS
# include <sys/statfs.h>
# endif
# endif
#endif
int
main ()
{
static struct statfs ac_aggr;
if (ac_aggr.f_namelen)
return 0;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_member_struct_statfs_f_namelen=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <sys/types.h>
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif
#ifdef STATFS_DEFINED_BY_SYS_MOUNT
# include <sys/mount.h>
#else
# ifdef STATFS_DEFINED_BY_SYS_VFS
# include <sys/vfs.h>
# else
# ifdef STATFS_DEFINED_BY_SYS_STATFS
# include <sys/statfs.h>
# endif
# endif
#endif
int
main ()
{
static struct statfs ac_aggr;
if (sizeof ac_aggr.f_namelen)
return 0;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_member_struct_statfs_f_namelen=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_member_struct_statfs_f_namelen=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_member_struct_statfs_f_namelen" >&5
echo "${ECHO_T}$ac_cv_member_struct_statfs_f_namelen" >&6
if test $ac_cv_member_struct_statfs_f_namelen = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_STATFS_F_NAMELEN 1
_ACEOF
fi
echo "$as_me:$LINENO: checking for struct statvfs.f_blocks" >&5 echo "$as_me:$LINENO: checking for struct statvfs.f_blocks" >&5
......
...@@ -1386,7 +1386,7 @@ fi ...@@ -1386,7 +1386,7 @@ fi
dnl **** FIXME: what about mixed cases, where we need two of them? *** dnl **** FIXME: what about mixed cases, where we need two of them? ***
dnl Check for statfs members dnl Check for statfs members
AC_CHECK_MEMBERS([struct statfs.f_bfree, struct statfs.f_bavail, struct statfs.f_frsize, struct statfs.f_ffree, struct statfs.f_favail],,, AC_CHECK_MEMBERS([struct statfs.f_bfree, struct statfs.f_bavail, struct statfs.f_frsize, struct statfs.f_ffree, struct statfs.f_favail, struct statfs.f_namelen],,,
[#include <sys/types.h> [#include <sys/types.h>
#ifdef HAVE_SYS_PARAM_H #ifdef HAVE_SYS_PARAM_H
# include <sys/param.h> # include <sys/param.h>
......
...@@ -572,6 +572,9 @@ ...@@ -572,6 +572,9 @@
/* Define to 1 if `f_frsize' is member of `struct statfs'. */ /* Define to 1 if `f_frsize' is member of `struct statfs'. */
#undef HAVE_STRUCT_STATFS_F_FRSIZE #undef HAVE_STRUCT_STATFS_F_FRSIZE
/* Define to 1 if `f_namelen' is member of `struct statfs'. */
#undef HAVE_STRUCT_STATFS_F_NAMELEN
/* Define to 1 if `f_blocks' is member of `struct statvfs'. */ /* Define to 1 if `f_blocks' is member of `struct statvfs'. */
#undef HAVE_STRUCT_STATVFS_F_BLOCKS #undef HAVE_STRUCT_STATVFS_F_BLOCKS
......
...@@ -57,7 +57,9 @@ int statvfs( const char *path, struct statvfs *buf ) ...@@ -57,7 +57,9 @@ int statvfs( const char *path, struct statvfs *buf )
buf->f_bsize = info.f_bsize; buf->f_bsize = info.f_bsize;
buf->f_blocks = info.f_blocks; buf->f_blocks = info.f_blocks;
buf->f_files = info.f_files; buf->f_files = info.f_files;
#ifdef HAVE_STRUCT_STATFS_F_NAMELEN
buf->f_namemax = info.f_namelen; buf->f_namemax = info.f_namelen;
#endif
#ifdef HAVE_STRUCT_STATFS_F_FRSIZE #ifdef HAVE_STRUCT_STATFS_F_FRSIZE
buf->f_frsize = info.f_frsize; buf->f_frsize = info.f_frsize;
#else #else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment