Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ jobs:
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
with:
linux_build_command: "swift build"
linux_exclude_swift_versions: '[{"swift_version": "5.8"}]'
linux_exclude_swift_versions: '[{"swift_version": "5.8"}, {"swift_version": "5.9"}, {"swift_version": "5.10"}]'
windows_build_command: "swift build"
windows_exclude_swift_versions: '[{"swift_version": "5.9"}]'
macos_build_command: "xcrun swift build"
macos_exclude_xcode_versions: '[{"xcode_version": "16.0"}, {"xcode_version": "16.1"}]'
enable_macos_checks: true

soundness:
Expand Down
5 changes: 3 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version: 5.9
// swift-tools-version: 6.0
import PackageDescription

let package = Package(
Expand Down Expand Up @@ -29,7 +29,8 @@ let package = Package(
.linkedLibrary("wasi-emulated-signal", .when(platforms: [.wasi])),
.linkedLibrary("wasi-emulated-process-clocks", .when(platforms: [.wasi])),
.linkedLibrary("wasi-emulated-getpid", .when(platforms: [.wasi])),
.linkedLibrary("m", .when(platforms: [.linux])),
.linkedLibrary("m", .when(platforms: [.linux, .android])),
.linkedLibrary("pthread", .when(platforms: [.custom("freebsd")])),
]
),
.target(
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ The [SQLite Amalgamation](https://sqlite.org/amalgamation.html) from sqlite.org
This is intended as a common infrastructure package for components of the Swift toolchain which depend on SQLite.
It is not intended as a general-purpose SQLite package, nor does it aim to provide Swift wrapper APIs.

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


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

To be a truly great community, [Swift.org](https://swift.org/) needs to welcome
Expand Down
92 changes: 47 additions & 45 deletions Sources/CSQLite/include/sqlite3.h

Large diffs are not rendered by default.

289 changes: 188 additions & 101 deletions Sources/CSQLite/sqlite3.c

Large diffs are not rendered by default.

15 changes: 8 additions & 7 deletions Sources/sqlite/shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -8027,13 +8027,14 @@ SQLITE_EXTENSION_INIT1
# include <dirent.h>
# include <utime.h>
# include <sys/time.h>
# define STRUCT_STAT struct stat
#else
# include "windows.h"
# include <io.h>
# include <direct.h>
/* # include "test_windirent.h" */
# define dirent DIRENT
# define stat _stat
# define STRUCT_STAT struct _stat
# define chmod(path,mode) fileio_chmod(path,mode)
# define mkdir(path,mode) fileio_mkdir(path)
#endif
Expand Down Expand Up @@ -8224,7 +8225,7 @@ LPWSTR utf8_to_utf16(const char *z){
*/
static void statTimesToUtc(
const char *zPath,
struct stat *pStatBuf
STRUCT_STAT *pStatBuf
){
HANDLE hFindFile;
WIN32_FIND_DATAW fd;
Expand Down Expand Up @@ -8252,7 +8253,7 @@ static void statTimesToUtc(
*/
static int fileStat(
const char *zPath,
struct stat *pStatBuf
STRUCT_STAT *pStatBuf
){
#if defined(_WIN32)
sqlite3_int64 sz = strlen(zPath);
Expand All @@ -8276,7 +8277,7 @@ static int fileStat(
*/
static int fileLinkStat(
const char *zPath,
struct stat *pStatBuf
STRUCT_STAT *pStatBuf
){
#if defined(_WIN32)
return fileStat(zPath, pStatBuf);
Expand Down Expand Up @@ -8309,7 +8310,7 @@ static int makeDirectory(
int i = 1;

while( rc==SQLITE_OK ){
struct stat sStat;
STRUCT_STAT sStat;
int rc2;

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

struct stat sStat; /* Current lstat() results */
STRUCT_STAT sStat; /* Current lstat() results */
char *zPath; /* Path to current entry */
sqlite3_int64 iRowid; /* Current rowid */
};
Expand Down
2 changes: 1 addition & 1 deletion update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Update to the latest SQLite from sqlite.org

year=2025
version=3500000
version=3500200

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