Author: Christian Tismer <tis...@stackless.com> Branch: win64_gborg Changeset: r48798:2f25d74f9648 Date: 2011-11-05 18:23 +0100 http://bitbucket.org/pypy/pypy/changeset/2f25d74f9648/
Log: coming closer, 49 tests passed, 16 failed in test_typed.py Failing: test_memoryerror test_unichr test_UNICHR test_list_indexerror test_long_long test_int_overflow test_int_floordiv_ovf_zer test_int_mul_ovf test_int_mod_ovf_zer test_int_unary_ovf test_float2str test_uint_arith test_hash_preservation test_range_iter test_float test_ovfcheck_float_to_int diff --git a/pypy/doc/discussion/win64_todo.txt b/pypy/doc/discussion/win64_todo.txt --- a/pypy/doc/discussion/win64_todo.txt +++ b/pypy/doc/discussion/win64_todo.txt @@ -1,4 +1,8 @@ -20011-11-4 +2011-11-04 ll_os.py has a problem with the file rwin32.py. Temporarily disabled for the win64_gborg branch. This needs to be -investigated and re-enabled. \ No newline at end of file +investigated and re-enabled. + +2011-11-05 +test_typed.py needs explicit tests to ensure that we +handle word sizes right. \ No newline at end of file diff --git a/pypy/rpython/module/ll_os.py b/pypy/rpython/module/ll_os.py --- a/pypy/rpython/module/ll_os.py +++ b/pypy/rpython/module/ll_os.py @@ -402,9 +402,13 @@ UTIMBUFP = lltype.Ptr(self.UTIMBUF) os_utime = self.llexternal('utime', [rffi.CCHARP, UTIMBUFP], rffi.INT) + if not _WIM32: + includes = ['sys/time.h'] + else: + includes = ['time.h'] class CConfig: _compilation_info_ = ExternalCompilationInfo( - includes=['sys/time.h'] + includes=includes ) HAVE_UTIMES = platform.Has('utimes') config = platform.configure(CConfig) @@ -414,9 +418,14 @@ if config['HAVE_UTIMES']: class CConfig: - _compilation_info_ = ExternalCompilationInfo( - includes = ['sys/time.h'] - ) + if not _WIN32: + _compilation_info_ = ExternalCompilationInfo( + includes = ['sys/time.h'] + ) + else: + _compilation_info_ = ExternalCompilationInfo( + includes = ['time.h'] + ) TIMEVAL = platform.Struct('struct timeval', [('tv_sec', rffi.LONG), ('tv_usec', rffi.LONG)]) config = platform.configure(CConfig) diff --git a/pypy/translator/c/primitive.py b/pypy/translator/c/primitive.py --- a/pypy/translator/c/primitive.py +++ b/pypy/translator/c/primitive.py @@ -1,7 +1,7 @@ import sys from pypy.rlib.objectmodel import Symbolic, ComputedIntSymbolic from pypy.rlib.objectmodel import CDefinedIntSymbolic -from pypy.rlib.rarithmetic import r_longlong +from pypy.rlib.rarithmetic import r_longlong, is_emulated_long from pypy.rlib.rfloat import isinf, isnan from pypy.rpython.lltypesystem.lltype import * from pypy.rpython.lltypesystem import rffi, llgroup @@ -204,6 +204,13 @@ GCREF: 'void* @', } +# support for win64, where sizeof(long) == 4 +if is_emulated_long: + PrimitiveType.update( { + Signed: '__int64 @', + Unsigned: 'unsigned __int64 @', + } ) + def define_c_primitive(ll_type, c_name, suffix=''): if ll_type in PrimitiveName: return @@ -221,7 +228,11 @@ define_c_primitive(rffi.INT, 'int') define_c_primitive(rffi.INT_real, 'int') define_c_primitive(rffi.UINT, 'unsigned int') -define_c_primitive(rffi.LONG, 'long', 'L') -define_c_primitive(rffi.ULONG, 'unsigned long', 'UL') +if is_emulated_long: # special case for win64 + define_c_primitive(rffi.LONG, '__int64', 'LL') + define_c_primitive(rffi.ULONG, 'unsigned __int64', 'ULL') +else: + define_c_primitive(rffi.LONG, 'long', 'L') + define_c_primitive(rffi.ULONG, 'unsigned long', 'UL') define_c_primitive(rffi.LONGLONG, 'long long', 'LL') define_c_primitive(rffi.ULONGLONG, 'unsigned long long', 'ULL') _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit