Skip to content

Commit 364a59d

Browse files
committed
gh-108765: Python.h no longer includes <ieeefp.h>
1 parent 0e01fac commit 364a59d

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

Doc/whatsnew/3.13.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -915,6 +915,11 @@ 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.
921+
(Contributed by Victor Stinner in :gh:`108765`.)
922+
918923
Deprecated
919924
----------
920925

Include/Python.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#endif
3434

3535
#include <assert.h> // assert()
36+
#include <math.h> // HUGE_VAL
3637
#include <wchar.h> // wchar_t
3738

3839
#include "pyport.h"

Include/pyport.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,6 @@ typedef Py_ssize_t Py_ssize_clean_t;
189189
# define Py_MEMCPY memcpy
190190
#endif
191191

192-
#ifdef HAVE_IEEEFP_H
193-
#include <ieeefp.h> /* needed for 'finite' declaration on some platforms */
194-
#endif
195-
196-
#include <math.h> /* Moved here from the math section, before extern "C" */
197-
198192
/********************************************
199193
* WRAPPER FOR <time.h> and/or <sys/time.h> *
200194
********************************************/
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. Patch
4+
by Victor Stinner.

0 commit comments

Comments
 (0)