summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-03-01 06:33:32 (GMT)
committerFred Drake <fdrake@acm.org>2001-03-01 06:33:32 (GMT)
commitc63d3e9453c860cd255d5a77fb3853aaac95bd8f (patch)
tree2fe80556536a1c3731cbd563e6be67df86f3b5d8 /Python
parent7889107be7cb5a28aabcdfa33778bdce3e9b5c27 (diff)
downloadcpython-c63d3e9453c860cd255d5a77fb3853aaac95bd8f.zip
cpython-c63d3e9453c860cd255d5a77fb3853aaac95bd8f.tar.gz
cpython-c63d3e9453c860cd255d5a77fb3853aaac95bd8f.tar.bz2
Suppress a compiler warning under OpenVMS; time_t is unsigned on (at least)
the more recent versions of that platform, so we use the value (time_t)(-1) as the error value. This is the type used in the OpenVMS documentation: http://www.openvms.compaq.com/commercial/c/5763p048.htm#inde This closes SF tracker bug #404240. Also clean up an exception message when detecting overflow of time_t values beyond 4 bytes.
Diffstat (limited to 'Python')
-rw-r--r--Python/import.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/import.c b/Python/import.c
index 317e2c8..1142875 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -702,7 +702,7 @@ load_source_module(char *name, char *pathname, FILE *fp)
PyObject *m;
mtime = PyOS_GetLastModificationTime(pathname, fp);
- if (mtime == -1)
+ if (mtime == (time_t)(-1))
return NULL;
#if SIZEOF_TIME_T > 4
/* Python's .pyc timestamp handling presumes that the timestamp fits
@@ -711,7 +711,7 @@ load_source_module(char *name, char *pathname, FILE *fp)
*/
if (mtime >> 32) {
PyErr_SetString(PyExc_OverflowError,
- "modification time overflows a 4 bytes");
+ "modification time overflows a 4 byte field");
return NULL;
}
#endif