aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2011-12-06 21:39:57 +0200
committerArnold D. Robbins <arnold@skeeve.com>2011-12-06 21:39:57 +0200
commitc399d8f8226bba46d34b8672ca50722605f95e37 (patch)
treed17c6dfa1450428f5efac80418d89276681099d8
parent77620464b7805e03fcfc5de21a6e46b32426c6f0 (diff)
downloadegawk-c399d8f8226bba46d34b8672ca50722605f95e37.tar.gz
egawk-c399d8f8226bba46d34b8672ca50722605f95e37.tar.bz2
egawk-c399d8f8226bba46d34b8672ca50722605f95e37.zip
MBS support tweaks for DJGPP and z/OS.
-rw-r--r--ChangeLog6
-rw-r--r--awk.h8
-rw-r--r--io.c4
-rw-r--r--mbsupport.h7
4 files changed, 17 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 4de41541..42fe783c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-12-06 Arnold D. Robbins <arnold@skeeve.com>
+
+ * awk.h, mbsupport.h: Changes for MBS support on DJGPP
+ and z/OS.
+ * io.c: Disable pty support on z/OS.
+
2011-11-27 Arnold D. Robbins <arnold@skeeve.com>
* dfa.c: Sync with GNU grep.
diff --git a/awk.h b/awk.h
index 0c954723..a267d2ee 100644
--- a/awk.h
+++ b/awk.h
@@ -76,6 +76,10 @@
extern int errno;
#endif
+#ifdef STDC_HEADERS
+#include <stdlib.h>
+#endif /* not STDC_HEADERS */
+
#include "mbsupport.h" /* defines MBS_SUPPORT */
#if MBS_SUPPORT
@@ -131,10 +135,6 @@ typedef int off_t;
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
#endif
-#ifdef STDC_HEADERS
-#include <stdlib.h>
-#endif /* not STDC_HEADERS */
-
#include "protos.h"
#ifdef HAVE_STRING_H
diff --git a/io.c b/io.c
index e423a436..9c827eda 100644
--- a/io.c
+++ b/io.c
@@ -1594,7 +1594,7 @@ two_way_open(const char *str, struct redirect *rp)
}
#endif /* HAVE_SOCKETS */
-#ifdef HAVE_TERMIOS_H
+#if defined(HAVE_TERMIOS_H) && ! defined(ZOS_USS)
/* case 2: use ptys for two-way communications to child */
if (! no_ptys && pty_vs_pipe(str)) {
static int initialized = FALSE;
@@ -1809,7 +1809,7 @@ two_way_open(const char *str, struct redirect *rp)
first_pty_letter = '\0'; /* reset for next command */
return TRUE;
}
-#endif /* HAVE_TERMIOS_H */
+#endif /* defined(HAVE_TERMIOS_H) && ! defined(ZOS_USS) */
use_pipes:
#ifndef PIPES_SIMULATED /* real pipes */
diff --git a/mbsupport.h b/mbsupport.h
index 57abaa60..f647d788 100644
--- a/mbsupport.h
+++ b/mbsupport.h
@@ -40,7 +40,7 @@
#if defined(HAVE_ISWCTYPE) \
&& defined(HAVE_LOCALE_H) \
- && defined(HAVE_BTOWC) \
+ && (defined(HAVE_BTOWC) || defined(ZOS_USS)) \
&& defined(HAVE_MBRLEN) \
&& defined(HAVE_MBRTOWC) \
&& defined(HAVE_WCHAR_H) \
@@ -71,7 +71,10 @@
/* All this glop is for dfa.c. Bleah. */
-#define wchar_t char
+#ifndef DJGPP
+#define wchar_t char
+#endif
+
#define wctype_t int
#define wint_t int
#define mbstate_t int