gawk-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-30-


From: Arnold Robbins
Subject: [gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-30-gfe4f4f3
Date: Sun, 09 Jun 2013 03:15:59 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, gawk-4.1-stable has been updated
       via  fe4f4f372625682b10d5df11fef3c6f643e13410 (commit)
      from  54a79f8f1dbb86f92dcb0c7623fddbde1c81278c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=fe4f4f372625682b10d5df11fef3c6f643e13410

commit fe4f4f372625682b10d5df11fef3c6f643e13410
Author: Arnold D. Robbins <address@hidden>
Date:   Sun Jun 9 06:15:42 2013 +0300

    Minor change in io.c:iop_finish.

diff --git a/ChangeLog b/ChangeLog
index 6698889..fbc31fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-06-09         Arnold D. Robbins     <address@hidden>
+
+       * io.c (iop_finish): Change fstat call to fcntl/F_GETFL per
+       Eli Z., for Windows.
+
 2013-06-03         Arnold D. Robbins     <address@hidden>
 
        * eval.c (unwind_stack): If exiting, don't worry about strange stuff
diff --git a/io.c b/io.c
index 4921c82..a918c39 100644
--- a/io.c
+++ b/io.c
@@ -2996,8 +2996,6 @@ iop_finish(IOBUF *iop)
                        if (isdir)
                                iop->errcode = EISDIR;
                        else {
-                               struct stat sbuf;
-
                                iop->errcode = EIO;
                                /*
                                 * Extensions can supply values that are not
@@ -3005,8 +3003,10 @@ iop_finish(IOBUF *iop)
                                 * file descriptors. So check the fd before
                                 * trying to close it, which avoids errors
                                 * on some operating systems.
+                                *
+                                * The fcntl call works for Windows, too.
                                 */
-                               if (fstat(iop->public.fd, & sbuf) == 0)
+                               if (fcntl(iop->public.fd, F_GETFL) >= 0)
                                        (void) close(iop->public.fd);
                                iop->public.fd = INVALID_HANDLE;
                        }

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog |    5 +++++
 io.c      |    6 +++---
 2 files changed, 8 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]