From: oetiker Date: Mon, 29 Mar 2010 16:26:55 +0000 (+0000) Subject: when printing time_t use %lld with (long long int) for portability X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0015b77ec5661683d28d504c4e877e7b12d9ae9c;p=rrdtool-all.git when printing time_t use %lld with (long long int) for portability git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.4@2057 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/program/src/rrd_tool.c b/program/src/rrd_tool.c index ea94ea14..d860abec 100644 --- a/program/src/rrd_tool.c +++ b/program/src/rrd_tool.c @@ -721,10 +721,10 @@ int HandleInputLine( XML_ENCODING); printf("<%s>\n", ROOT_TAG); printf(" <%s>\n", META_TAG); - printf(" <%s>%lu\n", META_START_TAG, - (unsigned long) start + step, META_START_TAG); + printf(" <%s>%lld\n", META_START_TAG, + (long long int) start + step, META_START_TAG); printf(" <%s>%lu\n", META_STEP_TAG, step, META_STEP_TAG); - printf(" <%s>%lu\n", META_END_TAG, (unsigned long) end, + printf(" <%s>%lld\n", META_END_TAG, (long long int) end, META_END_TAG); printf(" <%s>%lu\n", META_ROWS_TAG, row_cnt, META_ROWS_TAG); @@ -745,7 +745,7 @@ int HandleInputLine( printf(" <%s>\n", DATA_TAG); for (ti = start + step; ti <= end; ti += step) { printf(" <%s>", DATA_ROW_TAG); - printf("<%s>%lu", COL_TIME_TAG, ti, COL_TIME_TAG); + printf("<%s>%lld", COL_TIME_TAG, (long long int)ti, COL_TIME_TAG); for (j = 0; j < col_cnt; j++) { rrd_value_t newval = DNAN;