util/strndup: move header inclusion as applicable
[mesa.git] / src / util / macros.h
index 27d1b6292fa8095458a39a91a7bdb843da2532b9..6f55ac667dd466ec040e6e2587c92d67cf070c59 100644 (file)
@@ -167,12 +167,16 @@ do {                       \
  * performs no action and all member variables and base classes are
  * trivially destructible themselves.
  */
-#   if defined(__GNUC__)
+#   if (defined(__clang__) && defined(__has_feature))
+#      if __has_feature(has_trivial_destructor)
+#         define HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T)
+#      endif
+#   elif defined(__GNUC__)
 #      if ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)))
 #         define HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T)
 #      endif
-#   elif (defined(__clang__) && defined(__has_feature))
-#      if __has_feature(has_trivial_destructor)
+#   elif defined(_MSC_VER) && !defined(__INTEL_COMPILER)
+#      if _MSC_VER >= 1800
 #         define HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T)
 #      endif
 #   endif