SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
40
net/rrdtool/patches/patch-src_rrd_tool_c
Normal file
40
net/rrdtool/patches/patch-src_rrd_tool_c
Normal file
|
@ -0,0 +1,40 @@
|
|||
Correctly print time_t.
|
||||
|
||||
Index: src/rrd_tool.c
|
||||
--- src/rrd_tool.c.orig
|
||||
+++ src/rrd_tool.c
|
||||
@@ -723,19 +723,11 @@ static int HandleInputLine(
|
||||
else if (strcmp("resize", argv[1]) == 0)
|
||||
rrd_resize(argc - 1, &argv[1]);
|
||||
else if (strcmp("last", argv[1]) == 0)
|
||||
-#if defined _WIN32 && SIZEOF_TIME_T == 8 /* in case of __MINGW64__, _WIN64 and _MSC_VER >= 1400 (ifndef _USE_32BIT_TIME_T) */
|
||||
- printf("%lld\n", rrd_last(argc - 1, &argv[1]));
|
||||
-#else
|
||||
- printf("%ld\n", rrd_last(argc - 1, &argv[1]));
|
||||
-#endif
|
||||
+ printf("%lld\n", (long long)rrd_last(argc - 1, &argv[1]));
|
||||
else if (strcmp("lastupdate", argv[1]) == 0) {
|
||||
rrd_lastupdate(argc - 1, &argv[1]);
|
||||
} else if (strcmp("first", argv[1]) == 0)
|
||||
-#if defined _WIN32 && SIZEOF_TIME_T == 8 /* in case of __MINGW64__, _WIN64 and _MSC_VER >= 1400 (ifndef _USE_32BIT_TIME_T) */
|
||||
- printf("%lld\n", rrd_first(argc - 1, &argv[1]));
|
||||
-#else
|
||||
- printf("%ld\n", rrd_first(argc - 1, &argv[1]));
|
||||
-#endif
|
||||
+ printf("%lld\n", (long long)rrd_first(argc - 1, &argv[1]));
|
||||
else if (strcmp("update", argv[1]) == 0)
|
||||
rrd_update(argc - 1, &argv[1]);
|
||||
else if (strcmp("fetch", argv[1]) == 0) {
|
||||
@@ -753,11 +745,7 @@ static int HandleInputLine(
|
||||
printf("%20s", ds_namv[i]);
|
||||
printf("\n\n");
|
||||
for (ti = start + step; ti <= end; ti += step) {
|
||||
-#if defined _WIN32 && SIZEOF_TIME_T == 8 /* in case of __MINGW64__, _WIN64 and _MSC_VER >= 1400 (ifndef _USE_32BIT_TIME_T) */
|
||||
- printf("%10llu:", ti);
|
||||
-#else
|
||||
- printf("%10lu:", ti);
|
||||
-#endif
|
||||
+ printf("%10llu:", (long long)ti);
|
||||
for (ii = 0; ii < ds_cnt; ii++)
|
||||
printf(" %0.10e", *(datai++));
|
||||
printf("\n");
|
Loading…
Add table
Add a link
Reference in a new issue