mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
Add an SQLITE_DISABLE_INTRINSIC #ifdef to the sqlite3Put4Byte() function.
FossilOrigin-Name: ba9c6827d0890aaed9168c221fefbdbe89f4f9d3
This commit is contained in:
@@ -1116,10 +1116,12 @@ u32 sqlite3Get4byte(const u8 *p){
|
||||
void sqlite3Put4byte(unsigned char *p, u32 v){
|
||||
#if SQLITE_BYTEORDER==4321
|
||||
memcpy(p,&v,4);
|
||||
#elif SQLITE_BYTEORDER==1234 && defined(__GNUC__) && GCC_VERSION>=4003000
|
||||
#elif SQLITE_BYTEORDER==1234 && !defined(SQLITE_DISABLE_INTRINSIC) \
|
||||
&& defined(__GNUC__) && GCC_VERSION>=4003000
|
||||
u32 x = __builtin_bswap32(v);
|
||||
memcpy(p,&x,4);
|
||||
#elif SQLITE_BYTEORDER==1234 && defined(_MSC_VER) && _MSC_VER>=1300
|
||||
#elif SQLITE_BYTEORDER==1234 && !defined(SQLITE_DISABLE_INTRINSIC) \
|
||||
&& defined(_MSC_VER) && _MSC_VER>=1300
|
||||
u32 x = _byteswap_ulong(v);
|
||||
memcpy(p,&x,4);
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user