Skip to content

Commit b59e46a

Browse files
author
Lars Steiger
committed
Made it linkable on older systems.
1 parent b16d15a commit b59e46a

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

FsprgEmbeddedStore/FsprgEmbeddedStoreController.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ - (void)setStoreHost:(NSString *)aHost;
2020
- (void)resizeContentDivE;
2121
- (void)webViewFrameChanged:(NSNotification *)aNotification;
2222
- (NSMutableDictionary *)hostCertificates;
23-
- (void)hostCertificates:(NSMutableDictionary *)aHostCertificates;
23+
- (void)setHostCertificates:(NSMutableDictionary *)aHostCertificates;
2424
- (NSMapTable *)connectionsToRequests;
2525
- (void)setConnectionsToRequests:(NSMapTable *)aConnectionsToRequests;
2626

@@ -44,7 +44,7 @@ - (id) init
4444
[self setDelegate:nil];
4545
[self setStoreHost:nil];
4646
[self setHostCertificates:[NSMutableDictionary dictionary]];
47-
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_8
47+
#if defined(MAC_OS_X_VERSION_10_8) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_8
4848
[self setConnectionsToRequests:[NSMapTable strongToStrongObjectsMapTable]];
4949
#else
5050
[self setConnectionsToRequests:[NSMapTable mapTableWithStrongToStrongObjects]];
@@ -373,6 +373,7 @@ - (BOOL)connection:(NSURLConnection *)connection canAuthenticateAgainstProtectio
373373

374374
- (void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge;
375375
{
376+
#if defined(MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
376377
SecTrustRef trustRef = [[challenge protectionSpace] serverTrust];
377378
SecTrustResultType resultType;
378379
SecTrustEvaluate(trustRef, &resultType);
@@ -389,6 +390,7 @@ - (void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallen
389390
NSURL *URL = [request URL];
390391
NSString *host = [URL host];
391392
[[self hostCertificates] setObject:certificates forKey:host];
393+
#endif
392394
}
393395

394396

TestApp/OrderViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ - (IBAction)saveAs:(id)sender
3939
NSSavePanel* savePanel = [NSSavePanel savePanel];
4040

4141
[savePanel setAllowedFileTypes:[NSArray arrayWithObject:@"plist"]];
42-
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
42+
#if defined(MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
4343
[savePanel beginSheetModalForWindow:[[self view] window]
4444
completionHandler:^(NSInteger result) {
4545
[self savePanelDidEnd:savePanel returnCode:result contextInfo:nil];

0 commit comments

Comments
 (0)