Index: src/OFDataArray+BinaryPackValue.m ================================================================== --- src/OFDataArray+BinaryPackValue.m +++ src/OFDataArray+BinaryPackValue.m @@ -273,11 +273,11 @@ /* true */ case 0xC3: *object = [OFNumber numberWithBool: YES]; return 1; /* Data */ - case 0xD9: + case 0xD5: if (length < 2) goto error; count = buffer[1]; @@ -288,11 +288,11 @@ capacity: count]; [*object addItems: buffer + 2 count: count]; return count + 2; - case 0xDA: + case 0xD6: if (length < 3) goto error; count = read_uint16(buffer + 1); @@ -303,11 +303,11 @@ capacity: count]; [*object addItems: buffer + 3 count: count]; return count + 3; - case 0xDB: + case 0xD7: if (length < 5) goto error; count = read_uint32(buffer + 1); @@ -319,11 +319,11 @@ [*object addItems: buffer + 5 count: count]; return count + 5; /* Strings */ - case 0xD6: + case 0xD9: if (length < 2) goto error; count = buffer[1]; @@ -332,11 +332,11 @@ *object = [OFString stringWithUTF8String: (const char*)buffer + 2 length: count]; return count + 2; - case 0xD7: + case 0xDA: if (length < 3) goto error; count = read_uint16(buffer + 1); @@ -345,11 +345,11 @@ *object = [OFString stringWithUTF8String: (const char*)buffer + 3 length: count]; return count + 3; - case 0xD8: + case 0xDB: if (length < 5) goto error; count = read_uint32(buffer + 1); Index: src/OFDataArray.m ================================================================== --- src/OFDataArray.m +++ src/OFDataArray.m @@ -625,30 +625,30 @@ @throw [OFInvalidArgumentException exceptionWithClass: [self class] selector: _cmd]; if (_count <= UINT8_MAX) { - uint8_t type = 0xD9; + uint8_t type = 0xD5; uint8_t tmp = (uint8_t)_count; data = [OFDataArray dataArrayWithItemSize: 1 capacity: _count + 2]; [data addItem: &type]; [data addItem: &tmp]; } else if (_count <= UINT16_MAX) { - uint8_t type = 0xDA; + uint8_t type = 0xD6; uint16_t tmp = OF_BSWAP16_IF_LE((uint16_t)_count); data = [OFDataArray dataArrayWithItemSize: 1 capacity: _count + 3]; [data addItem: &type]; [data addItems: &tmp count: sizeof(tmp)]; } else if (_count <= UINT32_MAX) { - uint8_t type = 0xDB; + uint8_t type = 0xD7; uint32_t tmp = OF_BSWAP32_IF_LE((uint32_t)_count); data = [OFDataArray dataArrayWithItemSize: 1 capacity: _count + 5]; Index: src/OFString.m ================================================================== --- src/OFString.m +++ src/OFString.m @@ -1602,30 +1602,30 @@ data = [OFDataArray dataArrayWithItemSize: 1 capacity: length + 1]; [data addItem: &tmp]; } else if (length <= UINT8_MAX) { - uint8_t type = 0xD6; + uint8_t type = 0xD9; uint8_t tmp = (uint8_t)length; data = [OFDataArray dataArrayWithItemSize: 1 capacity: length + 2]; [data addItem: &type]; [data addItem: &tmp]; } else if (length <= UINT16_MAX) { - uint8_t type = 0xD7; + uint8_t type = 0xDA; uint16_t tmp = OF_BSWAP16_IF_LE((uint16_t)length); data = [OFDataArray dataArrayWithItemSize: 1 capacity: length + 3]; [data addItem: &type]; [data addItems: &tmp count: sizeof(tmp)]; } else if (length <= UINT32_MAX) { - uint8_t type = 0xD8; + uint8_t type = 0xDB; uint32_t tmp = OF_BSWAP32_IF_LE((uint32_t)length); data = [OFDataArray dataArrayWithItemSize: 1 capacity: length + 5]; Index: src/macros.h ================================================================== --- src/macros.h +++ src/macros.h @@ -319,11 +319,11 @@ /* * We define it here and not in objfw-defs.h, as it would be theoretically * possible to build a universal binary for Mac OS X and iOS. */ -#if defined(__MACH__) && defined(__arm__) +#if defined(__APPLE__) && defined(__arm__) # define OF_IOS #endif #define OF_ROL(value, bits) \ (((value) << ((bits) % (sizeof(value) * 8))) | \