This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
VMS build patch (from Peter Prymmer)
[perl5.git] / vms / vms.c
index f1f62bd..e063e7f 100644 (file)
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -68,6 +68,9 @@
 #  define prv$v_sysprv  prv$r_prvdef_bits0.prv$v_sysprv
 #endif
 
+#if defined(NEED_AN_H_ERRNO)
+dEXT int h_errno;
+#endif
 
 struct itmlst_3 {
   unsigned short int buflen;
@@ -988,9 +991,9 @@ pipe_exit_routine()
 
     while (info) {
       int need_eof;
-      _ckvmssts(SYS$SETAST(0));
+      _ckvmssts(sys$setast(0));
       need_eof = info->mode != 'r' && !info->done;
-      _ckvmssts(SYS$SETAST(1));
+      _ckvmssts(sys$setast(1));
       if (need_eof) {
         if (pipe_eof(info->fp, 1) & 1) did_stuff = 1;
       }
@@ -1001,26 +1004,26 @@ pipe_exit_routine()
     did_stuff = 0;
     info = open_pipes;
     while (info) {
-      _ckvmssts(SYS$SETAST(0));
+      _ckvmssts(sys$setast(0));
       if (!info->done) { /* Tap them gently on the shoulder . . .*/
         sts = sys$forcex(&info->pid,0,&abort);
         if (!(sts&1) && sts != SS$_NONEXPR) _ckvmssts(sts); 
         did_stuff = 1;
       }
-      _ckvmssts(SYS$SETAST(1));
+      _ckvmssts(sys$setast(1));
       info = info->next;
     }
     if (did_stuff) sleep(1);    /* wait for them to respond */
 
     info = open_pipes;
     while (info) {
-      _ckvmssts(SYS$SETAST(0));
+      _ckvmssts(sys$setast(0));
       if (!info->done) {  /* We tried to be nice . . . */
         sts = sys$delprc(&info->pid,0);
         if (!(sts&1) && sts != SS$_NONEXPR) _ckvmssts(sts); 
         info->done = 1; /* so my_pclose doesn't try to write EOF */
       }
-      _ckvmssts(SYS$SETAST(1));
+      _ckvmssts(sys$setast(1));
       info = info->next;
     }
 
@@ -1138,9 +1141,9 @@ I32 Perl_my_pclose(pTHX_ FILE *fp)
     /* If we were writing to a subprocess, insure that someone reading from
      * the mailbox gets an EOF.  It looks like a simple fclose() doesn't
      * produce an EOF record in the mailbox.  */
-    _ckvmssts(SYS$SETAST(0));
+    _ckvmssts(sys$setast(0));
     need_eof = info->mode != 'r' && !info->done;
-    _ckvmssts(SYS$SETAST(1));
+    _ckvmssts(sys$setast(1));
     if (need_eof) pipe_eof(info->fp,0);
     PerlIO_close(info->fp);
 
@@ -1148,10 +1151,10 @@ I32 Perl_my_pclose(pTHX_ FILE *fp)
     else waitpid(info->pid,(int *) &retsts,0);
 
     /* remove from list of open pipes */
-    _ckvmssts(SYS$SETAST(0));
+    _ckvmssts(sys$setast(0));
     if (last) last->next = info->next;
     else open_pipes = info->next;
-    _ckvmssts(SYS$SETAST(1));
+    _ckvmssts(sys$setast(1));
     Safefree(info);
 
     return retsts;