Skip to content

Commit

Permalink
gh-108765: Python.h no longer includes <ieeefp.h> (#108781)
Browse files Browse the repository at this point in the history
Remove also the HAVE_IEEEFP_H macro: remove ieeefp.h from the
AC_CHECK_HEADERS() check of configure.ac.
  • Loading branch information
vstinner committed Sep 2, 2023
1 parent 1f3e797 commit 4ba1809
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 16 deletions.
6 changes: 6 additions & 0 deletions Doc/whatsnew/3.13.rst
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,12 @@ New Features
Porting to Python 3.13
----------------------

* ``Python.h`` no longer includes the ``<ieeefp.h>`` standard header. It was
included for the ``finite()`` function which is now provided by the
``<math.h>`` header. It should now be included explicitly if needed. Remove
also the ``HAVE_IEEEFP_H`` macro.
(Contributed by Victor Stinner in :gh:`108765`.)

Deprecated
----------

Expand Down
1 change: 1 addition & 0 deletions Include/Python.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <ctype.h> // tolower()
#include <inttypes.h> // uintptr_t
#include <limits.h> // INT_MAX
#include <math.h> // HUGE_VAL
#include <stdarg.h> // va_list
#include <wchar.h> // wchar_t
#ifdef HAVE_STDDEF_H
Expand Down
6 changes: 0 additions & 6 deletions Include/pyport.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,6 @@ typedef Py_ssize_t Py_ssize_clean_t;
# define Py_MEMCPY memcpy
#endif

#ifdef HAVE_IEEEFP_H
#include <ieeefp.h> /* needed for 'finite' declaration on some platforms */
#endif

#include <math.h> /* Moved here from the math section, before extern "C" */

/********************************************
* WRAPPER FOR <time.h> and/or <sys/time.h> *
********************************************/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
``Python.h`` no longer includes the ``<ieeefp.h>`` standard header. It was
included for the ``finite()`` function which is now provided by the
``<math.h>`` header. It should now be included explicitly if needed. Remove
also the ``HAVE_IEEEFP_H`` macro. Patch by Victor Stinner.
6 changes: 0 additions & 6 deletions configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2667,7 +2667,7 @@ AC_DEFINE([STDC_HEADERS], [1],
# checks for header files
AC_CHECK_HEADERS([ \
alloca.h asm/types.h bluetooth.h conio.h direct.h dlfcn.h endian.h errno.h fcntl.h grp.h \
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 \
io.h langinfo.h libintl.h libutil.h linux/auxvec.h sys/auxv.h linux/fs.h linux/limits.h linux/memfd.h \
linux/random.h linux/soundcard.h \
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 \
sched.h setjmp.h shadow.h signal.h spawn.h stropts.h sys/audioio.h sys/bsdtty.h sys/devpoll.h \
Expand Down
3 changes: 0 additions & 3 deletions pyconfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -607,9 +607,6 @@
/* Define this if you have le64toh() */
#undef HAVE_HTOLE64

/* Define to 1 if you have the <ieeefp.h> header file. */
#undef HAVE_IEEEFP_H

/* Define to 1 if you have the `if_nameindex' function. */
#undef HAVE_IF_NAMEINDEX

Expand Down

0 comments on commit 4ba1809

Please sign in to comment.