Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp66409rwl; Thu, 6 Apr 2023 14:56:28 -0700 (PDT) X-Google-Smtp-Source: AKy350arusoi52dLbgBJL6xfTu/zsh/421DlddrN16nvyGfD3XjSKkZseU/Y+kuxrwsI+uNYTaa3 X-Received: by 2002:a05:6a20:dc9e:b0:d9:e45d:95d6 with SMTP id ky30-20020a056a20dc9e00b000d9e45d95d6mr736981pzb.35.1680818188616; Thu, 06 Apr 2023 14:56:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680818188; cv=none; d=google.com; s=arc-20160816; b=C8Nvu5HI+AX00ss1Ql7eL2CDUHE4CbWyH/NfznwErbdfltE5A/40RD4DlIFyTudcyr 5G+xKFFCF+Eb4XKIh1JVvZzI7qt43hQAtsVCB47zJv5TQ/FaNueesOebEnl+Gpgfzky9 Nn3HuR3Wz+cmF1yC0xgK8exTVtepDXGkGVZKw19B3hfQo/34+oVA7hgeDGGOTZr5Odbi yn6cYVVA/lifn3LN+mxx1BjGZ/eOL06aZjkeWab/B4otpp2bbkSDCAidvIVxF7xpqbSc aKwJECk3n9N9NrvNemo67YKvXtVTGpkDnD1hxRGsL3nmQDphJdkoPWe30/OaPdA7ZHpw ToWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:dkim-signature :from; bh=Dpbnz0LsA/LIUkZGjdFwqSha5KFssVRR/oVoS5muENw=; b=acEVHcPgte/NW29bDTLbzZWWxF/Bb3Cl3MMSkdsvbaqFDaoT+eekAfdMhNubsmVWUN B9QtkTwSUs+nBbVeRMvwrFJpFmR+LHTwCP2D0cGSY59lXcPIelE9CiH6VYTZvdSGz+cw 9BsAvaJ0j7ojvC0GA6anE3ys5tSGYARW7yomJTS+wImUo7SN/o+2ZFhMF1BLr2ZayXJ4 AO+NVEjrnaGPfJY/UT2gXHTJcD4jMAXwnoZB40+I6DsAj/HNfK7svjF8UM5pebwBZb7a tDB1DCu2lYUbzCNuW/GQLGc5SaFQy8Xkq3s15SofRUzGmo1VSV5EejBgD1tDsPQ7xyju OZ1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=GJSX6AXB; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i2-20020a655b82000000b0050bf0f1b79csi2136781pgr.699.2023.04.06.14.56.16; Thu, 06 Apr 2023 14:56:28 -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=@weissschuh.net header.s=mail header.b=GJSX6AXB; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236044AbjDFVy6 (ORCPT + 99 others); Thu, 6 Apr 2023 17:54:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229586AbjDFVy4 (ORCPT ); Thu, 6 Apr 2023 17:54:56 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [IPv6:2a01:4f8:c010:41de::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 087379EF3; Thu, 6 Apr 2023 14:54:54 -0700 (PDT) From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1680818092; bh=gdtMqD9cVgCQr6akdRRL11+XYs6brwtyfOnOQ2LQk4A=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=GJSX6AXBprEX2dSMIQSilbFhVVjV2o274TjhG8igjp7UpPVZySChxRUu5c621F0aQ 47xUd4MdnZ6mkh+CZEc0ODDC2t2aBG06HyO4KJkj33j+mt/A18r+cMcwy/AtsCVqxk mtCN7ZRgbeBJCAaIRgduLc0KmRj2oRuSAYnjmkm0= Date: Thu, 06 Apr 2023 21:54:48 +0000 Subject: [PATCH v2 02/11] tools/nolibc: use __inline__ syntax MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20230328-nolibc-c99-v2-2-c989f2289222@weissschuh.net> References: <20230328-nolibc-c99-v2-0-c989f2289222@weissschuh.net> In-Reply-To: <20230328-nolibc-c99-v2-0-c989f2289222@weissschuh.net> To: Willy Tarreau , Shuah Khan Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1680818091; l=3469; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=gdtMqD9cVgCQr6akdRRL11+XYs6brwtyfOnOQ2LQk4A=; b=EdYL72397iLYKjJXbVFusjZuMDs5WazWBO+FX53GIWWTa2/u6/0k/DKwgr0QK48GizOuIFjSc 2QO/U8hWSajAbRI0jryiCQjEJwIQxzWepWr3uS8jK2VPvKfmGHiIEse X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 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 --- 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.0