From: Willy Tarreau Date: Thu, 1 Oct 2020 16:04:40 +0000 (+0200) Subject: BUILD: tools: fix minor build issue on isspace() X-Git-Tag: v2.3-dev6~124 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe2cc41151c501eee262b326e3d4842e493b0a45;p=thirdparty%2Fhaproxy.git BUILD: tools: fix minor build issue on isspace() Previous commit fa41cb679 ("MINOR: tools: support for word expansion of environment in parse_line") introduced two new isspace() on a char and broke the build on systems using an array disguised in a macro instead of a function (like cygwin). Just use the usual cast. --- diff --git a/src/tools.c b/src/tools.c index c2a96642dd..75dfef121e 100644 --- a/src/tools.c +++ b/src/tools.c @@ -5118,7 +5118,7 @@ uint32_t parse_line(char *in, char *out, size_t *outlen, char **args, int *nbarg if (value) { while (*value) { /* expand as individual parameters on a space character */ - if (word_expand && isspace(*value)) { + if (word_expand && isspace((unsigned char)*value)) { EMIT_CHAR(0); ++arg; if (arg < argsmax) @@ -5127,7 +5127,7 @@ uint32_t parse_line(char *in, char *out, size_t *outlen, char **args, int *nbarg err |= PARSE_ERR_TOOMANY; /* skip consecutive spaces */ - while (isspace(*++value)) + while (isspace((unsigned char)*++value)) ; } else { EMIT_CHAR(*value++);