This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Benchmark tweaks, fixes, cmpthese()
[perl5.git] / pp_sys.c
index baf59ed..cf08f73 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
 /* Shadow password support for solaris - pdo@cs.umd.edu
  * Not just Solaris: at least HP-UX, IRIX, Linux.
  * the API is from SysV. --jhi */
+#ifdef __hpux__
+/* There is a MAXINT coming from <shadow.h> <- <hpsecurity.h> <- <values.h>
+ * and another MAXINT from "perl.h" <- <sys/param.h>. */ 
+#undef MAXINT
+#endif
 #include <shadow.h>
 #endif
 
@@ -1898,7 +1903,7 @@ PP(pp_ioctl)
     }
     else {
        retval = SvIV(argsv);
-       s = (char*)retval;              /* ouch */
+       s = INT2PTR(char*,retval);              /* ouch */
     }
 
     TAINT_PROPER(optype == OP_IOCTL ? "ioctl" : "fcntl");
@@ -3652,7 +3657,7 @@ PP(pp_system)
            PerlLIO_close(pp[0]);
            if (n) {                    /* Error */
                if (n != sizeof(int))
-                   Perl_croak(aTHX_ "panic: kid popen errno read");
+                   DIE(aTHX_ "panic: kid popen errno read");
                errno = errkid;         /* Propagate errno from kid */
                STATUS_CURRENT = -1;
            }