Commits

Christian Tismer committed 95c8b04

ll_os.utimes works, too

Comments (0)

Files changed (4)

pypy/rlib/rarithmetic.py

 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:
 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
 

pypy/rpython/lltypesystem/lltype.py

 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

pypy/rpython/module/ll_os.py

         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']

pypy/rpython/module/ll_os_stat.py

 
 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))