Re: const-correctness fixes for regex

2005-08-31 Thread Paul Eggert
Jim Meyering <[EMAIL PROTECTED]> writes: > A week or so ago, I stumbled across one interface that was missing a > `const' attribute on a parameter, then dug up a few more. Paul, let me > know when you reach a point at which my checking this in won't interfere. It's easier for me if I just get it

Re: warning: comparison is always false due to limited range of data type

2005-08-31 Thread Paul Eggert
Jim Meyering <[EMAIL PROTECTED]> writes: > Is it really permitted to have sizeof (size_t) < sizeof (unsigned int)? Yes, I'm afraid so. The C Standard merely says that size_t is an unsigned integer type; size_t is allowed to be narrower than unsigned int. See, for example, Mark Brader's 10-year-o

const-correctness fixes for regex

2005-08-31 Thread Jim Meyering
A week or so ago, I stumbled across one interface that was missing a `const' attribute on a parameter, then dug up a few more. Paul, let me know when you reach a point at which my checking this in won't interfere. Index: regcomp.c =

function prototypes in non-gnulib regex code

2005-08-31 Thread Paul Eggert
I installed this and filed glibc bug 1280: 2005-08-31 Paul Eggert <[EMAIL PROTECTED]> * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]: (seek_collating_symbol_entry) [defined _LIBC]: (lookup_collation_sequence_value) [defined _LIBC]: (build_ran

Re: getdelim doesn't set errno on failure?

2005-08-31 Thread Derek Price
Patch actually attached this time. Regards, Derek Derek Price wrote: >Oskar Liljeblad wrote: > > > >>Well, the current Gnulib implementation doesn't behave that way. >>It will return 0 if the first call to getc fails (for whatever reason - >>error or EOF). AFAIK, the correct way to test getl

regex simplification of update to register offsets

2005-08-31 Thread Paul Eggert
I installed this and filed glibc bug 1279: 2005-08-31 Paul Eggert <[EMAIL PROTECTED]> * lib/regexec.c (re_search_internal): Simplify update of rm_so and rm_eo by replacing "if (A == B) A += C - B;" with the equivalent of "if (A == B) A = C;". This will make the

fixes for regex undefined behavior in shifts

2005-08-31 Thread Paul Eggert
I installed this and filed glibc bug 1278. 2005-08-31 Paul Eggert <[EMAIL PROTECTED]> * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char): (optimize_subexps, lower_subexp): Don't assume 1<<31 has defined behavior on hosts with 32-bit int, since th

Re: getdelim doesn't set errno on failure?

2005-08-31 Thread Derek Price
Oskar Liljeblad wrote: >Well, the current Gnulib implementation doesn't behave that way. >It will return 0 if the first call to getc fails (for whatever reason - >error or EOF). AFAIK, the correct way to test getline/getdelim for > [. . .] >I believe the GNU libc documentation needs to be fixed

Re: warning: comparison is always false due to limited range of data type

2005-08-31 Thread Jim Meyering
Paul Eggert <[EMAIL PROTECTED]> wrote: > Jim Meyering <[EMAIL PROTECTED]> writes: > >> Is there a patch yet to make gcc suppress that warning? > > Sorry, not yet. Other things are on my plate > >> - unsigned int n1 = n0 + 1; >> + /* FIXME: technically, the type of n1 should be `unsig

remove unused members from internal regex structs

2005-08-31 Thread Paul Eggert
I installed this, to get minor things out of the way before installing the 64-bit patch for regex. I also filed glibc bug 1273. 2005-08-31 Paul Eggert <[EMAIL PROTECTED]> * lib/regex_internal.h (re_sub_match_top_t): Remove unused member next_last_offset. (struct re_dfa_

Re: warning: comparison is always false due to limited range of data type

2005-08-31 Thread Paul Eggert
Jim Meyering <[EMAIL PROTECTED]> writes: > Is there a patch yet to make gcc suppress that warning? Sorry, not yet. Other things are on my plate > - unsigned int n1 = n0 + 1; > + /* FIXME: technically, the type of n1 should be `unsigned int', > + but that evokes an unsuppressi

Re: strcasestr compilation problem

2005-08-31 Thread Ben Pfaff
[EMAIL PROTECTED] (James Youngman) writes: > I haven't checked the code, but I suspect that a better choice would > be to include which must also #define NULL. That way you > end up with less other stuff being included without necessity and the > code stands a greater chance of working when comp

Re: fts broken again

2005-08-31 Thread Jim Meyering
[EMAIL PROTECTED] (Eric Blake) wrote: > The following patch was needed to make 'gnulib-tool --test fts' pass > again. Is there some way to improve new file creation to ensure that > all files are claimed by a module? > > 2005-08-31 Eric Blake <[EMAIL PROTECTED]> > > * modules/unistd-safer

Re: [bug-gnulib] socklen_t

2005-08-31 Thread Bruno Haible
Normally and should be sufficient to get socklen_t. Which are the systems where it needs ? Bruno ___ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib

fts broken again

2005-08-31 Thread Eric Blake
The following patch was needed to make 'gnulib-tool --test fts' pass again. Is there some way to improve new file creation to ensure that all files are claimed by a module? 2005-08-31 Eric Blake <[EMAIL PROTECTED]> * modules/unistd-safer (Files): Add unistd--.h. * modules/stdio

Re: gnulib-tool changes

2005-08-31 Thread Bruno Haible
Simon Josefsson wrote: > Yay! I considered dropping use of gnulib in libgnutls yesterday, > because I wanted the error module for the tools, but that module need > a program_name variable. When the library didn't provide one, there > were linker failures. I added a dummy 'char *program_name = "g

socklen_t

2005-08-31 Thread Simon Josefsson
How about this? 2005-08-31 Simon Josefsson <[EMAIL PROTECTED]> * modules/socklen: New file. 2005-08-31 Simon Josefsson <[EMAIL PROTECTED]> * socklen.m4: New file. Index: modules/socklen === RCS file: modules/so

Re: gnulib-tool changes

2005-08-31 Thread Simon Josefsson
Bruno Haible <[EMAIL PROTECTED]> writes: > 2) Support for multiple gnulib directories with a single configure.ac. > > It happens that a project wants to use gnulib in different parts, sometimes > even with different licenses, but these parts share the same config.h and > therefore the same configu

Re: strcasestr compilation problem

2005-08-31 Thread Bruno Haible
Yoann Vandoorselaere wrote: > The strcasestr module miss the inclusion of the stdio.h header, > resulting in missing declaration for the NULL identifier on some > systems. Thanks. I committed the appended fix. James Youngman writes: > I haven't checked the code, but I suspect that a better choic

gnulib-tool changes

2005-08-31 Thread Bruno Haible
Hi all, In the next days, I'll commit a few significant changes to gnulib-tool's --import functionality. 1) Ease of use "gnulib-tool --import" shall be usable for four purposes: - For making the first use of gnulib in a package, updating configure.ac, Makefile.am etc. - For changing the

Re: strcasestr compilation problem

2005-08-31 Thread Yoann Vandoorselaere
On Wed, 2005-08-31 at 08:59 +0100, James Youngman wrote: > On Wed, Aug 31, 2005 at 08:12:10AM +0200, Yoann Vandoorselaere wrote: > > > The strcasestr module miss the inclusion of the stdio.h header, > > resulting in missing declaration for the NULL identifier on some > > systems. > > I haven't c

Re: warning: comparison is always false due to limited range of data type

2005-08-31 Thread Jim Meyering
Jim Meyering <[EMAIL PROTECTED]> wrote: > Paul Eggert <[EMAIL PROTECTED]> wrote: >> It will take a while for this [gcc] fix to propagate, though. In the Is there a patch yet to make gcc suppress that warning? FYI, here is the warning again [line 586 referred to the test in the expansion of xallo

Re: strcasestr compilation problem

2005-08-31 Thread James Youngman
On Wed, Aug 31, 2005 at 08:12:10AM +0200, Yoann Vandoorselaere wrote: > The strcasestr module miss the inclusion of the stdio.h header, > resulting in missing declaration for the NULL identifier on some > systems. I haven't checked the code, but I suspect that a better choice would be to include