summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-11-23 14:59:07 (GMT)
committerChristian Heimes <christian@cheimes.de>2013-11-23 14:59:07 (GMT)
commit5de397e158d538ffa065974006e58547891bd955 (patch)
treedfa6715108e51cb33635bdf23210443f42898b03 /Modules
parent4c05b472ddd4634138b6abfa857ee37761d33185 (diff)
parent2cf3917954dab65c025ea39f8b6a0298c598f9f7 (diff)
downloadcpython-5de397e158d538ffa065974006e58547891bd955.zip
cpython-5de397e158d538ffa065974006e58547891bd955.tar.gz
cpython-5de397e158d538ffa065974006e58547891bd955.tar.bz2
merge
Diffstat (limited to 'Modules')
-rw-r--r--Modules/posixmodule.c9
-rw-r--r--Modules/timemodule.c2
2 files changed, 3 insertions, 8 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 71b1437..4c96204 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -4953,13 +4953,8 @@ posix_utime(PyObject *self, PyObject *args, PyObject *kwargs)
}
if (utime.now) {
- SYSTEMTIME now;
- GetSystemTime(&now);
- if (!SystemTimeToFileTime(&now, &mtime) ||
- !SystemTimeToFileTime(&now, &atime)) {
- PyErr_SetFromWindowsErr(0);
- goto exit;
- }
+ GetSystemTimeAsFileTime(&mtime);
+ atime = mtime;
}
else {
time_t_to_FILE_TIME(utime.atime_s, utime.atime_ns, &atime);
diff --git a/Modules/timemodule.c b/Modules/timemodule.c
index ca39906..d3878b9 100644
--- a/Modules/timemodule.c
+++ b/Modules/timemodule.c
@@ -650,7 +650,7 @@ time_strftime(PyObject *self, PyObject *args)
return NULL;
}
}
-#elif defined(_AIX) && defined(HAVE_WCSFTIME)
+#elif (defined(_AIX) || defined(sun)) && defined(HAVE_WCSFTIME)
for(outbuf = wcschr(fmt, '%');
outbuf != NULL;
outbuf = wcschr(outbuf+2, '%'))