fixed sip_init_v_bin for big endian systems
This commit is contained in:
		| @ -75,7 +75,6 @@ typedef struct sip_uint64_t sip_uint64_t; | ||||
| #	error UNKNOWN ENDIAN | ||||
| #endif | ||||
|  | ||||
|  | ||||
| #define U8TO64_LE(p) u8to64_le(p) | ||||
| static HIO_INLINE sip_uint64_t u8to64_le (const hio_uint8_t* p) | ||||
| { | ||||
| @ -136,10 +135,19 @@ static HIO_INLINE sip_uint64_t* xor64_to (sip_uint64_t* v, sip_uint64_t s) | ||||
|  | ||||
| static const hio_uint8_t sip_init_v_bin[] =  | ||||
| { | ||||
| #if defined(HIO_ENDIAN_LITTLE) | ||||
| 	0x75, 0x65, 0x73, 0x70, 0x65, 0x6d, 0x6f, 0x73,  | ||||
| 	0x6d, 0x6f, 0x64, 0x6e, 0x61, 0x72, 0x6f, 0x64, | ||||
| 	0x61, 0x72, 0x65, 0x6e, 0x65, 0x67, 0x79, 0x6c, | ||||
| 	0x73, 0x65, 0x74, 0x79, 0x62, 0x64, 0x65, 0x74 | ||||
| #elif defined(HIO_ENDIAN_BIG) | ||||
| 	0x73, 0x6f, 0x6d, 0x65, 0x70, 0x73, 0x65, 0x75, | ||||
| 	0x64, 0x6f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, | ||||
| 	0x6c, 0x79, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, | ||||
| 	0x74, 0x65, 0x64, 0x62, 0x79, 0x74, 0x65, 0x73 | ||||
| #else | ||||
| #	error UNKNOWN ENDIAN | ||||
| #endif | ||||
| }; | ||||
| #define sip_init_v (*(sip_uint64_t(*)[4])sip_init_v_bin) | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user