Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 57330ce

Browse files
committed
gh-108765: Python.h no longer includes <ieeefp.h>
Remove also the HAVE_IEEEFP_H macro: remove ieeefp.h from the AC_CHECK_HEADERS() check of configure.ac.
1 parent dd05c20 commit 57330ce

File tree

7 files changed

+12
-16
lines changed

7 files changed

+12
-16
lines changed

Doc/whatsnew/3.13.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -915,6 +915,12 @@ New Features
915915
Porting to Python 3.13
916916
----------------------
917917

918+
* ``Python.h`` no longer includes the ``<ieeefp.h>`` standard header. It was
919+
included for the ``finite()`` function which is now provided by the
920+
``<math.h>`` header. It should now be included explicitly if needed. Remove
921+
also the ``HAVE_IEEEFP_H`` macro.
922+
(Contributed by Victor Stinner in :gh:`108765`.)
923+
918924
Deprecated
919925
----------
920926

Include/Python.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <ctype.h> // tolower()
2121
#include <inttypes.h> // uintptr_t
2222
#include <limits.h> // INT_MAX
23+
#include <math.h> // HUGE_VAL
2324
#include <stdarg.h> // va_list
2425
#include <wchar.h> // wchar_t
2526
#ifdef HAVE_STDDEF_H

Include/pyport.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,6 @@ typedef Py_ssize_t Py_ssize_clean_t;
184184
# define Py_MEMCPY memcpy
185185
#endif
186186

187-
#ifdef HAVE_IEEEFP_H
188-
#include <ieeefp.h> /* needed for 'finite' declaration on some platforms */
189-
#endif
190-
191-
#include <math.h> /* Moved here from the math section, before extern "C" */
192-
193187
/********************************************
194188
* WRAPPER FOR <time.h> and/or <sys/time.h> *
195189
********************************************/
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
``Python.h`` no longer includes the ``<ieeefp.h>`` standard header. It was
2+
included for the ``finite()`` function which is now provided by the
3+
``<math.h>`` header. It should now be included explicitly if needed. Remove
4+
also the ``HAVE_IEEEFP_H`` macro. Patch by Victor Stinner.

configure

Lines changed: 0 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2667,7 +2667,7 @@ AC_DEFINE([STDC_HEADERS], [1],
26672667
# checks for header files
26682668
AC_CHECK_HEADERS([ \
26692669
alloca.h asm/types.h bluetooth.h conio.h direct.h dlfcn.h endian.h errno.h fcntl.h grp.h \
2670-
ieeefp.h io.h langinfo.h libintl.h libutil.h linux/auxvec.h sys/auxv.h linux/fs.h linux/limits.h linux/memfd.h \
2670+
io.h langinfo.h libintl.h libutil.h linux/auxvec.h sys/auxv.h linux/fs.h linux/limits.h linux/memfd.h \
26712671
linux/random.h linux/soundcard.h \
26722672
linux/tipc.h linux/wait.h netdb.h net/ethernet.h netinet/in.h netpacket/packet.h poll.h process.h pthread.h pty.h \
26732673
sched.h setjmp.h shadow.h signal.h spawn.h stropts.h sys/audioio.h sys/bsdtty.h sys/devpoll.h \

pyconfig.h.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -607,9 +607,6 @@
607607
/* Define this if you have le64toh() */
608608
#undef HAVE_HTOLE64
609609

610-
/* Define to 1 if you have the <ieeefp.h> header file. */
611-
#undef HAVE_IEEEFP_H
612-
613610
/* Define to 1 if you have the `if_nameindex' function. */
614611
#undef HAVE_IF_NAMEINDEX
615612

0 commit comments

Comments
 (0)