Commit ea20b6b2 authored by Niels Möller's avatar Niels Möller

* src/argp/argp-help.c (argp_doc): Use the name strndup, not

__strndup. That probably breaks glibc builds.

Rev: src/argp/argp-help.c:1.12
parent c5899af3
......@@ -1531,7 +1531,15 @@ argp_doc (const struct argp *argp, const struct argp_state *state,
{
if (inp_text_limit)
/* Copy INP_TEXT so that it's nul-terminated. */
inp_text = __strndup (inp_text, inp_text_limit);
/* FIXME: The glibc version of argp uses the name __strndup.
* However, that causes link errors because there's no such
* function in the public namespace, and __strndup is already
* defined as a macro so that the
*
* #define __strndup strndup
*
* above is never used. */
inp_text = strndup (inp_text, inp_text_limit);
input = __argp_input (argp, state);
text =
(*argp->help_filter) (post
......@@ -1594,6 +1602,8 @@ argp_doc (const struct argp *argp, const struct argp_state *state,
argp_state_help, STATE is the relevent parsing state. FLAGS are from the
set ARGP_HELP_*. NAME is what to use wherever a `program name' is
needed. */
/* FIXME: NAME ought to be a const char * */
static void
_help (const struct argp *argp, const struct argp_state *state, FILE *stream,
unsigned flags, char *name)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment