[Win] Resolve warnings about missing __has_include macro under MSVC
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Oct 2014 17:56:49 +0000 (17:56 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Oct 2014 17:56:49 +0000 (17:56 +0000)
https://bugs.webkit.org/show_bug.cgi?id=137524

Reviewed by Anders Carlsson.

* wtf/Compiler.h: Provide a dummy implementation of __has_include that
avoids the warning without changing compile behavior.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@174462 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WTF/ChangeLog
Source/WTF/wtf/Compiler.h

index 8154dd5..262a5f9 100644 (file)
@@ -1,3 +1,13 @@
+2014-10-08  Brent Fulgham  <bfulgham@apple.com>
+
+        [Win] Resolve warnings about missing __has_include macro under MSVC
+        https://bugs.webkit.org/show_bug.cgi?id=137524
+
+        Reviewed by Anders Carlsson.
+
+        * wtf/Compiler.h: Provide a dummy implementation of __has_include that
+        avoids the warning without changing compile behavior.
+
 2014-10-07  Brent Fulgham  <bfulgham@apple.com>
 
         [Win] Resolve some MSVC static analyzer warnings
index a76ea86..2b1a1a0 100644 (file)
 #define WARN_UNUSED_RETURN
 #endif
 
+#if !defined(__has_include) && COMPILER(MSVC)
+#define __has_include(path) 0
+#endif
+
 #endif /* WTF_Compiler_h */