if (inplace) {
TAINT_PROPER("inplace open");
if (strEQ(oldname,"-")) {
- defoutgv = gv_fetchpv("STDOUT",TRUE,SVt_PVIO);
+ setdefout(gv_fetchpv("STDOUT",TRUE,SVt_PVIO));
return IoIFP(GvIOp(gv));
}
#ifndef FLEXFILENAMES
do_close(gv,FALSE);
continue;
}
- defoutgv = argvoutgv;
+ setdefout(argvoutgv);
lastfd = fileno(IoIFP(GvIOp(argvoutgv)));
(void)Fstat(lastfd,&statbuf);
#ifdef HAS_FCHMOD
}
if (inplace) {
(void)do_close(argvoutgv,FALSE);
- defoutgv = gv_fetchpv("STDOUT",TRUE,SVt_PVIO);
+ setdefout(gv_fetchpv("STDOUT",TRUE,SVt_PVIO));
}
return Nullfp;
}
while (IoIFP(io)) {
-#ifdef USE_STD_STDIO /* (the code works without this) */
- if (IoIFP(io)->_cnt > 0) /* cheat a little, since */
+#ifdef USE_STDIO_PTR /* (the code works without this) */
+ if (FILE_cnt(IoIFP(io)) > 0) /* cheat a little, since */
return FALSE; /* this is the most usual case */
#endif
(void)ungetc(ch, IoIFP(io));
return FALSE;
}
-#ifdef USE_STD_STDIO
- if (IoIFP(io)->_cnt < -1)
- IoIFP(io)->_cnt = -1;
+#if defined(USE_STDIO_PTR) && defined(STDIO_CNT_LVALUE)
+ if (FILE_cnt(IoIFP(io)) < -1)
+ FILE_cnt(IoIFP(io)) = -1;
#endif
if (op->op_flags & OPf_SPECIAL) { /* not necessarily a real EOF yet? */
if (!nextargv(argvgv)) /* get another fp handy */
}
else
val = SvIVx(*mark);
+#ifdef VMS
+ /* kill() doesn't do process groups (job trees?) under VMS */
+ if (val < 0) val = -val;
+ if (val == SIGKILL) {
+# include <starlet.h>
+ /* Use native sys$delprc() to insure that target process is
+ * deleted; supervisor-mode images don't pay attention to
+ * CRTL's emulation of Unix-style signals and kill()
+ */
+ while (++mark <= sp) {
+ I32 proc = SvIVx(*mark);
+ register unsigned long int __vmssts;
+ if (!((__vmssts = sys$delprc(&proc,0)) & 1)) {
+ tot--;
+ switch (__vmssts) {
+ case SS$_NONEXPR:
+ case SS$_NOSUCHNODE:
+ SETERRNO(ESRCH,__vmssts);
+ break;
+ case SS$_NOPRIV:
+ SETERRNO(EPERM,__vmssts);
+ break;
+ default:
+ SETERRNO(EVMSERR,__vmssts);
+ }
+ }
+ }
+ break;
+ }
+#endif
if (val < 0) {
val = -val;
while (++mark <= sp) {