mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-08 03:22:21 +03:00
Increase test coverage by statically defining SQLITE_BIGENDIAN and related
macros for ix86 platforms. Still a run-time test for other architectures. Need to add additional cases to cover other popular processors. (CVS 3781) FossilOrigin-Name: 476e7c3fcc69d8b21d161c758aaa5ef7163abb15
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
*************************************************************************
|
||||
** Internal interface definitions for SQLite.
|
||||
**
|
||||
** @(#) $Id: sqliteInt.h,v 1.547 2007/03/29 05:51:49 drh Exp $
|
||||
** @(#) $Id: sqliteInt.h,v 1.548 2007/03/31 15:28:00 drh Exp $
|
||||
*/
|
||||
#ifndef _SQLITEINT_H_
|
||||
#define _SQLITEINT_H_
|
||||
@@ -212,8 +212,15 @@ typedef UINT8_TYPE i8; /* 1-byte signed integer */
|
||||
** evaluated at runtime.
|
||||
*/
|
||||
extern const int sqlite3one;
|
||||
#define SQLITE_BIGENDIAN (*(char *)(&sqlite3one)==0)
|
||||
#define SQLITE_LITTLEENDIAN (*(char *)(&sqlite3one)==1)
|
||||
#if defined(i386) || defined(__i386__) || defined(_M_IX86)
|
||||
# define SQLITE_BIGENDIAN 0
|
||||
# define SQLITE_LITTLEENDIAN 1
|
||||
# define SQLITE_UTF16NATIVE SQLITE_UTF16LE
|
||||
#else
|
||||
# define SQLITE_BIGENDIAN (*(char *)(&sqlite3one)==0)
|
||||
# define SQLITE_LITTLEENDIAN (*(char *)(&sqlite3one)==1)
|
||||
# define SQLITE_UTF16NATIVE (SQLITE_BIGENDIAN?SQLITE_UTF16BE:SQLITE_UTF16LE)
|
||||
#endif
|
||||
|
||||
/*
|
||||
** An instance of the following structure is used to store the busy-handler
|
||||
@@ -411,7 +418,6 @@ struct Schema {
|
||||
#define DB_UnresetViews 0x0002 /* Some views have defined column names */
|
||||
#define DB_Empty 0x0004 /* The file is empty (length 0 bytes) */
|
||||
|
||||
#define SQLITE_UTF16NATIVE (SQLITE_BIGENDIAN?SQLITE_UTF16BE:SQLITE_UTF16LE)
|
||||
|
||||
/*
|
||||
** Each database is an instance of the following structure.
|
||||
|
||||
Reference in New Issue
Block a user