Re: -Wvla vs dcnpgettext_expr's VLA decl

2011-12-04 Thread Simon Josefsson
Jim Meyering writes: > I can live with the status quo, but it would make -Wvla more useful > not to put such constructs in commonly-included header files. FWIW, I find these definitions from gettext.h are rarely needed, so unless you really need them, considering doing something like this: http

Re: manywarnings and -f options

2011-12-04 Thread Simon Josefsson
Jim Meyering writes: > Eric Blake wrote: >> On 12/03/2011 09:00 AM, Simon Josefsson wrote: >>> What does -funit-at-a-time really do? My gcc 4.4 manual says: >>> >>> `-funit-at-a-time' >>> This option is left for compatibility reasons. `-funit-at-a-time' >>> has no effect, while `-fno-u

Re: manywarnings and -f options

2011-12-04 Thread Simon Josefsson
Eric Blake writes: > On 12/03/2011 09:00 AM, Simon Josefsson wrote: >> What does -funit-at-a-time really do? My gcc 4.4 manual says: >> >> `-funit-at-a-time' >> This option is left for compatibility reasons. `-funit-at-a-time' >> has no effect, while `-fno-unit-at-a-time' implies >>

Re: manywarnings and -f options

2011-12-04 Thread Jim Meyering
Simon Josefsson wrote: > Jim Meyering writes: >> Eric Blake wrote: >>> On 12/03/2011 09:00 AM, Simon Josefsson wrote: What does -funit-at-a-time really do? My gcc 4.4 manual says: `-funit-at-a-time' This option is left for compatibility reasons. `-funit-at-a-time'

Re: -Wvla vs dcnpgettext_expr's VLA decl

2011-12-04 Thread Jim Meyering
Simon Josefsson wrote: > Jim Meyering writes: > >> I can live with the status quo, but it would make -Wvla more useful >> not to put such constructs in commonly-included header files. > > FWIW, I find these definitions from gettext.h are rarely needed, so > unless you really need them, considerin

mktemp: not found

2011-12-04 Thread Bruno Haible
Hi Jim, On Minix 3.1.8, I get this spurious output from the test-verify.sh test: mktemp: not found PASS: test-verify.sh This patch fixes it. OK to apply? 2011-12-04 Bruno Haible tests: Avoid spurious error message on platforms without mktemp program. * tests/init.sh (mk

Re: -Wvla vs dcnpgettext_expr's VLA decl

2011-12-04 Thread Bruno Haible
Jim Meyering wrote: > >> Do we have a guarantee that that array dimension is reasonable? > > > > Yes. While msgctxt and msgid normally rarely exceed 1 KB (because > > That sounds like convention. Is there a guarantee? No, there is no guarantee. It's the programmer's responsibility to pass only s

Re: [PATCH 2/4] Add a new sethostname module

2011-12-04 Thread Bruno Haible
Ben Walton wrote: > --- a/doc/glibc-functions/sethostname.texi > +++ b/doc/glibc-functions/sethostname.texi > @@ -2,18 +2,24 @@ > @subsection @code{sethostname} > @findex sethostname > > -Gnulib module: --- > +Gnulib module: sethostname > > Portability problems fixed by Gnulib: > @itemize >

Re: [PATCH 4/4] Add a test suite for the sethostname module

2011-12-04 Thread Bruno Haible
Ben Walton wrote: > Provide a module that tests the functionality of sethostname(). I have verified that the test 2 is skipped for non-root users and succeeds for root users on Linux/glibc 2.11, MacOS X 10.5, Solaris 11 2010-11, Minix 3.1.8, and that the hostname is correctly restored when the tes

Re: [PATCH 2/4] Add a new sethostname module

2011-12-04 Thread Ben Walton
Excerpts from Bruno Haible's message of Sat Dec 03 08:09:23 -0500 2011: Hi Bruno, > Thanks, I'm applying this for you. I trust that you will follow through > with the paperwork. Yes, I'll ensure that gets completed. > I'm applying a couple of followup tweaks. Thanks for the tweaks...sorry for

Re: [PATCH 4/4] Add a test suite for the sethostname module

2011-12-04 Thread Ben Walton
Excerpts from Bruno Haible's message of Sat Dec 03 08:50:37 -0500 2011: Hi Bruno, > > +#if !HAVE_GETEUID > > +# define geteuid() ((uid_t) -1) > > +#endif > > Wow! You have thought at many things. You did it better than if I had > written this test. I saw a similar trick somewhere else in gnulib

Re: [PATCH 4/4] Add a test suite for the sethostname module

2011-12-04 Thread Bruno Haible
Ben Walton wrote: > In one of the subsequent tweaks to this test, you restored a space > between the function name and the emtpy () at the call site for > geteuid. I realize I let some foo() slip through so it's > understandable that you were doing a bunch of corrections. Will this > not break th

Re: avoiding tabs in Emacs

2011-12-04 Thread Bruno Haible
Ben Walton wrote: > > Oops, that looks like a tab again. > > I did install a .dir-locals.el on one system and forgot to copy it to > other places where I was testing this. Would a .dir-locals.el (and > vim equivalent) file be something that might be included in the > project? Something that defi

Re: mktemp: not found

2011-12-04 Thread Jim Meyering
Bruno Haible wrote: > On Minix 3.1.8, I get this spurious output from the test-verify.sh test: > > mktemp: not found > PASS: test-verify.sh > > This patch fixes it. OK to apply? > > 2011-12-04 Bruno Haible > > tests: Avoid spurious error message on platforms without mktemp program. >

Re: mktemp: not found

2011-12-04 Thread Bruce Korb
On 12/04/11 11:57, Jim Meyering wrote: d=`unset TMPDIR; { mktemp -d -t -p "$destdir_" "$template_"; } 2>/dev/null` \ That should do the same without the cost of a sub-shell. Or: d=` exec 2>/dev/null unset TMPDIR mktemp -d -t -p "$destdir_" "$template_" ` as we discovered re

Re: mktemp: not found

2011-12-04 Thread Bruno Haible
Jim Meyering wrote: > How about using { ...; } instead? > > d=`unset TMPDIR; { mktemp -d -t -p "$destdir_" "$template_"; } 2>/dev/null` > \ > > That should do the same without the cost of a sub-shell. Yes, this works too. Applied, with this ChangeLog entry: 2011-12-04 Bruno Haible

Re: sethostname

2011-12-04 Thread Bruno Haible
Let me add support for sethostname() on Windows platforms. Unlike on Unix, the hostname change becomes effective (outside the Control Panel) only after a reboot. 2011-12-04 Bruno Haible sethostname: Port to Windows platforms. * lib/sethostname.c: Provide an alternate implement