2008-11-24 Joerg Bornemann <joerg.bornemann@trolltech.com>
Reviewed by Simon Hausmann.
https://bugs.webkit.org/show_bug.cgi?id=20746
Various small compilation fixes to make the Qt port of WebKit
compile on Windows CE.
* config.h: Don't set _CRT_RAND_S for CE, it's not available.
* jsc.cpp: Disabled use of debugger includes for CE. It
does not have the debugging functions.
* runtime/DateMath.cpp: Use localtime() on Windows CE.
* wtf/Assertions.cpp: Compile on Windows CE without debugger.
* wtf/Assertions.h: Include windows.h before defining ASSERT.
* wtf/MathExtras.h: Include stdlib.h instead of xmath.h.
* wtf/Platform.h: Disable ERRNO_H and detect endianess based
on the Qt endianess. On Qt for Windows CE the endianess is
defined by the vendor specific build spec.
* wtf/Threading.h: Use the volatile-less atomic functions.
* wtf/dtoa.cpp: Compile without errno.
* wtf/win/MainThreadWin.cpp: Don't include windows.h on CE after
Assertions.h due to the redefinition of ASSERT.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38699 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/wtf/Assertions.h b/JavaScriptCore/wtf/Assertions.h
index 9972eec..2e7b2d0c 100644
--- a/JavaScriptCore/wtf/Assertions.h
+++ b/JavaScriptCore/wtf/Assertions.h
@@ -128,6 +128,14 @@
/* ASSERT, ASSERT_WITH_MESSAGE, ASSERT_NOT_REACHED */
+#if PLATFORM(WIN_CE)
+/* FIXME: We include this here only to avoid a conflict with the ASSERT macro. */
+#include <windows.h>
+#undef min
+#undef max
+#undef ERROR
+#endif
+
#if PLATFORM(WIN_OS)
/* FIXME: Change to use something other than ASSERT to avoid this conflict with win32. */
#undef ASSERT