[pypy-svn] r49499 - pypy/dist/pypy/rpython/module
rxe at codespeak.net
rxe at codespeak.net
Fri Dec 7 11:38:10 CET 2007
Author: rxe
Date: Fri Dec 7 11:38:09 2007
New Revision: 49499
Modified:
pypy/dist/pypy/rpython/module/ll_os_stat.py
Log:
try a different way - dont force darwin to be 64 bit. this still seems somewhat fragile - it also depends what we want (should it choose 64 if available)
Modified: pypy/dist/pypy/rpython/module/ll_os_stat.py
==============================================================================
--- pypy/dist/pypy/rpython/module/ll_os_stat.py (original)
+++ pypy/dist/pypy/rpython/module/ll_os_stat.py Fri Dec 7 11:38:09 2007
@@ -141,9 +141,6 @@
if sys.platform.startswith('win'):
_name_struct_stat = '_stati64'
INCLUDES = ['sys/types.h', 'sys/stat.h']
-elif sys.platform.startswith('darwin'):
- _name_struct_stat = 'stat64'
- INCLUDES = ['sys/stat.h']
else:
_name_struct_stat = 'stat'
INCLUDES = ['sys/types.h', 'sys/stat.h', 'unistd.h']
@@ -198,12 +195,15 @@
'fstat': '_fstati64',
'lstat': '_stati64'} # no lstat on Windows
c_func_name = _functions[name]
- else:
+ elif sys.platform.startswith('linux'):
# because we always use _FILE_OFFSET_BITS 64 - this helps things work that are not a c compiler
_functions = {'stat': 'stat64',
'fstat': 'fstat64',
'lstat': 'lstat64'}
c_func_name = _functions[name]
+ else:
+ c_func_name = name
+
arg_is_path = (name != 'fstat')
if arg_is_path:
ARG1 = rffi.CCHARP
More information about the Pypy-commit
mailing list