Skip to content

Commit

Permalink
chg version to 2.1.4-pre. chg gen_providers to turn on load_extension…
Browse files Browse the repository at this point in the history
… for other provider configurations, likely to help with #532
  • Loading branch information
ericsink committed Jan 5, 2023
1 parent 387be6f commit e3bc45e
Show file tree
Hide file tree
Showing 13 changed files with 100 additions and 26 deletions.
6 changes: 3 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<Copyright>Copyright 2014-2022 SourceGear, LLC</Copyright>
<Company>SourceGear</Company>
<Authors>Eric Sink</Authors>
<Version>2.1.2</Version>
<AssemblyVersion>2.1.2.1721</AssemblyVersion>
<FileVersion>2.1.2.1721</FileVersion>
<Version>2.1.4-pre20230105143845</Version>
<AssemblyVersion>2.1.4.1830</AssemblyVersion>
<FileVersion>2.1.4.1830</FileVersion>
<Description>SQLitePCLRaw is a Portable Class Library (PCL) for low-level (raw) access to SQLite</Description>
<ProviderLangVersion>10.0</ProviderLangVersion>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
Expand Down
8 changes: 4 additions & 4 deletions gen_providers/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ let main argv =
for s in ["e_sqlite3"; "sqlite3"; ] do
gen_provider s s (Some subname_prenet5_win) "Cdecl" "dllimport" "FEATURE_WIN32DIR/true" "FEATURE_FUNCPTRS/false" "FEATURE_KEY/false" "FEATURE_LOADEXTENSION/false"
gen_provider s s (Some subname_prenet5_notwin) "Cdecl" "dllimport" "FEATURE_WIN32DIR/false" "FEATURE_FUNCPTRS/false" "FEATURE_KEY/false" "FEATURE_LOADEXTENSION/false"
gen_provider s s (Some subname_funcptrs_win) "Cdecl" "dllimport" "FEATURE_WIN32DIR/true" "FEATURE_FUNCPTRS/callingconv" "FEATURE_KEY/false" "FEATURE_LOADEXTENSION/false"
gen_provider s s (Some subname_funcptrs_notwin) "Cdecl" "dllimport" "FEATURE_WIN32DIR/false" "FEATURE_FUNCPTRS/plain" "FEATURE_KEY/false" "FEATURE_LOADEXTENSION/false"
gen_provider s s (Some subname_funcptrs_win) "Cdecl" "dllimport" "FEATURE_WIN32DIR/true" "FEATURE_FUNCPTRS/callingconv" "FEATURE_KEY/false" "FEATURE_LOADEXTENSION/true"
gen_provider s s (Some subname_funcptrs_notwin) "Cdecl" "dllimport" "FEATURE_WIN32DIR/false" "FEATURE_FUNCPTRS/plain" "FEATURE_KEY/false" "FEATURE_LOADEXTENSION/true"

for s in ["e_sqlcipher"; "sqlcipher"; ] do
gen_provider s s (Some subname_prenet5_win) "Cdecl" "dllimport" "FEATURE_WIN32DIR/true" "FEATURE_FUNCPTRS/false" "FEATURE_KEY/true" "FEATURE_LOADEXTENSION/false"
gen_provider s s (Some subname_prenet5_notwin) "Cdecl" "dllimport" "FEATURE_WIN32DIR/false" "FEATURE_FUNCPTRS/false" "FEATURE_KEY/true" "FEATURE_LOADEXTENSION/false"
gen_provider s s (Some subname_funcptrs_win) "Cdecl" "dllimport" "FEATURE_WIN32DIR/true" "FEATURE_FUNCPTRS/callingconv" "FEATURE_KEY/true" "FEATURE_LOADEXTENSION/false"
gen_provider s s (Some subname_funcptrs_notwin) "Cdecl" "dllimport" "FEATURE_WIN32DIR/false" "FEATURE_FUNCPTRS/plain" "FEATURE_KEY/true" "FEATURE_LOADEXTENSION/false"
gen_provider s s (Some subname_funcptrs_win) "Cdecl" "dllimport" "FEATURE_WIN32DIR/true" "FEATURE_FUNCPTRS/callingconv" "FEATURE_KEY/true" "FEATURE_LOADEXTENSION/true"
gen_provider s s (Some subname_funcptrs_notwin) "Cdecl" "dllimport" "FEATURE_WIN32DIR/false" "FEATURE_FUNCPTRS/plain" "FEATURE_KEY/true" "FEATURE_LOADEXTENSION/true"

0 // return an integer exit code

Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
<file src="$cb_bin_path$\e_sqlcipher\linux\musl-arm64\libe_sqlcipher.so" target="runtimes\alpine-arm64\native\libe_sqlcipher.so" />
<file src="$cb_bin_path$\e_sqlcipher\linux\mips64\libe_sqlcipher.so" target="runtimes\linux-mips64\native\libe_sqlcipher.so" />
<file src="$cb_bin_path$\e_sqlcipher\linux\s390x\libe_sqlcipher.so" target="runtimes\linux-s390x\native\libe_sqlcipher.so" />
<file src="$cb_bin_path$\e_sqlcipher\linux\ppc64le\libe_sqlcipher.so" target="runtimes\linux-ppc64le\native\libe_sqlcipher.so" />
<file src="$cb_bin_path$\e_sqlcipher\wasm\net6.0\e_sqlcipher.a" target="runtimes\browser-wasm\nativeassets\net6.0\e_sqlcipher.a" />
<file src="$cb_bin_path$\e_sqlcipher\wasm\net7.0\e_sqlcipher.a" target="runtimes\browser-wasm\nativeassets\net7.0\e_sqlcipher.a" />
<file src=".\net461\SQLitePCLRaw.lib.e_sqlcipher.targets" target="buildTransitive\net461" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
<file src="$cb_bin_path$\e_sqlite3\linux\musl-arm64\libe_sqlite3.so" target="runtimes\alpine-arm64\native\libe_sqlite3.so" />
<file src="$cb_bin_path$\e_sqlite3\linux\mips64\libe_sqlite3.so" target="runtimes\linux-mips64\native\libe_sqlite3.so" />
<file src="$cb_bin_path$\e_sqlite3\linux\s390x\libe_sqlite3.so" target="runtimes\linux-s390x\native\libe_sqlite3.so" />
<file src="$cb_bin_path$\e_sqlite3\linux\ppc64le\libe_sqlite3.so" target="runtimes\linux-ppc64le\native\libe_sqlite3.so" />
<file src="$cb_bin_path$\e_sqlite3\wasm\net6.0\e_sqlite3.a" target="runtimes\browser-wasm\nativeassets\net6.0\e_sqlite3.a" />
<file src="$cb_bin_path$\e_sqlite3\wasm\net7.0\e_sqlite3.a" target="runtimes\browser-wasm\nativeassets\net7.0\e_sqlite3.a" />
<file src=".\net461\SQLitePCLRaw.lib.e_sqlite3.targets" target="buildTransitive\net461" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -587,8 +587,14 @@ int ISQLite3Provider.sqlite3_enable_load_extension(sqlite3 db, int onoff)

unsafe int ISQLite3Provider.sqlite3_load_extension(sqlite3 db, utf8z zFile, utf8z zProc, out utf8z pzErrMsg)
{
pzErrMsg = utf8z.FromPtr(null);
return raw.SQLITE_ERROR;
fixed (byte* p_zFile = zFile, p_zProc = zProc)
{
var rc = NativeMethods.sqlite3_load_extension(
db, p_zFile, p_zProc,
out var p_zErrMsg);
pzErrMsg = utf8z.FromPtr(p_zErrMsg);
return rc;
}
}


Expand Down Expand Up @@ -1589,6 +1595,9 @@ static class NativeMethods
[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
public static extern unsafe int sqlite3_enable_load_extension(sqlite3 db, int enable);

[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
public static extern unsafe int sqlite3_load_extension(sqlite3 db, byte* zFile, byte* zProc, out byte* pzErrMsg);

[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
public static extern unsafe int sqlite3_limit(sqlite3 db, int id, int newVal);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -591,8 +591,14 @@ int ISQLite3Provider.sqlite3_enable_load_extension(sqlite3 db, int onoff)

unsafe int ISQLite3Provider.sqlite3_load_extension(sqlite3 db, utf8z zFile, utf8z zProc, out utf8z pzErrMsg)
{
pzErrMsg = utf8z.FromPtr(null);
return raw.SQLITE_ERROR;
fixed (byte* p_zFile = zFile, p_zProc = zProc)
{
var rc = NativeMethods.sqlite3_load_extension(
db, p_zFile, p_zProc,
out var p_zErrMsg);
pzErrMsg = utf8z.FromPtr(p_zErrMsg);
return rc;
}
}


Expand Down Expand Up @@ -1593,6 +1599,9 @@ static class NativeMethods
[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
public static extern unsafe int sqlite3_enable_load_extension(sqlite3 db, int enable);

[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
public static extern unsafe int sqlite3_load_extension(sqlite3 db, byte* zFile, byte* zProc, out byte* pzErrMsg);

[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
public static extern unsafe int sqlite3_limit(sqlite3 db, int id, int newVal);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -575,8 +575,14 @@ int ISQLite3Provider.sqlite3_enable_load_extension(sqlite3 db, int onoff)

unsafe int ISQLite3Provider.sqlite3_load_extension(sqlite3 db, utf8z zFile, utf8z zProc, out utf8z pzErrMsg)
{
pzErrMsg = utf8z.FromPtr(null);
return raw.SQLITE_ERROR;
fixed (byte* p_zFile = zFile, p_zProc = zProc)
{
var rc = NativeMethods.sqlite3_load_extension(
db, p_zFile, p_zProc,
out var p_zErrMsg);
pzErrMsg = utf8z.FromPtr(p_zErrMsg);
return rc;
}
}


Expand Down Expand Up @@ -1577,6 +1583,9 @@ static class NativeMethods
[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
public static extern unsafe int sqlite3_enable_load_extension(sqlite3 db, int enable);

[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
public static extern unsafe int sqlite3_load_extension(sqlite3 db, byte* zFile, byte* zProc, out byte* pzErrMsg);

[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
public static extern unsafe int sqlite3_limit(sqlite3 db, int id, int newVal);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -579,8 +579,14 @@ int ISQLite3Provider.sqlite3_enable_load_extension(sqlite3 db, int onoff)

unsafe int ISQLite3Provider.sqlite3_load_extension(sqlite3 db, utf8z zFile, utf8z zProc, out utf8z pzErrMsg)
{
pzErrMsg = utf8z.FromPtr(null);
return raw.SQLITE_ERROR;
fixed (byte* p_zFile = zFile, p_zProc = zProc)
{
var rc = NativeMethods.sqlite3_load_extension(
db, p_zFile, p_zProc,
out var p_zErrMsg);
pzErrMsg = utf8z.FromPtr(p_zErrMsg);
return rc;
}
}


Expand Down Expand Up @@ -1581,6 +1587,9 @@ static class NativeMethods
[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
public static extern unsafe int sqlite3_enable_load_extension(sqlite3 db, int enable);

[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
public static extern unsafe int sqlite3_load_extension(sqlite3 db, byte* zFile, byte* zProc, out byte* pzErrMsg);

[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
public static extern unsafe int sqlite3_limit(sqlite3 db, int id, int newVal);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -587,8 +587,14 @@ int ISQLite3Provider.sqlite3_enable_load_extension(sqlite3 db, int onoff)

unsafe int ISQLite3Provider.sqlite3_load_extension(sqlite3 db, utf8z zFile, utf8z zProc, out utf8z pzErrMsg)
{
pzErrMsg = utf8z.FromPtr(null);
return raw.SQLITE_ERROR;
fixed (byte* p_zFile = zFile, p_zProc = zProc)
{
var rc = NativeMethods.sqlite3_load_extension(
db, p_zFile, p_zProc,
out var p_zErrMsg);
pzErrMsg = utf8z.FromPtr(p_zErrMsg);
return rc;
}
}


Expand Down Expand Up @@ -1589,6 +1595,9 @@ static class NativeMethods
[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
public static extern unsafe int sqlite3_enable_load_extension(sqlite3 db, int enable);

[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
public static extern unsafe int sqlite3_load_extension(sqlite3 db, byte* zFile, byte* zProc, out byte* pzErrMsg);

[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
public static extern unsafe int sqlite3_limit(sqlite3 db, int id, int newVal);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -591,8 +591,14 @@ int ISQLite3Provider.sqlite3_enable_load_extension(sqlite3 db, int onoff)

unsafe int ISQLite3Provider.sqlite3_load_extension(sqlite3 db, utf8z zFile, utf8z zProc, out utf8z pzErrMsg)
{
pzErrMsg = utf8z.FromPtr(null);
return raw.SQLITE_ERROR;
fixed (byte* p_zFile = zFile, p_zProc = zProc)
{
var rc = NativeMethods.sqlite3_load_extension(
db, p_zFile, p_zProc,
out var p_zErrMsg);
pzErrMsg = utf8z.FromPtr(p_zErrMsg);
return rc;
}
}


Expand Down Expand Up @@ -1593,6 +1599,9 @@ static class NativeMethods
[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
public static extern unsafe int sqlite3_enable_load_extension(sqlite3 db, int enable);

[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
public static extern unsafe int sqlite3_load_extension(sqlite3 db, byte* zFile, byte* zProc, out byte* pzErrMsg);

[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
public static extern unsafe int sqlite3_limit(sqlite3 db, int id, int newVal);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -575,8 +575,14 @@ int ISQLite3Provider.sqlite3_enable_load_extension(sqlite3 db, int onoff)

unsafe int ISQLite3Provider.sqlite3_load_extension(sqlite3 db, utf8z zFile, utf8z zProc, out utf8z pzErrMsg)
{
pzErrMsg = utf8z.FromPtr(null);
return raw.SQLITE_ERROR;
fixed (byte* p_zFile = zFile, p_zProc = zProc)
{
var rc = NativeMethods.sqlite3_load_extension(
db, p_zFile, p_zProc,
out var p_zErrMsg);
pzErrMsg = utf8z.FromPtr(p_zErrMsg);
return rc;
}
}


Expand Down Expand Up @@ -1577,6 +1583,9 @@ static class NativeMethods
[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
public static extern unsafe int sqlite3_enable_load_extension(sqlite3 db, int enable);

[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
public static extern unsafe int sqlite3_load_extension(sqlite3 db, byte* zFile, byte* zProc, out byte* pzErrMsg);

[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
public static extern unsafe int sqlite3_limit(sqlite3 db, int id, int newVal);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -579,8 +579,14 @@ int ISQLite3Provider.sqlite3_enable_load_extension(sqlite3 db, int onoff)

unsafe int ISQLite3Provider.sqlite3_load_extension(sqlite3 db, utf8z zFile, utf8z zProc, out utf8z pzErrMsg)
{
pzErrMsg = utf8z.FromPtr(null);
return raw.SQLITE_ERROR;
fixed (byte* p_zFile = zFile, p_zProc = zProc)
{
var rc = NativeMethods.sqlite3_load_extension(
db, p_zFile, p_zProc,
out var p_zErrMsg);
pzErrMsg = utf8z.FromPtr(p_zErrMsg);
return rc;
}
}


Expand Down Expand Up @@ -1581,6 +1587,9 @@ static class NativeMethods
[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
public static extern unsafe int sqlite3_enable_load_extension(sqlite3 db, int enable);

[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
public static extern unsafe int sqlite3_load_extension(sqlite3 db, byte* zFile, byte* zProc, out byte* pzErrMsg);

[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
public static extern unsafe int sqlite3_limit(sqlite3 db, int id, int newVal);

Expand Down
6 changes: 3 additions & 3 deletions version_stamp/version_stamp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public static class gen

public const int MAJOR_VERSION = 2;
public const int MINOR_VERSION = 1;
public const int PATCH_VERSION = 3;
public const int PATCH_VERSION = 4;

// a version string with a -pre-timestamp in it
public static string NUSPEC_VERSION_PRE_TIMESTAMP = string.Format("{0}.{1}.{2}-pre{3}",
Expand All @@ -51,8 +51,8 @@ public static class gen
);

// keep one of the following 2:
//public static string NUSPEC_VERSION = NUSPEC_VERSION_PRE_TIMESTAMP;
public static string NUSPEC_VERSION = NUSPEC_VERSION_RELEASE;
public static string NUSPEC_VERSION = NUSPEC_VERSION_PRE_TIMESTAMP;
//public static string NUSPEC_VERSION = NUSPEC_VERSION_RELEASE;

// or maaaaybe this one, but probably not:
//public static string NUSPEC_VERSION = NUSPEC_VERSION_PRE;
Expand Down

0 comments on commit e3bc45e

Please sign in to comment.