remove deprecated PERL_OBJECT cruft, it has long since stopped
[p5sagit/p5-mst-13.2.git] / iperlsys.h
index fdbd12a..298f82a 100644 (file)
@@ -7,11 +7,6 @@
  * that can be #defined to the system-level function (or a wrapper
  * provided elsewhere).
  *
- * When using C++ with -DPERL_OBJECT, this definition is in the
- * form of a set of virtual base classes which must be subclassed to
- * provide a real implementation.  The Perl Object will use instances
- * of this implementation to use the system-level functionality.
- *
  * GSAR 21-JUN-98
  */
 
@@ -253,7 +248,7 @@ struct IPerlStdIOInfo
 #define PerlSIO_printf         Perl_fprintf_nocontext
 #define PerlSIO_stdoutf                Perl_printf_nocontext
 #define PerlSIO_vprintf(f,fmt,a)                                               \
-       (*PL_StdIO->pVprintf)(PL_StdIO, (f),(fmt),a)          
+       (*PL_StdIO->pVprintf)(PL_StdIO, (f),(fmt),a)
 #define PerlSIO_ftell(f)                                                       \
        (*PL_StdIO->pTell)(PL_StdIO, (f))
 #define PerlSIO_fseek(f,o,w)                                           \
@@ -285,7 +280,7 @@ struct IPerlStdIOInfo
 #define PerlSIO_ferror(f)              ferror(f)
 #define PerlSIO_clearerr(f)            clearerr(f)
 #define PerlSIO_fgetc(f)                       fgetc(f)
-#if PerlSIO_has_base
+#ifdef FILE_base
 #define PerlSIO_get_base(f)            FILE_base(f)
 #define PerlSIO_get_bufsiz(f)          FILE_bufsiz(f)
 #else
@@ -303,7 +298,17 @@ struct IPerlStdIOInfo
 #define PerlSIO_fputs(f,s)             fputs(s,f)
 #define PerlSIO_fflush(f)              Fflush(f)
 #define PerlSIO_fgets(s, n, fp)                fgets(s,n,fp)
-#define PerlSIO_ungetc(c,f)            ungetc(c,f)
+#if defined(VMS) && defined(__DECC)
+     /* Unusual definition of ungetc() here to accomodate fast_sv_gets()'
+      * belief that it can mix getc/ungetc with reads from stdio buffer */
+     int decc$ungetc(int __c, FILE *__stream);
+#    define PerlSIO_ungetc(c,f) ((c) == EOF ? EOF : \
+            ((*(f) && !((*(f))->_flag & _IONBF) && \
+            ((*(f))->_ptr > (*(f))->_base)) ? \
+            ((*(f))->_cnt++, *(--(*(f))->_ptr) = (c)) : decc$ungetc(c,f)))
+#else
+#  define PerlSIO_ungetc(c,f)          ungetc(c,f)
+#endif
 #define PerlSIO_fileno(f)              fileno(f)
 #define PerlSIO_fdopen(f, s)           fdopen(f,s)
 #define PerlSIO_freopen(p, m, f)       freopen(p,m,f)
@@ -594,7 +599,11 @@ typedef int                (*LPLIOOpen3)(struct IPerlLIO*, const char*, int, int);
 typedef int            (*LPLIORead)(struct IPerlLIO*, int, void*, unsigned int);
 typedef int            (*LPLIORename)(struct IPerlLIO*, const char*,
                            const char*);
+#ifdef NETWARE
+typedef int            (*LPLIOSetmode)(struct IPerlLIO*, FILE*, int);
+#else
 typedef int            (*LPLIOSetmode)(struct IPerlLIO*, int, int);
+#endif /* NETWARE */
 typedef int            (*LPLIONameStat)(struct IPerlLIO*, const char*,
                            struct stat*);
 typedef char*          (*LPLIOTmpnam)(struct IPerlLIO*, char*);
@@ -880,6 +889,8 @@ typedef int         (*LPProcKillpg)(struct IPerlProc*, int, int);
 typedef int            (*LPProcPauseProc)(struct IPerlProc*);
 typedef PerlIO*                (*LPProcPopen)(struct IPerlProc*, const char*,
                            const char*);
+typedef PerlIO*                (*LPProcPopenList)(struct IPerlProc*, const char*,
+                           IV narg, SV **args);
 typedef int            (*LPProcPclose)(struct IPerlProc*, PerlIO*);
 typedef int            (*LPProcPipe)(struct IPerlProc*, int*);
 typedef int            (*LPProcSetuid)(struct IPerlProc*, uid_t);
@@ -942,6 +953,7 @@ struct IPerlProc
     LPProcASpawn       pASpawn;
 #endif
     LPProcLastHost      pLastHost;
+    LPProcPopenList    pPopenList;
 };
 
 struct IPerlProcInfo
@@ -982,6 +994,8 @@ struct IPerlProcInfo
        (*PL_Proc->pPauseProc)(PL_Proc)
 #define PerlProc_popen(c, m)                                           \
        (*PL_Proc->pPopen)(PL_Proc, (c), (m))
+#define PerlProc_popen_list(m, n, a)                                   \
+       (*PL_Proc->pPopenList)(PL_Proc, (m), (n), (a))
 #define PerlProc_pclose(f)                                             \
        (*PL_Proc->pPclose)(PL_Proc, (f))
 #define PerlProc_pipe(fd)                                              \
@@ -1043,6 +1057,7 @@ struct IPerlProcInfo
 #define PerlProc_killpg(i, a)  killpg((i), (a))
 #define PerlProc_pause()       Pause()
 #define PerlProc_popen(c, m)   my_popen((c), (m))
+#define PerlProc_popen_list(m,n,a)     my_popen_list((m),(n),(a))
 #define PerlProc_pclose(f)     my_pclose((f))
 #define PerlProc_pipe(fd)      pipe((fd))
 #define PerlProc_setuid(u)     setuid((u))
@@ -1054,7 +1069,7 @@ struct IPerlProcInfo
 #define PerlProc_setjmp(b, n)  Sigsetjmp((b), (n))
 #define PerlProc_longjmp(b, n) Siglongjmp((b), (n))
 #define PerlProc_signal(n, h)  signal((n), (h))
-#define PerlProc_fork()                fork()
+#define PerlProc_fork()                my_fork()
 #define PerlProc_getpid()      getpid()
 
 #ifdef WIN32