Eric Blake wrote:
> Ever since commit 2392b18099, openat and fdopendir no longer drag in
> xalloc-die through indirect dependencies, so these tests no longer
> need $(LIBINTL).
>
> * modules/areadlinkat-tests (Makefile.am): Drop stale LDADD.
> * modules/dirent-safer-tests (Makefile.am): Likewise.
>
Merely including xalloc.h can drag in some unwanted link
dependencies on some platforms. safe-alloc.c is already
one example of a file that broke the cycle by duplicating
the xalloc_oversized macro.
* lib/hash.c (hash_oversized): Copy from xalloc.h.
* lib/mgetgroups.c (mgetgroups_oversized): Like
Ever since commit 2392b18099, openat and fdopendir no longer drag in
xalloc-die through indirect dependencies, so these tests no longer
need $(LIBINTL).
* modules/areadlinkat-tests (Makefile.am): Drop stale LDADD.
* modules/dirent-safer-tests (Makefile.am): Likewise.
* modules/fdopendir-tests (Mak
On 04/26/2011 07:28 PM, Eric Blake wrote:
> On 04/26/2011 05:35 PM, Eric Blake wrote:
>> Ever since commit 2392b18099, fdopendir no longer drags in xalloc-die
>> through indirect dependencies, so this test no longer needs $(LIBINTL).
>>
>> * modules/dirent-safer-tests (Makefile.am): Drop stale LDAD
Reuben Thomas wrote:
> From mkstemp(3):
>
>More generally, the POSIX specification of mkstemp() does not
> say anything about file modes,
>so the application should make sure its file mode creation mask
> (see umask(2)) is set
>appropriately before calling mkstemp() (and mk
On 04/26/2011 07:03 PM, Bruno Haible wrote:
> Eric Blake wrote:
>> diff --git a/modules/save-cwd b/modules/save-cwd
>> index 02a0723..974b596 100644
>> --- a/modules/save-cwd
>> +++ b/modules/save-cwd
>> @@ -9,7 +9,7 @@ m4/save-cwd.m4
>> Depends-on:
>> chdir-long
>> cloexec
>> -getcwd
>> +getcwd
On 04/26/2011 05:35 PM, Eric Blake wrote:
> Ever since commit 2392b18099, fdopendir no longer drags in xalloc-die
> through indirect dependencies, so this test no longer needs $(LIBINTL).
>
> * modules/dirent-safer-tests (Makefile.am): Drop stale LDADD.
NAK to this patch (but that doesn't affect
Eric Blake wrote:
> diff --git a/modules/save-cwd b/modules/save-cwd
> index 02a0723..974b596 100644
> --- a/modules/save-cwd
> +++ b/modules/save-cwd
> @@ -9,7 +9,7 @@ m4/save-cwd.m4
> Depends-on:
> chdir-long
> cloexec
> -getcwd
> +getcwd-lgpl
> fchdir
> stdbool
> unistd-safer
Here it woul
Hi Eric,
Now the code is clear enough that it can be understood :-) I have three remarks:
> +AC_DEFUN([gl_FUNC_GETCWD_LGPL],
> +[
> + AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
> + AC_REQUIRE([gl_FUNC_GETCWD_NULL])
> +
> + case $gl_cv_func_getcwd_null in
> + *yes) ;;
> + *)
> +dnl Minimal replac
Hi Eric,
> My v2 rewrite uses more variables, with better names, to hopefully make
> the logic easier to follow.
Yes, it is easier to follow. Thanks for the improvements.
> I've altered v2 to break the work into 4 phases:
>
> if (buf) return getcwd()
> if (size) single malloc, getcwd, free buf
>From mkstemp(3):
More generally, the POSIX specification of mkstemp() does not
say anything about file modes,
so the application should make sure its file mode creation mask
(see umask(2)) is set
appropriately before calling mkstemp() (and mkostemp()).
Does setting a 0600 um
On Linux, with a forced ac_cv_func_fchdir=no, the test failed
because dup2 was not replaced, all because the shell variable
ac_cv_func_dup2 had not been set yet.
Meanwhile, computing the canonical pathname of a directory on
mingw was rather expensive -- multiple chdir()! -- but nothing
cared wheth
http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00299.html
talked about splitting out LGPLv2+ portions of existing modules.
* modules/filenamecat-lgpl (License): Mark as LGPLv2+, as intended
when it was first created.
Signed-off-by: Eric Blake
---
ChangeLog|4
m
* modules/linkat (Depends-on): Require getcwd-lgpl.
* modules/renameat (Depends-on): Likewise.
Signed-off-by: Eric Blake
---
ChangeLog|4
modules/linkat |1 +
modules/renameat |1 +
3 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
in
* tests/test-getcwd-lgpl.c: New file, taken from...
* tests/test-getcwd.c: ...old contents. Rewrite this file to
repeat long path stress tests from m4 probe.
* modules/getcwd-lgpl-tests: New module.
* modules/getcwd-tests (Depends-on): Depend on lgpl tests.
* m4/getcwd-abort-bug.m4: Update comment
We can assume that tests won't be run from a directory with an
absolute name longer than native getcwd limits.
* tests/test-linkat.c (main): Use lighter-weight getcwd.
* tests/test-renameat.c (main): Likewise.
* modules/linkat-tests (Depends-on): Relax dependency.
* modules/renameat-tests (Depends
For programs that aren't worried about being invoked from an
current working directory longer than PATH_MAX (perhaps because
the program always does chdir to a sane location first), the
getcwd module is overkill, given that all modern portability
targets have a getcwd that works on short names.
*
Ever since commit 2392b18099, fdopendir no longer drags in xalloc-die
through indirect dependencies, so this test no longer needs $(LIBINTL).
* modules/dirent-safer-tests (Makefile.am): Drop stale LDADD.
Signed-off-by: Eric Blake
---
ChangeLog |3 +++
modules/dirent-safer-t
save-cwd needs either a working fchdir or a working getcwd(NULL).
The only platform where getcwd fixes problems not solved by
getcwd-lgpl is Linux, but fchdir works there.
* modules/save-cwd (Depends-on): Use getcwd-lgpl.
Signed-off-by: Eric Blake
---
ChangeLog|3 +++
modules/save-c
* m4/getcwd-abort-bug.m4: Fix comments.
* m4/getcwd-path-max.m4: Likewise.
* m4/getcwd.m4: Likewise.
Signed-off-by: Eric Blake
---
ChangeLog |7 +++
m4/getcwd-abort-bug.m4 |4 ++--
m4/getcwd-path-max.m4 |4 ++--
m4/getcwd.m4 |4 +++-
4 files changed, 1
Round 2; addresses the comments from round one, and scrubs the
rest of gnulib for clients of getcwd that can benefit from the
new module.
Eric Blake (9):
getcwd: tweak comments
getcwd-lgpl: new module
getcwd: enhance tests
save-cwd: reduce dependency
dirent-safer: drop unused link depend
On 04/26/2011 04:34 AM, Bruno Haible wrote:
> Hi Eric,
>
> Good move. I also like to see a glibc compatible getcwd() that does not
> require the complex 'openat' and 'fdopendir' machinery.
>
> A remark regarding copyright. Through your now module, lib/getcwd.c changes
> from GPLv3+ to LGPLv2+. (I
Hi Bruno,
Thank you.
On 04/19/11 15:16, Bruno Haible wrote:
I would say:
0. Install gettext 0.18.1 on the machine on which you build the releases,
and write AM_GNU_GETTEXT_VERSION([0.18.1]) in your configure.ac.
<>
1. call autopoint
2. call gnulib-tool --import
3. call "AUTOPOINT=true a
Further testing found a typo in my previous 4 patches, which is
fixed by the following additional patch. In rereading them I think
they respond to all the previous comments and therefore shouldn't be
controversial so I pushed them. (If I'm wrong, please feel free to fix
any chaos that results. :
On 04/25/2011 11:55 PM, Jim Meyering wrote:
> Eric Blake wrote:
>> It was confusing having 1 out of 3 known getcwd problems checked
>> in place, and the other two in separate files.
>>
>> * m4/getcwd-abort-bug.m4, m4/getcwd-path-max.m4: Delete, moving
>> contents...
>> * m4/getcwd.m4: Here.
>> * mo
When building coreutils-8.11 on Irix 6.3 and Tru64 Unix 5.1, linking
of sort always fails because LIB_PTHREAD=''. Looking through src/
Makefile.am shows that LIBMULTITHREAD='-lpthread' in both cases,
but sort links with LIB_PTHREAD which is empty, leaving pthread
symbols unresolved.
I'm guessing
Bruno Haible wrote:
> Hi Eric,
>
> Good move. I also like to see a glibc compatible getcwd() that does not
> require the complex 'openat' and 'fdopendir' machinery.
>
> A remark regarding copyright. Through your now module, lib/getcwd.c changes
> from GPLv3+ to LGPLv2+. (It is too hard to explain t
Eric Blake wrote:
> + do
> + {
> + tmp = buf;
> + if (first)
> + {
> + size = size ? size : 4096;
> + first = false;
> + }
> + else
> + {
> + size <<= 1;
> + }
> + if ((buf = realloc (tmp, size)) == NULL)
A further hint
Bruno Haible wrote:
> Hi Jim,
>
>> I've started using some new gcc-4.6 options,
>> by adding these lines to coreutils' configure.ac:
>>
>> + gl_WARN_ADD([-Wsuggest-attribute=const])
>> + gl_WARN_ADD([-Wsuggest-attribute=pure])
>> + gl_WARN_ADD([-Wsuggest-attribute=noreturn])
>>
>> I'
Hi Eric,
Good move. I also like to see a glibc compatible getcwd() that does not
require the complex 'openat' and 'fdopendir' machinery.
A remark regarding copyright. Through your now module, lib/getcwd.c changes
from GPLv3+ to LGPLv2+. (It is too hard to explain to lawyers that part of a
file co
30 matches
Mail list logo