/ Check-in [b7aad929]
Login

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

Overview
Comment:Improvements to the automatic compile-time selection of byte-order, as suggested on the mailing list by Seb Kemper.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: b7aad929619f7043b1685a6477d50f6b4436e85511eb365eceae3dd4dbab571a
User & Date: drh 2019-05-20 18:43:57
Context
2019-05-20
19:46
Fix a segfault that could occur in sqlite3session_diff() if NULL were passed as the pzErrMsg argument. check-in: aee73fd2 user: dan tags: trunk
18:43
Improvements to the automatic compile-time selection of byte-order, as suggested on the mailing list by Seb Kemper. check-in: b7aad929 user: drh tags: trunk
18:35
A minor variation on check-in [1685610ef8e0dc] which (hopefully) makes the logic a little easier to follow. Also disallows the use of the double-quoted string hack in the query expression used for VACUUM INTO, which is not strictly required, but moves us toward the goal of disallowing the double-quoted string hack everywhere. check-in: 3e1b55f3 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/sqliteInt.h.

   826    826   **
   827    827   ** For best performance, an attempt is made to guess at the byte-order
   828    828   ** using C-preprocessor macros.  If that is unsuccessful, or if
   829    829   ** -DSQLITE_BYTEORDER=0 is set, then byte-order is determined
   830    830   ** at run-time.
   831    831   */
   832    832   #ifndef SQLITE_BYTEORDER
   833         -# if defined(i386)     || defined(__i386__)   || defined(_M_IX86) ||    \
   834         -     defined(__x86_64) || defined(__x86_64__) || defined(_M_X64)  ||    \
   835         -     defined(_M_AMD64) || defined(_M_ARM)     || defined(__x86)   ||    \
   836         -     defined(__arm__)  || defined(_M_ARM64)
          833  +# if defined(i386)      || defined(__i386__)      || defined(_M_IX86) ||    \
          834  +     defined(__x86_64)  || defined(__x86_64__)    || defined(_M_X64)  ||    \
          835  +     defined(_M_AMD64)  || defined(_M_ARM)        || defined(__x86)   ||    \
          836  +     defined(__ARMEL__) || defined(__AARCH64EL__) || defined(_M_ARM64)
   837    837   #   define SQLITE_BYTEORDER    1234
   838         -# elif defined(sparc)    || defined(__ppc__)
          838  +# elif defined(sparc)     || defined(__ppc__) || \
          839  +       defined(__ARMEB__) || defined(__AARCH64EB__)
   839    840   #   define SQLITE_BYTEORDER    4321
   840    841   # else
   841    842   #   define SQLITE_BYTEORDER 0
   842    843   # endif
   843    844   #endif
   844    845   #if SQLITE_BYTEORDER==4321
   845    846   # define SQLITE_BIGENDIAN    1