summaryrefslogtreecommitdiff
path: root/utils/config.h
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2014-05-15 01:18:52 +0100
committerVincent Sanders <vince@kyllikki.org>2014-05-15 01:18:52 +0100
commitef00272e2ffb8ffcf03e740f74691fecb682060d (patch)
treed1ba29cf118a7f4c905762813d3985131fbacd34 /utils/config.h
parenta4be7f7d1abe5b75d3dacfbf00adf3bd937bc4c1 (diff)
downloadnetsurf-ef00272e2ffb8ffcf03e740f74691fecb682060d.tar.gz
netsurf-ef00272e2ffb8ffcf03e740f74691fecb682060d.tar.bz2
add helpers for time_t reading/writing
Diffstat (limited to 'utils/config.h')
-rw-r--r--utils/config.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/utils/config.h b/utils/config.h
index cc4f75191..c0a3c0d1b 100644
--- a/utils/config.h
+++ b/utils/config.h
@@ -38,13 +38,15 @@ char *strndup(const char *s, size_t n);
char *strcasestr(const char *haystack, const char *needle);
#endif
-#if (defined(riscos) || defined(_WIN32))
+/* Although these platforms might have strftime or strptime they
+ * appear not to support the time_t seconds format specifier.
+ */
+#if (defined(_WIN32) || defined(riscos) || defined(__HAIKU__) || defined(__BEOS__) || defined(__amigaos4__) || defined(__AMIGA__) || defined(__MINT__))
#undef HAVE_STRPTIME
-#define strptime nsc_time_strptime
-struct tm;
-char *nsc_time_strptime(const char *s, const char *format, struct tm *tm);
+#undef HAVE_STRFTIME
#else
#define HAVE_STRPTIME
+#define HAVE_STRFTIME
#endif
/* For some reason, UnixLib defines this unconditionally.