small OpenBSD fixes (mount.h and FILE_OFFSET_BITS)

This commit is contained in:
Jean-Francois Dockes 2011-09-23 10:32:41 +02:00
parent b4eb24ca83
commit 5b3c5d8a5d
3 changed files with 42 additions and 3 deletions

View File

@ -109,7 +109,7 @@
#undef _FILE_OFFSET_BITS
#undef _LARGE_FILES
#if _FILE_OFFSET_BITS == 64 || defined(__APPLE__)
#if _FILE_OFFSET_BITS == 64 || defined(__APPLE__) || defined(__OpenBSD__)
#define OFFTPC "%lld"
#else
#define OFFTPC "%ld"

34
src/configure vendored
View File

@ -4008,10 +4008,42 @@ fi
done
for ac_header in sys/param.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_param_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_SYS_PARAM_H 1
_ACEOF
fi
done
for ac_header in bar.h
do :
ac_fn_c_check_header_compile "$LINENO" "bar.h" "ac_cv_header_bar_h" "#ifdef HAVE_FOO_H
# include <foo.h>
#endif
"
if test "x$ac_cv_header_bar_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_BAR_H 1
_ACEOF
fi
done
for ac_header in sys/mount.h sys/statfs.h sys/statvfs.h sys/vfs.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif
"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1

View File

@ -23,7 +23,14 @@ fi
AC_SYS_LARGEFILE
AC_CHECK_HEADERS(sys/mount.h sys/statfs.h sys/statvfs.h sys/vfs.h)
# OpenBSD needs sys/param.h for mount.h to compile
AC_CHECK_HEADERS([sys/param.h])
AC_CHECK_HEADERS([sys/mount.h sys/statfs.h sys/statvfs.h sys/vfs.h], [], [],
[#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif
])
# Use specific 'file' command ? (Useful on solaris to specify
# /usr/local/bin/file instead of the system's which doesn't understand '-i'