Fix HAVE_LONG[_LONG]_INT_64 to really define to 1 - Mailing list pgsql-patches

From Zoltan Boszormenyi
Subject Fix HAVE_LONG[_LONG]_INT_64 to really define to 1
Date
Msg-id 47D6614A.5090905@cybertec.at
Whole thread Raw
Responses int8/float8/time/timestamp[tz]/float4 passed by value, was Re: Fix HAVE_LONG[_LONG]_INT_64 to really define to 1  (Zoltan Boszormenyi <zb@cybertec.at>)
Re: Fix HAVE_LONG[_LONG]_INT_64 to really define to 1  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-patches
Hi,

I am working on this TODO item:

* Consider allowing 64-bit integers and floats to be passed by value on
  64-bit platforms

  Also change 32-bit floats (float4) to be passed by value at the same
  time.

For genbki.sh, to correctly determine whether HAVE_LONG_INT_64
is defined, the attached bugfix is needed in the configure.in machinery.
This way the pg_config.h actually conforms to the comments for
HAVE_LONG_INT_64 and HAVE_LONG_LONG_INT_64.

Best regards,
Zoltán Böszörményi

--
----------------------------------
Zoltán Böszörményi
Cybertec Schönig & Schönig GmbH
http://www.postgresql.at/

diff -dcrpN pgsql.orig/config/c-compiler.m4 pgsql/config/c-compiler.m4
*** pgsql.orig/config/c-compiler.m4    2008-02-18 13:49:56.000000000 +0100
--- pgsql/config/c-compiler.m4    2008-03-11 11:00:30.000000000 +0100
*************** AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_
*** 62,68 ****

  Ac_define=$Ac_cachevar
  if test x"$Ac_cachevar" = xyes ; then
!   AC_DEFINE(Ac_define,, [Define to 1 if `]$1[' works and is 64 bits.])
  fi
  undefine([Ac_define])dnl
  undefine([Ac_cachevar])dnl
--- 62,68 ----

  Ac_define=$Ac_cachevar
  if test x"$Ac_cachevar" = xyes ; then
!   AC_DEFINE(Ac_define, 1, [Define to 1 if `]$1[' works and is 64 bits.])
  fi
  undefine([Ac_define])dnl
  undefine([Ac_cachevar])dnl
diff -dcrpN pgsql.orig/configure pgsql/configure
*** pgsql.orig/configure    2008-03-02 13:44:42.000000000 +0100
--- pgsql/configure    2008-03-11 11:01:34.000000000 +0100
*************** HAVE_LONG_INT_64=$pgac_cv_type_long_int_
*** 19608,19614 ****
  if test x"$pgac_cv_type_long_int_64" = xyes ; then

  cat >>confdefs.h <<\_ACEOF
! #define HAVE_LONG_INT_64
  _ACEOF

  fi
--- 19608,19614 ----
  if test x"$pgac_cv_type_long_int_64" = xyes ; then

  cat >>confdefs.h <<\_ACEOF
! #define HAVE_LONG_INT_64 1
  _ACEOF

  fi
*************** HAVE_LONG_LONG_INT_64=$pgac_cv_type_long
*** 19741,19747 ****
  if test x"$pgac_cv_type_long_long_int_64" = xyes ; then

  cat >>confdefs.h <<\_ACEOF
! #define HAVE_LONG_LONG_INT_64
  _ACEOF

  fi
--- 19741,19747 ----
  if test x"$pgac_cv_type_long_long_int_64" = xyes ; then

  cat >>confdefs.h <<\_ACEOF
! #define HAVE_LONG_LONG_INT_64 1
  _ACEOF

  fi

pgsql-patches by date:

Previous
From: "Heikki Linnakangas"
Date:
Subject: Re: CopyReadLineText optimization
Next
From: "Heikki Linnakangas"
Date:
Subject: Re: [PERFORM] Very slow (2 tuples/second) sequential scan after bulk insert; speed returns to ~500 tuples/second after commit