diff options
author | John Wiegley <johnw@newartisans.com> | 2016-10-02 10:32:25 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-02 10:32:25 -0700 |
commit | ca9877ff417325ce35848c96f46f23a334e53bfe (patch) | |
tree | 3675bd14ef1947dffd9da8a9a8327961d5a5b17c /src/strptime.cc | |
parent | cd58d43228996198b5ba329f7c05109f2aaee65a (diff) | |
parent | c2785590834dfe91574367f4256918c37b6ddfcc (diff) | |
download | fork-ledger-ca9877ff417325ce35848c96f46f23a334e53bfe.tar.gz fork-ledger-ca9877ff417325ce35848c96f46f23a334e53bfe.tar.bz2 fork-ledger-ca9877ff417325ce35848c96f46f23a334e53bfe.zip |
Merge pull request #468 from Vanav/cygwin_fix
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" |