Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2011-08-23 15:59:56 +0400
committerRalf Corsepius <ralf.corsepius@rtems.org>2011-08-23 15:59:56 +0400
commit0792b19670ce1024020c30422770e27599f8c676 (patch)
tree66793bb12e298d5a2d0f2467abd281f8bf69ac8c
parent74c92a62fe1d815b90c72587504dfd57b51ae62b (diff)
2011-08-23 Ralf Corsépius <ralf.corsepius@rtems.org>
* libc/posix/regexec.c: Define "nope" only #ifndef NDEBUG. * libc/stdio/vfscanf.c: Define "state" only #ifdef _MB_CAPABLE. * libc/string/wcwidth.c: Include <wctypes.h> for "iswprint" and "iswcntrl".
-rw-r--r--newlib/ChangeLog7
-rw-r--r--newlib/libc/posix/regexec.c2
-rw-r--r--newlib/libc/stdio/vfscanf.c2
-rw-r--r--newlib/libc/string/wcwidth.c3
4 files changed, 14 insertions, 0 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index c8dbd7f52..97c1b040c 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,5 +1,12 @@
2011-08-23 Ralf Corsépius <ralf.corsepius@rtems.org>
+ * libc/posix/regexec.c: Define "nope" only #ifndef NDEBUG.
+ * libc/stdio/vfscanf.c: Define "state" only #ifdef _MB_CAPABLE.
+ * libc/string/wcwidth.c: Include <wctypes.h> for "iswprint" and
+ "iswcntrl".
+
+2011-08-23 Ralf Corsépius <ralf.corsepius@rtems.org>
+
* libc/sys/rtems/include/limits.h: Compute SSIZE_MAX based on
__SIZE_MAX__, __SIZEOF_SIZE_T__ and __CHAR_BIT__.
diff --git a/newlib/libc/posix/regexec.c b/newlib/libc/posix/regexec.c
index 957ce3bce..98f5ef611 100644
--- a/newlib/libc/posix/regexec.c
+++ b/newlib/libc/posix/regexec.c
@@ -58,7 +58,9 @@ static char sccsid[] = "@(#)regexec.c 8.3 (Berkeley) 3/20/94";
#include "utils.h"
#include "regex2.h"
+#ifndef NDEBUG
static int nope = 0; /* for use in asserts; shuts lint up */
+#endif
/* macros for manipulating states, small version */
#define states long
diff --git a/newlib/libc/stdio/vfscanf.c b/newlib/libc/stdio/vfscanf.c
index 42ebacd33..32a132a93 100644
--- a/newlib/libc/stdio/vfscanf.c
+++ b/newlib/libc/stdio/vfscanf.c
@@ -453,7 +453,9 @@ _DEFUN(__SVFSCANF_R, (rptr, fp, fmt0, ap),
wchar_t wc; /* wchar to use to read format string */
wchar_t *wcp; /* handy wide character pointer */
size_t mbslen; /* length of converted multibyte sequence */
+#ifdef _MB_CAPABLE
mbstate_t state; /* value to keep track of multibyte state */
+#endif
#define CCFN_PARAMS _PARAMS((struct _reent *, const char *, char **, int))
u_long (*ccfn)CCFN_PARAMS=0; /* conversion function (strtol/strtoul) */
diff --git a/newlib/libc/string/wcwidth.c b/newlib/libc/string/wcwidth.c
index f825be6ab..ac5c47f67 100644
--- a/newlib/libc/string/wcwidth.c
+++ b/newlib/libc/string/wcwidth.c
@@ -94,6 +94,9 @@ PORTABILITY
#include <_ansi.h>
#include <wchar.h>
+#ifndef _MB_CAPABLE
+#include <wctype.h> /* iswprint, iswcntrl */
+#endif
#include "local.h"
#ifdef _MB_CAPABLE