Commit d30e2ac3 authored by Tom Lane's avatar Tom Lane

Portability patches for HPUX 11 and Unixware in configure

and related files.  Also remove float.c's gratuitous redeclaration of
isinf() ... looks like there are more decls in there that ought to be
in config.h, but I'll leave well enough alone for now ...
parent 6eccfbc7
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.40 1999/02/13 23:19:14 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.41 1999/04/20 00:26:32 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -74,10 +74,6 @@ ...@@ -74,10 +74,6 @@
#define SHRT_MIN (-32768) #define SHRT_MIN (-32768)
#endif #endif
#ifndef NAN
#define NAN (0.0/0.0)
#endif
#define FORMAT 'g' /* use "g" output format as standard #define FORMAT 'g' /* use "g" output format as standard
* format */ * format */
/* not sure what the following should be, but better to make it over-sufficient */ /* not sure what the following should be, but better to make it over-sufficient */
...@@ -112,9 +108,8 @@ extern double rint(double x); ...@@ -112,9 +108,8 @@ extern double rint(double x);
#endif #endif
extern int isinf(double x);
#endif #endif
/* ========== USER I/O ROUTINES ========== */ /* ========== USER I/O ROUTINES ========== */
......
...@@ -709,7 +709,7 @@ EOF ...@@ -709,7 +709,7 @@ EOF
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
&& UNAME_MACHINE=i586 && UNAME_MACHINE=i586
fi fi
echo ${UNAME_MACHINE}-unixware-${UNAME_RELEASE}-${UNAME_VERSION} echo ${UNAME_MACHINE}-pc-unixware${UNAME_VERSION}
exit 0 ;; exit 0 ;;
pc:*:*:*) pc:*:*:*)
# uname -m prints for DJGPP always 'pc', but it prints nothing about # uname -m prints for DJGPP always 'pc', but it prints nothing about
......
...@@ -175,7 +175,7 @@ case $basic_machine in ...@@ -175,7 +175,7 @@ case $basic_machine in
| m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
| power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \ | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
| xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* \ | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0*-* \
| alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \ | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \
| ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \ | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
| sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
...@@ -692,6 +692,8 @@ case $os in ...@@ -692,6 +692,8 @@ case $os in
-svr4*) -svr4*)
os=-sysv4 os=-sysv4
;; ;;
-unixware7*)
;;
-unixware*) -unixware*)
os=-sysv4.2uw os=-sysv4.2uw
;; ;;
......
This diff is collapsed.
...@@ -44,7 +44,7 @@ nextstep*) os=nextstep need_tas=no ;; ...@@ -44,7 +44,7 @@ nextstep*) os=nextstep need_tas=no ;;
*) os=unknown need_tas=no ;; *) os=unknown need_tas=no ;;
esac ;; esac ;;
sysv4*) os=svr4 need_tas=no ;; sysv4*) os=svr4 need_tas=no ;;
sysv5*) os=unixware need_tas=no ;; unixware*) os=unixware need_tas=no ;;
*) echo "" *) echo ""
echo "*************************************************************" echo "*************************************************************"
echo "configure does not currently recognize your operating system," echo "configure does not currently recognize your operating system,"
...@@ -674,9 +674,22 @@ AC_CHECK_FUNC(vsnprintf, ...@@ -674,9 +674,22 @@ AC_CHECK_FUNC(vsnprintf,
AC_DEFINE(HAVE_VSNPRINTF), AC_DEFINE(HAVE_VSNPRINTF),
SNPRINTF='snprintf.o') SNPRINTF='snprintf.o')
AC_SUBST(SNPRINTF) AC_SUBST(SNPRINTF)
AC_CHECK_FUNC(isinf, dnl do this one the hard way in case isinf() is a macro
AC_DEFINE(HAVE_ISINF), AC_MSG_CHECKING(for isinf)
ISINF='isinf.o') AC_CACHE_VAL(ac_cv_func_or_macro_isinf,
[AC_TRY_LINK(
[#include <math.h>],
[double x = 0.0; int res = isinf(x);],
[ac_cv_func_or_macro_isinf=yes],
[ac_cv_func_or_macro_isinf=no])])
if [[ $ac_cv_func_or_macro_isinf = yes ]]; then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_ISINF)
ISINF=''
else
AC_MSG_RESULT(no)
ISINF='isinf.o'
fi
AC_SUBST(ISINF) AC_SUBST(ISINF)
AC_CHECK_FUNC(getrusage, AC_CHECK_FUNC(getrusage,
AC_DEFINE(HAVE_GETRUSAGE), AC_DEFINE(HAVE_GETRUSAGE),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment