1
0
mirror of https://github.com/postgres/postgres.git synced 2025-04-27 22:56:53 +03:00

More correct way to check for existence of types, which allows to specify

which include files to consider.  Should fix BeOS problems with int8 types.
This commit is contained in:
Peter Eisentraut 2001-12-02 11:38:40 +00:00
parent ad81c99984
commit 15abc7788e
6 changed files with 181 additions and 144 deletions

View File

@ -1,5 +1,5 @@
# Macros to detect C compiler features # Macros to detect C compiler features
# $Header: /cvsroot/pgsql/config/c-compiler.m4,v 1.3 2000/08/29 09:36:37 petere Exp $ # $Header: /cvsroot/pgsql/config/c-compiler.m4,v 1.4 2001/12/02 11:38:40 petere Exp $
# PGAC_C_SIGNED # PGAC_C_SIGNED
@ -117,3 +117,34 @@ AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The alignment requirement of a `]
undefine([AC_TYPE_NAME])dnl undefine([AC_TYPE_NAME])dnl
undefine([AC_CV_NAME])dnl undefine([AC_CV_NAME])dnl
])# PGAC_CHECK_ALIGNOF ])# PGAC_CHECK_ALIGNOF
# PGAC_CHECK_TYPE(TYPE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], [INCLUDES])
# ---------------------------------------------------------------------------
AC_DEFUN([PGAC_CHECK_TYPE],
[changequote(<<,>>)dnl
dnl The name to #define
define(<<AC_TYPE_NAME>>, translit(have_$1, [a-z *], [A-Z_P]))dnl
dnl The cache variable name.
define(<<AC_CV_NAME>>, translit(pgac_cv_have_$1, [ *], [_p]))dnl
changequote([, ])dnl
AC_CACHE_CHECK([for $1], AC_CV_NAME,
[AC_TRY_COMPILE([$4],
[if (($1 *) 0)
return 0;
if (sizeof ($1))
return 0;],
AC_CV_NAME[=yes],
AC_CV_NAME[=no])])
if test "$AC_CV_NAME" = yes; then
AC_DEFINE(AC_TYPE_NAME, 1, [Define to 1 if you have `]$1['])
ifelse($2,,,[$2
])[]dnl
ifelse($3,,,[else
$3
])[]dnl
fi
undefine([AC_TYPE_NAME])dnl
undefine([AC_CV_NAME])dnl
])# PGAC_CHECK_TYPE

224
configure vendored
View File

@ -1481,7 +1481,7 @@ else
if { (eval echo configure:1482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then if { (eval echo configure:1482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do for file in conftest.*; do
case $file in case $file in
*.c | *.C | *.o | *.obj) ;; *.c | *.o | *.obj) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac esac
done done
@ -8279,173 +8279,169 @@ cat >> confdefs.h <<EOF
EOF EOF
# Some platforms predefine the types int8, int16, etc. Only check # Some platforms predefine the types int8, int16, etc. Only check
# a (hopefully) representative subset. Don't use AC_CHECK_TYPE, which # a (hopefully) representative subset.
# doesn't work the way we want to.
echo $ac_n "checking size of int8""... $ac_c" 1>&6 pgac_type_includes="\
echo "configure:8287: checking size of int8" >&5 #include <stdio.h>
if eval "test \"`echo '$''{'ac_cv_sizeof_int8'+set}'`\" = set"; then #ifdef HAVE_SUPPORTDEFS_H
#include <SupportDefs.h>
#endif"
echo $ac_n "checking for int8""... $ac_c" 1>&6
echo "configure:8294: checking for int8" >&5
if eval "test \"`echo '$''{'pgac_cv_have_int8'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
ac_cv_sizeof_int8=0
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 8295 "configure" #line 8299 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <stdio.h> $pgac_type_includes
main() int main() {
{ if ((int8 *) 0)
FILE *f=fopen("conftestval", "w"); return 0;
if (!f) exit(1); if (sizeof (int8))
fprintf(f, "%d\n", sizeof(int8)); return 0;
exit(0); ; return 0; }
}
EOF EOF
if { (eval echo configure:8306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null if { (eval echo configure:8309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
then rm -rf conftest*
ac_cv_sizeof_int8=`cat conftestval` pgac_cv_have_int8=yes
else else
echo "configure: failed program was:" >&5 echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5 cat conftest.$ac_ext >&5
rm -fr conftest* rm -rf conftest*
ac_cv_sizeof_int8=0 pgac_cv_have_int8=no
fi fi
rm -fr conftest* rm -f conftest*
fi fi
fi echo "$ac_t""$pgac_cv_have_int8" 1>&6
echo "$ac_t""$ac_cv_sizeof_int8" 1>&6 if test "$pgac_cv_have_int8" = yes; then
cat >> confdefs.h <<EOF cat >> confdefs.h <<\EOF
#define SIZEOF_INT8 $ac_cv_sizeof_int8 #define HAVE_INT8 1
EOF EOF
fi
echo $ac_n "checking size of uint8""... $ac_c" 1>&6 echo $ac_n "checking for uint8""... $ac_c" 1>&6
echo "configure:8326: checking size of uint8" >&5 echo "configure:8330: checking for uint8" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_uint8'+set}'`\" = set"; then if eval "test \"`echo '$''{'pgac_cv_have_uint8'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
ac_cv_sizeof_uint8=0
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 8334 "configure" #line 8335 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <stdio.h> $pgac_type_includes
main() int main() {
{ if ((uint8 *) 0)
FILE *f=fopen("conftestval", "w"); return 0;
if (!f) exit(1); if (sizeof (uint8))
fprintf(f, "%d\n", sizeof(uint8)); return 0;
exit(0); ; return 0; }
}
EOF EOF
if { (eval echo configure:8345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null if { (eval echo configure:8345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
then rm -rf conftest*
ac_cv_sizeof_uint8=`cat conftestval` pgac_cv_have_uint8=yes
else else
echo "configure: failed program was:" >&5 echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5 cat conftest.$ac_ext >&5
rm -fr conftest* rm -rf conftest*
ac_cv_sizeof_uint8=0 pgac_cv_have_uint8=no
fi fi
rm -fr conftest* rm -f conftest*
fi fi
fi echo "$ac_t""$pgac_cv_have_uint8" 1>&6
echo "$ac_t""$ac_cv_sizeof_uint8" 1>&6 if test "$pgac_cv_have_uint8" = yes; then
cat >> confdefs.h <<EOF cat >> confdefs.h <<\EOF
#define SIZEOF_UINT8 $ac_cv_sizeof_uint8 #define HAVE_UINT8 1
EOF EOF
fi
echo $ac_n "checking size of int64""... $ac_c" 1>&6 echo $ac_n "checking for int64""... $ac_c" 1>&6
echo "configure:8365: checking size of int64" >&5 echo "configure:8366: checking for int64" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_int64'+set}'`\" = set"; then if eval "test \"`echo '$''{'pgac_cv_have_int64'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
ac_cv_sizeof_int64=0
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 8373 "configure" #line 8371 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <stdio.h> $pgac_type_includes
main() int main() {
{ if ((int64 *) 0)
FILE *f=fopen("conftestval", "w"); return 0;
if (!f) exit(1); if (sizeof (int64))
fprintf(f, "%d\n", sizeof(int64)); return 0;
exit(0); ; return 0; }
}
EOF EOF
if { (eval echo configure:8384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null if { (eval echo configure:8381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
then rm -rf conftest*
ac_cv_sizeof_int64=`cat conftestval` pgac_cv_have_int64=yes
else else
echo "configure: failed program was:" >&5 echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5 cat conftest.$ac_ext >&5
rm -fr conftest* rm -rf conftest*
ac_cv_sizeof_int64=0 pgac_cv_have_int64=no
fi fi
rm -fr conftest* rm -f conftest*
fi fi
fi echo "$ac_t""$pgac_cv_have_int64" 1>&6
echo "$ac_t""$ac_cv_sizeof_int64" 1>&6 if test "$pgac_cv_have_int64" = yes; then
cat >> confdefs.h <<EOF cat >> confdefs.h <<\EOF
#define SIZEOF_INT64 $ac_cv_sizeof_int64 #define HAVE_INT64 1
EOF EOF
fi
echo $ac_n "checking size of uint64""... $ac_c" 1>&6 echo $ac_n "checking for uint64""... $ac_c" 1>&6
echo "configure:8404: checking size of uint64" >&5 echo "configure:8402: checking for uint64" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_uint64'+set}'`\" = set"; then if eval "test \"`echo '$''{'pgac_cv_have_uint64'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
ac_cv_sizeof_uint64=0
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 8412 "configure" #line 8407 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <stdio.h> $pgac_type_includes
main() int main() {
{ if ((uint64 *) 0)
FILE *f=fopen("conftestval", "w"); return 0;
if (!f) exit(1); if (sizeof (uint64))
fprintf(f, "%d\n", sizeof(uint64)); return 0;
exit(0); ; return 0; }
}
EOF EOF
if { (eval echo configure:8423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null if { (eval echo configure:8417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
then rm -rf conftest*
ac_cv_sizeof_uint64=`cat conftestval` pgac_cv_have_uint64=yes
else else
echo "configure: failed program was:" >&5 echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5 cat conftest.$ac_ext >&5
rm -fr conftest* rm -rf conftest*
ac_cv_sizeof_uint64=0 pgac_cv_have_uint64=no
fi fi
rm -fr conftest* rm -f conftest*
fi fi
fi echo "$ac_t""$pgac_cv_have_uint64" 1>&6
echo "$ac_t""$ac_cv_sizeof_uint64" 1>&6 if test "$pgac_cv_have_uint64" = yes; then
cat >> confdefs.h <<EOF cat >> confdefs.h <<\EOF
#define SIZEOF_UINT64 $ac_cv_sizeof_uint64 #define HAVE_UINT64 1
EOF EOF
fi
echo $ac_n "checking for POSIX signal interface""... $ac_c" 1>&6 echo $ac_n "checking for POSIX signal interface""... $ac_c" 1>&6
echo "configure:8444: checking for POSIX signal interface" >&5 echo "configure:8440: checking for POSIX signal interface" >&5
if eval "test \"`echo '$''{'pgac_cv_func_posix_signals'+set}'`\" = set"; then if eval "test \"`echo '$''{'pgac_cv_func_posix_signals'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 8449 "configure" #line 8445 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <signal.h> #include <signal.h>
@ -8456,7 +8452,7 @@ act.sa_flags = SA_RESTART;
sigaction(0, &act, &oact); sigaction(0, &act, &oact);
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:8460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:8456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
pgac_cv_func_posix_signals=yes pgac_cv_func_posix_signals=yes
else else
@ -8486,7 +8482,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args. # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2 set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:8490: checking for $ac_word" >&5 echo "configure:8486: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_TCLSH'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_TCLSH'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -8522,7 +8518,7 @@ test -n "$TCLSH" && break
done done
echo $ac_n "checking for tclConfig.sh""... $ac_c" 1>&6 echo $ac_n "checking for tclConfig.sh""... $ac_c" 1>&6
echo "configure:8526: checking for tclConfig.sh" >&5 echo "configure:8522: checking for tclConfig.sh" >&5
# Let user override test # Let user override test
if test -z "$TCL_CONFIG_SH"; then if test -z "$TCL_CONFIG_SH"; then
pgac_test_dirs="$with_tclconfig" pgac_test_dirs="$with_tclconfig"
@ -8555,7 +8551,7 @@ fi
# Check for Tk configuration script tkConfig.sh # Check for Tk configuration script tkConfig.sh
if test "$with_tk" = yes; then if test "$with_tk" = yes; then
echo $ac_n "checking for tkConfig.sh""... $ac_c" 1>&6 echo $ac_n "checking for tkConfig.sh""... $ac_c" 1>&6
echo "configure:8559: checking for tkConfig.sh" >&5 echo "configure:8555: checking for tkConfig.sh" >&5
# Let user override test # Let user override test
if test -z "$TK_CONFIG_SH"; then if test -z "$TK_CONFIG_SH"; then
pgac_test_dirs="$with_tkconfig $with_tclconfig" pgac_test_dirs="$with_tkconfig $with_tclconfig"
@ -8594,7 +8590,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args. # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2 set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:8598: checking for $ac_word" >&5 echo "configure:8594: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_NSGMLS'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_NSGMLS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -8630,7 +8626,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args. # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2 set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:8634: checking for $ac_word" >&5 echo "configure:8630: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_JADE'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_JADE'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -8661,7 +8657,7 @@ done
echo $ac_n "checking for DocBook V3.1""... $ac_c" 1>&6 echo $ac_n "checking for DocBook V3.1""... $ac_c" 1>&6
echo "configure:8665: checking for DocBook V3.1" >&5 echo "configure:8661: checking for DocBook V3.1" >&5
if eval "test \"`echo '$''{'pgac_cv_check_docbook'+set}'`\" = set"; then if eval "test \"`echo '$''{'pgac_cv_check_docbook'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -8694,7 +8690,7 @@ have_docbook=$pgac_cv_check_docbook
echo $ac_n "checking for DocBook stylesheets""... $ac_c" 1>&6 echo $ac_n "checking for DocBook stylesheets""... $ac_c" 1>&6
echo "configure:8698: checking for DocBook stylesheets" >&5 echo "configure:8694: checking for DocBook stylesheets" >&5
if eval "test \"`echo '$''{'pgac_cv_path_stylesheets'+set}'`\" = set"; then if eval "test \"`echo '$''{'pgac_cv_path_stylesheets'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -8733,7 +8729,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args. # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2 set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:8737: checking for $ac_word" >&5 echo "configure:8733: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_SGMLSPL'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_SGMLSPL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else

View File

@ -1169,13 +1169,21 @@ else
fi fi
AC_DEFINE_UNQUOTED(MAXIMUM_ALIGNOF, $MAX_ALIGNOF, [Define as the maximum alignment requirement of any type]) AC_DEFINE_UNQUOTED(MAXIMUM_ALIGNOF, $MAX_ALIGNOF, [Define as the maximum alignment requirement of any type])
# Some platforms predefine the types int8, int16, etc. Only check # Some platforms predefine the types int8, int16, etc. Only check
# a (hopefully) representative subset. Don't use AC_CHECK_TYPE, which # a (hopefully) representative subset.
# doesn't work the way we want to.
AC_CHECK_SIZEOF(int8, 0) pgac_type_includes="\
AC_CHECK_SIZEOF(uint8, 0) #include <stdio.h>
AC_CHECK_SIZEOF(int64, 0) #ifdef HAVE_SUPPORTDEFS_H
AC_CHECK_SIZEOF(uint64, 0) #include <SupportDefs.h>
#endif"
PGAC_CHECK_TYPE(int8, [], [], [$pgac_type_includes])
PGAC_CHECK_TYPE(uint8, [], [], [$pgac_type_includes])
PGAC_CHECK_TYPE(int64, [], [], [$pgac_type_includes])
PGAC_CHECK_TYPE(uint64, [], [], [$pgac_type_includes])
PGAC_FUNC_POSIX_SIGNALS PGAC_FUNC_POSIX_SIGNALS

View File

@ -12,7 +12,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: c.h,v 1.111 2001/11/15 16:35:19 momjian Exp $ * $Id: c.h,v 1.112 2001/12/02 11:38:40 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -205,11 +205,11 @@ typedef char *Pointer;
* used for numerical computations and the * used for numerical computations and the
* frontend/backend protocol. * frontend/backend protocol.
*/ */
#if SIZEOF_INT8 == 0 #ifndef HAVE_INT8
typedef signed char int8; /* == 8 bits */ typedef signed char int8; /* == 8 bits */
typedef signed short int16; /* == 16 bits */ typedef signed short int16; /* == 16 bits */
typedef signed int int32; /* == 32 bits */ typedef signed int int32; /* == 32 bits */
#endif /* SIZEOF_INT8 == 0 */ #endif /* not HAVE_INT8 */
/* /*
* uintN * uintN
@ -218,11 +218,11 @@ typedef signed int int32; /* == 32 bits */
* frontend/backend protocol. * frontend/backend protocol.
*/ */
/* Also defined in interfaces/odbc/md5.h */ /* Also defined in interfaces/odbc/md5.h */
#if SIZEOF_UINT8 == 0 #ifndef HAVE_UINT8
typedef unsigned char uint8; /* == 8 bits */ typedef unsigned char uint8; /* == 8 bits */
typedef unsigned short uint16; /* == 16 bits */ typedef unsigned short uint16; /* == 16 bits */
typedef unsigned int uint32; /* == 32 bits */ typedef unsigned int uint32; /* == 32 bits */
#endif /* SIZEOF_UINT8 == 0 */ #endif /* not HAVE_UINT8 */
/* /*
* boolN * boolN
@ -270,35 +270,37 @@ typedef double *float64;
*/ */
#ifdef HAVE_LONG_INT_64 #ifdef HAVE_LONG_INT_64
/* Plain "long int" fits, use it */ /* Plain "long int" fits, use it */
#if SIZEOF_INT64 == 0
#ifndef HAVE_INT64
typedef long int int64; typedef long int int64;
#endif #endif
#if SIZEOF_UINT64 == 0 #ifndef HAVE_UINT64
typedef unsigned long int uint64; typedef unsigned long int uint64;
#endif #endif
#else #elif defined(HAVE_LONG_LONG_INT_64)
#ifdef HAVE_LONG_LONG_INT_64
/* We have working support for "long long int", use that */ /* We have working support for "long long int", use that */
#if SIZEOF_INT64 == 0
#ifndef HAVE_INT64
typedef long long int int64; typedef long long int int64;
#endif #endif
#if SIZEOF_UINT64 == 0 #ifndef HAVE_UINT64
typedef unsigned long long int uint64; typedef unsigned long long int uint64;
#endif #endif
#else #else /* not HAVE_LONG_INT_64 and not HAVE_LONG_LONG_INT_64 */
/* Won't actually work, but fall back to long int so that code compiles */ /* Won't actually work, but fall back to long int so that code compiles */
#if SIZEOF_INT64 == 0 #ifndef HAVE_INT64
typedef long int int64; typedef long int int64;
#endif #endif
#if SIZEOF_UINT64 == 0 #ifndef HAVE_UINT64
typedef unsigned long int uint64; typedef unsigned long int uint64;
#endif #endif
#define INT64_IS_BUSTED #define INT64_IS_BUSTED
#endif
#endif #endif /* not HAVE_LONG_INT_64 and not HAVE_LONG_LONG_INT_64 */
/* /*
* Size * Size

View File

@ -8,7 +8,7 @@
* or in pg_config.h afterwards. Of course, if you edit pg_config.h, then your * or in pg_config.h afterwards. Of course, if you edit pg_config.h, then your
* changes will be overwritten the next time you run configure. * changes will be overwritten the next time you run configure.
* *
* $Id: pg_config.h.in,v 1.13 2001/11/15 16:35:19 momjian Exp $ * $Id: pg_config.h.in,v 1.14 2001/12/02 11:38:40 petere Exp $
*/ */
#ifndef PG_CONFIG_H #ifndef PG_CONFIG_H
@ -697,10 +697,10 @@ extern int fdatasync(int fildes);
/* Define if you have on_exit() */ /* Define if you have on_exit() */
#undef HAVE_ON_EXIT #undef HAVE_ON_EXIT
#undef SIZEOF_INT8 #undef HAVE_INT8
#undef SIZEOF_UINT8 #undef HAVE_UINT8
#undef SIZEOF_INT64 #undef HAVE_INT64
#undef SIZEOF_UINT64 #undef HAVE_UINT64
/* /*
*------------------------------------------------------------------------ *------------------------------------------------------------------------

View File

@ -36,11 +36,11 @@ typedef char bool;
#endif /* __BEOS__ */ #endif /* __BEOS__ */
/* Also defined in include/c.h */ /* Also defined in include/c.h */
#if SIZEOF_UINT8 == 0 #ifndef HAVE_UINT8
typedef unsigned char uint8; /* == 8 bits */ typedef unsigned char uint8; /* == 8 bits */
typedef unsigned short uint16; /* == 16 bits */ typedef unsigned short uint16; /* == 16 bits */
typedef unsigned int uint32; /* == 32 bits */ typedef unsigned int uint32; /* == 32 bits */
#endif /* SIZEOF_UINT8 == 0 */ #endif /* not HAVE_UINT8 */
extern bool md5_hash(const void *buff, size_t len, char *hexsum); extern bool md5_hash(const void *buff, size_t len, char *hexsum);
extern bool EncryptMD5(const char *passwd, const char *salt, extern bool EncryptMD5(const char *passwd, const char *salt,