Skip to content

Commit

Permalink
upgraded SQLite3 static version to latest 3.35.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnaud Bouchez committed Apr 3, 2021
1 parent 912052c commit c25f4f6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/core/mormot.core.os.pas
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ procedure GetProcessInfo(const aPidList: TCardinalDynArray;
// - see https://msdn.microsoft.com/en-us/library/ms995355
// - this function is Windows-only, could be slow, and you don't know which
// algorithm is really used on your system, so using our mormot.crypt.core.pas
// CryptDataForCurrentUser() is probably a better (and cross-platform) alternative
// CryptDataForCurrentUser() is probably a safer (and cross-platform) alternative
// - also note that DPAPI has been closely reverse engineered - see e.g.
// https://www.passcape.com/index.php?section=docsys&cmd=details&id=28
function CryptDataForCurrentUserDPAPI(const Data, AppSecret: RawByteString;
Expand Down
3 changes: 2 additions & 1 deletion src/db/mormot.db.raw.sqlite3.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1795,7 +1795,8 @@ TSqlite3Library = class
close: function(DB: TSqlite3DB): integer; cdecl;

/// Return the version of the SQLite database engine, in ascii format
// - currently returns '3.35.3', when used with our mormot.db.raw.sqlite3.static unit
// - currently returns '3.35.4', when used in conjunction with our
// mormot.db.raw.sqlite3.static unit
// - if an external SQLite3 library is used, version may vary
// - you may use the VersionText property (or Version for full details) instead
libversion: function: PUtf8Char; cdecl;
Expand Down
10 changes: 4 additions & 6 deletions src/db/mormot.db.raw.sqlite3.static.pas
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
{
*****************************************************************************
Statically linked SQLite3 3.35.3 engine with optional AES encryption
Statically linked SQLite3 3.35.4 engine with optional AES encryption
- TSqlite3LibraryStatic Implementation
- Encryption-Related Functions
Just include this unit in your uses clause, and the mormot.db.raw.sqlite3
sqlite3 global variable will be filled with linked .o/.obj API entries.
If the platform is not supported yet, fallback to a system .so is done.
If the platform is not supported yet, fallback loading a system library.
To patch and compile the official SQlite3 amalgamation file, follow the
instruction from the res/static/sqlite3 folder.
Expand Down Expand Up @@ -1022,10 +1022,8 @@ function sqlite3_trace_v2(DB: TSqlite3DB; Mask: integer; Callback: TSqlTraceCall
{ TSqlite3LibraryStatic }

const
// error message if statically linked sqlite3.o(bj) does not match this
// - Android version may be a little behind, so we are more releaxed here
EXPECTED_SQLITE3_VERSION =
{$ifdef OSANDROID} '3.34' {$else} '3.35.3' {$endif};
// error message if statically linked sqlite3.o(bj) does not match this value
EXPECTED_SQLITE3_VERSION = '3.35.4';

// where to download the latest available static binaries, including SQLite3
EXPECTED_STATIC_DOWNLOAD =
Expand Down
10 changes: 5 additions & 5 deletions src/net/mormot.net.sock.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1848,11 +1848,11 @@ procedure TCrtSocket.AcceptRequest(aClientSock: TNetSocket; aClientAddr: PNetAdd
function OutputSock(var F: TTextRec): integer;
begin
if F.BufPos = 0 then
result := 0
result := NO_ERROR
else if PCrtSocket(@F.UserData)^.TrySndLow(F.BufPtr, F.BufPos) then
begin
F.BufPos := 0;
result := 0;
result := NO_ERROR;
end
else
result := -1; // on socket error -> raise ioresult error
Expand Down Expand Up @@ -1889,7 +1889,7 @@ function InputSock(var F: TTextRec): integer;
begin
F.BufEnd := size;
inc(sock.fBytesIn, size);
result := 0; // no error
result := NO_ERROR;
end
else
begin
Expand All @@ -1911,7 +1911,7 @@ function CloseSock(var F: TTextRec): integer;
if PCrtSocket(@F.UserData)^ <> nil then
PCrtSocket(@F.UserData)^.Close;
PCrtSocket(@F.UserData)^ := nil;
result := 0;
result := NO_ERROR;
end;

function OpenSock(var F: TTextRec): integer;
Expand All @@ -1932,7 +1932,7 @@ function OpenSock(var F: TTextRec): integer;
F.FlushFunc := @OutputSock;
end;
F.CloseFunc := @CloseSock;
result := 0;
result := NO_ERROR;
end;

{$ifdef FPC}
Expand Down

0 comments on commit c25f4f6

Please sign in to comment.