2nd parameter of Gestalt() is SInt32, not long. 64-bit fix. b=514996 r=josh
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Fri, 18 Sep 2009 12:37:22 -0400
changeset 32856 c5fad7d529ec349ba86b1173aa562ef5d2c847f7
parent 32855 f1c815e3210421f1c8db2ea4a65bc631576194e3
child 32857 1e6cadb7afd013df2220de914e53afc2a18ce8ec
push id9196
push userjosh@mozilla.com
push dateFri, 18 Sep 2009 16:37:51 +0000
treeherdermozilla-central@c5fad7d529ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjosh
bugs514996
milestone1.9.3a1pre
2nd parameter of Gestalt() is SInt32, not long. 64-bit fix. b=514996 r=josh
chrome/src/nsChromeRegistry.cpp
toolkit/xre/nsNativeAppSupportCocoa.mm
--- 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.