From: Collin Funk Date: Sat, 27 Dec 2025 01:52:58 +0000 (-0800) Subject: getlimits: print SIGRTMIN and SIGRTMAX X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e1b4f76d3f07a11edb8d5babc7a078aefdd2ba0;p=thirdparty%2Fcoreutils.git getlimits: print SIGRTMIN and SIGRTMAX * src/getlimits.c (SIGRTMIN): Define to zero if signal.h does not define this constant. (SIGRTMAX): Define to SIGRTMIN - 1 if signal.h does not define this constant. (main): Print SIGRTMIN and SIGRTMAX. --- diff --git a/src/getlimits.c b/src/getlimits.c index db44967e76..4177d9ee0f 100644 --- a/src/getlimits.c +++ b/src/getlimits.c @@ -17,6 +17,7 @@ /* Written by Pádraig Brady */ #include /* sets _FILE_OFFSET_BITS=64 etc. */ +#include #include #include #include @@ -54,6 +55,14 @@ # define OFF64_T_MIN TYPE_MINIMUM (off64_t) #endif +#ifndef SIGRTMIN +# define SIGRTMIN 0 +# undef SIGRTMAX +#endif +#ifndef SIGRTMAX +# define SIGRTMAX (SIGRTMIN - 1) +#endif + /* These are not interesting to print. * Instead of these defines it would be nice to be able to do * #ifdef (TYPE##_MIN) in function macro below. */ @@ -179,6 +188,8 @@ main (int argc, char **argv) print_float (LDBL); /* Other useful constants */ + printf ("SIGRTMIN=%jd\n", (intmax_t) SIGRTMIN); + printf ("SIGRTMAX=%jd\n", (intmax_t) SIGRTMAX); printf ("IO_BUFSIZE=%ju\n", (uintmax_t) IO_BUFSIZE); return EXIT_SUCCESS;