diff options
author | Larry Wall <lwall@netlabs.com> | 1992-06-08 04:51:08 +0000 |
---|---|---|
committer | Larry Wall <lwall@netlabs.com> | 1992-06-08 04:51:08 +0000 |
commit | 83025b217962b0369a18edad3fa14dc1087f3c2a (patch) | |
tree | 36468918bed135500627ad32184c14ca2c6cb7fa /os2 | |
parent | ee0007abcec11102eeaa49662e5ebb838e04aac6 (diff) | |
download | perl-83025b217962b0369a18edad3fa14dc1087f3c2a.tar.gz |
perl 4.0 patch 29: patch #20, continued
See patch #20.
Diffstat (limited to 'os2')
-rw-r--r-- | os2/perlglob.cs | 6 | ||||
-rw-r--r-- | os2/perlglob.def | 3 | ||||
-rw-r--r-- | os2/popen.c | 12 |
3 files changed, 12 insertions, 9 deletions
diff --git a/os2/perlglob.cs b/os2/perlglob.cs index 7f58c6058f..b5fc1c99b2 100644 --- a/os2/perlglob.cs +++ b/os2/perlglob.cs @@ -1,9 +1,9 @@ os2\glob.c -(-DPERLGLOB os2\director.c) setargv.obj -os2\perlglob.def -os2\perlglob.bad + +os2\perl.def +os2\perl.bad perlglob.exe -AS -LB -S0x1000 diff --git a/os2/perlglob.def b/os2/perlglob.def index 52bddd1b00..a14bc63f16 100644 --- a/os2/perlglob.def +++ b/os2/perlglob.def @@ -1,2 +1 @@ -NAME PERLGLOB WINDOWCOMPAT NEWFILES -DESCRIPTION 'Filename globbing for PERL - for MS-DOS and OS/2' +(deprecated) diff --git a/os2/popen.c b/os2/popen.c index 15c11122d0..b9522b5671 100644 --- a/os2/popen.c +++ b/os2/popen.c @@ -65,7 +65,7 @@ FILE *mypopen(char *cmd, char *mode) if ( _osmode == DOS_MODE ) return dos_popen(cmd, mode); - if (DosMakePipe((PHFILE) &p[0], (PHFILE) &p[1], 4096) < 0) + if ( _pipe(p, 4096, 0) ) return NULL; myside = tst(p[WRITEH], p[READH]); @@ -124,7 +124,7 @@ int pipe(int *filedes) { int res; - if ( res = DosMakePipe((PHFILE) &filedes[0], (PHFILE) &filedes[1], 4096) ) + if ( res = _pipe(filedes, 4096, 0) ) return res; DosSetFHandState(filedes[0], OPEN_FLAGS_NOINHERIT); @@ -149,6 +149,7 @@ static FILE *dos_popen(const char *command, const char *mode) { FILE *current; char name[128]; + char *tmp = getenv("TMP"); int cur; pipemode curmode; @@ -165,8 +166,11 @@ static FILE *dos_popen(const char *command, const char *mode) /* ** get a name to use. */ - strcpy(name, "piXXXXXX"); - Mktemp(name); + strcpy(name, tmp ? tmp : "\\"); + if ( name[strlen(name) - 1] != '\\' ) + strcat(name, "\\"); + strcat(name, "piXXXXXX"); + mktemp(name); /* ** If we're reading, just call system to get a file filled with |