Ok. I have decided to use:

#if defined(sun) && if defined(sparc) && !defined(__svr4)

instead of defined(sunos4).  interfaces/libpq/libpq-fe.h and
include/c.h have been modified(see included patches).

Another porblems I have found are:

o SunOS lacks strtoul(). to fix this I stole strtoul.c from FreeBSD
and place it under backend/port. necessary modifications have been
also made to backend/port/Makefile.in, include/config.h.in and
configure.in (see included patches).
This commit is contained in:
Marc G. Fournier 1998-02-24 06:04:55 +00:00
parent 712e77e3df
commit 96316211c3
8 changed files with 263 additions and 90 deletions

View File

@ -13,7 +13,7 @@
# be converted to Method 2.
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/port/Attic/Makefile.in,v 1.14 1998/01/13 19:21:40 scrappy Exp $
# $Header: /cvsroot/pgsql/src/backend/port/Attic/Makefile.in,v 1.15 1998/02/24 06:04:30 scrappy Exp $
#
#-------------------------------------------------------------------------
@ -26,7 +26,7 @@ CFLAGS+= ${INCLUDE_OPT}
OBJS = dynloader.o @INET_ATON@ @STRERROR@ @MISSING_RANDOM@ @SRANDOM@
OBJS+= @GETHOSTNAME@ @GETRUSAGE@ @STRCASECMP@ @STRDUP@ @TAS@ @ISINF@
OBJS+= @STRTOL@ @STRTOUL@
all: SUBSYS.o
SUBSYS.o: $(OBJS)

109
src/backend/port/strtoul.c Normal file
View File

@ -0,0 +1,109 @@
/*
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)strtoul.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
#include <limits.h>
#include <ctype.h>
#include <errno.h>
#include <stdlib.h>
/*
* Convert a string to an unsigned long integer.
*
* Ignores `locale' stuff. Assumes that the upper and lower case
* alphabets and digits are each contiguous.
*/
unsigned long
strtoul(nptr, endptr, base)
const char *nptr;
char **endptr;
register int base;
{
register const char *s = nptr;
register unsigned long acc;
register unsigned char c;
register unsigned long cutoff;
register int neg = 0, any, cutlim;
/*
* See strtol for comments as to the logic used.
*/
do {
c = *s++;
} while (isspace(c));
if (c == '-') {
neg = 1;
c = *s++;
} else if (c == '+')
c = *s++;
if ((base == 0 || base == 16) &&
c == '0' && (*s == 'x' || *s == 'X')) {
c = s[1];
s += 2;
base = 16;
}
if (base == 0)
base = c == '0' ? 8 : 10;
cutoff = (unsigned long)ULONG_MAX / (unsigned long)base;
cutlim = (unsigned long)ULONG_MAX % (unsigned long)base;
for (acc = 0, any = 0;; c = *s++) {
if (!isascii(c))
break;
if (isdigit(c))
c -= '0';
else if (isalpha(c))
c -= isupper(c) ? 'A' - 10 : 'a' - 10;
else
break;
if (c >= base)
break;
if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
any = -1;
else {
any = 1;
acc *= base;
acc += c;
}
}
if (any < 0) {
acc = ULONG_MAX;
errno = ERANGE;
} else if (neg)
acc = -acc;
if (endptr != 0)
*endptr = (char *)(any ? s - 1 : nptr);
return (acc);
}

220
src/configure vendored
View File

@ -4135,16 +4135,70 @@ EOF
else
echo "$ac_t""no" 1>&6
STRDUP='strtol.o'
STRTOL='strtol.o'
fi
echo $ac_n "checking for strtoul""... $ac_c" 1>&6
echo "configure:4144: 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 <<EOF
#line 4149 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char strtoul(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char strtoul();
int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_strtoul) || defined (__stub___strtoul)
choke me
#else
strtoul();
#endif
; return 0; }
EOF
if { (eval echo configure:4172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_strtoul=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_strtoul=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'strtoul`\" = yes"; then
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
#define HAVE_STRTOUL 1
EOF
else
echo "$ac_t""no" 1>&6
STRTOL='strtoul.o'
fi
echo $ac_n "checking for strcasecmp""... $ac_c" 1>&6
echo "configure:4143: checking for strcasecmp" >&5
echo "configure:4197: 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 <<EOF
#line 4148 "configure"
#line 4202 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char strcasecmp(); below. */
@ -4167,7 +4221,7 @@ strcasecmp();
; return 0; }
EOF
if { (eval echo configure:4171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:4225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_strcasecmp=yes"
else
@ -4192,12 +4246,12 @@ fi
echo $ac_n "checking for cbrt""... $ac_c" 1>&6
echo "configure:4196: checking for cbrt" >&5
echo "configure:4250: 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 <<EOF
#line 4201 "configure"
#line 4255 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char cbrt(); below. */
@ -4220,7 +4274,7 @@ cbrt();
; return 0; }
EOF
if { (eval echo configure:4224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:4278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_cbrt=yes"
else
@ -4241,7 +4295,7 @@ EOF
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for cbrt in -lm""... $ac_c" 1>&6
echo "configure:4245: checking for cbrt in -lm" >&5
echo "configure:4299: 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
@ -4249,7 +4303,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4253 "configure"
#line 4307 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -4260,7 +4314,7 @@ int main() {
cbrt()
; return 0; }
EOF
if { (eval echo configure:4264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:4318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -4286,12 +4340,12 @@ fi
fi
echo $ac_n "checking for rint""... $ac_c" 1>&6
echo "configure:4290: checking for rint" >&5
echo "configure:4344: 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 <<EOF
#line 4295 "configure"
#line 4349 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char rint(); below. */
@ -4314,7 +4368,7 @@ rint();
; return 0; }
EOF
if { (eval echo configure:4318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:4372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_rint=yes"
else
@ -4335,7 +4389,7 @@ EOF
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for rint in -lm""... $ac_c" 1>&6
echo "configure:4339: checking for rint in -lm" >&5
echo "configure:4393: 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
@ -4343,7 +4397,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4347 "configure"
#line 4401 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -4354,7 +4408,7 @@ int main() {
rint()
; return 0; }
EOF
if { (eval echo configure:4358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:4412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -4381,7 +4435,7 @@ fi
echo $ac_n "checking setting USE_LOCALE""... $ac_c" 1>&6
echo "configure:4385: checking setting USE_LOCALE" >&5
echo "configure:4439: checking setting USE_LOCALE" >&5
if test "$USE_LOCALE" = "yes"
then
echo "$ac_t""enabled" 1>&6
@ -4393,7 +4447,7 @@ else
echo "$ac_t""disabled" 1>&6
fi
echo $ac_n "checking setting DEF_PGPORT""... $ac_c" 1>&6
echo "configure:4397: checking setting DEF_PGPORT" >&5
echo "configure:4451: checking setting DEF_PGPORT" >&5
cat >> confdefs.h <<EOF
#define DEF_PGPORT "${DEF_PGPORT}"
EOF
@ -4413,7 +4467,7 @@ ice_save_LDFLAGS="$LDFLAGS"
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
echo "configure:4417: checking for X" >&5
echo "configure:4471: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
@ -4475,12 +4529,12 @@ if test "$ac_x_includes" = NO; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
#line 4479 "configure"
#line 4533 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4484: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:4538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -4549,14 +4603,14 @@ if test "$ac_x_libraries" = NO; then
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4553 "configure"
#line 4607 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
if { (eval echo configure:4560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:4614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
@ -4662,17 +4716,17 @@ else
case "`(uname -sr) 2>/dev/null`" in
"SunOS 5"*)
echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
echo "configure:4666: checking whether -R must be followed by a space" >&5
echo "configure:4720: checking whether -R must be followed by a space" >&5
ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
cat > conftest.$ac_ext <<EOF
#line 4669 "configure"
#line 4723 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if { (eval echo configure:4676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:4730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_R_nospace=yes
else
@ -4688,14 +4742,14 @@ rm -f conftest*
else
LIBS="$ac_xsave_LIBS -R $x_libraries"
cat > conftest.$ac_ext <<EOF
#line 4692 "configure"
#line 4746 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if { (eval echo configure:4699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:4753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_R_space=yes
else
@ -4727,7 +4781,7 @@ rm -f conftest*
# libraries were built with DECnet support. And karl@cs.umb.edu says
# the Alpha needs dnet_stub (dnet does not exist).
echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
echo "configure:4731: checking for dnet_ntoa in -ldnet" >&5
echo "configure:4785: checking for dnet_ntoa in -ldnet" >&5
ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -4735,7 +4789,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldnet $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4739 "configure"
#line 4793 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -4746,7 +4800,7 @@ int main() {
dnet_ntoa()
; return 0; }
EOF
if { (eval echo configure:4750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:4804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -4768,7 +4822,7 @@ fi
if test $ac_cv_lib_dnet_dnet_ntoa = no; then
echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
echo "configure:4772: checking for dnet_ntoa in -ldnet_stub" >&5
echo "configure:4826: checking for dnet_ntoa in -ldnet_stub" >&5
ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -4776,7 +4830,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldnet_stub $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4780 "configure"
#line 4834 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -4787,7 +4841,7 @@ int main() {
dnet_ntoa()
; return 0; }
EOF
if { (eval echo configure:4791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:4845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -4816,12 +4870,12 @@ fi
# The nsl library prevents programs from opening the X display
# on Irix 5.2, according to dickey@clark.net.
echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
echo "configure:4820: checking for gethostbyname" >&5
echo "configure:4874: checking for gethostbyname" >&5
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4825 "configure"
#line 4879 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gethostbyname(); below. */
@ -4844,7 +4898,7 @@ gethostbyname();
; return 0; }
EOF
if { (eval echo configure:4848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:4902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_gethostbyname=yes"
else
@ -4865,7 +4919,7 @@ fi
if test $ac_cv_func_gethostbyname = no; then
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
echo "configure:4869: checking for gethostbyname in -lnsl" >&5
echo "configure:4923: checking for gethostbyname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -4873,7 +4927,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4877 "configure"
#line 4931 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -4884,7 +4938,7 @@ int main() {
gethostbyname()
; return 0; }
EOF
if { (eval echo configure:4888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:4942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -4914,12 +4968,12 @@ fi
# -lsocket must be given before -lnsl if both are needed.
# We assume that if connect needs -lnsl, so does gethostbyname.
echo $ac_n "checking for connect""... $ac_c" 1>&6
echo "configure:4918: checking for connect" >&5
echo "configure:4972: checking for connect" >&5
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4923 "configure"
#line 4977 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char connect(); below. */
@ -4942,7 +4996,7 @@ connect();
; return 0; }
EOF
if { (eval echo configure:4946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:5000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_connect=yes"
else
@ -4963,7 +5017,7 @@ fi
if test $ac_cv_func_connect = no; then
echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
echo "configure:4967: checking for connect in -lsocket" >&5
echo "configure:5021: checking for connect in -lsocket" >&5
ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -4971,7 +5025,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4975 "configure"
#line 5029 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -4982,7 +5036,7 @@ int main() {
connect()
; return 0; }
EOF
if { (eval echo configure:4986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:5040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -5006,12 +5060,12 @@ fi
# gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
echo $ac_n "checking for remove""... $ac_c" 1>&6
echo "configure:5010: checking for remove" >&5
echo "configure:5064: checking for remove" >&5
if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 5015 "configure"
#line 5069 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char remove(); below. */
@ -5034,7 +5088,7 @@ remove();
; return 0; }
EOF
if { (eval echo configure:5038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:5092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_remove=yes"
else
@ -5055,7 +5109,7 @@ fi
if test $ac_cv_func_remove = no; then
echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
echo "configure:5059: checking for remove in -lposix" >&5
echo "configure:5113: checking for remove in -lposix" >&5
ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -5063,7 +5117,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lposix $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5067 "configure"
#line 5121 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -5074,7 +5128,7 @@ int main() {
remove()
; return 0; }
EOF
if { (eval echo configure:5078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:5132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -5098,12 +5152,12 @@ fi
# BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
echo $ac_n "checking for shmat""... $ac_c" 1>&6
echo "configure:5102: checking for shmat" >&5
echo "configure:5156: checking for shmat" >&5
if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 5107 "configure"
#line 5161 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char shmat(); below. */
@ -5126,7 +5180,7 @@ shmat();
; return 0; }
EOF
if { (eval echo configure:5130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:5184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_shmat=yes"
else
@ -5147,7 +5201,7 @@ fi
if test $ac_cv_func_shmat = no; then
echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
echo "configure:5151: checking for shmat in -lipc" >&5
echo "configure:5205: checking for shmat in -lipc" >&5
ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -5155,7 +5209,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lipc $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5159 "configure"
#line 5213 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -5166,7 +5220,7 @@ int main() {
shmat()
; return 0; }
EOF
if { (eval echo configure:5170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:5224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -5199,7 +5253,7 @@ fi
# libraries we check for below, so use a different variable.
# --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
echo "configure:5203: checking for IceConnectionNumber in -lICE" >&5
echo "configure:5257: checking for IceConnectionNumber in -lICE" >&5
ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -5207,7 +5261,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lICE $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5211 "configure"
#line 5265 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -5218,7 +5272,7 @@ int main() {
IceConnectionNumber()
; return 0; }
EOF
if { (eval echo configure:5222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:5276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -5251,7 +5305,7 @@ LDFLAGS="$LDFLAGS $X_LIBS"
X11_LIBS=""
echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
echo "configure:5255: checking for XOpenDisplay in -lX11" >&5
echo "configure:5309: checking for XOpenDisplay in -lX11" >&5
ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -5259,7 +5313,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lX11 ${X_PRE_LIBS} $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5263 "configure"
#line 5317 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -5270,7 +5324,7 @@ int main() {
XOpenDisplay()
; return 0; }
EOF
if { (eval echo configure:5274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:5328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -5312,17 +5366,17 @@ then
TCL_INCDIR=no
ac_safe=`echo "tcl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for tcl.h""... $ac_c" 1>&6
echo "configure:5316: checking for tcl.h" >&5
echo "configure:5370: checking for tcl.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 5321 "configure"
#line 5375 "configure"
#include "confdefs.h"
#include <tcl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:5380: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -5347,17 +5401,17 @@ for f in /usr/include /usr/include/tcl8.0 /usr/local/include /usr/local/include/
if test "$TCL_INCDIR" = "no"; then
ac_safe=`echo "$f/tcl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $f/tcl.h""... $ac_c" 1>&6
echo "configure:5351: checking for $f/tcl.h" >&5
echo "configure:5405: checking for $f/tcl.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 5356 "configure"
#line 5410 "configure"
#include "confdefs.h"
#include <$f/tcl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5361: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:5415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -5393,7 +5447,7 @@ TCL_LIB=
for f in tcl8.0 tcl80; do
if test -z "$TCL_LIB"; then
echo $ac_n "checking for main in -l$f""... $ac_c" 1>&6
echo "configure:5397: checking for main in -l$f" >&5
echo "configure:5451: checking for main in -l$f" >&5
ac_lib_var=`echo $f'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -5401,14 +5455,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$f $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5405 "configure"
#line 5459 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
if { (eval echo configure:5412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:5466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -5453,17 +5507,17 @@ CPPFLAGS="$CPPFLAGS $X_CFLAGS -I$TCL_INCDIR"
TK_INCDIR=no
ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for tk.h""... $ac_c" 1>&6
echo "configure:5457: checking for tk.h" >&5
echo "configure:5511: checking for tk.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 5462 "configure"
#line 5516 "configure"
#include "confdefs.h"
#include <tk.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5467: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:5521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -5488,17 +5542,17 @@ for f in /usr/include /usr/include/tk8.0 /usr/local/include /usr/local/include/t
if test "$TK_INCDIR" = "no"; then
ac_safe=`echo "$f/tk.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $f/tk.h""... $ac_c" 1>&6
echo "configure:5492: checking for $f/tk.h" >&5
echo "configure:5546: checking for $f/tk.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 5497 "configure"
#line 5551 "configure"
#include "confdefs.h"
#include <$f/tk.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:5556: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -5539,7 +5593,7 @@ TK_LIB=
for f in tk8.0 tk80; do
if test -z "$TK_LIB"; then
echo $ac_n "checking for main in -l$f""... $ac_c" 1>&6
echo "configure:5543: checking for main in -l$f" >&5
echo "configure:5597: checking for main in -l$f" >&5
ac_lib_var=`echo $f'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -5547,14 +5601,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$f $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5551 "configure"
#line 5605 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
if { (eval echo configure:5558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:5612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -5765,6 +5819,8 @@ s%@INET_ATON@%$INET_ATON%g
s%@STRERROR@%$STRERROR%g
s%@STRERROR2@%$STRERROR2%g
s%@STRDUP@%$STRDUP%g
s%@STRTOL@%$STRTOL%g
s%@STRTOUL@%$STRTOUL%g
s%@STRCASECMP@%$STRCASECMP%g
s%@X_CFLAGS@%$X_CFLAGS%g
s%@X_PRE_LIBS@%$X_PRE_LIBS%g

View File

@ -493,7 +493,12 @@ AC_CHECK_FUNC(strdup,
AC_SUBST(STRDUP)
AC_CHECK_FUNC(strtol,
AC_DEFINE(HAVE_STRTOL),
STRDUP='strtol.o')
STRTOL='strtol.o')
AC_SUBST(STRTOL)
AC_CHECK_FUNC(strtoul,
AC_DEFINE(HAVE_STRTOUL),
STRTOL='strtoul.o')
AC_SUBST(STRTOUL)
AC_CHECK_FUNC(strcasecmp,
AC_DEFINE(HAVE_STRCASECMP),
STRCASECMP='strcasecmp.o')

View File

@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: c.h,v 1.34 1998/02/12 01:50:01 momjian Exp $
* $Id: c.h,v 1.35 1998/02/24 06:04:35 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@ -792,7 +792,7 @@ extern char *form(const char *fmt,...);
#endif /* hpux */
#endif
#if defined(sunos4)
#if defined(sun) && defined(sparc) && !defined(__svr4)
#define memmove(d, s, l) bcopy(s, d, l)
#include <unistd.h>
#endif

View File

@ -162,6 +162,9 @@ extern int strcasecmp(char *s1, char *s2);
/* Set to 1 if you have strtol() */
#undef HAVE_STRTOL
/* Set to 1 if you have strtoul() */
#undef HAVE_STRTOUL
/* Set to 1 if you have strdup() */
#undef HAVE_STRDUP
#ifndef HAVE_STRDUP

View File

@ -5,7 +5,7 @@ MAJOR_VERSION=1
MINOR_VERSION=0
PATCHLEVEL=0
CFLAGS=-I../include -Wall -DMAJOR_VERSION=$(MAJOR_VERSION) -DMINOR_VERSION=$(MINOR_VERSION) -DPATCHLEVEL=$(PATCHLEVEL)
CFLAGS=-I$(SRCDIR)/include -I../include -Wall -DMAJOR_VERSION=$(MAJOR_VERSION) -DMINOR_VERSION=$(MINOR_VERSION) -DPATCHLEVEL=$(PATCHLEVEL)
all:: ecpg

View File

@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: libpq-fe.h,v 1.25 1998/01/26 01:42:37 scrappy Exp $
* $Id: libpq-fe.h,v 1.26 1998/02/24 06:04:55 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@ -349,7 +349,7 @@ extern "C"
#define palloc malloc
#define pfree free
#if defined(sunos4)
#if defined(sun) && defined(sparc) && !defined(__svr4)
extern char *sys_errlist[];
#define strerror(A) (sys_errlist[(A)])
#endif /* sunos4 */