fix build (temp): Replace SIGSTKSZ macro w/ constexpr

This macro can no longer be used as an array-length template param. It
used to be known at compile-time, but that is no longer the case
(https://public-inbox.org/libc-alpha/87y2ew8i1w.fsf@igel.home/T/).
This commit is contained in:
John Colvin committed 2022-10-02 02:11:55 -04:00
1 parent 4d96613ca8
commit 21aff7ce08
1 file changed
+6 -2
+6 -2
View File
@@ -6466,6 +6466,8 @@ namespace Catch {
#include <signal.h>
#define SPARK_SIGSTKSZ 8192
namespace Catch {
struct SignalDefs {
@@ -6487,7 +6489,8 @@ namespace Catch {
static bool isSet;
static struct sigaction oldSigActions [sizeof(signalDefs)/sizeof(SignalDefs)];
static stack_t oldSigStack;
static char altStackMem[SIGSTKSZ];
// SPARK FIX
static char altStackMem[SPARK_SIGSTKSZ];
static void handleSignal( int sig ) {
std::string name = "<unknown signal>";
@@ -6538,7 +6541,8 @@ namespace Catch {
bool FatalConditionHandler::isSet = false;
struct sigaction FatalConditionHandler::oldSigActions[sizeof(signalDefs)/sizeof(SignalDefs)] = {};
stack_t FatalConditionHandler::oldSigStack = {};
char FatalConditionHandler::altStackMem[SIGSTKSZ] = {};
// SPARK FIX
char FatalConditionHandler::altStackMem[SPARK_SIGSTKSZ] = {};
} // namespace Catch