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:
authorJeff Johnston <jjohnstn@redhat.com>2022-03-30 22:58:06 +0300
committerJeff Johnston <jjohnstn@redhat.com>2022-03-30 22:58:06 +0300
commit0239bc706a32364edc95ea06f667f4b233f74b77 (patch)
tree2c27e1c0ec3ddf222fb923f18108d9faf01c8d16 /newlib/libc/stdio
parent49a00a0673e7318f7f27719ab2f0ac8eb3c6b439 (diff)
Commit patch from Tobias Burnus <tobias@codesourcery.com>
[PATCH] newlib: Only call _fputwc_r if ELIX_LEVEL >= 4 (nano-)vfprintf.c is enabled for ELIX_LEVEL >= 1. When _WIDE_ORIENT is set, its __sprint_r / __sfputs_r functions unconditionally called _fputwc_r which is only in ELEX_LEVEL >= 4. With this commit, the _WIDE support in (nano-)vfprintf.c is disabled for ELEX_LEVEL < 4.
Diffstat (limited to 'newlib/libc/stdio')
-rw-r--r--newlib/libc/stdio/nano-vfprintf.c4
-rw-r--r--newlib/libc/stdio/vfprintf.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/newlib/libc/stdio/nano-vfprintf.c b/newlib/libc/stdio/nano-vfprintf.c
index bc7ed0743..838804eb9 100644
--- a/newlib/libc/stdio/nano-vfprintf.c
+++ b/newlib/libc/stdio/nano-vfprintf.c
@@ -356,7 +356,7 @@ __sprint_r (struct _reent *ptr,
uio->uio_iovcnt = 0;
return 0;
}
-#ifdef _WIDE_ORIENT
+#if defined _WIDE_ORIENT && (!defined _ELIX_LEVEL || _ELIX_LEVEL >= 4)
if (fp->_flags2 & __SWID)
{
struct __siov *iov;
@@ -407,7 +407,7 @@ __sfputs_r (struct _reent *ptr,
{
register int i;
-#ifdef _WIDE_ORIENT
+#if defined _WIDE_ORIENT && (!defined _ELIX_LEVEL || _ELIX_LEVEL >= 4)
if (fp->_flags2 & __SWID)
{
wchar_t *p;
diff --git a/newlib/libc/stdio/vfprintf.c b/newlib/libc/stdio/vfprintf.c
index c1483c0ac..32ebb1468 100644
--- a/newlib/libc/stdio/vfprintf.c
+++ b/newlib/libc/stdio/vfprintf.c
@@ -370,7 +370,7 @@ __sfputs_r (struct _reent *ptr,
{
register int i;
-#ifdef _WIDE_ORIENT
+#if defined _WIDE_ORIENT && (!defined _ELIX_LEVEL || _ELIX_LEVEL >= 4)
if (fp->_flags2 & __SWID) {
wchar_t *p;
@@ -406,7 +406,7 @@ __sprint_r (struct _reent *ptr,
uio->uio_iovcnt = 0;
return (0);
}
-#ifdef _WIDE_ORIENT
+#if defined _WIDE_ORIENT && (!defined _ELIX_LEVEL || _ELIX_LEVEL >= 4)
if (fp->_flags2 & __SWID) {
struct __siov *iov;
wchar_t *p;