aboutsummaryrefslogtreecommitdiff
path: root/src/sqliteInt.h
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2015-12-24 14:53:27 +0000
committerdrh <drh@noemail.net>2015-12-24 14:53:27 +0000
commite1462a762cae28869a137a7c49f0929f75e2d9d4 (patch)
tree91bfc7e86dacc296f126b34231a473d0410cc9a4 /src/sqliteInt.h
parent3e6a1411300a1d0251369b5cf156b1f745895dcf (diff)
downloadsqlite-e1462a762cae28869a137a7c49f0929f75e2d9d4.tar.gz
sqlite-e1462a762cae28869a137a7c49f0929f75e2d9d4.zip
Avoid a harmless compiler warning on systems where the byteorder cannot
be determined at compile-time. FossilOrigin-Name: 7c7b7f26306b6aa6ff35b871ad756f43f5db9838
Diffstat (limited to 'src/sqliteInt.h')
-rw-r--r--src/sqliteInt.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index a328aff01..18d20b106 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -692,11 +692,6 @@ typedef INT16_TYPE LogEst;
** -DSQLITE_RUNTIME_BYTEORDER=1 is set, then byte-order is determined
** at run-time.
*/
-#ifdef SQLITE_AMALGAMATION
-const int sqlite3one = 1;
-#else
-extern const int sqlite3one;
-#endif
#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) || \
@@ -714,6 +709,11 @@ extern const int sqlite3one;
# define SQLITE_UTF16NATIVE SQLITE_UTF16BE
#endif
#if !defined(SQLITE_BYTEORDER)
+# ifdef SQLITE_AMALGAMATION
+ const int sqlite3one = 1;
+# else
+ extern const int sqlite3one;
+# endif
# define SQLITE_BYTEORDER 0 /* 0 means "unknown at compile-time" */
# define SQLITE_BIGENDIAN (*(char *)(&sqlite3one)==0)
# define SQLITE_LITTLEENDIAN (*(char *)(&sqlite3one)==1)