diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2014-12-22 15:34:22 +0000 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2014-12-23 20:23:37 +0000 |
commit | d0291a0af2ce1de0be95caad572ca952f3adba87 (patch) | |
tree | 6bc35f7aae0202fef4f13a86d7b7eca52eb78e21 | |
parent | 3394b36a12dad7e106db7d7e59497cb24b10e67f (diff) |
Use TIME_T_FMT for formatting tv_sec. Bug 1561
-rw-r--r-- | src/src/exim.c | 6 | ||||
-rw-r--r-- | src/src/tod.c | 2 | ||||
-rw-r--r-- | src/src/transports/appendfile.c | 4 | ||||
-rw-r--r-- | src/src/transports/tf_maildir.c | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/src/src/exim.c b/src/src/exim.c index 3f7473776..d6915d4ad 100644 --- a/src/src/exim.c +++ b/src/src/exim.c @@ -413,11 +413,11 @@ if (exim_tvcmp(&now_tv, then_tv) <= 0) { if (!running_in_test_harness) { - debug_printf("tick check: %lu.%06lu %lu.%06lu\n", + debug_printf("tick check: " TIME_T_FMT ".%06lu " TIME_T_FMT ".%06lu\n", then_tv->tv_sec, (long) then_tv->tv_usec, now_tv.tv_sec, (long) now_tv.tv_usec); - debug_printf("waiting %lu.%06lu\n", itval.it_value.tv_sec, - (long) itval.it_value.tv_usec); + debug_printf("waiting " TIME_T_FMT ".%06lu\n", + itval.it_value.tv_sec, (long) itval.it_value.tv_usec); } } diff --git a/src/src/tod.c b/src/src/tod.c index 0297e375e..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; } diff --git a/src/src/transports/appendfile.c b/src/src/transports/appendfile.c index f56862bec..d8664be2e 100644 --- a/src/src/transports/appendfile.c +++ b/src/src/transports/appendfile.c @@ -2540,8 +2540,8 @@ else uschar *basename; (void)gettimeofday(&msg_tv, NULL); - basename = string_sprintf("%lu.H%luP%lu.%s", msg_tv.tv_sec, - msg_tv.tv_usec, getpid(), primary_hostname); + basename = string_sprintf(TIME_T_FMT ".H%luP%lu.%s", + msg_tv.tv_sec, msg_tv.tv_usec, getpid(), primary_hostname); filename = dataname = string_sprintf("tmp/%s", basename); newname = string_sprintf("new/%s", basename); diff --git a/src/src/transports/tf_maildir.c b/src/src/transports/tf_maildir.c index cfe7cb291..93bbba455 100644 --- a/src/src/transports/tf_maildir.c +++ b/src/src/transports/tf_maildir.c @@ -554,8 +554,8 @@ else FALSE); (void)gettimeofday(&tv, NULL); - tempname = string_sprintf("%s/tmp/%lu.H%luP%lu.%s", path, tv.tv_sec, - tv.tv_usec, (long unsigned) getpid(), primary_hostname); + tempname = string_sprintf("%s/tmp/" TIME_T_FMT ".H%luP%lu.%s", + path, tv.tv_sec, tv.tv_usec, (long unsigned) getpid(), primary_hostname); fd = Uopen(tempname, O_RDWR|O_CREAT|O_EXCL, ob->mode ? ob->mode : 0600); if (fd >= 0) |