From patchwork Mon Jan 23 17:01:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 1730574 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=cvRJQvIe; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4P0xG258m7z23gd for ; Tue, 24 Jan 2023 04:01:30 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 74F913858C20 for ; Mon, 23 Jan 2023 17:01:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 74F913858C20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1674493288; bh=LEPFL20v8Q7ZNypW3j8dKcgwW8ZlMsC3gOTZU1pNBd4=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=cvRJQvIeVR7cA7P5AUNL3To/7t75d7bAhKx4bCQi+rSDFBB4bnPnKUJf912FxY7iF nsu+5eiUKBkjRqUGoyKTw0g6WOuMrI6gVH1tJd42hvxhHI+68AUvi3O/xJW6EmMumS hqJcU7fSqPCEt9kifAdCvFah38zCaB29X2q/tQy8= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oi1-x22d.google.com (mail-oi1-x22d.google.com [IPv6:2607:f8b0:4864:20::22d]) by sourceware.org (Postfix) with ESMTPS id 3A28B3858D32 for ; Mon, 23 Jan 2023 17:01:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3A28B3858D32 Received: by mail-oi1-x22d.google.com with SMTP id o66so10907388oia.6 for ; Mon, 23 Jan 2023 09:01:12 -0800 (PST) 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=LEPFL20v8Q7ZNypW3j8dKcgwW8ZlMsC3gOTZU1pNBd4=; b=13Vy3XyXPVsjkPkHtqC0vgiB2KqoBKAnoOEMXsg6U3p1FkPwndezGZQWqT4NtHqUNI ciBBZbKclhZZTEGV8Lf3Omkf1/w2WASPQnuuWw5SikoZ3qVr+udGsocJkvIKTDkFC98G EresQegGcKis6ICVRHEFj68Q5W65fFgjU9JQ3pOJb1ZhQct2Zv2c4VWsei+QccrMybJ0 W99H1dG/jrPT716kAYRnP2Nk3Us0S/WCO6fxz4HcAbmDmy9dIUWrrfOXuH2KqEePv3m9 41FKh127oJ6AXN/jJ0TwfwLBpPcjnrLRcjPDTlCyZ6ljV+b4Ek3Tqk7JUvoJcxSxVRt0 tLFw== X-Gm-Message-State: AFqh2kpcdBOURBurECBGF+SrTs1PuIAj+wmzahfLE+dPrAbnxWnjXr3W 4RRUjxjqFywpT/moiT+0C+Fogn0LnDkUSbnBaZs= X-Google-Smtp-Source: AMrXdXvekkprF4JG4we+A5rJnRH5aPBrlItVpZw8JygqmVsnPnVcuNG29Np7AkyseiR+E6pTBM96eg== X-Received: by 2002:a05:6808:8db:b0:364:e248:1d70 with SMTP id k27-20020a05680808db00b00364e2481d70mr14580285oij.1.1674493270772; Mon, 23 Jan 2023 09:01:10 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c1:7e99:3aac:a193:1300:511e]) by smtp.gmail.com with ESMTPSA id 66-20020a9d0848000000b006865246ace0sm9099688oty.53.2023.01.23.09.01.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Jan 2023 09:01:10 -0800 (PST) To: libc-alpha@sourceware.org Subject: [PATCH] wchar: Define va_list for POSIX (BZ #30035) Date: Mon, 23 Jan 2023 14:01:06 -0300 Message-Id: <20230123170106.3632306-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 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 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" 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..582a99c00b 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 ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !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