From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x329.google.com (mail-ot1-x329.google.com [IPv6:2607:f8b0:4864:20::329]) by sourceware.org (Postfix) with ESMTPS id 915AD3858C53 for ; Tue, 24 Jan 2023 17:50:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 915AD3858C53 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ot1-x329.google.com with SMTP id cm26-20020a056830651a00b00684e5c0108dso9652436otb.9 for ; Tue, 24 Jan 2023 09:50:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=kCMQvz1Uji8Anth2Nkwzq4SM1stJeDXObudB7UrDFVM=; b=M3tDLzEWSdHWzktCcNR47YV4VIDCzHF5NMH3LXoXlk80KUSPPZhM614QxhMp+WpmkI pKCMXxo7yjjcyKonNW7g3rhXceo9TaFJtuR83QggxOLwXoT0jAK+OeggHC2d/tLXh3dz 4FAcxwY2u1/39muyXt9//01B4GlDl+9zZRQ0/EtlKJ/je+GoAhPsdDUKPqNdqjpRzPLD fkgrvoevz1yYk1PGUxLNYjKH3zomvN3FqMOc/dmkONRABGR3NN/gg0FCOBHBvYaxm+MA y9gg0z4fStanHPSnFGKB+AZyRbjFWcQ2lN23jEOABM/9YL5+VAkeBxQOTMEoI13xOHsr oDKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=kCMQvz1Uji8Anth2Nkwzq4SM1stJeDXObudB7UrDFVM=; b=kNWPCTTpzgN+1Vdi9aoV9KJ3Nn/fVorU4rxObMQuiUjlbgSMNEqlrJ6wRuRFdkCrpv zxSzPN/MDLOsSAEXrqc6uGGM5jbnRDe+rNj/HnKupYnZ5REAyYyjAz9hL4qKhvZVpH+2 kOwPnKIyNsazCv3CpVOAcpcMxdkp0dZikPN13tzb8BgfZQp4JwTp33BrTYroXLsYnpxp 9N9YAnvsiCMsQUCiH6alE3e50hqxGr7ysiuOjYvKZ/hBeMMk7GaHK+iRuPwVY0xpZH9N ijBOz42bK7bB4WrgAH2ZYdkv3HqX2sFbbK0tlBG1gQKer4GNNXxCvPpBGyGj1EytUbrF NnjQ== X-Gm-Message-State: AFqh2krYPHGiXrKSqETQgdbeLsUJk5oBzyXNtrd4JpwjWP9ZptAPvkh1 EGWdLI80iN21xO29P1prYHNhpQc7/GJJCittrLA= X-Google-Smtp-Source: AMrXdXvP6HpPKYodeVBc0m1P2FAICZ8LpAGK+9igPMZS/9Q85q+4g5qGpvVnAFf/D4QxxF6MaUedOA== X-Received: by 2002:a05:6830:6312:b0:686:4792:1e3f with SMTP id cg18-20020a056830631200b0068647921e3fmr16570525otb.38.1674582604144; Tue, 24 Jan 2023 09:50:04 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c1:7e99:b48d:50d:f118:be1a]) by smtp.gmail.com with ESMTPSA id 74-20020a9d0650000000b00686467f920bsm1202593otn.48.2023.01.24.09.50.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Jan 2023 09:50:03 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org, Andreas Schwab Subject: [PATCH v2] wchar: Define va_list for POSIX (BZ #30035) Date: Tue, 24 Jan 2023 14:49:59 -0300 Message-Id: <20230124174959.1718640-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: This was uncovered by a recent clang change [1]. Different than ISO C, POSIX states that va_list should be exported by wchar.h [2]. Checked on x86_64-linux-gnu and aarch64-linux-gnu. [1] https://reviews.llvm.org/D137268 [2] https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/basedefs/wchar.h.html --- conform/data/wchar.h-data | 3 +++ wcsmbs/wchar.h | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/conform/data/wchar.h-data b/conform/data/wchar.h-data index e414651a33..0af74e14bc 100644 --- a/conform/data/wchar.h-data +++ b/conform/data/wchar.h-data @@ -15,6 +15,9 @@ type size_t type locale_t # endif tag {struct tm} +# if !defined ISO99 && !defined ISO11 && !defined UNIX98 +type va_list +# endif function wint_t btowc (int) function int fwprintf (FILE*, const wchar_t*, ...) diff --git a/wcsmbs/wchar.h b/wcsmbs/wchar.h index 69e920b8c2..ca145bb8d2 100644 --- a/wcsmbs/wchar.h +++ b/wcsmbs/wchar.h @@ -37,6 +37,17 @@ #define __need___va_list #include +#if defined __USE_XOPEN2K || defined __USE_XOPEN2K8 +# ifdef __GNUC__ +# ifndef _VA_LIST_DEFINED +typedef __gnuc_va_list va_list; +# define _VA_LIST_DEFINED +# endif +# else +# include +# endif +#endif + #include #include #include -- 2.34.1