summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-10-16 19:39:25 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-10-16 19:39:25 +0000
commitb353826bcd2dc50c17a6386211b9c68c8b888c93 (patch)
tree15ac6f49e80d95e65e23c354812746fba61704f5 /win32
parent842bcadf3049f0ddb229987ca172513d35d1cbfc (diff)
parent9f16d962dace601f24c23063432e8a8eb01bfa4a (diff)
downloadperl-b353826bcd2dc50c17a6386211b9c68c8b888c93.tar.gz
Integrate perlio:
[ 12462] PerlIOXxxx_dups for all but Win32 [ 12461] Implement PerlIOStdio_dup (explains core dumps - dup was not setting up a FILE * to be fclosed()). [ 12460] When USE_ITHREADS avoid SV * in PerlIO_debug, at risk of buffer overflow. [ 12456] Builds under ithreads (but fails all threads tests) [ 12451] Skeleton of "PerlIO_dup" coded. Still-passes all tests non-threaded (well it would wouldn't it!) [ 12447] Beginings of PerlIO_dup support (unstable) [ 11615] Avoid testing for (non-)existance of "encoding(xxxx)" layer is called "encoding" the (xxxx) is an argument. p4raw-link: @12462 on //depot/perlio: 9f16d962dace601f24c23063432e8a8eb01bfa4a p4raw-link: @12461 on //depot/perlio: b77c74bc90789599ae69b0d39a1984d2768fa05e p4raw-link: @12460 on //depot/perlio: 70ace5dac0395f9f5ca5478d23db8cd1e0dbd6e7 p4raw-link: @12456 on //depot/perlio: a8fc9800e47fd3c23e88282f4505c051278ccc9b p4raw-link: @12451 on //depot/perlio: 8cf8f3d16d82d8b3561907820401eea7766f2f96 p4raw-link: @12447 on //depot/perlio: 71200d45e1b06d4f36df595fa80b743f999642c1 p4raw-link: @11615 on //depot/perlio: 97ed432b8a5d63d1b7bdda09343e34225e6da722 p4raw-id: //depot/perl@12463
Diffstat (limited to 'win32')
-rw-r--r--win32/win32io.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/win32/win32io.c b/win32/win32io.c
index b707172b6d..6152647a74 100644
--- a/win32/win32io.c
+++ b/win32/win32io.c
@@ -189,12 +189,12 @@ PerlIOWin32_open(pTHX_ PerlIO_funcs *self, PerlIO_list_t *layers, IV n, const ch
s->h = h;
s->fd = fd;
s->refcnt = 1;
- if (fd >= 0)
+ if (fd >= 0)
{
- fdtable[fd] = s;
+ fdtable[fd] = s;
if (fd > max_open_fd)
max_open_fd = fd;
- }
+ }
return f;
}
if (f)
@@ -294,6 +294,13 @@ PerlIOWin32_close(PerlIO *f)
return 0;
}
+PerlIO *
+PerlIOWin32_dup(pTHX_ PerlIO *f, PerlIO *o, CLONE_PARAMS *params)
+{
+ /* Almost certainly needs more work */
+ return PerlIOBase_dup(aTHX_ f, o, params);
+}
+
PerlIO_funcs PerlIO_win32 = {
"win32",
sizeof(PerlIOWin32),
@@ -303,6 +310,7 @@ PerlIO_funcs PerlIO_win32 = {
PerlIOWin32_open,
NULL, /* getarg */
PerlIOWin32_fileno,
+ PerlIOWin32_dup,
PerlIOWin32_read,
PerlIOBase_unread,
PerlIOWin32_write,