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];
if (sb == nil) {
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) {
*error = myError;
}
@ -195,7 +195,7 @@
if (pies == nil) {
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) {
[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
if (UCConvertUTCDateTimeToCFAbsoluteTime(&catalogInfo.createDate, &theCreateTime) != noErr) {
HSLogError(@"error converting create time %f to CFAbsoluteTime", catalogInfo.createDate);
HSLogError(@"error converting create time to CFAbsoluteTime");
} else {
createTime.tv_sec = (int64_t)(theCreateTime + NSTimeIntervalSince1970);
CFTimeInterval subsecond = theCreateTime - (double)((int64_t)theCreateTime);

View file

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

View file

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

View file

@ -94,18 +94,6 @@ static HTTPConnectionFactory *theFactory = nil;
- (id)copyWithZone:(NSZone *)zone {
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 {
if (self = [super init]) {

View file

@ -194,7 +194,7 @@ static NSString *RUN_LOOP_MODE = @"HTTPConnectionRunLoopMode";
receivedData = nil;
offset = 0;
}
HSLogTrace(@"received %d bytes", recvd);
HSLogTrace(@"received %ld bytes", recvd);
return recvd;
}
@ -236,7 +236,7 @@ static NSString *RUN_LOOP_MODE = @"HTTPConnectionRunLoopMode";
}
- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data {
NSAssert(receivedData == nil, @"must not discard unread bytes");
HSLogTrace(@"received %u bytes", [data length]);
HSLogTrace(@"received %lu bytes", [data length]);
[receivedData release];
receivedData = [data retain];
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 {
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 {
return cachedResponse;

View file

@ -66,7 +66,7 @@
}
- (BOOL)readExactly:(NSUInteger)exactLength into:(unsigned char *)outBuf error:(NSError **)error {
if (exactLength > 2147483648) {
SETNSERROR(@"InputStreamErrorDomain", -1, @"absurd length %u requested", exactLength);
SETNSERROR(@"InputStreamErrorDomain", -1, @"absurd length %lu requested", exactLength);
return NO;
}
NSUInteger received = 0;
@ -76,7 +76,7 @@
return NO;
}
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;
}
received += ret;
@ -88,7 +88,7 @@
NSUInteger received = 0;
for (;;) {
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);
return nil;
}

View file

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

View file

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

View file

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

View file

@ -79,7 +79,7 @@
return NO;
}
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;
}
unsigned char *buf = (unsigned char *)malloc(len);

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -246,7 +246,7 @@
int code = [conn responseCode];
if (code >= 200 && code <= 299) {
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;
}

View file

@ -54,7 +54,7 @@
acl_free(acl);
int errnum = errno;
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;
}
*aclText = [NSString stringWithUTF8String:aclTextChars];

View file

@ -124,7 +124,7 @@
if (SecCertificateCopyPublicKey(secCert, &key) == 0 && key != NULL) {
CSSM_CSP_HANDLE cspHandle;
if (SecKeyGetCSPHandle(key, &cspHandle) == 0) {
HSLog(@"SSL cert CSP handle: %d", (long)cspHandle);
HSLog(@"SSL cert CSP handle: %ld", (long)cspHandle);
} else {
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;
NSString *path = [NSString stringWithString:self];
while ([fm fileExistsAtPath:path]) {
path = [NSString stringWithFormat:@"%@_%u%@", left, index++, right];
path = [NSString stringWithFormat:@"%@_%lu%@", left, index++, right];
}
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(exception != NULL) {
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(*((NSUInteger *)result) > 0) { NSCParameterAssert(resultObject != NULL); [matchString replaceCharactersInRange:searchRange withString:resultObject]; }