summaryrefslogtreecommitdiff
path: root/lib/parsedate.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2011-02-07 15:09:24 +0100
committerDaniel Stenberg <daniel@haxx.se>2011-02-07 15:09:24 +0100
commit0696260122f1ebdf43bcc926b03bfd58bff318e3 (patch)
treef00aeb16169cb7d60b22bc7d1ddebdeed70c60bc /lib/parsedate.c
parent54d9f060b4b0a8fb5fa006813e4db1ca5c1a07e8 (diff)
downloadcurl-0696260122f1ebdf43bcc926b03bfd58bff318e3.tar.gz
Curl_gmtime: avoid future mistakes
Document Curl_gmtime() and define away the old functions so that they won't be used internally again by mistake.
Diffstat (limited to 'lib/parsedate.c')
-rw-r--r--lib/parsedate.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/parsedate.c b/lib/parsedate.c
index ea1f36e73..1d7f035f2 100644
--- a/lib/parsedate.c
+++ b/lib/parsedate.c
@@ -515,6 +515,15 @@ time_t curl_getdate(const char *p, const time_t *now)
return -1;
}
+/*
+ * Curl_gmtime() is a gmtime() replacement for portability. Do not use the
+ * gmtime_r() or gmtime() functions anywhere else but here.
+ *
+ * To make sure no such function calls slip in, we define them to cause build
+ * errors, which is why we use the name within parentheses in this function.
+ *
+ */
+
CURLcode Curl_gmtime(time_t intime, struct tm *store)
{
const struct tm *tm;