/ Check-in [ba9c6827]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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 | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ba9c6827d0890aaed9168c221fefbdbe89f4f9d3
User & Date: drh 2016-02-19 13:20:02
Context
2016-02-19
13:29
Fix (harmless) compiler warnings in some of the TCL-based test code. check-in: 7c26d2b4 user: drh tags: trunk
13:20
Add an SQLITE_DISABLE_INTRINSIC #ifdef to the sqlite3Put4Byte() function. check-in: ba9c6827 user: drh tags: trunk
13:19
Omit the unused yyzerominor constant. check-in: 60ad68a9 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/util.c.

  1112   1112     testcase( p[0]&0x80 );
  1113   1113     return ((unsigned)p[0]<<24) | (p[1]<<16) | (p[2]<<8) | p[3];
  1114   1114   #endif
  1115   1115   }
  1116   1116   void sqlite3Put4byte(unsigned char *p, u32 v){
  1117   1117   #if SQLITE_BYTEORDER==4321
  1118   1118     memcpy(p,&v,4);
  1119         -#elif SQLITE_BYTEORDER==1234 && defined(__GNUC__) && GCC_VERSION>=4003000
         1119  +#elif SQLITE_BYTEORDER==1234 && !defined(SQLITE_DISABLE_INTRINSIC) \
         1120  +    && defined(__GNUC__) && GCC_VERSION>=4003000
  1120   1121     u32 x = __builtin_bswap32(v);
  1121   1122     memcpy(p,&x,4);
  1122         -#elif SQLITE_BYTEORDER==1234 && defined(_MSC_VER) && _MSC_VER>=1300
         1123  +#elif SQLITE_BYTEORDER==1234 && !defined(SQLITE_DISABLE_INTRINSIC) \
         1124  +    && defined(_MSC_VER) && _MSC_VER>=1300
  1123   1125     u32 x = _byteswap_ulong(v);
  1124   1126     memcpy(p,&x,4);
  1125   1127   #else
  1126   1128     p[0] = (u8)(v>>24);
  1127   1129     p[1] = (u8)(v>>16);
  1128   1130     p[2] = (u8)(v>>8);
  1129   1131     p[3] = (u8)v;