Skip to content

Commit be82542

Browse files
committed
Prepare release of version 2.2.5
- Update to SQLite 3.51.0 - Enable extension PERCENTILE - Update build files
1 parent a073a59 commit be82542

File tree

74 files changed

+11682
-5821
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+11682
-5821
lines changed

CHANGELOG.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [2.2.5] - 2025-11-06
11+
12+
### Changed
13+
14+
- Based on SQLite version 3.51.0
15+
- Enabled extension PERCENTILE
16+
- Updated build files
17+
18+
### Fixed
19+
20+
- Fixed issue [#215](../../issues/215) - Internal compiler error for VC++ 2017
21+
- Fixed issue [#218](../../issues/218) - Raw keys in SQLCipher notation are not handled correctly
22+
- Fixed issue [#221](../../issues/221) - Allow initializing library without default VFS
23+
1024
## [2.2.4] - 2025-08-01
1125

1226
### Changed
@@ -672,7 +686,8 @@ The following ciphers are supported:
672686
- AES 256 Bit CBC - SHA1/SHA256/SHA512 HMAC ([SQLCipher](https://www.zetetic.net/sqlcipher/), database versions 1, 2, 3, and 4)
673687
- RC4 - No HMAC ([System.Data.SQLite](http://system.data.sqlite.org))
674688

675-
[Unreleased]: ../../compare/v2.2.4...HEAD
689+
[Unreleased]: ../../compare/v2.2.5...HEAD
690+
[2.2.5]: ../../compare/v2.2.4...v2.2.5
676691
[2.2.4]: ../../compare/v2.2.3...v2.2.4
677692
[2.2.3]: ../../compare/v2.2.2...v2.2.3
678693
[2.2.2]: ../../compare/v2.2.1...v2.2.2

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.24.0.0)
2-
project(sqlite3mc VERSION 2.2.4)
2+
project(sqlite3mc VERSION 2.2.5)
33

44
# Helper macro
55
macro(_Enable_MT _target)
@@ -29,6 +29,7 @@ OPTION(SQLITE_ENABLE_CSV "Enable extension 'csv'" ON)
2929
OPTION(SQLITE_ENABLE_EXTFUNC "Enable extension 'extfunc'" ON)
3030
OPTION(SQLITE_ENABLE_GEOPOLY "Enable extension 'geopoly'" ON)
3131
OPTION(SQLITE_ENABLE_JSON1 "Enable extension 'json1'" ON)
32+
OPTION(SQLITE_ENABLE_PERCENTILE "Enable extension 'percentile'" ON)
3233
OPTION(SQLITE_ENABLE_RTREE "Enable extension 'rtree'" ON)
3334
OPTION(SQLITE_ENABLE_UUID "Enable extension 'uuid'" ON)
3435
OPTION(SQLITE_USE_URI "Enable the URI filename process logic" ON)
@@ -107,6 +108,7 @@ set(SQLITE3MC_BASE_DEFINITIONS
107108
$<$<BOOL:${SQLITE_ENABLE_GEOPOLY}>:SQLITE_ENABLE_GEOPOLY=1>
108109
$<$<BOOL:${SQLITE_ENABLE_EXTFUNC}>:SQLITE_ENABLE_EXTFUNC=1>
109110
$<$<BOOL:${SQLITE_ENABLE_CARRAY}>:SQLITE_ENABLE_CARRAY=1>
111+
$<$<BOOL:${SQLITE_ENABLE_PERCENTILE}>:SQLITE_ENABLE_PERCENTILE=1>
110112
$<$<BOOL:${SQLITE_ENABLE_UUID}>:SQLITE_ENABLE_UUID=1>
111113
SQLITE_TEMP_STORE=2
112114
$<$<BOOL:${SQLITE_USE_URI}>:SQLITE_USE_URI=1>

Makefile.am

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# Process this file with automake to create Makefile.in for sqlite3mc library
22
#
3-
# Copyright (C) 2019-2024 Ulrich Telle <[email protected]>
3+
# Copyright (C) 2019-2025 Ulrich Telle <[email protected]>
44
#
55
# This file is covered by the same licence as the entire SQLite3 Multiple Ciphers package.
66

77
#if HOST_X86
8-
#X86_FLAGS = -msse4.2 -maes
8+
#X86_FLAGS = -msse4.2 -maes
99
#else
1010
X86_FLAGS =
1111
#endif
1212

1313
if HOST_ARM
14-
#ARM_FLAGS = -march=native
14+
#ARM_FLAGS = -march=native
1515
ARM_FLAGS =
1616
else
1717
ARM_FLAGS =
@@ -24,7 +24,7 @@ ACLOCAL_AMFLAGS = -I admin/m4
2424
AM_CXXFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/aegis/include -I$(top_srcdir)/src/argon2/include
2525
AM_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/aegis/include -I$(top_srcdir)/src/argon2/include
2626

27-
AM_CFLAGS += -std=c99 -DSQLITE_THREADSAFE=1 -DSQLITE_DQS=0 -DSQLITE_MAX_ATTACHED=10 -DSQLITE_SOUNDEX=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_SECURE_DELETE=1 -DSQLITE_ENABLE_DESERIALIZE=1 -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_FTS3_PARENTHESIS=1 -DSQLITE_ENABLE_FTS4=1 -DSQLITE_ENABLE_FTS5=1 -DSQLITE_ENABLE_JSON1=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_GEOPOLY=1 -DSQLITE_ENABLE_PREUPDATE_HOOK=1 -DSQLITE_ENABLE_SESSION=1 -DSQLITE_CORE=1 -DSQLITE_ENABLE_EXTFUNC=1 -DSQLITE_ENABLE_MATH_FUNCTIONS=1 -DSQLITE_ENABLE_CSV=1 -DSQLITE_ENABLE_SHA3=1 -DSQLITE_ENABLE_CARRAY=1 -DSQLITE_ENABLE_FILEIO=1 -DSQLITE_ENABLE_SERIES=1 -DSQLITE_ENABLE_UUID=1 -DSQLITE_ENABLE_REGEXP=1 -DSQLITE_TEMP_STORE=2 -DSQLITE_USE_URI=1 -DSQLITE_USER_AUTHENTICATION=0 $(X86_FLAGS) $(ARM_FLAGS)
27+
AM_CFLAGS += -std=c99 -DSQLITE_THREADSAFE=1 -DSQLITE_DQS=0 -DSQLITE_MAX_ATTACHED=10 -DSQLITE_SOUNDEX=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_SECURE_DELETE=1 -DSQLITE_ENABLE_DESERIALIZE=1 -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_FTS3_PARENTHESIS=1 -DSQLITE_ENABLE_FTS4=1 -DSQLITE_ENABLE_FTS5=1 -DSQLITE_ENABLE_JSON1=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_GEOPOLY=1 -DSQLITE_ENABLE_PREUPDATE_HOOK=1 -DSQLITE_ENABLE_SESSION=1 -DSQLITE_CORE=1 -DSQLITE_ENABLE_EXTFUNC=1 -DSQLITE_ENABLE_MATH_FUNCTIONS=1 -DSQLITE_ENABLE_CSV=1 -DSQLITE_ENABLE_SHA3=1 -DSQLITE_ENABLE_CARRAY=1 -DSQLITE_ENABLE_PERCENTILE=1 -DSQLITE_ENABLE_FILEIO=1 -DSQLITE_ENABLE_SERIES=1 -DSQLITE_ENABLE_UUID=1 -DSQLITE_ENABLE_REGEXP=1 -DSQLITE_TEMP_STORE=2 -DSQLITE_USE_URI=1 -DSQLITE_USER_AUTHENTICATION=0 $(X86_FLAGS) $(ARM_FLAGS)
2828

2929
if HOST_WINDOWS
3030
AM_CFLAGS += -DSQLITE_API=__declspec\(dllexport\)
@@ -85,7 +85,6 @@ includemc_HEADERS = \
8585
src/sqlite3mc.h
8686

8787
noinst_HEADERS = \
88-
src/carray.c \
8988
src/chacha20poly1305.c \
9089
src/cipher_chacha20.c \
9190
src/cipher_common.c \
@@ -109,7 +108,6 @@ noinst_HEADERS = \
109108
src/shathree.c \
110109
src/sqlite3.c \
111110
src/sqlite3mc_vfs.c \
112-
src/test_windirent.c \
113111
src/uuid.c \
114112
src/cipher_common.h \
115113
src/fastpbkdf2.h \
@@ -118,7 +116,7 @@ noinst_HEADERS = \
118116
src/sha1.h \
119117
src/sha2.h \
120118
src/sqlite3mc_vfs.h \
121-
src/test_windirent.h
119+
src/windirent.h
122120

123121
lib@SQLITE3MC_LIBNAME@_la_LDFLAGS = -no-undefined $(AM_LDFLAGS)
124122
if HOST_WINDOWS
@@ -135,7 +133,7 @@ sqlite3shell_SOURCES = \
135133
src/sqlite3mc.c \
136134
src/shell.c
137135

138-
sqlite3shell_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/aegis/include -I$(top_srcdir)/src/argon2/include -std=c99 -D_GNU_SOURCE -DSQLITE_THREADSAFE=1 -DSQLITE_DQS=0 -DSQLITE_MAX_ATTACHED=10 -DSQLITE_SOUNDEX=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_SECURE_DELETE=1 -DSQLITE_ENABLE_DESERIALIZE=1 -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_FTS3_PARENTHESIS=1 -DSQLITE_ENABLE_FTS4=1 -DSQLITE_ENABLE_FTS5=1 -DSQLITE_ENABLE_JSON1=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_GEOPOLY=1 -DSQLITE_ENABLE_PREUPDATE_HOOK=1 -DSQLITE_ENABLE_SESSION=1 -DSQLITE_CORE=1 -DSQLITE_ENABLE_EXTFUNC=1 -DSQLITE_ENABLE_MATH_FUNCTIONS=1 -DSQLITE_ENABLE_CSV=1 -DSQLITE_ENABLE_CARRAY=1 -DSQLITE_ENABLE_UUID=1 -DSQLITE_TEMP_STORE=2 -DSQLITE_USE_URI=1 -DSQLITE_USER_AUTHENTICATION=0 -DSQLITE_ENABLE_DBPAGE_VTAB=1 -DSQLITE_ENABLE_DBSTAT_VTAB=1 -DSQLITE_ENABLE_STMTVTAB=1 -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION=1 $(X86_FLAGS) $(ARM_FLAGS)
136+
sqlite3shell_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/aegis/include -I$(top_srcdir)/src/argon2/include -std=c99 -D_GNU_SOURCE -DSQLITE_THREADSAFE=1 -DSQLITE_DQS=0 -DSQLITE_MAX_ATTACHED=10 -DSQLITE_SOUNDEX=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_SECURE_DELETE=1 -DSQLITE_ENABLE_DESERIALIZE=1 -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_FTS3_PARENTHESIS=1 -DSQLITE_ENABLE_FTS4=1 -DSQLITE_ENABLE_FTS5=1 -DSQLITE_ENABLE_JSON1=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_GEOPOLY=1 -DSQLITE_ENABLE_PREUPDATE_HOOK=1 -DSQLITE_ENABLE_SESSION=1 -DSQLITE_CORE=1 -DSQLITE_ENABLE_EXTFUNC=1 -DSQLITE_ENABLE_MATH_FUNCTIONS=1 -DSQLITE_ENABLE_CSV=1 -DSQLITE_ENABLE_CARRAY=1 -DSQLITE_ENABLE_PERCENTILE=1 -DSQLITE_ENABLE_UUID=1 -DSQLITE_TEMP_STORE=2 -DSQLITE_USE_URI=1 -DSQLITE_USER_AUTHENTICATION=0 -DSQLITE_ENABLE_DBPAGE_VTAB=1 -DSQLITE_ENABLE_DBSTAT_VTAB=1 -DSQLITE_ENABLE_STMTVTAB=1 -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION=1 $(X86_FLAGS) $(ARM_FLAGS)
139137

140138
if HOST_WINDOWS
141139
sqlite3shell_LDADD =

autoconf/Makefile.in

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,19 @@ sqlite_cfg.h: $(AS_AUTO_DEF)
117117
# CFLAGS for sqlite3$(T.exe)
118118
#
119119
SHELL_OPT ?= @OPT_SHELL@
120+
SHELL_OPT += -DSQLITE_DQS=0
121+
SHELL_OPT += -DSQLITE_ENABLE_FTS4
122+
#SHELL_OPT += -DSQLITE_ENABLE_FTS5
123+
SHELL_OPT += -DSQLITE_ENABLE_RTREE
124+
SHELL_OPT += -DSQLITE_ENABLE_EXPLAIN_COMMENTS
125+
SHELL_OPT += -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
126+
SHELL_OPT += -DSQLITE_ENABLE_STMTVTAB
127+
SHELL_OPT += -DSQLITE_ENABLE_DBPAGE_VTAB
128+
SHELL_OPT += -DSQLITE_ENABLE_DBSTAT_VTAB
129+
SHELL_OPT += -DSQLITE_ENABLE_BYTECODE_VTAB
130+
SHELL_OPT += -DSQLITE_ENABLE_OFFSET_SQL_FUNC
131+
SHELL_OPT += -DSQLITE_ENABLE_PERCENTILE
132+
SHELL_OPT += -DSQLITE_STRICT_SUBTYPE=1
120133

121134
#
122135
# Library-level feature flags
@@ -222,9 +235,12 @@ install: install-lib
222235
# Flags to link the shell app either directly against sqlite3.c
223236
# (ENABLE_STATIC_SHELL==1) or libsqlite3.so (ENABLE_STATIC_SHELL==0).
224237
#
238+
# Maintenance reminder: placement of $(LDFLAGS) is more relevant for
239+
# some platforms than others:
240+
# https://sqlite.org/forum/forumpost/d80ecdaddd
225241
ENABLE_STATIC_SHELL = @ENABLE_STATIC_SHELL@
226-
sqlite3-shell-link-flags.1 = $(TOP)/sqlite3.c $(LDFLAGS.libsqlite3)
227-
sqlite3-shell-link-flags.0 = -L. -lsqlite3mc $(LDFLAGS.zlib) $(LDFLAGS.math)
242+
sqlite3-shell-link-flags.1 = $(TOP)/sqlite3.c $(LDFLAGS) $(LDFLAGS.libsqlite3)
243+
sqlite3-shell-link-flags.0 = $(LDFLAGS) -L. -lsqlite3mc $(LDFLAGS.zlib) $(LDFLAGS.math)
228244
sqlite3-shell-deps.1 = $(TOP)/sqlite3.c
229245
sqlite3-shell-deps.0 = $(libsqlite3.DLL)
230246
#
@@ -245,14 +261,14 @@ sqlite3mc$(T.exe): $(TOP)/shell.c $(sqlite3-shell-deps.$(ENABLE_STATIC_SHELL))
245261
$(sqlite3-shell-static.flags.$(STATIC_CLI_SHELL)) \
246262
-I. $(OPT_FEATURE_FLAGS) $(SHELL_OPT) \
247263
$(CFLAGS) $(CFLAGS.readline) $(CFLAGS.icu) \
248-
$(LDFLAGS) $(LDFLAGS.readline)
264+
$(LDFLAGS.readline)
249265

250266
sqlite3mc$(T.exe)-1:
251267
sqlite3mc$(T.exe)-0: sqlite3mc$(T.exe)
252268
all: sqlite3mc$(T.exe)-$(HAVE_WASI_SDK)
253269

254270
install-shell-0: sqlite3mc$(T.exe) $(install-dir.bin)
255-
$(INSTALL) sqlitemc3$(T.exe) "$(install-dir.bin)"
271+
$(INSTALL) sqlite3mc$(T.exe) "$(install-dir.bin)"
256272
install-shell-1:
257273
install: install-shell-$(HAVE_WASI_SDK)
258274

autoconf/Makefile.msc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_STMTVTAB=1
327327
OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_DBPAGE_VTAB=1
328328
OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_DBSTAT_VTAB=1
329329
OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_BYTECODE_VTAB=1
330+
OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_CARRAY=1
330331
!ENDIF
331332
OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_COLUMN_METADATA=1
332333
!ENDIF
@@ -349,6 +350,7 @@ OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_PREUPDATE_HOOK=1
349350

350351
# Always enable math functions on Windows
351352
OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_MATH_FUNCTIONS
353+
OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_PERCENTILE
352354

353355
# Should the rbu extension be enabled? If so, add compilation options
354356
# to enable it.
@@ -1015,6 +1017,7 @@ SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_DQS=0
10151017
SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_FTS4=1
10161018
SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS=1
10171019
SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_OFFSET_SQL_FUNC=1
1020+
SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_PERCENTILE=1
10181021
SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION=1
10191022
SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_STMT_SCANSTATUS=1
10201023
SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_STRICT_SUBTYPE=1

autoconf/README.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
August 1, 2025
2-
==============
1+
November 6, 2025
2+
================
33

44
This package contains an experimental variant for "SQLite3 Multiple
55
Ciphers" of the original C source amalgamation package including a

autoconf/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.2.4
1+
2.2.5

autoconf/autosetup/README.md

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -72,75 +72,75 @@ in ./autosetup](/dir/autosetup).
7272

7373
In (mostly) alphabetical order:
7474

75-
- **`file-isexec filename`**\
75+
- **`file-isexec filename`**\
7676
Should be used in place of `[file executable]`, as it will also
7777
check for `${filename}.exe` on Windows platforms. However, on such
7878
platforms it also assumes that _any_ existing file is executable.
7979

80-
- **`get-env VAR ?default?`**\
80+
- **`get-env VAR ?default?`**\
8181
Will fetch an "environment variable" from the first of either: (1) a
8282
KEY=VALUE passed to the configure script or (2) the system's
8383
environment variables. Not to be confused with `getenv`, which only
8484
does the latter and is rarely, if ever, useful in this tree.
85-
- **`proj-get-env VAR ?default?`**\
85+
- **`proj-get-env VAR ?default?`**\
8686
Works like `get-env` but will, if that function finds no match,
8787
look for a file named `./.env-$VAR` and, if found, return its
8888
trimmed contents. This can be used, e.g., to set a developer's
89-
local preferences for the default `CFLAGS`.\
89+
local preferences for the default `CFLAGS`.\
9090
Tip: adding `-O0` to `.env-CFLAGS` reduces rebuild times
9191
considerably at the cost of performance in `make devtest` and the
9292
like.
9393

94-
- **`proj-fatal msg`**\
94+
- **`proj-fatal msg`**\
9595
Emits `$msg` to stderr and exits with non-zero. Its differences from
9696
autosetup's `user-error` are purely cosmetic.
9797

98-
- **`proj-if-opt-truthy flag thenScript ?elseScript?`**\
98+
- **`proj-if-opt-truthy flag thenScript ?elseScript?`**\
9999
Evals `thenScript` if the given `--flag` is truthy, else it
100100
evals the optional `elseScript`.
101101

102-
- **`proj-indented-notice ?-error? ?-notice? msg`**\
102+
- **`proj-indented-notice ?-error? ?-notice? msg`**\
103103
Breaks its `msg` argument into lines, trims them, and emits them
104104
with consistent indentation. Exactly how it emits depends on the
105105
flags passed to it (or not), as covered in its docs. This will stick
106106
out starkly from normal output and is intended to be used only for
107107
important notices.
108108

109-
- **`proj-opt-truthy flag`**\
109+
- **`proj-opt-truthy flag`**\
110110
Returns 1 if `--flag`'s value is "truthy," i.e. one of (1, on,
111111
enabled, yes, true).
112112

113-
- **`proj-opt-was-provided FLAG`**\
113+
- **`proj-opt-was-provided FLAG`**\
114114
Returns 1 if `--FLAG` was explicitly provided to configure,
115115
else 0. This distinction can be used to determine, e.g., whether
116116
`--with-readline` was provided or whether we're searching for
117117
readline by default. In the former case, failure to find it should
118-
be treated as fatal, where in the latter case it's not.\
118+
be treated as fatal, where in the latter case it's not.\
119119
Unlike most functions which deal with `--flags`, this one does not
120120
validate that `$FLAG` is a registered flag so will not fail fatally
121121
if `$FLAG` is not registered as an Autosetup option.
122122

123-
- **`proj-val-truthy value`**\
123+
- **`proj-val-truthy value`**\
124124
Returns 1 if `$value` is "truthy," See `proj-opt-truthy` for the definition
125125
of "truthy."
126126

127-
- **`proj-warn msg`**\
127+
- **`proj-warn msg`**\
128128
Emits `$msg` to stderr. Closely-related is autosetup's `user-notice`
129129
(described below).
130130

131-
- **`sqlite-add-feature-flag ?-shell? FLAG...`**\
131+
- **`sqlite-add-feature-flag ?-shell? FLAG...`**\
132132
Adds the given feature flag to the CFLAGS which are specific to
133133
building libsqlite3. It's intended to be passed one or more
134134
`-DSQLITE_ENABLE_...`, or similar, flags. If the `-shell` flag is
135135
used then it also passes its arguments to
136136
`sqlite-add-shell-opt`. This is a no-op if `FLAG` is not provided or
137137
is empty.
138138

139-
- **`sqlite-add-shell-opt FLAG...`**\
139+
- **`sqlite-add-shell-opt FLAG...`**\
140140
The shell-specific counterpart of `sqlite-add-feature-flag` which
141141
only adds the given flag(s) to the CLI-shell-specific CFLAGS.
142142

143-
- **`sqlite-configure BUILD-NAME {script}`**\
143+
- **`sqlite-configure BUILD-NAME {script}`**\
144144
This is where all configure `--flags` are defined for all known
145145
build modes ("canonical" or "autoconf"). After processing all flags,
146146
this function runs `$script`, which contains the build-mode-specific
@@ -149,7 +149,7 @@ In (mostly) alphabetical order:
149149
exactly two commands:
150150
`use sqlite-config; sqlite-configure BUILD-NAME {script}`
151151

152-
- **`user-notice msg`**\
152+
- **`user-notice msg`**\
153153
Queues `$msg` to be sent to stderr, but does not emit it until
154154
either `show-notices` is called or the next time autosetup would
155155
output something (it internally calls `show-notices`). This can be
@@ -196,8 +196,8 @@ compatibility across TCL implementations:
196196
case, the configure process will fall back to building the in-tree
197197
copy of JimTCL.
198198

199-
2. Manually build `./jimsh0` in the top of the checkout with:\
200-
`cc -o jimsh0 autosetup/jimsh0.c`\
199+
2. Manually build `./jimsh0` in the top of the checkout with:\
200+
`cc -o jimsh0 autosetup/jimsh0.c`\
201201
With that in place, the configure script will prefer to use that
202202
before looking for a system-level `tclsh`. Be aware, though, that
203203
`make distclean` will remove that file.
@@ -300,7 +300,7 @@ that approach include:
300300
maintainer.
301301
- It can force the maintainers of the configure script to place tests
302302
in a specific order so that the resulting flags get applied at
303-
the correct time and/or in the correct order.\
303+
the correct time and/or in the correct order.\
304304
(A real-life example: before the approach described below was taken
305305
to collecting build-time flags, the test for `-rpath` had to come
306306
_after_ the test for zlib because the results of the `-rpath` test
@@ -380,8 +380,9 @@ and its own special handling of `--enable-...` flags makes `--debug`
380380
an alias for `--enable-debug`. As this project has a long history of
381381
using `--enable-debug`, we patch autosetup to use the name
382382
`--autosetup-debug` in place of `--debug`. That requires (as of this
383-
writing) four small edits in [](/file/autosetup/autosetup), as
384-
demonstrated in [check-in 3296c8d3](/info/3296c8d3).
383+
writing) four small edits in
384+
[/autosetup/autosetup](/file/autosetup/autosetup), as demonstrated in
385+
[check-in 3296c8d3](/info/3296c8d3).
385386

386387
If autosetup is upgraded and this patch is _not_ applied the invoking
387388
`./configure` will fail loudly because of the declaration of the
@@ -426,7 +427,7 @@ proc sqlite-custom-flags {} {
426427
```
427428

428429
That function must return either an empty string or a list in the form
429-
used internally by `sqlite-config.tcl:sqlite-configure`.
430+
used internally by [sqlite-config.tcl][]'s `sqlite-configure`.
430431

431432
Next, define:
432433

autoconf/autosetup/autosetup

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,8 @@ proc options-add {opts} {
406406
# Find the corresponding value in the user options
407407
# and set the default if necessary
408408
if {[string match "-*" $opt]} {
409-
# This is a documentation-only option, like "-C <dir>"
410-
set opthelp $opt
409+
# We no longer support documentation-only options, like "-C <dir>"
410+
autosetup-error "Option $opt is not supported"
411411
} elseif {$colon eq ""} {
412412
# Boolean option
413413
lappend autosetup(options) $name
@@ -1611,7 +1611,7 @@ proc autosetup_output_block {type lines} {
16111611
# Generate a command reference from inline documentation
16121612
proc automf_command_reference {} {
16131613
lappend files $::autosetup(prog)
1614-
lappend files {*}[lsort [glob -nocomplain $::autosetup(libdir)/*.tcl]]
1614+
lappend files {*}[lsort [glob -nocomplain $::autosetup(libdir)/{*/*.tcl,*.tcl}]]
16151615
16161616
# We want to process all non-module files before module files
16171617
# and then modules in alphabetical order.
@@ -2124,7 +2124,7 @@ if {$autosetup(istcl)} {
21242124
set frame [info frame -$i]
21252125
if {[dict exists $frame file]} {
21262126
# We don't need proc, so use ""
2127-
lappend stacktrace "" [dict get $frame file] [dict get $frame line]
2127+
lappend stacktrace "" [dict get $frame file] [dict get $frame line] ""
21282128
}
21292129
}
21302130
return $stacktrace
@@ -2181,8 +2181,12 @@ proc error-location {msg} {
21812181
if {$::autosetup(debug)} {
21822182
return -code error $msg
21832183
}
2184-
# Search back through the stack trace for the first error in a .def file
2185-
foreach {p f l} [stacktrace] {
2184+
set vars {p f l cmd}
2185+
if {!$::autosetup(istcl) && ![dict exists $::tcl_platform stackFormat]} {
2186+
# Older versions of Jim had a 3 element stacktrace
2187+
set vars {p f l}
2188+
}
2189+
foreach $vars [stacktrace] {
21862190
if {[string match *.def $f]} {
21872191
return "[relative-path $f]:$l: Error: $msg"
21882192
}
@@ -2534,7 +2538,7 @@ if {[catch {main $argv} msg opts] == 1} {
25342538
show-notices
25352539
autosetup-full-error [error-dump $msg $opts $autosetup(debug)]
25362540
if {!$autosetup(debug)} {
2537-
puts stderr "Try: '[file tail $autosetup(exe)] --autosetup-debug' for a full stack trace"
2541+
puts stderr "Try: '[file tail $autosetup(exe)] --debug' for a full stack trace"
25382542
}
25392543
exit 1
25402544
}

0 commit comments

Comments
 (0)