bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Bruno Haible <bruno@clisp.org>
To: Florian Weimer <fweimer@redhat.com>
Cc: bug-gnulib@gnu.org, Paul Eggert <eggert@cs.ucla.edu>,
	Karl Berry <karl@freefriends.org>
Subject: Re: scratch_buffer.h, scratch_buffer_dupfree.c sync
Date: Thu, 03 Nov 2022 13:41:18 +0100	[thread overview]
Message-ID: <6022365.ZiIRlz1sT0@nimes> (raw)
In-Reply-To: <87v8nwfgg3.fsf@oldenburg.str.redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1532 bytes --]

Florian Weimer wrote:
> > But it means that we cannot promise that these .h files are even remotely
> > stable APIs.
> 
> I must say I was surprised to see dynarray and scratch_buffer end up in
> gnulib.  I never intended them to escape this way from glibc.  The
> interfaces and their implementation are problematic in some ways, and I
> can't recommend them for general use.

Thanks for this clear statement, Florian.

So I was too optimistic when I wrote
  - "It looks like the 'scratch_buffer' could be useful to some programs
     outside of glibc." [1]
  - "dynarray looks useful" [2]

Here are proposed patches to rename the modules.

[1] https://lists.gnu.org/archive/html/bug-gnulib/2021-02/msg00073.html
[2] https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00042.html


2022-11-03  Bruno Haible  <bruno@clisp.org>

	dynarray: Rename to glibc-internal/dynarray.
	* modules/glibc-internal/dynarray: Renamed from modules/dynarray.
	* modules/glibc-internal/dynarray-tests: Renamed from
	modules/dynarray-tests.
	* modules/regex (Depends-on): Update.
	* NEWS: Mention this change and the previous one.

2022-11-03  Bruno Haible  <bruno@clisp.org>

	scratch_buffer: Rename to glibc-internal/scratch_buffer.
	* modules/glibc-internal/scratch_buffer: Renamed from
	modules/scratch_buffer.
	* modules/glibc-internal/scratch_buffer-tests: Renamed from
	modules/scratch_buffer-tests.
	* modules/canonicalize (Depends-on): Update.
	* modules/canonicalize-lgpl (Depends-on): Likewise.
	* modules/glob (Depends-on): Likewise.


[-- Attachment #2: 0001-scratch_buffer-Rename-to-glibc-internal-scratch_buff.patch --]
[-- Type: text/x-patch, Size: 9642 bytes --]

From 371a0f95a7e90d29a7272d0e7cfde1eb0b61a235 Mon Sep 17 00:00:00 2001
From: Bruno Haible <bruno@clisp.org>
Date: Thu, 3 Nov 2022 13:30:04 +0100
Subject: [PATCH 1/2] scratch_buffer: Rename to glibc-internal/scratch_buffer.

* modules/glibc-internal/scratch_buffer: Renamed from
modules/scratch_buffer.
* modules/glibc-internal/scratch_buffer-tests: Renamed from
modules/scratch_buffer-tests.
* modules/canonicalize (Depends-on): Update.
* modules/canonicalize-lgpl (Depends-on): Likewise.
* modules/glob (Depends-on): Likewise.
---
 ChangeLog                                     | 11 +++++
 modules/canonicalize                          |  2 +-
 modules/canonicalize-lgpl                     | 36 ++++++++---------
 modules/{ => glibc-internal}/scratch_buffer   |  0
 .../{ => glibc-internal}/scratch_buffer-tests |  0
 modules/glob                                  | 40 +++++++++----------
 6 files changed, 50 insertions(+), 39 deletions(-)
 rename modules/{ => glibc-internal}/scratch_buffer (100%)
 rename modules/{ => glibc-internal}/scratch_buffer-tests (100%)

diff --git a/ChangeLog b/ChangeLog
index a7a3f30c0d..70e717284b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2022-11-03  Bruno Haible  <bruno@clisp.org>
+
+	scratch_buffer: Rename to glibc-internal/scratch_buffer.
+	* modules/glibc-internal/scratch_buffer: Renamed from
+	modules/scratch_buffer.
+	* modules/glibc-internal/scratch_buffer-tests: Renamed from
+	modules/scratch_buffer-tests.
+	* modules/canonicalize (Depends-on): Update.
+	* modules/canonicalize-lgpl (Depends-on): Likewise.
+	* modules/glob (Depends-on): Likewise.
+
 2022-11-02  Bruno Haible  <bruno@clisp.org>
 
 	scratch_buffer: Document last change.
diff --git a/modules/canonicalize b/modules/canonicalize
index ddd83bc841..25667c431b 100644
--- a/modules/canonicalize
+++ b/modules/canonicalize
@@ -24,7 +24,7 @@ mempcpy
 nocrash
 rawmemchr
 readlink
-scratch_buffer
+glibc-internal/scratch_buffer
 stat
 stdbool
 sys_stat
diff --git a/modules/canonicalize-lgpl b/modules/canonicalize-lgpl
index 252618e95e..7842cda2da 100644
--- a/modules/canonicalize-lgpl
+++ b/modules/canonicalize-lgpl
@@ -11,24 +11,24 @@ Depends-on:
 extensions
 stdlib
 nocrash
-double-slash-root [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
-eloop-threshold   [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
-errno             [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
-fcntl-h           [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
-filename          [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
-idx               [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
-intprops          [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
-libc-config       [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
-memmove           [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
-mempcpy           [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
-pathmax           [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
-rawmemchr         [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
-readlink          [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
-scratch_buffer    [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
-stat              [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
-stdbool           [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
-sys_stat          [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
-unistd            [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
+double-slash-root             [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
+eloop-threshold               [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
+errno                         [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
+fcntl-h                       [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
+filename                      [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
+idx                           [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
+intprops                      [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
+libc-config                   [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
+memmove                       [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
+mempcpy                       [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
+pathmax                       [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
+rawmemchr                     [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
+readlink                      [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
+glibc-internal/scratch_buffer [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
+stat                          [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
+stdbool                       [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
+sys_stat                      [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
+unistd                        [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
 
 configure.ac:
 gl_CANONICALIZE_LGPL
diff --git a/modules/scratch_buffer b/modules/glibc-internal/scratch_buffer
similarity index 100%
rename from modules/scratch_buffer
rename to modules/glibc-internal/scratch_buffer
diff --git a/modules/scratch_buffer-tests b/modules/glibc-internal/scratch_buffer-tests
similarity index 100%
rename from modules/scratch_buffer-tests
rename to modules/glibc-internal/scratch_buffer-tests
diff --git a/modules/glob b/modules/glob
index 83cd729ceb..4a89521e01 100644
--- a/modules/glob
+++ b/modules/glob
@@ -13,26 +13,26 @@ Depends-on:
 glob-h
 c99
 largefile
-alloca          [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
-builtin-expect  [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
-closedir        [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
-d-type          [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
-dirfd           [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
-flexmember      [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
-fnmatch         [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
-fstatat         [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
-getlogin_r      [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
-libc-config     [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
-memchr          [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
-mempcpy         [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
-opendir         [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
-readdir         [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
-scratch_buffer  [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
-stdbool         [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
-stdint          [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
-strdup          [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
-unistd          [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
-malloc-posix    [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
+alloca                        [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
+builtin-expect                [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
+closedir                      [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
+d-type                        [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
+dirfd                         [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
+flexmember                    [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
+fnmatch                       [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
+fstatat                       [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
+getlogin_r                    [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
+libc-config                   [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
+memchr                        [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
+mempcpy                       [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
+opendir                       [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
+readdir                       [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
+glibc-internal/scratch_buffer [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
+stdbool                       [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
+stdint                        [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
+strdup                        [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
+unistd                        [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
+malloc-posix                  [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
 
 configure.ac:
 gl_GLOB
-- 
2.34.1


[-- Attachment #3: 0002-dynarray-Rename-to-glibc-internal-dynarray.patch --]
[-- Type: text/x-patch, Size: 4967 bytes --]

From 9543a96e7e0975cda93cfb777d2b2e346cc290c5 Mon Sep 17 00:00:00 2001
From: Bruno Haible <bruno@clisp.org>
Date: Thu, 3 Nov 2022 13:32:42 +0100
Subject: [PATCH 2/2] dynarray: Rename to glibc-internal/dynarray.

* modules/glibc-internal/dynarray: Renamed from modules/dynarray.
* modules/glibc-internal/dynarray-tests: Renamed from
modules/dynarray-tests.
* modules/regex (Depends-on): Update.
* NEWS: Mention this change and the previous one.
---
 ChangeLog                                   |  9 +++++
 NEWS                                        |  4 ++
 modules/{ => glibc-internal}/dynarray       |  0
 modules/{ => glibc-internal}/dynarray-tests |  0
 modules/regex                               | 42 ++++++++++-----------
 5 files changed, 34 insertions(+), 21 deletions(-)
 rename modules/{ => glibc-internal}/dynarray (100%)
 rename modules/{ => glibc-internal}/dynarray-tests (100%)

diff --git a/ChangeLog b/ChangeLog
index 70e717284b..70ece5200a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2022-11-03  Bruno Haible  <bruno@clisp.org>
+
+	dynarray: Rename to glibc-internal/dynarray.
+	* modules/glibc-internal/dynarray: Renamed from modules/dynarray.
+	* modules/glibc-internal/dynarray-tests: Renamed from
+	modules/dynarray-tests.
+	* modules/regex (Depends-on): Update.
+	* NEWS: Mention this change and the previous one.
+
 2022-11-03  Bruno Haible  <bruno@clisp.org>
 
 	scratch_buffer: Rename to glibc-internal/scratch_buffer.
diff --git a/NEWS b/NEWS
index 327fc8ceee..3b83e2978d 100644
--- a/NEWS
+++ b/NEWS
@@ -74,6 +74,10 @@ User visible incompatible changes
 
 Date        Modules         Changes
 
+2022-11-03  dynarray        These modules are renamed to glibc-internal/dynarray
+            scratch_buffer  and glibc-internal/scratch_buffer, respectively.
+                            They are not meant for general use.
+
 2022-11-02  scratch_buffer  The function 'gl_scratch_buffer_dupfree' is removed.
 
 2022-09-10  stdbool         This module now assumes C99 and provides C23,
diff --git a/modules/dynarray b/modules/glibc-internal/dynarray
similarity index 100%
rename from modules/dynarray
rename to modules/glibc-internal/dynarray
diff --git a/modules/dynarray-tests b/modules/glibc-internal/dynarray-tests
similarity index 100%
rename from modules/dynarray-tests
rename to modules/glibc-internal/dynarray-tests
diff --git a/modules/regex b/modules/regex
index b780427221..7779a1e796 100644
--- a/modules/regex
+++ b/modules/regex
@@ -20,27 +20,27 @@ c99
 extensions
 ssize_t
 vararrays
-attribute       [test $ac_use_included_regex = yes]
-btowc           [test $ac_use_included_regex = yes]
-builtin-expect  [test $ac_use_included_regex = yes]
-dynarray        [test $ac_use_included_regex = yes]
-intprops        [test $ac_use_included_regex = yes]
-iswctype        [test $ac_use_included_regex = yes]
-langinfo        [test $ac_use_included_regex = yes]
-libc-config     [test $ac_use_included_regex = yes]
-lock            [test $ac_use_included_regex = yes]
-memcmp          [test $ac_use_included_regex = yes]
-memmove         [test $ac_use_included_regex = yes]
-mbrtowc         [test $ac_use_included_regex = yes]
-mbsinit         [test $ac_use_included_regex = yes]
-nl_langinfo     [test $ac_use_included_regex = yes]
-stdbool         [test $ac_use_included_regex = yes]
-stdint          [test $ac_use_included_regex = yes]
-verify          [test $ac_use_included_regex = yes]
-wchar           [test $ac_use_included_regex = yes]
-wcrtomb         [test $ac_use_included_regex = yes]
-wctype-h        [test $ac_use_included_regex = yes]
-wctype          [test $ac_use_included_regex = yes]
+attribute               [test $ac_use_included_regex = yes]
+btowc                   [test $ac_use_included_regex = yes]
+builtin-expect          [test $ac_use_included_regex = yes]
+glibc-internal/dynarray [test $ac_use_included_regex = yes]
+intprops                [test $ac_use_included_regex = yes]
+iswctype                [test $ac_use_included_regex = yes]
+langinfo                [test $ac_use_included_regex = yes]
+libc-config             [test $ac_use_included_regex = yes]
+lock                    [test $ac_use_included_regex = yes]
+memcmp                  [test $ac_use_included_regex = yes]
+memmove                 [test $ac_use_included_regex = yes]
+mbrtowc                 [test $ac_use_included_regex = yes]
+mbsinit                 [test $ac_use_included_regex = yes]
+nl_langinfo             [test $ac_use_included_regex = yes]
+stdbool                 [test $ac_use_included_regex = yes]
+stdint                  [test $ac_use_included_regex = yes]
+verify                  [test $ac_use_included_regex = yes]
+wchar                   [test $ac_use_included_regex = yes]
+wcrtomb                 [test $ac_use_included_regex = yes]
+wctype-h                [test $ac_use_included_regex = yes]
+wctype                  [test $ac_use_included_regex = yes]
 
 configure.ac:
 gl_REGEX
-- 
2.34.1


  reply	other threads:[~2022-11-03 12:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-02 22:37 scratch_buffer.h, scratch_buffer_dupfree.c sync Karl Berry
2022-11-03  1:18 ` Paul Eggert
2022-11-03  2:37   ` Bruno Haible
2022-11-03  3:09     ` Paul Eggert
2022-11-03 10:51       ` Bruno Haible
2022-11-03 11:03         ` Florian Weimer
2022-11-03 12:41           ` Bruno Haible [this message]
2022-11-03 18:27             ` Paul Eggert
2022-11-03 20:44               ` Bruno Haible
2022-11-03 18:26           ` Paul Eggert
2022-11-03 19:37             ` Florian Weimer
2022-11-03 20:40             ` Karl Berry
2022-11-03 21:12               ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6022365.ZiIRlz1sT0@nimes \
    --to=bruno@clisp.org \
    --cc=bug-gnulib@gnu.org \
    --cc=eggert@cs.ucla.edu \
    --cc=fweimer@redhat.com \
    --cc=karl@freefriends.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).