Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit77b044f

Browse files
committed
Disable effective_io_concurrency on Solaris because posix_fadvise() is
no-op on that platform.
1 parent555b46e commit77b044f

File tree

2 files changed

+137
-31
lines changed

2 files changed

+137
-31
lines changed

‎configure

Lines changed: 127 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -16324,8 +16324,7 @@ fi
1632416324

1632516325

1632616326

16327-
16328-
for ac_func in cbrt dlopen fcvt fdatasync getpeereid getpeerucred getrlimit memmove poll posix_fadvise pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs
16327+
for ac_func in cbrt dlopen fcvt fdatasync getpeereid getpeerucred getrlimit memmove poll pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs
1632916328
do
1633016329
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
1633116330
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -16419,9 +16418,17 @@ fi
1641916418
done
1642016419

1642116420

16422-
{ echo "$as_me:$LINENO: checking whether fdatasync is declared" >&5
16423-
echo $ECHO_N "checking whether fdatasync is declared... $ECHO_C" >&6; }
16424-
if test "${ac_cv_have_decl_fdatasync+set}" = set; then
16421+
# posix_fadvise() is a no-op on Solaris, so don't incur function overhead
16422+
# by calling it, 2009-04-02
16423+
# http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
16424+
if test "$PORTNAME" != "solaris"; then
16425+
16426+
for ac_func in posix_fadvise
16427+
do
16428+
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16429+
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16430+
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16431+
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
1642516432
echo $ECHO_N "(cached) $ECHO_C" >&6
1642616433
else
1642716434
cat >conftest.$ac_ext <<_ACEOF
@@ -16430,13 +16437,103 @@ _ACEOF
1643016437
cat confdefs.h >>conftest.$ac_ext
1643116438
cat >>conftest.$ac_ext <<_ACEOF
1643216439
/* end confdefs.h. */
16433-
#include <unistd.h>
16440+
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16441+
For example, HP-UX 11i <limits.h> declares gettimeofday. */
16442+
#define $ac_func innocuous_$ac_func
16443+
16444+
/* System header to define __stub macros and hopefully few prototypes,
16445+
which can conflict with char $ac_func (); below.
16446+
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16447+
<limits.h> exists even on freestanding compilers. */
16448+
16449+
#ifdef __STDC__
16450+
# include <limits.h>
16451+
#else
16452+
# include <assert.h>
16453+
#endif
16454+
16455+
#undef $ac_func
16456+
16457+
/* Override any GCC internal prototype to avoid an error.
16458+
Use char because int might match the return type of a GCC
16459+
builtin and then its argument prototype would still apply. */
16460+
#ifdef __cplusplus
16461+
extern "C"
16462+
#endif
16463+
char $ac_func ();
16464+
/* The GNU C library defines this for functions which it implements
16465+
to always fail with ENOSYS. Some functions are actually named
16466+
something starting with __ and the normal name is an alias. */
16467+
#if defined __stub_$ac_func || defined __stub___$ac_func
16468+
choke me
16469+
#endif
1643416470

1643516471
int
1643616472
main ()
1643716473
{
16438-
#ifndef fdatasync
16439-
(void) fdatasync;
16474+
return $ac_func ();
16475+
;
16476+
return 0;
16477+
}
16478+
_ACEOF
16479+
rm -f conftest.$ac_objext conftest$ac_exeext
16480+
if { (ac_try="$ac_link"
16481+
case "(($ac_try" in
16482+
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16483+
*) ac_try_echo=$ac_try;;
16484+
esac
16485+
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16486+
(eval "$ac_link") 2>conftest.er1
16487+
ac_status=$?
16488+
grep -v '^ *+' conftest.er1 >conftest.err
16489+
rm -f conftest.er1
16490+
cat conftest.err >&5
16491+
echo "$as_me:$LINENO: \$? = $ac_status" >&5
16492+
(exit $ac_status); } && {
16493+
test -z "$ac_c_werror_flag" ||
16494+
test ! -s conftest.err
16495+
} && test -s conftest$ac_exeext &&
16496+
$as_test_x conftest$ac_exeext; then
16497+
eval "$as_ac_var=yes"
16498+
else
16499+
echo "$as_me: failed program was:" >&5
16500+
sed 's/^/| /' conftest.$ac_ext >&5
16501+
16502+
eval "$as_ac_var=no"
16503+
fi
16504+
16505+
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16506+
conftest$ac_exeext conftest.$ac_ext
16507+
fi
16508+
ac_res=`eval echo '${'$as_ac_var'}'`
16509+
{ echo "$as_me:$LINENO: result: $ac_res" >&5
16510+
echo "${ECHO_T}$ac_res" >&6; }
16511+
if test `eval echo '${'$as_ac_var'}'` = yes; then
16512+
cat >>confdefs.h <<_ACEOF
16513+
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16514+
_ACEOF
16515+
16516+
fi
16517+
done
16518+
16519+
{ echo "$as_me:$LINENO: checking whether posix_fadvise is declared" >&5
16520+
echo $ECHO_N "checking whether posix_fadvise is declared... $ECHO_C" >&6; }
16521+
if test "${ac_cv_have_decl_posix_fadvise+set}" = set; then
16522+
echo $ECHO_N "(cached) $ECHO_C" >&6
16523+
else
16524+
cat >conftest.$ac_ext <<_ACEOF
16525+
/* confdefs.h. */
16526+
_ACEOF
16527+
cat confdefs.h >>conftest.$ac_ext
16528+
cat >>conftest.$ac_ext <<_ACEOF
16529+
/* end confdefs.h. */
16530+
#include <fcntl.h>
16531+
16532+
int
16533+
main ()
16534+
{
16535+
#ifndef posix_fadvise
16536+
(void) posix_fadvise;
1644016537
#endif
1644116538

1644216539
;
@@ -16460,37 +16557,39 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
1646016557
test -z "$ac_c_werror_flag" ||
1646116558
test ! -s conftest.err
1646216559
} && test -s conftest.$ac_objext; then
16463-
ac_cv_have_decl_fdatasync=yes
16560+
ac_cv_have_decl_posix_fadvise=yes
1646416561
else
1646516562
echo "$as_me: failed program was:" >&5
1646616563
sed 's/^/| /' conftest.$ac_ext >&5
1646716564

16468-
ac_cv_have_decl_fdatasync=no
16565+
ac_cv_have_decl_posix_fadvise=no
1646916566
fi
1647016567

1647116568
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1647216569
fi
16473-
{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_fdatasync" >&5
16474-
echo "${ECHO_T}$ac_cv_have_decl_fdatasync" >&6; }
16475-
if test $ac_cv_have_decl_fdatasync = yes; then
16570+
{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_posix_fadvise" >&5
16571+
echo "${ECHO_T}$ac_cv_have_decl_posix_fadvise" >&6; }
16572+
if test $ac_cv_have_decl_posix_fadvise = yes; then
1647616573

1647716574
cat >>confdefs.h <<_ACEOF
16478-
#defineHAVE_DECL_FDATASYNC 1
16575+
#defineHAVE_DECL_POSIX_FADVISE 1
1647916576
_ACEOF
1648016577

1648116578

1648216579
else
1648316580
cat >>confdefs.h <<_ACEOF
16484-
#defineHAVE_DECL_FDATASYNC 0
16581+
#defineHAVE_DECL_POSIX_FADVISE 0
1648516582
_ACEOF
1648616583

1648716584

1648816585
fi
1648916586

1649016587

16491-
{ echo "$as_me:$LINENO: checking whether posix_fadvise is declared" >&5
16492-
echo $ECHO_N "checking whether posix_fadvise is declared... $ECHO_C" >&6; }
16493-
if test "${ac_cv_have_decl_posix_fadvise+set}" = set; then
16588+
fi
16589+
16590+
{ echo "$as_me:$LINENO: checking whether fdatasync is declared" >&5
16591+
echo $ECHO_N "checking whether fdatasync is declared... $ECHO_C" >&6; }
16592+
if test "${ac_cv_have_decl_fdatasync+set}" = set; then
1649416593
echo $ECHO_N "(cached) $ECHO_C" >&6
1649516594
else
1649616595
cat >conftest.$ac_ext <<_ACEOF
@@ -16499,13 +16598,13 @@ _ACEOF
1649916598
cat confdefs.h >>conftest.$ac_ext
1650016599
cat >>conftest.$ac_ext <<_ACEOF
1650116600
/* end confdefs.h. */
16502-
#include <fcntl.h>
16601+
#include <unistd.h>
1650316602

1650416603
int
1650516604
main ()
1650616605
{
16507-
#ifndefposix_fadvise
16508-
(void)posix_fadvise;
16606+
#ifndeffdatasync
16607+
(void)fdatasync;
1650916608
#endif
1651016609

1651116610
;
@@ -16529,28 +16628,28 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
1652916628
test -z "$ac_c_werror_flag" ||
1653016629
test ! -s conftest.err
1653116630
} && test -s conftest.$ac_objext; then
16532-
ac_cv_have_decl_posix_fadvise=yes
16631+
ac_cv_have_decl_fdatasync=yes
1653316632
else
1653416633
echo "$as_me: failed program was:" >&5
1653516634
sed 's/^/| /' conftest.$ac_ext >&5
1653616635

16537-
ac_cv_have_decl_posix_fadvise=no
16636+
ac_cv_have_decl_fdatasync=no
1653816637
fi
1653916638

1654016639
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1654116640
fi
16542-
{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_posix_fadvise" >&5
16543-
echo "${ECHO_T}$ac_cv_have_decl_posix_fadvise" >&6; }
16544-
if test $ac_cv_have_decl_posix_fadvise = yes; then
16641+
{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_fdatasync" >&5
16642+
echo "${ECHO_T}$ac_cv_have_decl_fdatasync" >&6; }
16643+
if test $ac_cv_have_decl_fdatasync = yes; then
1654516644

1654616645
cat >>confdefs.h <<_ACEOF
16547-
#defineHAVE_DECL_POSIX_FADVISE 1
16646+
#defineHAVE_DECL_FDATASYNC 1
1654816647
_ACEOF
1654916648

1655016649

1655116650
else
1655216651
cat >>confdefs.h <<_ACEOF
16553-
#defineHAVE_DECL_POSIX_FADVISE 0
16652+
#defineHAVE_DECL_FDATASYNC 0
1655416653
_ACEOF
1655516654

1655616655

‎configure.in

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dnl Process this file with autoconf to produce a configure script.
2-
dnl $PostgreSQL: pgsql/configure.in,v 1.593 2009/04/04 21:55:50 tgl Exp $
2+
dnl $PostgreSQL: pgsql/configure.in,v 1.594 2009/04/07 22:48:30 momjian Exp $
33
dnl
44
dnl Developers, please strive to achieve this order:
55
dnl
@@ -1141,10 +1141,17 @@ PGAC_VAR_INT_TIMEZONE
11411141
AC_FUNC_ACCEPT_ARGTYPES
11421142
PGAC_FUNC_GETTIMEOFDAY_1ARG
11431143

1144-
AC_CHECK_FUNCS([cbrt dlopen fcvt fdatasync getpeereid getpeerucred getrlimit memmove pollposix_fadvisepstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs])
1144+
AC_CHECK_FUNCS([cbrt dlopen fcvt fdatasync getpeereid getpeerucred getrlimit memmove poll pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs])
11451145

1146-
AC_CHECK_DECLS(fdatasync, [], [], [#include <unistd.h>])
1146+
# posix_fadvise() is a no-op on Solaris, so don't incur function overhead
1147+
# by calling it, 2009-04-02
1148+
# http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
1149+
if test "$PORTNAME" != "solaris"; then
1150+
AC_CHECK_FUNCS(posix_fadvise)
11471151
AC_CHECK_DECLS(posix_fadvise, [], [], [#include <fcntl.h>])
1152+
fi
1153+
1154+
AC_CHECK_DECLS(fdatasync, [], [], [#include <unistd.h>])
11481155
AC_CHECK_DECLS([strlcat, strlcpy])
11491156
# This is probably only present on Darwin, but may as well check always
11501157
AC_CHECK_DECLS(F_FULLFSYNC, [], [], [#include <fcntl.h>])

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp