Skip to content

sig: Move runtime signal count check to compile time

Jessica Clarke requested to merge jrtc27/procps:cross-platform into master

Since the value of number_of_signals is known at compile time, we can use a compile-time check instead. This also adds SIGLOST for the Hurd, uses the correct signal counts for the Hurd and FreeBSD, and only gives a compile-time warning when compiled on an unknown platform that it does not know whether the number of signals is correct.

This has been tested on:

Linux: amd64 arm64 armel armhf i386 mips mips64el mipsel powerpc ppc64 ppc64el s390x

GNU/kFreeBSD: amd64 i386

GNU/Hurd: i386

In all cases the new "Unknown operating system; assuming number_of_signals is correct" warning is not emitted, and the file compiles, as the STATIC_ASSERT succeeds.

Edited by Jessica Clarke

Merge request reports