mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-04-16 08:38:48 +02:00
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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user