]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Increase test coverage by statically defining SQLITE_BIGENDIAN and related
authordrh <drh@noemail.net>
Sat, 31 Mar 2007 15:27:59 +0000 (15:27 +0000)
committerdrh <drh@noemail.net>
Sat, 31 Mar 2007 15:27:59 +0000 (15:27 +0000)
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

manifest
manifest.uuid
src/main.c
src/sqliteInt.h
src/utf.c

index 8a0c6076803fe77575b80e42734677e82e106aa1..4bc7fadeb22593a428453e5ef2fd172d35660b90 100644 (file)
--- a/manifest
+++ b/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
index f06cd41422b63eaf5d45500788c60c6746c62c50..f88ff3c16a6c035798d6ceede61cd7ccf635cac7 100644 (file)
@@ -1 +1 @@
-c2badb208ff1207a1471410965947893b070ea50
\ No newline at end of file
+476e7c3fcc69d8b21d161c758aaa5ef7163abb15
\ No newline at end of file
index c1fd6a31c4cea651920172e6f0bc607af1958111..f7d670210e70a206d578b4bc66d3676c501d2318 100644 (file)
 ** 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
 */
index 71c21eac28a869ec8d0c5c8672f097eea61d83bd..1e276d1abca07bf66591d8ab581b9710e05bc3a3 100644 (file)
@@ -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.
index fb587930b3a8b60b3fbc3e616b1b2a9479916665..fb995cca6beb9a8f0471fc595f1a45a0cf11681b 100644 (file)
--- a/src/utf.c
+++ b/src/utf.c
@@ -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:
 **
 #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