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-775


From: Arnold Robbins
Subject: [gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-775-gedbc856
Date: Wed, 16 Dec 2015 04:02:22 +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  edbc856be17c8d0a1b3ae8d7a2e6007f44bbb192 (commit)
       via  f783601d333d7875e790e7e755a0b24e1110533d (commit)
       via  0570bab8a30cbd80df2e37c51300df499e68a61d (commit)
      from  6dcb6d9c71c1ed42f68a5468db18b80b790fd281 (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=edbc856be17c8d0a1b3ae8d7a2e6007f44bbb192

commit edbc856be17c8d0a1b3ae8d7a2e6007f44bbb192
Author: Arnold D. Robbins <address@hidden>
Date:   Wed Dec 16 06:01:55 2015 +0200

    Rework pty handling so that AIX will work too.

diff --git a/ChangeLog b/ChangeLog
index 5422776..3dd1479 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,11 @@
        * profile.c (pp_number): Move count into ifdef for MPFR. Avoids
        an unused variable warning if not compiling for MPFR.
 
+       Unrelated:
+
+       * io.c (two_way_open): If using a pty instead of pipes, open the
+       slave in the child. Fixes AIX and doesn't seem to break GNU/Linux.
+
 2015-11-26         Arnold D. Robbins     <address@hidden>
 
        * command.y (cmdtab): Add "exit" as synonym for "quit".
diff --git a/NEWS b/NEWS
index 348c68b..cf7bc46 100644
--- a/NEWS
+++ b/NEWS
@@ -19,6 +19,8 @@ Changes from 4.1.3 to 4.1.x
 4. The "exit" command has been added to the debugger as an alias
    for "quit".
 
+5. AIX 7.1 should pass the test suite now.
+
 Changes from 4.1.2 to 4.1.3
 ---------------------------
 
diff --git a/io.c b/io.c
index f6b5031..2249a2d 100644
--- a/io.c
+++ b/io.c
@@ -1879,56 +1879,75 @@ two_way_open(const char *str, struct redirect *rp)
                goto use_pipes;
 
        got_the_pty:
-               if ((slave = open(slavenam, O_RDWR)) < 0) {
-                       close(master);
-                       fatal(_("could not open `%s', mode `%s'"),
-                               slavenam, "r+");
-               }
 
-#ifdef I_PUSH
                /*
-                * Push the necessary modules onto the slave to
-                * get terminal semantics.
+                * We specifically open the slave only in the child. This allows
+                * certain, er, "limited" systems to work.  The open is 
specifically
+                * without O_NOCTTY in order to make the slave become the 
controlling
+                * terminal.
                 */
-               ioctl(slave, I_PUSH, "ptem");
-               ioctl(slave, I_PUSH, "ldterm");
+
+               switch (pid = fork()) {
+               case 0:
+                       /* Child process */
+                       setsid();
+
+                       if ((slave = open(slavenam, O_RDWR)) < 0) {
+                               close(master);
+                               fatal(_("could not open `%s', mode `%s'"),
+                                       slavenam, "r+");
+                       }
+
+#ifdef I_PUSH
+                       /*
+                        * Push the necessary modules onto the slave to
+                        * get terminal semantics.  Check that they aren't
+                        * already there to avoid hangs on said "limited" 
systems.
+                        */
+#ifdef I_FIND
+                       if (ioctl(slave, I_FIND, "ptem") == 0)
 #endif
+                               ioctl(slave, I_PUSH, "ptem");
+#ifdef I_FIND
+                       if (ioctl(slave, I_FIND, "ldterm") == 0)
+#endif
+                               ioctl(slave, I_PUSH, "ldterm");
+#endif
+                       tcgetattr(slave, & st);
 
-               tcgetattr(slave, & st);
-               st.c_iflag &= ~(ISTRIP | IGNCR | INLCR | IXOFF);
-               st.c_iflag |= (ICRNL | IGNPAR | BRKINT | IXON);
-               st.c_oflag &= ~OPOST;
-               st.c_cflag &= ~CSIZE;
-               st.c_cflag |= CREAD | CS8 | CLOCAL;
-               st.c_lflag &= ~(ECHO | ECHOE | ECHOK | NOFLSH | TOSTOP);
-               st.c_lflag |= ISIG;
+                       st.c_iflag &= ~(ISTRIP | IGNCR | INLCR | IXOFF);
+                       st.c_iflag |= (ICRNL | IGNPAR | BRKINT | IXON);
+                       st.c_oflag &= ~OPOST;
+                       st.c_cflag &= ~CSIZE;
+                       st.c_cflag |= CREAD | CS8 | CLOCAL;
+                       st.c_lflag &= ~(ECHO | ECHOE | ECHOK | NOFLSH | TOSTOP);
+                       st.c_lflag |= ISIG;
 
-               /* Set some control codes to default values */
+                       /* Set some control codes to default values */
 #ifdef VINTR
-               st.c_cc[VINTR] = '\003';        /* ^c */
+                       st.c_cc[VINTR] = '\003';        /* ^c */
 #endif
 #ifdef VQUIT
-               st.c_cc[VQUIT] = '\034';        /* ^| */
+                       st.c_cc[VQUIT] = '\034';        /* ^| */
 #endif
 #ifdef VERASE
-               st.c_cc[VERASE] = '\177';       /* ^? */
+                       st.c_cc[VERASE] = '\177';       /* ^? */
 #endif
 #ifdef VKILL
-               st.c_cc[VKILL] = '\025';        /* ^u */
+                       st.c_cc[VKILL] = '\025';        /* ^u */
 #endif
 #ifdef VEOF
-               st.c_cc[VEOF] = '\004'; /* ^d */
+                       st.c_cc[VEOF] = '\004'; /* ^d */
 #endif
-               tcsetattr(slave, TCSANOW, & st);
-
-               switch (pid = fork()) {
-               case 0:
-                       /* Child process */
-                       setsid();
 
 #ifdef TIOCSCTTY
+                       /*
+                        * This may not necessary anymore given that we
+                        * open the slave in the child, but it doesn't hurt.
+                        */
                        ioctl(slave, TIOCSCTTY, 0);
 #endif
+                       tcsetattr(slave, TCSANOW, & st);
 
                        if (close(master) == -1)
                                fatal(_("close of master pty failed (%s)"), 
strerror(errno));
@@ -1961,13 +1980,6 @@ two_way_open(const char *str, struct redirect *rp)
 
                }
 
-               /* parent */
-               if (close(slave) != 0) {
-                       close(master);
-                       (void) kill(pid, SIGKILL);
-                       fatal(_("close of slave pty failed (%s)"), 
strerror(errno));
-               }
-
                rp->pid = pid;
                rp->iop = iop_alloc(master, str, 0);
                find_input_parser(rp->iop);

http://git.sv.gnu.org/cgit/gawk.git/commit/?id=f783601d333d7875e790e7e755a0b24e1110533d

commit f783601d333d7875e790e7e755a0b24e1110533d
Author: Arnold D. Robbins <address@hidden>
Date:   Wed Dec 16 05:53:15 2015 +0200

    Autoconf fixups in extension directory.

diff --git a/extension/ChangeLog b/extension/ChangeLog
index afec614..ef66638 100644
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@ -1,3 +1,11 @@
+2015-12-16         Arnold D. Robbins     <address@hidden>
+
+       Make change of 2015-10-26 actually work.
+
+       * ext_custom.h: New file. Move _DEFAULT_SOURCE dance to here.
+       * configure.ac: Add call to AH_BOTTOM.
+       * configure: Regenerate.
+
 2015-11-15         Ville Skytta          <address@hidden>
 
        * fnmatch.3am, fork.3am, inplace.3am, ordchr.3am, readdir.3am,
diff --git a/extension/configh.in b/extension/configh.in
index a52f609..82cbb8f 100644
--- a/extension/configh.in
+++ b/extension/configh.in
@@ -147,9 +147,6 @@
 #ifndef _GNU_SOURCE
 # undef _GNU_SOURCE
 #endif
-#if defined _GNU_SOURCE && !defined _DEFAULT_SOURCE
-# define _DEFAULT_SOURCE
-#endif
 /* Enable threading extensions on Solaris.  */
 #ifndef _POSIX_PTHREAD_SEMANTICS
 # undef _POSIX_PTHREAD_SEMANTICS
@@ -193,3 +190,5 @@
 #ifndef __cplusplus
 #undef inline
 #endif
+
+#include "ext_custom.h"
diff --git a/extension/configure b/extension/configure
index 0e6dd61..e42ceb6 100755
--- a/extension/configure
+++ b/extension/configure
@@ -13035,6 +13035,7 @@ esac
 ac_config_headers="$ac_config_headers config.h:configh.in"
 
 
+
 ac_config_files="$ac_config_files Makefile"
 
 cat >confcache <<\_ACEOF
diff --git a/extension/configure.ac b/extension/configure.ac
index 45e4fb6..a0f78d7 100644
--- a/extension/configure.ac
+++ b/extension/configure.ac
@@ -79,6 +79,7 @@ dnl checks for compiler characteristics
 AC_C_INLINE
 
 AC_CONFIG_HEADERS([config.h:configh.in])
+AH_BOTTOM([#include "ext_custom.h"])
 
 AC_CONFIG_FILES(Makefile)
 AC_OUTPUT
diff --git a/extension/ext_custom.h b/extension/ext_custom.h
new file mode 100644
index 0000000..13702f2
--- /dev/null
+++ b/extension/ext_custom.h
@@ -0,0 +1,37 @@
+/*
+ * ext_custom.h
+ *
+ * This file is for use on systems where Autoconf isn't quite able to
+ * get things right. It is appended to the bottom of config.h by configure,
+ * in order to override definitions from Autoconf that are erroneous. See
+ * the manual for more information.
+ *
+ * If you make additions to this file for your system, please send me
+ * the information, to address@hidden
+ */
+
+/* 
+ * Copyright (C) 2015 the Free Software Foundation, Inc.
+ * 
+ * This file is part of GAWK, the GNU implementation of the
+ * AWK Programming Language.
+ * 
+ * GAWK is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * GAWK is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, 
USA
+ */
+
+/* From Michal Jaegermann for bleeding edge GLIBC. */
+#if defined _GNU_SOURCE && !defined _DEFAULT_SOURCE
+# define _DEFAULT_SOURCE
+#endif

http://git.sv.gnu.org/cgit/gawk.git/commit/?id=0570bab8a30cbd80df2e37c51300df499e68a61d

commit 0570bab8a30cbd80df2e37c51300df499e68a61d
Author: Arnold D. Robbins <address@hidden>
Date:   Wed Dec 16 05:38:07 2015 +0200

    Minor compile fix for non-MPFR builds.

diff --git a/ChangeLog b/ChangeLog
index 4f6957f..5422776 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-12-16         Arnold D. Robbins     <address@hidden>
+
+       * profile.c (pp_number): Move count into ifdef for MPFR. Avoids
+       an unused variable warning if not compiling for MPFR.
+
 2015-11-26         Arnold D. Robbins     <address@hidden>
 
        * command.y (cmdtab): Add "exit" as synonym for "quit".
diff --git a/profile.c b/profile.c
index 5af7b92..dc89d00 100644
--- a/profile.c
+++ b/profile.c
@@ -1324,9 +1324,10 @@ pp_number(NODE *n)
 {
 #define PP_PRECISION 6
        char *str;
-       size_t count;
 
 #ifdef HAVE_MPFR
+       size_t count;
+
        if (is_mpg_float(n)) {
                count = mpfr_get_prec(n->mpg_numbr) / 3;        /* ~ 3.22 
binary digits per decimal digit */
                emalloc(str, char *, count, "pp_number");

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

Summary of changes:
 ChangeLog                                      |   10 +++
 NEWS                                           |    2 +
 extension/ChangeLog                            |    8 ++
 extension/configh.in                           |    5 +-
 extension/configure                            |    1 +
 extension/configure.ac                         |    1 +
 missing_d/gawkbool.h => extension/ext_custom.h |   29 ++++-----
 io.c                                           |   86 +++++++++++++----------
 profile.c                                      |    3 +-
 9 files changed, 88 insertions(+), 57 deletions(-)
 copy missing_d/gawkbool.h => extension/ext_custom.h (58%)


hooks/post-receive
-- 
gawk



reply via email to

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