Title: [209322] trunk/Source
Revision
209322
Author
[email protected]
Date
2016-12-05 09:47:34 -0800 (Mon, 05 Dec 2016)

Log Message

Add __STDC_FORMAT_MACROS before inttypes.h is included
https://bugs.webkit.org/show_bug.cgi?id=165374

We need formatting macros like PRIu64 to be available in all places where
inttypes.h header is used. All these usages get inttypes.h definitions
via wtf/Assertions.h header, except SQLiteFileSystem.cpp where formatting
macros are not used anymore since r185129.

This patch fixes multiple build errors with MinGW and reduces number of
independent __STDC_FORMAT_MACROS uses in the code base.

Reviewed by Darin Adler.

Source/_javascript_Core:

* disassembler/ARM64/A64DOpcode.cpp: Removed __STDC_FORMAT_MACROS
because it is obtained via Assertions.h now
* disassembler/ARM64Disassembler.cpp: Ditto.

Source/WebCore:

No new tests needed.

* platform/sql/SQLiteFileSystem.cpp: Removed unused inttypes.h
inclusion.

Source/WTF:

* wtf/Assertions.h: Define __STDC_FORMAT_MACROS.
* wtf/StdLibExtras.h: Remove definition of PRId64 for Windows, as we
have __STDC_FORMAT_MACROS defined now.

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (209321 => 209322)


--- trunk/Source/_javascript_Core/ChangeLog	2016-12-05 17:43:37 UTC (rev 209321)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-12-05 17:47:34 UTC (rev 209322)
@@ -1,3 +1,22 @@
+2016-12-05  Konstantin Tokarev  <[email protected]>
+
+        Add __STDC_FORMAT_MACROS before inttypes.h is included
+        https://bugs.webkit.org/show_bug.cgi?id=165374
+
+        We need formatting macros like PRIu64 to be available in all places where
+        inttypes.h header is used. All these usages get inttypes.h definitions
+        via wtf/Assertions.h header, except SQLiteFileSystem.cpp where formatting
+        macros are not used anymore since r185129.
+
+        This patch fixes multiple build errors with MinGW and reduces number of
+        independent __STDC_FORMAT_MACROS uses in the code base.
+
+        Reviewed by Darin Adler.
+
+        * disassembler/ARM64/A64DOpcode.cpp: Removed __STDC_FORMAT_MACROS
+        because it is obtained via Assertions.h now
+        * disassembler/ARM64Disassembler.cpp: Ditto.
+
 2016-12-04  Keith Miller  <[email protected]>
 
         Add support for Wasm ctz and popcnt

Modified: trunk/Source/_javascript_Core/disassembler/ARM64/A64DOpcode.cpp (209321 => 209322)


--- trunk/Source/_javascript_Core/disassembler/ARM64/A64DOpcode.cpp	2016-12-05 17:43:37 UTC (rev 209321)
+++ trunk/Source/_javascript_Core/disassembler/ARM64/A64DOpcode.cpp	2016-12-05 17:47:34 UTC (rev 209322)
@@ -23,7 +23,6 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#define __STDC_FORMAT_MACROS
 #include "config.h"
 
 #if USE(ARM64_DISASSEMBLER)

Modified: trunk/Source/_javascript_Core/disassembler/ARM64Disassembler.cpp (209321 => 209322)


--- trunk/Source/_javascript_Core/disassembler/ARM64Disassembler.cpp	2016-12-05 17:43:37 UTC (rev 209321)
+++ trunk/Source/_javascript_Core/disassembler/ARM64Disassembler.cpp	2016-12-05 17:47:34 UTC (rev 209322)
@@ -23,7 +23,6 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#define __STDC_FORMAT_MACROS
 #include "config.h"
 #include "Disassembler.h"
 

Modified: trunk/Source/WTF/ChangeLog (209321 => 209322)


--- trunk/Source/WTF/ChangeLog	2016-12-05 17:43:37 UTC (rev 209321)
+++ trunk/Source/WTF/ChangeLog	2016-12-05 17:47:34 UTC (rev 209322)
@@ -1,3 +1,22 @@
+2016-12-05  Konstantin Tokarev  <[email protected]>
+
+        Add __STDC_FORMAT_MACROS before inttypes.h is included
+        https://bugs.webkit.org/show_bug.cgi?id=165374
+
+        We need formatting macros like PRIu64 to be available in all places where
+        inttypes.h header is used. All these usages get inttypes.h definitions
+        via wtf/Assertions.h header, except SQLiteFileSystem.cpp where formatting
+        macros are not used anymore since r185129.
+
+        This patch fixes multiple build errors with MinGW and reduces number of
+        independent __STDC_FORMAT_MACROS uses in the code base.
+
+        Reviewed by Darin Adler.
+
+        * wtf/Assertions.h: Define __STDC_FORMAT_MACROS.
+        * wtf/StdLibExtras.h: Remove definition of PRId64 for Windows, as we
+        have __STDC_FORMAT_MACROS defined now.
+
 2016-12-03  Yusuke Suzuki  <[email protected]>
 
         Refactor SymbolImpl layout

Modified: trunk/Source/WTF/wtf/Assertions.h (209321 => 209322)


--- trunk/Source/WTF/wtf/Assertions.h	2016-12-05 17:43:37 UTC (rev 209321)
+++ trunk/Source/WTF/wtf/Assertions.h	2016-12-05 17:47:34 UTC (rev 209322)
@@ -39,6 +39,8 @@
    having any effect.
 */
 
+#undef __STDC_FORMAT_MACROS
+#define __STDC_FORMAT_MACROS
 #include <inttypes.h>
 #include <stdarg.h>
 #include <stdbool.h>

Modified: trunk/Source/WTF/wtf/StdLibExtras.h (209321 => 209322)


--- trunk/Source/WTF/wtf/StdLibExtras.h	2016-12-05 17:43:37 UTC (rev 209321)
+++ trunk/Source/WTF/wtf/StdLibExtras.h	2016-12-05 17:47:34 UTC (rev 209322)
@@ -79,11 +79,6 @@
 #define WTF_CONCAT(a, b) WTF_CONCAT_INTERNAL_DONT_USE(a, b)
 
 
-// Make "PRId64" format specifier work for Visual C++ on Windows.
-#if OS(WINDOWS) && !defined(PRId64)
-#define PRId64 "lld"
-#endif
-
 /*
  * The reinterpret_cast<Type1*>([pointer to Type2]) expressions - where
  * sizeof(Type1) > sizeof(Type2) - cause the following warning on ARM with GCC:

Modified: trunk/Source/WebCore/ChangeLog (209321 => 209322)


--- trunk/Source/WebCore/ChangeLog	2016-12-05 17:43:37 UTC (rev 209321)
+++ trunk/Source/WebCore/ChangeLog	2016-12-05 17:47:34 UTC (rev 209322)
@@ -1,3 +1,23 @@
+2016-12-05  Konstantin Tokarev  <[email protected]>
+
+        Add __STDC_FORMAT_MACROS before inttypes.h is included
+        https://bugs.webkit.org/show_bug.cgi?id=165374
+
+        We need formatting macros like PRIu64 to be available in all places where
+        inttypes.h header is used. All these usages get inttypes.h definitions
+        via wtf/Assertions.h header, except SQLiteFileSystem.cpp where formatting
+        macros are not used anymore since r185129.
+
+        This patch fixes multiple build errors with MinGW and reduces number of
+        independent __STDC_FORMAT_MACROS uses in the code base.
+
+        Reviewed by Darin Adler.
+
+        No new tests needed.
+
+        * platform/sql/SQLiteFileSystem.cpp: Removed unused inttypes.h
+        inclusion.
+
 2016-12-05  Dave Hyatt  <[email protected]>
 
         [CSS Parser] Properly fail on bad values for -webkit-clip-path

Modified: trunk/Source/WebCore/platform/sql/SQLiteFileSystem.cpp (209321 => 209322)


--- trunk/Source/WebCore/platform/sql/SQLiteFileSystem.cpp	2016-12-05 17:43:37 UTC (rev 209321)
+++ trunk/Source/WebCore/platform/sql/SQLiteFileSystem.cpp	2016-12-05 17:47:34 UTC (rev 209322)
@@ -28,7 +28,6 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#define __STDC_FORMAT_MACROS
 #include "config.h"
 #include "SQLiteFileSystem.h"
 
@@ -35,7 +34,6 @@
 #include "FileSystem.h"
 #include "SQLiteDatabase.h"
 #include "SQLiteStatement.h"
-#include <inttypes.h>
 #include <sqlite3.h>
 
 #if PLATFORM(IOS)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to