From patchwork Thu May 25 16:43:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 1786219 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=8.43.85.97; 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=mY1iUAvM; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (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 4QRv5T3PmFz20QL for ; Fri, 26 May 2023 02:43:57 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B9A8D3857737 for ; Thu, 25 May 2023 16:43:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B9A8D3857737 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1685033034; bh=SqWPVOxvsE2IMaPPWR/z3xDUuaFkOWjS1Okq/FDRIMc=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=mY1iUAvMKk22nyvlIJVid79FdwEAtCgT3gLVIgDWWYPLgHtVv0/lT+HIXsOVxhYWN XMmVSjiE5tf0OXAJOw3tTBkxk4sKC/nlu9F7z15OrTP4UKutjD/aUUNqIjM+AWKEnH vxIhXQqjzxQ3+HG4Sqn6UXc8YgEc3LPoiBrMoLag= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-ot1-x336.google.com (mail-ot1-x336.google.com [IPv6:2607:f8b0:4864:20::336]) by sourceware.org (Postfix) with ESMTPS id 902663857703 for ; Thu, 25 May 2023 16:43:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 902663857703 Received: by mail-ot1-x336.google.com with SMTP id 46e09a7af769-6af6fe73f11so1263144a34.0 for ; Thu, 25 May 2023 09:43:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685033018; x=1687625018; 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=SqWPVOxvsE2IMaPPWR/z3xDUuaFkOWjS1Okq/FDRIMc=; b=Oz5X4JRPFw4awOVLUvJgk6UGg5LEA28U/ulmPOdKAadsNytGIPnT+0aUj9uvwJNV5V vO2G6DW6jvLUsfUL0Oqkk0gjGSK18kxc6e6TEVle8aznNGgAdrtm8jC7KE2Oj7eHcsn+ 27nnFJ4AYAAheKvu7P3WIGJd2i19jIo6Vwvb3vS8z0PxQ/wUZf31ERwezhvaYHsu8hLX 9YriPsjqLux2IBtyv5CYEBXmRuqIeZoHxt/mg8e90hl9VwYMlhx0+be9lSdYG2R3dRhm rCoXvVu8RK5SJgdfxZsDdUXeTHtSZsZYN6FEMuPTzeVArT/n1VItUi3xpUYdvIM4nK1S C5tQ== X-Gm-Message-State: AC+VfDw7PMs5XcDY9NV5Gc7tUxS/LHY+uAQDrrzEFtX6U5WoOy3UYLgU 1pdEa3gdT9Q8GHp6NSEGQMIbsijVmmV5CZIq6O4kCQ== X-Google-Smtp-Source: ACHHUZ5GoPpYJtmqXQ/uVsmsXed5lQGPWuduYJ2+M4WCox1huTn457IIWPBFz/PseWtFOFivRAEw0A== X-Received: by 2002:a9d:734e:0:b0:6af:a385:e008 with SMTP id l14-20020a9d734e000000b006afa385e008mr82528otk.28.1685033017776; Thu, 25 May 2023 09:43:37 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c1:4dd5:1f:68d0:3218:bdf0]) by smtp.gmail.com with ESMTPSA id y19-20020a056830109300b006acfdbdf37csm796935oto.31.2023.05.25.09.43.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 May 2023 09:43:36 -0700 (PDT) To: libc-alpha@sourceware.org, Andreas Schwab Subject: [PATCH v3] wchar: Define va_list for POSIX (BZ #30035) Date: Thu, 25 May 2023 13:43:27 -0300 Message-Id: <20230525164327.3803096-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, 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: 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 Netto 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 | 5 +++++ wcsmbs/wchar.h | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/conform/data/wchar.h-data b/conform/data/wchar.h-data index e414651a33..32b53daef1 100644 --- a/conform/data/wchar.h-data +++ b/conform/data/wchar.h-data @@ -15,6 +15,11 @@ type size_t type locale_t # endif tag {struct tm} +# if !defined ISO99 && !defined ISO11 && !defined UNIX98 +type va_list +# else +# define va_list __gnuc_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 acc2eb9ddf..d16f2e6951 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