fix some link failures on MSVC

2012-02-24 Thread Bruno Haible
On MSVC 9, I reported these link errors: source='test-acosl.c' object='test-acosl.obj' libtool=no \ DEPDIR=.deps depmode=none /bin/sh ../build-aux/depcomp \ /home/bruno/msvc/compile cl -nologo -DHAVE_CONFIG_H -I. -I.. -DGNULIB_STRICT_CHECKING=1 -DIN_GNULIB_TESTS=1 -I. -I. -I.. -

[PATCH] stdalign: @samp -> @code in doc for consistency

2012-02-24 Thread Paul Eggert
--- doc/posix-headers/stdalign.texi |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/posix-headers/stdalign.texi b/doc/posix-headers/stdalign.texi index 62d5cbd..8e34673 100644 --- a/doc/posix-headers/stdalign.texi +++ b/doc/posix-headers/stdalign.texi @@ -50,8 +50,8

[PATCH] stdnoreturn: new module

2012-02-24 Thread Paul Eggert
This implements a replacement for C11's . * doc/gnulib.texi (Header File Substitutes): Add stdnoreturn. * doc/posix-headers/stdnoreturn.texi, lib/stdnoreturn.in.h: * m4/stdnoreturn.m4, modules/stdnoreturn, modules/stdnoreturn-tests: * tests/test-stdnoreturn.c: New files. --- ChangeLog

Re: [PATCH][TRY2] fix false multi-byte matches in some regular expressions

2012-02-24 Thread Paul Eggert
On 02/22/2012 12:39 PM, Roland McGrath wrote: > Surely you can debug sed and discern > the exact sequence of library calls it's making. That should be doable, yes, but it might be a lot of work and the patch is straightforward and appears correct. For now I installed the patch into gnulib, here:

[PATCH] regex: fix false multibyte matches in some regular expressions

2012-02-24 Thread Paul Eggert
See and . * lib/regex_internal.c (re_string_skip_chars): Fix miscomputation of remain_len that may cause incomplete multi-byte character and false match. --- ChangeLog|

Re: isatty relicense request

2012-02-24 Thread Bruno Haible
Eric Blake wrote: > libvirt would like to use it ... > Bruno and Marc-André are the only authors to lib/isatty.c Fine with me to put it under LGPLv2+. Bruno

isatty relicense request

2012-02-24 Thread Eric Blake
Right now, isatty is LGPLv3+; but libvirt would like to use it and would require it to be LGPLv2+. Any objection to relaxing the license? Bruno and Marc-André are the only authors to lib/isatty.c, and all other module dependencies are already LGPLv2+. -- Eric Blake ebl...@redhat.com+1-919

Re: prohibit_strcmp

2012-02-24 Thread Bruno Haible
Jim Meyering wrote: > > Akim suggests to rename STREQ in lib/streq.h; what name would you suggest? > > STREQ_ retains the name and look while adding only one to the length. > STREQ_opt is more descriptive, but longer I generally prefer the more descriptive names. So, committed as follows: 2012-

Re: prohibit_strcmp

2012-02-24 Thread Jim Meyering
Akim Demaille wrote: > Le 24 févr. 2012 à 10:08, Jim Meyering a écrit : > >> Here's a complete patch, with the additional tweak of replacing >> the other occurrence of str''cmp with $(s_). > > Actually I don't think you need it. Ironically, > you need it only when not factoring it, and this > give

Re: prohibit_strcmp

2012-02-24 Thread Akim Demaille
Le 24 févr. 2012 à 10:08, Jim Meyering a écrit : > Here's a complete patch, with the additional tweak of replacing > the other occurrence of str''cmp with $(s_). Actually I don't think you need it. Ironically, you need it only when not factoring it, and this gives a furious desire to factor it

Re: prohibit_strcmp

2012-02-24 Thread Jim Meyering
Jim Meyering wrote: > Akim Demaille wrote: > >> Also, FWIW, in Bison there are many more strcmp, but they do not >> conform to the sc pattern. >> >> src/ielr.c:if (0 == strcmp (type, "lalr")) >> src/ielr.c:else if (0 == strcmp (type, "ielr")) >> src/ielr.c:else if (0 == strcmp (type, "c

Re: prohibit_strcmp

2012-02-24 Thread Jim Meyering
Bruno Haible wrote: >> That gnulib has two definitions is unfortunate, but I will not >> volunteer to change the STREQ that I've been using ;-) >> I don't see much value in streq.h, either, and hence, don't use it. > > The value of streq.h is an optimized definition which is used in a few > places.

Re: prohibit_strcmp

2012-02-24 Thread Akim Demaille
hi Bruno, Le 23 févr. 2012 à 21:00, Bruno Haible a écrit : >> I use STRNCMP_LIT defined in coreutils/src/system.h: >> >>/* Just like strncmp, but the second argument must be a literal string >> and you don't specify the length. */ >>#define STRNCMP_LIT(s, literal) \ >> strncm