Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp312530rwd; Mon, 12 Jun 2023 14:03:18 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6GnVa3mq3tf5SkbPRFDYvTBBWCespgMbFkXRtNTneAoylNjtTrmONFNn6AVDnCqc3wjT8f X-Received: by 2002:a05:6a20:394c:b0:11c:d2af:70a6 with SMTP id r12-20020a056a20394c00b0011cd2af70a6mr1747012pzg.28.1686603798376; Mon, 12 Jun 2023 14:03:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686603798; cv=none; d=google.com; s=arc-20160816; b=zy9L5FNwcFNEWI2C25ZOAt6fKglcZBI0C1MQ+IdeqyvaOUeGIH6Q6ApQQsZnBa4BQB AVK7TgcOti3ZcPFP+imd3nuafynyfzkqvTTAEgXCftoDMasovTwwhkjde4SUT3Q+SmRf X8zPFefEBKQY7wJofGt+gAjgeNJ2d/aCqW93tj9WdF9DaxVvnJokh/6Q+w0Pl7PyTQHT LnAwQ4GUa4eqeYZVKn5+E8q4QwAu+ytRxYquTYUs0eXsafmS5rcFe/ZzLJPpxm0BsN4S ObHONwruZUb8PvxXQh2KW+20+DPoQlHktuwn8HeWVO8y7TUZmpMiCG1q4cfJ0sxL6lcs +dXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=+M6xhIg80P+7up9n7ifgblJD/7YwijlTtK4fmxb6qjs=; b=qrBPuSltgME3TNfrMCrXUqvvftZDpfQrJnjQAwDoW+4nvx13zJuw3o5AguWmpp/mTL 4zuqadOpBlXI491Ay6E+eTUGTBSogw1m1wPOiQSA6/Tk1nyDB2OBlrmVUKqii+dn1/qt kKOnVJlngv2M7eoRpRR0PX97wJcHH+B0DXcdMgRwZOKPih6bDHjtFwRLFsDSEB38qh8l 7eYD9fNxOUiTxpX6v2Q+O3qkqyz/ZzJKKHABDIisu46RDLBM6RYaDUhez05JxuySK8w3 AUVkbAAiSHvBfYklQZ7ojay/DToHil2Qlb5p7/R78B+OT95+d4395lL8B5jFsf1ev7WF l1Fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rZ+mTlhm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w22-20020a63af16000000b0054fb1d14aeesi317501pge.583.2023.06.12.14.03.04; Mon, 12 Jun 2023 14:03:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rZ+mTlhm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237775AbjFLUsA (ORCPT + 99 others); Mon, 12 Jun 2023 16:48:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235868AbjFLUq6 (ORCPT ); Mon, 12 Jun 2023 16:46:58 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E823426B0 for ; Mon, 12 Jun 2023 13:46:28 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5D72B62ED6 for ; Mon, 12 Jun 2023 20:45:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 86B58C433AC; Mon, 12 Jun 2023 20:45:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686602716; bh=rJ8Zak39w7CtOYLtgafcmk/YeBO+i/iIqJ6y3UtNwdo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rZ+mTlhmRBd5hNyKaf7X0M7PtkE9osT1W3pDsVzygd+Y85/ftwauPhtnHoEPchJ23 BkGL6D2G/c93qHi1+iP5M5Lcq9dBmlqwS9YgyX3wT14sitm4sLLF+zdzntyjKUdkmu a4DHtrvFaGCJub0ze1hqiwDnmFphwxRuvLTKQ0F+r3/6WT6uV+7sNms5K2fri1M8FI rZP97iDAR9LsYNQ0tDjExteIbyoktZSH3v7kVwCZZ+cpfJAoDK9aHVqedsMsIf74Bp dUEUBHrUg4Goe4rpw+R0Y0qB6oikvybpC1QwDjk9dTgyGL4K9+EJJzKkqrbyXcNtUW CjRNae30NWuyg== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id BF3B6CE3A4B; Mon, 12 Jun 2023 13:45:15 -0700 (PDT) From: "Paul E. McKenney" To: linux-kernel@vger.kernel.org Cc: gwml@vger.gnuweeb.org, kernel-team@meta.com, w@lwt.eu, =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , Willy Tarreau , "Paul E . McKenney" Subject: [PATCH v2 nolibc 10/53] tools/nolibc: use __inline__ syntax Date: Mon, 12 Jun 2023 13:44:31 -0700 Message-Id: <20230612204514.292087-10-paulmck@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <8b757cc0-3719-4e63-a755-9710384137bc@paulmck-laptop> References: <8b757cc0-3719-4e63-a755-9710384137bc@paulmck-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thomas Weißschuh When building in strict C89 mode the "inline" keyword is unknown. While "__inline__" is non-standard it is used by the kernel headers themselves. So the used compilers would have to support it or the users shim it with a #define. Signed-off-by: Thomas Weißschuh Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney --- tools/include/nolibc/stdlib.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/include/nolibc/stdlib.h b/tools/include/nolibc/stdlib.h index 894c955d027e..902162f80337 100644 --- a/tools/include/nolibc/stdlib.h +++ b/tools/include/nolibc/stdlib.h @@ -102,7 +102,7 @@ char *_getenv(const char *name, char **environ) return NULL; } -static inline __attribute__((unused,always_inline)) +static __inline__ __attribute__((unused,always_inline)) char *getenv(const char *name) { extern char **environ; @@ -231,7 +231,7 @@ int utoh_r(unsigned long in, char *buffer) /* converts unsigned long to an hex string using the static itoa_buffer * and returns the pointer to that string. */ -static inline __attribute__((unused)) +static __inline__ __attribute__((unused)) char *utoh(unsigned long in) { utoh_r(in, itoa_buffer); @@ -293,7 +293,7 @@ int itoa_r(long in, char *buffer) /* for historical compatibility, same as above but returns the pointer to the * buffer. */ -static inline __attribute__((unused)) +static __inline__ __attribute__((unused)) char *ltoa_r(long in, char *buffer) { itoa_r(in, buffer); @@ -303,7 +303,7 @@ char *ltoa_r(long in, char *buffer) /* converts long integer to a string using the static itoa_buffer and * returns the pointer to that string. */ -static inline __attribute__((unused)) +static __inline__ __attribute__((unused)) char *itoa(long in) { itoa_r(in, itoa_buffer); @@ -313,7 +313,7 @@ char *itoa(long in) /* converts long integer to a string using the static itoa_buffer and * returns the pointer to that string. Same as above, for compatibility. */ -static inline __attribute__((unused)) +static __inline__ __attribute__((unused)) char *ltoa(long in) { itoa_r(in, itoa_buffer); @@ -323,7 +323,7 @@ char *ltoa(long in) /* converts unsigned long integer to a string using the static itoa_buffer * and returns the pointer to that string. */ -static inline __attribute__((unused)) +static __inline__ __attribute__((unused)) char *utoa(unsigned long in) { utoa_r(in, itoa_buffer); @@ -367,7 +367,7 @@ int u64toh_r(uint64_t in, char *buffer) /* converts uint64_t to an hex string using the static itoa_buffer and * returns the pointer to that string. */ -static inline __attribute__((unused)) +static __inline__ __attribute__((unused)) char *u64toh(uint64_t in) { u64toh_r(in, itoa_buffer); @@ -429,7 +429,7 @@ int i64toa_r(int64_t in, char *buffer) /* converts int64_t to a string using the static itoa_buffer and returns * the pointer to that string. */ -static inline __attribute__((unused)) +static __inline__ __attribute__((unused)) char *i64toa(int64_t in) { i64toa_r(in, itoa_buffer); @@ -439,7 +439,7 @@ char *i64toa(int64_t in) /* converts uint64_t to a string using the static itoa_buffer and returns * the pointer to that string. */ -static inline __attribute__((unused)) +static __inline__ __attribute__((unused)) char *u64toa(uint64_t in) { u64toa_r(in, itoa_buffer); -- 2.40.1