[pypy-commit] pypy default: Merged in sthalik/pypy (pull request #145)
fijal
noreply at buildbot.pypy.org
Tue Mar 26 05:23:28 CET 2013
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch:
Changeset: r62795:f5c34aa30a73
Date: 2013-03-25 21:23 -0700
http://bitbucket.org/pypy/pypy/changeset/f5c34aa30a73/
Log: Merged in sthalik/pypy (pull request #145)
fix mingw
diff --git a/rpython/rlib/_rsocket_rffi.py b/rpython/rlib/_rsocket_rffi.py
--- a/rpython/rlib/_rsocket_rffi.py
+++ b/rpython/rlib/_rsocket_rffi.py
@@ -81,11 +81,14 @@
'#define RCVALL_ON 1',
'#define RCVALL_SOCKETLEVELONLY 2',
'''\
+ #ifndef __MINGW32__
struct tcp_keepalive {
u_long onoff;
u_long keepalivetime;
u_long keepaliveinterval;
- };'''
+ };
+ #endif
+ '''
])
HEADER = '\n'.join(header_lines)
COND_HEADER = ''
diff --git a/rpython/rlib/clibffi.py b/rpython/rlib/clibffi.py
--- a/rpython/rlib/clibffi.py
+++ b/rpython/rlib/clibffi.py
@@ -115,10 +115,10 @@
)
eci = rffi_platform.configure_external_library(
- 'libffi-5', eci,
+ 'ffi-5', eci,
[dict(prefix='libffi-',
include_dir='include', library_dir='.libs'),
- dict(prefix=r'c:\mingw64', include_dir='include', library_dir='lib'),
+ dict(prefix=r'c:\\mingw64', include_dir='include', library_dir='lib'),
])
else:
USE_C_LIBFFI_MSVC = True
diff --git a/rpython/translator/c/src/commondefs.h b/rpython/translator/c/src/commondefs.h
--- a/rpython/translator/c/src/commondefs.h
+++ b/rpython/translator/c/src/commondefs.h
@@ -28,6 +28,9 @@
*/
+#if defined(__MINGW32__)
+# include <windows.h>
+#endif
#include <limits.h>
#ifndef LLONG_MAX
diff --git a/rpython/translator/c/src/mem.h b/rpython/translator/c/src/mem.h
--- a/rpython/translator/c/src/mem.h
+++ b/rpython/translator/c/src/mem.h
@@ -37,7 +37,7 @@
#define OP_RAW_MALLOC_USAGE(size, r) r = size
-#ifdef MS_WINDOWS
+#if defined(MS_WINDOWS) && !defined(__MINGW32__)
#define alloca _alloca
#endif
diff --git a/rpython/translator/c/src/stacklet/slp_platformselect.h b/rpython/translator/c/src/stacklet/slp_platformselect.h
--- a/rpython/translator/c/src/stacklet/slp_platformselect.h
+++ b/rpython/translator/c/src/stacklet/slp_platformselect.h
@@ -1,5 +1,6 @@
-
-#if defined(_M_IX86)
+#if defined(__MINGW32__)
+#include "switch_x86_gcc.h" /* gcc on X86 */
+#elif defined(_M_IX86)
#include "switch_x86_msvc.h" /* MS Visual Studio on X86 */
#elif defined(_M_X64)
#include "switch_x64_msvc.h" /* MS Visual Studio on X64 */
diff --git a/rpython/translator/c/src/thread_nt.c b/rpython/translator/c/src/thread_nt.c
--- a/rpython/translator/c/src/thread_nt.c
+++ b/rpython/translator/c/src/thread_nt.c
@@ -105,6 +105,7 @@
BOOL InitializeNonRecursiveMutex(PNRMUTEX mutex)
{
mutex->sem = CreateSemaphore(NULL, 1, 1, NULL);
+ return !!mutex->sem;
}
VOID DeleteNonRecursiveMutex(PNRMUTEX mutex)
More information about the pypy-commit
mailing list