Fix argp-help.c.

It tried to use an __argp_basename function, which was defined to
program_invocation_short_name. The function definition should have been
gated.

This patch may be upstreamable to glibc.
This commit is contained in:
Érico Rolim 2021-02-10 18:08:36 -03:00
parent c57dfcb63a
commit 6336530a9c

View file

@ -1683,7 +1683,7 @@ void __argp_help (const struct argp *argp, FILE *stream,
weak_alias (__argp_help, argp_help) weak_alias (__argp_help, argp_help)
#endif #endif
#if 1 #if !HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
char *__argp_basename (char *name) char *__argp_basename (char *name)
{ {
char *short_name = strrchr (name, '/'); char *short_name = strrchr (name, '/');
@ -1857,7 +1857,7 @@ __argp_failure_internal (const struct argp_state *state, int status,
#endif #endif
} }
#ifdef 0 #if 0
if (_IO_fwide (stream, 0) > 0) if (_IO_fwide (stream, 0) > 0)
putwc_unlocked (L'\n', stream); putwc_unlocked (L'\n', stream);
else else