summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-12-18 22:42:55 (GMT)
committerGitHub <noreply@github.com>2017-12-18 22:42:55 (GMT)
commit6efcb6d3d5911aaf699f9df3bb3bc26e94f38e6d (patch)
tree2f7c542cdd6c293b8d24efd198e6a9fb3b36585e /Modules
parentd757aaf9dd767d13205bf9917e520ebf43e7f6e5 (diff)
downloadcpython-6efcb6d3d5911aaf699f9df3bb3bc26e94f38e6d.zip
cpython-6efcb6d3d5911aaf699f9df3bb3bc26e94f38e6d.tar.gz
cpython-6efcb6d3d5911aaf699f9df3bb3bc26e94f38e6d.tar.bz2
bpo-32030: Fix compilation on FreeBSD, #include <fenv.h> (#4919)
* main.c: add missing #include <fenv.h> on FreeBSD * indent also other #ifdef in main.c * cleanup Programs/python.c
Diffstat (limited to 'Modules')
-rw-r--r--Modules/main.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/Modules/main.c b/Modules/main.c
index 00de7f0..4312ef7 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -9,23 +9,27 @@
#include <locale.h>
#if defined(MS_WINDOWS) || defined(__CYGWIN__)
-#include <windows.h>
-#ifdef HAVE_IO_H
-#include <io.h>
-#endif
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
+# include <windows.h>
+# ifdef HAVE_IO_H
+# include <io.h>
+# endif
+# ifdef HAVE_FCNTL_H
+# include <fcntl.h>
+# endif
#endif
#ifdef _MSC_VER
-#include <crtdbg.h>
+# include <crtdbg.h>
+#endif
+
+#ifdef __FreeBSD__
+# include <fenv.h>
#endif
#if defined(MS_WINDOWS)
-#define PYTHONHOMEHELP "<prefix>\\python{major}{minor}"
+# define PYTHONHOMEHELP "<prefix>\\python{major}{minor}"
#else
-#define PYTHONHOMEHELP "<prefix>/lib/pythonX.X"
+# define PYTHONHOMEHELP "<prefix>/lib/pythonX.X"
#endif
#define COPYRIGHT \