[PATCH v18 02/11] posix: let the getopt caller set the translation context
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Tue Dec 2 18:17:23 GMT 2025
On 23/11/25 14:07, Vivien Kraus wrote:
> Option names are typically one word, so they could be translated
> differently in different parts of the program. The use of a context
> lets the translator pick the most appropriate translation when used in
> the command-line.
>
> Another possibility would be to prepend two dashes to the option name
> before translation, such that it would be obvious this is the
> command-line option name. However, it would be difficult to mark this
> string for translation (to be processed by xgettext).
>
> This patch creates a new global variable / reentrant state field,
> optctxt, a pointer, so that the caller can override it. If it is not
> set, or set to NULL, then no translated option name will be
> recognized.
>
> pgettext_expr is not available yet, so we use a custom function to
> combine the context and the long option name, and discard the context
> if no translation was performed.
> ---
>
> Dear Adhemerval Zanella Netto,
>
> I have followed your advice and used __asprintf, so the malloc/free
> suggestion does not matter. Thank you for pointing this out.
>
> Best regards,
>
> Vivien
>
> manual/getopt.texi | 14 +++++-
> posix/Versions | 3 ++
> posix/bits/getopt_ext.h | 7 +++
> posix/getopt.c | 27 +++++++----
> posix/getopt1.c | 46 +++++++++++++++++--
> posix/getopt_int.h | 6 ++-
> posix/tstgetoptl.c | 26 +++++++++--
> posix/tstgetoptl.po | 2 +
> 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 +
> 42 files changed, 144 insertions(+), 21 deletions(-)
>
> diff --git a/manual/getopt.texi b/manual/getopt.texi
> index 5ae22a1595..4276c9b5e8 100644
> --- a/manual/getopt.texi
> +++ b/manual/getopt.texi
> @@ -53,6 +53,16 @@ This variable is set by @code{getopt} to point at the value of the
> option argument, for those options that accept arguments.
> @end deftypevar
>
> +@deftypevar {const char *} optctxt
> +In order to match translated option names, @code{getopt} looks for the
> +names in the current textdomain. Since option names may be short
> +words instead of long sentences, they may have different translations
> +in other places of the program. @xref{Contexts, , Using contexts for
> +solving ambiguities, gettext, the GNU Gettext manual}, for more
> +information. If this is @code{NULL}, then the translated option names
> +will not be processed.
> +@end deftypevar
> +
> @deftypefun int getopt (int @var{argc}, char *const *@var{argv}, const char *@var{options})
> @standards{POSIX.2, unistd.h}
> @safety{@prelim{}@mtunsafe{@mtasurace{:getopt} @mtsenv{}}@asunsafe{@ascuheap{} @ascuintl{} @asulock{} @asucorrupt{}}@acunsafe{@acsmem{} @aculock{} @acucorrupt{}}}
> @@ -224,7 +234,9 @@ The @code{struct option} structure has these fields:
> @item const char *name
> This field is the name of the option. It is a string. In order for
> @command{getopt_long} to accept either the long option name or its
> -translated form, you should mark this string for translation.
> +translated form, you should mark this string for translation with a
> +translation context, and set @code{optctxt} to the translation
> +context.
>
> @item int has_arg
> This field says whether the option takes an argument. It is an integer,
> diff --git a/posix/Versions b/posix/Versions
> index 0624d24bcc..5873e8ec56 100644
> --- a/posix/Versions
> +++ b/posix/Versions
> @@ -159,6 +159,9 @@ libc {
> GLIBC_2.35 {
> posix_spawn_file_actions_addtcsetpgrp_np;
> }
> + GLIBC_2.43 {
> + optctxt;
> + }
> GLIBC_PRIVATE {
> __libc_fork; __libc_pread; __libc_pwrite;
> __nanosleep_nocancel; __pause_nocancel;
> diff --git a/posix/bits/getopt_ext.h b/posix/bits/getopt_ext.h
> index 42be8ec38e..fa72124cad 100644
> --- a/posix/bits/getopt_ext.h
> +++ b/posix/bits/getopt_ext.h
> @@ -26,6 +26,13 @@
>
> __BEGIN_DECLS
>
> +#ifdef __USE_GNU
> +/* Callers store the translation context in which to retrieve option
> + names. If unset, the option names will not be translated. */
> +
> +extern const char *optctxt;
> +#endif
> +
> /* Describe the long-named options requested by the application.
> The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
> of 'struct option' terminated by an element containing a name which is
> diff --git a/posix/getopt.c b/posix/getopt.c
> index b49dfb643f..1f7e6e4216 100644
> --- a/posix/getopt.c
> +++ b/posix/getopt.c
> @@ -182,17 +182,19 @@ exchange (char **argv, struct _getopt_data *d)
> d->__last_nonopt = d->optind;
> }
>
> -/* Return 1 iff a translation for opt_name has been found and it
> - matches the substring from argument, length argument_length.
> +/* Return 1 iff translation_context is not NULL, a translation for
> + opt_name has been found and it matches the substring from argument,
> + length argument_length.
> */
> static const int
> -match_translated_option_name (char *(*translate) (const char *msgid),
> +match_translated_option_name (char *(*translate) (const char *, const char *),
> const char *argument, size_t argument_length,
> + const char *translation_context,
> const char *opt_name)
> {
> const char *translated = opt_name;
> if (translate != NULL)
> - translated = translate (opt_name);
> + translated = translate (translation_context, opt_name);
> return (!strncmp (translated, argument, argument_length)
> && argument_length == strlen (translated));
> }
> @@ -210,7 +212,7 @@ process_long_option (int argc, char **argv, const char *optstring,
> const struct option *longopts, int *longind,
> int long_only, struct _getopt_data *d,
> int print_errors, const char *prefix,
> - char *(*translate) (const char *msgid))
> + char *(*translate) (const char *, const char *))
> {
> char *nameend;
> size_t namelen;
> @@ -241,7 +243,9 @@ process_long_option (int argc, char **argv, const char *optstring,
> /* Didn't find an exact match, try with translated option
> names. */
> for (p = longopts, option_index = 0; p->name; p++, option_index++)
> - if (match_translated_option_name (translate, d->__nextchar, namelen, p->name))
> + if (match_translated_option_name (translate,
> + d->__nextchar, namelen,
> + d->optctxt, p->name))
> {
> /* Exact match found with translation. */
> pfound = p;
> @@ -365,7 +369,7 @@ process_long_option (int argc, char **argv, const char *optstring,
> /* We have found a matching long option. Consume it. */
> d->optind++;
> d->__nextchar = NULL;
> - translated_option_name = translate (pfound->name);
> + translated_option_name = translate (d->optctxt, pfound->name);
> if (*nameend)
> {
> /* Don't test has_arg with >, because some C compilers don't
> @@ -527,7 +531,7 @@ int
> _getopt_internal_r (int argc, char **argv, const char *optstring,
> const struct option *longopts, int *longind,
> int long_only, struct _getopt_data *d, int posixly_correct,
> - char *(*translate) (const char *msgid))
> + char *(*translate) (const char *, const char *))
> {
> int print_errors = d->opterr;
>
> @@ -762,12 +766,15 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
> int
> _getopt_internal (int argc, char **argv, const char *optstring,
> const struct option *longopts, int *longind, int long_only,
> - int posixly_correct, char *(*translate) (const char *))
> + int posixly_correct,
> + char *(*translate) (const char *, const char *),
> + const char *ctxt)
> {
> int result;
>
> getopt_data.optind = optind;
> getopt_data.opterr = opterr;
> + getopt_data.optctxt = ctxt;
>
> result = _getopt_internal_r (argc, argv, optstring, longopts,
> longind, long_only, &getopt_data,
> @@ -790,7 +797,7 @@ _getopt_internal (int argc, char **argv, const char *optstring,
> { \
> return _getopt_internal (argc, (char **)argv, optstring, \
> NULL, NULL, 0, POSIXLY_CORRECT, \
> - NULL); \
> + NULL, NULL); \
> }
>
> #ifdef _LIBC
> diff --git a/posix/getopt1.c b/posix/getopt1.c
> index 6bf0087344..60d516403c 100644
> --- a/posix/getopt1.c
> +++ b/posix/getopt1.c
> @@ -26,13 +26,51 @@
>
> #include "getopt.h"
> #include "getopt_int.h"
> +#include <stdlib.h>
> +#include <string.h>
> +#include <stdio.h>
> +
> +/* Callers store an optional context to enable option name
> + translation. */
> +
> +const char *optctxt = NULL;
> +
> +/* FIXME: use pgettext_expr. */
> +static char *
> +do_translate (const char *context, const char *msgid)
> +{
> + char *full_msgid;
> + const char *translated = msgid;
> + int output_length = 0;
> +
> + if (context != NULL)
> + {
> + output_length = __asprintf (&full_msgid, "%s\004%s", context, msgid);
> + if (output_length >= 0)
> + {
> + translated = __dcgettext (NULL, full_msgid, LC_MESSAGES);
> + if (strcmp (translated, full_msgid) == 0)
> + {
> + /* No translation for this context and message, so drop
> + the context + ^D prefix. */
> + translated = msgid;
> + }
> + }
> + /* Otherwise, if memory allocation failed, then we won’t accept
> + translations. translated remains an alias to msgid. */
> + free (full_msgid);
Wouldn't this possible return a free pointer as translated? On __dcgettext,
it calls __dcigettext (NULL, full_msgid, NULL, 0, 0, LC_MESSAGES) and then:
454 char *
455 DCIGETTEXT (const char *domainname, const char *msgid1, const char *msgid2,
456 int plural, unsigned long int n, int category)
457 #endif
458 {
[...]
826 __set_errno (saved_errno);
827 return (plural == 0
828 ? (char *) msgid1
829 /* Use the Germanic plural rule. */
830 : n == 1 ? (char *) msgid1 : (char *) msgid2);
831 }
488 #endif
For the unstranslted case? Or am I missing something here?
> + }
> + else
> + translated = msgid;
> + return (char *) translated;
> +}
>
> int
> getopt_long (int argc, char *__getopt_argv_const *argv, const char *options,
> const struct option *long_options, int *opt_index)
> {
> return _getopt_internal (argc, (char **) argv, options, long_options,
> - opt_index, 0, 0, gettext);
> + opt_index, 0, 0, do_translate, optctxt);
> }
>
> int
> @@ -41,7 +79,7 @@ _getopt_long_r (int argc, char **argv, const char *options,
> struct _getopt_data *d)
> {
> return _getopt_internal_r (argc, argv, options, long_options, opt_index,
> - 0, d, 0, gettext);
> + 0, d, 0, do_translate);
> }
>
> /* Like getopt_long, but '-' as well as '--' can indicate a long option.
> @@ -55,7 +93,7 @@ getopt_long_only (int argc, char *__getopt_argv_const *argv,
> const struct option *long_options, int *opt_index)
> {
> return _getopt_internal (argc, (char **) argv, options, long_options,
> - opt_index, 1, 0, gettext);
> + opt_index, 1, 0, do_translate, optctxt);
> }
>
> int
> @@ -64,7 +102,7 @@ _getopt_long_only_r (int argc, char **argv, const char *options,
> struct _getopt_data *d)
> {
> return _getopt_internal_r (argc, argv, options, long_options, opt_index,
> - 1, d, 0, gettext);
> + 1, d, 0, do_translate);
> }
>
>
> diff --git a/posix/getopt_int.h b/posix/getopt_int.h
> index 26691c6831..a2f3c60c25 100644
> --- a/posix/getopt_int.h
> +++ b/posix/getopt_int.h
> @@ -29,7 +29,8 @@ extern int _getopt_internal (int ___argc, char **___argv,
> const char *__shortopts,
> const struct option *__longopts, int *__longind,
> int __long_only, int __posixly_correct,
> - char *(*translate) (const char *msgid));
> + char *(*translate) (const char *, const char *),
> + const char *__optctxt);
>
>
> /* Reentrant versions which can handle parsing multiple argument
> @@ -71,6 +72,7 @@ struct _getopt_data
> int opterr;
> int optopt;
> char *optarg;
> + const char *optctxt;
>
> /* Internal members. */
>
> @@ -107,7 +109,7 @@ extern int _getopt_internal_r (int ___argc, char **___argv,
> const struct option *__longopts, int *__longind,
> int __long_only, struct _getopt_data *__data,
> int __posixly_correct,
> - char *(*translate) (const char *msgid));
> + char *(*translate) (const char *, const char *));
>
> extern int _getopt_long_r (int ___argc, char **___argv,
> const char *__shortopts,
> diff --git a/posix/tstgetoptl.c b/posix/tstgetoptl.c
> index ce5cdc209b..3d8aa44f1d 100644
> --- a/posix/tstgetoptl.c
> +++ b/posix/tstgetoptl.c
> @@ -34,6 +34,8 @@
> precedence over translated options, by translated "optional" as
> "required". */
>
> +#define TRANSLATION_CONTEXT "command-line option"
> +
> static void
> prepare_localedir (void)
> {
> @@ -42,7 +44,7 @@ prepare_localedir (void)
> TEST_VERIFY_EXIT (bindtextdomain ("tstgetoptl", OBJPFX "domaindir") != NULL);
> TEST_VERIFY_EXIT (textdomain ("tstgetoptl") != NULL);
> /* Check that the catalog is OK: */
> - TEST_COMPARE_STRING (gettext ("color"), "colour");
> + TEST_COMPARE_STRING (gettext (TRANSLATION_CONTEXT "\004" "color"), "colour");
> }
>
> static char **
> @@ -59,8 +61,9 @@ prepare_argv (int *argc)
> }
>
> static void
> -do_my_test (void)
> +do_my_test (int with_optctxt)
> {
> + static const char *translation_context = TRANSLATION_CONTEXT;
> int argc;
> char **argv = prepare_argv (&argc);
> static const struct option options[] =
> @@ -78,6 +81,10 @@ do_my_test (void)
> int index;
> int c;
>
> + if (with_optctxt)
> + optctxt = translation_context;
> + else
> + optctxt = NULL;
> optind = 0;
> while ((c = getopt_long (argc, argv, "", options, NULL)) >= 0)
> switch (c)
> @@ -86,7 +93,14 @@ do_my_test (void)
> ++Cflag;
> break;
> case '?':
> - FAIL ("Unknown option.\n");
> + fputs ("Unknown option.\n", stderr);
> + if (!with_optctxt)
> + {
> + /* This is OK; --colour should not exist if we did not set
> + optctxt. */
> + return;
> + }
> + FAIL("The unknown option should not have happened since optctxt is set.\n");
> return;
> default:
> /* This should not happen. */
> @@ -106,6 +120,9 @@ do_my_test (void)
>
> printf ("Cflags = %d\n", Cflag);
>
> + /* We should not have continued past the '?' case if optctxt is
> + missing. */
> + TEST_COMPARE (with_optctxt, 1);
> TEST_COMPARE (Cflag, 3);
>
> for (index = optind; index < argc; index++)
> @@ -118,7 +135,8 @@ int
> do_test (void)
> {
> prepare_localedir ();
> - do_my_test ();
> + do_my_test (0);
> + do_my_test (1);
> return 0;
> }
>
> diff --git a/posix/tstgetoptl.po b/posix/tstgetoptl.po
> index 25cd595790..e060c0d6e3 100644
> --- a/posix/tstgetoptl.po
> +++ b/posix/tstgetoptl.po
> @@ -16,10 +16,12 @@ msgstr ""
> "Plural-Forms: nplurals=2; plural=(n != 1);\n"
>
> #: xxx.c:yy
> +msgctxt "command-line option"
> msgid "color"
> msgstr "colour"
>
> # This is to make sure the translator cannot redirect options.
> #: xxx.c:yy
> +msgctxt "command-line option"
> msgid "optional"
> msgstr "required"
> diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist
> index 08dcd85cd9..68c4385301 100644
> --- a/sysdeps/mach/hurd/i386/libc.abilist
> +++ b/sysdeps/mach/hurd/i386/libc.abilist
> @@ -2715,6 +2715,7 @@ GLIBC_2.43 mtx_lock F
> GLIBC_2.43 mtx_timedlock F
> GLIBC_2.43 mtx_trylock F
> GLIBC_2.43 mtx_unlock F
> +GLIBC_2.43 optctxt D 0x4
> GLIBC_2.43 pthread_cancel F
> GLIBC_2.43 pthread_clockjoin_np F
> GLIBC_2.43 pthread_create F
> diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist
> index c17d5399e4..d5fdb20fe1 100644
> --- a/sysdeps/mach/hurd/x86_64/libc.abilist
> +++ b/sysdeps/mach/hurd/x86_64/libc.abilist
> @@ -2392,6 +2392,7 @@ GLIBC_2.43 mtx_lock F
> GLIBC_2.43 mtx_timedlock F
> GLIBC_2.43 mtx_trylock F
> GLIBC_2.43 mtx_unlock F
> +GLIBC_2.43 optctxt D 0x8
> GLIBC_2.43 pthread_cancel F
> GLIBC_2.43 pthread_clockjoin_np F
> GLIBC_2.43 pthread_create F
> diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
> index d161d268d9..b5eaa54c18 100644
> --- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
> @@ -2773,4 +2773,5 @@ GLIBC_2.43 free_sized F
> GLIBC_2.43 memalignment F
> GLIBC_2.43 memset_explicit F
> GLIBC_2.43 mseal F
> +GLIBC_2.43 optctxt D 0x8
> GLIBC_2.43 umaxabs F
> diff --git a/sysdeps/unix/sysv/linux/alpha/libc.abilist b/sysdeps/unix/sysv/linux/alpha/libc.abilist
> index 62879b6a08..9d38721287 100644
> --- a/sysdeps/unix/sysv/linux/alpha/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/alpha/libc.abilist
> @@ -3120,6 +3120,7 @@ GLIBC_2.43 free_sized F
> GLIBC_2.43 memalignment F
> GLIBC_2.43 memset_explicit F
> GLIBC_2.43 mseal F
> +GLIBC_2.43 optctxt D 0x8
> GLIBC_2.43 umaxabs F
> GLIBC_2.5 __readlinkat_chk F
> GLIBC_2.5 inet6_opt_append F
> diff --git a/sysdeps/unix/sysv/linux/arc/libc.abilist b/sysdeps/unix/sysv/linux/arc/libc.abilist
> index bd5fa65e93..3d4a038e25 100644
> --- a/sysdeps/unix/sysv/linux/arc/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/arc/libc.abilist
> @@ -2534,4 +2534,5 @@ GLIBC_2.43 free_sized F
> GLIBC_2.43 memalignment F
> GLIBC_2.43 memset_explicit F
> GLIBC_2.43 mseal F
> +GLIBC_2.43 optctxt D 0x4
> GLIBC_2.43 umaxabs F
> diff --git a/sysdeps/unix/sysv/linux/arm/be/libc.abilist b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
> index 7d975dafab..5a231c61bc 100644
> --- a/sysdeps/unix/sysv/linux/arm/be/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
> @@ -2826,6 +2826,7 @@ GLIBC_2.43 free_sized F
> GLIBC_2.43 memalignment F
> GLIBC_2.43 memset_explicit F
> GLIBC_2.43 mseal F
> +GLIBC_2.43 optctxt D 0x4
> GLIBC_2.43 umaxabs F
> GLIBC_2.5 __readlinkat_chk F
> GLIBC_2.5 inet6_opt_append F
> diff --git a/sysdeps/unix/sysv/linux/arm/le/libc.abilist b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
> index c95bbfe6df..75105c3e38 100644
> --- a/sysdeps/unix/sysv/linux/arm/le/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
> @@ -2823,6 +2823,7 @@ GLIBC_2.43 free_sized F
> GLIBC_2.43 memalignment F
> GLIBC_2.43 memset_explicit F
> GLIBC_2.43 mseal F
> +GLIBC_2.43 optctxt D 0x4
> GLIBC_2.43 umaxabs F
> GLIBC_2.5 __readlinkat_chk F
> GLIBC_2.5 inet6_opt_append F
> diff --git a/sysdeps/unix/sysv/linux/csky/libc.abilist b/sysdeps/unix/sysv/linux/csky/libc.abilist
> index 6fc91899ff..8bb4ed2926 100644
> --- a/sysdeps/unix/sysv/linux/csky/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/csky/libc.abilist
> @@ -2810,4 +2810,5 @@ GLIBC_2.43 free_sized F
> GLIBC_2.43 memalignment F
> GLIBC_2.43 memset_explicit F
> GLIBC_2.43 mseal F
> +GLIBC_2.43 optctxt D 0x4
> GLIBC_2.43 umaxabs F
> diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist
> index 8a83722bf5..e88a350c36 100644
> --- a/sysdeps/unix/sysv/linux/hppa/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist
> @@ -2847,6 +2847,7 @@ GLIBC_2.43 free_sized F
> GLIBC_2.43 memalignment F
> GLIBC_2.43 memset_explicit F
> GLIBC_2.43 mseal F
> +GLIBC_2.43 optctxt D 0x4
> GLIBC_2.43 umaxabs F
> GLIBC_2.5 __readlinkat_chk F
> GLIBC_2.5 inet6_opt_append F
> diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist
> index 3b96177e1d..9233d17385 100644
> --- a/sysdeps/unix/sysv/linux/i386/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/i386/libc.abilist
> @@ -3030,6 +3030,7 @@ GLIBC_2.43 free_sized F
> GLIBC_2.43 memalignment F
> GLIBC_2.43 memset_explicit F
> GLIBC_2.43 mseal F
> +GLIBC_2.43 optctxt D 0x4
> GLIBC_2.43 umaxabs F
> GLIBC_2.5 __readlinkat_chk F
> GLIBC_2.5 inet6_opt_append F
> diff --git a/sysdeps/unix/sysv/linux/loongarch/lp64/libc.abilist b/sysdeps/unix/sysv/linux/loongarch/lp64/libc.abilist
> index bc39d18d6d..35ed82fb7c 100644
> --- a/sysdeps/unix/sysv/linux/loongarch/lp64/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/loongarch/lp64/libc.abilist
> @@ -2294,4 +2294,5 @@ GLIBC_2.43 free_sized F
> GLIBC_2.43 memalignment F
> GLIBC_2.43 memset_explicit F
> GLIBC_2.43 mseal F
> +GLIBC_2.43 optctxt D 0x8
> GLIBC_2.43 umaxabs F
> diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
> index b42b4fe920..8bcba20577 100644
> --- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
> @@ -2806,6 +2806,7 @@ GLIBC_2.43 free_sized F
> GLIBC_2.43 memalignment F
> GLIBC_2.43 memset_explicit F
> GLIBC_2.43 mseal F
> +GLIBC_2.43 optctxt D 0x4
> GLIBC_2.43 umaxabs F
> GLIBC_2.5 __readlinkat_chk F
> GLIBC_2.5 inet6_opt_append F
> diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
> index 854bf3c149..fea62ef3ac 100644
> --- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
> @@ -2973,6 +2973,7 @@ GLIBC_2.43 free_sized F
> GLIBC_2.43 memalignment F
> GLIBC_2.43 memset_explicit F
> GLIBC_2.43 mseal F
> +GLIBC_2.43 optctxt D 0x4
> GLIBC_2.43 umaxabs F
> GLIBC_2.5 __readlinkat_chk F
> GLIBC_2.5 inet6_opt_append F
> diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
> index ab3d67bd60..792d82a8cd 100644
> --- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
> @@ -2859,4 +2859,5 @@ GLIBC_2.43 free_sized F
> GLIBC_2.43 memalignment F
> GLIBC_2.43 memset_explicit F
> GLIBC_2.43 mseal F
> +GLIBC_2.43 optctxt D 0x4
> GLIBC_2.43 umaxabs F
> diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
> index 510b3a24d0..f56268954d 100644
> --- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
> @@ -2856,4 +2856,5 @@ GLIBC_2.43 free_sized F
> GLIBC_2.43 memalignment F
> GLIBC_2.43 memset_explicit F
> GLIBC_2.43 mseal F
> +GLIBC_2.43 optctxt D 0x4
> GLIBC_2.43 umaxabs F
> diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
> index dd2baab3c9..ce6fdb0368 100644
> --- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
> @@ -2936,6 +2936,7 @@ GLIBC_2.43 free_sized F
> GLIBC_2.43 memalignment F
> GLIBC_2.43 memset_explicit F
> GLIBC_2.43 mseal F
> +GLIBC_2.43 optctxt D 0x4
> GLIBC_2.43 umaxabs F
> GLIBC_2.5 __readlinkat_chk F
> GLIBC_2.5 inet6_opt_append F
> diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
> index 88fa8b9a97..45676efa7b 100644
> --- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
> @@ -2934,6 +2934,7 @@ GLIBC_2.43 free_sized F
> GLIBC_2.43 memalignment F
> GLIBC_2.43 memset_explicit F
> GLIBC_2.43 mseal F
> +GLIBC_2.43 optctxt D 0x4
> GLIBC_2.43 umaxabs F
> GLIBC_2.5 __readlinkat_chk F
> GLIBC_2.5 inet6_opt_append F
> diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
> index 00993fef2b..b2557cf712 100644
> --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
> @@ -2942,6 +2942,7 @@ GLIBC_2.43 free_sized F
> GLIBC_2.43 memalignment F
> GLIBC_2.43 memset_explicit F
> GLIBC_2.43 mseal F
> +GLIBC_2.43 optctxt D 0x4
> GLIBC_2.43 umaxabs F
> GLIBC_2.5 __readlinkat_chk F
> GLIBC_2.5 inet6_opt_append F
> diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
> index 136da09f71..3c51ddb219 100644
> --- a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
> @@ -2844,6 +2844,7 @@ GLIBC_2.43 free_sized F
> GLIBC_2.43 memalignment F
> GLIBC_2.43 memset_explicit F
> GLIBC_2.43 mseal F
> +GLIBC_2.43 optctxt D 0x8
> GLIBC_2.43 umaxabs F
> GLIBC_2.5 __readlinkat_chk F
> GLIBC_2.5 inet6_opt_append F
> diff --git a/sysdeps/unix/sysv/linux/or1k/libc.abilist b/sysdeps/unix/sysv/linux/or1k/libc.abilist
> index 1a2a3673c7..6fdbaf4335 100644
> --- a/sysdeps/unix/sysv/linux/or1k/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/or1k/libc.abilist
> @@ -2284,4 +2284,5 @@ GLIBC_2.43 free_sized F
> GLIBC_2.43 memalignment F
> GLIBC_2.43 memset_explicit F
> GLIBC_2.43 mseal F
> +GLIBC_2.43 optctxt D 0x4
> GLIBC_2.43 umaxabs F
> diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
> index f00901f956..6ce0ec58a3 100644
> --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
> @@ -3163,6 +3163,7 @@ GLIBC_2.43 free_sized F
> GLIBC_2.43 memalignment F
> GLIBC_2.43 memset_explicit F
> GLIBC_2.43 mseal F
> +GLIBC_2.43 optctxt D 0x4
> GLIBC_2.43 umaxabs F
> GLIBC_2.5 __readlinkat_chk F
> GLIBC_2.5 inet6_opt_append F
> diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
> index de23059026..7979c7e481 100644
> --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
> @@ -3208,6 +3208,7 @@ GLIBC_2.43 free_sized F
> GLIBC_2.43 memalignment F
> GLIBC_2.43 memset_explicit F
> GLIBC_2.43 mseal F
> +GLIBC_2.43 optctxt D 0x4
> GLIBC_2.43 umaxabs F
> GLIBC_2.5 __readlinkat_chk F
> GLIBC_2.5 inet6_opt_append F
> diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
> index 1ae78ec7ef..9a9caec7ac 100644
> --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
> @@ -2917,6 +2917,7 @@ GLIBC_2.43 free_sized F
> GLIBC_2.43 memalignment F
> GLIBC_2.43 memset_explicit F
> GLIBC_2.43 mseal F
> +GLIBC_2.43 optctxt D 0x8
> GLIBC_2.43 umaxabs F
> GLIBC_2.5 __readlinkat_chk F
> GLIBC_2.5 inet6_opt_append F
> diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
> index 53cb317a09..4091a4b381 100644
> --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
> @@ -2993,4 +2993,5 @@ GLIBC_2.43 free_sized F
> GLIBC_2.43 memalignment F
> GLIBC_2.43 memset_explicit F
> GLIBC_2.43 mseal F
> +GLIBC_2.43 optctxt D 0x8
> GLIBC_2.43 umaxabs F
> diff --git a/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist b/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
> index e6fd213d5c..c87b4b6743 100644
> --- a/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
> @@ -2537,4 +2537,5 @@ GLIBC_2.43 free_sized F
> GLIBC_2.43 memalignment F
> GLIBC_2.43 memset_explicit F
> GLIBC_2.43 mseal F
> +GLIBC_2.43 optctxt D 0x4
> GLIBC_2.43 umaxabs F
> diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist b/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
> index 905323b889..1c16f324db 100644
> --- a/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
> @@ -2737,4 +2737,5 @@ GLIBC_2.43 free_sized F
> GLIBC_2.43 memalignment F
> GLIBC_2.43 memset_explicit F
> GLIBC_2.43 mseal F
> +GLIBC_2.43 optctxt D 0x8
> GLIBC_2.43 umaxabs F
> diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
> index c35e099d2c..dfd6b1fb98 100644
> --- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
> @@ -3161,6 +3161,7 @@ GLIBC_2.43 free_sized F
> GLIBC_2.43 memalignment F
> GLIBC_2.43 memset_explicit F
> GLIBC_2.43 mseal F
> +GLIBC_2.43 optctxt D 0x4
> GLIBC_2.43 umaxabs F
> GLIBC_2.5 __readlinkat_chk F
> GLIBC_2.5 inet6_opt_append F
> diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
> index 9f34c5fab3..62d732eb52 100644
> --- a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
> @@ -2954,6 +2954,7 @@ GLIBC_2.43 free_sized F
> GLIBC_2.43 memalignment F
> GLIBC_2.43 memset_explicit F
> GLIBC_2.43 mseal F
> +GLIBC_2.43 optctxt D 0x8
> GLIBC_2.43 umaxabs F
> GLIBC_2.5 __readlinkat_chk F
> GLIBC_2.5 inet6_opt_append F
> diff --git a/sysdeps/unix/sysv/linux/sh/be/libc.abilist b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
> index f26980c57c..2515068b65 100644
> --- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
> @@ -2853,6 +2853,7 @@ GLIBC_2.43 free_sized F
> GLIBC_2.43 memalignment F
> GLIBC_2.43 memset_explicit F
> GLIBC_2.43 mseal F
> +GLIBC_2.43 optctxt D 0x4
> GLIBC_2.43 umaxabs F
> GLIBC_2.5 __readlinkat_chk F
> GLIBC_2.5 inet6_opt_append F
> diff --git a/sysdeps/unix/sysv/linux/sh/le/libc.abilist b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
> index e8ee581fa7..adb5760390 100644
> --- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
> @@ -2850,6 +2850,7 @@ GLIBC_2.43 free_sized F
> GLIBC_2.43 memalignment F
> GLIBC_2.43 memset_explicit F
> GLIBC_2.43 mseal F
> +GLIBC_2.43 optctxt D 0x4
> GLIBC_2.43 umaxabs F
> GLIBC_2.5 __readlinkat_chk F
> GLIBC_2.5 inet6_opt_append F
> diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
> index 3d0665d197..fd9acd46a0 100644
> --- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
> @@ -3184,6 +3184,7 @@ GLIBC_2.43 free_sized F
> GLIBC_2.43 memalignment F
> GLIBC_2.43 memset_explicit F
> GLIBC_2.43 mseal F
> +GLIBC_2.43 optctxt D 0x4
> GLIBC_2.43 umaxabs F
> GLIBC_2.5 __readlinkat_chk F
> GLIBC_2.5 inet6_opt_append F
> diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
> index 0b7644d8fe..ae03fe7b28 100644
> --- a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
> @@ -2820,6 +2820,7 @@ GLIBC_2.43 free_sized F
> GLIBC_2.43 memalignment F
> GLIBC_2.43 memset_explicit F
> GLIBC_2.43 mseal F
> +GLIBC_2.43 optctxt D 0x8
> GLIBC_2.43 umaxabs F
> GLIBC_2.5 __readlinkat_chk F
> GLIBC_2.5 inet6_opt_append F
> diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
> index 85533e9c07..54fef75839 100644
> --- a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
> @@ -2769,6 +2769,7 @@ GLIBC_2.43 free_sized F
> GLIBC_2.43 memalignment F
> GLIBC_2.43 memset_explicit F
> GLIBC_2.43 mseal F
> +GLIBC_2.43 optctxt D 0x8
> GLIBC_2.43 umaxabs F
> GLIBC_2.5 __readlinkat_chk F
> GLIBC_2.5 inet6_opt_append F
> diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
> index 2b2a351150..339bf09fd9 100644
> --- a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
> @@ -2788,4 +2788,5 @@ GLIBC_2.43 free_sized F
> GLIBC_2.43 memalignment F
> GLIBC_2.43 memset_explicit F
> GLIBC_2.43 mseal F
> +GLIBC_2.43 optctxt D 0x4
> GLIBC_2.43 umaxabs F
More information about the Libc-alpha
mailing list