Gitweb:
http://git.exim.org/exim.git/commitdiff/d0291a0af2ce1de0be95caad572ca952f3adba87
Commit: d0291a0af2ce1de0be95caad572ca952f3adba87
Parent: 3394b36a12dad7e106db7d7e59497cb24b10e67f
Author: Jeremy Harris <jgh146exb@???>
AuthorDate: Mon Dec 22 15:34:22 2014 +0000
Committer: Jeremy Harris <jgh146exb@???>
CommitDate: Tue Dec 23 20:23:37 2014 +0000
Use TIME_T_FMT for formatting tv_sec. Bug 1561
---
src/src/exim.c | 6 +++---
src/src/tod.c | 2 +-
src/src/transports/appendfile.c | 4 ++--
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 3f74737..d6915d4 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 0297e37..8f095ae 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 f56862b..d8664be 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 cfe7cb2..93bbba4 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)