Bug 848435 - Remove Snow Leopard OS check in wifi code. r=dougt
authorJosh Aas <joshmoz@gmail.com>
Wed, 06 Mar 2013 16:14:30 -0600
changeset 124024 4a5a0a07f4f676438a6dd20d0284fdb1e75d0c88
parent 124023 1deed14c3a6b1128878bfcf93ccc73b37706b5c7
child 124025 ba7e066d215c552712731e1df8917aa401864f34
push idunknown
push userunknown
push dateunknown
reviewersdougt
bugs848435
milestone22.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 848435 - Remove Snow Leopard OS check in wifi code. r=dougt
netwerk/wifi/osx_corewlan.mm
--- a/netwerk/wifi/osx_corewlan.mm
+++ b/netwerk/wifi/osx_corewlan.mm
@@ -1,44 +1,32 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #import <Cocoa/Cocoa.h>
 #import <CoreWLAN/CoreWLAN.h>
 
-#include <mach-o/dyld.h>
 #include <dlfcn.h>
 #include <unistd.h>
 
 #include <objc/objc.h>
 #include <objc/objc-runtime.h>
 
 #include "nsObjCExceptions.h"
 #include "nsAutoPtr.h"
 #include "nsCOMArray.h"
 #include "nsWifiMonitor.h"
 #include "nsWifiAccessPoint.h"
 
-BOOL UsingSnowLeopard() {
-  static int32_t gOSXVersion = 0x0;
-  if (gOSXVersion == 0x0) {
-    Gestalt(gestaltSystemVersion, (SInt32*)&gOSXVersion);
-  }
-  return (gOSXVersion >= 0x00001060);
-}
-
 nsresult
 GetAccessPointsFromWLAN(nsCOMArray<nsWifiAccessPoint> &accessPoints)
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK_RETURN;
 
-  if (!UsingSnowLeopard())
-    return NS_ERROR_NOT_AVAILABLE;
-
   accessPoints.Clear();
 
   NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
 
   @try {
     NSBundle * bundle = [[[NSBundle alloc] initWithPath:@"/System/Library/Frameworks/CoreWLAN.framework"] autorelease];
     if (!bundle) {
       [pool release];