OLD | NEW |
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | 1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 /* ***** BEGIN LICENSE BLOCK ***** | 2 /* ***** BEGIN LICENSE BLOCK ***** |
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
4 * | 4 * |
5 * The contents of this file are subject to the Mozilla Public License Version | 5 * The contents of this file are subject to the Mozilla Public License Version |
6 * 1.1 (the "License"); you may not use this file except in compliance with | 6 * 1.1 (the "License"); you may not use this file except in compliance with |
7 * the License. You may obtain a copy of the License at | 7 * the License. You may obtain a copy of the License at |
8 * http://www.mozilla.org/MPL/ | 8 * http://www.mozilla.org/MPL/ |
9 * | 9 * |
10 * Software distributed under the License is distributed on an "AS IS" basis, | 10 * Software distributed under the License is distributed on an "AS IS" basis, |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 } | 157 } |
158 | 158 |
159 // | 159 // |
160 // +systemVersion | 160 // +systemVersion |
161 // | 161 // |
162 // Returns the host's OS version as returned by the 'sysv' gestalt selector, | 162 // Returns the host's OS version as returned by the 'sysv' gestalt selector, |
163 // 10.x.y = 0x000010xy | 163 // 10.x.y = 0x000010xy |
164 // | 164 // |
165 + (long)systemVersion | 165 + (long)systemVersion |
166 { | 166 { |
167 static long sSystemVersion = 0; | 167 static SInt32 sSystemVersion = 0; |
168 if (!sSystemVersion) | 168 if (!sSystemVersion) |
169 Gestalt(gestaltSystemVersion, &sSystemVersion); | 169 Gestalt(gestaltSystemVersion, &sSystemVersion); |
170 return sSystemVersion; | 170 return (long)sSystemVersion; |
171 } | 171 } |
172 | 172 |
173 // | 173 // |
174 // +isLeopardOrHigher | 174 // +isLeopardOrHigher |
175 // | 175 // |
176 // returns YES if we're on 10.5 or better | 176 // returns YES if we're on 10.5 or better |
177 // | 177 // |
178 + (BOOL)isLeopardOrHigher | 178 + (BOOL)isLeopardOrHigher |
179 { | 179 { |
180 #if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4 | 180 #if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4 |
181 return YES; | 181 return YES; |
182 #else | 182 #else |
183 return [self systemVersion] >= 0x1050; | 183 return [self systemVersion] >= 0x1050; |
184 #endif | 184 #endif |
185 } | 185 } |
186 | 186 |
187 @end | 187 @end |
OLD | NEW |