[pypy-svn] r44359 - pypy/dist/pypy/rpython/lltypesystem

fijal at codespeak.net fijal at codespeak.net
Tue Jun 19 10:30:42 CEST 2007


Author: fijal
Date: Tue Jun 19 10:30:41 2007
New Revision: 44359

Modified:
   pypy/dist/pypy/rpython/lltypesystem/rfficache.py
Log:
Don't cheat anymore and solve win32 issue  properly.


Modified: pypy/dist/pypy/rpython/lltypesystem/rfficache.py
==============================================================================
--- pypy/dist/pypy/rpython/lltypesystem/rfficache.py	(original)
+++ pypy/dist/pypy/rpython/lltypesystem/rfficache.py	Tue Jun 19 10:30:41 2007
@@ -5,6 +5,7 @@
 
 import py
 import os
+import sys
 from pypy.translator.tool.cbuild import build_executable
 from subprocess import PIPE, Popen
 from pypy.tool.udir import udir
@@ -16,9 +17,6 @@
     c_source = py.code.Source('''
     // includes
     %s
-    #ifdef _WIN32
-    typedef int mode_t;
-    #endif
 
     // checking code
     int main(void)
@@ -48,7 +46,9 @@
 for _name in 'char short int long'.split():
     for name in (_name, 'unsigned ' + _name):
         TYPES.append(name)
-TYPES += ['long long', 'unsigned long long', 'size_t', 'mode_t']
+TYPES += ['long long', 'unsigned long long', 'size_t']
+if os.name == 'posix':
+    TYPES.append('mode_t')
 
 def newline_repr(d):
     assert isinstance(d, dict)



More information about the Pypy-commit mailing list