From: Nicholas Clark Date: Sun, 25 May 2008 23:47:00 +0000 (+0000) Subject: My recent changes to POSIX.xs forgot that WEXITSTATUS etc may not even X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d49025b75d9b5002071bd1a4210654dab5663ef0;p=p5sagit%2Fp5-mst-13.2.git My recent changes to POSIX.xs forgot that WEXITSTATUS etc may not even be defined. This fix changes the error message from "Your vendor has not defined POSIX macro %s, used" to "POSIX::%s not implemented on this architecture", which I assume is not going to break anything. p4raw-id: //depot/perl@33936 --- diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index 9c101ce..b7cdc34 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -658,22 +658,46 @@ WEXITSTATUS(status) CODE: switch(ix) { case 0: +#ifdef WEXITSTATUS RETVAL = WEXITSTATUS(status); +#else + not_here("WEXITSTATUS"); +#endif break; case 1: +#ifdef WIFEXITED RETVAL = WIFEXITED(status); +#else + not_here("WIFEXITED"); +#endif break; case 2: +#ifdef WIFSIGNALED RETVAL = WIFSIGNALED(status); +#else + not_here("WIFSIGNALED"); +#endif break; case 3: +#ifdef WIFSTOPPED RETVAL = WIFSTOPPED(status); +#else + not_here("WIFSTOPPED"); +#endif break; case 4: +#ifdef WSTOPSIG RETVAL = WSTOPSIG(status); +#else + not_here("WSTOPSIG"); +#endif break; case 5: +#ifdef WTERMSIG RETVAL = WTERMSIG(status); +#else + not_here("WTERMSIG"); +#endif break; default: Perl_croak(aTHX_ "Illegal alias %d for POSIX::W*", ix);