Commit 075ac80d authored by Tom Lane's avatar Tom Lane

Doesn't seem like a good idea to be doing AC_CHECK_SIZEOF(void *) so much

earlier than all the other sizeof checks, and it certainly fails to follow
the order suggested at the file head.  Rearrange.
parent 7ffe6572
This source diff could not be displayed because it is too large. You can view the blob instead.
dnl Process this file with autoconf to produce a configure script.
dnl $PostgreSQL: pgsql/configure.in,v 1.580 2009/01/06 03:05:23 momjian Exp $
dnl $PostgreSQL: pgsql/configure.in,v 1.581 2009/01/06 15:38:44 tgl Exp $
dnl
dnl Developers, please strive to achieve this order:
dnl
......@@ -490,18 +490,6 @@ fi
AC_PROG_CPP
AC_SUBST(GCC)
# Create compiler version string
if test x"$GCC" = x"yes" ; then
cc_string="GCC `${CC} --version | sed q`"
else
cc_string=$CC
fi
AC_CHECK_SIZEOF([void *])
AC_DEFINE_UNQUOTED(PG_VERSION_STR,
["PostgreSQL $PACKAGE_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"],
[A string containing the version number, platform, and C compiler])
#
# Set up TAS assembly code if needed; the template file has now had its
......@@ -857,12 +845,6 @@ program to use during the build.])
fi
fi
# Supply a numeric version string for use by 3rd party add-ons
# awk -F is a regex on some platforms, and not on others, so make "." a tab
[PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
tr '.' ' ' |
$AWK '{printf "%d%02d%02d", $1, $2, (NF >= 3) ? $3 : 0}'`"]
AC_DEFINE_UNQUOTED(PG_VERSION_NUM, $PG_VERSION_NUM, [PostgreSQL version as a number])
##
## Libraries
......@@ -1534,7 +1516,8 @@ fi
# Need a #define for the size of Datum (unsigned long)
AC_CHECK_SIZEOF([unsigned long])
# And one for the size of size_t (enables tweaks for > 32bit address space)
# And check size of void *, size_t (enables tweaks for > 32bit address space)
AC_CHECK_SIZEOF([void *])
AC_CHECK_SIZEOF([size_t])
# Decide whether float4 is passed by value: user-selectable, enabled by default
......@@ -1784,6 +1767,25 @@ AC_MSG_NOTICE([using CFLAGS=$CFLAGS])
AC_MSG_NOTICE([using CPPFLAGS=$CPPFLAGS])
AC_MSG_NOTICE([using LDFLAGS=$LDFLAGS])
# Create compiler version string
if test x"$GCC" = x"yes" ; then
cc_string="GCC `${CC} --version | sed q`"
else
cc_string=$CC
fi
AC_DEFINE_UNQUOTED(PG_VERSION_STR,
["PostgreSQL $PACKAGE_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"],
[A string containing the version number, platform, and C compiler])
# Supply a numeric version string for use by 3rd party add-ons
# awk -F is a regex on some platforms, and not on others, so make "." a tab
[PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
tr '.' ' ' |
$AWK '{printf "%d%02d%02d", $1, $2, (NF >= 3) ? $3 : 0}'`"]
AC_DEFINE_UNQUOTED(PG_VERSION_NUM, $PG_VERSION_NUM, [PostgreSQL version as a number])
# prepare build tree if outside source tree
# Note 1: test -ef might not exist, but it's more reliable than `pwd`.
# Note 2: /bin/pwd might be better than shell's built-in at getting
......
......@@ -684,6 +684,9 @@
/* The size of `unsigned long', as computed by sizeof. */
#undef SIZEOF_UNSIGNED_LONG
/* The size of `void *', as computed by sizeof. */
#undef SIZEOF_VOID_P
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
......
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