X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fsrc%2Ftod.c;h=8f095aec661acae74af398ba4b1fbc212e8fff94;hb=82c0c8ea2f3fe5524740c4b46bd9dc907b9d555d;hp=427227c688eda6d10259bc48c94a8a9c9c537785;hpb=d502442ac32f8964f6cf86469869cecb035d12c0;p=exim.git diff --git a/src/src/tod.c b/src/src/tod.c index 427227c68..8f095aec6 100644 --- a/src/src/tod.c +++ b/src/src/tod.c @@ -60,7 +60,7 @@ if (type == tod_epoch_l) struct timeval tv; gettimeofday(&tv, NULL); /* Unix epoch/usec format */ - (void) sprintf(CS timebuf, "%ld%06ld", tv.tv_sec, (long) tv.tv_usec ); + (void) sprintf(CS timebuf, TIME_T_FMT "%06ld", tv.tv_sec, (long) tv.tv_usec ); return timebuf; } @@ -74,8 +74,8 @@ if (type == tod_log) type = log_timezone? tod_log_zone : tod_log_bare; else if (type == tod_epoch) { - (void) sprintf(CS timebuf, "%d", (int)now); /* Unix epoch format */ - return timebuf; + (void) sprintf(CS timebuf, TIME_T_FMT, now); /* Unix epoch format */ + return timebuf; /* NB the above will be wrong if time_t is FP */ } else if (type == tod_zulu)