Index: configure.in
===================================================================
RCS file: /cvsroot/pgsql/configure.in,v
retrieving revision 1.592
diff -c -c -r1.592 configure.in
*** configure.in	27 Mar 2009 19:58:11 -0000	1.592
--- configure.in	2 Apr 2009 21:23:36 -0000
***************
*** 1141,1150 ****
  AC_FUNC_ACCEPT_ARGTYPES
  PGAC_FUNC_GETTIMEOFDAY_1ARG
  
! AC_CHECK_FUNCS([cbrt dlopen fcvt fdatasync getpeereid getpeerucred getrlimit memmove poll posix_fadvise pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs])
  
! AC_CHECK_DECLS(fdatasync, [], [], [#include <unistd.h>])
  AC_CHECK_DECLS(posix_fadvise, [], [], [#include <fcntl.h>])
  AC_CHECK_DECLS([strlcat, strlcpy])
  # This is probably only present on Darwin, but may as well check always
  AC_CHECK_DECLS(F_FULLFSYNC, [], [], [#include <fcntl.h>])
--- 1141,1157 ----
  AC_FUNC_ACCEPT_ARGTYPES
  PGAC_FUNC_GETTIMEOFDAY_1ARG
  
! AC_CHECK_FUNCS([cbrt dlopen fcvt fdatasync getpeereid getpeerucred getrlimit memmove poll pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs])
  
! # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
! # by calling it, 2009-04-02
! # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
! if test "$PORTNAME" != "solaris"; then
! AC_CHECK_FUNCS(posix_fadvise);
  AC_CHECK_DECLS(posix_fadvise, [], [], [#include <fcntl.h>])
+ fi
+ 
+ AC_CHECK_DECLS(fdatasync, [], [], [#include <unistd.h>])
  AC_CHECK_DECLS([strlcat, strlcpy])
  # This is probably only present on Darwin, but may as well check always
  AC_CHECK_DECLS(F_FULLFSYNC, [], [], [#include <fcntl.h>])
