aboutsummaryrefslogtreecommitdiff
path: root/Foundation/GTMObjC2Runtime.h
diff options
context:
space:
mode:
Diffstat (limited to 'Foundation/GTMObjC2Runtime.h')
-rw-r--r--Foundation/GTMObjC2Runtime.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/Foundation/GTMObjC2Runtime.h b/Foundation/GTMObjC2Runtime.h
index 325a752..ab34cfb 100644
--- a/Foundation/GTMObjC2Runtime.h
+++ b/Foundation/GTMObjC2Runtime.h
@@ -16,8 +16,8 @@
// the License.
//
-#import <objc/objc-runtime.h>
-#import <objc/Object.h>
+#import <objc/objc-api.h>
+#import "GTMDefines.h"
// These functions exist for code that we want to compile on both the < 10.5
// sdks and on the >= 10.5 sdks without warnings. It basically reimplements
@@ -35,6 +35,18 @@
#define AT_REQUIRED
#endif
+// The file objc-runtime.h was moved to runtime.h and in Leopard, objc-runtime.h
+// was just a wrapper around runtime.h. For the iPhone SDK, this objc-runtime.h
+// is removed in the iPhoneOS2.0 SDK.
+//
+// The |Object| class was removed in the iPhone2.0 SDK too.
+#if GTM_IPHONE_SDK
+#import <objc/runtime.h>
+#else
+#import <objc/objc-runtime.h>
+#import <objc/Object.h>
+#endif
+
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1050
#import "objc/Protocol.h"