perl 5.002gamma: hints/sco.sh
[p5sagit/p5-mst-13.2.git] / util.c
diff --git a/util.c b/util.c
index 9b3dd87..71ef5c9 100644 (file)
--- a/util.c
+++ b/util.c
@@ -858,11 +858,12 @@ mess(pat, args)
                  SvPVX(GvSV(curcop->cop_filegv)), (long)curcop->cop_line);
                s += strlen(s);
            }
-           if (GvIO(last_in_gv) &&
-               IoLINES(GvIOp(last_in_gv)) ) {
+           if (GvIO(last_in_gv) && IoLINES(GvIOp(last_in_gv))) {
+               bool line_mode = (RsSIMPLE(rs) &&
+                                 SvLEN(rs) == 1 && *SvPVX(rs) == '\n');
                (void)sprintf(s,", <%s> %s %ld",
                  last_in_gv == argvgv ? "" : GvNAME(last_in_gv),
-                 strEQ(rs,"\n") ? "line" : "chunk", 
+                 line_mode ? "line" : "chunk", 
                  (long)IoLINES(GvIOp(last_in_gv)));
                s += strlen(s);
            }
@@ -1031,7 +1032,7 @@ char *nam;
 }
 #endif /* !VMS */
 
-#ifdef EUNICE
+#ifdef UNLINK_ALL_VERSIONS
 I32
 unlnk(f)       /* unlink all versions of a file */
 char *f;
@@ -1097,7 +1098,7 @@ register I32 len;
 }
 #endif /* HAS_MEMCMP */
 
-#ifdef I_VARARGS
+#if defined(I_STDARG) || defined(I_VARARGS)
 #ifndef HAS_VPRINTF
 
 #ifdef USE_CHAR_VSPRINTF
@@ -1134,7 +1135,7 @@ char *pat, *args;
     return 0;          /* wrong, but perl doesn't use the return value */
 }
 #endif /* HAS_VPRINTF */
-#endif /* I_VARARGS */
+#endif /* I_VARARGS || I_STDARGS */
 
 #ifdef MYSWAP
 #if BYTEORDER != 0x4321
@@ -1363,7 +1364,7 @@ char      *mode;
     return fdopen(p[this], mode);
 }
 #else
-#ifdef atarist
+#if defined(atarist) || defined(OS2)
 FILE *popen();
 FILE *
 my_popen(cmd,mode)
@@ -1420,8 +1421,7 @@ int newfd;
 }
 #endif
 
-#ifndef DOSISH
-#ifndef VMS /* VMS' my_pclose() is in VMS.c */
+#if  !defined(DOSISH) && !defined(VMS)  /* VMS' my_popen() is in VMS.c */
 I32
 my_pclose(ptr)
 FILE *ptr;
@@ -1450,7 +1450,9 @@ FILE *ptr;
     signal(SIGQUIT, qstat);
     return(pid < 0 ? pid : status);
 }
-#endif /* !VMS */
+#endif /* !DOSISH */
+
+#if  !defined(DOSISH) || defined(OS2)
 I32
 wait4pid(pid,statusp,flags)
 int pid;
@@ -1524,7 +1526,7 @@ int status;
     return;
 }
 
-#ifdef atarist
+#if defined(atarist) || defined(OS2)
 int pclose();
 I32
 my_pclose(ptr)