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

2019-12-11 Thread arnold
arn...@skeeve.com wrote: > Other than this, I think internally too, I'd prefer that you > > 1,$s/ptrdiff_t/ssize_t/g I did this, just to see. gawk passes its test suite, both in 64- and 32-bit mode. FWIW. Thanks, Arnold

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

2019-12-11 Thread arnold
Hi Paul. Paul Eggert wrote: > https://lists.gnu.org/r/bug-gnulib/2019-12/msg00058.html > https://lists.gnu.org/r/bug-gnulib/2019-12/msg00059.html Looking at this: | @@ -1733,11 +1733,11 @@ add_utf8_anychar (struct dfa *dfa) | /* f0-f7: 4-byte sequence. */ | CHARCLASS_INIT (0, 0, 0,

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

2019-12-11 Thread arnold
Hi Paul. Paul Eggert wrote: > On 3/22/19 7:49 PM, Norihiro Tanaka wrote: > > Missing a patch for dfa. Re-send correct patch file. > > Thanks, I installed the DFA-relevant parts of your proposed fix into > Gnulib. (The grep parts still need doing.) I also installed the attached > commentary fo

Re: [PATCH 4/4] dfa: prefer signed integers for internals

2019-12-11 Thread Paul Eggert
On 12/11/19 5:21 PM, Bruno Haible wrote: Last time we were trying to find a good name for this typedef. How about typedef ptrdiff_t uptrdiff_t; "u" connotes "unsigned"; but "nonnegative but signed" is what is wanted here, and it is not the same thing. Some of the ptrdiff_t values in dfa.

test-stdalign failure on AIX

2019-12-11 Thread Bruno Haible
On the AIX 7.2 machine gcc119.fsffrance.org, with xlclang as compiler, the test-stdalign program fails: $ ./test-stdalign ../../gltests/test-stdalign.c:94: assertion '(uintptr_t) &(static_char_Alignas) % TEST_ALIGNMENT == 0' failed IOT/Abort trap (core dumped) This happens both in 32-bit mode a

Re: [PATCH] fsync: document AIX misbehavior

2019-12-11 Thread Bruno Haible
Paul Eggert wrote in : > +2015-06-06 Paul Eggert > + > + fsync: document AIX misbehavior > + * doc/posix-functions/fsync.texi (fsync): > + Document failure on AIX with read-only file descriptor. I'm still seeing fa

getaddrinfo: fix calling convention in 32-bit mode on native Windows

2019-12-11 Thread Bruno Haible
On mingw and MSVC 14, in 32-bit mode, I'm seeing these errors in a testdir build with C++ tests: depbase=`echo test-netdb-c++.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\ i686-w64-mingw32-g++ -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -I. -I../../gltests -I.. -DGNULIB_STRICT_CHECKING=1 -DIN_GNULIB_TESTS=1 -I.

Re: [PATCH 4/4] dfa: prefer signed integers for internals

2019-12-11 Thread Bruno Haible
Hi Paul, > Prefer a signed to an unsigned integer when calculating indexes, In the other mail you ask for objections: > I'd also like to change dfa.h's API to prefer ptrdiff_t to size_t, for > the same integer-overflow reason. This would be a (minor) API change so > I thought I'd ask first. An

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

2019-12-11 Thread Paul Eggert
On 3/22/19 7:49 PM, Norihiro Tanaka wrote: Missing a patch for dfa. Re-send correct patch file. Thanks, I installed the DFA-relevant parts of your proposed fix into Gnulib. (The grep parts still need doing.) I also installed the attached commentary followup. While I was at it I installed a

[PATCH 1/4] dfa: separate parse and compile phase

2019-12-11 Thread Paul Eggert
From: Norihiro Tanaka ‘dfamust’ must be called after parsing and before tokens are reordered, but both are executed in the compilation phase. Token reordering was introduced in Gnulib commit 2018-10-22T15:01:08Z!nori...@kcn.ne.jp (5c7a0371823876cca7a1347fa09ca26bbbff0c98). * lib/dfa.c (dfaparse):

[PATCH 4/4] dfa: prefer signed integers for internals

2019-12-11 Thread Paul Eggert
Signed integers can be checked more easily for integer overflow. * lib/dfa.c (position, struct lexer_state, struct parser_state) (struct dfa, mbs_to_wchar, fetch_wc, parse_bracket_exp) (struct lexptr, lex, addtok_mb, add_utf8_anychar, atom) (nsubtoks, copytoks, closure, alloc_position_set, delete)

[PATCH 3/4] dfa: fix index overflow

2019-12-11 Thread Paul Eggert
* lib/dfa.c (compare): Avoid integer overflow when analyzing very large regular expressions. --- ChangeLog | 4 lib/dfa.c | 9 ++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index bc912c771..80b4abc5b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1

[PATCH 2/4] dfa: update commentary for previous change

2019-12-11 Thread Paul Eggert
* NEWS: Mention the change. * lib/dfa.c, lib/dfa.h (dfaparse, dfamust, dfacomp): Update comments. --- ChangeLog | 6 ++ NEWS | 4 lib/dfa.c | 9 + lib/dfa.h | 14 -- 4 files changed, 23 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index f8

Re: announcing support for C++

2019-12-11 Thread Paul Eggert
Thanks for doing all that work!

unistd tests: fix link error on MSVC

2019-12-11 Thread Bruno Haible
2019-12-11 Bruno Haible unistd tests: Fix link error on MSVC. * modules/unistd-c++-tests (Makefile.am): Link test-unistd-c++ against $(LIB_GETLOGIN). diff --git a/modules/unistd-c++-tests b/modules/unistd-c++-tests index c1a9639..739382b 100644 --- a/modules/unistd-c++-

stddef: fix compilation error in C++ mode on MSVC

2019-12-11 Thread Bruno Haible
When building a testdir with C++ tests on MSVC 14, I see this error: source='../../gltests/test-stddef-c++2.cc' object='test-stddef-c++2.obj' libtool=no \ DEPDIR=.deps depmode=msvc7 /bin/sh ../../build-aux/depcomp \ /home/bruno/msvc/compile cl -nologo -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -I. -I../.

announcing support for C++

2019-12-11 Thread Bruno Haible
A testdir created with ./gnulib-tool --create-testdir --dir=../testdir1 --single-configure --with-c++-tests `./posix-modules` is now known to build fine on the following platforms: - glibc - musl libc - macOS 10.13 - FreeBSD 12 - NetBSD 7 - OpenBSD 6.5 - Solaris 10, 11.0, 11.4, Op

unistd: fix compilation error in C++ mode on MSVC

2019-12-11 Thread Bruno Haible
When building a testdir with C++ tests on MSVC 14, I see this error: source='../../gllib/faccessat.c' object='faccessat.obj' libtool=no \ DEPDIR=.deps depmode=msvc7 /bin/sh ../../build-aux/depcomp \ /home/bruno/msvc/compile cl -nologo -DHAVE_CONFIG_H -I. -I../../gllib -I.. -DGNULIB_STRICT_CHECKI

wchar: fix compilation error in C++ mode on MSVC

2019-12-11 Thread Bruno Haible
When building a testdir with C++ tests on MSVC 14, I see these errors: source='../../gltests/test-wchar-c++2.cc' object='test-wchar-c++2.obj' libtool=no \ DEPDIR=.deps depmode=msvc7 /bin/sh ../../build-aux/depcomp \ /home/bruno/msvc/compile cl -nologo -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -I. -I../.

locale: fix compilation error in C++ mode on MSVC

2019-12-11 Thread Bruno Haible
When building a testdir with C++ tests on MSVC 14, I see this error: source='../../gltests/test-wchar-c++3.cc' object='test-wchar-c++3.obj' libtool=no \ DEPDIR=.deps depmode=msvc7 /bin/sh ../../build-aux/depcomp \ /home/bruno/msvc/compile cl -nologo -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -I. -I../../

pthread-thread: fix compilation error in C++ mode on MSVC

2019-12-11 Thread Bruno Haible
When building a testdir with C++ tests on MSVC 14, I see this error: source='../../gltests/test-pthread-c++.cc' object='test-pthread-c++.obj' libtool=no \ DEPDIR=.deps depmode=msvc7 /bin/sh ../../build-aux/depcomp \ /home/bruno/msvc/compile cl -nologo -DHAVE_CONFIG_H -DEXEEXT=\".exe\" -I. -I../.