@@ -170,39 +170,25 @@ *size = 0; return OFNotFound; } @implementation OFZIPArchiveEntry -+ (instancetype)entryWithFileName: (OFString *)fileName -{ - return [[[self alloc] initWithFileName: fileName] autorelease]; -} +/* + * The following are optional in OFArchiveEntry, but Apple GCC 4.0.1 is buggy + * and needs this to stop complaining. + */ +@dynamic POSIXPermissions, ownerAccountID, groupOwnerAccountID; +@dynamic ownerAccountName, groupOwnerAccountName; - (instancetype)init { OF_INVALID_INIT_METHOD } -- (instancetype)initWithFileName: (OFString *)fileName -{ - self = [super init]; - - @try { - void *pool = objc_autoreleasePoolPush(); - - if (fileName.UTF8StringLength > UINT16_MAX) - @throw [OFOutOfRangeException exception]; - - _fileName = [fileName copy]; - - objc_autoreleasePoolPop(pool); - } @catch (id e) { - [self release]; - @throw e; - } - - return self; +- (instancetype)of_init +{ + return [super init]; } - (instancetype)of_initWithStream: (OFStream *)stream { self = [super init]; @@ -253,11 +239,11 @@ if (ZIP64Index != OFNotFound) { const uint8_t *ZIP64 = [extraField itemAtIndex: ZIP64Index]; OFRange range = - OFRangeMake(ZIP64Index - 4, ZIP64Size + 4); + OFMakeRange(ZIP64Index - 4, ZIP64Size + 4); if (_uncompressedSize == 0xFFFFFFFF) _uncompressedSize = OFZIPArchiveReadField64( &ZIP64, &ZIP64Size); if (_compressedSize == 0xFFFFFFFF) @@ -385,16 +371,16 @@ - (OFZIPArchiveEntryCompressionMethod)compressionMethod { return _compressionMethod; } -- (uint64_t)compressedSize +- (unsigned long long)compressedSize { return _compressedSize; } -- (uint64_t)uncompressedSize +- (unsigned long long)uncompressedSize { return _uncompressedSize; } - (uint32_t)CRC32