From: Adhemerval Zanella Date: Fri, 17 Oct 2025 19:12:58 +0000 (-0300) Subject: posix: Defined _POSIX_VDISABLE as integer literal X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=917425ca6da99138b9c63bd6d95d3ed46ecd66f0;p=thirdparty%2Fglibc.git posix: Defined _POSIX_VDISABLE as integer literal The constant should be used with c_cc, which for all supported ABIs is defined as unsigned char. By using it as literar char constant, clang triggers an error when compared with signal literal on ABIs that define 'char' as unsigned. On aarch64, clang shows: ../sysdeps/posix/fpathconf.c:118:21: error: right side of operator converted from negative value to unsigned: -1 to 18446744073709551615 [-Werror] #if _POSIX_VDISABLE == -1 ~~~~~~~~~~~~~~~ ^ ~~ Reviewed-by: Collin Funk --- diff --git a/sysdeps/mach/hurd/bits/posix_opt.h b/sysdeps/mach/hurd/bits/posix_opt.h index b7f80e32e1..2da2921bf5 100644 --- a/sysdeps/mach/hurd/bits/posix_opt.h +++ b/sysdeps/mach/hurd/bits/posix_opt.h @@ -53,7 +53,7 @@ /* Elements of the `c_cc' member of `struct termios' structure can be disabled by using the value _POSIX_VDISABLE. */ -#define _POSIX_VDISABLE '\0' +#define _POSIX_VDISABLE 0 /* Different Hurd filesystems might do these differently. diff --git a/sysdeps/unix/sysv/linux/bits/posix_opt.h b/sysdeps/unix/sysv/linux/bits/posix_opt.h index 60ab46a575..d55f907b0f 100644 --- a/sysdeps/unix/sysv/linux/bits/posix_opt.h +++ b/sysdeps/unix/sysv/linux/bits/posix_opt.h @@ -54,7 +54,7 @@ /* `c_cc' member of 'struct termios' structure can be disabled by using the value _POSIX_VDISABLE. */ -#define _POSIX_VDISABLE '\0' +#define _POSIX_VDISABLE 0 /* Filenames are not silently truncated. */ #define _POSIX_NO_TRUNC 1