Re-order configure tests to reflect the fact that the code generated for
posix_fadvise and other file-related functions can depend on _LARGEFILE_SOURCE and/or _FILE_OFFSET_BITS. Per report from Robert Treat. Back-patch to 8.4. This has been wrong all along, but we weren't really using posix_fadvise in anger before, and AC_FUNC_FSEEKO seems to mask the issue well enough for that function.
This commit is contained in:
parent
196a6ca5de
commit
a6c75be23d
50
configure.in
50
configure.in
@ -1,5 +1,5 @@
|
|||||||
dnl Process this file with autoconf to produce a configure script.
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
dnl $PostgreSQL: pgsql/configure.in,v 1.620 2010/01/07 03:24:57 tgl Exp $
|
dnl $PostgreSQL: pgsql/configure.in,v 1.621 2010/01/16 19:50:26 tgl Exp $
|
||||||
dnl
|
dnl
|
||||||
dnl Developers, please strive to achieve this order:
|
dnl Developers, please strive to achieve this order:
|
||||||
dnl
|
dnl
|
||||||
@ -1144,6 +1144,20 @@ AC_MSG_RESULT(yes)],
|
|||||||
[AC_MSG_RESULT(no)])
|
[AC_MSG_RESULT(no)])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Check largefile support. You might think this is a system service not a
|
||||||
|
# compiler characteristic, but you'd be wrong. We must check this before
|
||||||
|
# probing existence of related functions such as fseeko, since the largefile
|
||||||
|
# defines can affect what is generated for that.
|
||||||
|
AC_SYS_LARGEFILE
|
||||||
|
|
||||||
|
# Check for largefile support (must be after AC_SYS_LARGEFILE)
|
||||||
|
AC_CHECK_SIZEOF([off_t])
|
||||||
|
|
||||||
|
# If we don't have largefile support, can't handle segsize >= 2GB.
|
||||||
|
if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
|
||||||
|
AC_MSG_ERROR([Large file support is not enabled. Segment size cannot be larger than 1GB.])
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
##
|
##
|
||||||
## Functions, global variables
|
## Functions, global variables
|
||||||
@ -1155,6 +1169,17 @@ PGAC_FUNC_GETTIMEOFDAY_1ARG
|
|||||||
|
|
||||||
AC_CHECK_FUNCS([cbrt dlopen fcvt fdatasync getifaddrs getpeereid getpeerucred getrlimit memmove poll pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs])
|
AC_CHECK_FUNCS([cbrt dlopen fcvt fdatasync getifaddrs getpeereid getpeerucred getrlimit memmove poll pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs])
|
||||||
|
|
||||||
|
AC_REPLACE_FUNCS(fseeko)
|
||||||
|
case $host_os in
|
||||||
|
# BSD/OS & NetBSD use a custom fseeko/ftello built on fsetpos/fgetpos
|
||||||
|
# Mingw uses macros to access Win32 API calls
|
||||||
|
bsdi*|netbsd*|mingw*)
|
||||||
|
AC_DEFINE(HAVE_FSEEKO, 1, [Define to 1 because replacement version used.])
|
||||||
|
ac_cv_func_fseeko=yes;;
|
||||||
|
*)
|
||||||
|
AC_FUNC_FSEEKO;;
|
||||||
|
esac
|
||||||
|
|
||||||
# posix_fadvise() is a no-op on Solaris, so don't incur function overhead
|
# posix_fadvise() is a no-op on Solaris, so don't incur function overhead
|
||||||
# by calling it, 2009-04-02
|
# by calling it, 2009-04-02
|
||||||
# http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
|
# http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
|
||||||
@ -1367,17 +1392,6 @@ AC_CHECK_FUNCS(atexit, [],
|
|||||||
[AC_CHECK_FUNCS(on_exit, [],
|
[AC_CHECK_FUNCS(on_exit, [],
|
||||||
[AC_MSG_ERROR([neither atexit() nor on_exit() found])])])
|
[AC_MSG_ERROR([neither atexit() nor on_exit() found])])])
|
||||||
|
|
||||||
AC_REPLACE_FUNCS(fseeko)
|
|
||||||
case $host_os in
|
|
||||||
# BSD/OS & NetBSD use a custom fseeko/ftello built on fsetpos/fgetpos
|
|
||||||
# Mingw uses macros to access Win32 API calls
|
|
||||||
bsdi*|netbsd*|mingw*)
|
|
||||||
AC_DEFINE(HAVE_FSEEKO, 1, [Define to 1 because replacement version used.])
|
|
||||||
ac_cv_func_fseeko=yes;;
|
|
||||||
*)
|
|
||||||
AC_FUNC_FSEEKO;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Pthreads
|
# Pthreads
|
||||||
@ -1651,18 +1665,6 @@ operating system; use --disable-thread-safety to disable thread safety.])
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test $ac_cv_func_fseeko = yes; then
|
|
||||||
AC_SYS_LARGEFILE
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check for largefile support (must be after AC_SYS_LARGEFILE)
|
|
||||||
AC_CHECK_SIZEOF([off_t])
|
|
||||||
|
|
||||||
# If we don't have largefile support, can't handle segsize >= 2GB.
|
|
||||||
if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
|
|
||||||
AC_MSG_ERROR([Large file support is not enabled. Segment size cannot be larger than 1GB.])
|
|
||||||
fi
|
|
||||||
|
|
||||||
# SunOS doesn't handle negative byte comparisons properly with +/- return
|
# SunOS doesn't handle negative byte comparisons properly with +/- return
|
||||||
AC_FUNC_MEMCMP
|
AC_FUNC_MEMCMP
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user