summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7348cb9)
raw | patch | inline | side by side (parent: 7348cb9)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 13 Aug 2006 16:22:53 +0000 (16:22 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 13 Aug 2006 16:22:53 +0000 (16:22 +0000) |
will only work on windows, but since we are using strftime.c on windows only this should not be a problem -- Guenter Knauf
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2@874 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2@874 a5681a0c-68f1-0310-ab6d-d61299d08faa
program/src/rrd_graph.c | patch | blob | history | |
program/src/strftime.c | patch | blob | history | |
program/src/strftime.h | patch | blob | history |
index f256dbfe2868432bb93e241223e619e1c4a15796..ff40f45753fb002653477d3068d95711905a76a6 100644 (file)
--- a/program/src/rrd_graph.c
+++ b/program/src/rrd_graph.c
#include <sys/stat.h>
-#ifdef WIN32
-#include "strftime.h"
-#endif
-
#include "rrd_tool.h"
#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
+#include "strftime.h"
#include <io.h>
#include <fcntl.h>
#endif
diff --git a/program/src/strftime.c b/program/src/strftime.c
index 3fb860f610ea6c7e6716e820b5253a984d9f8db1..c57a726fa4c6f2c1a398d50ffb516b4a7d39097b 100644 (file)
--- a/program/src/strftime.c
+++ b/program/src/strftime.c
#include <time.h> /* for struct tm */
#include "strftime.h"
+/* Define your own defaults in config.h if necessary */
+#if defined(TZNAME_STD) && defined(TZNAME_DST)
+char *tzname_[2] = {TZNAME_STD, TZNAME_DST};
+#else
+#define tzname_ tzname
+#endif
+
static char *aday[] = {
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
};
"July", "August", "September", "October", "November", "December"
};
-char *tzname_[2] = {"CST", "CDT"}; /* Add your own defaults here */
-
static char buf[26];
static void strfmt(char *str, const char *fmt, ...);
diff --git a/program/src/strftime.h b/program/src/strftime.h
index 44da0ea71f9f7b465758ee640ad360923f29d0a7..c9d45e3ba875166a3c342725c9490585e1469884 100644 (file)
--- a/program/src/strftime.h
+++ b/program/src/strftime.h
size_t strftime_(char *s, size_t maxs, const char *f, const struct tm *t);
+#if defined(TZNAME_STD) && defined(TZNAME_DST)
extern char * tzname_[2];
+#endif
#endif /* STRFTIME__H */