diff --git a/RunTest b/RunTest index 14d9f60..605eb09 100755 --- a/RunTest +++ b/RunTest @@ -320,7 +320,8 @@ fi # set up a large stack. $sim ./pcre2test -S 64 /dev/null /dev/null -if [ $? -eq 0 -a "$bigstack" != "" ] ; then +support_setstack=$? +if [ $support_setstack -eq 0 -a "$bigstack" != "" ] ; then setstack="-S 64" else setstack="" @@ -479,7 +480,9 @@ for bmode in "$test8" "$test16" "$test32"; do echo '' >testtry checkspecial '-C' checkspecial '--help' - checkspecial '-S 1 -t 10 testSinput' + if [ $support_setstack -eq 0 ] ; then + checkspecial '-S 1 -t 10 testSinput' + fi echo " OK" fi diff --git a/src/pcre2test.c b/src/pcre2test.c index 84987d7..8062467 100644 --- a/src/pcre2test.c +++ b/src/pcre2test.c @@ -8689,7 +8689,7 @@ while (argc > 1 && argv[op][0] == '-' && argv[op][1] != 0) else if (strcmp(arg, "-S") == 0 && argc > 2 && ((uli = strtoul(argv[op+1], &endptr, 10)), *endptr == 0)) { -#if defined(_WIN32) || defined(WIN32) || defined(__minix) || defined(NATIVE_ZOS) || defined(__VMS) +#if defined(_WIN32) || defined(WIN32) || defined(__HAIKU__) || defined(NATIVE_ZOS) || defined(__VMS) fprintf(stderr, "pcre2test: -S is not supported on this OS\n"); exit(1); #else