fix logic for a workaround in POSIX.xs
Stepan Kasal [Mon, 23 Nov 2009 11:14:06 +0000 (12:14 +0100)]
There is the assignment "RETVAL = 0" to silence the compiler in case
it incorrectly reports return of an undefined value.
This assignment should be present whenever *any* of the symbols is
not defined.  But the code was written so that the assignment was
compiled only when *none* of the symbols was defined.

ext/POSIX/POSIX.xs

index d30a752..7bdd633 100644 (file)
@@ -887,8 +887,8 @@ WEXITSTATUS(status)
        POSIX::WSTOPSIG = 4
        POSIX::WTERMSIG = 5
     CODE:
-#if !(defined(WEXITSTATUS) || defined(WIFEXITED) || defined(WIFSIGNALED) \
-      || defined(WIFSTOPPED) || defined(WSTOPSIG) || defined (WTERMSIG))
+#if !defined(WEXITSTATUS) || !defined(WIFEXITED) || !defined(WIFSIGNALED) \
+      || !defined(WIFSTOPPED) || !defined(WSTOPSIG) || !defined(WTERMSIG)
         RETVAL = 0; /* Silence compilers that notice this, but don't realise
                       that not_here() can't return.  */
 #endif