summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--mbsupport.h8
-rw-r--r--pc/ChangeLog6
-rw-r--r--pc/Makefile.tst14
-rw-r--r--support/ChangeLog4
-rw-r--r--support/localeinfo.c4
6 files changed, 35 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 90e429fd..a98c2ba6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-08-27 Juan Manuel Guerrero <juan.guerrero@gmx.de>
+
+ * mbsupport.h [__DJGPP_]: Provide multi-byte specific declarations
+ and definitions for DJGPP.
+
2017-08-23 Arnold D. Robbins <arnold@skeeve.com>
* README.git: Minor edits to make build steps clearer.
diff --git a/mbsupport.h b/mbsupport.h
index e7b40423..51cec3c7 100644
--- a/mbsupport.h
+++ b/mbsupport.h
@@ -44,7 +44,13 @@
#define wcslen strlen
#define wctob(wc) (EOF)
-#define mbstate_t int
+#if (__DJGPP__ > 2 || __DJGPP_MINOR__ >= 3)
+# include <ctype.h>
+# include <wchar.h>
+# include <wctype.h>
+#else
+# define mbstate_t int
+#endif
extern wctype_t wctype(const char *name);
extern int iswctype(wint_t wc, wctype_t desc);
diff --git a/pc/ChangeLog b/pc/ChangeLog
index 92c9e932..9ed997ba 100644
--- a/pc/ChangeLog
+++ b/pc/ChangeLog
@@ -1,3 +1,9 @@
+2017-08-27 Juan Manuel Guerrero <juan.guerrero@gmx.de>
+
+ * pc/Makefile.tst (mbstr1, mbstr2, errno, getlndir, clos1way2)
+ (clos1way3, clos1way4, clos1way5, clos1way6): Update the expected
+ failure messages for DJGPP.
+
2017-08-26 Eli Zaretskii <eliz@gnu.org>
* Makefile.tst (SLASH, PATH_SEPARATOR, LS): Change the default
diff --git a/pc/Makefile.tst b/pc/Makefile.tst
index 2c8dd4a0..069431b8 100644
--- a/pc/Makefile.tst
+++ b/pc/Makefile.tst
@@ -486,7 +486,7 @@ devfd::
errno:
@echo $@
- @echo Expect errno to fail with MinGW due to error message differences
+ @echo Expect errno to fail with DJGPP and MinGW due to error message differences
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
@@ -885,14 +885,14 @@ gsubtst6::
mbstr1::
@echo $@
- @echo Expect mbstr1 to fail with MinGW.
+ @echo Expect mbstr1 to fail with DJGPP and MinGW.
@[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=ENU_USA.1252; \
AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
mbstr2::
@echo $@
- @echo Expect mbstr2 to fail with MinGW.
+ @echo Expect mbstr2 to fail with DJGPP and MinGW.
@[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=ENU_USA.1252; \
AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
@@ -2492,27 +2492,31 @@ backw:
clos1way2:
@echo $@
+ @echo Expect clos1way2 to fail with DJGPP.
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
clos1way3:
@echo $@
+ @echo Expect clos1way3 to fail with DJGPP.
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
clos1way4:
@echo $@
+ @echo Expect clos1way4 to fail with DJGPP.
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
clos1way5:
@echo $@
+ @echo Expect clos1way5 to fail with DJGPP.
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
clos1way6:
@echo $@
- @echo Expect clos1way6 to fail with MinGW
+ @echo Expect clos1way6 to fail with DJGPP and MinGW
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
@@ -2643,7 +2647,7 @@ gensub3:
getlndir:
@echo $@
- @echo Expect getlndir to fail with DJGPP.
+ @echo Expect getlndir to fail with DJGPP due to error message differences.
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
diff --git a/support/ChangeLog b/support/ChangeLog
index bc535ea8..5a9f5e93 100644
--- a/support/ChangeLog
+++ b/support/ChangeLog
@@ -1,3 +1,7 @@
+2017-08-27 Juan Manuel Guerrero <juan.guerrero@gmx.de>
+
+ * localeinfo.c [__DJGPP__]: Include mbsupport.h.
+
2017-06-25 Andrew J. Schorr <aschorr@telemetry-investments.com>
* dfa.c (dfaalloc): Replace xmalloc+memset with xzalloc.
diff --git a/support/localeinfo.c b/support/localeinfo.c
index ece679e3..4d77ec27 100644
--- a/support/localeinfo.c
+++ b/support/localeinfo.c
@@ -31,6 +31,10 @@
#include <string.h>
#include <wctype.h>
+#if defined(__DJGPP__)
+#include "mbsupport.h"
+#endif
+
/* The sbclen implementation relies on this. */
verify (MB_LEN_MAX <= SCHAR_MAX);