mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Move configure --disable-float8-byval to pg_config_manual.h
This build option was once useful to maintain compatibility with version-0 functions, but those are no longer supported, so this option is no longer useful for end users. We keep the option available to developers in pg_config_manual.h so that it is easy to test the pass-by-reference code paths without having to fire up a 32-bit machine. Discussion: https://www.postgresql.org/message-id/flat/f3e1e576-2749-bbd7-2d57-3f9dcf75255a@2ndquadrant.com
This commit is contained in:
@ -491,6 +491,12 @@ typedef signed int Offset;
|
||||
typedef float float4;
|
||||
typedef double float8;
|
||||
|
||||
#ifdef USE_FLOAT8_BYVAL
|
||||
#define FLOAT8PASSBYVAL true
|
||||
#else
|
||||
#define FLOAT8PASSBYVAL false
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Oid, RegProcedure, TransactionId, SubTransactionId, MultiXactId,
|
||||
* CommandId
|
||||
|
@ -70,10 +70,6 @@
|
||||
MSVC and with C++ compilers. */
|
||||
#undef FLEXIBLE_ARRAY_MEMBER
|
||||
|
||||
/* float8, int8, and related values are passed by value if 'true', by
|
||||
reference if 'false' */
|
||||
#undef FLOAT8PASSBYVAL
|
||||
|
||||
/* Define to 1 if gettimeofday() takes only 1 argument. */
|
||||
#undef GETTIMEOFDAY_1ARG
|
||||
|
||||
@ -898,10 +894,6 @@
|
||||
/* Define to use /dev/urandom for random number generation */
|
||||
#undef USE_DEV_URANDOM
|
||||
|
||||
/* Define to 1 if you want float8, int8, etc values to be passed by value.
|
||||
(--enable-float8-byval) */
|
||||
#undef USE_FLOAT8_BYVAL
|
||||
|
||||
/* Define to build with ICU support. (--with-icu) */
|
||||
#undef USE_ICU
|
||||
|
||||
|
@ -56,6 +56,19 @@
|
||||
*/
|
||||
#define PARTITION_MAX_KEYS 32
|
||||
|
||||
/*
|
||||
* Decide whether built-in 8-byte types, including float8, int8, and
|
||||
* timestamp, are passed by value. This is on by default if sizeof(Datum) >=
|
||||
* 8 (that is, on 64-bit platforms). If sizeof(Datum) < 8 (32-bit platforms),
|
||||
* this must be off. We keep this here as an option so that it is easy to
|
||||
* test the pass-by-reference code paths on 64-bit platforms.
|
||||
*
|
||||
* Changing this requires an initdb.
|
||||
*/
|
||||
#if SIZEOF_VOID_P >= 8
|
||||
#define USE_FLOAT8_BYVAL 1
|
||||
#endif
|
||||
|
||||
/*
|
||||
* When we don't have native spinlocks, we use semaphores to simulate them.
|
||||
* Decreasing this value reduces consumption of OS resources; increasing it
|
||||
|
@ -29,12 +29,7 @@ sub _new
|
||||
bless($self, $classname);
|
||||
|
||||
$self->DeterminePlatform();
|
||||
my $bits = $self->{platform} eq 'Win32' ? 32 : 64;
|
||||
|
||||
$options->{float8byval} = ($bits == 64)
|
||||
unless exists $options->{float8byval};
|
||||
die "float8byval not permitted on 32 bit platforms"
|
||||
if $options->{float8byval} && $bits == 32;
|
||||
if ($options->{xslt} && !$options->{xml})
|
||||
{
|
||||
die "XSLT requires XML\n";
|
||||
@ -207,16 +202,6 @@ sub GenerateFiles
|
||||
print $o "#define XLOG_BLCKSZ ",
|
||||
1024 * $self->{options}->{wal_blocksize}, "\n";
|
||||
|
||||
if ($self->{options}->{float8byval})
|
||||
{
|
||||
print $o "#define USE_FLOAT8_BYVAL 1\n";
|
||||
print $o "#define FLOAT8PASSBYVAL true\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print $o "#define FLOAT8PASSBYVAL false\n";
|
||||
}
|
||||
|
||||
if ($self->{options}->{uuid})
|
||||
{
|
||||
print $o "#define HAVE_UUID_OSSP\n";
|
||||
|
@ -5,9 +5,6 @@ use warnings;
|
||||
our $config = {
|
||||
asserts => 0, # --enable-cassert
|
||||
|
||||
# float8byval=> $platformbits == 64, # --disable-float8-byval,
|
||||
# off by default on 32 bit platforms, on by default on 64 bit platforms
|
||||
|
||||
# blocksize => 8, # --with-blocksize, 8kB by default
|
||||
# wal_blocksize => 8, # --with-wal-blocksize, 8kB by default
|
||||
ldap => 1, # --with-ldap
|
||||
|
Reference in New Issue
Block a user