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

Commitabe41f4

Browse files
committed
Assume that we have cbrt().
Windows has this, and so do all other live platforms according to thebuildfarm, so remove the configure probe and float.c's substitute code.This is part of a series of commits to get rid of no-longer-relevantconfigure checks and dead src/port/ code. I'm committing them separatelyto make it easier to back out individual changes if they prove lessportable than I expect.Discussion:https://postgr.es/m/15379.1582221614@sss.pgh.pa.us
1 parent7fde892 commitabe41f4

File tree

5 files changed

+1
-44
lines changed

5 files changed

+1
-44
lines changed

‎configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14925,7 +14925,7 @@ fi
1492514925
LIBS_including_readline="$LIBS"
1492614926
LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
1492714927

14928-
for ac_func in backtrace_symbolscbrtclock_gettime copyfile fdatasync getifaddrs getpeerucred getrlimit kqueue mbstowcs_l memset_s memmove poll posix_fallocate ppoll pstat pthread_is_threaded_np readlink setproctitle setproctitle_fast setsid shm_open strchrnul strsignal symlink sync_file_range uselocale utime utimes wcstombs_l
14928+
for ac_func in backtrace_symbols clock_gettime copyfile fdatasync getifaddrs getpeerucred getrlimit kqueue mbstowcs_l memset_s memmove poll posix_fallocate ppoll pstat pthread_is_threaded_np readlink setproctitle setproctitle_fast setsid shm_open strchrnul strsignal symlink sync_file_range uselocale utime utimes wcstombs_l
1492914929
do :
1493014930
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
1493114931
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"

‎configure.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1618,7 +1618,6 @@ LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
16181618

16191619
AC_CHECK_FUNCS(m4_normalize([
16201620
backtrace_symbols
1621-
cbrt
16221621
clock_gettime
16231622
copyfile
16241623
fdatasync

‎src/backend/utils/adt/float.c

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -72,19 +72,6 @@ static double sind_q1(double x);
7272
staticdoublecosd_q1(doublex);
7373
staticvoidinit_degree_constants(void);
7474

75-
#ifndefHAVE_CBRT
76-
/*
77-
* Some machines (in particular, some versions of AIX) have an extern
78-
* declaration for cbrt() in <math.h> but fail to provide the actual
79-
* function, which causes configure to not set HAVE_CBRT. Furthermore,
80-
* their compilers spit up at the mismatch between extern declaration
81-
* and static definition. We work around that here by the expedient
82-
* of a #define to make the actual name of the static function different.
83-
*/
84-
#definecbrt my_cbrt
85-
staticdoublecbrt(doublex);
86-
#endif/* HAVE_CBRT */
87-
8875

8976
/*
9077
* We use these out-of-line ereport() calls to report float overflow,
@@ -3964,28 +3951,3 @@ width_bucket_float8(PG_FUNCTION_ARGS)
39643951

39653952
PG_RETURN_INT32(result);
39663953
}
3967-
3968-
/* ========== PRIVATE ROUTINES ========== */
3969-
3970-
#ifndefHAVE_CBRT
3971-
3972-
staticdouble
3973-
cbrt(doublex)
3974-
{
3975-
intisneg= (x<0.0);
3976-
doubleabsx=fabs(x);
3977-
doubletmpres=pow(absx, (double)1.0 / (double)3.0);
3978-
3979-
/*
3980-
* The result is somewhat inaccurate --- not really pow()'s fault, as the
3981-
* exponent it's handed contains roundoff error. We can improve the
3982-
* accuracy by doing one iteration of Newton's formula. Beware of zero
3983-
* input however.
3984-
*/
3985-
if (tmpres>0.0)
3986-
tmpres-= (tmpres-absx / (tmpres*tmpres)) / (double)3.0;
3987-
3988-
returnisneg ?-tmpres :tmpres;
3989-
}
3990-
3991-
#endif/* !HAVE_CBRT */

‎src/include/pg_config.h.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,6 @@
101101
/* Define to 1 if you have the `BIO_meth_new' function. */
102102
#undef HAVE_BIO_METH_NEW
103103

104-
/* Define to 1 if you have the `cbrt' function. */
105-
#undef HAVE_CBRT
106-
107104
/* Define to 1 if you have the `clock_gettime' function. */
108105
#undef HAVE_CLOCK_GETTIME
109106

‎src/tools/msvc/Solution.pm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,6 @@ sub GenerateFiles
210210
HAVE_BACKTRACE_SYMBOLS=>undef,
211211
HAVE_BIO_GET_DATA=>undef,
212212
HAVE_BIO_METH_NEW=>undef,
213-
HAVE_CBRT=>undef,
214213
HAVE_CLOCK_GETTIME=>undef,
215214
HAVE_COMPUTED_GOTO=>undef,
216215
HAVE_COPYFILE=>undef,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp