Author: Matti Picus <[email protected]>
Branch: win32-cleanup2
Changeset: r54213:8664eeb9165d
Date: 2012-04-06 07:56 +0300
http://bitbucket.org/pypy/pypy/changeset/8664eeb9165d/

Log:    translation fixes

diff --git a/pypy/rlib/rposix.py b/pypy/rlib/rposix.py
--- a/pypy/rlib/rposix.py
+++ b/pypy/rlib/rposix.py
@@ -20,8 +20,9 @@
         assert index == 0
         ll2ctypes.TLS.errno = value
 if os.name == 'nt':
-    post_include_bits =['''
+    separate_module_sources =['''
         /* Lifted completely from CPython 3.3 Modules/posix_module.c */
+        #include <malloc.h> /* for _msize */
         typedef struct {
             intptr_t osfhnd;
             char osfile;
@@ -72,12 +73,15 @@
             errno = EBADF;
             return 0;
         }
-    ''']
+    ''',]
+    export_symbols = ['_PyVerify_fd']
 else:
-    post_include_bits = []
+    separate_module_sources = []
+    export_symbols = []
 eci = ExternalCompilationInfo(
     includes=['errno.h','stdio.h'],
-    post_include_bits = post_include_bits,
+    separate_module_sources = separate_module_sources,
+    export_symbols = export_symbols,
 )
 
 _get_errno, _set_errno = CExternVariable(INT, 'errno', eci,
diff --git a/pypy/translator/c/src/main.h b/pypy/translator/c/src/main.h
--- a/pypy/translator/c/src/main.h
+++ b/pypy/translator/c/src/main.h
@@ -20,7 +20,7 @@
 #endif
 
 #ifdef MS_WINDOWS
-/*#include "src/winstuff.c"*/
+#include "src/winstuff.c"
 #endif
 
 #ifdef __GNUC__
diff --git a/pypy/translator/c/src/winstuff.c b/pypy/translator/c/src/winstuff.c
--- a/pypy/translator/c/src/winstuff.c
+++ b/pypy/translator/c/src/winstuff.c
@@ -27,7 +27,7 @@
 
 void pypy_Windows_startup(void)
 {
-#if defined _MSC_VER && _MSC_VER >= 1400 && defined(__STDC_SECURE_LIB__)
+#if 0 && defined _MSC_VER && _MSC_VER >= 1400 && defined(__STDC_SECURE_LIB__)
     /* Set CRT argument error handler */
     _set_invalid_parameter_handler(InvalidParameterHandler);
     /* turn off assertions within CRT in debug mode;
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to