Re: dfa MT-safe?

2019-12-15 Thread Norihiro Tanaka
On Sun, 15 Dec 2019 05:43:52 -0700 arn...@skeeve.com wrote: > Hi. > > Bruno Haible wrote: > > > > In any case, gawk's use of it is (and will remain) single-threaded. > > > It'd be nice if your fix did not pull in more libraries, like libpthread > > > or whatever, since that would considerably

duplocale: fix multithread-safety bug on AIX

2019-12-15 Thread Bruno Haible
The first application of the 'setlocale-null' module is to fix the duplocale() replacement. 2019-12-15 Bruno Haible duplocale: Fix multithread-safety bug on AIX. * lib/duplocale.c: Don't include . (rpl_duplocale): Invoke setlocale_null instead of setlocale. * m

new module 'setlocale-null'

2019-12-15 Thread Bruno Haible
It is the usual expectation that use of setlocale() to change the global locale is not multithread-safe (of course), but that setlocale(...,NULL) to query the name of the global locale is. However, POSIX does not guarantee it:

lock tests: skip test when no multithreading is enabled

2019-12-15 Thread Bruno Haible
On Minix 3.3, which has no multithreading, the test-lock reports: Skipping test: multithreading not enabled but the test-rwlock1 fails with Unexpected outcome 3 This patch fixes it. 2019-12-15 Bruno Haible lock tests: Skip test when no multithreading is enabled. * tests/t

dfa.c badly broken when dropped into gawk

2019-12-15 Thread Arnold Robbins
Hi. The current dfa.[ch] are badly broken when dropped into gawk. To reproduce: 1. Checkout the gawk repo 2. Copy gnulib/lib/dfa.[ch] into gawk/support/. 3. Apply the minimal patch below Then the usual `./bootstrap.sh && ./configure && make -j && make check'. You'll see lots of the tests blowin

Re: dfa MT-safe?

2019-12-15 Thread arnold
Hi. Bruno Haible wrote: > > In any case, gawk's use of it is (and will remain) single-threaded. > > It'd be nice if your fix did not pull in more libraries, like libpthread > > or whatever, since that would considerably complicate things for me, > > for no actual gain w.r.t. gawk. > > If you add

Re: dfa MT-safe?

2019-12-15 Thread Bruno Haible
Arnold Robbins wrote: > Paul Eggert wrote: > > Yes it is supposed to be. > > News to me. :) It's time that we start documenting the multithread-safety of the gnulib modules. Cf. [1] > In any case, gawk's use of it is (and will remain) single-threaded. > It'd be nice if your fix did not pull in

Re: dfa MT-safe?

2019-12-15 Thread arnold
On 12/14/19 3:43 AM, Bruno Haible wrote: > > If the 'dfa' module supposed to be multithread-safe? Paul Eggert wrote: > Yes it is supposed to be. News to me. In any case, gawk's use of it is (and will remain) single-threaded. It'd be nice if your fix did not pull in more libraries, like libpth

Re: bug#34951: [PATCH] grep: a kwset matcher not work in a grep matcher

2019-12-15 Thread arnold
OK. I skimmed the links. But why not write the code to say what we mean? For example: #include typedef int64_t dfa_size_t; extern void dfaparse (char const *, dfa_size_t, struct dfa *); extern void dfacomp (char const *, dfa_size_t, struct dfa *, bool);