SQLite

Check-in [ba9c6827d0]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add an SQLITE_DISABLE_INTRINSIC #ifdef to the sqlite3Put4Byte() function.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ba9c6827d0890aaed9168c221fefbdbe89f4f9d3
User & Date: drh 2016-02-19 13:20:02.042
Context
2016-02-19
13:29
Fix (harmless) compiler warnings in some of the TCL-based test code. (check-in: 7c26d2b470 user: drh tags: trunk)
13:20
Add an SQLITE_DISABLE_INTRINSIC #ifdef to the sqlite3Put4Byte() function. (check-in: ba9c6827d0 user: drh tags: trunk)
13:19
Omit the unused yyzerominor constant. (check-in: 60ad68a9f5 user: drh tags: trunk)
Changes
Side-by-Side Diff Ignore Whitespace Patch
Changes to src/util.c.
1112
1113
1114
1115
1116
1117
1118

1119

1120
1121

1122

1123
1124
1125
1126
1127
1128
1129
1112
1113
1114
1115
1116
1117
1118
1119

1120
1121
1122
1123

1124
1125
1126
1127
1128
1129
1130
1131







+
-
+


+
-
+







  testcase( p[0]&0x80 );
  return ((unsigned)p[0]<<24) | (p[1]<<16) | (p[2]<<8) | p[3];
#endif
}
void sqlite3Put4byte(unsigned char *p, u32 v){
#if SQLITE_BYTEORDER==4321
  memcpy(p,&v,4);
#elif SQLITE_BYTEORDER==1234 && !defined(SQLITE_DISABLE_INTRINSIC) \
#elif SQLITE_BYTEORDER==1234 && defined(__GNUC__) && GCC_VERSION>=4003000
    && defined(__GNUC__) && GCC_VERSION>=4003000
  u32 x = __builtin_bswap32(v);
  memcpy(p,&x,4);
#elif SQLITE_BYTEORDER==1234 && !defined(SQLITE_DISABLE_INTRINSIC) \
#elif SQLITE_BYTEORDER==1234 && defined(_MSC_VER) && _MSC_VER>=1300
    && defined(_MSC_VER) && _MSC_VER>=1300
  u32 x = _byteswap_ulong(v);
  memcpy(p,&x,4);
#else
  p[0] = (u8)(v>>24);
  p[1] = (u8)(v>>16);
  p[2] = (u8)(v>>8);
  p[3] = (u8)v;