mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-21 03:13:42 +08:00
merges from master
This commit is contained in:
commit
b993a21356
@ -461,10 +461,15 @@ swap8b(void *dst, const void *src)
|
||||
op = (uint32_t*)((char*)dst+4);
|
||||
*op = SWAP4(*op);
|
||||
#else
|
||||
uint64_t tmp = *(uint64_t*)src;
|
||||
tmp = SWAP8(tmp);
|
||||
memcpy(dst, &tmp, 8);
|
||||
|
||||
/* Codes below will cause "break strict-aliasing rules" in gcc
|
||||
uint64_t *op = (uint64_t*)dst;
|
||||
/* copy over, make the below swap in-place */
|
||||
*op = *(uint64_t*)src;
|
||||
*op = SWAP8(*op);
|
||||
*/
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
|
Loading…
Reference in New Issue
Block a user