Re: [bug-gnulib] malloc strategies

2007-02-02 Thread Bruno Haible
Andi Kleen wrote: > For allocating memory that big it would be far better to just use mmap() > with the full range and let the kernel serve you freshly zeroed memory > on demand as you touch it. It's malloc's job to do that, and glibc's malloc implementation does this. Do you know of a system wh

Re: portability checks, errors and warnings

2007-02-02 Thread Bruno Haible
> #if ! @HAVE_STRSTR@ || ! @HAVE_DECL_STRSTR@ > extern char *strstr (char const *__haystack, char const *__needle); > #endif > >@HAVE_STRSTR@ is: > > 1 if 'configure' checks the system strstr and found it to be OK. > > 0 if '

Re: strstr, strcase, strcasestr, and i18n

2007-02-04 Thread Bruno Haible
Paul Eggert wrote: > > - strstr: This function's behaviour is not clearly defined. POSIX says > > that it compares a "string" with a "sequence of bytes". Which a priori > > is nonsense, since the elements of strings are characters. > > No, elements of "character strings" are characters.

Re: portability checks, errors and warnings

2007-02-04 Thread Bruno Haible
Paul Eggert wrote: > > What does "otherwise" mean? Either 'configure' finds the system's strstr > > OK or it finds problems. What is the third alternative? > > The third alternative is that 'configure' does not check whether the > the system's strstr is OK. Ah, I see: this is the case when the gn

javacomp-script, javacomp: make better use of gcj >= 4.3

2007-02-04 Thread Bruno Haible
IBM's Java compiler. Here is an update of the javacomp-script, javacomp modules. 2007-02-04 Bruno Haible <[EMAIL PROTECTED]> Make use of gcj-4.3's -fsource and -ftarget option. * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3, and if

Re: AIX 4.3.3 IBM C compiler patch for m4-1.4.8

2007-02-04 Thread Bruno Haible
Paul Eggert wrote: > a signed bitfield has the value 0 or -1 (on two's complement hosts). Some compilers also give warnings if you use 'int foo : 1;'. We don't want these warnings to occur in code of gnulib users. > Admittedly this problem should be documented. Here's a proposed patch. Thanks.

new module description field 'configure.ac-early'

2007-02-04 Thread Bruno Haible
Hi, There's more than one module which needs some autoconf macros to be executed "early". I'm generalizing the two existing special cases into a generic handling of a 'configure.ac-early' section. 2007-02-04 Bruno Haible <[EMAIL PROTECTED]> New modu

Re: proposed comments for stdarg module

2007-02-04 Thread Bruno Haible
Paul Eggert wrote: > Here's a proposed patch to the stdarg module description, to describe > the benefits of using AC_PROG_CC_STDC with this module. > > 2007-02-04 Paul Eggert <[EMAIL PROTECTED]> > > * modules/stdarg (configure.ac): Add comment suggestiong > AC_PROG_CC_STDC. Rather

new module 'mbschr'

2007-02-04 Thread Bruno Haible
This adds a new module, a variant of strchr() that works in multibyte locales. 2007-02-04 Bruno Haible <[EMAIL PROTECTED]> New module mbschr. * modules/mbschr: New file. * lib/mbschr.c: New file. * lib/string_.h (strchr): Add a conditional link w

new module 'mbsrchr'

2007-02-04 Thread Bruno Haible
mbsrchr() is the analogon of strrchr() that works with characters strings (in other words, with strings also in multibyte locales). 2007-02-04 Bruno Haible <[EMAIL PROTECTED]> New module mbsrchr. * modules/mbsrchr: New file. * lib/mbsrchr.c: New file.

new module mbsstr, remove module strstr

2007-02-04 Thread Bruno Haible
This introduces a new module mbsstr. mbsstr() is like strstr(), except it works on character strings (i.e. on multibyte strings). The module strstr is no longer needed, since no platforms are known that don't have strstr(). 2007-02-04 Bruno Haible <[EMAIL PROTECTED]> New mo

new module mbscasecmp, reduce goal of module strcase

2007-02-04 Thread Bruno Haible
02-04 Bruno Haible <[EMAIL PROTECTED]> New module mbscasecmp, reduced goal of strcasecmp. * modules/mbscasecmp: New file. * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c. (mbscasecmp): Renamed from strcasecmp. * lib/strcasecmp.c: Don't i

Re: new module mbscasecmp, reduce goal of module strcase

2007-02-04 Thread Bruno Haible
Addendum to the last patch: --- m4/strcase.m4 27 Jan 2007 14:43:17 - 1.8 +++ m4/strcase.m4 5 Feb 2007 02:04:43 - @@ -1,4 +1,4 @@ -# strcase.m4 serial 6 +# strcase.m4 serial 7 dnl Copyright (C) 2002, 2005-2007 Free Software Foundation, Inc. dnl This file is free software;

strncasecmp declaration tweak

2007-02-04 Thread Bruno Haible
This simplies a bit lib/string.h and adjusts the corresponding link warning. 2007-02-04 Bruno Haible <[EMAIL PROTECTED]> Simplify handling of strncasecmp. * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change the conditional link warning.

Re: new module mbscasecmp, reduce goal of module strcase

2007-02-04 Thread Bruno Haible
Addendum #2: --- m4/string_h.m4 5 Feb 2007 02:15:46 - 1.10 +++ m4/string_h.m4 5 Feb 2007 02:25:52 - @@ -32,6 +32,7 @@ HAVE_DECL_MEMRCHR=1; AC_SUBST([HAVE_DECL_MEMRCHR]) HAVE_STPCPY=1; AC_SUBST([HAVE_STPCPY]) HAVE_STPNCPY=1; AC_SUB

new module mbscasestr, remove module strcasestr

2007-02-04 Thread Bruno Haible
This introduces a new module mbscasestr. mbscasestr() is like glibc's strcasestr(), except it works on character strings (i.e. on multibyte strings). The module strcasestr now only provides an non-internationalized equivalent to glibc's non-internationalized function!! 2007-02-04 Br

Re: new module mbscasecmp, reduce goal of module strcase

2007-02-04 Thread Bruno Haible
Addendum #3: --- m4/strcase.m4 5 Feb 2007 02:09:22 - 1.9 +++ m4/strcase.m4 5 Feb 2007 02:46:45 - @@ -1,4 +1,4 @@ -# strcase.m4 serial 7 +# strcase.m4 serial 8 dnl Copyright (C) 2002, 2005-2007 Free Software Foundation, Inc. dnl This file is free software; the Free Softw

Re: new module mbscasestr, remove module strcasestr

2007-02-04 Thread Bruno Haible
An addendum to this one as well: --- m4/strcasestr.m45 Feb 2007 02:42:27 - 1.5 +++ m4/strcasestr.m45 Feb 2007 02:49:39 - @@ -1,4 +1,4 @@ -# strcasestr.m4 serial 5 +# strcasestr.m4 serial 6 dnl Copyright (C) 2005, 2007 Free Software Foundation, Inc. dnl This file is free sof

new module mbscspn

2007-02-04 Thread Bruno Haible
The function mbscspn() is a variant of strcspn() which works also with multibyte strings. 2007-02-04 Bruno Haible <[EMAIL PROTECTED]> New module mbscspn. * modules/mbscspn: New file. * lib/mbscspn.c: New file. * lib/string_.h (strcspn): Add a conditiona

new module mbspbrk

2007-02-04 Thread Bruno Haible
The function mbspbrk() is like strpbrk(), except that it works also in multibyte locales. 2007-02-04 Bruno Haible <[EMAIL PROTECTED]> New module mbspbrk. * modules/mbspbrk: New file. * lib/mbspbrk.c: New file. * lib/string_.h (strpbrk): Add a conditiona

new module mbsspn

2007-02-04 Thread Bruno Haible
The function mbsspn() is like strspn(), except that it also works in multibyte locales. 2007-02-04 Bruno Haible <[EMAIL PROTECTED]> New module mbsspn. * modules/mbsspn: New file. * lib/mbsspn.c: New file. * lib/string_.h (strspn): Add a conditional link w

new module mbstok_r

2007-02-04 Thread Bruno Haible
The function mbstok_r is like strtok_r, except that it also works on multibyte strings. 2007-02-04 Bruno Haible <[EMAIL PROTECTED]> New module mbstok_r. * modules/mbstok_r: New file. * lib/mbstok_r.c: New file. * lib/string_.h (strtok_r): Change argument

warning message tweak

2007-02-04 Thread Bruno Haible
This clarifies that the messages are warnings, not errors. 2007-02-04 Bruno Haible <[EMAIL PROTECTED]> * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the warning message. --- lib/string_.h 5 Feb 2007 03:34:24 - 1.17 +++ lib/s

strsep bug

2007-02-05 Thread Bruno Haible
the end of the string, so that strsep will repeatedly, infinitely, yield empty tokens. Here is a fix, together with an optimization of the length 1 case. OK to apply? 2007-02-05 Bruno Haible <[EMAIL PROTECTED]> * lib/strsep.c (strsep): Fix actions in case of no deli

new module 'mbssep'

2007-02-05 Thread Bruno Haible
The function mbssep() is like strsep(), except that it also works with multibyte strings. Although strsep() is not in POSIX, we have a replacement for it in gnulib, therefore IMO we also need to offer an internationalized variant of it. 2007-02-05 Bruno Haible <[EMAIL PROTECTED]>

Re: shouldn't regex depend on stdbool?

2007-02-08 Thread Bruno Haible
.h", line 25: cannot find include file: > "./regex_internal.h", line 749: undefined or not a type: bool > ... > which seems to indicate that the regex module should depend on the > stdbool module. Yes, absolutely. You're right. Thanks. I'm app

Re: shouldn't regex depend on stdbool?

2007-02-08 Thread Bruno Haible
Hello Paul, Sorry, our mails crossed. I thought it was a simple oversight. > The problem with having it depend on stdbool is that then applications > intended only for C99 or better would drag in stdbool unnecessarily. > That's why the dependency isn't there now. Packages who don't want stdbool

Re: time_r.h -> time_.h

2007-02-08 Thread Bruno Haible
Simon Josefsson wrote: > Any obvious reason we shouldn't create a time.h with the contents of > the current time_r.h, using the same logic we use to replace string.h? > > It would be nice to avoid '#include "time_r.h"' and just do '#include > ' in my code. The full TODO list for this topic is bel

Re: javacomp.m4 usage [Fwd: Re: Java-related Bison tests all fail]

2007-02-10 Thread Bruno Haible
you shouldn't need to care about the class file version that the compiler produces, so the solution for you is to use 2007-02-10 Bruno Haible <[EMAIL PROTECTED]> Enable the Java related testsuite tests when the only Java compiler found is a gcj < 4.3. * con

gcc-4.3, glibc and AC_PROG_CC_STDC

2007-02-10 Thread Bruno Haible
Problem === glibc's from 2.3.x up to the most recent ones has a bug which causes a link error when more than one compilation unit uses and is compiled by a gcc-4.3 snapshot with "--std=gnu99 -O2". http://sourceware.org/bugzilla/show_bug.cgi?id=4022 is a header file whose presence is now

Re: Java-related Bison tests all fail

2007-02-11 Thread Bruno Haible
inserted zz after FG: Thanks. I'm applying this workaround: 2007-02-11 Bruno Haible <[EMAIL PROTECTED]> * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils. Reported by Joel E. Denny <[EMAIL PROTECTED]>, --- m4/javacomp.m4

c-strstr: add testcase

2007-02-11 Thread Bruno Haible
Hi, I'm starting to speed up the substring search functions. First, a test case. 2007-02-11 Bruno Haible <[EMAIL PROTECTED]> * modules/c-strstr-tests: New file. * tests/test-c-strstr.c: New file. == modules/c-s

Re: c-strstr: add testcase

2007-02-11 Thread Bruno Haible
placing it with a maintainable implementation first. 2007-02-11 Bruno Haible <[EMAIL PROTECTED]> * lib/c-strstr.c: Complete rewrite for maintainability. lib/c-strstr.c /* c-strstr.c -- substring search in C locale C

Re: c-strstr: add testcase

2007-02-11 Thread Bruno Haible
Now here's the fix that brings the worst-case complexity down from O(n*m) to O(n). One could use either the Knuth-Morris-Pratt or the Boyer-Moore algorithm. I'm using the former one, because Boyer-Moore works "backwards", which is harder to generalize to the mbsstr case. 2007

c-strcasestr: avoid quadratic time consumption

2007-02-11 Thread Bruno Haible
Like c_strstr, here is a patch for c_strcasestr that avoids quadratic asymptotic complexity. 2007-02-11 Bruno Haible <[EMAIL PROTECTED]> Ensure O(n) worst-case complexity of c_strcasestr. * lib/c-strcasestr.c: Include stdbool.h, string.h. (knuth_morris_pratt

strcasestr: avoid quadratic time consumption

2007-02-11 Thread Bruno Haible
ase time consumption. But since gnulib recommends to use c-str* or mbs* anyway, I don't see much point in it. Bruno 2007-02-11 Bruno Haible <[EMAIL PROTECTED]> Ensure O(n) worst-case complexity of strcasestr substitute. * lib/strcasestr.c: Include stdbool.h.

new module 'mbslen'

2007-02-11 Thread Bruno Haible
The function 'mbslen' turns out to be a common utility function, needed if one needs to a memory allocation or similar before iterating through a string. 2007-02-11 Bruno Haible <[EMAIL PROTECTED]> New module mbslen. * modules/mbslen: New file. * lib/mb

copying multibyte string iterators

2007-02-11 Thread Bruno Haible
In rare cases, it is necessary to copy iterators (including the multibyte state), rather than creating a new iterator. 2007-02-11 Bruno Haible <[EMAIL PROTECTED]> * lib/mbiter.h: Include . (mbiter_multi_copy): New function. (mbi_copy): New macro. * lib/mbu

Re: new module 'mbschr'

2007-02-11 Thread Bruno Haible
I'm adding this fix, and a test case. 2007-02-11 Bruno Haible <[EMAIL PROTECTED]> * lib/mbschr.c (mbschr): Fix bug. * modules/mbschr-tests: New file. * tests/test-mbschr.sh: New file. * tests/test-mbschr.c: New file. * m4/locale-zh.m

Re: new module 'mbsrchr'

2007-02-11 Thread Bruno Haible
This module too requires a fix. 2007-02-11 Bruno Haible <[EMAIL PROTECTED]> * lib/mbsrchr.c (mbsrchr): Fix bug. * modules/mbsrchr-tests: New file. * tests/test-mbsrchr.sh: New file. * tests/test-mbsrchr.c: New file. *** lib/mbsrchr.c 5 Feb 2007 01

mbsstr: avoid quadratic time consumption

2007-02-11 Thread Bruno Haible
This patch uses the Knuth-Morris-Pratt algorithm to ensure that mbsstr() is O(n) worst-case. 2007-02-11 Bruno Haible <[EMAIL PROTECTED]> Ensure O(n) worst-case complexity of mbsstr. * lib/mbsstr.c: Include stdbool.h. (knuth_morris_pratt_u

mbscasestr: avoid quadratic time consumption

2007-02-11 Thread Bruno Haible
This patch uses the Knuth-Morris-Pratt algorithm to ensure that mbscasestr() is O(n) worst-case. 2007-02-11 Bruno Haible <[EMAIL PROTECTED]> Ensure O(n) worst-case complexity of mbscasestr. * lib/mbscasestr.c: Include stdbool.h. (knuth_morris_pratt_u

Re: new module mbscspn

2007-02-11 Thread Bruno Haible
A small optimization was possible: 2007-02-11 Bruno Haible <[EMAIL PROTECTED]> * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and unneeded cast. --- lib/mbscspn.c 5 Feb 2007 02:52:43 - 1.1 +++ lib/mbscspn.c 11 Feb 2007 22:27:51 - @@

Re: new module mbspbrk

2007-02-11 Thread Bruno Haible
A cosmetic tweak: 2007-02-11 Bruno Haible <[EMAIL PROTECTED]> * lib/mbspbrk.c (mbspbrk): Remove unneeded cast. --- lib/mbspbrk.c 5 Feb 2007 03:12:26 - 1.1 +++ lib/mbspbrk.c 11 Feb 2007 22:32:41 - @@ -46,7 +46,7 @@ { if (mb_len (mb

Re: new module mbsspn

2007-02-11 Thread Bruno Haible
This bug fix was necessary: 2007-02-11 Bruno Haible <[EMAIL PROTECTED]> * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call. --- lib/mbsspn.c5 Feb 2007 03:23:34 - 1.1 +++ lib/mbsspn.c11 Feb 2007 22:36:25 - @@ -47,8 +47,8 @@

Re: wint_t in printf-args.c under mingw32

2007-02-11 Thread Bruno Haible
lines: > > #ifdef HAVE_WINT_T > case TYPE_WIDE_CHAR: > ap->a.a_wide_char = va_arg (args, wint_t); > break; > #endif Thanks for reporting this. This is already fixed in gnulib for 6 months: 2006-07-22 Bruno Haible <[EMAIL PROTECT

Re: m4/locale-tr.m4 missing

2007-02-12 Thread Bruno Haible
y need a bit more M4 quotes. OK? Indeed. Well spotted. I'm fixing this as follows. (Recall that use of changequote is more reliable than this [[ ]] workaround, IMO.) Thanks! 2007-02-12 Bruno Haible <[EMAIL PROTECTED]> * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.

Re: time_r.h -> time_.h

2007-02-12 Thread Bruno Haible
and if libraries are involved, "make -k" will not even attempt to link every program. So I think it's better to turn all gnulib-induced link errors into link-time warnings. I'm applying this. 2007-02-12 Bruno Haible <[EMAIL PROTECTED]> * lib/string_.h (memmem, mempcpy

Re: changequote

2007-02-13 Thread Bruno Haible
Hello Ralf, > > (Recall that use of > > changequote is more reliable than this [[ ]] workaround, IMO.) > > Sigh. I wish that if you had to keep your own ways of doing things this > way, rather than using [[ ]] or quadrigraphs, then at least you'd be > consequent enough to also fight for a change

Re: more m4 underquotations

2007-02-13 Thread Bruno Haible
move the (easily visible) changequote lines and comment lines. Quadrigraphs don't have this property as much: You can move a piece of code between an "unquoted" context, a "single-quoted" context or a "doubly-quoted" context without modifications. But no easy copy/pa

Re: strcasecmp

2007-02-14 Thread Bruno Haible
Paolo Bonzini wrote: > I'm not sure how Turkish people would do lowercase translation > of English words. In other words, I'm not sure if they'd write the > hypothetical language Iris as İRİS or ırıs. This is one question to ask. The other consideration is: If a script contains an invocation "

Re: more m4 underquotations

2007-02-14 Thread Bruno Haible
Bruce Korb wrote (in a discussion about how to avoid m4 underquotation bugs): > The complexity stems from both the m4 language choice and > the brevity of the chosen quote markers. The language issue > is that macros inherit the quote markers from their invocation > environment. Nothing you can d

Re: remove strcasecmp from regex code; use localcharset instead

2007-02-14 Thread Bruno Haible
Paul Eggert wrote: > I installed this. It adds a dependency of regex on localcharset, Thanks. This improves regex on - Mingw, which doesn't have nl_langinfo(CODESET) and where the locale is usually set through system settings, not through environment variables, - Cygwin, where nl_langinfo

new module mbsncasecmp

2007-02-14 Thread Bruno Haible
This introduces a function mbsncasecmp(), which is like strncasecmp() except that it works with characters instead of bytes and the count argument N is the number of characters, not the number of bytes. 2007-02-11 Bruno Haible <[EMAIL PROTECTED]> New module mbsnc

new module mbspcasecmp

2007-02-14 Thread Bruno Haible
Most of the uses of strncasecmp are for the purpose of testing whether a string is prefix of another string. Using mbsncasecmp() is not comfortable for this case. I'm adding a new function mbspcasecmp() for this purpose. The 'p' stands for "prefix" or "pointer".

Re: fix 'exclude' module to avoid strcasecmp, but with performance problems

2007-02-14 Thread Bruno Haible
Paul Eggert wrote: > However, here I had some performance problems with mbscasemcp. Given > two multibyte strings A and B, I want to know whether A is an initial > prefix of B, ignoring case during comparison; also, if A is a prefix > of B, I need to know where in B the prefix ends (because I want

predefined preprocessor macros on Windows platforms

2007-02-15 Thread Bruno Haible
Hi, This is the yearly FAQ posting about the symbols defined on C/C++ compilations on Windows. 1) The compiler indicators: - Mingw, Cygwin: __GNUC__ - MSVC: _MSC_VER - Borland:__TURBOC__, __BORLANDC__ 2) The CPU indicators for x86: - Mingw, Cygwin: _X86_, __i386__ -

Re: fix inadequate Windows implementation of tmpfile

2007-02-15 Thread Bruno Haible
Hello Ben, Thanks for proposing this tmpfile override, and for bringing _O_TEMPORARY to our attention. However, in gnulib we usually try to not override a function unless it's clearly broken. (We didn't do that with 'malloc' and 'realloc' for some time, and it caused hassles, because some modules

Re: predefined preprocessor macros on Windows platforms

2007-02-15 Thread Bruno Haible
Brian Dessent wrote: > This should be __CYGWIN__ and not __CYGWIN32__. Yes, you are right. My bad. Here is the corrected summary: 1) The compiler indicators: - Mingw, Cygwin: __GNUC__ - MSVC: _MSC_VER - Borland:__TURBOC__, __BORLANDC__ 2) The CPU indicators for x86: -

Re: more m4 underquotations

2007-02-15 Thread Bruno Haible
Eric Blake wrote: > there is too much risk that a user > will use those characters in his local encoding, but not the > byte sequence that M4 recognizes based on a different > encoding of those characters. Indeed. I thought this problem could be solved by having every file declare its quote charac

BSD m4 (was: more m4 underquotations)

2007-02-15 Thread Bruno Haible
Eric Blake wrote: > One more misfeature of changequote - changequote(,) is not > portable. The BSD folks have been trying to get their m4 > implementation to copy enough of GNU m4's traits that it > can be used in place of GNU M4 to support autoconf. But we don't need to care about that. We aren'

Re: fix inadequate Windows implementation of tmpfile

2007-02-15 Thread Bruno Haible
03-q1/msg00170.html > > Where it works, it appears to be implemented such that it always > works, even if a program is terminated abruptly, based on what > I've read on the web. Thanks for these explanations. It appears worth to use this in the clean-temp module. 2007-02-15 Brun

Re: fix inadequate Windows implementation of tmpfile

2007-02-15 Thread Bruno Haible
Ben Pfaff wrote: > I agree that the Windows implementation is, arguably, C99 and > POSIX compliant. But I claim that it has an unreasonably poor > quality of implementation, bad enough that we should replace it. > If a Unix-like system implemented its tmpfile in a similar way, > by always attempti

Re: [PATCH] Add !HAVE_MBRTOWC fallbacks for mbchar, mbiter and mbuiter

2007-02-16 Thread Bruno Haible
Eric Blake wrote: > > There are probably two uses of the mbchar, mbfile, mbiter, mbuiter modules: > > (a) Use them only for MB_CUR_MAX > 1, and use simpler datatypes (just > > 'char' and pointers) for MB_CUR_MAX = 1. > > (b) Use them always. > > ... there are things to be aware of. ...

Re: fix inadequate Windows implementation of tmpfile

2007-02-17 Thread Bruno Haible
ge if problems appear on other platforms. - Mention as header file to be included. * MODULES.html.sh: Put new section about before , not between and . Please proofread again. Did I miss something? 2007-02-17 Ben Pfaff <[EMAIL PROTECTED]> Bruno Haible

string_.h: break lines

2007-02-17 Thread Bruno Haible
This introduces some line breaking in the source, for the GL_LINK_WARNING arguments. Functionally a nop. 2007-02-17 Bruno Haible <[EMAIL PROTECTED]> * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp, strncasecmp, strchr, strchrnul, strdup, strndup, s

Re: portability checks, errors and warnings

2007-02-17 Thread Bruno Haible
Paul Eggert wrote on 2007-02-05: > > he will get a link error about function 'rpl_strstr', and will likely > > report it as a bug in gnulib. > > I don't think this will be much of a problem in practice. We can > assume maintainers will read the gnulib documentation so that they > know w

new module 'link-warning'

2007-02-17 Thread Bruno Haible
H=$(top_srcdir)/build-aux/link-warning.h Include: License: LGPL Maintainer: Bruno Haible === build-aux/link-warning.h == /* GL_LINK_WARNING("literal string") arranges to emit the literal string as a linker warning on most glibc syst

string_h.m4 simplification

2007-02-17 Thread Bruno Haible
wo is needed but not the other one. And even if so, the added "cost" is only a dozen of lines in configure.ac. 2007-02-17 Bruno Haible <[EMAIL PROTECTED]> * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of gl_STRING_MODU

add link warnings to inttypes.h

2007-02-17 Thread Bruno Haible
This patch adds link warnings (conditional, only if GNULIB_POSIXCHECK is defined) to inttypes.h. A side effect is that the 'inttypes' module will create inttypes.h always - like the 'string' module creates string.h always. 2007-02-17 Bruno Haible <[EMAIL PROTECTED]>

new test modules

2007-02-17 Thread Bruno Haible
Hi, I added minimal tests for the modules arpa_inet byteswap fcntl inttypes netinet_in stdbool string sys_select sys_socket sys_stat sys_time sysexits time unistd wchar wctype Just to check that the include file that it defines can really be included. Feel free t

Re: coreutils plans, test release coming soon, then stable, then selinux

2007-02-18 Thread Bruno Haible
Hello Jim, > I expect to release coreutils-6.8 (not called "stable", but not > particularly "unstable" either) soon. Then, soon (i.e. a week) > afterwards, I want to make a stable 6.9 release. Hmm, should we reduce the amount of gnulib changes in this period, or are you going to shield yourself

new module 'math'

2007-02-18 Thread Bruno Haible
les the copyright headers were not at the beginning of the file. I moved them to the beginning. Is this ok with you? Bruno 2007-02-18 Bruno Haible <[EMAIL PROTECTED]> * modules/math: New file. * modules/mathl (Files): Remove lib/mathl.h. (Depends-on): Add mat

new module stdlib

2007-02-18 Thread Bruno Haible
This creates a "complete" . The include files exit.h, mkdtemp.h, mkstemp.h no longer exist - use instead. 2007-02-18 Bruno Haible <[EMAIL PROTECTED]> * modules/mkstemp (Files): Remove lib/mkstemp.h. (Depends-on): Add stdlib. (confi

Re: new module stdlib

2007-02-18 Thread Bruno Haible
heads-up. This fixes it. (Obviously modeled after Paul's same workaround in time_.h :-)) 2007-02-18 Bruno Haible <[EMAIL PROTECTED]> * lib/stdlib_.h: Handle glibc's special invocation convention specially. --- lib/stdlib_.h 18 Feb 2007 15:39:54 - 1.1 ++

Re: new module stdlib

2007-02-18 Thread Bruno Haible
tware Foundation, Inc. + Copyright (C) 2001-2003, 2006-2007 Free Software Foundation, Inc. Written by Bruno Haible <[EMAIL PROTECTED]>, 2001. This program is free software; you can redistribute it and/or modify @@ -25,6 +25,7 @@ #include #include #include +#include #incl

fchdir: fix dependencies

2007-02-18 Thread Bruno Haible
The fchdir module contains code that references the dup2 function, therefore it needs to depends on the dup2 module. 2007-02-18 Bruno Haible <[EMAIL PROTECTED]> * modules/fchdir (Depends-on): Add dup2. *** modules/fchdir 28 Jan 2007 16:10:39 - 1.3 --- modules/

question about getcwd

2007-02-18 Thread Bruno Haible
Hi Jim, Paul, Does the following accurately describe the behaviour of getcwd() in gnulib? I'm asking because lib/getcwd.c mentions a certain GNU extension, whereas lib/getcwd.h merely refers to the POSIX spec. /* Get the name of the current working directory, and put it in SIZE bytes of BUF.

Re: new module stdlib

2007-02-18 Thread Bruno Haible
The module 'getsubopt' also belongs to the acquaintances of stdlib.h. I'm applying this: 2007-02-18 Bruno Haible <[EMAIL PROTECTED]> * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h. * modules/stdlib (stdlib.h): Also substitute

SKIP_FTRUNCATE_CHECK

2007-02-18 Thread Bruno Haible
Hi Jim, A gnulib testdir with the module 'ftruncate', cross-compiled to mingw (--host=i386-pc-mingw32), showed me this: configure: error: Your system lacks the ftruncate function. Please report this, along with the output of "uname -a", to the bug-coreutils@gnu.org mailing lis

unistd: add more declarations

2007-02-18 Thread Bruno Haible
Here is a patch so that unistd.h declares all of gnulib's replacements that belong there. getcwd.h and getlogin_r.h are gone. Replaced with . 2007-02-18 Bruno Haible <[EMAIL PROTECTED]> * lib/readlink.c: Include . * m4/readlink.m4 (gl_FUNC_READLIN

Re: progreloc.c - what module?

2007-02-19 Thread Bruno Haible
Ben Pfaff wrote: > The file lib/progreloc.c is not in any module (as far as I can > tell). Yes [1]. This "relocatable" stuff is in a temporary state. Ideally it should be integrated into autoconf and automake. Do you have time to work on that with me? Bruno [1] http://lists.gnu.org/archive/ht

Re: SKIP_FTRUNCATE_CHECK

2007-02-19 Thread Bruno Haible
Hello Jim, > * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve. > Prompted by a report from Bruno Haible that mingw lacks ftruncate. I also meant to make life easier to people using mingw. mingw will not have gone away in three years - that's more a m

Re: SKIP_FTRUNCATE_CHECK

2007-02-19 Thread Bruno Haible
Hi Jim, > Now that you've done it, that's fine. OK, I'm committing it now, after you are saying that it's fine. > BTW, since you seem to care about mingw, can you tell us which part > of lib/ftruncate.c is used on that system? It uses a call to 'chsize'. 'chsize' is a documented function of the

Re: ///usr/include/stdlib.h:617: warning: '__malloc__' attribute ignored

2007-02-19 Thread Bruno Haible
totype for 'strcasecmp' > > ///usr/lib/gcc/i586-mingw32msvc/3.4.5/../../../../i586-mingw32msvc/include/string.h:103: > warning: no previous prototype for 'strncasecmp' > [EMAIL PROTECTED]:~/pspp/mingw/pspp/_mingw/gl(0)$ Ok, I'm applying this. 2007-02-

Re: ///usr/include/stdlib.h:617: warning: '__malloc__' attribute ignored

2007-02-19 Thread Bruno Haible
ce the gcc doc says the following about #include_next: The use of `#include_next' can lead to great confusion. We recommend it be used only when there is no other alternative. In particular, it should not be used in the headers belonging to a specific program; it should be

snprintfv (was: Re: Printf for gnulib?)

2007-02-19 Thread Bruno Haible
Hi Gary, > > OK Guys, shall we dust this "snprintfv" thing off, polish a bit and > > hand off to the interested gnulib folks? :) It'd be nice to have it > > have first class support. Heck, I'd like to see some of the add-on > > interfaces made more widely available anyway. :) > > That sounds

Re: progreloc.c - what module?

2007-02-19 Thread Bruno Haible
Ben Pfaff wrote: > It seems that what is left is: > > - Prepare a gnulib module that encapsulates the lib and > m4 files that are needed and makes the proper Autoconf > calls. > > - Adding support to Automake to avoid the need to add or > modify rules

Re: Printf for gnulib?

2007-02-19 Thread Bruno Haible
Daniel Jacobowitz and Ben Pfaff wrote: > > Is there any interest in a full C99 printf in gnulib? Right now, > > there's snprintf, vasnprintf, vasprintf, vsnprintf, and xvasprintf. > > The problem with these is that they punt to the system's underlying > > printf for some things. That's an issue e

Re: check for C99-compliant snprintf

2007-02-19 Thread Bruno Haible
Ben Pfaff wrote on Friday/Saturday: > The following patch attempts to remedy the situation. I cannot see the big picture in this change. You want a snprintf() whose return value is correct but which still doesn't support argument reordering on NetBSD and doesn't support %n on HP-UX? And an unchang

Re: snprintfv

2007-02-19 Thread Bruno Haible
Bruce Korb wrote: > > But I think the *printf replacements should continue to be based on the > > vasnprintf code, because of object code size. On a Linux/x86 system: > > With typical new systems using 1GB ram and 150GB disk, > we're talking 1/10 of the RAM and less than ten millionths > of on

Re: fix inadequate Windows implementation of tmpfile

2007-02-20 Thread Bruno Haible
Ben Pfaff asked: > I have not yet signed papers for gnulib contributions. Should I? Yes, please. Not only for tmpfile, but also for your future contributions. Bruno

new module stdio

2007-02-20 Thread Bruno Haible
This is the semi-"complete" . It replaces the snprintf.h and vsnprintf.h headers. So, it paves the way for new POSIX-compatible printf, fprintf etc. replacements that Daniel Jacobowitz and/or Ben Pfaff want to contribute. 2007-02-20 Bruno Haible <[EMAIL PROTECTED]> * m

Re: _.h -> .h and CVS

2007-02-21 Thread Bruno Haible
Hello Karl, > Forgive me, but I wanted to check to be sure: is it the case that for > every foo_.h file in Gnulib, the corresponding foo.h file is generated > at configure time? Rather, it is generated at "make" time with information that has been determined at configure time. It is also removed

ANNOUNCE: (os, library, function) database

2007-02-21 Thread Bruno Haible
Hi, Now that sourceforge compilefarm disappeared, we need other ways to estimate the portability of POSIX functions. Also, the question "is this or that substitute still needed?" is asked over and over again, and autoconf has no means to answer this question, except if you collect the config.stat

Re: time needs restrict

2007-02-22 Thread Bruno Haible
Hi Simon, > time_.h from the time module uses restrict in the prototypes, but it > doesn't depend on the restrict module. Installed. The 'restrict' module was removed on 2006-08-09. Now, instead we use an AC_REQUIRE([AC_C_RESTRICT]) in the autoconf macro. But... gl_HEADER_TIME_H_BODY already req

Re: unistd: add more declarations

2007-02-22 Thread Bruno Haible
An occurrence of getlogin_r.h was missed. Fortunately, Simon's autobuild site http://autobuild.josefsson.org/gnulib/ displayed it quickly. 2007-02-22 Bruno Haible <[EMAIL PROTECTED]> * lib/glob.c: Don't include getlogin_r.h. *** lib/glob.c 26 Jan 2007 22:16:55 -

Re: snprintfv for gnulib?

2007-02-23 Thread Bruno Haible
Daniel Jacobowitz wrote: > - I don't know how to make one gnulib module override another yet There are two ways to achieve this, both in the area of the package that uses gnulib. Say, you want override 'snprintf' with 'snprintfv'. a) Invoke "gnulib-tool --avoid=snprintf --import snprintfv". or b

Re: snprintfv for gnulib?

2007-02-23 Thread Bruno Haible
Daniel Jacobowitz wrote: > One of the items on my plate is figuring out the best way to > regenerate the generated .h files after moving them to gnulib. > One way would be at gnulib-tool time, another to have a separate > script and keep updated copies checked in. gnulib-tool so far has no options

Re: portability checks, errors and warnings

2007-02-23 Thread Bruno Haible
Hi Paul, all, > I want 'make' to fail if any module > uses ctime, since it's asking for trouble in portable code (it has > undefined behavior with out-of-range time stamps). I suppose someone > could write code that carefully bounds the time stamps and then uses > ctime; such code can "#undef cti

<    5   6   7   8   9   10   11   12   13   14   >