diff options
author | Christos Zoulas <christos@zoulas.com> | 2021-12-06 15:33:00 +0000 |
---|---|---|
committer | Christos Zoulas <christos@zoulas.com> | 2021-12-06 15:33:00 +0000 |
commit | 449590997a72a6fff50c71a25400d53797b8cb82 (patch) | |
tree | f3aa067229eab5ffb899288938d4c656d40975b2 /src/cdf_time.c | |
parent | d71657f7a32ca1600730ac0599e265ca2cadd94f (diff) | |
download | file-git-449590997a72a6fff50c71a25400d53797b8cb82.tar.gz |
Windows improvements
Diffstat (limited to 'src/cdf_time.c')
-rw-r--r-- | src/cdf_time.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cdf_time.c b/src/cdf_time.c index e4eea4c7..68388f11 100644 --- a/src/cdf_time.c +++ b/src/cdf_time.c @@ -27,7 +27,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: cdf_time.c,v 1.19 2019/03/12 20:43:05 christos Exp $") +FILE_RCSID("@(#)$File: cdf_time.c,v 1.20 2021/12/06 15:33:00 christos Exp $") #endif #include <time.h> @@ -171,8 +171,13 @@ cdf_ctime(const time_t *sec, char *buf) char *ptr = ctime_r(sec, buf); if (ptr != NULL) return buf; +#ifdef WIN32 + (void)snprintf(buf, 26, "*Bad* 0x%16.16I64x\n", + CAST(long long, *sec)); +#else (void)snprintf(buf, 26, "*Bad* %#16.16" INT64_T_FORMAT "x\n", CAST(long long, *sec)); +#endif return buf; } |