thread safe sqlite

2004-04-22 Thread Doug Henry
sqlite can be built to be thread safe.  In keeping with the current
with_threads standard, I have attached a patch that adds this
functionality to the sqlite.spec file.



*** sqlite.spec	Mon Mar  8 13:44:08 2004
--- /tmp/sqlite.spec.new	Thu Apr 22 08:54:15 2004
*** Release:  20040308
*** 40,45 
--- 40,46 
  %option   with_utf8no
  %option   with_assert  no
  %option   with_readlineno
+ %option   with_threads no
  
  #   list of sources
  Source0:  http://www.hwaci.com/sw/sqlite/sqlite-%{version}.tar.gz
*** AutoReqProv:  no
*** 98,103 
--- 99,107 
  config_TARGET_READLINE_LIBS=%{l_ldflags} -lreadline -ltermcap
  export config_TARGET_READLINE_LIBS
  %endif
+ %if %{with_threads} == yes
+ CFLAGS=$CFLAGS -DTHREADSAFE=1
+ %endif
  ./configure \
  --prefix=%{l_prefix} \
  %if %{with_utf8} == yes


Re: thread safe sqlite

2004-04-22 Thread Ralf S. Engelschall
On Thu, Apr 22, 2004, Doug Henry wrote:

 sqlite can be built to be thread safe.  In keeping with the current
 with_threads standard, I have attached a patch that adds this
 functionality to the sqlite.spec file.

But it then requires the Pthreads API and this is not always part of
the vendor libc. In this case the build will fail, because there is
no Autoconf check for -lpthread. So, a real Autoconf check would be
required. And especially, if a -lpthread is required this has to be told
to the applications using SQLite (perhaps via sqlite.pc). So, we still
cannot take over the patch as-is because it is not a portable enough
solution. OTOH, a portable solution (based on Autoconf check) certainly
will be certainly a lot more intrusive (because we either have to depend
on autoconf or include patches for the generated files) than your
current patch. H...

   Ralf S. Engelschall
   [EMAIL PROTECTED]
   www.engelschall.com

__
The OpenPKG Projectwww.openpkg.org
User Communication List  [EMAIL PROTECTED]