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 "GNU M4 source repository".

http://git.sv.gnu.org/gitweb/?p=m4.git;a=commitdiff;h=f2580cf7921bee2f2a3c204b67790bdef4018b9e

The branch, branch-1.4 has been updated
       via  f2580cf7921bee2f2a3c204b67790bdef4018b9e (commit)
       via  7ced05ab3db41cd20587060a29511c60c4521061 (commit)
       via  ddfde8ec546be262b26f46a73ce2cabab7a6deb0 (commit)
      from  36fd4989331fac3013757f713f95443a63b895c1 (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 -----------------------------------------------------------------
commit f2580cf7921bee2f2a3c204b67790bdef4018b9e
Author: KO Myung-Hun <[email protected]>
Date:   Wed Nov 19 15:13:58 2014 +0000

    m4: fdopen() with a text mode explicitly on OS/2.
    
    On OS/2 kLIBC, fdopen() creates a stream in a mode of a file
    descriptor. So specify "t" to open a stream in a text mode explicitly
    on OS/2.
    * src/builtin.c (m4_esyscmd): fdopen() in a text mode on OS/2.
    
    Signed-off-by: Gary V. Vaughan <[email protected]>

commit 7ced05ab3db41cd20587060a29511c60c4521061
Author: KO Myung-Hun <[email protected]>
Date:   Wed Nov 19 14:58:22 2014 +0000

    configury: add -Zargs-resp to LDFLAGS on OS/2.
    
    -Zargs-resp enables a response file support on OS/2.
    * configure.ac (OS2_LDFLAGS): Add -Zargs-resp on *-*-os2*.
    * src/Makefile.am (AM_LDFLAGS): Add OS2_LDFLAGS.
    
    Signed-off-by: Gary V. Vaughan <[email protected]>

commit ddfde8ec546be262b26f46a73ce2cabab7a6deb0
Author: KO Myung-Hun <[email protected]>
Date:   Wed Nov 19 14:06:12 2014 +0000

    configury: append $EXEEXT suffix to /bin/sh.
    
    Without $EXEEXT, /bin/sh cannot be located on OS/2.
    * configure.ac (with_syscmd_shell): append $EXEEXT suffix to /bin/sh.
    * THANKS: Add KO Myung-Hun.
    * NEWS: Update.
    
    Signed-off-by: Gary V. Vaughan <[email protected]>

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

Summary of changes:
 NEWS            |    2 ++
 THANKS          |    1 +
 configure.ac    |    5 ++++-
 src/Makefile.am |    1 +
 src/builtin.c   |    6 ++++++
 5 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/NEWS b/NEWS
index 029b34a..7dfd310 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,8 @@ GNU M4 NEWS - User visible changes.
 
 * Noteworthy changes in release ?.? (????-??-??) [?]
 
+** Preliminary support for OS/2.
+
 
 * Noteworthy changes in release 1.4.17 (2013-09-22) [stable]
 
diff --git a/THANKS b/THANKS
index 5e4b3ee..0fc7820 100644
--- a/THANKS
+++ b/THANKS
@@ -69,6 +69,7 @@ Karl Berry              [email protected]
 Karl Nelson             [email protected]
 Karl Vogel              [email protected]
 Kaveh R. Ghazi          [email protected]
+KO Myung-Hun           [email protected]
 Konrad Schwarz          [email protected]
 Kristine Lund           [email protected]
 Krste Asanovic          [email protected]
diff --git a/configure.ac b/configure.ac
index cd83878..1d23ebd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -191,7 +191,7 @@ if test "$with_syscmd_shell" = no ; then
   with_syscmd_shell=/bin/sh
   if test "$cross_compiling" != yes ; then
 dnl Give mingw a default that is more likely to be available.
-    AS_IF([AS_EXECUTABLE_P([/bin/sh])], [],
+    AS_IF([AS_EXECUTABLE_P([/bin/sh$EXEEXT])], [],
       [if (cmd /c) 2>/dev/null; then with_syscmd_shell=cmd; fi])
 dnl Too bad _AS_PATH_WALK is not public.
     M4_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -217,6 +217,9 @@ M4_WITH_DMALLOC
 
 AC_CONFIG_COMMANDS([stamp-h], [[test -z "$CONFIG_HEADERS" || date > stamp-h]])
 
+AS_CASE([$host], [*-*-os2*], [OS2_LDFLAGS="-Zargs-resp"])
+AC_SUBST([OS2_LDFLAGS])
+
 AC_CONFIG_FILES([Makefile
                  doc/Makefile
                  lib/Makefile
diff --git a/src/Makefile.am b/src/Makefile.am
index 1c03965..bd2460a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -22,6 +22,7 @@
 AUTOMAKE_OPTIONS = nostdinc
 AM_CPPFLAGS = -I$(top_srcdir)/lib -I../lib
 AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
+AM_LDFLAGS = $(OS2_LDFLAGS)
 bin_PROGRAMS = m4
 noinst_HEADERS = m4.h
 m4_SOURCES = m4.c builtin.c debug.c eval.c format.c freeze.c input.c \
diff --git a/src/builtin.c b/src/builtin.c
index e101838..1e0ff25 100644
--- a/src/builtin.c
+++ b/src/builtin.c
@@ -1019,7 +1019,13 @@ m4_esyscmd (struct obstack *obs, int argc, token_data 
**argv)
       sysval = 127;
       return;
     }
+#if OS2
+  /* On OS/2 kLIBC, fdopen() creates a stream in a mode of a file descriptor.
+     So include "t" to open a stream in a text mode explicitly on OS/2. */
+  pin = fdopen (fd, "rt");
+#else
   pin = fdopen (fd, "r");
+#endif
   if (pin == NULL)
     {
       M4ERROR ((warning_status, errno, "cannot run command `%s'", cmd));


hooks/post-receive
-- 
GNU M4 source repository

Reply via email to