* 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.
---
src/getlimits.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/getlimits.c b/src/getlimits.c
index db44967e7..4177d9ee0 100644
--- a/src/getlimits.c
+++ b/src/getlimits.c
@@ -17,6 +17,7 @@
/* Written by Pádraig Brady */
#include <config.h> /* sets _FILE_OFFSET_BITS=64 etc. */
+#include <signal.h>
#include <stdio.h>
#include <sys/types.h>
#include <float.h>
@@ -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;
--
2.52.0