diff options
author | Daniel Stenberg <daniel@haxx.se> | 2019-09-12 23:28:00 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-09-13 08:25:14 +0200 |
commit | 83b4cfacba3de18b58070eeb1fabf3feca60ca69 (patch) | |
tree | 1d93263c6e6ea6a3fee226a4d9fd2e45834400f8 /lib | |
parent | b543f1fadb2989451ebec77e3aea0a3110d09630 (diff) |
parsedate: still provide the name arrays when disabled
If FILE or FTP are enabled, since they also use them!
Reported-by: Roland Hieber
Fixes #4325
Closes #4343
Diffstat (limited to 'lib')
-rw-r--r-- | lib/parsedate.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/parsedate.c b/lib/parsedate.c index 7ae5eb8cd..f4b18d091 100644 --- a/lib/parsedate.c +++ b/lib/parsedate.c @@ -100,16 +100,20 @@ static int parsedate(const char *date, time_t *output); #define PARSEDATE_LATER 1 #define PARSEDATE_SOONER 2 -#ifndef CURL_DISABLE_PARSEDATE - +#if !defined(CURL_DISABLE_PARSEDATE) || !defined(CURL_DISABLE_FTP) || \ + !defined(CURL_DISABLE_FILE) +/* These names are also used by FTP and FILE code */ const char * const Curl_wkday[] = {"Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"}; -static const char * const weekday[] = -{ "Monday", "Tuesday", "Wednesday", "Thursday", - "Friday", "Saturday", "Sunday" }; const char * const Curl_month[]= { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; +#endif + +#ifndef CURL_DISABLE_PARSEDATE +static const char * const weekday[] = +{ "Monday", "Tuesday", "Wednesday", "Thursday", + "Friday", "Saturday", "Sunday" }; struct tzinfo { char name[5]; |