update to version 3.6.4, see http://www.sqlite.org/35to36.html and

http://www.sqlite.org/changes.html for the details

tcl adjustments and bulk build testing by bernd@, thanks!

ok bernd@, steven@, martynas@
This commit is contained in:
simon 2008-10-27 17:14:18 +00:00
parent 65dd5daf1a
commit eebae1b0c1
9 changed files with 94 additions and 69 deletions

View File

@ -1,14 +1,14 @@
# $OpenBSD: Makefile,v 1.35 2008/07/25 19:02:25 espie Exp $
# $OpenBSD: Makefile,v 1.36 2008/10/27 17:14:18 simon Exp $
COMMENT-main= embedded SQL implementation
COMMENT-tcl= TCL bindings for Sqlite3
V= 3.5.9
V= 3.6.4
DISTNAME= sqlite-${V}
PKGNAME-main= sqlite3-${V}p0
PKGNAME-main= sqlite3-${V}
PKGNAME-tcl= sqlite3-tcl-${V}
CATEGORIES= databases
SHARED_LIBS += sqlite3 11.0 # .8.6
SHARED_LIBS += tclsqlite3 10.0 # .8.6
SHARED_LIBS += sqlite3 12.0 # .8.6
SHARED_LIBS += tclsqlite3 11.0 # .8.6
MASTER_SITES= ${HOMEPAGE}
@ -46,6 +46,7 @@ MULTI_PACKAGES+=-tcl
.endif
BUILD_DEPENDS= :tcl-8.4.*:lang/tcl/8.4
LIB_DEPENDS-tcl = sqlite3::${BASE_PKGPATH},-main
.if ${MULTI_PACKAGES:M-tcl}
CONFIGURE_ARGS+=--with-tcl=${LOCALBASE}/lib/tcl8.4

View File

@ -1,5 +1,5 @@
MD5 (sqlite-3.5.9.tar.gz) = tYQSkEtC/knlooHpnaD9cg==
RMD160 (sqlite-3.5.9.tar.gz) = 3armhmQZZoAhA3pJfDY+YZTefeU=
SHA1 (sqlite-3.5.9.tar.gz) = jYH7T/YGCVc05yHjzwC8nThZoFU=
SHA256 (sqlite-3.5.9.tar.gz) = fdMxkWsTR5aVgum84Z+87tiXLoB+ME4Oc3BH64D8YRw=
SIZE (sqlite-3.5.9.tar.gz) = 2201083
MD5 (sqlite-3.6.4.tar.gz) = uYMs2HNNRWjjhOHGC1DJLw==
RMD160 (sqlite-3.6.4.tar.gz) = tCC4oZaAf+tRYvKT6mTndBpjPpI=
SHA1 (sqlite-3.6.4.tar.gz) = rxCCwEVapnKp4cpwDrU9mG9qyEY=
SHA256 (sqlite-3.6.4.tar.gz) = Lkey9cQYSmvYPSdjFSHb7UHJkeLSL+rOUH5o05gS5yQ=
SIZE (sqlite-3.6.4.tar.gz) = 2246598

View File

@ -1,21 +1,21 @@
$OpenBSD: patch-Makefile_in,v 1.8 2008/07/23 17:31:17 martynas Exp $
--- Makefile.in.orig Mon May 12 19:10:26 2008
+++ Makefile.in Sun Jul 20 21:18:43 2008
@@ -96,7 +96,7 @@ TEXE = @TARGET_EXEEXT@
$OpenBSD: patch-Makefile_in,v 1.9 2008/10/27 17:14:18 simon Exp $
--- Makefile.in.orig Tue Oct 14 20:07:37 2008
+++ Makefile.in Sun Oct 26 10:19:40 2008
@@ -101,7 +101,7 @@ TEXE = @TARGET_EXEEXT@
#
HAVE_TCL = @HAVE_TCL@
-# This is the command to use for tclsh - normally just "tclsh", but we may
+# This is the command to use for tclsh8.4 - normally just "tclsh8.4", but we may
+# This is the command to use for tclsh8.48.4 - normally just "tclsh8.48.4", but we may
# know the specific version we want to use
#
TCLSH_CMD = @TCLSH_CMD@
@@ -160,11 +160,11 @@ OBJS0 = alter.lo analyze.lo attach.lo auth.lo bitvec.l
select.lo table.lo tokenize.lo trigger.lo update.lo \
@@ -167,11 +167,11 @@ OBJS0 = alter.lo analyze.lo attach.lo auth.lo bitvec.l
table.lo tokenize.lo trigger.lo update.lo \
util.lo vacuum.lo \
vdbe.lo vdbeapi.lo vdbeaux.lo vdbeblob.lo vdbefifo.lo vdbemem.lo \
- where.lo utf.lo legacy.lo vtab.lo
+ where.lo utf.lo legacy.lo vtab.lo pthread_stub.lo
- walker.lo where.lo utf.lo vtab.lo
+ walker.lo where.lo utf.lo vtab.lo pthread_stub.lo
# Object files for the amalgamation.
#
@ -24,17 +24,17 @@ $OpenBSD: patch-Makefile_in,v 1.8 2008/07/23 17:31:17 martynas Exp $
# Determine the real value of LIBOBJ based on the 'configure' script
#
@@ -246,7 +246,8 @@ SRC = \
$(TOP)/src/vdbemem.c \
@@ -262,7 +262,8 @@ SRC = \
$(TOP)/src/vdbeInt.h \
$(TOP)/src/vtab.c \
$(TOP)/src/walker.c \
- $(TOP)/src/where.c
+ $(TOP)/src/where.c \
+ $(TOP)/src/pthread_stub.c
# Generated source code files
#
@@ -392,7 +393,7 @@ HDR += \
@@ -419,7 +420,7 @@ HDR += \
# hidden when the library is built via the amalgamation).
#
TESTFIXTURE_SRC0 = $(TESTSRC2) libsqlite3.la
@ -43,7 +43,16 @@ $OpenBSD: patch-Makefile_in,v 1.8 2008/07/23 17:31:17 martynas Exp $
TESTFIXTURE_SRC = $(TESTSRC) $(TOP)/src/tclsqlite.c $(TESTFIXTURE_SRC$(USE_AMALGAMATION))
@@ -454,6 +455,9 @@ lemon$(BEXE): $(TOP)/tool/lemon.c $(TOP)/tool/lempar.c
@@ -444,7 +445,7 @@ libsqlite3.la: $(LIBOBJ)
libtclsqlite3.la: tclsqlite.lo libsqlite3.la
$(LTLINK) -o $@ tclsqlite.lo \
- libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
+ libsqlite3.la -L./.libs @TCL_STUB_LIB_SPEC@ $(TLIBS) \
-rpath "$(libdir)/sqlite" \
-version-info "8:6:8"
@@ -481,6 +482,9 @@ lemon$(BEXE): $(TOP)/tool/lemon.c $(TOP)/tool/lempar.c
sqlite3.lo: sqlite3.c
$(LTCOMPILE) -c sqlite3.c
@ -53,7 +62,7 @@ $OpenBSD: patch-Makefile_in,v 1.8 2008/07/23 17:31:17 martynas Exp $
# Rules to build individual files
#
alter.lo: $(TOP)/src/alter.c $(HDR)
@@ -720,6 +724,8 @@ clean:
@@ -768,6 +772,8 @@ clean:
distclean: clean
rm -f config.log config.status libtool Makefile sqlite3.pc

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-configure,v 1.3 2008/07/23 17:31:17 martynas Exp $
--- configure.orig Mon May 12 20:57:21 2008
+++ configure Mon Jul 21 11:26:29 2008
@@ -11088,7 +11088,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
$OpenBSD: patch-configure,v 1.4 2008/10/27 17:14:18 simon Exp $
--- configure.orig Tue Oct 14 20:07:39 2008
+++ configure Sat Oct 25 19:39:50 2008
@@ -11089,7 +11089,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
@ -10,7 +10,7 @@ $OpenBSD: patch-configure,v 1.3 2008/07/23 17:31:17 martynas Exp $
break
else
echo "$as_me: failed program was:" >&5
@@ -11433,7 +11433,7 @@ echo "${ECHO_T}file not found" >&6
@@ -11432,7 +11432,7 @@ echo "${ECHO_T}file not found" >&6
eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""

View File

@ -1,9 +1,9 @@
$OpenBSD: patch-publish_sh,v 1.1 2008/07/23 17:31:17 martynas Exp $
--- publish.sh.orig Mon Jul 21 11:24:47 2008
+++ publish.sh Mon Jul 21 11:25:05 2008
@@ -53,13 +53,13 @@ TCLDIR=/home/drh/tcltk/846/linux/846linux
TCLSTUBLIB=$TCLDIR/libtclstub8.4g.a
CFLAGS="-Os -DSQLITE_ENABLE_FTS3=1 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1"
$OpenBSD: patch-publish_sh,v 1.2 2008/10/27 17:14:18 simon Exp $
--- publish.sh.orig Tue Oct 14 20:07:39 2008
+++ publish.sh Sat Oct 25 19:39:50 2008
@@ -56,13 +56,13 @@ CFLAGS="-Os -DSQLITE_ENABLE_FTS3=3 -DSQLITE_ENABLE_RTR
CFLAGS="$CFLAGS -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1"
CFLAGS="$CFLAGS -DSQLITE_ENABLE_COLUMN_METADATA=1"
echo '***** BUILDING shared libraries for linux'
-gcc $CFLAGS -shared tclsqlite3.c $TCLSTUBLIB -o tclsqlite3.so -lpthread
+gcc $CFLAGS -shared tclsqlite3.c $TCLSTUBLIB -o tclsqlite3.so -pthread

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-src_os_unix_c,v 1.3 2008/07/23 17:31:17 martynas Exp $
--- src/os_unix.c.orig Tue May 13 08:51:29 2008
+++ src/os_unix.c Wed Jul 23 10:46:40 2008
@@ -61,6 +61,9 @@
$OpenBSD: patch-src_os_unix_c,v 1.4 2008/10/27 17:14:18 simon Exp $
--- src/os_unix.c.orig Tue Oct 14 20:07:40 2008
+++ src/os_unix.c Sat Oct 25 19:39:50 2008
@@ -83,6 +83,9 @@
#if SQLITE_THREADSAFE
# include <pthread.h>
# define SQLITE_UNIX_THREADS 1
@ -11,7 +11,7 @@ $OpenBSD: patch-src_os_unix_c,v 1.3 2008/07/23 17:31:17 martynas Exp $
#endif
/*
@@ -97,7 +100,7 @@ struct unixFile {
@@ -119,7 +122,7 @@ struct unixFile {
int h; /* The file descriptor */
unsigned char locktype; /* The type of lock held on this fd */
int dirfd; /* File descriptor for the directory */
@ -19,8 +19,8 @@ $OpenBSD: patch-src_os_unix_c,v 1.3 2008/07/23 17:31:17 martynas Exp $
+#if SQLITE_NEED_TID_CHECKS
pthread_t tid; /* The thread that "owns" this unixFile */
#endif
};
@@ -138,7 +141,7 @@ struct unixFile {
int lastErrno; /* The unix errno from the last I/O error */
@@ -161,7 +164,7 @@ struct unixFile {
** The threadid macro resolves to the thread-id or to 0. Used for
** testing and debugging only.
*/
@ -29,7 +29,7 @@ $OpenBSD: patch-src_os_unix_c,v 1.3 2008/07/23 17:31:17 martynas Exp $
#define threadid pthread_self()
#else
#define threadid 0
@@ -160,7 +163,7 @@ struct unixFile {
@@ -183,7 +186,7 @@ struct unixFile {
** recomputed because its key includes the thread-id. See the
** transferOwnership() function below for additional information
*/
@ -38,7 +38,7 @@ $OpenBSD: patch-src_os_unix_c,v 1.3 2008/07/23 17:31:17 martynas Exp $
# define SET_THREADID(X) (X)->tid = pthread_self()
# define CHECK_THREADID(X) (threadsOverrideEachOthersLocks==0 && \
!pthread_equal((X)->tid, pthread_self()))
@@ -281,7 +284,7 @@ struct unixFile {
@@ -302,7 +305,7 @@ struct unixFile {
struct lockKey {
dev_t dev; /* Device number */
ino_t ino; /* Inode number */
@ -47,8 +47,8 @@ $OpenBSD: patch-src_os_unix_c,v 1.3 2008/07/23 17:31:17 martynas Exp $
pthread_t tid; /* Thread ID or zero if threads can override each other */
#endif
};
@@ -371,7 +374,7 @@ static void leaveMutex(){
sqlite3_mutex_leave(sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_MASTER));
@@ -396,7 +399,7 @@ static void leaveMutex(void){
sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
}
-#if SQLITE_THREADSAFE
@ -56,7 +56,7 @@ $OpenBSD: patch-src_os_unix_c,v 1.3 2008/07/23 17:31:17 martynas Exp $
/*
** This variable records whether or not threads can override each others
** locks.
@@ -508,7 +511,7 @@ static void testThreadLockingBehavior(int fd_orig){
@@ -533,7 +536,7 @@ static void testThreadLockingBehavior(int fd_orig){
close(fd);
threadsOverrideEachOthersLocks = d[0].result==0 && d[1].result==0;
}
@ -65,7 +65,7 @@ $OpenBSD: patch-src_os_unix_c,v 1.3 2008/07/23 17:31:17 martynas Exp $
/*
** Release a lockInfo structure previously allocated by findLockInfo().
@@ -641,7 +644,7 @@ static int findLockInfo(
@@ -715,7 +718,7 @@ static int findLockInfo(
memset(&key1, 0, sizeof(key1));
key1.dev = statbuf.st_dev;
key1.ino = statbuf.st_ino;
@ -74,7 +74,7 @@ $OpenBSD: patch-src_os_unix_c,v 1.3 2008/07/23 17:31:17 martynas Exp $
if( threadsOverrideEachOthersLocks<0 ){
testThreadLockingBehavior(fd);
}
@@ -737,7 +740,7 @@ static const char *locktypeName(int locktype){
@@ -808,7 +811,7 @@ static const char *locktypeName(int locktype){
** If the unixFile is locked and an ownership is wrong, then return
** SQLITE_MISUSE. SQLITE_OK is returned if everything works.
*/

View File

@ -1,19 +1,21 @@
$OpenBSD: patch-src_sqliteInt_h,v 1.1 2008/07/23 17:31:17 martynas Exp $
--- src/sqliteInt.h.orig Tue May 13 16:27:34 2008
+++ src/sqliteInt.h Sat Jul 19 15:10:45 2008
@@ -35,9 +35,6 @@
$OpenBSD: patch-src_sqliteInt_h,v 1.2 2008/10/27 17:14:18 simon Exp $
--- src/sqliteInt.h.orig Sat Oct 25 19:43:37 2008
+++ src/sqliteInt.h Sat Oct 25 19:45:37 2008
@@ -35,11 +35,6 @@
#pragma warn -spa /* Suspicous pointer arithmetic */
#endif
-/* Needed for various definitions... */
-#define _GNU_SOURCE
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE
-#endif
-
/*
** Include standard header files as necessary
*/
@@ -327,32 +324,26 @@ typedef INT16_TYPE i16; /* 2-byte signed in
@@ -378,33 +373,26 @@ typedef INT16_TYPE i16; /* 2-byte signed in
typedef UINT8_TYPE u8; /* 1-byte unsigned integer */
typedef UINT8_TYPE i8; /* 1-byte signed integer */
typedef INT8_TYPE i8; /* 1-byte signed integer */
-/*
-** Macros to determine whether the machine is big or little endian,
@ -34,7 +36,8 @@ $OpenBSD: patch-src_sqliteInt_h,v 1.1 2008/07/23 17:31:17 martynas Exp $
-extern const int sqlite3one;
+#error "Help, I'm trapped in a PDP11"
#endif
-#if defined(i386) || defined(__i386__) || defined(_M_IX86)
-#if defined(i386) || defined(__i386__) || defined(_M_IX86)\
- || defined(__x86_64) || defined(__x86_64__)
-# define SQLITE_BIGENDIAN 0
-# define SQLITE_LITTLEENDIAN 1
-# define SQLITE_UTF16NATIVE SQLITE_UTF16LE

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-src_sqlite_h_in,v 1.1 2008/07/23 17:31:17 martynas Exp $
--- src/sqlite.h.in.orig Mon May 12 15:39:56 2008
+++ src/sqlite.h.in Sat Jul 19 15:13:05 2008
$OpenBSD: patch-src_sqlite_h_in,v 1.2 2008/10/27 17:14:18 simon Exp $
--- src/sqlite.h.in.orig Tue Oct 14 20:07:41 2008
+++ src/sqlite.h.in Sat Oct 25 19:39:50 2008
@@ -35,6 +35,7 @@
#ifndef _SQLITE3_H_
#define _SQLITE3_H_
@ -9,8 +9,8 @@ $OpenBSD: patch-src_sqlite_h_in,v 1.1 2008/07/23 17:31:17 martynas Exp $
/*
** Make sure we can call this stuff from C++.
@@ -188,6 +189,9 @@ typedef struct sqlite3 sqlite3;
** {F10202} The [sqlite_uint64] and [sqlite3_uint64] types specify
@@ -215,6 +216,9 @@ typedef struct sqlite3 sqlite3;
** {H10202} The [sqlite_uint64] and [sqlite3_uint64] type shall specify
** a 64-bit unsigned integer.
*/
+typedef int64_t sqlite_int64;
@ -19,7 +19,7 @@ $OpenBSD: patch-src_sqlite_h_in,v 1.1 2008/07/23 17:31:17 martynas Exp $
#ifdef SQLITE_INT64_TYPE
typedef SQLITE_INT64_TYPE sqlite_int64;
typedef unsigned SQLITE_INT64_TYPE sqlite_uint64;
@@ -197,6 +201,7 @@ typedef struct sqlite3 sqlite3;
@@ -224,6 +228,7 @@ typedef struct sqlite3 sqlite3;
#else
typedef long long int sqlite_int64;
typedef unsigned long long int sqlite_uint64;

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-src_util_c,v 1.1 2008/07/23 17:31:17 martynas Exp $
--- src/util.c.orig Tue May 13 19:41:50 2008
+++ src/util.c Sat Jul 19 15:10:45 2008
@@ -19,23 +19,14 @@
$OpenBSD: patch-src_util_c,v 1.2 2008/10/27 17:14:18 simon Exp $
--- src/util.c.orig Tue Oct 14 20:07:41 2008
+++ src/util.c Sat Oct 25 19:51:35 2008
@@ -19,35 +19,14 @@
#include "sqliteInt.h"
#include <stdarg.h>
#include <ctype.h>
@ -9,7 +9,7 @@ $OpenBSD: patch-src_util_c,v 1.1 2008/07/23 17:31:17 martynas Exp $
/*
** Return true if the floating point value is Not a Number.
** Return true if the floating point value is Not a Number (NaN).
*/
int sqlite3IsNaN(double x){
- /* This NaN test sometimes fails if compiled on GCC with -ffast-math.
@ -20,9 +20,21 @@ $OpenBSD: patch-src_util_c,v 1.1 2008/07/23 17:31:17 martynas Exp $
- ** -O option since it can result in incorrect output for programs
- ** which depend on an exact implementation of IEEE or ISO
- ** rules/specifications for math functions.
- **
- ** Under MSVC, this NaN test may fail if compiled with a floating-
- ** point precision mode other than /fp:precise. From the MSDN
- ** documentation:
- **
- ** The compiler [with /fp:precise] will properly handle comparisons
- ** involving NaN. For example, x != x evaluates to true if x is NaN
- ** ...
- */
-#ifdef __FAST_MATH__
-# error SQLite will not work correctly with the -ffast-math option of GCC.
-#endif
- volatile double y = x;
- return x!=y;
- volatile double z = y;
- return y!=z;
+ return isnan(x);
}