Преглед на файлове

mathlimits: check for _WIN32 and __MINGW32__ existence

Ben Boeckel преди 6 години
родител
ревизия
e5862cd912
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      src/google/protobuf/stubs/mathlimits.h

+ 1 - 1
src/google/protobuf/stubs/mathlimits.h

@@ -245,7 +245,7 @@ DECL_UNSIGNED_INT_LIMITS(unsigned long long int)
 #endif
 #endif
 
 
 // ========================================================================= //
 // ========================================================================= //
-#if WIN32 && !__MINGW32__ // Lacks built-in isnan() and isinf()
+#if defined(_WIN32) && !defined(__MINGW32__) // Lacks built-in isnan() and isinf()
 #define DECL_FP_LIMIT_FUNCS \
 #define DECL_FP_LIMIT_FUNCS \
   static bool IsFinite(const Type x) { return _finite(x); } \
   static bool IsFinite(const Type x) { return _finite(x); } \
   static bool IsNaN(const Type x) { return _isnan(x); } \
   static bool IsNaN(const Type x) { return _isnan(x); } \