diff options
author | Ivan Vanyushkin <vanav@vanav.org> | 2016-09-29 21:46:45 +0300 |
---|---|---|
committer | Ivan Vanyushkin <vanav@vanav.org> | 2016-09-29 21:46:45 +0300 |
commit | c2785590834dfe91574367f4256918c37b6ddfcc (patch) | |
tree | 9fa8e9ac135f1ad9f1e5d09d20606aea0ac0dc86 /src/strptime.cc | |
parent | 258cab91ab702e82d477b41bb1c6a026c848bda5 (diff) | |
download | fork-ledger-c2785590834dfe91574367f4256918c37b6ddfcc.tar.gz fork-ledger-c2785590834dfe91574367f4256918c37b6ddfcc.tar.bz2 fork-ledger-c2785590834dfe91574367f4256918c37b6ddfcc.zip |
Fix build under Cygwin.
Diffstat (limited to 'src/strptime.cc')
-rw-r--r-- | src/strptime.cc | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/strptime.cc b/src/strptime.cc index b9d485d2..c0aed41c 100644 --- a/src/strptime.cc +++ b/src/strptime.cc @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. - -#ifdef _WIN32 +#if defined(_WIN32) || defined(__CYGWIN__) // Implement strptime under windows #include "strptime.h" @@ -22,6 +21,20 @@ #include <ctype.h> #include <string.h> +// Define strnicmp for Cygwin. +#ifndef strcmpi +#define strcmpi strcasecmp +#endif +#ifndef stricmp +#define stricmp strcasecmp +#endif +#ifndef strncmpi +#define strncmpi strncasecmp +#endif +#ifndef strnicmp +#define strnicmp strncasecmp +#endif + static const char* kWeekFull[] = { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" |