From c2785590834dfe91574367f4256918c37b6ddfcc Mon Sep 17 00:00:00 2001 From: Ivan Vanyushkin Date: Thu, 29 Sep 2016 21:46:45 +0300 Subject: Fix build under Cygwin. --- src/strptime.cc | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src/strptime.cc') 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 #include +// 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" -- cgit v1.2.3