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:
parent
b3738b6c85
commit
38def05454
16
manifest
16
manifest
@ -1,5 +1,5 @@
|
||||
C Improved\stest\scoverage\sfor\sprintf.c.\s(CVS\s3780)
|
||||
D 2007-03-31T15:02:49
|
||||
C Increase\stest\scoverage\sby\sstatically\sdefining\sSQLITE_BIGENDIAN\sand\srelated\nmacros\sfor\six86\splatforms.\s\sStill\sa\srun-time\stest\sfor\sother\sarchitectures.\nNeed\sto\sadd\sadditional\scases\sto\scover\sother\spopular\sprocessors.\s(CVS\s3781)
|
||||
D 2007-03-31T15:28:00
|
||||
F Makefile.in 2f2c3bf69faf0ae7b8e8af4f94f1986849034530
|
||||
F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
|
||||
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
|
||||
@ -73,7 +73,7 @@ F src/hash.h 1b3f7e2609141fd571f62199fc38687d262e9564
|
||||
F src/insert.c 664e4ccabc6393dc3be08ce2c47ccfea4b049e15
|
||||
F src/legacy.c 2631df6a861f830d6b1c0fe92b9fdd745b2c0cd6
|
||||
F src/loadext.c 146fb9b9dc6133e763888d710205c32ebf8eeca2
|
||||
F src/main.c a02581f5076a49f18f67b00fdc4c7ae338adc679
|
||||
F src/main.c a0e10c0888bdf40b7a10f11bc2581b1da3a9077a
|
||||
F src/md5.c c5fdfa5c2593eaee2e32a5ce6c6927c986eaf217
|
||||
F src/os.c 5a194b9b9a10dc66543d4ca22bc0db40c5cc5ef1
|
||||
F src/os.h 506acdfd0a63802434ceacdbfd7c006e5d90fc53
|
||||
@ -98,7 +98,7 @@ F src/server.c 087b92a39d883e3fa113cae259d64e4c7438bc96
|
||||
F src/shell.c 3ae4654560e91220a95738a73d135d91d937cda1
|
||||
F src/sqlite.h.in e429f66f9245c7f8675db24b230c950b8672ad1c
|
||||
F src/sqlite3ext.h 7d0d363ea7327e817ef0dfe1b7eee1f171b72890
|
||||
F src/sqliteInt.h c8d0e5ce27a862836de70fc3eadc1e65cea7e3d8
|
||||
F src/sqliteInt.h 09384eb30d6740e3e9d0c9379432e254fdb390d9
|
||||
F src/table.c 6d0da66dde26ee75614ed8f584a1996467088d06
|
||||
F src/tclsqlite.c a8d1166319db5d505b25ac6a9820162afe63fc8a
|
||||
F src/test1.c 0f94df69cd8832799aafaf58f7e28b4527225a3e
|
||||
@ -120,7 +120,7 @@ F src/test_tclvar.c 315e77c17f128ff8c06b38c08617fd07c825a95b
|
||||
F src/tokenize.c bb1732ef2b6fc2143f93ff28a45d3dcb04c1d396
|
||||
F src/trigger.c b3c22b727049fceb96efa5f9f7d325fd853acc22
|
||||
F src/update.c 3359041db390a8f856d67272f299600e2104f350
|
||||
F src/utf.c 67ecb1032bc0b42c105e88d65ef9d9f626eb0e1f
|
||||
F src/utf.c e64a48bc21aa973eb622dd47da87d56a4cdcf528
|
||||
F src/util.c 8e8180ee5597f2474c1da311ff3c464b6966c0f1
|
||||
F src/vacuum.c 8bd895d29e7074e78d4e80f948e35ddc9cf2beef
|
||||
F src/vdbe.c 87e31f0790ac8a5aad7b7fcd5b97948943fccba3
|
||||
@ -447,7 +447,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
|
||||
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
|
||||
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
|
||||
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
|
||||
P 2c62ffcb865655e8b91aaf81601548ea540c6088
|
||||
R 7f31932fa8592f2c80ee3299e5d6f688
|
||||
P c2badb208ff1207a1471410965947893b070ea50
|
||||
R 204431f7b2bb34a948b344e8b3edd416
|
||||
U drh
|
||||
Z effbeef2cf4c0c82b0a2ff7bc1186397
|
||||
Z 95c9850a4ecd3943084703787ef0d36a
|
||||
|
@ -1 +1 @@
|
||||
c2badb208ff1207a1471410965947893b070ea50
|
||||
476e7c3fcc69d8b21d161c758aaa5ef7163abb15
|
@ -14,18 +14,12 @@
|
||||
** other files are for internal use by SQLite and should not be
|
||||
** accessed by users of the library.
|
||||
**
|
||||
** $Id: main.c,v 1.366 2007/03/30 20:43:42 drh Exp $
|
||||
** $Id: main.c,v 1.367 2007/03/31 15:28:00 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "os.h"
|
||||
#include <ctype.h>
|
||||
|
||||
/*
|
||||
** The following constant value is used by the SQLITE_BIGENDIAN and
|
||||
** SQLITE_LITTLEENDIAN macros.
|
||||
*/
|
||||
const int sqlite3one = 1;
|
||||
|
||||
/*
|
||||
** The version of the library
|
||||
*/
|
||||
|
@ -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.
|
||||
|
@ -12,7 +12,7 @@
|
||||
** This file contains routines used to translate between UTF-8,
|
||||
** UTF-16, UTF-16BE, and UTF-16LE.
|
||||
**
|
||||
** $Id: utf.c,v 1.43 2006/10/19 01:58:44 drh Exp $
|
||||
** $Id: utf.c,v 1.44 2007/03/31 15:28:00 drh Exp $
|
||||
**
|
||||
** Notes on UTF-8:
|
||||
**
|
||||
@ -62,6 +62,12 @@
|
||||
#include <assert.h>
|
||||
#include "vdbeInt.h"
|
||||
|
||||
/*
|
||||
** The following constant value is used by the SQLITE_BIGENDIAN and
|
||||
** SQLITE_LITTLEENDIAN macros.
|
||||
*/
|
||||
const int sqlite3one = 1;
|
||||
|
||||
/*
|
||||
** This table maps from the first byte of a UTF-8 character to the number
|
||||
** of trailing bytes expected. A value '4' indicates that the table key
|
||||
|
Loading…
Reference in New Issue
Block a user