From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dedi548.your-server.de (dedi548.your-server.de [85.10.215.148]) by sourceware.org (Postfix) with ESMTPS id C76A0385734E for ; Tue, 21 Jun 2022 12:49:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C76A0385734E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embedded-brains.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embedded-brains.de Received: from sslproxy02.your-server.de ([78.47.166.47]) by dedi548.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1o3dK2-0003Yl-J9 for newlib@sourceware.org; Tue, 21 Jun 2022 14:49:35 +0200 Received: from [82.100.198.138] (helo=mail.embedded-brains.de) by sslproxy02.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o3dK2-000LeK-Pl for newlib@sourceware.org; Tue, 21 Jun 2022 14:49:34 +0200 Received: from localhost (localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 7B0734801DF for ; Tue, 21 Jun 2022 14:49:34 +0200 (CEST) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id jqVdkobNZ0TI for ; Tue, 21 Jun 2022 14:49:34 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 221044801D9 for ; Tue, 21 Jun 2022 14:49:34 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.eb.localhost Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id cdoLNFIPQ3lG for ; Tue, 21 Jun 2022 14:49:34 +0200 (CEST) Received: from zimbra.eb.localhost (unknown [192.168.96.242]) by mail.embedded-brains.de (Postfix) with ESMTPSA id 0994948013E for ; Tue, 21 Jun 2022 14:49:34 +0200 (CEST) From: Sebastian Huber To: newlib@sourceware.org Subject: [PATCH 01/14] Move content in Date: Tue, 21 Jun 2022 14:49:18 +0200 Message-Id: <20220621124931.36450-2-sebastian.huber@embedded-brains.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220621124931.36450-1-sebastian.huber@embedded-brains.de> References: <20220621124931.36450-1-sebastian.huber@embedded-brains.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Authenticated-Sender: smtp-embedded@poldinet.de X-Virus-Scanned: Clear (ClamAV 0.103.6/26579/Tue Jun 21 10:15:30 2022) X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jun 2022 12:49:39 -0000 Move definitions not directly related to struct _reent to the bottom of t= he file. This allows a contiguous #ifndef _REENT_THREAD_LOCAL_STORAGE block= . --- newlib/libc/include/sys/reent.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/newlib/libc/include/sys/reent.h b/newlib/libc/include/sys/re= ent.h index 2d144f653..e9bded6c7 100644 --- a/newlib/libc/include/sys/reent.h +++ b/newlib/libc/include/sys/reent.h @@ -725,11 +725,6 @@ struct _reent _REENT_INIT_PTR_ZEROED(var); \ } =20 -/* This value is used in stdlib/misc.c. reent/reent.c has to know it - as well to make sure the freelist is correctly free'd. Therefore - we define it here, rather than in stdlib/misc.c, as before. */ -#define _Kmax (sizeof (size_t) << 3) - /* * All references to struct _reent are via this pointer. * Internally, newlib routines that need to reference it should use _REE= NT. @@ -747,13 +742,6 @@ extern struct _reent *_impure_ptr __ATTRIBUTE_IMPURE= _PTR__; =20 extern struct _reent _impure_data __ATTRIBUTE_IMPURE_DATA__; =20 -extern void (*__stdio_exit_handler) (void); - -void _reclaim_reent (struct _reent *); - -extern int _fwalk_sglue (struct _reent *, int (*)(struct _reent *, __FIL= E *), - struct _glue *); - /* #define _REENT_ONLY define this to get only reentrant routines */ =20 #if defined(__DYNAMIC_REENT__) && !defined(__SINGLE_THREAD__) @@ -767,9 +755,21 @@ extern int _fwalk_sglue (struct _reent *, int (*)(st= ruct _reent *, __FILE *), =20 #define _GLOBAL_REENT (&_impure_data) =20 +/* This value is used in stdlib/misc.c. reent/reent.c has to know it + as well to make sure the freelist is correctly free'd. Therefore + we define it here, rather than in stdlib/misc.c, as before. */ +#define _Kmax (sizeof (size_t) << 3) + extern struct _atexit *__atexit; /* points to head of LIFO stack */ extern struct _atexit __atexit0; /* one guaranteed table, required by AN= SI */ =20 +extern void (*__stdio_exit_handler) (void); + +void _reclaim_reent (struct _reent *); + +extern int _fwalk_sglue (struct _reent *, int (*)(struct _reent *, __FIL= E *), + struct _glue *); + #ifdef __cplusplus } #endif --=20 2.35.3