Re: obstack changes: relicense under LGPLv2+

2025-05-05 Thread Collin Funk
Bruno Haible via Gnulib discussion list writes: > 2025-05-05 Bruno Haible > > obstack: Relicense under LGPLv2+. > Alan Modra's permission is at > . > Paul Eggert's permission is at >

[PATCH 10/19] * lib/obstack.in.h: Move include.

2025-05-05 Thread Paul Eggert
This is merely to make the glibc reviewer’s job easier, since the include location doesn’t matter. --- lib/obstack.in.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/obstack.in.h b/lib/obstack.in.h index 0f2677dba4..f53b78c15c 100644 --- a/lib/obstack.in.h +++ b/lib/

[PATCH 08/19] obstack: rename to _OBSTACK_CHUNK_SIZE_T

2025-05-05 Thread Paul Eggert
* lib/obstack.in.h (_OBSTACK_CHUNK_SIZE_T): Rename from _CHUNK_SIZE_T, for namespace prefix consistency. --- ChangeLog| 4 lib/obstack.in.h | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index ed1c57575b..771309c182 100644 --- a/Change

[PATCH 02/19] obstack: stop depending on alignof

2025-05-05 Thread Paul Eggert
* lib/obstack.c (__alignof__) [!__GNUC__]: Default to alignof, not to alignof_type. * modules/obstack (Depends-on): Depend on alignasof directly, not indirectly via alignof. --- ChangeLog | 6 ++ lib/obstack.c | 3 +-- modules/obstack | 2 +- 3 files changed, 8 insertions(+), 3 deletio

[PATCH 09/19] obstack: size_t → _OBSTACK_CHUNK_SIZE_T

2025-05-05 Thread Paul Eggert
* lib/obstack.c (_obstack_begin, _obstack_begin_1): * lib/obstack.in.h (struct obstack, obstack_init, obstack_begin) (obstack_specify_allocation) (obstack_specify_allocation_with_arg, obstack_chunkfun): Use _OBSTACK_CHUNK_SIZE_T instead of size_t in places where glibc uses unsigned long rather than

[PATCH 05/19] obstack: define PTR_INT_TYPE

2025-05-05 Thread Paul Eggert
* lib/obstack.in.h (PTR_INT_TYPE): Define, for compatibility with glibc even though we don’t need the type for anything other than compatibility. Include stddef.h only if needed, like glibc obstack.h does. --- ChangeLog| 6 ++ lib/obstack.in.h | 15 +-- 2 files changed, 1

[PATCH 06/19] obstack: use presence of uintptr_t

2025-05-05 Thread Paul Eggert
The code depends on the presence of uintptr_t, not on whether ptrdiff_t is narrower than a pointer, so use C macros that reflect this. Also, clean up the namespace in the typical GCC-like case * lib/obstack.in.h (_OBSTACK_UINTPTR_TYPE): New macro. Include only if needed (i.e., not GCC-like). (__PT

[PATCH 11/19] obstack: use glibc’s temp slot names

2025-05-05 Thread Paul Eggert
* lib/obstack.in.h (struct obstack): Rename temp fields back to what glibc uses, to avoid any glibc concerns about source code compatibility. All uses changed back. This affect only non-GNU-compatible compilers. --- ChangeLog| 6 ++ lib/obstack.in.h | 52

[PATCH 12/19] obstack: _obstack_free → __obstack_free

2025-05-05 Thread Paul Eggert
* lib/obstack.in.h (__obstack_free): Rename back from _obstack_free. This is for compatibility with glibc, which in turn is for compatibility with old Gnulib. All uses changed. --- ChangeLog| 5 + lib/obstack.c| 4 +++- lib/obstack.in.h | 10 ++ 3 files changed, 14 inser

[PATCH 15/19] libc-config, obstack: Oracle __extension__ support

2025-05-05 Thread Paul Eggert
* lib/cdefs.h, lib/obstack.in.h (__extension__): Oracle Developer Studio 12.6 also supports __extension__. --- ChangeLog| 4 lib/cdefs.h | 2 +- lib/obstack.in.h | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index dd0825acdf..c0691c

[PATCH 17/19] obstack: use signed chunk sizes

2025-05-05 Thread Paul Eggert
* lib/obstack.in.h (_OBSTACK_CHUNK_SIZE_T) [!__GL_GNULIB_HEADER]: Now long, not unsigned long, since that’s what glibc does. --- ChangeLog| 4 lib/obstack.in.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8967f3d54f..eb0ba5d166 1006

[PATCH 18/19] obstack: simplify default size, alignment

2025-05-05 Thread Paul Eggert
* lib/obstack.c (MAX, DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Remove. (_obstack_begin_worker): Use __alignof__ (max_align_t) instead of calculating it by hand, possibly incorrectly on oddball platforms. Estimate a good size of 4000 bytes rather than using a no-longer-valid value. * modules/obstack (

[PATCH 13/19] obstack: be more like glibc in return values

2025-05-05 Thread Paul Eggert
This partly reverts commit d15b2da0ac25e085ce30a9e2672624999ce910a6 dated 2014-11-03. It keeps the part of that commit that fixed the return type of non-gcc versions of obstack_make_room, obstack_grow, obstack_grow0, obstack_1grow, obstack_ptr_grow_fast, obstack_int_grow_fast, obstack_blank so tha

[PATCH 14/19] obstack: be more like glibc for __extension__

2025-05-05 Thread Paul Eggert
* lib/obstack.in.h (__extension__): Use glibc-like syntax for testing gcc version. --- ChangeLog| 4 lib/obstack.in.h | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1e83db3d5e..dd0825acdf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1

[PATCH 19/19] obstack: match obstack.c with glibc

2025-05-05 Thread Paul Eggert
Make this file easier to compare with glibc obstack.c. * lib/obstack.c: Include shlib-compat.h or libc-config.h. Move some !_OBSTACK_NO_ERROR_HANDLER declarations up. Add _LIBC-only compatibility decls. * modules/obstack (Depends-on): Add libc-config. --- ChangeLog | 7 +++ lib/obstack.

[PATCH 16/19] obstack: fix undefined behavior if big alignment

2025-05-05 Thread Paul Eggert
* lib/obstack.c: Include stddef.h, for offsetof. (align_size_up): New static function. (_obstack_begin_worker, _obstack_newchunk): Ensure that the chunk limit is aligned, too. (_obstack_begin_worker): Don’t assume that 4096 is large enough, as the alignment could be larger. * lib/obstack.in.h (obst

[PATCH 01/19] obstack: fix unlikely buffer overrun in glibc

2025-05-05 Thread Paul Eggert
This bug is not plausible on any Gnulib platform, but it could happen in glibc if the requested size is UINT_MAX. * lib/obstack.c (_obstack_newchunk): Fail if requested size is 0. * lib/obstack.in.h (obstack_grow0): Check for room <= len, not room <= len + 1 where len + 1 could overflow. --- Chang

[PATCH 04/19] obstack: change license wording

2025-05-05 Thread Paul Eggert
Change license wording to match glibc, to ease future merging. --- lib/obstack.c| 19 ++- lib/obstack.in.h | 19 ++- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/lib/obstack.c b/lib/obstack.c index 7d19f6bd3a..92e2a1206f 100644 --- a/lib/obst

[PATCH 03/19] obstack: merge better with glibc

2025-05-05 Thread Paul Eggert
When compiled for glibc, keep the fake array content size at 4, for API compatibility with older glibc. * lib/obstack.in.h (__FLEXIBLE_ARRAY_MEMBER): Remove. (_OBSTACK_CHUNK_CONTENTS_SIZE): New macro. (struct _obstack_chunk): Use it for contents size. * modules/obstack (Depends-on): Add flexmember.

[PATCH 07/19] obstack: use int where glibc does

2025-05-05 Thread Paul Eggert
Make it easier to merge with glibc, by using int where the glibc API uses int, when compiling for glibc. This does not affect Gnulib behavior. * lib/obstack.in.h (_OBSTACK_INDEX_T): New macro. * lib/obstack.in.h (struct obstack): * lib/obstack.c (_obstack_begin_worker, obstack_begin) (_obstack_begi

[PATCH 00/19] prepare to merge Gnulib obstack back into glibc

2025-05-05 Thread Paul Eggert
Prompted by the recent attempt[1] to fix an obstack-related bug[2] in glibc, a bug that was already fixed in Gnulib, I have attempted to make the Gnulib code usable in glibc without changing the glibc ABI and with the most-innocuous changes to the undocumented part of the glibc API, and installed t

Re: New module windows-cygpath

2025-05-05 Thread Bruno Haible via Gnulib discussion list
The native Windows 'git' program prints file names in the form C:/Users/foo/bar . (It is linked with MSYS2, not with Cygwin.) We don't need to call cygpath in this case, but we still need to convert C:/Users/foo/bar -> C:\Users\foo\bar like 'cygpath -w' would do. 2025-05-05 Bruno Haible

Re: vc-mtime: Add API for more efficient use of git

2025-05-05 Thread Bruno Haible via Gnulib discussion list
> vc-mtime: Add API for more efficient use of git. Two more patches are needed, to make it work on native Windows. 2025-05-05 Bruno Haible vc-mtime: Another fix for native Windows. * lib/vc-mtime.c (SLASH): New macro. (max_vc_mtime): Use it as expected directory

New module windows-cygpath

2025-05-05 Thread Bruno Haible via Gnulib discussion list
The module 'cygpath' is used to convert file names in a Cygwin program before passing them to a native Windows program. The opposite situation is to convert file names in a native Windows program that were received from a Cygwin program. This needs a different module. 2025-05-05 Bruno Haible

Re: Improving support for find_shared_library_fullname (module 'relocatable')

2025-05-05 Thread Reuben Thomas via Gnulib discussion list
On Fri, 2 May 2025 at 02:30, Bruno Haible wrote: I don't think requiring -ldl is a "small" price to pay. It increases the > startup times of the programs linked to that library. Therefore how about > using dladdr only on those platforms where it is in libc? This would cover > all the platform tha

Re: obstack changes: relicense under LGPLv2+

2025-05-05 Thread Bruno Haible via Gnulib discussion list
Alan Modra wrote: > > Would you please relicense your changes under LGPLv2+? That is, give us > > the ability to relicense the 'obstack' module under LGPLv2+ and then be > > able to flow back the changes into glibc? > > OK by me. Thank you! I'm implementing the license change: 2025-05-05 Bruno

Re: obstack changes: relicense under LGPLv2+

2025-05-05 Thread Alan Modra
On Sun, May 04, 2025 at 12:10:45PM +0200, Bruno Haible wrote: > Would you please relicense your changes under LGPLv2+? That is, give us > the ability to relicense the 'obstack' module under LGPLv2+ and then be > able to flow back the changes into glibc? OK by me. -- Alan Modra

Re: obstack changes: relicense under LGPLv2+

2025-05-05 Thread Paul Eggert
On 2025-05-04 03:10, Bruno Haible wrote: Would you please relicense your changes under LGPLv2+? That is, give us the ability to relicense the 'obstack' module under LGPLv2+ and then be able to flow back the changes into glibc? Yes, of course. And I don't think things were unclear at all, as th

Re: Testsuite failure in (unprivileged) user namespace

2025-05-05 Thread Ludovic Courtès
Hi Collin, Collin Funk writes: > Ludovic Courtès writes: > >>> I am only a relatively new user of guix, so I can't speak for which >>> approach would be preferable from their perspective. I CC'ed Ludovic >>> since he implemented the unprivileged guix daemon approach. >> >> I’m not sure how ‘mod