[Webkit-unassigned] [Bug 14206] MSVC7 support and PLATFORM define fixes for Windows

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Oct 6 23:21:29 PDT 2007


http://bugs.webkit.org/show_bug.cgi?id=14206


aroben at apple.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #16561|review?                     |review-
               Flag|                            |




------- Comment #6 from aroben at apple.com  2007-10-06 23:21 PDT -------
(From update of attachment 16561)
 #include <stdint.h>
 #include <stdlib.h>
+#include <stdarg.h>

These #include statements should be sorted alphabetically.

+#if COMPILER(MSVC7)
+// MSVC8 and above define this function
+inline int vsnprintf(char *str, size_t size, const char* format, ...) 
+{
+    int result;
+    va_list args;
+    va_start(args, format);
+    result = _vsnprintf(str, size, format, args);
+    va_end(args);
+    return result;
+}
+#endif
+

I don't think it's a good idea to define this function if it's line-for-line
identical to the snprintf function defined just above it. Can we just do
#define vsnprintf snprintf?

-#if PLATFORM(WIN)
+#if PLATFORM(WIN_OS)
 #ifndef WINVER

-#elif PLATFORM(WIN)
+#elif PLATFORM(WIN_OS)
     if (IsDebuggerPresent()) {

I'm not sure this is the right check to make. For instance, I don't think
Qt/Win wants to be calling IsDebuggerPresent (or even links against the
necessary library to obtain this symbol). Perhaps this should be
COMPILER(MSVC)? I'm not completely sure though.

 #include <kjs/identifier.h>
 #include <wtf/Vector.h>
+#include <wtf/StringExtras.h>

Please keep the #includes sorted.

 #include <wtf/Platform.h>
 #include <wtf/Vector.h>
+#include <wtf/StringExtras.h>

Ditto.

r- for now so that we can fix the vsnprintf and WIN_OS issues.


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list