}
########################################################################
-# If --enable-thresafe is set, this adds -DSQLITE_THREADSAFE=1 to
+# If --enable-threadsafe is set, this adds -DSQLITE_THREADSAFE=1 to
# OPT_FEATURE_FLAGS and sets LDFLAGS_PTHREAD to the linker flags
-# needed for linking pthread. If --enable-threadsafe is not set, adds
-# -DSQLITE_THREADSAFE=0 to OPT_FEATURE_FLAGS and sets LDFLAGS_PTHREAD
-# to an empty string.
+# needed for linking pthread (possibly an empty string). If
+# --enable-threadsafe is not set, adds -DSQLITE_THREADSAFE=0 to
+# OPT_FEATURE_FLAGS and sets LDFLAGS_PTHREAD to an empty string.
proc sqlite-handle-threadsafe {} {
msg-checking "Support threadsafe operation? "
+ define LDFLAGS_PTHREAD ""
+ set enable 0
proj-if-opt-truthy threadsafe {
- msg-result yes
- sqlite-add-feature-flag -DSQLITE_THREADSAFE=1
- if {![proj-check-function-in-lib pthread_create pthread]
- || ![proj-check-function-in-lib pthread_mutexattr_init pthread]} {
- user-error "Missing required pthread bits"
+ if {[proj-check-function-in-lib pthread_create pthread]
+ && [proj-check-function-in-lib pthread_mutexattr_init pthread]} {
+ set enable 1
+ define LDFLAGS_PTHREAD [get-define lib_pthread_create]
+ undefine lib_pthread_create
+ undefine lib_pthread_mutexattr_init
+ } elseif {[proj-opt-was-provided threadsafe]} {
+ user-error "Missing required pthread libraries. Use --disable-threadsafe to disable this check."
}
- define LDFLAGS_PTHREAD [get-define lib_pthread_create]
- undefine lib_pthread_create
# Recall that LDFLAGS_PTHREAD might be empty even if pthreads if
# found because it's in -lc on some platforms.
} {
msg-result no
- sqlite-add-feature-flag -DSQLITE_THREADSAFE=0
- define LDFLAGS_PTHREAD ""
}
+ sqlite-add-feature-flag -DSQLITE_THREADSAFE=${enable}
+ return $enable
}
########################################################################
-C Simplify\sthe\s--help\sworkaround\sintroduced\sin\s[6a21d6a2ed].
-D 2025-02-14T17:52:57.730
+C Make\sfailure\sto\sfind\spthreads\ssupport\snon-fatal\sunless\s--enable-threadsafe\sis\sspecifically\spassed\sin.\sBuild\sregression\sreported\sin\s[8e0fdb8c0d].
+D 2025-02-14T18:06:28.632
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
F autosetup/jimsh0.c 6573f6bc6ff204de0139692648d7037ca0b6c067bac83a7b4e087f20a86866a4
F autosetup/pkg-config.tcl 4e635bf39022ff65e0d5434339dd41503ea48fc53822c9c5bde88b02d3d952ba
F autosetup/proj.tcl cef1e0aa0f2dee2042af66f28c97a9445f84d55d858ba9db4f6116846a1a325f
-F autosetup/sqlite-config.tcl 6a2f007f7c190a0077b99bd442d5bd41638f3d329c08a045653e096f21c9d16d
+F autosetup/sqlite-config.tcl 9d193c15975228021821cb3eed667491c6de340baf26d5b21a2ad861187d4936
F autosetup/system.tcl 51d4be76cd9a9074704b584e5c9cbba616202c8468cf9ba8a4f8294a7ab1dba9
F configure 9a00b21dfd13757bbfb8d89b30660a89ec1f8f3a79402b8f9f9b6fc475c3303a x
F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 6a21d6a2ed627ba0a864bef85369ed17553b808ae5c19891fa1f70505dfcbe39
-R ccbb8a55e81df7376a41b6d85d79a9b1
+P b0928f2043ed2a5d445c65f0d7271431e182f5a6fcd24ddcd57ea1cdcf4bbaa2
+R deb7bf34e9c57df9897124263106b638
U stephan
-Z 440d189d3f6211449eb539edd8ee3916
+Z 5ed369aff0b10c102cba383c3de65e06
# Remove this line to create a well-formed Fossil manifest.