From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 19913 invoked from network); 24 May 2023 14:03:29 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 24 May 2023 14:03:29 -0000 Received: (qmail 32078 invoked by uid 550); 24 May 2023 14:01:38 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 31837 invoked from network); 24 May 2023 14:01:34 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=message-id:in-reply-to:references:from:date:to: resent-date:resent-from:subject:resent-message-id: resent-to; bh=xP2NYs6nKmBYDnK2h407XpfLpIAzKJG/jRMJ/8BoxHw=; b=SVYBOBROPdVhSv9uGfNob/F6zK2meUqPzdrZV98g2A7dIp4tzbnGlK7Q I4hwQhzqhjdnfHsiajjS29lbBM+ZPbbtsG5ms8DYx4qcNFrHzahQkTzv2 z+TmzHwbh2P1Qd660hQq/qTq8Gxf40UQt94w1yIB38tpNPWqA+Nt3Pdig o=; Authentication-Results: mail3-relais-sop.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=jens.gustedt@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="6.00,189,1681164000"; d="scan'208";a="56883731" Message-Id: <4ce3bedd2525d07509e9514d4b8274b4470878bb.1684932861.git.Jens.Gustedt@inria.fr> In-Reply-To: References: From: Jens Gustedt Date: Mon, 17 Apr 2023 11:09:20 +0200 To: musl@lists.openwall.com Resent-Date: Wed, 24 May 2023 15:56:32 +0200 Resent-From: =?UTF-8?B?SuKCkeKCmeKCmw==?= Gustedt Resent-Message-ID: <20230524155632.43d6c08b@inria.fr> Resent-To: musl@lists.openwall.com Subject: [musl] [C23 divers headers 03/17] C23: add call_once to stdlib.h Since C23, call_once, once_flag and ONCE_FLAG_INIT are also accessible even if the platform does not have the threads option. Add them to the header. The identifiers once_flag and ONCE_FLAG_INIT were not reserved in C17 if the header threads.h was not included, so this potentially creates naming conflicts. --- include/stdlib.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/stdlib.h b/include/stdlib.h index 475190bf..c635d99b 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -172,6 +172,10 @@ long double strtold_l(const char *__restrict, char **__restrict, struct __locale #endif #endif +#define ONCE_FLAG_INIT 0 +typedef int once_flag; +void call_once(once_flag *, void (*)(void)); + #ifdef __cplusplus } #endif -- 2.34.1