Updated SDK to 'latest' (10.8).

Fixed incorrect printf specifiers for 64-bit.
This commit is contained in:
Stefan Reitshamer 2012-11-05 05:34:12 -05:00
parent af8da94645
commit 525ac8a372
22 changed files with 32 additions and 43 deletions

View file

@ -81,7 +81,7 @@
[myError autorelease]; [myError autorelease];
if (sb == nil) { if (sb == nil) {
if ([myError isErrorWithDomain:[ArqPackSet errorDomain] code:ERROR_PACK_INDEX_ENTRY_NOT_RESOLVABLE]) { if ([myError isErrorWithDomain:[ArqPackSet errorDomain] code:ERROR_PACK_INDEX_ENTRY_NOT_RESOLVABLE]) {
SETNSERROR([ArqPackSet errorDomain], ERROR_NOT_FOUND, @"failed %u times to load blob for sha1 %@ from pack set %@", i, sha1, packSetName); SETNSERROR([ArqPackSet errorDomain], ERROR_NOT_FOUND, @"failed %lu times to load blob for sha1 %@ from pack set %@", i, sha1, packSetName);
} else if (error != NULL) { } else if (error != NULL) {
*error = myError; *error = myError;
} }
@ -195,7 +195,7 @@
if (pies == nil) { if (pies == nil) {
break; break;
} }
HSLogTrace(@"found %u entries in s3 pack sha1 %@ packset %@ computer %@ s3bucket %@", [pies count], packSHA1, packSetName, computerUUID, s3BucketName); HSLogTrace(@"found %lu entries in s3 pack sha1 %@ packset %@ computer %@ s3bucket %@", [pies count], packSHA1, packSetName, computerUUID, s3BucketName);
for (PackIndexEntry *pie in pies) { for (PackIndexEntry *pie in pies) {
[entries setObject:pie forKey:[pie objectSHA1]]; [entries setObject:pie forKey:[pie objectSHA1]];
} }

View file

@ -128,7 +128,7 @@ static OSStatus SymlinkPathMakeRef(const UInt8 *path, FSRef *ref, Boolean *isDir
CFTimeInterval theCreateTime; // double: seconds since reference date CFTimeInterval theCreateTime; // double: seconds since reference date
if (UCConvertUTCDateTimeToCFAbsoluteTime(&catalogInfo.createDate, &theCreateTime) != noErr) { if (UCConvertUTCDateTimeToCFAbsoluteTime(&catalogInfo.createDate, &theCreateTime) != noErr) {
HSLogError(@"error converting create time %f to CFAbsoluteTime", catalogInfo.createDate); HSLogError(@"error converting create time to CFAbsoluteTime");
} else { } else {
createTime.tv_sec = (int64_t)(theCreateTime + NSTimeIntervalSince1970); createTime.tv_sec = (int64_t)(theCreateTime + NSTimeIntervalSince1970);
CFTimeInterval subsecond = theCreateTime - (double)((int64_t)theCreateTime); CFTimeInterval subsecond = theCreateTime - (double)((int64_t)theCreateTime);

View file

@ -1215,7 +1215,7 @@
HEADER_SEARCH_PATHS = ""; HEADER_SEARCH_PATHS = "";
INSTALL_PATH = /usr/local/bin; INSTALL_PATH = /usr/local/bin;
PRODUCT_NAME = arq_restore; PRODUCT_NAME = arq_restore;
SDKROOT = macosx10.6; SDKROOT = macosx;
}; };
name = Debug; name = Debug;
}; };
@ -1237,7 +1237,7 @@
HEADER_SEARCH_PATHS = ""; HEADER_SEARCH_PATHS = "";
INSTALL_PATH = /usr/local/bin; INSTALL_PATH = /usr/local/bin;
PRODUCT_NAME = arq_restore; PRODUCT_NAME = arq_restore;
SDKROOT = macosx10.6; SDKROOT = macosx;
}; };
name = Release; name = Release;
}; };
@ -1280,7 +1280,7 @@
HEADER_SEARCH_PATHS = ""; HEADER_SEARCH_PATHS = "";
INSTALL_PATH = /usr/local/bin; INSTALL_PATH = /usr/local/bin;
PRODUCT_NAME = arq_verify; PRODUCT_NAME = arq_verify;
SDKROOT = macosx10.6; SDKROOT = macosx;
}; };
name = Debug; name = Debug;
}; };
@ -1297,7 +1297,7 @@
HEADER_SEARCH_PATHS = ""; HEADER_SEARCH_PATHS = "";
INSTALL_PATH = /usr/local/bin; INSTALL_PATH = /usr/local/bin;
PRODUCT_NAME = arq_verify; PRODUCT_NAME = arq_verify;
SDKROOT = macosx10.6; SDKROOT = macosx;
}; };
name = Release; name = Release;
}; };

View file

@ -464,7 +464,8 @@ static void ReadStreamClientCallback(CFReadStreamRef readStream, CFStreamEventTy
if (transferEncoding != nil && ![transferEncoding isEqualToString:@"Identity"]) { if (transferEncoding != nil && ![transferEncoding isEqualToString:@"Identity"]) {
if ([[transferEncoding lowercaseString] isEqualToString:@"chunked"]) { if ([[transferEncoding lowercaseString] isEqualToString:@"chunked"]) {
HSLogTrace(@"%@: chunked response body", self); HSLogTrace(@"%@: chunked response body", self);
ret = [[ChunkedInputStream alloc] initWithUnderlyingStream:self]; BufferedInputStream *bis = [[BufferedInputStream alloc] initWithUnderlyingStream:self];
ret = [[ChunkedInputStream alloc] initWithUnderlyingStream:bis];
} else { } else {
SETNSERROR(@"StreamErrorDomain", -1, @"unknown Transfer-Encoding '%@'", transferEncoding); SETNSERROR(@"StreamErrorDomain", -1, @"unknown Transfer-Encoding '%@'", transferEncoding);
return nil; return nil;
@ -516,7 +517,7 @@ static void ReadStreamClientCallback(CFReadStreamRef readStream, CFStreamEventTy
return 0; return 0;
} }
recvd = [readStream read:buf maxLength:length]; recvd = [readStream read:buf maxLength:length];
HSLogTrace(@"received %d bytes", recvd); HSLogTrace(@"received %ld bytes", recvd);
if (recvd < 0) { if (recvd < 0) {
[self handleStreamError]; [self handleStreamError];
if (error != NULL) { if (error != NULL) {

View file

@ -94,18 +94,6 @@ static HTTPConnectionFactory *theFactory = nil;
- (id)copyWithZone:(NSZone *)zone { - (id)copyWithZone:(NSZone *)zone {
return self; return self;
} }
- (id)retain {
return self;
}
- (NSUInteger)retainCount {
return NSUIntegerMax; //denotes an object that cannot be released
}
- (void)release {
//do nothing
}
- (id)autorelease {
return self;
}
- (id)init { - (id)init {
if (self = [super init]) { if (self = [super init]) {

View file

@ -194,7 +194,7 @@ static NSString *RUN_LOOP_MODE = @"HTTPConnectionRunLoopMode";
receivedData = nil; receivedData = nil;
offset = 0; offset = 0;
} }
HSLogTrace(@"received %d bytes", recvd); HSLogTrace(@"received %ld bytes", recvd);
return recvd; return recvd;
} }
@ -236,7 +236,7 @@ static NSString *RUN_LOOP_MODE = @"HTTPConnectionRunLoopMode";
} }
- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data {
NSAssert(receivedData == nil, @"must not discard unread bytes"); NSAssert(receivedData == nil, @"must not discard unread bytes");
HSLogTrace(@"received %u bytes", [data length]); HSLogTrace(@"received %lu bytes", [data length]);
[receivedData release]; [receivedData release];
receivedData = [data retain]; receivedData = [data retain];
offset = 0; offset = 0;
@ -248,7 +248,7 @@ static NSString *RUN_LOOP_MODE = @"HTTPConnectionRunLoopMode";
} }
} }
- (void)connection:(NSURLConnection *)connection didSendBodyData:(NSInteger)bytesWritten totalBytesWritten:(NSInteger)totalBytesWritten totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite { - (void)connection:(NSURLConnection *)connection didSendBodyData:(NSInteger)bytesWritten totalBytesWritten:(NSInteger)totalBytesWritten totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite {
HSLogTrace(@"%@: sent so far %u of %u", self, totalBytesWritten, totalBytesExpectedToWrite); HSLogTrace(@"%@: sent so far %lu of %lu", self, totalBytesWritten, totalBytesExpectedToWrite);
} }
- (NSCachedURLResponse *)connection:(NSURLConnection *)connection willCacheResponse:(NSCachedURLResponse *)cachedResponse { - (NSCachedURLResponse *)connection:(NSURLConnection *)connection willCacheResponse:(NSCachedURLResponse *)cachedResponse {
return cachedResponse; return cachedResponse;

View file

@ -66,7 +66,7 @@
} }
- (BOOL)readExactly:(NSUInteger)exactLength into:(unsigned char *)outBuf error:(NSError **)error { - (BOOL)readExactly:(NSUInteger)exactLength into:(unsigned char *)outBuf error:(NSError **)error {
if (exactLength > 2147483648) { if (exactLength > 2147483648) {
SETNSERROR(@"InputStreamErrorDomain", -1, @"absurd length %u requested", exactLength); SETNSERROR(@"InputStreamErrorDomain", -1, @"absurd length %lu requested", exactLength);
return NO; return NO;
} }
NSUInteger received = 0; NSUInteger received = 0;
@ -76,7 +76,7 @@
return NO; return NO;
} }
if (ret == 0) { if (ret == 0) {
SETNSERROR([BufferedInputStream errorDomain], ERROR_EOF, @"%@ EOF after %u of %u bytes received", self, received, exactLength); SETNSERROR([BufferedInputStream errorDomain], ERROR_EOF, @"%@ EOF after %lu of %lu bytes received", self, received, exactLength);
return NO; return NO;
} }
received += ret; received += ret;
@ -88,7 +88,7 @@
NSUInteger received = 0; NSUInteger received = 0;
for (;;) { for (;;) {
if (received > maxLength) { if (received > maxLength) {
SETNSERROR(@"InputStreamErrorDomain", -1, @"exceeded maxLength %u before finding CRLF", maxLength); SETNSERROR(@"InputStreamErrorDomain", -1, @"exceeded maxLength %lu before finding CRLF", maxLength);
free(lineBuf); free(lineBuf);
return nil; return nil;
} }

View file

@ -65,7 +65,7 @@
return -1; return -1;
} }
chunkLength = (NSUInteger)scanned; chunkLength = (NSUInteger)scanned;
HSLogTrace(@"chunk length = %u", chunkLength); HSLogTrace(@"chunk length = %lu", chunkLength);
} }
if (chunkLength == 0) { if (chunkLength == 0) {
SETNSERROR(@"StreamsErrorDomain", ERROR_EOF, @"EOF (zero chunk length)"); SETNSERROR(@"StreamsErrorDomain", ERROR_EOF, @"EOF (zero chunk length)");

View file

@ -145,7 +145,7 @@
SETNSERROR([Encryption errorDomain], -1, @"%@ error: %@", label, [OpenSSL errorMessage]); SETNSERROR([Encryption errorDomain], -1, @"%@ error: %@", label, [OpenSSL errorMessage]);
return NO; return NO;
} }
HSLogTrace(@"%@ final: outBufLen = %d", label, (NSInteger)outBufLen); HSLogTrace(@"%@ final: outBufLen = %ld", label, (NSInteger)outBufLen);
outBufLen = (NSInteger)theBufLen; outBufLen = (NSInteger)theBufLen;
} else { } else {
int theBufLen = 0; int theBufLen = 0;
@ -153,7 +153,7 @@
SETNSERROR([Encryption errorDomain], -1, @"%@ error: %@", label, [OpenSSL errorMessage]); SETNSERROR([Encryption errorDomain], -1, @"%@ error: %@", label, [OpenSSL errorMessage]);
return NO; return NO;
} }
HSLogTrace(@"%@ update: inBufLen = %d, outBufLen = %d", label, recvd, (NSInteger)outBufLen); HSLogTrace(@"%@ update: inBufLen = %ld, outBufLen = %ld", label, recvd, (NSInteger)outBufLen);
outBufLen = (NSInteger)theBufLen; outBufLen = (NSInteger)theBufLen;
} }
return YES; return YES;

View file

@ -57,6 +57,6 @@
#pragma mark NSObject #pragma mark NSObject
- (NSString *)description { - (NSString *)description {
return [NSString stringWithFormat:@"<DataISF: %u bytes: %@>", [data length], dataDescription]; return [NSString stringWithFormat:@"<DataISF: %lu bytes: %@>", [data length], dataDescription];
} }
@end @end

View file

@ -79,7 +79,7 @@
return NO; return NO;
} }
if (len > 2147483648) { if (len > 2147483648) {
SETNSERROR(@"InputStreamErrorDomain", -1, @"absurd string length %u in [StringIO newString:]", len); SETNSERROR(@"InputStreamErrorDomain", -1, @"absurd string length %llu in [StringIO newString:]", len);
return NO; return NO;
} }
unsigned char *buf = (unsigned char *)malloc(len); unsigned char *buf = (unsigned char *)malloc(len);

View file

@ -136,7 +136,7 @@
return result; return result;
} }
- (NSString *)description { - (NSString *)description {
return [NSString stringWithFormat:@"<ArrayNode 0x%x %@>", self, [list description]]; return [NSString stringWithFormat:@"<ArrayNode %@>", [list description]];
} }
@end @end

View file

@ -79,6 +79,6 @@
return result; return result;
} }
- (NSString *)description { - (NSString *)description {
return [NSString stringWithFormat:@"<BooleanNode 0x%x %@>", self, (value ? @"YES" : @"NO")]; return [NSString stringWithFormat:@"<BooleanNode %@>", (value ? @"YES" : @"NO")];
} }
@end @end

View file

@ -284,7 +284,7 @@
return result; return result;
} }
- (NSString *)description { - (NSString *)description {
return [NSString stringWithFormat:@"<DictNode 0x%x %@>", self, [dict description]]; return [NSString stringWithFormat:@"<DictNode %@>", [dict description]];
} }
@end @end

View file

@ -101,7 +101,7 @@
return result; return result;
} }
- (NSString *)description { - (NSString *)description {
return [NSString stringWithFormat:@"<IntegerNode 0x%x %qi>", self, value]; return [NSString stringWithFormat:@"<IntegerNode %qi>", value];
} }
@end @end

View file

@ -90,6 +90,6 @@
return result; return result;
} }
- (NSString *)description { - (NSString *)description {
return [NSString stringWithFormat:@"<RealNode 0x%x %f>", self, value]; return [NSString stringWithFormat:@"<RealNode %f>", value];
} }
@end @end

View file

@ -83,6 +83,6 @@
return result; return result;
} }
- (NSString *)description { - (NSString *)description {
return [NSString stringWithFormat:@"<StringNode 0x%x \"%@\">", self, value]; return [NSString stringWithFormat:@"<StringNode \"%@\">", value];
} }
@end @end

View file

@ -246,7 +246,7 @@
int code = [conn responseCode]; int code = [conn responseCode];
if (code >= 200 && code <= 299) { if (code >= 200 && code <= 299) {
ret = [[ServerBlob alloc] initWithData:response mimeType:[conn responseContentType] downloadName:[conn responseDownloadName]]; ret = [[ServerBlob alloc] initWithData:response mimeType:[conn responseContentType] downloadName:[conn responseDownloadName]];
HSLogDebug(@"HTTP %d; returning response length=%d", code, [response length]); HSLogDebug(@"HTTP %d; returning response length=%ld", code, [response length]);
return ret; return ret;
} }

View file

@ -54,7 +54,7 @@
acl_free(acl); acl_free(acl);
int errnum = errno; int errnum = errno;
HSLogError(@"acl_to_text from %@ error %d: %s", path, errnum, strerror(errnum)); HSLogError(@"acl_to_text from %@ error %d: %s", path, errnum, strerror(errnum));
SETNSERROR(@"UnixErrorDomain", errnum, @"failed to convert ACL of @% to text: %s", path, strerror(errnum)); SETNSERROR(@"UnixErrorDomain", errnum, @"failed to convert ACL of %@ to text: %s", path, strerror(errnum));
return NO; return NO;
} }
*aclText = [NSString stringWithUTF8String:aclTextChars]; *aclText = [NSString stringWithUTF8String:aclTextChars];

View file

@ -124,7 +124,7 @@
if (SecCertificateCopyPublicKey(secCert, &key) == 0 && key != NULL) { if (SecCertificateCopyPublicKey(secCert, &key) == 0 && key != NULL) {
CSSM_CSP_HANDLE cspHandle; CSSM_CSP_HANDLE cspHandle;
if (SecKeyGetCSPHandle(key, &cspHandle) == 0) { if (SecKeyGetCSPHandle(key, &cspHandle) == 0) {
HSLog(@"SSL cert CSP handle: %d", (long)cspHandle); HSLog(@"SSL cert CSP handle: %ld", (long)cspHandle);
} else { } else {
HSLog(@"error getting SSL cert's key's CSP handle"); HSLog(@"error getting SSL cert's key's CSP handle");
} }

View file

@ -131,7 +131,7 @@ static unsigned char hexCharToInt(char c1) {
NSUInteger index = 2; NSUInteger index = 2;
NSString *path = [NSString stringWithString:self]; NSString *path = [NSString stringWithString:self];
while ([fm fileExistsAtPath:path]) { while ([fm fileExistsAtPath:path]) {
path = [NSString stringWithFormat:@"%@_%u%@", left, index++, right]; path = [NSString stringWithFormat:@"%@_%lu%@", left, index++, right];
} }
return path; return path;
} }

View file

@ -501,7 +501,7 @@ static id performRegexOp(id self, SEL _cmd, RKLRegexOp doRegexOp, NSString *rege
if((status > 0) && (exception == NULL)) { exception = RKLNSExceptionForRegex(regexString, options, NULL, status); } // If we had a problem, throw an exception. if((status > 0) && (exception == NULL)) { exception = RKLNSExceptionForRegex(regexString, options, NULL, status); } // If we had a problem, throw an exception.
if(exception != NULL) { if(exception != NULL) {
if([exception isKindOfClass:[NSException class]]) { [[NSException exceptionWithName:[exception name] reason:RKLStringFromClassAndMethod(self, _cmd, [exception reason]) userInfo:[exception userInfo]] raise]; } if([exception isKindOfClass:[NSException class]]) { [[NSException exceptionWithName:[exception name] reason:RKLStringFromClassAndMethod(self, _cmd, [exception reason]) userInfo:[exception userInfo]] raise]; }
else { [[NSAssertionHandler currentHandler] handleFailureInFunction:[exception objectForKey:@"function"] file:[exception objectForKey:@"file"] lineNumber:[[exception objectForKey:@"line"] longValue] description:[exception objectForKey:@"description"]]; } else { [[NSAssertionHandler currentHandler] handleFailureInFunction:[exception objectForKey:@"function"] file:[exception objectForKey:@"file"] lineNumber:[[exception objectForKey:@"line"] longValue] description:@"%@", [exception objectForKey:@"description"]]; }
} }
if(replaceMutable == YES) { // We're working on a mutable string and if there were successfull matches with replaced text we still have work to do. Done outside the cache lock. if(replaceMutable == YES) { // We're working on a mutable string and if there were successfull matches with replaced text we still have work to do. Done outside the cache lock.
if(*((NSUInteger *)result) > 0) { NSCParameterAssert(resultObject != NULL); [matchString replaceCharactersInRange:searchRange withString:resultObject]; } if(*((NSUInteger *)result) > 0) { NSCParameterAssert(resultObject != NULL); [matchString replaceCharactersInRange:searchRange withString:resultObject]; }