2nd parameter of Gestalt() is SInt32, not long. 64-bit fix.
b=514996 r=josh
--- a/chrome/src/nsChromeRegistry.cpp
+++ b/chrome/src/nsChromeRegistry.cpp
@@ -1652,17 +1652,17 @@ nsChromeRegistry::ProcessManifestBuffer(
#if defined(XP_WIN)
OSVERSIONINFO info = { sizeof(OSVERSIONINFO) };
if (GetVersionEx(&info)) {
nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(),
info.dwMajorVersion,
info.dwMinorVersion);
}
#elif defined(XP_MACOSX)
- long majorVersion, minorVersion;
+ SInt32 majorVersion, minorVersion;
if ((Gestalt(gestaltSystemVersionMajor, &majorVersion) == noErr) &&
(Gestalt(gestaltSystemVersionMinor, &minorVersion) == noErr)) {
nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(),
majorVersion,
minorVersion);
}
#elif defined(MOZ_WIDGET_GTK2)
nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(),
--- a/toolkit/xre/nsNativeAppSupportCocoa.mm
+++ b/toolkit/xre/nsNativeAppSupportCocoa.mm
@@ -101,17 +101,17 @@ nsNativeAppSupportCocoa::Enable()
mCanShowUI = PR_TRUE;
return NS_OK;
}
NS_IMETHODIMP nsNativeAppSupportCocoa::Start(PRBool *_retval)
{
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
- long response = 0;
+ SInt32 response = 0;
OSErr err = ::Gestalt (gestaltSystemVersion, &response);
response &= 0xFFFF; // The system version is in the low order word
// Check for at least Mac OS X 10.4, and if that fails return PR_FALSE,
// which will make the browser quit. In principle we could display an
// alert here. But the alert's message and buttons would require custom
// localization. So (for now at least) we just log an English message
// to the console before quitting.