From 5b2bd4b7cbde6283637297d924c1d9dd8db7f6e9 Mon Sep 17 00:00:00 2001 From: Roumen Petrov Date: Sat, 23 Feb 2013 21:20:40 +0200 Subject: [PATCH 12/16] MINGW: determine if pwdmodule should be used --- Modules/Setup.config.in | 3 +++ Modules/Setup.dist | 2 -- configure.ac | 7 +++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Modules/Setup.config.in b/Modules/Setup.config.in index e41345d..fe63ffe 100644 --- a/Modules/Setup.config.in +++ b/Modules/Setup.config.in @@ -6,6 +6,9 @@ # init system calls(posix/nt/...) for INITFUNC (used by makesetup) @INITSYS@ posixmodule.c +# This is needed to find out the user's home dir if $HOME is not set +@USE_PWD_MODULE@pwd pwdmodule.c + # Threading @USE_THREAD_MODULE@_thread _threadmodule.c diff --git a/Modules/Setup.dist b/Modules/Setup.dist index 09c418c..4543bd9 100644 --- a/Modules/Setup.dist +++ b/Modules/Setup.dist @@ -106,8 +106,6 @@ PYTHONPATH=$(COREPYTHONPATH) # setup.py script in the root of the Python source tree. errno errnomodule.c # posix (UNIX) errno values -pwd pwdmodule.c # this is needed to find out the user's home dir - # if $HOME is not set _sre _sre.c # Fredrik Lundh's new regular expressions _codecs _codecsmodule.c # access to the builtin codecs and codec registry _weakref _weakref.c # weak references diff --git a/configure.ac b/configure.ac index fb67bf5..5a8b0d1 100644 --- a/configure.ac +++ b/configure.ac @@ -2412,6 +2412,13 @@ case $host in *-*-mingw*) USE_WIN32_MODULE=;; esac +# Determine if pwdmodule should be used. +AC_SUBST(USE_PWD_MODULE) +USE_PWD_MODULE= +case $host in + *-*-mingw*) USE_PWD_MODULE='#';; +esac + # Determine if signalmodule should be used. AC_SUBST(USE_SIGNAL_MODULE) AC_SUBST(SIGNAL_OBJS) -- 1.7.12.1