# Makes the following environment changes:
#
# - defines LDFLAGS_DLOPEN to any linker flags needed for this
-# feature. It may legally be empty on some systems where dlopen()
-# is in libc.
+# feature. It may legally be empty on (A) some systems where
+# dlopen() is in libc and (B) certain Unix-esque Windows
+# environments which identify as Windows for SQLite's purposes so
+# use LoadLibrary().
#
# - If the feature is not available, adds
# -DSQLITE_OMIT_LOAD_EXTENSION=1 to the feature flags list.
proc sqlite-handle-load-extension {} {
define LDFLAGS_DLOPEN ""
set found 0
+ set suffix ""
proj-if-opt-truthy load-extension {
- set found [proj-check-function-in-lib dlopen dl]
- if {$found} {
- define LDFLAGS_DLOPEN [get-define lib_dlopen]
- undefine lib_dlopen
- } else {
- if {[proj-opt-was-provided load-extension]} {
- # Explicit --enable-load-extension: fail if not found
- proj-indented-notice -error {
- --enable-load-extension was provided but dlopen()
- not found. Use --disable-load-extension to bypass this
- check.
- }
- } else {
- # It was implicitly enabled: warn if not found
- proj-indented-notice {
- WARNING: dlopen() not found, so loadable module support will
- be disabled. Use --disable-load-extension to bypass this
- check.
+ switch -glob -- [get-define host] {
+ *-*-mingw* - *windows* {
+ incr found
+ set suffix "Using LoadLibrary()"
+ }
+ default {
+ set found [proj-check-function-in-lib dlopen dl]
+ if {$found} {
+ set suffix [define LDFLAGS_DLOPEN [get-define lib_dlopen]]
+ undefine lib_dlopen
+ } else {
+ if {[proj-opt-was-provided load-extension]} {
+ # Explicit --enable-load-extension: fail if not found
+ proj-indented-notice -error {
+ --enable-load-extension was provided but dlopen()
+ not found. Use --disable-load-extension to bypass this
+ check.
+ }
+ } else {
+ # It was implicitly enabled: warn if not found
+ proj-indented-notice {
+ WARNING: dlopen() not found, so loadable module support will
+ be disabled. Use --disable-load-extension to bypass this
+ check.
+ }
+ }
}
}
}
}
if {$found} {
- msg-result "Loadable extension support enabled."
+ msg-result "Loadable extension support enabled. $suffix"
} else {
msg-result "Disabling loadable extension support. Use --enable-load-extension to enable them."
sqlite-add-feature-flag -DSQLITE_OMIT_LOAD_EXTENSION=1
-C Do\snot\sallow\sthe\snumber\sof\sterms\sin\san\sORDER\sBY\sor\sGROUP\sBY\sclause\sto\nexceed\sthe\smaximum\snumber\sof\scolumns\sin\sa\stable.
-D 2025-08-06T19:12:10.640
+C Skip\schecking\sfor\sdlopen()\son\smingw\sbuilds\sand\sthose\swhich\sinclude\s"windows"\sin\stheir\shost\stuple,\sas\ssuggested\sin\s[forum:2436c8ffed\s|\sforum\spost\s2436c8ffed].\sThose\senvironments\sidentify\sas\sWindows\sfor\sSQLite's\spurposes\sso\suse\sLoadLibrary().
+D 2025-08-06T19:16:16.449
F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F autosetup/jimsh0.c 563b966c137a4ce3c9333e5196723b7ac0919140a9d7989eb440463cd855c367
F autosetup/pkg-config.tcl 4e635bf39022ff65e0d5434339dd41503ea48fc53822c9c5bde88b02d3d952ba
F autosetup/proj.tcl 7eaa83ccb6f5b250ee9192fa914918b0e2075edacf984c75fbf82cc2a6449c6c
-F autosetup/sqlite-config.tcl 3177dedd7bd49465fa06677fd743c4966eee5702a9ddf4914c2c1af5e5972a52
+F autosetup/sqlite-config.tcl abf71bdc45b136e9210034c8c8402d021cab5923b5d22e4773b24ee7e1f479b5
F autosetup/system.tcl 51d4be76cd9a9074704b584e5c9cbba616202c8468cf9ba8a4f8294a7ab1dba9
F autosetup/teaish/README.txt b40071e6f8506500a2f7f71d5fc69e0bf87b9d7678dd9da1e5b4d0acbf40b1ca
F autosetup/teaish/core.tcl aee092fc71986d1272b835ea7492bb55ffc213a289502e4f14da80cf67b7e3c3
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 1ad0169b022b280bcaaf94a7fa231591be96b514230ab5c98fbf15cd7df842dd
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P c41324139d6a75b0d37aeec2b0572c63207dd0b06e6a99e4fb221be564e73024
-R ff8fc7a0636f2891dad81ba7e07039e4
-U drh
-Z b671d1a9840887adc2a0dda22b668f5f
+P 139e587c7b349e771d67a8b4ee02ab3ad5d5712d4ff4713dad63cb765bdee248
+R f44e7a67bd7d5239b9cd4e9750d614fa
+U stephan
+Z 99b2123212db655321ffa585f244ece2
# Remove this line to create a well-formed Fossil manifest.