[PATCH v9 0/8] Support translated long option names in getopt and argp
Vivien Kraus
vivien@planete-kraus.eu
Fri Jul 11 17:10:25 GMT 2025
Hello!
This is your reminder that I am waiting for your feedback.
If the patch series is too big, do you think it would be better to
simplify it by always using a constant context and no domain?
Best regards,
Vivien
Le lundi 23 juin 2025 à 22:10 +0200, Vivien Kraus a écrit :
> Dear glibc developers,
>
> I don’t know exactly how to automatically update the abilists, so I
> did this gross trick:
>
> 1. For each libc.abilist found anywhere in the source;
> 2. If it has a definition for optarg (another char *);
> 3. Copy that;
> 4. Change the name to optctxt;
> 5. Move it to a GLIBC_2.42 section.
>
> I did the same thing for opttextdomain and getopt_long_collision
> (based on getopt_long).
>
> I also made sure all modifications of the manual have two spaces at
> the end of the sentence.
>
> Now, let’s see if ci_notify@linaro.org has something to say about
> that.
>
> Best regards,
>
> Vivien
>
> Vivien Kraus (8):
> 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
> posix, argp: Support deprecation of long option name translations
> argp: do not display option name translations if
> __libc_enable_secure
> posix: Add getopt_long_collision
>
> argp/Makefile | 14 ++
> argp/argp-help.c | 83 ++++++++-
> argp/argp-parse.c | 1 +
> argp/tst-argphelp-localized.c | 169
> ++++++++++++++++++
> argp/tst-argphelp-localized.po | 23 +++
> argp/tst-argpusage-localized.c | 82 +++++++++
> manual/argp.texi | 25 ++-
> manual/getopt.texi | 71 +++++++-
> posix/Makefile | 23 +++
> posix/Versions | 3 +
> posix/bits/getopt_ext.h | 17 ++
> posix/getopt.c | 168 +++++++++++++++-
> -
> posix/getopt1.c | 102 ++++++++++-
> posix/getopt_int.h | 14 +-
> posix/tst-getopt_long_collision.c | 66 +++++++
> posix/tst-getopt_long_collision.po | 22 +++
> posix/tstgetoptl.c | 127 +++++++++++++
> posix/tstgetoptl.po | 27 +++
> sysdeps/mach/hurd/i386/libc.abilist | 3 +
> sysdeps/mach/hurd/x86_64/libc.abilist | 3 +
> sysdeps/unix/sysv/linux/aarch64/libc.abilist | 3 +
> sysdeps/unix/sysv/linux/alpha/libc.abilist | 3 +
> sysdeps/unix/sysv/linux/arc/libc.abilist | 3 +
> sysdeps/unix/sysv/linux/arm/be/libc.abilist | 3 +
> sysdeps/unix/sysv/linux/arm/le/libc.abilist | 3 +
> sysdeps/unix/sysv/linux/csky/libc.abilist | 3 +
> sysdeps/unix/sysv/linux/hppa/libc.abilist | 3 +
> sysdeps/unix/sysv/linux/i386/libc.abilist | 3 +
> .../sysv/linux/loongarch/lp64/libc.abilist | 3 +
> .../sysv/linux/m68k/coldfire/libc.abilist | 3 +
> .../unix/sysv/linux/m68k/m680x0/libc.abilist | 3 +
> .../sysv/linux/microblaze/be/libc.abilist | 3 +
> .../sysv/linux/microblaze/le/libc.abilist | 3 +
> .../sysv/linux/mips/mips32/fpu/libc.abilist | 3 +
> .../sysv/linux/mips/mips32/nofpu/libc.abilist | 3 +
> .../sysv/linux/mips/mips64/n32/libc.abilist | 3 +
> .../sysv/linux/mips/mips64/n64/libc.abilist | 3 +
> sysdeps/unix/sysv/linux/or1k/libc.abilist | 3 +
> .../linux/powerpc/powerpc32/fpu/libc.abilist | 3 +
> .../powerpc/powerpc32/nofpu/libc.abilist | 3 +
> .../linux/powerpc/powerpc64/be/libc.abilist | 3 +
> .../linux/powerpc/powerpc64/le/libc.abilist | 3 +
> .../unix/sysv/linux/riscv/rv32/libc.abilist | 3 +
> .../unix/sysv/linux/riscv/rv64/libc.abilist | 3 +
> .../unix/sysv/linux/s390/s390-32/libc.abilist | 3 +
> .../unix/sysv/linux/s390/s390-64/libc.abilist | 3 +
> sysdeps/unix/sysv/linux/sh/be/libc.abilist | 3 +
> sysdeps/unix/sysv/linux/sh/le/libc.abilist | 3 +
> .../sysv/linux/sparc/sparc32/libc.abilist | 3 +
> .../sysv/linux/sparc/sparc64/libc.abilist | 3 +
> .../unix/sysv/linux/x86_64/64/libc.abilist | 3 +
> .../unix/sysv/linux/x86_64/x32/libc.abilist | 3 +
> 52 files changed, 1096 insertions(+), 43 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/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: fc6f074e0496fb8a8df491641165f4ed3cdaa3a3
More information about the Libc-alpha
mailing list