This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Perl_croak->Perl_croak_nocontext in core typemap + win32 static gitignore
[perl5.git] / win32 / win32ceio.c
index e0b75b5..aa916a1 100644 (file)
@@ -226,6 +226,7 @@ PerlIOWin32_read(pTHX_ PerlIO *f, void *vbuf, Size_t count)
    if (GetLastError() != NO_ERROR)
     {
      PerlIOBase(f)->flags |= PERLIO_F_ERROR;
+     PerlIO_save_errno(f);
      return -1;
     }
    else
@@ -249,6 +250,7 @@ PerlIOWin32_write(pTHX_ PerlIO *f, const void *vbuf, Size_t count)
  else
   {
    PerlIOBase(f)->flags |= PERLIO_F_ERROR;
+   PerlIO_save_errno(f);
    return -1;
   }
 }