]> git.ipfire.org Git - thirdparty/glibc.git/commit
posix: Defined _POSIX_VDISABLE as integer literal
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 17 Oct 2025 19:12:58 +0000 (16:12 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 20 Oct 2025 14:33:54 +0000 (11:33 -0300)
commit917425ca6da99138b9c63bd6d95d3ed46ecd66f0
tree30b3f745222468efbe8b49c9bc780b129120f370
parent847fed2c05475a14486df017d1da15a29a733f56
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 <collin.funk1@gmail.com>
sysdeps/mach/hurd/bits/posix_opt.h
sysdeps/unix/sysv/linux/bits/posix_opt.h