Chez Scheme: accomodate new MinGW for 32-bit Windows

This commit is contained in:
Matthew Flatt 2020-11-03 18:09:56 -07:00
parent 5d53bdac0c
commit 66ed5369ef
2 changed files with 7 additions and 2 deletions

View File

@ -423,11 +423,16 @@ ptr S_gmtime(ptr tzoff, ptr tspair) {
return dtvec;
}
#ifndef GET_TIME
# define GET_TIME time
#endif
ptr S_asctime(ptr dtvec) {
char buf[26];
if (dtvec == Sfalse) {
time_t tx = time(NULL);
time_t tx = GET_TIME(NULL);
if (ctime_r(&tx, buf) == NULL) return Sfalse;
} else {
struct tm tmx;

View File

@ -263,7 +263,7 @@ struct timespec;
#endif
#if defined(__MINGW32__) && (machine_type == machine_type_ti3nt || machine_type == machine_type_i3nt)
#define time_t __time64_t
#define time _time64
#define GET_TIME _time64
#endif
#endif