From cb90b2dacb14b774ad3ddc68d78ec52f45db78bf Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 1 Aug 2001 23:52:50 +0000 Subject: [PATCH] Digging through previous discussion of this patch, I note where Peter E. points out how silly it is to use Autoconf to test for a preprocessor symbol, when one can equally easily #ifdef on the symbol itself. Accordingly, revert configure to prior state and do it that way. --- configure | 298 ++++++++++++++++++++++-------------------------- configure.in | 13 --- src/backend/libpq/hba.c | 17 ++- src/include/config.h.in | 5 +- 4 files changed, 148 insertions(+), 185 deletions(-) diff --git a/configure b/configure index 12e0a3cc82..ca8f2b00b0 100755 --- a/configure +++ b/configure @@ -5913,41 +5913,13 @@ fi rm -f conftest* -echo $ac_n "checking for SO_PEERCRED""... $ac_c" 1>&6 -echo "configure:5918: checking for SO_PEERCRED" >&5 -cat > conftest.$ac_ext < -#ifdef SO_PEERCRED -HAVE_SO_PEERCRED -#endif -] -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "HAVE_SO_PEERCRED" >/dev/null 2>&1; then - rm -rf conftest* - - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define HAVE_SO_PEERCRED 1 -EOF - - -else - rm -rf conftest* - echo "$ac_t""no" 1>&6 -fi -rm -f conftest* - - echo $ac_n "checking for PS_STRINGS""... $ac_c" 1>&6 -echo "configure:5946: checking for PS_STRINGS" >&5 +echo "configure:5918: checking for PS_STRINGS" >&5 if eval "test \"`echo '$''{'pgac_cv_var_PS_STRINGS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5957,7 +5929,7 @@ PS_STRINGS->ps_nargvstr = 1; PS_STRINGS->ps_argvstr = "foo"; ; return 0; } EOF -if { (eval echo configure:5961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* pgac_cv_var_PS_STRINGS=yes else @@ -5979,12 +5951,12 @@ fi SNPRINTF='' echo $ac_n "checking for snprintf""... $ac_c" 1>&6 -echo "configure:5983: checking for snprintf" >&5 +echo "configure:5955: checking for snprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_snprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_snprintf=yes" else @@ -6031,12 +6003,12 @@ SNPRINTF='snprintf.o' fi echo $ac_n "checking for vsnprintf""... $ac_c" 1>&6 -echo "configure:6035: checking for vsnprintf" >&5 +echo "configure:6007: checking for vsnprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vsnprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vsnprintf=yes" else @@ -6084,7 +6056,7 @@ fi cat > conftest.$ac_ext < EOF @@ -6099,7 +6071,7 @@ fi rm -f conftest* cat > conftest.$ac_ext < EOF @@ -6116,12 +6088,12 @@ rm -f conftest* # do this one the hard way in case isinf() is a macro echo $ac_n "checking for isinf""... $ac_c" 1>&6 -echo "configure:6120: checking for isinf" >&5 +echo "configure:6092: checking for isinf" >&5 if eval "test \"`echo '$''{'ac_cv_func_isinf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -6129,7 +6101,7 @@ int main() { double x = 0.0; int res = isinf(x); ; return 0; } EOF -if { (eval echo configure:6133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_isinf=yes else @@ -6155,12 +6127,12 @@ else for ac_func in fpclass fp_class fp_class_d class do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6159: checking for $ac_func" >&5 +echo "configure:6131: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6211,12 +6183,12 @@ fi echo $ac_n "checking for getrusage""... $ac_c" 1>&6 -echo "configure:6215: checking for getrusage" >&5 +echo "configure:6187: checking for getrusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_getrusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_getrusage=yes" else @@ -6264,12 +6236,12 @@ fi echo $ac_n "checking for srandom""... $ac_c" 1>&6 -echo "configure:6268: checking for srandom" >&5 +echo "configure:6240: checking for srandom" >&5 if eval "test \"`echo '$''{'ac_cv_func_srandom'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_srandom=yes" else @@ -6317,12 +6289,12 @@ fi echo $ac_n "checking for gethostname""... $ac_c" 1>&6 -echo "configure:6321: checking for gethostname" >&5 +echo "configure:6293: checking for gethostname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostname=yes" else @@ -6370,12 +6342,12 @@ fi echo $ac_n "checking for random""... $ac_c" 1>&6 -echo "configure:6374: checking for random" >&5 +echo "configure:6346: checking for random" >&5 if eval "test \"`echo '$''{'ac_cv_func_random'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_random=yes" else @@ -6423,12 +6395,12 @@ fi echo $ac_n "checking for inet_aton""... $ac_c" 1>&6 -echo "configure:6427: checking for inet_aton" >&5 +echo "configure:6399: checking for inet_aton" >&5 if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_inet_aton=yes" else @@ -6476,12 +6448,12 @@ fi echo $ac_n "checking for strerror""... $ac_c" 1>&6 -echo "configure:6480: checking for strerror" >&5 +echo "configure:6452: checking for strerror" >&5 if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strerror=yes" else @@ -6529,12 +6501,12 @@ fi echo $ac_n "checking for strdup""... $ac_c" 1>&6 -echo "configure:6533: checking for strdup" >&5 +echo "configure:6505: checking for strdup" >&5 if eval "test \"`echo '$''{'ac_cv_func_strdup'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strdup=yes" else @@ -6582,12 +6554,12 @@ fi echo $ac_n "checking for strtol""... $ac_c" 1>&6 -echo "configure:6586: checking for strtol" >&5 +echo "configure:6558: checking for strtol" >&5 if eval "test \"`echo '$''{'ac_cv_func_strtol'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strtol=yes" else @@ -6635,12 +6607,12 @@ fi echo $ac_n "checking for strtoul""... $ac_c" 1>&6 -echo "configure:6639: checking for strtoul" >&5 +echo "configure:6611: checking for strtoul" >&5 if eval "test \"`echo '$''{'ac_cv_func_strtoul'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strtoul=yes" else @@ -6688,12 +6660,12 @@ fi echo $ac_n "checking for strcasecmp""... $ac_c" 1>&6 -echo "configure:6692: checking for strcasecmp" >&5 +echo "configure:6664: checking for strcasecmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_strcasecmp'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strcasecmp=yes" else @@ -6741,12 +6713,12 @@ fi echo $ac_n "checking for cbrt""... $ac_c" 1>&6 -echo "configure:6745: checking for cbrt" >&5 +echo "configure:6717: checking for cbrt" >&5 if eval "test \"`echo '$''{'ac_cv_func_cbrt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_cbrt=yes" else @@ -6790,7 +6762,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for cbrt in -lm""... $ac_c" 1>&6 -echo "configure:6794: checking for cbrt in -lm" >&5 +echo "configure:6766: checking for cbrt in -lm" >&5 ac_lib_var=`echo m'_'cbrt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6798,7 +6770,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6847,12 +6819,12 @@ esac echo $ac_n "checking for rint""... $ac_c" 1>&6 -echo "configure:6851: checking for rint" >&5 +echo "configure:6823: checking for rint" >&5 if eval "test \"`echo '$''{'ac_cv_func_rint'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_rint=yes" else @@ -6896,7 +6868,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for rint in -lm""... $ac_c" 1>&6 -echo "configure:6900: checking for rint in -lm" >&5 +echo "configure:6872: checking for rint in -lm" >&5 ac_lib_var=`echo m'_'rint | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6904,7 +6876,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $HPUXMATHLIB $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6944,9 +6916,9 @@ fi # Readline versions < 2.1 don't have rl_completion_append_character echo $ac_n "checking for rl_completion_append_character""... $ac_c" 1>&6 -echo "configure:6948: checking for rl_completion_append_character" >&5 +echo "configure:6920: checking for rl_completion_append_character" >&5 cat > conftest.$ac_ext < #ifdef HAVE_READLINE_READLINE_H @@ -6959,7 +6931,7 @@ int main() { rl_completion_append_character = 'x'; ; return 0; } EOF -if { (eval echo configure:6963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -6977,12 +6949,12 @@ rm -f conftest* for ac_func in rl_completion_matches rl_filename_completion_function do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6981: checking for $ac_func" >&5 +echo "configure:6953: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7032,16 +7004,16 @@ done echo $ac_n "checking for finite""... $ac_c" 1>&6 -echo "configure:7036: checking for finite" >&5 +echo "configure:7008: checking for finite" >&5 cat > conftest.$ac_ext < int main() { int dummy=finite(1.0); ; return 0; } EOF -if { (eval echo configure:7045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_FINITE 1 @@ -7056,16 +7028,16 @@ fi rm -f conftest* echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 -echo "configure:7060: checking for sigsetjmp" >&5 +echo "configure:7032: checking for sigsetjmp" >&5 cat > conftest.$ac_ext < int main() { sigjmp_buf x; sigsetjmp(x, 1); ; return 0; } EOF -if { (eval echo configure:7069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_SIGSETJMP 1 @@ -7085,12 +7057,12 @@ if test x"${enable_syslog+set}" = xset; then case $enable_syslog in yes) echo $ac_n "checking for syslog""... $ac_c" 1>&6 -echo "configure:7089: checking for syslog" >&5 +echo "configure:7061: checking for syslog" >&5 if eval "test \"`echo '$''{'ac_cv_func_syslog'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_syslog=yes" else @@ -7152,19 +7124,19 @@ fi echo $ac_n "checking for optreset""... $ac_c" 1>&6 -echo "configure:7156: checking for optreset" >&5 +echo "configure:7128: checking for optreset" >&5 if eval "test \"`echo '$''{'pgac_cv_var_int_optreset'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { extern int optreset; optreset = 1; ; return 0; } EOF -if { (eval echo configure:7168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* pgac_cv_var_int_optreset=yes else @@ -7190,16 +7162,16 @@ fi # This check should come after all modifications of compiler or linker # variables, and before any other run tests. echo $ac_n "checking test program""... $ac_c" 1>&6 -echo "configure:7194: checking test program" >&5 +echo "configure:7166: checking test program" >&5 if test "$cross_compiling" = yes; then echo "$ac_t""cross-compiling" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "$ac_t""ok" 1>&6 else @@ -7219,7 +7191,7 @@ fi echo $ac_n "checking whether long int is 64 bits""... $ac_c" 1>&6 -echo "configure:7223: checking whether long int is 64 bits" >&5 +echo "configure:7195: checking whether long int is 64 bits" >&5 if eval "test \"`echo '$''{'pgac_cv_type_long_int_64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7228,7 +7200,7 @@ else echo "configure: warning: 64 bit arithmetic disabled when cross-compiling" 1>&2 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then pgac_cv_type_long_int_64=yes else @@ -7284,7 +7256,7 @@ fi if test x"$HAVE_LONG_INT_64" = x"no" ; then echo $ac_n "checking whether long long int is 64 bits""... $ac_c" 1>&6 -echo "configure:7288: checking whether long long int is 64 bits" >&5 +echo "configure:7260: checking whether long long int is 64 bits" >&5 if eval "test \"`echo '$''{'pgac_cv_type_long_long_int_64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7293,7 +7265,7 @@ else echo "configure: warning: 64 bit arithmetic disabled when cross-compiling" 1>&2 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then pgac_cv_type_long_long_int_64=yes else @@ -7352,7 +7324,7 @@ fi if [ x"$HAVE_LONG_LONG_INT_64" = xyes ] ; then cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_LL_CONSTANTS 1 @@ -7380,7 +7352,7 @@ fi if [ x"$HAVE_LONG_LONG_INT_64" = xyes ] ; then if [ x$SNPRINTF = x ] ; then echo $ac_n "checking whether snprintf handles 'long long int' as %lld""... $ac_c" 1>&6 -echo "configure:7384: checking whether snprintf handles 'long long int' as %lld" >&5 +echo "configure:7356: checking whether snprintf handles 'long long int' as %lld" >&5 if test "$cross_compiling" = yes; then echo "$ac_t""assuming not on target machine" 1>&6 # Force usage of our own snprintf, since we cannot test foreign snprintf @@ -7389,7 +7361,7 @@ echo "configure:7384: checking whether snprintf handles 'long long int' as %lld" else cat > conftest.$ac_ext < typedef long long int int64; @@ -7416,7 +7388,7 @@ main() { exit(! does_int64_snprintf_work()); } EOF -if { (eval echo configure:7420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "$ac_t""yes" 1>&6 INT64_FORMAT='"%lld"' @@ -7427,7 +7399,7 @@ else rm -fr conftest* echo "$ac_t""no" 1>&6 echo $ac_n "checking whether snprintf handles 'long long int' as %qd""... $ac_c" 1>&6 -echo "configure:7431: checking whether snprintf handles 'long long int' as %qd" >&5 +echo "configure:7403: checking whether snprintf handles 'long long int' as %qd" >&5 if test "$cross_compiling" = yes; then echo "$ac_t""assuming not on target machine" 1>&6 # Force usage of our own snprintf, since we cannot test foreign snprintf @@ -7436,7 +7408,7 @@ echo "configure:7431: checking whether snprintf handles 'long long int' as %qd" else cat > conftest.$ac_ext < typedef long long int int64; @@ -7463,7 +7435,7 @@ main() { exit(! does_int64_snprintf_work()); } EOF -if { (eval echo configure:7467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "$ac_t""yes" 1>&6 INT64_FORMAT='"%qd"' @@ -7503,12 +7475,12 @@ EOF for ac_func in strtoll strtoq do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7507: checking for $ac_func" >&5 +echo "configure:7479: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7558,12 +7530,12 @@ done for ac_func in strtoull strtouq do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7562: checking for $ac_func" >&5 +echo "configure:7534: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7612,12 +7584,12 @@ done echo $ac_n "checking for atexit""... $ac_c" 1>&6 -echo "configure:7616: checking for atexit" >&5 +echo "configure:7588: checking for atexit" >&5 if eval "test \"`echo '$''{'ac_cv_func_atexit'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_atexit=yes" else @@ -7663,12 +7635,12 @@ else for ac_func in on_exit do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7667: checking for $ac_func" >&5 +echo "configure:7639: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7724,7 +7696,7 @@ fi echo $ac_n "checking size of unsigned long""... $ac_c" 1>&6 -echo "configure:7728: checking size of unsigned long" >&5 +echo "configure:7700: checking size of unsigned long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7732,7 +7704,7 @@ else ac_cv_sizeof_unsigned_long=4 else cat > conftest.$ac_ext < main() @@ -7743,7 +7715,7 @@ main() exit(0); } EOF -if { (eval echo configure:7747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_unsigned_long=`cat conftestval` else @@ -7769,7 +7741,7 @@ EOF echo $ac_n "checking alignment of short""... $ac_c" 1>&6 -echo "configure:7773: checking alignment of short" >&5 +echo "configure:7745: checking alignment of short" >&5 if eval "test \"`echo '$''{'pgac_cv_alignof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7777,7 +7749,7 @@ else pgac_cv_alignof_short='sizeof(short)' else cat > conftest.$ac_ext < struct { char filler; short field; } mystruct; @@ -7789,7 +7761,7 @@ main() exit(0); } EOF -if { (eval echo configure:7793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then pgac_cv_alignof_short=`cat conftestval` else @@ -7809,7 +7781,7 @@ EOF echo $ac_n "checking alignment of int""... $ac_c" 1>&6 -echo "configure:7813: checking alignment of int" >&5 +echo "configure:7785: checking alignment of int" >&5 if eval "test \"`echo '$''{'pgac_cv_alignof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7817,7 +7789,7 @@ else pgac_cv_alignof_int='sizeof(int)' else cat > conftest.$ac_ext < struct { char filler; int field; } mystruct; @@ -7829,7 +7801,7 @@ main() exit(0); } EOF -if { (eval echo configure:7833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then pgac_cv_alignof_int=`cat conftestval` else @@ -7849,7 +7821,7 @@ EOF echo $ac_n "checking alignment of long""... $ac_c" 1>&6 -echo "configure:7853: checking alignment of long" >&5 +echo "configure:7825: checking alignment of long" >&5 if eval "test \"`echo '$''{'pgac_cv_alignof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7857,7 +7829,7 @@ else pgac_cv_alignof_long='sizeof(long)' else cat > conftest.$ac_ext < struct { char filler; long field; } mystruct; @@ -7869,7 +7841,7 @@ main() exit(0); } EOF -if { (eval echo configure:7873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then pgac_cv_alignof_long=`cat conftestval` else @@ -7890,7 +7862,7 @@ EOF if [ x"$HAVE_LONG_LONG_INT_64" = xyes ] ; then echo $ac_n "checking alignment of long long int""... $ac_c" 1>&6 -echo "configure:7894: checking alignment of long long int" >&5 +echo "configure:7866: checking alignment of long long int" >&5 if eval "test \"`echo '$''{'pgac_cv_alignof_long_long_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7898,7 +7870,7 @@ else pgac_cv_alignof_long_long_int='sizeof(long long int)' else cat > conftest.$ac_ext < struct { char filler; long long int field; } mystruct; @@ -7910,7 +7882,7 @@ main() exit(0); } EOF -if { (eval echo configure:7914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then pgac_cv_alignof_long_long_int=`cat conftestval` else @@ -7931,7 +7903,7 @@ EOF fi echo $ac_n "checking alignment of double""... $ac_c" 1>&6 -echo "configure:7935: checking alignment of double" >&5 +echo "configure:7907: checking alignment of double" >&5 if eval "test \"`echo '$''{'pgac_cv_alignof_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7939,7 +7911,7 @@ else pgac_cv_alignof_double='sizeof(double)' else cat > conftest.$ac_ext < struct { char filler; double field; } mystruct; @@ -7951,7 +7923,7 @@ main() exit(0); } EOF -if { (eval echo configure:7955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then pgac_cv_alignof_double=`cat conftestval` else @@ -7989,12 +7961,12 @@ EOF echo $ac_n "checking for POSIX signal interface""... $ac_c" 1>&6 -echo "configure:7993: checking for POSIX signal interface" >&5 +echo "configure:7965: checking for POSIX signal interface" >&5 if eval "test \"`echo '$''{'pgac_cv_func_posix_signals'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -8005,7 +7977,7 @@ act.sa_flags = SA_RESTART; sigaction(0, &act, &oact); ; return 0; } EOF -if { (eval echo configure:8009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* pgac_cv_func_posix_signals=yes else @@ -8035,7 +8007,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:8039: checking for $ac_word" >&5 +echo "configure:8011: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_TCLSH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8071,7 +8043,7 @@ test -n "$TCLSH" && break done echo $ac_n "checking for tclConfig.sh""... $ac_c" 1>&6 -echo "configure:8075: checking for tclConfig.sh" >&5 +echo "configure:8047: checking for tclConfig.sh" >&5 # Let user override test if test -z "$TCL_CONFIG_SH"; then pgac_test_dirs="$with_tclconfig" @@ -8104,7 +8076,7 @@ fi # Check for Tk configuration script tkConfig.sh if test "$with_tk" = yes; then echo $ac_n "checking for tkConfig.sh""... $ac_c" 1>&6 -echo "configure:8108: checking for tkConfig.sh" >&5 +echo "configure:8080: checking for tkConfig.sh" >&5 # Let user override test if test -z "$TK_CONFIG_SH"; then pgac_test_dirs="$with_tkconfig $with_tclconfig" @@ -8143,7 +8115,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:8147: checking for $ac_word" >&5 +echo "configure:8119: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_NSGMLS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8179,7 +8151,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:8183: checking for $ac_word" >&5 +echo "configure:8155: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_JADE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8210,7 +8182,7 @@ done echo $ac_n "checking for DocBook V3.1""... $ac_c" 1>&6 -echo "configure:8214: checking for DocBook V3.1" >&5 +echo "configure:8186: checking for DocBook V3.1" >&5 if eval "test \"`echo '$''{'pgac_cv_check_docbook'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8243,7 +8215,7 @@ have_docbook=$pgac_cv_check_docbook echo $ac_n "checking for DocBook stylesheets""... $ac_c" 1>&6 -echo "configure:8247: checking for DocBook stylesheets" >&5 +echo "configure:8219: checking for DocBook stylesheets" >&5 if eval "test \"`echo '$''{'pgac_cv_path_stylesheets'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8282,7 +8254,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:8286: checking for $ac_word" >&5 +echo "configure:8258: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_SGMLSPL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else diff --git a/configure.in b/configure.in index c9af97065f..076fd8a0fd 100644 --- a/configure.in +++ b/configure.in @@ -801,19 +801,6 @@ AC_CHECK_FUNCS([fcvt getopt_long memmove pstat setproctitle setsid sigprocmask s dnl Check whether declares fdatasync(). AC_EGREP_HEADER(fdatasync, unistd.h, AC_DEFINE(HAVE_FDATASYNC_DECL)) -AC_MSG_CHECKING([for SO_PEERCRED]) -AC_EGREP_CPP(HAVE_SO_PEERCRED, -#include -#ifdef SO_PEERCRED -HAVE_SO_PEERCRED -#endif -], -[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SO_PEERCRED) -], -[AC_MSG_RESULT(no)]) - AC_CACHE_CHECK([for PS_STRINGS], [pgac_cv_var_PS_STRINGS], [AC_TRY_LINK( [#include diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c index 905cb61121..b16571a454 100644 --- a/src/backend/libpq/hba.c +++ b/src/backend/libpq/hba.c @@ -5,7 +5,12 @@ * wherein you authenticate a user by seeing what IP address the system * says he comes from and possibly using ident). * - * $Id: hba.c,v 1.58 2001/08/01 23:25:39 tgl Exp $ + * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group + * Portions Copyright (c) 1994, Regents of the University of California + * + * + * IDENTIFICATION + * $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.59 2001/08/01 23:52:50 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -292,7 +297,7 @@ parse_hba(List *line, hbaPort *port, bool *found_p, bool *error_p) if (port->auth_method == uaKrb4 || port->auth_method == uaKrb5) goto hba_syntax; -#ifndef HAVE_SO_PEERCRED +#ifndef SO_PEERCRED if (port->auth_method == uaIdent) { /* Give a special error message for this case... */ @@ -861,7 +866,8 @@ ident_inet(const struct in_addr remote_ip_addr, return ident_return; } -#ifdef HAVE_SO_PEERCRED +#ifdef SO_PEERCRED + /* * Ask kernel about the credentials of the connecting process and * determine the symbolic name of the corresponding user. @@ -923,7 +929,8 @@ ident_unix(int sock, char *ident_user) return true; } -#endif + +#endif /* SO_PEERCRED */ /* * Determine the username of the initiator of the connection described @@ -947,7 +954,7 @@ authident(hbaPort *port) port->laddr.in.sin_port, ident_user)) return STATUS_ERROR; break; -#ifdef HAVE_SO_PEERCRED +#ifdef SO_PEERCRED case AF_UNIX: if (!ident_unix(port->sock, ident_user)) return STATUS_ERROR; diff --git a/src/include/config.h.in b/src/include/config.h.in index 971a32a3ac..c0559089eb 100644 --- a/src/include/config.h.in +++ b/src/include/config.h.in @@ -8,7 +8,7 @@ * or in config.h afterwards. Of course, if you edit config.h, then your * changes will be overwritten the next time you run configure. * - * $Id: config.h.in,v 1.169 2001/08/01 23:25:39 tgl Exp $ + * $Id: config.h.in,v 1.170 2001/08/01 23:52:50 tgl Exp $ */ #ifndef CONFIG_H @@ -685,9 +685,6 @@ extern int fdatasync(int fildes); /* Define if you have on_exit() */ #undef HAVE_ON_EXIT -/* Define if you have SO_PEERCRED */ -#undef HAVE_SO_PEERCRED - /* *------------------------------------------------------------------------ * Part 4: pull in system-specific declarations. -- 2.11.0