SQLite

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
Unified Diff Ignore Whitespace Patch
Changes to src/sqliteInt.h.
826
827
828
829
830
831
832
833
834
835
836
837
838

839
840
841
842
843
844
845
**
** For best performance, an attempt is made to guess at the byte-order
** using C-preprocessor macros.  If that is unsuccessful, or if
** -DSQLITE_BYTEORDER=0 is set, then byte-order is determined
** at run-time.
*/
#ifndef SQLITE_BYTEORDER
# if defined(i386)     || defined(__i386__)   || defined(_M_IX86) ||    \
     defined(__x86_64) || defined(__x86_64__) || defined(_M_X64)  ||    \
     defined(_M_AMD64) || defined(_M_ARM)     || defined(__x86)   ||    \
     defined(__arm__)  || defined(_M_ARM64)
#   define SQLITE_BYTEORDER    1234
# elif defined(sparc)    || defined(__ppc__)

#   define SQLITE_BYTEORDER    4321
# else
#   define SQLITE_BYTEORDER 0
# endif
#endif
#if SQLITE_BYTEORDER==4321
# define SQLITE_BIGENDIAN    1







|
|
|
|

|
>







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