From: Paul Eggert Date: Sat, 28 Oct 2023 16:30:49 +0000 (-0700) Subject: stdbuf: port to oddball toupper X-Git-Tag: v9.5~118 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3ce33c106c3db936deb3bfa9784d6e53f921233;p=thirdparty%2Fcoreutils.git stdbuf: port to oddball toupper * src/stdbuf.c: Do not include ctype.h. (set_libstdbuf_options): Use c_toupper, not toupper, since the C locale is intended here. --- diff --git a/src/stdbuf.c b/src/stdbuf.c index 51326ad4e2..65142fd8c1 100644 --- a/src/stdbuf.c +++ b/src/stdbuf.c @@ -17,7 +17,6 @@ /* Written by Pádraig Brady. */ #include -#include #include #include #include @@ -286,10 +285,10 @@ set_libstdbuf_options (void) if (*stdbuf[i].optarg == 'L') ret = asprintf (&var, "%s%c=L", "_STDBUF_", - toupper (stdbuf[i].optc)); + c_toupper (stdbuf[i].optc)); else ret = asprintf (&var, "%s%c=%zu", "_STDBUF_", - toupper (stdbuf[i].optc), + c_toupper (stdbuf[i].optc), stdbuf[i].size); if (ret < 0) xalloc_die ();