diff options
author | Mingye Wang <arthur200126@gmail.com> | 2023-06-21 20:11:57 +0800 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2023-06-21 15:15:03 +0200 |
commit | 6b2ae32ecdfdb8ca1337e19fac3b6e0a4079e769 (patch) | |
tree | 0ae1bf65fe7edf6d006dae5ddd28e164cb14dcb8 /newlib/libc | |
parent | 6604db8b80bd8c5aed4673ade49f768b9f51898b (diff) | |
download | newlib-6b2ae32ecdfdb8ca1337e19fac3b6e0a4079e769.zip newlib-6b2ae32ecdfdb8ca1337e19fac3b6e0a4079e769.tar.gz newlib-6b2ae32ecdfdb8ca1337e19fac3b6e0a4079e769.tar.bz2 |
Make SIG2STR_MAX usable in #if
The text accepted for POSIX issue 8 requires that SIG2STR_MAX be usable
in #if, which we currently break with sizeof. Use static values instead.
Diffstat (limited to 'newlib/libc')
-rw-r--r-- | newlib/libc/include/sys/signal.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/newlib/libc/include/sys/signal.h b/newlib/libc/include/sys/signal.h index 8dc5fb9..96bf978 100644 --- a/newlib/libc/include/sys/signal.h +++ b/newlib/libc/include/sys/signal.h @@ -245,9 +245,9 @@ int sigqueue (pid_t, int, const union sigval); /* POSIX Issue 8 adds sig2str() and str2sig() */ #if __SIZEOF_INT__ >= 4 -#define SIG2STR_MAX (sizeof("RTMAX+") + sizeof("4294967295") - 1) +#define SIG2STR_MAX 17 /* (sizeof("RTMAX+") + sizeof("4294967295") - 1) */ #else -#define SIG2STR_MAX (sizeof("RTMAX+") + sizeof("65535") - 1) +#define SIG2STR_MAX 12 /* (sizeof("RTMAX+") + sizeof("65535") - 1) */ #endif int sig2str(int, char *); |