From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1921) id 8AEC23857402; Wed, 18 May 2022 05:58:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8AEC23857402 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] Optional struct _reent::__unused_sdidinit X-Act-Checkin: newlib-cygwin X-Git-Author: Sebastian Huber X-Git-Refname: refs/heads/master X-Git-Oldrev: 4a00cbcefe97848d7c202ecf40afd430719527a7 X-Git-Newrev: ad6d271eb6d5c31e16b8fae3f7d0ab2c14c70d6b Message-Id: <20220518055804.8AEC23857402@sourceware.org> Date: Wed, 18 May 2022 05:58:04 +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: Wed, 18 May 2022 05:58:04 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3Dad6d271eb6d= 5c31e16b8fae3f7d0ab2c14c70d6b commit ad6d271eb6d5c31e16b8fae3f7d0ab2c14c70d6b Author: Sebastian Huber Date: Fri May 13 14:40:07 2022 +0200 Optional struct _reent::__unused_sdidinit =20 Rename struct _reent member __unused_sdidinit to _reserved_0. Provide = it only if _REENT_BACKWARD_BINARY_COMPAT is defined. Diff: --- newlib/libc/include/sys/reent.h | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/newlib/libc/include/sys/reent.h b/newlib/libc/include/sys/reen= t.h index fa9ac57da..fc289b531 100644 --- a/newlib/libc/include/sys/reent.h +++ b/newlib/libc/include/sys/reent.h @@ -342,6 +342,12 @@ struct _rand48 { #define _REENT_ASCTIME_SIZE 26 #define _REENT_SIGNAL_SIZE 24 =20 +#ifdef _REENT_BACKWARD_BINARY_COMPAT +#define _REENT_INIT_RESERVED_0 0, +#else +#define _REENT_INIT_RESERVED_0 /* Nothing to initialize */ +#endif + /* * struct _reent * @@ -395,9 +401,9 @@ struct _reent =20 char *_emergency; =20 - /* No longer used, but member retained for binary compatibility. - Now, the __cleanup member is used to check initialization. */ - int _unused_sdidinit; +#ifdef _REENT_BACKWARD_BINARY_COMPAT + int _reserved_0; +#endif =20 int _unspecified_locale_info; /* unused, reserved for locale stuff */ struct __locale_t *_locale;/* per-thread locale */ @@ -440,7 +446,7 @@ struct _reent &__sf[2], \ 0, \ _NULL, \ - 0, \ + _REENT_INIT_RESERVED_0 \ 0, \ _NULL, \ _NULL, \ @@ -478,7 +484,7 @@ extern const struct __sFILE_fake __sf_fake_stderr; (__FILE *)&__sf_fake_stderr, \ 0, \ _NULL, \ - 0, \ + _REENT_INIT_RESERVED_0 \ 0, \ _NULL, \ _NULL, \ @@ -633,9 +639,9 @@ struct _reent int _unspecified_locale_info; /* unused, reserved for locale stuff */ struct __locale_t *_locale;/* per-thread locale */ =20 - /* No longer used, but member retained for binary compatibility. - Now, the __cleanup member is used to check initialization. */ - int _unused_sdidinit; +#ifdef _REENT_BACKWARD_BINARY_COMPAT + int _reserved_0; +#endif =20 void (*__cleanup) (struct _reent *); =20 @@ -723,7 +729,7 @@ struct _reent "", \ 0, \ _NULL, \ - 0, \ + _REENT_INIT_RESERVED_0 \ _NULL, \ _NULL, \ 0, \