[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-diffs] [SCM] gawk branch, select, updated. gawk-4.1.0-72-g69b59a7
From: |
Andrew J. Schorr |
Subject: |
[gawk-diffs] [SCM] gawk branch, select, updated. gawk-4.1.0-72-g69b59a7 |
Date: |
Sun, 07 Jul 2013 17:19:11 +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, select has been updated
via 69b59a73db108ede65e4dfce90fcfb10723e1feb (commit)
from faf3affc19f760a330153b22a8e56fc9a13a0cb6 (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=69b59a73db108ede65e4dfce90fcfb10723e1feb
commit 69b59a73db108ede65e4dfce90fcfb10723e1feb
Author: Andrew J. Schorr <address@hidden>
Date: Sun Jul 7 13:18:41 2013 -0400
Patch the select extension's set_non_blocking function to check that fcntl
and O_NONBLOCK are available.
diff --git a/extension/ChangeLog b/extension/ChangeLog
index 244940e..7642797 100644
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@ -1,5 +1,11 @@
2013-07-07 Andrew J. Schorr <address@hidden>
+ * configure.ac (AC_CHECK_FUNCS): Check for fcntl.
+ * select.c (set_non_blocking): Check that fcntl and O_NONBLOCK are
+ available.
+
+2013-07-07 Andrew J. Schorr <address@hidden>
+
* select.c (signal_handler): On platforms lacking sigaction, reset
the signal handler each time a signal is trapped to protect in case
the system resets it to default.
diff --git a/extension/configh.in b/extension/configh.in
index aa5c71e..847a519 100644
--- a/extension/configh.in
+++ b/extension/configh.in
@@ -39,6 +39,9 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
+/* Define to 1 if you have the `fcntl' function. */
+#undef HAVE_FCNTL
+
/* Define to 1 if you have the `fdopendir' function. */
#undef HAVE_FDOPENDIR
diff --git a/extension/configure b/extension/configure
index c9cb9a2..efae556 100755
--- a/extension/configure
+++ b/extension/configure
@@ -14017,7 +14017,7 @@ fi
done
-for ac_func in fdopendir fnmatch gettimeofday \
+for ac_func in fcntl fdopendir fnmatch gettimeofday \
getdtablesize kill nanosleep select sigaction sigprocmask \
GetSystemTimeAsFileTime
do :
diff --git a/extension/configure.ac b/extension/configure.ac
index aca856a..9571f8d 100644
--- a/extension/configure.ac
+++ b/extension/configure.ac
@@ -70,7 +70,7 @@ AC_HEADER_MAJOR
AC_CHECK_HEADERS(dirent.h fnmatch.h limits.h time.h sys/time.h sys/select.h \
sys/param.h signal.h)
-AC_CHECK_FUNCS(fdopendir fnmatch gettimeofday \
+AC_CHECK_FUNCS(fcntl fdopendir fnmatch gettimeofday \
getdtablesize kill nanosleep select sigaction sigprocmask \
GetSystemTimeAsFileTime)
diff --git a/extension/select.c b/extension/select.c
index 072a562..9aefaea 100644
--- a/extension/select.c
+++ b/extension/select.c
@@ -481,6 +481,7 @@ do_select(int nargs, awk_value_t *result)
static int
set_non_blocking(int fd)
{
+#if defined(HAVE_FCNTL) && defined(O_NONBLOCK)
int flags;
if (((flags = fcntl(fd, F_GETFL)) == -1) ||
@@ -489,6 +490,10 @@ set_non_blocking(int fd)
return -1;
}
return 0;
+#else
+ update_ERRNO_string(_("set_non_blocking: not supported on this
platform"));
+ return -1;
+#endif
}
/* do_set_non_blocking --- Set a file to be non-blocking */
-----------------------------------------------------------------------
Summary of changes:
extension/ChangeLog | 6 ++++++
extension/configh.in | 3 +++
extension/configure | 2 +-
extension/configure.ac | 2 +-
extension/select.c | 5 +++++
5 files changed, 16 insertions(+), 2 deletions(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk-diffs] [SCM] gawk branch, select, updated. gawk-4.1.0-72-g69b59a7,
Andrew J. Schorr <=