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:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user