1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-10-28 23:34:53 +03:00

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>
This commit is contained in:
Adhemerval Zanella
2025-10-17 16:12:58 -03:00
parent 847fed2c05
commit 917425ca6d
2 changed files with 2 additions and 2 deletions

View File

@@ -53,7 +53,7 @@
/* Elements of the `c_cc' member of `struct termios' structure /* Elements of the `c_cc' member of `struct termios' structure
can be disabled by using the value _POSIX_VDISABLE. */ can be disabled by using the value _POSIX_VDISABLE. */
#define _POSIX_VDISABLE '\0' #define _POSIX_VDISABLE 0
/* Different Hurd filesystems might do these differently. /* Different Hurd filesystems might do these differently.

View File

@@ -54,7 +54,7 @@
/* `c_cc' member of 'struct termios' structure can be disabled by /* `c_cc' member of 'struct termios' structure can be disabled by
using the value _POSIX_VDISABLE. */ using the value _POSIX_VDISABLE. */
#define _POSIX_VDISABLE '\0' #define _POSIX_VDISABLE 0
/* Filenames are not silently truncated. */ /* Filenames are not silently truncated. */
#define _POSIX_NO_TRUNC 1 #define _POSIX_NO_TRUNC 1