Title: [94044] trunk/Source
- Revision
- 94044
- Author
- [email protected]
- Date
- 2011-08-29 22:01:47 -0700 (Mon, 29 Aug 2011)
Log Message
Add HAVE(VASPRINTF) macro to test for vasprintf() support
https://bugs.webkit.org/show_bug.cgi?id=67156
Reviewed by Darin Adler.
Source/_javascript_Core:
Encapsulate testing of vasprintf() support in a HAVE macro
instead of hardcoding the list of supported/unsupported
compilers at the call site.
* wtf/Platform.h:
Source/WebCore:
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::error): Modified to use HAVE(VASPRINTF).
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (94043 => 94044)
--- trunk/Source/_javascript_Core/ChangeLog 2011-08-30 04:57:51 UTC (rev 94043)
+++ trunk/Source/_javascript_Core/ChangeLog 2011-08-30 05:01:47 UTC (rev 94044)
@@ -1,3 +1,16 @@
+2011-08-29 Daniel Bates <[email protected]>
+
+ Add HAVE(VASPRINTF) macro to test for vasprintf() support
+ https://bugs.webkit.org/show_bug.cgi?id=67156
+
+ Reviewed by Darin Adler.
+
+ Encapsulate testing of vasprintf() support in a HAVE macro
+ instead of hardcoding the list of supported/unsupported
+ compilers at the call site.
+
+ * wtf/Platform.h:
+
2011-08-29 Mark Hahnenberg <[email protected]>
Unzip initialization lists and constructors in JSCell hierarchy (3/7)
Modified: trunk/Source/_javascript_Core/wtf/Platform.h (94043 => 94044)
--- trunk/Source/_javascript_Core/wtf/Platform.h 2011-08-30 04:57:51 UTC (rev 94043)
+++ trunk/Source/_javascript_Core/wtf/Platform.h 2011-08-30 05:01:47 UTC (rev 94044)
@@ -681,6 +681,12 @@
#define HAVE_SIGNAL_H 1
#endif
+#if !defined(HAVE_VASPRINTF)
+#if !COMPILER(MSVC) && !COMPILER(RVCT) && !COMPILER(MINGW)
+#define HAVE_VASPRINTF 1
+#endif
+#endif
+
#if !defined(HAVE_STRNSTR)
#if OS(DARWIN) || OS(FREEBSD)
#define HAVE_STRNSTR 1
Modified: trunk/Source/WebCore/ChangeLog (94043 => 94044)
--- trunk/Source/WebCore/ChangeLog 2011-08-30 04:57:51 UTC (rev 94043)
+++ trunk/Source/WebCore/ChangeLog 2011-08-30 05:01:47 UTC (rev 94044)
@@ -1,3 +1,13 @@
+2011-08-29 Daniel Bates <[email protected]>
+
+ Add HAVE(VASPRINTF) macro to test for vasprintf() support
+ https://bugs.webkit.org/show_bug.cgi?id=67156
+
+ Reviewed by Darin Adler.
+
+ * xml/parser/XMLDocumentParserLibxml2.cpp:
+ (WebCore::XMLDocumentParser::error): Modified to use HAVE(VASPRINTF).
+
2011-08-29 Yuta Kitamura <[email protected]>
WebSocket: Receive binary message as Blob
Modified: trunk/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp (94043 => 94044)
--- trunk/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp 2011-08-30 04:57:51 UTC (rev 94043)
+++ trunk/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp 2011-08-30 05:01:47 UTC (rev 94044)
@@ -938,13 +938,13 @@
if (isStopped())
return;
-#if COMPILER(MSVC) || COMPILER(RVCT) || COMPILER(MINGW)
- char m[1024];
- vsnprintf(m, sizeof(m) - 1, message, args);
-#else
+#if HAVE(VASPRINTF)
char* m;
if (vasprintf(&m, message, args) == -1)
return;
+#else
+ char m[1024];
+ vsnprintf(m, sizeof(m) - 1, message, args);
#endif
if (m_parserPaused)
@@ -952,7 +952,7 @@
else
handleError(type, m, lineNumber(), columnNumber());
-#if !COMPILER(MSVC) && !COMPILER(RVCT) && !COMPILER(MINGW)
+#if HAVE(VASPRINTF)
free(m);
#endif
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes