summaryrefslogtreecommitdiff
path: root/modules/gnu.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gnu.c')
-rw-r--r--modules/gnu.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/gnu.c b/modules/gnu.c
index 874502e0..f891ddca 100644
--- a/modules/gnu.c
+++ b/modules/gnu.c
@@ -684,7 +684,13 @@ M4BUILTIN_HANDLER (esyscmd)
m4_set_sysval (127);
return;
}
+#if OS2
+ /* On OS/2 kLIBC, fdopen() creates a stream in a mode of a file
+ descriptor. So incldue "t" to open stream in a text mode explicitly. */
+ pin = fdopen (fd, "rt");
+#else
pin = fdopen (fd, "r");
+#endif
if (!pin)
{
m4_error (context, 0, errno, me, _("cannot run command %s"),