Index: Source/core/page/NavigatorID.cpp |
diff --git a/Source/core/page/NavigatorID.cpp b/Source/core/page/NavigatorID.cpp |
index 54363323ad913435bcf0baea6c596947b5942890..85524f0717ad42b08ca23f5ee0dc647092cd7255 100644 |
--- a/Source/core/page/NavigatorID.cpp |
+++ b/Source/core/page/NavigatorID.cpp |
@@ -35,7 +35,7 @@ |
#include "core/page/NavigatorBase.h" |
#include "wtf/CPU.h" |
-#if OS(LINUX) |
+#if !defined(WEBCORE_NAVIGATOR_PLATFORM) && OS(POSIX) && !OS(MACOSX) |
#include "wtf/StdLibExtras.h" |
#include <sys/utsname.h> |
#endif |
@@ -67,14 +67,16 @@ String NavigatorID::platform(const NavigatorBase*) |
{ |
#if defined(WEBCORE_NAVIGATOR_PLATFORM) |
return WEBCORE_NAVIGATOR_PLATFORM; |
-#else |
-#if OS(LINUX) |
+#elif OS(MACOSX) |
+ // Match Safari and Mozilla on Mac x86. |
+ return "MacIntel"; |
+#elif OS(WIN) |
+ // Match Safari and Mozilla on Windows. |
+ return "Win32"; |
+#else // Unix-like systems |
struct utsname osname; |
DEFINE_STATIC_LOCAL(String, platformName, (uname(&osname) >= 0 ? String(osname.sysname) + String(" ") + String(osname.machine) : emptyString())); |
return platformName; |
-#else |
-#error Non-Linux ports must define WEBCORE_NAVIGATOR_PLATFORM. |
-#endif |
#endif |
} |