From 347029a803475c21bf9fa508f27b0ed7233ff312 Mon Sep 17 00:00:00 2001 From: Tim Landscheidt Date: Wed, 16 Jan 2019 14:37:13 +0000 Subject: Compile strptime.cc only on Windows --- src/strptime.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/strptime.cc') diff --git a/src/strptime.cc b/src/strptime.cc index 069b9267..ac6885a6 100644 --- a/src/strptime.cc +++ b/src/strptime.cc @@ -12,7 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if defined(_WIN32) || defined(__CYGWIN__) +#if !(defined(_WIN32) || defined(__CYGWIN__)) +#error This file should only be compiled on Windows. +#endif + // Implement strptime under windows #include "strptime.h" @@ -200,5 +203,3 @@ static char* _strptime(const char *s, const char *format, struct tm *tm) { char* strptime(const char *buf, const char *fmt, struct tm *tm) { return _strptime(buf, fmt, tm); } - -#endif // _WIN32 -- cgit v1.2.3