X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=iperlsys.h;h=d3e82549b4f69adecf7291a92e06fc433cb0df26;hb=8669ce85400697f979231096bfa64a8216391e5e;hp=fe03f5c53b0185b05d27f5bc6f867bbb81de896d;hpb=0e06870bf080a38cda51c06c6612359afc2334e1;p=p5sagit%2Fp5-mst-13.2.git diff --git a/iperlsys.h b/iperlsys.h index fe03f5c..d3e8254 100644 --- a/iperlsys.h +++ b/iperlsys.h @@ -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 */ @@ -251,8 +246,8 @@ struct IPerlStdIOInfo #define PerlSIO_setlinebuf(f) \ (*PL_StdIO->pSetlinebuf)(PL_StdIO, (f)) #define PerlSIO_printf Perl_fprintf_nocontext -#define PerlSIO_stdoutf *PL_StdIO->pPrintf -#define PerlSIO_vprintf(f,fmt,a) \ +#define PerlSIO_stdoutf Perl_printf_nocontext +#define PerlSIO_vprintf(f,fmt,a) \ (*PL_StdIO->pVprintf)(PL_StdIO, (f),(fmt),a) #define PerlSIO_ftell(f) \ (*PL_StdIO->pTell)(PL_StdIO, (f)) @@ -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) @@ -410,7 +415,7 @@ struct IPerlDirInfo #define PerlDir_mkdir(name, mode) Mkdir((name), (mode)) #ifdef VMS -# define PerlDir_chdir(n) Chdir(((n) && *(n)) ? (n) : "SYS$LOGIN") +# define PerlDir_chdir(n) Chdir((n)) #else # define PerlDir_chdir(name) chdir((name)) #endif @@ -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