From patchwork Tue Dec 6 09:31:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 61493 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7B1583818FF1 for ; Tue, 6 Dec 2022 09:32:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7B1583818FF1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1670319122; bh=UKl51NU7W9Fx95Po4qLOnrDb+q2eB/Yai4cKnCrcB1s=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=ILaibdz75c7e35nFNJktQkb4I6ZH1Xq5GZzDWbHvSaUmBIUHe2dM2K0i4K/hzEhuM MhdmHJ+alIFrw08ZLogqk4PoXYRSiuspZyo7uC3IrP5eZYRu+gm30Wabqfyq92UxN3 zaHczM4CPWxMr3+51oHZuyTlKkldgDJ762T5B25g= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id ED9E4382E74D for ; Tue, 6 Dec 2022 09:31:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org ED9E4382E74D Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-530-Q8PB6jftMCOXprMNth7Hfg-1; Tue, 06 Dec 2022 04:31:39 -0500 X-MC-Unique: Q8PB6jftMCOXprMNth7Hfg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DBDD5801585 for ; Tue, 6 Dec 2022 09:31:38 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4323435429 for ; Tue, 6 Dec 2022 09:31:38 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH] : Make wmempcy, wcwidth, wcswidth available by default Date: Tue, 06 Dec 2022 10:31:34 +0100 Message-ID: <87iliog9op.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-10.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, 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: Florian Weimer via Libc-alpha From: Florian Weimer Reply-To: Florian Weimer Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" This matches what FreeBSD does. This helps to port software from BSD using a C99 compiler that does not accept implicit function declarations. Tested on x86_64-linux-gnu. --- wcsmbs/wchar.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) base-commit: 8fb923ddc38dd5f4bfac4869d70fd80483fdb87a diff --git a/wcsmbs/wchar.h b/wcsmbs/wchar.h index c1321c7518..203ef9ac1d 100644 --- a/wcsmbs/wchar.h +++ b/wcsmbs/wchar.h @@ -271,7 +271,7 @@ extern wchar_t *wmemmove (wchar_t *__s1, const wchar_t *__s2, size_t __n) /* Set N wide characters of S to C. */ extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; -#ifdef __USE_GNU +#ifdef __USE_MISC /* Copy N wide characters of SRC to DEST and return pointer to following wide character. */ extern wchar_t *wmempcpy (wchar_t *__restrict __s1, @@ -363,14 +363,14 @@ extern size_t wcsnrtombs (char *__restrict __dst, /* The following functions are extensions found in X/Open CAE. */ -#ifdef __USE_XOPEN +#if defined __USE_XOPEN || defined __USE_MISC /* Determine number of column positions required for C. */ extern int wcwidth (wchar_t __c) __THROW; /* Determine number of column positions required for first N wide characters (or fewer if S ends before this) in S. */ extern int wcswidth (const wchar_t *__s, size_t __n) __THROW; -#endif /* Use X/Open. */ +#endif /* __USE_XOPEN || __USE_MISC. */ /* Convert initial portion of the wide string NPTR to `double'