Skip to content

Commit 7f46376

Browse files
committed
Update to sqlite 3.50.2
1 parent 1c16f72 commit 7f46376

File tree

7 files changed

+250
-157
lines changed

7 files changed

+250
-157
lines changed

.github/workflows/pull_request.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
linux_exclude_swift_versions: '[{"swift_version": "5.8"}]'
1414
windows_build_command: "swift build"
1515
macos_build_command: "xcrun swift build"
16+
macos_exclude_xcode_versions: '[{"xcode_version": "16.0"}, {"xcode_version": "16.1"}]'
1617
enable_macos_checks: true
1718

1819
soundness:

Package.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ let package = Package(
2929
.linkedLibrary("wasi-emulated-signal", .when(platforms: [.wasi])),
3030
.linkedLibrary("wasi-emulated-process-clocks", .when(platforms: [.wasi])),
3131
.linkedLibrary("wasi-emulated-getpid", .when(platforms: [.wasi])),
32-
.linkedLibrary("m", .when(platforms: [.linux])),
32+
.linkedLibrary("m", .when(platforms: [.linux, .android])),
33+
.linkedLibrary("pthread", .when(platforms: [.custom("freebsd")])),
3334
]
3435
),
3536
.target(

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ The [SQLite Amalgamation](https://sqlite.org/amalgamation.html) from sqlite.org
66
This is intended as a common infrastructure package for components of the Swift toolchain which depend on SQLite.
77
It is not intended as a general-purpose SQLite package, nor does it aim to provide Swift wrapper APIs.
88

9-
This package has been tested on macOS, iOS, tvOS, watchOS, visionOS, Mac Catalyst, Linux, Windows, and WebAssembly.
9+
This build of this package has been validated for macOS, iOS, tvOS, watchOS, visionOS, Mac Catalyst, Linux, Android, Windows, WebAssembly, and FreeBSD.
10+
On most platforms, the Swift toolchain uses a copy of SQLite provided by the platform SDK or package manager instead of this package.
1011

1112

1213
Contributing to /swift-toolchain-sqlite
@@ -19,7 +20,7 @@ Before submitting the pull request, please make sure you have [tested your
1920
changes](https://github.com/swiftlang/swift/blob/main/docs/ContinuousIntegration.md)
2021
and that they follow the Swift project [guidelines for contributing
2122
code](https://swift.org/contributing/#contributing-code). Bug reports should be
22-
filed in [the issue tracker](https://github.com/swiftlang/swift-toolchain-sqlite/issues) of
23+
filed in [the issue tracker](https://github.com/swiftlang/swift-toolchain-sqlite/issues) of
2324
`swift-toolchain-sqlite` repository on GitHub.
2425

2526
To be a truly great community, [Swift.org](https://swift.org/) needs to welcome

Sources/CSQLite/include/sqlite3.h

Lines changed: 47 additions & 45 deletions
Large diffs are not rendered by default.

Sources/CSQLite/sqlite3.c

Lines changed: 188 additions & 101 deletions
Large diffs are not rendered by default.

Sources/sqlite/shell.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8027,13 +8027,14 @@ SQLITE_EXTENSION_INIT1
80278027
# include <dirent.h>
80288028
# include <utime.h>
80298029
# include <sys/time.h>
8030+
# define STRUCT_STAT struct stat
80308031
#else
80318032
# include "windows.h"
80328033
# include <io.h>
80338034
# include <direct.h>
80348035
/* # include "test_windirent.h" */
80358036
# define dirent DIRENT
8036-
# define stat _stat
8037+
# define STRUCT_STAT struct _stat
80378038
# define chmod(path,mode) fileio_chmod(path,mode)
80388039
# define mkdir(path,mode) fileio_mkdir(path)
80398040
#endif
@@ -8224,7 +8225,7 @@ LPWSTR utf8_to_utf16(const char *z){
82248225
*/
82258226
static void statTimesToUtc(
82268227
const char *zPath,
8227-
struct stat *pStatBuf
8228+
STRUCT_STAT *pStatBuf
82288229
){
82298230
HANDLE hFindFile;
82308231
WIN32_FIND_DATAW fd;
@@ -8252,7 +8253,7 @@ static void statTimesToUtc(
82528253
*/
82538254
static int fileStat(
82548255
const char *zPath,
8255-
struct stat *pStatBuf
8256+
STRUCT_STAT *pStatBuf
82568257
){
82578258
#if defined(_WIN32)
82588259
sqlite3_int64 sz = strlen(zPath);
@@ -8276,7 +8277,7 @@ static int fileStat(
82768277
*/
82778278
static int fileLinkStat(
82788279
const char *zPath,
8279-
struct stat *pStatBuf
8280+
STRUCT_STAT *pStatBuf
82808281
){
82818282
#if defined(_WIN32)
82828283
return fileStat(zPath, pStatBuf);
@@ -8309,7 +8310,7 @@ static int makeDirectory(
83098310
int i = 1;
83108311

83118312
while( rc==SQLITE_OK ){
8312-
struct stat sStat;
8313+
STRUCT_STAT sStat;
83138314
int rc2;
83148315

83158316
for(; zCopy[i]!='/' && i<nCopy; i++);
@@ -8359,7 +8360,7 @@ static int writeFile(
83598360
** be an error though - if there is already a directory at the same
83608361
** path and either the permissions already match or can be changed
83618362
** to do so using chmod(), it is not an error. */
8362-
struct stat sStat;
8363+
STRUCT_STAT sStat;
83638364
if( errno!=EEXIST
83648365
|| 0!=fileStat(zFile, &sStat)
83658366
|| !S_ISDIR(sStat.st_mode)
@@ -8561,7 +8562,7 @@ struct fsdir_cursor {
85618562
const char *zBase;
85628563
int nBase;
85638564

8564-
struct stat sStat; /* Current lstat() results */
8565+
STRUCT_STAT sStat; /* Current lstat() results */
85658566
char *zPath; /* Path to current entry */
85668567
sqlite3_int64 iRowid; /* Current rowid */
85678568
};

update.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Update to the latest SQLite from sqlite.org
33

44
year=2025
5-
version=3500000
5+
version=3500200
66

77
scratch_dir=$(mktemp -d /tmp/XXXXXX)
88
curl -L -o "$scratch_dir/sqlite.zip" "https://sqlite.org/$year/sqlite-amalgamation-$version.zip"

0 commit comments

Comments
 (0)