[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 6/6] esyscmd: fdopen() in text mode explicitly on OS/2
From: |
KO Myung-Hun |
Subject: |
[PATCH 6/6] esyscmd: fdopen() in text mode explicitly on OS/2 |
Date: |
Wed, 19 Nov 2014 13:06:51 +0900 |
On OS/2 kLIBC, fdopen() creates a stream in a mode of a file
descriptor. So specify "t" to open a stream in text mode explicitly
on OS/2.
* modules/gnu.c (esyscmd): fdopen() in text mode on OS/2.
---
modules/gnu.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/modules/gnu.c b/modules/gnu.c
index 874502e..7abd2cf 100644
--- a/modules/gnu.c
+++ b/modules/gnu.c
@@ -684,7 +684,12 @@ M4BUILTIN_HANDLER (esyscmd)
m4_set_sysval (127);
return;
}
- pin = fdopen (fd, "r");
+#if OS2
+# define MODE_TEXT "t"
+#else
+# define MODE_TEXT ""
+#endif
+ pin = fdopen (fd, "r" MODE_TEXT);
if (!pin)
{
m4_error (context, 0, errno, me, _("cannot run command %s"),
--
1.8.5.2
- [PATCH] OS/2 patches for master branch, KO Myung-Hun, 2014/11/18
- [PATCH 1/6] bootstrap: set and use PATH_SEPARATOR, KO Myung-Hun, 2014/11/18
- [PATCH 5/6] configury: avoid version-info for modules on OS/2, KO Myung-Hun, 2014/11/18
- [PATCH 4/6] configure: add -Zargs-resp and -no-undefined to LDFLAGS on OS/2, KO Myung-Hun, 2014/11/18
- [PATCH 3/6] m4: support to load modules on OS/2, KO Myung-Hun, 2014/11/18
- [PATCH 2/6] m4-syscmd: append $EXEEXT suffix to the executable, /bin/sh, KO Myung-Hun, 2014/11/18
- [PATCH 6/6] esyscmd: fdopen() in text mode explicitly on OS/2,
KO Myung-Hun <=