[PATCH v9 8/8] posix: Add getopt_long_collision

Vivien Kraus vivien@planete-kraus.eu
Mon Jun 23 20:10:18 GMT 2025


This function is used before introducing a new option name with all
known linguas to check that no translator has used the exact same name
as a translation for a different option.

It only checks for untranslated / translated collision, because:
- translated / translated conflicts in the same language can be solved
by the translator;
- translated / translated conflicts in another language will not
happen during a call to getopt_long.

When a collision is detected, it only returns the untranslated side of
the collision because the translator for the current locale knows
which option conflicts with the untranslated one.

It would maybe more useful for developers to have a maintainer script
doing equivalent work, but this function serves as a way to remind
them to check for collisions and discuss them with the translators
before introducing a new option name.
---
 manual/getopt.texi                            | 22 +++++++
 posix/Makefile                                | 10 +++
 posix/Versions                                |  2 +-
 posix/bits/getopt_ext.h                       |  5 ++
 posix/getopt1.c                               | 49 ++++++++++++++
 posix/tst-getopt_long_collision.c             | 66 +++++++++++++++++++
 posix/tst-getopt_long_collision.po            | 22 +++++++
 sysdeps/mach/hurd/i386/libc.abilist           |  1 +
 sysdeps/mach/hurd/x86_64/libc.abilist         |  1 +
 sysdeps/unix/sysv/linux/aarch64/libc.abilist  |  1 +
 sysdeps/unix/sysv/linux/alpha/libc.abilist    |  1 +
 sysdeps/unix/sysv/linux/arc/libc.abilist      |  1 +
 sysdeps/unix/sysv/linux/arm/be/libc.abilist   |  1 +
 sysdeps/unix/sysv/linux/arm/le/libc.abilist   |  1 +
 sysdeps/unix/sysv/linux/csky/libc.abilist     |  1 +
 sysdeps/unix/sysv/linux/hppa/libc.abilist     |  1 +
 sysdeps/unix/sysv/linux/i386/libc.abilist     |  1 +
 .../sysv/linux/loongarch/lp64/libc.abilist    |  1 +
 .../sysv/linux/m68k/coldfire/libc.abilist     |  1 +
 .../unix/sysv/linux/m68k/m680x0/libc.abilist  |  1 +
 .../sysv/linux/microblaze/be/libc.abilist     |  1 +
 .../sysv/linux/microblaze/le/libc.abilist     |  1 +
 .../sysv/linux/mips/mips32/fpu/libc.abilist   |  1 +
 .../sysv/linux/mips/mips32/nofpu/libc.abilist |  1 +
 .../sysv/linux/mips/mips64/n32/libc.abilist   |  1 +
 .../sysv/linux/mips/mips64/n64/libc.abilist   |  1 +
 sysdeps/unix/sysv/linux/or1k/libc.abilist     |  1 +
 .../linux/powerpc/powerpc32/fpu/libc.abilist  |  1 +
 .../powerpc/powerpc32/nofpu/libc.abilist      |  1 +
 .../linux/powerpc/powerpc64/be/libc.abilist   |  1 +
 .../linux/powerpc/powerpc64/le/libc.abilist   |  1 +
 .../unix/sysv/linux/riscv/rv32/libc.abilist   |  1 +
 .../unix/sysv/linux/riscv/rv64/libc.abilist   |  1 +
 .../unix/sysv/linux/s390/s390-32/libc.abilist |  1 +
 .../unix/sysv/linux/s390/s390-64/libc.abilist |  1 +
 sysdeps/unix/sysv/linux/sh/be/libc.abilist    |  1 +
 sysdeps/unix/sysv/linux/sh/le/libc.abilist    |  1 +
 .../sysv/linux/sparc/sparc32/libc.abilist     |  1 +
 .../sysv/linux/sparc/sparc64/libc.abilist     |  1 +
 .../unix/sysv/linux/x86_64/64/libc.abilist    |  1 +
 .../unix/sysv/linux/x86_64/x32/libc.abilist   |  1 +
 41 files changed, 209 insertions(+), 1 deletion(-)
 create mode 100644 posix/tst-getopt_long_collision.c
 create mode 100644 posix/tst-getopt_long_collision.po

diff --git a/manual/getopt.texi b/manual/getopt.texi
index 7834f1c2a3..e769b0ee70 100644
--- a/manual/getopt.texi
+++ b/manual/getopt.texi
@@ -383,6 +383,28 @@ not match a long option (or its abbreviation).
 
 @end deftypefun
 
+It is possible for the programmer to introduce a new option name that
+conflicts with the translation of an existing option name.  Such a
+case would disrupt the workflow of users as the new option would
+replace the existing option.  Before adding a new option to a program,
+the developer should check for collisions with all known translations.
+
+@deftypefun int getopt_long_collision (const struct option *@var{longopts}, const char *@var{context}, const char *@var{domain}, const struct option **@var{first_collision})
+
+Check whether there is a collision with any of the untranslated names
+of @var{longopts} and any of the translated names in the current
+locale.  Translations are looked up with @var{context}, in
+@var{domain}.  Set @var{first_collision} to @code{NULL}, or to the
+address of the first option whose untranslated name collides with
+another option’s translated name.
+
+If the collision happens between two identical translations of
+different options, it is not recognized, as it is simply a problem to
+be solved by the translator.
+
+Return 0 if no collisions are detected, 1 if a collision is detected.
+@end deftypefun
+
 @node Getopt Long Option Example
 @subsection Example of Parsing Long Options with @code{getopt_long}
 
diff --git a/posix/Makefile b/posix/Makefile
index 5b4a025004..d975f8c092 100644
--- a/posix/Makefile
+++ b/posix/Makefile
@@ -288,6 +288,7 @@ tests := \
   tst-fork \
   tst-gai_strerror \
   tst-getopt_long1 \
+  tst-getopt_long_collision \
   tst-glob-tilde \
   tst-glob_symlinks \
   tst-gnuglob \
@@ -341,6 +342,15 @@ $(tstgetoptl_mo): tstgetoptl.po
 $(objpfx)tstgetoptl.out: $(tstgetoptl_mo)
 CFLAGS-tstgetoptl.c += -DOBJPFX=\"$(objpfx)\"
 
+tst_getopt_long_collision_mo = $(objpfx)domaindir/fr_FR/LC_MESSAGES/tst-getopt_long_collision.mo
+$(tst_getopt_long_collision_mo): tst-getopt_long_collision.po
+	$(make-target-directory)
+	msgfmt -o $@T $<
+	mv -f $@T $@
+
+$(objpfx)tst-getopt_long_collision.out: $(tst_getopt_long_collision_mo)
+CFLAGS-tst-getopt_long_collision.c += -DOBJPFX=\"$(objpfx)\"
+
 # Test for the glob symbol version that was replaced in glibc 2.27.
 ifeq ($(have-GLIBC_2.26)$(build-shared),yesyes)
 tests += \
diff --git a/posix/Versions b/posix/Versions
index ae237ce9d4..351976fbe8 100644
--- a/posix/Versions
+++ b/posix/Versions
@@ -160,7 +160,7 @@ libc {
     posix_spawn_file_actions_addtcsetpgrp_np;
   }
   GLIBC_2.42 {
-    optctxt; opttextdomain;
+    optctxt; opttextdomain; getopt_long_collision;
   }
   GLIBC_PRIVATE {
     __libc_fork; __libc_pread; __libc_pwrite;
diff --git a/posix/bits/getopt_ext.h b/posix/bits/getopt_ext.h
index 6cd0932596..9c7f940d1f 100644
--- a/posix/bits/getopt_ext.h
+++ b/posix/bits/getopt_ext.h
@@ -84,6 +84,11 @@ extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv,
 		             const struct option *__longopts, int *__longind)
        __THROW __nonnull ((2, 3));
 
+extern int getopt_long_collision (const struct option *__longopts,
+                                  const char *__context,
+                                  const char *__domain,
+                                  const struct option **__first_collision);
+
 __END_DECLS
 
 #endif /* getopt_ext.h */
diff --git a/posix/getopt1.c b/posix/getopt1.c
index 48852dc692..1e1265c531 100644
--- a/posix/getopt1.c
+++ b/posix/getopt1.c
@@ -109,6 +109,55 @@ _getopt_long_only_r (int argc, char **argv, const char *options,
 			     1, d, 0, do_translate);
 }
 
+int
+getopt_long_collision (const struct option *long_options,
+                       const char *context,
+                       const char *domain,
+                       const struct option **first_collision)
+{
+  size_t n_options = 0;
+  size_t untranslated_option_index, translated_option_index;
+  const char *names_list;
+  const char *item_end;
+  size_t item_length;
+  const struct option *untranslated;
+  const struct option *translated;
+
+  *first_collision = NULL;
+  for (n_options = 0; long_options[n_options].name; n_options++)
+    ;
+  for (untranslated_option_index = 0;
+       untranslated_option_index < n_options;
+       untranslated_option_index++)
+    for (translated_option_index = 0;
+         translated_option_index < n_options;
+         translated_option_index++)
+      if (translated_option_index != untranslated_option_index)
+        {
+          untranslated = &(long_options[untranslated_option_index]);
+          translated = &(long_options[translated_option_index]);
+          names_list = do_translate (domain, context, translated->name);
+          while (names_list)
+            {
+              item_length = strlen (names_list);
+              item_end = strchr (names_list, ' ');
+              if (item_end)
+                {
+                  item_length = item_end - names_list;
+                  item_end++;
+                }
+              if (item_length == strlen (untranslated->name)
+                  && strncmp (untranslated->name, names_list, item_length) == 0)
+                {
+                  *first_collision = untranslated;
+                  return 1;
+                }
+              names_list = item_end;
+            }
+        }
+  return 0;
+}
+
 

 #ifdef TEST
 
diff --git a/posix/tst-getopt_long_collision.c b/posix/tst-getopt_long_collision.c
new file mode 100644
index 0000000000..4cd9447709
--- /dev/null
+++ b/posix/tst-getopt_long_collision.c
@@ -0,0 +1,66 @@
+#include <getopt.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <libintl.h>
+#include <locale.h>
+
+#define PN_(ctxt, str) (str)
+
+/* This checks that getopt_long_collision detects if the translation
+   of an option collides with an untranslated option name.  Such a
+   conflict would be resolved by favoring the untranslated option by
+   the way. */
+
+#define TRANSLATION_CONTEXT "command-line option"
+
+/* In this example, the French translator translated --instant by
+   --moment, but then the developer wants to introduce a new --moment
+   option... */
+
+static const struct option options[] =
+  {
+    {PN_ ("command-line option", "instant"), no_argument, NULL, 'I'},
+    {"moment", no_argument, NULL, 'M'},
+    {NULL, 0, NULL, 0}
+  };
+
+int
+main (int argc, char **argv)
+{
+  (void) argc;
+  (void) argv;
+  const struct option *collision = NULL;
+  int has_collision;
+  unsetenv ("LANGUAGE");
+  setlocale (LC_ALL, "fr_FR.UTF-8");
+  if (bindtextdomain ("tst-getopt_long_collision", OBJPFX "domaindir") == NULL)
+    {
+      fprintf (stderr, "%s:%d: cannot call bindtextdomain.\n", __FILE__, __LINE__);
+      abort ();
+    }
+  /* Check that the catalog is OK: */
+  if (strcmp (dgettext ("tst-getopt_long_collision",
+                        TRANSLATION_CONTEXT "\004" "instant"),
+              "moment instant") != 0)
+    {
+      fprintf (stderr, "%s:%d: the mo file does not work.\n", __FILE__, __LINE__);
+      abort ();
+    }
+  has_collision =
+    getopt_long_collision (options, TRANSLATION_CONTEXT,
+                           "tst-getopt_long_collision", &collision);
+  if (!has_collision)
+    {
+      fprintf (stderr, "%s:%d: collision not found.\n", __FILE__, __LINE__);
+      abort ();
+    }
+  if (strcmp (collision->name, "moment") != 0)
+    {
+      fprintf (stderr, "%s:%d: wrong collision detected, '%s' instead of 'moment'.\n",
+               __FILE__, __LINE__, collision->name);
+      abort ();
+    }
+  return 0;
+}
diff --git a/posix/tst-getopt_long_collision.po b/posix/tst-getopt_long_collision.po
new file mode 100644
index 0000000000..9cd4a81861
--- /dev/null
+++ b/posix/tst-getopt_long_collision.po
@@ -0,0 +1,22 @@
+# French translations for tst-getopt_long_collision.c
+# Copyright (C) 2025 THE GNU C Library'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the GNU C Library.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU C Library (see version.h)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2025-06-06 22:37+0200\n"
+"PO-Revision-Date: 2025-06-06 22:38+0200\n"
+"Language-Team: French <traduc@traduc.org>\n"
+"Language: fr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ASCII\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+# Oops, I first thought it would be translated as instant, but it’s moment in fact.
+#: tst-getopt_long_collision.c:22
+msgctxt "command-line option"
+msgid "instant"
+msgstr "moment instant"
diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist
index 835af57863..59ac449552 100644
--- a/sysdeps/mach/hurd/i386/libc.abilist
+++ b/sysdeps/mach/hurd/i386/libc.abilist
@@ -2596,6 +2596,7 @@ GLIBC_2.42 cfgetobaud F
 GLIBC_2.42 cfsetbaud F
 GLIBC_2.42 cfsetibaud F
 GLIBC_2.42 cfsetobaud F
+GLIBC_2.42 getopt_long_collision F
 GLIBC_2.42 optctxt D 0x4
 GLIBC_2.42 opttextdomain D 0x4
 GLIBC_2.42 pthread_barrier_destroy F
diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist
index ba9558da6f..5cdb7b4e09 100644
--- a/sysdeps/mach/hurd/x86_64/libc.abilist
+++ b/sysdeps/mach/hurd/x86_64/libc.abilist
@@ -2279,6 +2279,7 @@ GLIBC_2.42 cfgetobaud F
 GLIBC_2.42 cfsetbaud F
 GLIBC_2.42 cfsetibaud F
 GLIBC_2.42 cfsetobaud F
+GLIBC_2.42 getopt_long_collision F
 GLIBC_2.42 optctxt D 0x8
 GLIBC_2.42 opttextdomain D 0x8
 GLIBC_2.42 pthread_barrier_destroy F
diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
index 89ea9919bf..85ca0b684a 100644
--- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
@@ -2762,6 +2762,7 @@ GLIBC_2.42 cfsetispeed F
 GLIBC_2.42 cfsetobaud F
 GLIBC_2.42 cfsetospeed F
 GLIBC_2.42 cfsetspeed F
+GLIBC_2.42 getopt_long_collision F
 GLIBC_2.42 optctxt D 0x8
 GLIBC_2.42 opttextdomain D 0x8
 GLIBC_2.42 pthread_gettid_np F
diff --git a/sysdeps/unix/sysv/linux/alpha/libc.abilist b/sysdeps/unix/sysv/linux/alpha/libc.abilist
index 1dd31c21bd..20aebca062 100644
--- a/sysdeps/unix/sysv/linux/alpha/libc.abilist
+++ b/sysdeps/unix/sysv/linux/alpha/libc.abilist
@@ -3109,6 +3109,7 @@ GLIBC_2.42 cfsetispeed F
 GLIBC_2.42 cfsetobaud F
 GLIBC_2.42 cfsetospeed F
 GLIBC_2.42 cfsetspeed F
+GLIBC_2.42 getopt_long_collision F
 GLIBC_2.42 optctxt D 0x8
 GLIBC_2.42 opttextdomain D 0x8
 GLIBC_2.42 pthread_gettid_np F
diff --git a/sysdeps/unix/sysv/linux/arc/libc.abilist b/sysdeps/unix/sysv/linux/arc/libc.abilist
index 1e4a412969..a380f0d905 100644
--- a/sysdeps/unix/sysv/linux/arc/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arc/libc.abilist
@@ -2523,6 +2523,7 @@ GLIBC_2.42 cfsetispeed F
 GLIBC_2.42 cfsetobaud F
 GLIBC_2.42 cfsetospeed F
 GLIBC_2.42 cfsetspeed F
+GLIBC_2.42 getopt_long_collision F
 GLIBC_2.42 optctxt D 0x4
 GLIBC_2.42 opttextdomain D 0x4
 GLIBC_2.42 pthread_gettid_np F
diff --git a/sysdeps/unix/sysv/linux/arm/be/libc.abilist b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
index 8f04b7ae8f..a993bc3333 100644
--- a/sysdeps/unix/sysv/linux/arm/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
@@ -2815,6 +2815,7 @@ GLIBC_2.42 cfsetispeed F
 GLIBC_2.42 cfsetobaud F
 GLIBC_2.42 cfsetospeed F
 GLIBC_2.42 cfsetspeed F
+GLIBC_2.42 getopt_long_collision F
 GLIBC_2.42 optctxt D 0x4
 GLIBC_2.42 opttextdomain D 0x4
 GLIBC_2.42 pthread_gettid_np F
diff --git a/sysdeps/unix/sysv/linux/arm/le/libc.abilist b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
index be208a3db4..f017d0374f 100644
--- a/sysdeps/unix/sysv/linux/arm/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
@@ -2812,6 +2812,7 @@ GLIBC_2.42 cfsetispeed F
 GLIBC_2.42 cfsetobaud F
 GLIBC_2.42 cfsetospeed F
 GLIBC_2.42 cfsetspeed F
+GLIBC_2.42 getopt_long_collision F
 GLIBC_2.42 optctxt D 0x4
 GLIBC_2.42 opttextdomain D 0x4
 GLIBC_2.42 pthread_gettid_np F
diff --git a/sysdeps/unix/sysv/linux/csky/libc.abilist b/sysdeps/unix/sysv/linux/csky/libc.abilist
index 676a36c804..618a3ca494 100644
--- a/sysdeps/unix/sysv/linux/csky/libc.abilist
+++ b/sysdeps/unix/sysv/linux/csky/libc.abilist
@@ -2799,6 +2799,7 @@ GLIBC_2.42 cfsetispeed F
 GLIBC_2.42 cfsetobaud F
 GLIBC_2.42 cfsetospeed F
 GLIBC_2.42 cfsetspeed F
+GLIBC_2.42 getopt_long_collision F
 GLIBC_2.42 optctxt D 0x4
 GLIBC_2.42 opttextdomain D 0x4
 GLIBC_2.42 pthread_gettid_np F
diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist
index 3c9d88587b..67f1f86f3b 100644
--- a/sysdeps/unix/sysv/linux/hppa/libc.abilist
+++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist
@@ -2836,6 +2836,7 @@ GLIBC_2.42 cfsetispeed F
 GLIBC_2.42 cfsetobaud F
 GLIBC_2.42 cfsetospeed F
 GLIBC_2.42 cfsetspeed F
+GLIBC_2.42 getopt_long_collision F
 GLIBC_2.42 optctxt D 0x4
 GLIBC_2.42 opttextdomain D 0x4
 GLIBC_2.42 pthread_gettid_np F
diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist
index 877d1f55ce..70ab63b864 100644
--- a/sysdeps/unix/sysv/linux/i386/libc.abilist
+++ b/sysdeps/unix/sysv/linux/i386/libc.abilist
@@ -3019,6 +3019,7 @@ GLIBC_2.42 cfsetispeed F
 GLIBC_2.42 cfsetobaud F
 GLIBC_2.42 cfsetospeed F
 GLIBC_2.42 cfsetspeed F
+GLIBC_2.42 getopt_long_collision F
 GLIBC_2.42 optctxt D 0x4
 GLIBC_2.42 opttextdomain D 0x4
 GLIBC_2.42 pthread_gettid_np F
diff --git a/sysdeps/unix/sysv/linux/loongarch/lp64/libc.abilist b/sysdeps/unix/sysv/linux/loongarch/lp64/libc.abilist
index 9807fd7689..e9232f1886 100644
--- a/sysdeps/unix/sysv/linux/loongarch/lp64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/loongarch/lp64/libc.abilist
@@ -2283,6 +2283,7 @@ GLIBC_2.42 cfsetispeed F
 GLIBC_2.42 cfsetobaud F
 GLIBC_2.42 cfsetospeed F
 GLIBC_2.42 cfsetspeed F
+GLIBC_2.42 getopt_long_collision F
 GLIBC_2.42 optctxt D 0x8
 GLIBC_2.42 opttextdomain D 0x8
 GLIBC_2.42 pthread_gettid_np F
diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
index cb00b1af8c..590e64361c 100644
--- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
@@ -2795,6 +2795,7 @@ GLIBC_2.42 cfsetispeed F
 GLIBC_2.42 cfsetobaud F
 GLIBC_2.42 cfsetospeed F
 GLIBC_2.42 cfsetspeed F
+GLIBC_2.42 getopt_long_collision F
 GLIBC_2.42 optctxt D 0x4
 GLIBC_2.42 opttextdomain D 0x4
 GLIBC_2.42 pthread_gettid_np F
diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
index a45e55f2c2..6d7462bc13 100644
--- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
@@ -2962,6 +2962,7 @@ GLIBC_2.42 cfsetispeed F
 GLIBC_2.42 cfsetobaud F
 GLIBC_2.42 cfsetospeed F
 GLIBC_2.42 cfsetspeed F
+GLIBC_2.42 getopt_long_collision F
 GLIBC_2.42 optctxt D 0x4
 GLIBC_2.42 opttextdomain D 0x4
 GLIBC_2.42 pthread_gettid_np F
diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
index b92e42b03f..54a0ff3809 100644
--- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
@@ -2848,6 +2848,7 @@ GLIBC_2.42 cfsetispeed F
 GLIBC_2.42 cfsetobaud F
 GLIBC_2.42 cfsetospeed F
 GLIBC_2.42 cfsetspeed F
+GLIBC_2.42 getopt_long_collision F
 GLIBC_2.42 optctxt D 0x4
 GLIBC_2.42 opttextdomain D 0x4
 GLIBC_2.42 pthread_gettid_np F
diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
index f92c9f1299..7a521432f1 100644
--- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
@@ -2845,6 +2845,7 @@ GLIBC_2.42 cfsetispeed F
 GLIBC_2.42 cfsetobaud F
 GLIBC_2.42 cfsetospeed F
 GLIBC_2.42 cfsetspeed F
+GLIBC_2.42 getopt_long_collision F
 GLIBC_2.42 optctxt D 0x4
 GLIBC_2.42 opttextdomain D 0x4
 GLIBC_2.42 pthread_gettid_np F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
index 0ee8381ce8..5c1d8129bc 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
@@ -2923,6 +2923,7 @@ GLIBC_2.42 cfsetispeed F
 GLIBC_2.42 cfsetobaud F
 GLIBC_2.42 cfsetospeed F
 GLIBC_2.42 cfsetspeed F
+GLIBC_2.42 getopt_long_collision F
 GLIBC_2.42 optctxt D 0x4
 GLIBC_2.42 opttextdomain D 0x4
 GLIBC_2.42 pthread_gettid_np F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
index 2a1f87865c..fda37fac7d 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
@@ -2921,6 +2921,7 @@ GLIBC_2.42 cfsetispeed F
 GLIBC_2.42 cfsetobaud F
 GLIBC_2.42 cfsetospeed F
 GLIBC_2.42 cfsetspeed F
+GLIBC_2.42 getopt_long_collision F
 GLIBC_2.42 optctxt D 0x4
 GLIBC_2.42 opttextdomain D 0x4
 GLIBC_2.42 pthread_gettid_np F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
index 16f1823f35..69575159f0 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
@@ -2929,6 +2929,7 @@ GLIBC_2.42 cfsetispeed F
 GLIBC_2.42 cfsetobaud F
 GLIBC_2.42 cfsetospeed F
 GLIBC_2.42 cfsetspeed F
+GLIBC_2.42 getopt_long_collision F
 GLIBC_2.42 optctxt D 0x4
 GLIBC_2.42 opttextdomain D 0x4
 GLIBC_2.42 pthread_gettid_np F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
index fb26a763bf..cae8ca3bf5 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
@@ -2831,6 +2831,7 @@ GLIBC_2.42 cfsetispeed F
 GLIBC_2.42 cfsetobaud F
 GLIBC_2.42 cfsetospeed F
 GLIBC_2.42 cfsetspeed F
+GLIBC_2.42 getopt_long_collision F
 GLIBC_2.42 optctxt D 0x8
 GLIBC_2.42 opttextdomain D 0x8
 GLIBC_2.42 pthread_gettid_np F
diff --git a/sysdeps/unix/sysv/linux/or1k/libc.abilist b/sysdeps/unix/sysv/linux/or1k/libc.abilist
index aeb2ec2e9c..8c49696f77 100644
--- a/sysdeps/unix/sysv/linux/or1k/libc.abilist
+++ b/sysdeps/unix/sysv/linux/or1k/libc.abilist
@@ -2273,6 +2273,7 @@ GLIBC_2.42 cfsetispeed F
 GLIBC_2.42 cfsetobaud F
 GLIBC_2.42 cfsetospeed F
 GLIBC_2.42 cfsetspeed F
+GLIBC_2.42 getopt_long_collision F
 GLIBC_2.42 optctxt D 0x4
 GLIBC_2.42 opttextdomain D 0x4
 GLIBC_2.42 pthread_gettid_np F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
index 6e3b25ac49..5c9d109831 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
@@ -3152,6 +3152,7 @@ GLIBC_2.42 cfsetispeed F
 GLIBC_2.42 cfsetobaud F
 GLIBC_2.42 cfsetospeed F
 GLIBC_2.42 cfsetspeed F
+GLIBC_2.42 getopt_long_collision F
 GLIBC_2.42 optctxt D 0x4
 GLIBC_2.42 opttextdomain D 0x4
 GLIBC_2.42 pthread_gettid_np F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
index 1a6d29e033..b3e691554d 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
@@ -3197,6 +3197,7 @@ GLIBC_2.42 cfsetispeed F
 GLIBC_2.42 cfsetobaud F
 GLIBC_2.42 cfsetospeed F
 GLIBC_2.42 cfsetspeed F
+GLIBC_2.42 getopt_long_collision F
 GLIBC_2.42 optctxt D 0x4
 GLIBC_2.42 opttextdomain D 0x4
 GLIBC_2.42 pthread_gettid_np F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
index 199553d871..7fe0414d3f 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
@@ -2906,6 +2906,7 @@ GLIBC_2.42 cfsetispeed F
 GLIBC_2.42 cfsetobaud F
 GLIBC_2.42 cfsetospeed F
 GLIBC_2.42 cfsetspeed F
+GLIBC_2.42 getopt_long_collision F
 GLIBC_2.42 optctxt D 0x8
 GLIBC_2.42 opttextdomain D 0x8
 GLIBC_2.42 pthread_gettid_np F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
index 89f9661ef3..a2dc49db97 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
@@ -2982,6 +2982,7 @@ GLIBC_2.42 cfsetispeed F
 GLIBC_2.42 cfsetobaud F
 GLIBC_2.42 cfsetospeed F
 GLIBC_2.42 cfsetspeed F
+GLIBC_2.42 getopt_long_collision F
 GLIBC_2.42 optctxt D 0x8
 GLIBC_2.42 opttextdomain D 0x8
 GLIBC_2.42 pthread_gettid_np F
diff --git a/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist b/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
index 42ddd9ed3e..48df6f7cde 100644
--- a/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
@@ -2526,6 +2526,7 @@ GLIBC_2.42 cfsetispeed F
 GLIBC_2.42 cfsetobaud F
 GLIBC_2.42 cfsetospeed F
 GLIBC_2.42 cfsetspeed F
+GLIBC_2.42 getopt_long_collision F
 GLIBC_2.42 optctxt D 0x4
 GLIBC_2.42 opttextdomain D 0x4
 GLIBC_2.42 pthread_gettid_np F
diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist b/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
index 82f7d36e01..0a0b32eaa9 100644
--- a/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
@@ -2726,6 +2726,7 @@ GLIBC_2.42 cfsetispeed F
 GLIBC_2.42 cfsetobaud F
 GLIBC_2.42 cfsetospeed F
 GLIBC_2.42 cfsetspeed F
+GLIBC_2.42 getopt_long_collision F
 GLIBC_2.42 optctxt D 0x8
 GLIBC_2.42 opttextdomain D 0x8
 GLIBC_2.42 pthread_gettid_np F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
index 5cb06233a2..7221d9ce78 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
@@ -3150,6 +3150,7 @@ GLIBC_2.42 cfsetispeed F
 GLIBC_2.42 cfsetobaud F
 GLIBC_2.42 cfsetospeed F
 GLIBC_2.42 cfsetspeed F
+GLIBC_2.42 getopt_long_collision F
 GLIBC_2.42 optctxt D 0x4
 GLIBC_2.42 opttextdomain D 0x4
 GLIBC_2.42 pthread_gettid_np F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
index 32ec7f28b2..c5a333ea8f 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
@@ -2943,6 +2943,7 @@ GLIBC_2.42 cfsetispeed F
 GLIBC_2.42 cfsetobaud F
 GLIBC_2.42 cfsetospeed F
 GLIBC_2.42 cfsetspeed F
+GLIBC_2.42 getopt_long_collision F
 GLIBC_2.42 optctxt D 0x8
 GLIBC_2.42 opttextdomain D 0x8
 GLIBC_2.42 pthread_gettid_np F
diff --git a/sysdeps/unix/sysv/linux/sh/be/libc.abilist b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
index 1efe9aae8c..b7252b22d9 100644
--- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
@@ -2842,6 +2842,7 @@ GLIBC_2.42 cfsetispeed F
 GLIBC_2.42 cfsetobaud F
 GLIBC_2.42 cfsetospeed F
 GLIBC_2.42 cfsetspeed F
+GLIBC_2.42 getopt_long_collision F
 GLIBC_2.42 optctxt D 0x4
 GLIBC_2.42 opttextdomain D 0x4
 GLIBC_2.42 pthread_gettid_np F
diff --git a/sysdeps/unix/sysv/linux/sh/le/libc.abilist b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
index 13c1d88d1c..ca461307de 100644
--- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
@@ -2839,6 +2839,7 @@ GLIBC_2.42 cfsetispeed F
 GLIBC_2.42 cfsetobaud F
 GLIBC_2.42 cfsetospeed F
 GLIBC_2.42 cfsetspeed F
+GLIBC_2.42 getopt_long_collision F
 GLIBC_2.42 optctxt D 0x4
 GLIBC_2.42 opttextdomain D 0x4
 GLIBC_2.42 pthread_gettid_np F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
index c49edb2026..d42265fb28 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
@@ -3171,6 +3171,7 @@ GLIBC_2.42 cfsetispeed F
 GLIBC_2.42 cfsetobaud F
 GLIBC_2.42 cfsetospeed F
 GLIBC_2.42 cfsetspeed F
+GLIBC_2.42 getopt_long_collision F
 GLIBC_2.42 optctxt D 0x4
 GLIBC_2.42 opttextdomain D 0x4
 GLIBC_2.42 pthread_gettid_np F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
index a5a4263ddd..7433fea93a 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
@@ -2807,6 +2807,7 @@ GLIBC_2.42 cfsetispeed F
 GLIBC_2.42 cfsetobaud F
 GLIBC_2.42 cfsetospeed F
 GLIBC_2.42 cfsetspeed F
+GLIBC_2.42 getopt_long_collision F
 GLIBC_2.42 optctxt D 0x8
 GLIBC_2.42 opttextdomain D 0x8
 GLIBC_2.42 pthread_gettid_np F
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
index 10d2ed46e4..3294f6e63f 100644
--- a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
@@ -2758,6 +2758,7 @@ GLIBC_2.42 cfsetispeed F
 GLIBC_2.42 cfsetobaud F
 GLIBC_2.42 cfsetospeed F
 GLIBC_2.42 cfsetspeed F
+GLIBC_2.42 getopt_long_collision F
 GLIBC_2.42 optctxt D 0x8
 GLIBC_2.42 opttextdomain D 0x8
 GLIBC_2.42 pthread_gettid_np F
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
index ca5986772a..cf5facf812 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
@@ -2777,6 +2777,7 @@ GLIBC_2.42 cfsetispeed F
 GLIBC_2.42 cfsetobaud F
 GLIBC_2.42 cfsetospeed F
 GLIBC_2.42 cfsetspeed F
+GLIBC_2.42 getopt_long_collision F
 GLIBC_2.42 optctxt D 0x4
 GLIBC_2.42 opttextdomain D 0x4
 GLIBC_2.42 pthread_gettid_np F
-- 
2.49.0



More information about the Libc-alpha mailing list