From patchwork Mon Feb 3 21:57:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Filippov X-Patchwork-Id: 1233035 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=uclibc-ng.org (client-ip=89.238.66.15; helo=helium.openadk.org; envelope-from=devel-bounces@uclibc-ng.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=QTOk8+Vx; dkim-atps=neutral Received: from helium.openadk.org (helium.openadk.org [89.238.66.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48BMBs21m6z9sRW for ; Tue, 4 Feb 2020 08:57:57 +1100 (AEDT) Received: from helium.openadk.org (localhost [IPv6:::1]) by helium.openadk.org (Postfix) with ESMTP id 37903100EA; Mon, 3 Feb 2020 22:57:50 +0100 (CET) X-Original-To: devel@uclibc-ng.org Delivered-To: devel@helium.openadk.org Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) by helium.openadk.org (Postfix) with ESMTPS id 4BCD9100EA for ; Mon, 3 Feb 2020 22:57:48 +0100 (CET) Received: by mail-lj1-f193.google.com with SMTP id q8so16334293ljb.2 for ; Mon, 03 Feb 2020 13:57:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=SWXOL/jp5aNFAi2fHP4h0Qn+G77aE2/UVzbGA8pgKKI=; b=QTOk8+Vxo8PCrWTkIpeByukrLpCJzh+x73QEy9ueDBUwSPgbikN3DFh+d2oThXcItM /g0KvfVi5knWZAMdWSv4KrkHvLYPs8WMf1jZqQ03JQvZWWwNFBEKDRzlNTnDVFkOr48j E2HLDkkGDXrh3gEHjNBEpnrw/SxQ831k6ZTI2yB0m1FwqVlSQugLYSQEr7iTlTzZ0dT0 tixf9EtzdqZKtSymuoSbixLqVdNAh/C0vgnCgg7bH+R1rbalcOI7BSTgploFVddE7vS5 gdF3RhTzuZdmbnJss6JaEJ7STvZOsBbL1L/6UidfpIMe53+3BcOjha87n6hHVexchfnP dUuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=SWXOL/jp5aNFAi2fHP4h0Qn+G77aE2/UVzbGA8pgKKI=; b=nrLyqrqmKLCI49tZhtZYdHNqDfXMDd9WuBdYlaD9kKNIPJhid+5NXDZ6AdriHfV4zB ucdNf3jrxe5hVDohaAPt9QGK5Y822wQqmYhGuV74oBY9QrKDX3Slzv2SQrFf0DCwSJgq nUxxtpDBPvpuhYaVx+SbKxmEJPukk2Vf0aEK5mFzuIIWu980lYTxSFBR8t/wAhGOT8/B qUN7HUZj8xM1/lYOGNjMys7mhgny+7nJbfA0EsdIOeVOyUni/a7CHB6rpA+YyBfowiHJ 2UPep4O0C2dOB6cHM/GhttO2C2ViMYf0G6P6ylb9Om2xNb32sY+kcODOdSJePaXub6cu X4fA== X-Gm-Message-State: APjAAAVUw9JJsZ2vMPg3uprGYHUYo933O1QOv7UwYRyO5AcSlaTNCGZ6 euZMC8W+VnojOjcpvE6pJroMXHuvAuU= X-Google-Smtp-Source: APXvYqwmn/DMdAwPmtGrdSl+NiLMsjED2WeGLMSyG/F2oExidk1QvUXKQkdRE597zRdnH0QYMKVrSA== X-Received: by 2002:a2e:8916:: with SMTP id d22mr15646896lji.19.1580767069478; Mon, 03 Feb 2020 13:57:49 -0800 (PST) Received: from octofox.cadence.com (jcmvbkbc-1-pt.tunnel.tserv24.sto1.ipv6.he.net. [2001:470:27:1fa::2]) by smtp.gmail.com with ESMTPSA id t21sm10108423ljh.14.2020.02.03.13.57.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Feb 2020 13:57:48 -0800 (PST) From: Max Filippov To: devel@uclibc-ng.org Date: Mon, 3 Feb 2020 13:57:32 -0800 Message-Id: <20200203215732.15601-1-jcmvbkbc@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Cc: linux-xtensa@linux-xtensa.org, Chris Zankel Subject: [uclibc-ng-devel] [PATCH v2] include/ctype.h: drop is*_l macro definitions X-BeenThere: devel@uclibc-ng.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: uClibc-ng Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devel-bounces@uclibc-ng.org Sender: "devel" ctype locale-specific macro definitions are broken because they result in dereference of pointer to structure of incomplete type. Drop these macros since they are optional and let applications use functions with the same names. This change fixes parted-3.3 build with uClibc-ng: http://autobuild.buildroot.net/results/b7ba1210d5aa184b133f0171da621d2b0083ec39/build-end.log Signed-off-by: Max Filippov --- Changes v1->v2: - also drop __isctype_l macro. include/ctype.h | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/include/ctype.h b/include/ctype.h index ecd5e730886a..e934cf3321a6 100644 --- a/include/ctype.h +++ b/include/ctype.h @@ -350,46 +350,13 @@ libc_hidden_proto(tolower_l) /* Return the uppercase version of C. */ extern int toupper_l (int __c, __locale_t __l) __THROW; -# if __GNUC__ >= 2 && defined __OPTIMIZE__ && !defined __cplusplus -# define tolower_l(c, locale) __tobody(c, tolower_l, (locale)->__ctype_tolower, (c, locale)) -# define toupper_l(c, locale) __tobody(c, toupper_l, (locale)->__ctype_toupper, (c, locale)) -# endif /* Optimizing gcc */ - - -# define __isctype_l(c, type, locale) ((locale)->__ctype_b[(int) (c)] & (__ctype_mask_t) type) # ifndef __NO_CTYPE -# define __isalnum_l(c,l) __isctype_l((c), _ISalnum, (l)) -# define __isalpha_l(c,l) __isctype_l((c), _ISalpha, (l)) -# define __iscntrl_l(c,l) __isctype_l((c), _IScntrl, (l)) -# define __isdigit_l(c,l) __isctype_l((c), _ISdigit, (l)) -# define __islower_l(c,l) __isctype_l((c), _ISlower, (l)) -# define __isgraph_l(c,l) __isctype_l((c), _ISgraph, (l)) -# define __isprint_l(c,l) __isctype_l((c), _ISprint, (l)) -# define __ispunct_l(c,l) __isctype_l((c), _ISpunct, (l)) -# define __isspace_l(c,l) __isctype_l((c), _ISspace, (l)) -# define __isupper_l(c,l) __isctype_l((c), _ISupper, (l)) -# define __isxdigit_l(c,l) __isctype_l((c), _ISxdigit, (l)) -# define __isblank_l(c,l) __isctype_l((c), _ISblank, (l)) - # if (defined __USE_SVID || defined __USE_MISC || defined __USE_XOPEN) \ && defined __UCLIBC_SUSV4_LEGACY__ # define __isascii_l(c,l) ((l), __isascii (c)) # define __toascii_l(c,l) ((l), __toascii (c)) # endif -# define isalnum_l(c,l) __isalnum_l ((c), (l)) -# define isalpha_l(c,l) __isalpha_l ((c), (l)) -# define iscntrl_l(c,l) __iscntrl_l ((c), (l)) -# define isdigit_l(c,l) __isdigit_l ((c), (l)) -# define islower_l(c,l) __islower_l ((c), (l)) -# define isgraph_l(c,l) __isgraph_l ((c), (l)) -# define isprint_l(c,l) __isprint_l ((c), (l)) -# define ispunct_l(c,l) __ispunct_l ((c), (l)) -# define isspace_l(c,l) __isspace_l ((c), (l)) -# define isupper_l(c,l) __isupper_l ((c), (l)) -# define isxdigit_l(c,l) __isxdigit_l ((c), (l)) -# define isblank_l(c,l) __isblank_l ((c), (l)) - # if (defined __USE_SVID || defined __USE_MISC || defined __USE_XOPEN) \ && defined __UCLIBC_SUSV4_LEGACY__ # define isascii_l(c,l) __isascii_l ((c), (l))