]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-46816: Remove declarations for non-__STDC__ compilers (GH-31466)
authorOleg Iarygin <oleg@arhadthedev.net>
Fri, 25 Feb 2022 23:16:59 +0000 (02:16 +0300)
committerGitHub <noreply@github.com>
Fri, 25 Feb 2022 23:16:59 +0000 (00:16 +0100)
After Python switched to C11, there is a guarantee that every compiler
conforms to ISO C so checks of __STDC__ have no sense.

Include/internal/pycore_pymath.h
Python/errors.c

index 1f54b3d81325d6111a362428ecf3b3e23eefcfed..5c6aee2a23890b5bbc73afb281f06f2eb5a68191 100644 (file)
@@ -8,15 +8,6 @@ extern "C" {
 #  error "this header requires Py_BUILD_CORE define"
 #endif
 
-// Extra declarations
-#if !defined(_MSC_VER) && !defined(__STDC__)
-extern double fmod (double, double);
-extern double frexp (double, int *);
-extern double ldexp (double, int);
-extern double modf (double, double *);
-extern double pow(double, double);
-#endif  // !defined(_MSC_VER) && !defined(__STDC__)
-
 
 /* _Py_ADJUST_ERANGE1(x)
  * _Py_ADJUST_ERANGE2(x, y)
index 10a06a5ae3267246c4c8cb063800e5ac2af02bc7..e170c9dff2dbbcc121b3867190c54b1ab7b65121 100644 (file)
 #include "pycore_sysmodule.h"     // _PySys_Audit()
 #include "pycore_traceback.h"     // _PyTraceBack_FromFrame()
 
-#ifndef __STDC__
-#ifndef MS_WINDOWS
-extern char *strerror(int);
-#endif
-#endif
-
 #include <ctype.h>
 #ifdef MS_WINDOWS
 #  include <windows.h>