Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix compilation on Windows
  • Loading branch information
vstinner committed Mar 1, 2019
commit e7a8e72cbad07c6e226356533e332f7f9b15ab68
31 changes: 10 additions & 21 deletions Modules/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,22 @@
#include "pycore_pymem.h"
#include "pycore_pystate.h"

/* includes for exit_sigint() */
#ifdef __FreeBSD__
# include <fenv.h> /* fedisableexcept() */
#endif

/* Includes for exit_sigint() */
#include <stdio.h> /* perror() */
#ifdef HAVE_SIGNAL_H
# include <signal.h>
# include <signal.h> /* SIGINT */
#endif
#include <stdio.h>
#if defined(HAVE_GETPID) && defined(HAVE_UNISTD_H)
# include <unistd.h>
#endif

#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 <unistd.h> /* getpid() */
#endif

#ifdef _MSC_VER
# include <crtdbg.h>
#endif
/* end of includes for exit_sigint() */

#ifdef __FreeBSD__
# include <fenv.h> /* fedisableexcept() */
# include <crtdbg.h> /* STATUS_CONTROL_C_EXIT */
#endif
/* End of includes for exit_sigint() */

#define COPYRIGHT \
"Type \"help\", \"copyright\", \"credits\" or \"license\" " \
Expand Down
13 changes: 11 additions & 2 deletions Python/coreconfig.c
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
#include "Python.h"
#include "osdefs.h" /* DELIM */
#include "osdefs.h" /* DELIM */
#include "pycore_coreconfig.h"
#include "pycore_fileutils.h"
#include "pycore_getopt.h"
#include "pycore_pylifecycle.h"
#include "pycore_pymem.h"
#include "pycore_pathconfig.h"
#include <locale.h> /* setlocale() */
#include <locale.h> /* setlocale() */
#ifdef HAVE_LANGINFO_H
# include <langinfo.h> /* nl_langinfo(CODESET) */
#endif
#if defined(MS_WINDOWS) || defined(__CYGWIN__)
# include <windows.h> /* GetACP() */
# ifdef HAVE_IO_H
# include <io.h>
# endif
# ifdef HAVE_FCNTL_H
# include <fcntl.h> /* O_BINARY */
# endif
#endif


/* --- Command line options --------------------------------------- */
Expand Down