From a3ce33c106c3db936deb3bfa9784d6e53f921233 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 28 Oct 2023 09:30:49 -0700 Subject: [PATCH] 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. --- src/stdbuf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/stdbuf.c b/src/stdbuf.c index 51326ad4e..65142fd8c 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 (); -- 2.11.4.GIT