mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Autoconfiscate selection of 64-bit int type for 64-bit large object API.
Get rid of the fundamentally indefensible assumption that "long long int" exists and is exactly 64 bits wide on every platform Postgres runs on. Instead let the configure script select the type to use for "pg_int64". This is a bit of a pain in the rear since we do not want to pollute client namespace with all the random symbols that pg_config.h defines; instead we have to create a separate generated header file, "pg_config_ext.h". But now that the infrastructure is there, we might have the ability to add some other stuff that's long been wanting in this area.
This commit is contained in:
21
configure
vendored
21
configure
vendored
@ -24238,7 +24238,9 @@ _ACEOF
|
||||
fi
|
||||
|
||||
|
||||
if test x"$HAVE_LONG_INT_64" = x"no" ; then
|
||||
if test x"$HAVE_LONG_INT_64" = x"yes" ; then
|
||||
pg_int64_type="long int"
|
||||
else
|
||||
{ $as_echo "$as_me:$LINENO: checking whether long long int is 64 bits" >&5
|
||||
$as_echo_n "checking whether long long int is 64 bits... " >&6; }
|
||||
if test "${pgac_cv_type_long_long_int_64+set}" = set; then
|
||||
@ -24374,7 +24376,9 @@ _ACEOF
|
||||
|
||||
fi
|
||||
|
||||
if test x"$HAVE_LONG_LONG_INT_64" = x"no" ; then
|
||||
if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
|
||||
pg_int64_type="long long int"
|
||||
else
|
||||
{ { $as_echo "$as_me:$LINENO: error: Cannot find a working 64-bit integer type." >&5
|
||||
$as_echo "$as_me: error: Cannot find a working 64-bit integer type." >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
@ -24382,6 +24386,11 @@ $as_echo "$as_me: error: Cannot find a working 64-bit integer type." >&2;}
|
||||
fi
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define PG_INT64_TYPE $pg_int64_type
|
||||
_ACEOF
|
||||
|
||||
|
||||
|
||||
if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
@ -29930,6 +29939,9 @@ fi
|
||||
ac_config_headers="$ac_config_headers src/include/pg_config.h"
|
||||
|
||||
|
||||
ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
|
||||
|
||||
|
||||
ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
|
||||
|
||||
|
||||
@ -30550,6 +30562,7 @@ do
|
||||
"src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
|
||||
"check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
|
||||
"src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
|
||||
"src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
|
||||
"src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
|
||||
|
||||
*) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
|
||||
@ -31220,6 +31233,10 @@ $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
|
||||
;;
|
||||
"src/include/pg_config.h":H)
|
||||
# Update timestamp for pg_config.h (see Makefile.global)
|
||||
echo >src/include/stamp-h
|
||||
;;
|
||||
"src/include/pg_config_ext.h":H)
|
||||
# Update timestamp for pg_config_ext.h (see Makefile.global)
|
||||
echo >src/include/stamp-ext-h
|
||||
;;
|
||||
"src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
|
||||
|
Reference in New Issue
Block a user