Author: Christian Tismer <[email protected]>
Branch: win64_gborg
Changeset: r48972:95c8b04b7cf8
Date: 2011-11-08 20:34 +0100
http://bitbucket.org/pypy/pypy/changeset/95c8b04b7cf8/
Log: ll_os.utimes works, too
diff --git a/pypy/rlib/rarithmetic.py b/pypy/rlib/rarithmetic.py
--- a/pypy/rlib/rarithmetic.py
+++ b/pypy/rlib/rarithmetic.py
@@ -471,6 +471,9 @@
r_longlong = build_int('r_longlong', True, 64)
r_ulonglong = build_int('r_ulonglong', False, 64)
+r_long = build_int('r_long', True, 32)
+r_ulong = build_int('r_ulong', False, 32)
+
longlongmax = r_longlong(LONGLONG_TEST - 1)
if r_longlong is not r_int:
@@ -478,6 +481,12 @@
else:
r_int64 = int
+# needed for ll_os_stat.time_t_to_FILE_TIME in the 64 bit case
+if r_long is not r_int:
+ r_uint32 = r_ulong
+else:
+ r_uint32 = r_uint
+
# the 'float' C type
diff --git a/pypy/rpython/lltypesystem/lltype.py
b/pypy/rpython/lltypesystem/lltype.py
--- a/pypy/rpython/lltypesystem/lltype.py
+++ b/pypy/rpython/lltypesystem/lltype.py
@@ -1,7 +1,8 @@
import py
from pypy.rlib.rarithmetic import (r_int, r_uint, intmask, r_singlefloat,
r_ulonglong, r_longlong, r_longfloat,
- base_int, normalizedinttype, longlongmask)
+ base_int, normalizedinttype, longlongmask,
+ r_uint32)
from pypy.rlib.objectmodel import Symbolic
from pypy.tool.uid import Hashable
from pypy.tool.identity_dict import identity_dict
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,7 +402,7 @@
UTIMBUFP = lltype.Ptr(self.UTIMBUF)
os_utime = self.llexternal('utime', [rffi.CCHARP, UTIMBUFP], rffi.INT)
- if not _WIM32:
+ if not _WIN32:
includes = ['sys/time.h']
else:
includes = ['time.h']
diff --git a/pypy/rpython/module/ll_os_stat.py
b/pypy/rpython/module/ll_os_stat.py
--- a/pypy/rpython/module/ll_os_stat.py
+++ b/pypy/rpython/module/ll_os_stat.py
@@ -456,6 +456,6 @@
def time_t_to_FILE_TIME(time, filetime):
ft = lltype.r_longlong((time + secs_between_epochs) * 10000000)
- filetime.c_dwHighDateTime = lltype.r_uint(ft >> 32)
- filetime.c_dwLowDateTime = lltype.r_uint(ft & lltype.r_uint(-1))
+ filetime.c_dwHighDateTime = lltype.r_uint32(ft >> 32)
+ filetime.c_dwLowDateTime = lltype.r_uint32(ft & lltype.r_uint(-1))
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit