Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 7fde892

Browse files
committed
Assume that we have isinf().
Windows has this, and so do all other live platforms according to the buildfarm, so remove the configure probe and src/port/ substitution. This also lets us get rid of some configure probes that existed only to support src/port/isinf.c. I kept the port.h hack to force using __builtin_isinf() on clang, though. This is part of a series of commits to get rid of no-longer-relevant configure checks and dead src/port/ code. I'm committing them separately to make it easier to back out individual changes if they prove less portable than I expect. Discussion: https://postgr.es/m/15379.1582221614@sss.pgh.pa.us
1 parent 799d224 commit 7fde892

File tree

6 files changed

+1
-192
lines changed

6 files changed

+1
-192
lines changed

configure

+1-58
Original file line numberDiff line numberDiff line change
@@ -12762,7 +12762,7 @@ $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
1276212762
fi
1276312763

1276412764

12765-
for ac_header in atomic.h copyfile.h execinfo.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/event.h sys/ipc.h sys/prctl.h sys/procctl.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/sockio.h sys/tas.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h
12765+
for ac_header in atomic.h copyfile.h execinfo.h getopt.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/event.h sys/ipc.h sys/prctl.h sys/procctl.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/sockio.h sys/tas.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h
1276612766
do :
1276712767
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
1276812768
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -15485,63 +15485,6 @@ $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
1548515485

1548615486
fi
1548715487

15488-
15489-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
15490-
$as_echo_n "checking for isinf... " >&6; }
15491-
if ${ac_cv_func_isinf+:} false; then :
15492-
$as_echo_n "(cached) " >&6
15493-
else
15494-
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15495-
/* end confdefs.h. */
15496-
15497-
#include <math.h>
15498-
double glob_double;
15499-
15500-
int
15501-
main ()
15502-
{
15503-
return isinf(glob_double) ? 0 : 1;
15504-
;
15505-
return 0;
15506-
}
15507-
_ACEOF
15508-
if ac_fn_c_try_link "$LINENO"; then :
15509-
ac_cv_func_isinf=yes
15510-
else
15511-
ac_cv_func_isinf=no
15512-
fi
15513-
rm -f core conftest.err conftest.$ac_objext \
15514-
conftest$ac_exeext conftest.$ac_ext
15515-
fi
15516-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
15517-
$as_echo "$ac_cv_func_isinf" >&6; }
15518-
15519-
if test $ac_cv_func_isinf = yes ; then
15520-
15521-
$as_echo "#define HAVE_ISINF 1" >>confdefs.h
15522-
15523-
else
15524-
case " $LIBOBJS " in
15525-
*" isinf.$ac_objext "* ) ;;
15526-
*) LIBOBJS="$LIBOBJS isinf.$ac_objext"
15527-
;;
15528-
esac
15529-
15530-
# Look for a way to implement a substitute for isinf()
15531-
for ac_func in fpclass fp_class fp_class_d class
15532-
do :
15533-
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15534-
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15535-
if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15536-
cat >>confdefs.h <<_ACEOF
15537-
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15538-
_ACEOF
15539-
break
15540-
fi
15541-
done
15542-
15543-
fi
15544-
1554515488
ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
1554615489
if test "x$ac_cv_func_dlopen" = xyes; then :
1554715490
$as_echo "#define HAVE_DLOPEN 1" >>confdefs.h

configure.in

-21
Original file line numberDiff line numberDiff line change
@@ -1280,9 +1280,7 @@ AC_CHECK_HEADERS(m4_normalize([
12801280
atomic.h
12811281
copyfile.h
12821282
execinfo.h
1283-
fp_class.h
12841283
getopt.h
1285-
ieeefp.h
12861284
ifaddrs.h
12871285
langinfo.h
12881286
mbarrier.h
@@ -1699,25 +1697,6 @@ if test "$pgac_cv_var_PS_STRINGS" = yes ; then
16991697
AC_DEFINE([HAVE_PS_STRINGS], 1, [Define to 1 if the PS_STRINGS thing exists.])
17001698
fi
17011699

1702-
1703-
dnl Cannot use AC_CHECK_FUNC because isinf may be a macro
1704-
AC_CACHE_CHECK([for isinf], ac_cv_func_isinf,
1705-
[AC_LINK_IFELSE([AC_LANG_PROGRAM([
1706-
#include <math.h>
1707-
double glob_double;
1708-
],
1709-
[return isinf(glob_double) ? 0 : 1;])],
1710-
[ac_cv_func_isinf=yes],
1711-
[ac_cv_func_isinf=no])])
1712-
1713-
if test $ac_cv_func_isinf = yes ; then
1714-
AC_DEFINE(HAVE_ISINF, 1, [Define to 1 if you have isinf().])
1715-
else
1716-
AC_LIBOBJ(isinf)
1717-
# Look for a way to implement a substitute for isinf()
1718-
AC_CHECK_FUNCS([fpclass fp_class fp_class_d class], [break])
1719-
fi
1720-
17211700
AC_REPLACE_FUNCS(m4_normalize([
17221701
dlopen
17231702
explicit_bzero

src/include/pg_config.h.in

-21
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,6 @@
104104
/* Define to 1 if you have the `cbrt' function. */
105105
#undef HAVE_CBRT
106106

107-
/* Define to 1 if you have the `class' function. */
108-
#undef HAVE_CLASS
109-
110107
/* Define to 1 if you have the `clock_gettime' function. */
111108
#undef HAVE_CLOCK_GETTIME
112109

@@ -206,18 +203,6 @@
206203
/* Define to 1 if you have the `fls' function. */
207204
#undef HAVE_FLS
208205

209-
/* Define to 1 if you have the `fpclass' function. */
210-
#undef HAVE_FPCLASS
211-
212-
/* Define to 1 if you have the `fp_class' function. */
213-
#undef HAVE_FP_CLASS
214-
215-
/* Define to 1 if you have the `fp_class_d' function. */
216-
#undef HAVE_FP_CLASS_D
217-
218-
/* Define to 1 if you have the <fp_class.h> header file. */
219-
#undef HAVE_FP_CLASS_H
220-
221206
/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
222207
#undef HAVE_FSEEKO
223208

@@ -295,9 +280,6 @@
295280
/* Define to 1 if you have the `history_truncate_file' function. */
296281
#undef HAVE_HISTORY_TRUNCATE_FILE
297282

298-
/* Define to 1 if you have the <ieeefp.h> header file. */
299-
#undef HAVE_IEEEFP_H
300-
301283
/* Define to 1 if you have the <ifaddrs.h> header file. */
302284
#undef HAVE_IFADDRS_H
303285

@@ -325,9 +307,6 @@
325307
/* Define to 1 if you have support for IPv6. */
326308
#undef HAVE_IPV6
327309

328-
/* Define to 1 if you have isinf(). */
329-
#undef HAVE_ISINF
330-
331310
/* Define to 1 if __builtin_constant_p(x) implies "i"(x) acceptance. */
332311
#undef HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P
333312

src/include/port.h

-4
Original file line numberDiff line numberDiff line change
@@ -352,9 +352,6 @@ extern int getpeereid(int sock, uid_t *uid, gid_t *gid);
352352
#endif
353353
#endif
354354

355-
#ifndef HAVE_ISINF
356-
extern int isinf(double x);
357-
#else
358355
/*
359356
* Glibc doesn't use the builtin for clang due to a *gcc* bug in a version
360357
* newer than the gcc compatibility clang claims to have. This would cause a
@@ -370,7 +367,6 @@ extern int isinf(double x);
370367
#define isinf __builtin_isinf
371368
#endif /* __has_builtin(isinf) */
372369
#endif /* __clang__ && !__cplusplus */
373-
#endif /* !HAVE_ISINF */
374370

375371
#ifndef HAVE_EXPLICIT_BZERO
376372
extern void explicit_bzero(void *buf, size_t len);

src/port/isinf.c

-81
This file was deleted.

src/tools/msvc/Solution.pm

-7
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,6 @@ sub GenerateFiles
211211
HAVE_BIO_GET_DATA => undef,
212212
HAVE_BIO_METH_NEW => undef,
213213
HAVE_CBRT => undef,
214-
HAVE_CLASS => undef,
215214
HAVE_CLOCK_GETTIME => undef,
216215
HAVE_COMPUTED_GOTO => undef,
217216
HAVE_COPYFILE => undef,
@@ -240,10 +239,6 @@ sub GenerateFiles
240239
HAVE_EXPLICIT_BZERO => undef,
241240
HAVE_FDATASYNC => undef,
242241
HAVE_FLS => undef,
243-
HAVE_FPCLASS => undef,
244-
HAVE_FP_CLASS => undef,
245-
HAVE_FP_CLASS_D => undef,
246-
HAVE_FP_CLASS_H => undef,
247242
HAVE_FSEEKO => 1,
248243
HAVE_FUNCNAME__FUNC => undef,
249244
HAVE_FUNCNAME__FUNCTION => 1,
@@ -269,7 +264,6 @@ sub GenerateFiles
269264
HAVE_GSSAPI_H => undef,
270265
HAVE_HISTORY_H => undef,
271266
HAVE_HISTORY_TRUNCATE_FILE => undef,
272-
HAVE_IEEEFP_H => undef,
273267
HAVE_IFADDRS_H => undef,
274268
HAVE_INET_ATON => undef,
275269
HAVE_INT_TIMEZONE => 1,
@@ -279,7 +273,6 @@ sub GenerateFiles
279273
HAVE_INT_OPTERR => undef,
280274
HAVE_INT_OPTRESET => undef,
281275
HAVE_IPV6 => 1,
282-
HAVE_ISINF => 1,
283276
HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P => undef,
284277
HAVE_KQUEUE => undef,
285278
HAVE_LANGINFO_H => undef,

0 commit comments

Comments
 (0)