Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4513d8b

Browse files
committed
Move configure --disable-float8-byval to pg_config_manual.h
This build option was once useful to maintain compatibility withversion-0 functions, but those are no longer supported, so this optionis no longer useful for end users. We keep the option available todevelopers in pg_config_manual.h so that it is easy to test thepass-by-reference code paths without having to fire up a 32-bitmachine.Discussion:https://www.postgresql.org/message-id/flat/f3e1e576-2749-bbd7-2d57-3f9dcf75255a@2ndquadrant.com
1 parent47a3c7f commit4513d8b

File tree

8 files changed

+19
-141
lines changed

8 files changed

+19
-141
lines changed

‎configure

Lines changed: 0 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,6 @@ with_system_tzdata
866866
with_zlib
867867
with_gnu_ld
868868
enable_largefile
869-
enable_float8_byval
870869
'
871870
ac_precious_vars='build_alias
872871
host_alias
@@ -1524,7 +1523,6 @@ Optional Features:
15241523
--enable-cassert enable assertion checks (for debugging)
15251524
--disable-thread-safety disable thread-safety in client libraries
15261525
--disable-largefile omit support for large files
1527-
--disable-float8-byval disable float8 passed by value
15281526

15291527
Optional Packages:
15301528
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -16745,80 +16743,6 @@ _ACEOF
1674516743

1674616744

1674716745

16748-
# Decide whether float8 is passed by value.
16749-
# Note: this setting also controls int8 and related types such as timestamp.
16750-
# If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
16751-
# If not, trying to select it is an error.
16752-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
16753-
$as_echo_n "checking whether to build with float8 passed by value... " >&6; }
16754-
if test $ac_cv_sizeof_void_p -ge 8 ; then
16755-
16756-
16757-
# Check whether --enable-float8-byval was given.
16758-
if test "${enable_float8_byval+set}" = set; then :
16759-
enableval=$enable_float8_byval;
16760-
case $enableval in
16761-
yes)
16762-
:
16763-
;;
16764-
no)
16765-
:
16766-
;;
16767-
*)
16768-
as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
16769-
;;
16770-
esac
16771-
16772-
else
16773-
enable_float8_byval=yes
16774-
16775-
fi
16776-
16777-
16778-
else
16779-
16780-
16781-
# Check whether --enable-float8-byval was given.
16782-
if test "${enable_float8_byval+set}" = set; then :
16783-
enableval=$enable_float8_byval;
16784-
case $enableval in
16785-
yes)
16786-
:
16787-
;;
16788-
no)
16789-
:
16790-
;;
16791-
*)
16792-
as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
16793-
;;
16794-
esac
16795-
16796-
else
16797-
enable_float8_byval=no
16798-
16799-
fi
16800-
16801-
16802-
if test "$enable_float8_byval" = yes ; then
16803-
as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
16804-
fi
16805-
fi
16806-
if test "$enable_float8_byval" = yes ; then
16807-
16808-
$as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
16809-
16810-
float8passbyval=true
16811-
else
16812-
float8passbyval=false
16813-
fi
16814-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
16815-
$as_echo "$enable_float8_byval" >&6; }
16816-
16817-
cat >>confdefs.h <<_ACEOF
16818-
#define FLOAT8PASSBYVAL $float8passbyval
16819-
_ACEOF
16820-
16821-
1682216746
# Determine memory alignment requirements for the basic C data types.
1682316747

1682416748
# The cast to long int works around a bug in the HP C Compiler,

‎configure.in

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1941,29 +1941,6 @@ AC_CHECK_SIZEOF([void *])
19411941
AC_CHECK_SIZEOF([size_t])
19421942
AC_CHECK_SIZEOF([long])
19431943

1944-
# Decide whether float8 is passed by value.
1945-
# Note: this setting also controls int8 and related types such as timestamp.
1946-
# If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
1947-
# If not, trying to select it is an error.
1948-
AC_MSG_CHECKING([whether to build with float8 passed by value])
1949-
if test $ac_cv_sizeof_void_p -ge 8 ; then
1950-
PGAC_ARG_BOOL(enable, float8-byval, yes, [disable float8 passed by value])
1951-
else
1952-
PGAC_ARG_BOOL(enable, float8-byval, no, [disable float8 passed by value])
1953-
if test "$enable_float8_byval" = yes ; then
1954-
AC_MSG_ERROR([--enable-float8-byval is not supported on 32-bit platforms.])
1955-
fi
1956-
fi
1957-
if test "$enable_float8_byval" = yes ; then
1958-
AC_DEFINE([USE_FLOAT8_BYVAL], 1,
1959-
[Define to 1 if you want float8, int8, etc values to be passed by value. (--enable-float8-byval)])
1960-
float8passbyval=true
1961-
else
1962-
float8passbyval=false
1963-
fi
1964-
AC_MSG_RESULT([$enable_float8_byval])
1965-
AC_DEFINE_UNQUOTED([FLOAT8PASSBYVAL], [$float8passbyval], [float8, int8, and related values are passed by value if 'true', by reference if 'false'])
1966-
19671944
# Determine memory alignment requirements for the basic C data types.
19681945

19691946
AC_CHECK_ALIGNOF(short)

‎doc/src/sgml/installation.sgml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,22 +1204,6 @@ build-postgresql:
12041204
</listitem>
12051205
</varlistentry>
12061206

1207-
<varlistentry>
1208-
<term><option>--disable-float8-byval</option></term>
1209-
<listitem>
1210-
<para>
1211-
Disable passing float8 values <quote>by value</quote>, causing them
1212-
to be passed <quote>by reference</quote> instead. This option costs
1213-
performance, but may be needed for compatibility with very old
1214-
user-defined functions written in C.
1215-
Note that this option affects not only float8, but also int8 and some
1216-
related types such as timestamp.
1217-
On 32-bit platforms, <option>--disable-float8-byval</option> is the default
1218-
and it is not allowed to select <option>--enable-float8-byval</option>.
1219-
</para>
1220-
</listitem>
1221-
</varlistentry>
1222-
12231207
<varlistentry>
12241208
<term><option>--disable-spinlocks</option></term>
12251209
<listitem>

‎src/include/c.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,12 @@ typedef signed int Offset;
491491
typedeffloatfloat4;
492492
typedefdoublefloat8;
493493

494+
#ifdefUSE_FLOAT8_BYVAL
495+
#defineFLOAT8PASSBYVAL true
496+
#else
497+
#defineFLOAT8PASSBYVAL false
498+
#endif
499+
494500
/*
495501
* Oid, RegProcedure, TransactionId, SubTransactionId, MultiXactId,
496502
* CommandId

‎src/include/pg_config.h.in

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,6 @@
7070
MSVC and with C++ compilers. */
7171
#undef FLEXIBLE_ARRAY_MEMBER
7272

73-
/* float8, int8, and related values are passed by value if 'true', by
74-
reference if 'false' */
75-
#undef FLOAT8PASSBYVAL
76-
7773
/* Define to 1 if gettimeofday() takes only 1 argument. */
7874
#undef GETTIMEOFDAY_1ARG
7975

@@ -898,10 +894,6 @@
898894
/* Define to use /dev/urandom for random number generation */
899895
#undef USE_DEV_URANDOM
900896

901-
/* Define to 1 if you want float8, int8, etc values to be passed by value.
902-
(--enable-float8-byval) */
903-
#undef USE_FLOAT8_BYVAL
904-
905897
/* Define to build with ICU support. (--with-icu) */
906898
#undef USE_ICU
907899

‎src/include/pg_config_manual.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,19 @@
5656
*/
5757
#definePARTITION_MAX_KEYS32
5858

59+
/*
60+
* Decide whether built-in 8-byte types, including float8, int8, and
61+
* timestamp, are passed by value. This is on by default if sizeof(Datum) >=
62+
* 8 (that is, on 64-bit platforms). If sizeof(Datum) < 8 (32-bit platforms),
63+
* this must be off. We keep this here as an option so that it is easy to
64+
* test the pass-by-reference code paths on 64-bit platforms.
65+
*
66+
* Changing this requires an initdb.
67+
*/
68+
#ifSIZEOF_VOID_P >=8
69+
#defineUSE_FLOAT8_BYVAL 1
70+
#endif
71+
5972
/*
6073
* When we don't have native spinlocks, we use semaphores to simulate them.
6174
* Decreasing this value reduces consumption of OS resources; increasing it

‎src/tools/msvc/Solution.pm

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,7 @@ sub _new
2929
bless($self,$classname);
3030

3131
$self->DeterminePlatform();
32-
my$bits =$self->{platform}eq'Win32' ? 32 : 64;
3332

34-
$options->{float8byval} = ($bits == 64)
35-
unlessexists$options->{float8byval};
36-
die"float8byval not permitted on 32 bit platforms"
37-
if$options->{float8byval} &&$bits == 32;
3833
if ($options->{xslt} && !$options->{xml})
3934
{
4035
die"XSLT requires XML\n";
@@ -207,16 +202,6 @@ sub GenerateFiles
207202
print$o"#define XLOG_BLCKSZ",
208203
1024 *$self->{options}->{wal_blocksize},"\n";
209204

210-
if ($self->{options}->{float8byval})
211-
{
212-
print$o"#define USE_FLOAT8_BYVAL 1\n";
213-
print$o"#define FLOAT8PASSBYVAL true\n";
214-
}
215-
else
216-
{
217-
print$o"#define FLOAT8PASSBYVAL false\n";
218-
}
219-
220205
if ($self->{options}->{uuid})
221206
{
222207
print$o"#define HAVE_UUID_OSSP\n";

‎src/tools/msvc/config_default.pl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
our$config = {
66
asserts=> 0,# --enable-cassert
77

8-
# float8byval=> $platformbits == 64, # --disable-float8-byval,
9-
# off by default on 32 bit platforms, on by default on 64 bit platforms
10-
118
# blocksize => 8, # --with-blocksize, 8kB by default
129
# wal_blocksize => 8, # --with-wal-blocksize, 8kB by default
1310
ldap=> 1,# --with-ldap

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp