Re: [PATCH 2/2] maint.mk: Replace grep with $(GREP)

2018-11-27 Thread Bruno Haible
Eric Blake wrote: > > In other words, can you guarantee that $(GREP) will never expand to empty? > > If we change gl_INIT() to AC_REQUIRE([AC_PROG_GREP]), then that should > be sufficient to ensure $(GREP) is set by the time Makefile is parsed, > which in turn will propagate to maint.mk. Yes.

Re: [PATCH 2/2] maint.mk: Replace grep with $(GREP)

2018-11-27 Thread Eric Blake
On 11/27/18 12:47 PM, Bruno Haible wrote: Yes. And (question to Roman): what the proper place to change, so that gl_INIT() contains AC_REQUIRE([AC_PROG_GREP]) ? Hint: The answer is contained in this part of the Gnulib documentation:

Re: [PATCH 1/2] maint.mk: Split long argument lists

2018-11-27 Thread Bruno Haible
Roman Bolshakov wrote: > if test -n "$$files"; then > \ > if test -n "$$prohibit"; then \ > - grep $$with_grep_options $(_ignore_case) -nE "$$prohibit" $$files \ > + echo "$$files" | xargs -n

Re: [PATCH 1/2] maint.mk: Split long argument lists

2018-11-27 Thread Bruno Haible
Hi, > The workaround is to split argument list into chunks that operating > system can process. "getconf ARG_MAX" is used to determine size of the > chunk. Two questions on this: 1) People say that 'getconf ARG_MAX' returns the appromixate number of bytes in a command line. [1] But you

Re: [PATCH 2/2] maint.mk: Replace grep with $(GREP)

2018-11-27 Thread Eric Blake
On 11/27/18 12:21 PM, Bruno Haible wrote: Roman Bolshakov wrote: Autoconf can discover an alias for GNU grep and set it in GREP but it takes no effect for maint.mk Does Automake always invoke this Autoconf macro which sets GREP? In other words, can you guarantee that $(GREP) will never

Re: [PATCH 2/2] maint.mk: Replace grep with $(GREP)

2018-11-27 Thread Bruno Haible
Roman Bolshakov wrote: > Autoconf can discover an alias for GNU > grep and set it in GREP but it takes no effect for maint.mk Does Automake always invoke this Autoconf macro which sets GREP? In other words, can you guarantee that $(GREP) will never expand to empty? Bruno

Re: A new module: bitset

2018-11-27 Thread Paul Eggert
On 11/26/18 8:15 PM, Akim Demaille wrote: The current implementation uses xmalloc, but there are also calls to calloc and realloc. How can it be right to combine xmalloc with calloc/realloc? Shouldn't the implementation use xmalloc, xcalloc, and xrealloc for consistency? Also, what about

Re: A new module: bitset

2018-11-27 Thread Akim Demaille
> Le 27 nov. 2018 à 21:31, Paul Eggert a écrit : > > On 11/26/18 8:15 PM, Akim Demaille wrote: >> The current implementation uses xmalloc, but there are also calls to calloc >> and realloc. > > How can it be right to combine xmalloc with calloc/realloc? I agree. > Shouldn't the

Re: A new module: bitset

2018-11-27 Thread Paul Eggert
Akim Demaille wrote: What do you propose? A simple, general solution is to use only malloc/calloc/realloc, and to have bitset functions fail when they exhaust memory.

Re: A new module: bitset

2018-11-27 Thread Akim Demaille
> Le 28 nov. 2018 à 06:03, Paul Eggert a écrit : > > Akim Demaille wrote: >> What do you propose? > > A simple, general solution is to use only malloc/calloc/realloc, and to have > bitset functions fail when they exhaust memory. Then I guess the current state does what you want. If you

gnupload: Support -h

2018-11-27 Thread Ben Elliston
The first time I ran gnupload, I used -h and got an error. ;-) This patch adds -h as an alias for --help. Cheers, Ben 2018-11-28 Ben Elliston * build-aux/gnupload: Support -h. diff --git a/build-aux/gnupload b/build-aux/gnupload index 37d7b6806..a2856fe6b 100755 ---

gnupload: fix Shellcheck warnings

2018-11-27 Thread Ben Elliston
This patch silences some warnings from Shellcheck, mostly about using POSIX $(..) command substitutions instead of old backtick substitutions. Cheers, Ben 2018-11-28 Ben Elliston * build-aux/gnupload: Fix some Shellcheck warnings. diff --git a/build-aux/gnupload b/build-aux/gnupload

[PATCH 0/2] Fix syntax-check on macOS/FreeBSD

2018-11-27 Thread Roman Bolshakov
Hello, There was an issue with syntax-check on FreeBSD reported a few years ago: https://www.redhat.com/archives/libvir-list/2015-August/msg00758.html http://lists.gnu.org/archive/html/bug-gnulib/2015-08/msg00019.html The patch series attempts to resolve the issue on gnulib side. With related

[PATCH 2/2] maint.mk: Replace grep with $(GREP)

2018-11-27 Thread Roman Bolshakov
A project that uses maint.mk can specify regular expressions that are not supported in system grep. Autoconf can discover an alias for GNU grep and set it in GREP but it takes no effect for maint.mk The patch provides an ability to use GNU grep if it was discovered by autoconf and by calling GNU

[PATCH 1/2] maint.mk: Split long argument lists

2018-11-27 Thread Roman Bolshakov
$(VC_LIST_EXCEPT) is usually expanded into arguments for a command. When a project contains too many, some operating systems can't pass all the arguments because they hit the limit of arguments. FreeBSD and macOS are known to have the limit of 256k of arguments. More on the issue: