Mercurial > cpython-lru_cache-weakref
view RISCOS/Python/getmtime_riscos.c @ 43371:fdff48f87f35 legacy-trunk
ctypes.util.find_library uses dump(1) instead of objdump(1) on Solaris.
Fixes issue #1777530; will backport to release25-maint.
| author | Thomas Heller <theller@ctypes.org> |
|---|---|
| date | Fri, 14 Sep 2007 19:40:35 +0000 |
| parents | 2d3cee9f1633 |
| children |
line wrap: on
line source
#include <stdio.h> #define __swi #include "oslib/osfile.h" long PyOS_GetLastModificationTime(char *path, FILE *fp) { int obj; bits load, exec, ftype; if (xosfile_read_stamped_no_path(path, &obj, &load, &exec, 0, 0, &ftype)) return -1; if (obj != osfile_IS_FILE) return -1; if (ftype == osfile_TYPE_UNTYPED) return -1; load &= 0xFF; load -= 51; if (exec < 1855548004U) load--; exec -= 1855548004U; return exec/100+42949672*load+(95*load)/100; }
