From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1921) id 26D5C38582A3; Tue, 7 Jun 2022 19:29:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 26D5C38582A3 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Sebastian Huber To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] Fix __sglue inititialization X-Act-Checkin: newlib-cygwin X-Git-Author: Sebastian Huber X-Git-Refname: refs/heads/master X-Git-Oldrev: 07cf7630957e637755b347888bc4d69e5d51aa71 X-Git-Newrev: 14fc9be2349259ed4754457775ab4a14069395c5 Message-Id: <20220607192947.26D5C38582A3@sourceware.org> Date: Tue, 7 Jun 2022 19:29:47 +0000 (GMT) X-BeenThere: newlib-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib GIT logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jun 2022 19:29:47 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D14fc9be2349= 259ed4754457775ab4a14069395c5 commit 14fc9be2349259ed4754457775ab4a14069395c5 Author: Sebastian Huber Date: Tue Jun 7 07:55:02 2022 +0200 Fix __sglue inititialization =20 Do not initialize __sglue with the FILE objects of _GLOBAL_REENT to avo= id a double use in the !_REENT_SMALL and !_REENT_GLOBAL_STDIO_STREAMS config= urations which didn't use a thread-specific reentrancy structure. Diff: --- newlib/libc/stdio/findfp.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/newlib/libc/stdio/findfp.c b/newlib/libc/stdio/findfp.c index 6933ff1db..ff6804d19 100644 --- a/newlib/libc/stdio/findfp.c +++ b/newlib/libc/stdio/findfp.c @@ -41,11 +41,7 @@ const struct __sFILE_fake __sf_fake_stderr =3D __FILE __sf[3]; struct _glue __sglue =3D {NULL, 3, &__sf[0]}; #else -#ifdef _REENT_SMALL struct _glue __sglue =3D {NULL, 0, NULL}; -#else -struct _glue __sglue =3D {NULL, 3, &_GLOBAL_REENT->__sf[0]}; -#endif #endif =20 #ifdef _STDIO_BSD_SEMANTICS