Merge.
[fedora-mingw.git] / python3 / mingw32-python-3.1-misc-modules.patch
1 Index: configure.in
2 ===================================================================
3 --- configure.in        (revision 67686)
4 +++ configure.in        (working copy)
5 @@ -2370,7 +2394,8 @@
6   setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
7   sigaction siginterrupt sigrelse strftime strlcpy \
8   sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
9 - truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll wcsxfrm _getpty)
10 + truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll wcsxfrm _getpty \
11 + _wfopen _wgetcwd _wstat)
12  
13  # For some functions, having a definition is not sufficient, since
14  # we want to take their address.
15 Index: Modules/main.c
16 ===================================================================
17 --- Modules/main.c      (revision 67686)
18 +++ Modules/main.c      (working copy)
19 @@ -100,7 +100,7 @@
20  PYTHONIOENCODING: Encoding[:errors] used for stdin/stdout/stderr.\n\
21  ";
22  
23 -#ifndef MS_WINDOWS
24 +#ifndef HAVE__WFOPEN
25  static FILE*
26  _wfopen(const wchar_t *path, const wchar_t *mode)
27  {
28 Index: Modules/getpath.c
29 ===================================================================
30 --- Modules/getpath.c   (revision 67686)
31 +++ Modules/getpath.c   (working copy)
32 @@ -131,11 +131,7 @@
33  static wchar_t *module_search_path = NULL;
34  static wchar_t lib_python[] = L"lib/python" VERSION;
35  
36 -/* In principle, this should use HAVE__WSTAT, and _wstat
37 -   should be detected by autoconf. However, no current
38 -   POSIX system provides that function, so testing for
39 -   it is pointless. */
40 -#ifndef MS_WINDOWS
41 +#ifndef HAVE__WSTAT
42  static int
43  _wstat(const wchar_t* path, struct stat *buf)
44  {
45 @@ -149,7 +145,7 @@
46  }
47  #endif
48  
49 -#ifndef MS_WINDOWS
50 +#ifndef HAVE__WGETCWD
51  static wchar_t*
52  _wgetcwd(wchar_t *buf, size_t size)
53  {