[PATCH v22 0/9] Support translated long option names in getopt and argp

Vivien Kraus vivien@planete-kraus.eu
Thu May 21 13:37:50 GMT 2026


Dear glibc developers,

The test suite is still green for this series (except for a few tests
that timeout on my slow machine), and I am still waiting for your
feedback.

I am sorry for the revision number (22 is huge). I recognize that I
sent updated series in circumstances where I should not have done that.
I will try and not do that in the future.

I understand that this series is a little long, and so it takes some
time to review it. How can I make it easier for you?

In this series, I put the least important patches last. If you think
they are not needed, I will remove them in the next round.

What do you think?

Best regards,

Vivien

Le jeudi 23 avril 2026 à 18:03 +0200, Vivien Kraus a écrit :
> Dear glibc developers,
> 
> Since there is a new libc.abilist, here is an updated series.
> 
> Best regards,
> 
> Vivien
> 
> Vivien Kraus (9):
>   posix: allow getopt_long to match translated option names
>   posix: let the getopt caller set the translation context
>   argp: document translated names in --help and --usage
>   posix: let the getopt caller choose the textdomain for translation
>   posix: do not allow option name translations for secure programs
>   argp: do not display option name translations if
> __libc_enable_secure
>   posix: check for collisions in getopt_long
>   posix: Add a script for static validation of getopt_long PO files
>   posix, argp: Support multiple long option name translations
> 
>  NEWS                                          |  10 +
>  argp/Makefile                                 |  19 ++
>  argp/argp-help.c                              | 142 +++++++-
>  argp/argp-parse.c                             |   1 +
>  argp/tst-argphelp-localized.c                 | 141 ++++++++
>  argp/tst-argphelp-localized.po                |  26 ++
>  argp/tst-argpusage-localized.c                |  82 +++++
>  manual/argp.texi                              |  25 +-
>  manual/getopt.texi                            |  80 ++++-
>  manual/install.texi                           |   7 +-
>  posix/Makefile                                |  52 ++-
>  posix/Versions                                |   4 +
>  posix/bits/getopt_ext.h                       |   4 +
>  posix/check-getopt-translations.pl            | 199 +++++++++++
>  posix/getopt.c                                | 323
> +++++++++++++++++-
>  posix/getopt1.c                               | 114 ++++++-
>  posix/getopt_int.h                            |  22 +-
>  .../standalone-multiple-getopt-collisions.po  |  45 +++
>  posix/tst-check-getopt-translations.sh        |  61 ++++
>  posix/tst-getopt_long_collision.c             | 130 +++++++
>  posix/tst-getopt_long_collision.po            |  32 ++
>  posix/tstgetoptl.c                            | 183 ++++++++++
>  posix/tstgetoptl.po                           |  26 ++
>  sysdeps/mach/hurd/i386/libc.abilist           |   2 +
>  sysdeps/mach/hurd/x86_64/libc.abilist         |   2 +
>  sysdeps/unix/sysv/linux/aarch64/libc.abilist  |   2 +
>  sysdeps/unix/sysv/linux/alpha/libc.abilist    |   2 +
>  sysdeps/unix/sysv/linux/arc/libc.abilist      |   2 +
>  sysdeps/unix/sysv/linux/arm/be/libc.abilist   |   2 +
>  sysdeps/unix/sysv/linux/arm/le/libc.abilist   |   2 +
>  sysdeps/unix/sysv/linux/csky/libc.abilist     |   2 +
>  sysdeps/unix/sysv/linux/hppa/libc.abilist     |   2 +
>  sysdeps/unix/sysv/linux/i386/libc.abilist     |   2 +
>  .../sysv/linux/loongarch/ilp32/libc.abilist   |   2 +
>  .../sysv/linux/loongarch/lp64/libc.abilist    |   2 +
>  .../sysv/linux/m68k/coldfire/libc.abilist     |   2 +
>  .../unix/sysv/linux/m68k/m680x0/libc.abilist  |   2 +
>  .../sysv/linux/microblaze/be/libc.abilist     |   2 +
>  .../sysv/linux/microblaze/le/libc.abilist     |   2 +
>  .../sysv/linux/mips/mips32/fpu/libc.abilist   |   2 +
>  .../sysv/linux/mips/mips32/nofpu/libc.abilist |   2 +
>  .../sysv/linux/mips/mips64/n32/libc.abilist   |   2 +
>  .../sysv/linux/mips/mips64/n64/libc.abilist   |   2 +
>  sysdeps/unix/sysv/linux/or1k/libc.abilist     |   2 +
>  .../linux/powerpc/powerpc32/fpu/libc.abilist  |   2 +
>  .../powerpc/powerpc32/nofpu/libc.abilist      |   2 +
>  .../linux/powerpc/powerpc64/be/libc.abilist   |   2 +
>  .../linux/powerpc/powerpc64/le/libc.abilist   |   2 +
>  .../unix/sysv/linux/riscv/rv32/libc.abilist   |   2 +
>  .../unix/sysv/linux/riscv/rv64/libc.abilist   |   2 +
>  sysdeps/unix/sysv/linux/s390/libc.abilist     |   2 +
>  sysdeps/unix/sysv/linux/sh/be/libc.abilist    |   2 +
>  sysdeps/unix/sysv/linux/sh/le/libc.abilist    |   2 +
>  .../sysv/linux/sparc/sparc32/libc.abilist     |   2 +
>  .../sysv/linux/sparc/sparc64/libc.abilist     |   2 +
>  .../unix/sysv/linux/x86_64/64/libc.abilist    |   2 +
>  .../unix/sysv/linux/x86_64/x32/libc.abilist   |   2 +
>  57 files changed, 1744 insertions(+), 52 deletions(-)
>  create mode 100644 argp/tst-argphelp-localized.c
>  create mode 100644 argp/tst-argphelp-localized.po
>  create mode 100644 argp/tst-argpusage-localized.c
>  create mode 100644 posix/check-getopt-translations.pl
>  create mode 100644 posix/standalone-multiple-getopt-collisions.po
>  create mode 100644 posix/tst-check-getopt-translations.sh
>  create mode 100644 posix/tst-getopt_long_collision.c
>  create mode 100644 posix/tst-getopt_long_collision.po
>  create mode 100644 posix/tstgetoptl.c
>  create mode 100644 posix/tstgetoptl.po
> 
> 
> base-commit: 5880459251e74f2471a5a45c90aa6494756ac4bf


More information about the Libc-alpha mailing list