From 246dda0c942c98bca010f6248c03b610a381f9e8 Mon Sep 17 00:00:00 2001 From: "gtm.daemon" Date: Tue, 31 Aug 2010 19:01:01 +0000 Subject: [Author: dmaclach] Turn off service management on 10.4 R=thomasvl --- Foundation/GTMServiceManagement.c | 4 +++- Foundation/GTMServiceManagement.h | 10 +++++++--- Foundation/GTMServiceManagementTest.m | 7 ++++++- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/Foundation/GTMServiceManagement.c b/Foundation/GTMServiceManagement.c index 49d110c..967a66b 100644 --- a/Foundation/GTMServiceManagement.c +++ b/Foundation/GTMServiceManagement.c @@ -26,6 +26,8 @@ #include "GTMServiceManagement.h" +#if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4 + typedef struct { CFMutableDictionaryRef dict; bool convert_non_standard_objects; @@ -599,4 +601,4 @@ CFDictionaryRef GTMSMCopyAllJobDictionaries(void) { return dict; } - +#endif // if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4 diff --git a/Foundation/GTMServiceManagement.h b/Foundation/GTMServiceManagement.h index edca3ab..dc7f5ff 100644 --- a/Foundation/GTMServiceManagement.h +++ b/Foundation/GTMServiceManagement.h @@ -16,9 +16,12 @@ // the License. // +#include "GTMDefines.h" + +#if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4 + #include #include -#include "GTMDefines.h" GTM_EXTERN_C_BEGIN @@ -27,8 +30,7 @@ GTM_EXTERN_C_BEGIN // For rough documentation on these methods please see // from the 10.6 sdk. -// This reimplements some of the ServiceManagement framework on 10.4 and 10.5. -// (not tested on 10.4, but should work YMMV). +// This reimplements some of the ServiceManagement framework on 10.5. // Caller takes ownership of error if necessary. Boolean GTMSMJobSubmit(CFDictionaryRef job, CFErrorRef *error); @@ -67,3 +69,5 @@ CFTypeRef GTMCFTypeCreateFromLaunchData(launch_data_t ldata, CFErrorRef *error); GTM_EXTERN_C_END + +#endif // if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4 diff --git a/Foundation/GTMServiceManagementTest.m b/Foundation/GTMServiceManagementTest.m index 1d54b20..45bf478 100644 --- a/Foundation/GTMServiceManagementTest.m +++ b/Foundation/GTMServiceManagementTest.m @@ -16,8 +16,11 @@ // the License. // -#import "GTMSenTestCase.h" #import "GTMServiceManagement.h" + +#if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4 + +#import "GTMSenTestCase.h" #import "GTMGarbageCollection.h" #define STANDARD_JOB_LABEL "com.apple.launchctl.Background" @@ -152,3 +155,5 @@ } @end + +#endif // if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4 -- cgit v1.2.3