From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7EF06381BE for ; Sat, 27 Jul 2024 08:50:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722070245; cv=none; b=TEqauSWIQbQg82bgU7mGm26/af9dvzQFQcjkD1W4UA7+fhO0+ajiHpikPfZO8uJdnkG1jWWpNHrdt9UzFVpht9U8zroCX1nOD+/IodBVxuaLxlUk84hvD9Sq+1b5BXJDTZjwPTZ4ZmLZAw4+5cOBL0d2PeRwKKmbPgAASqu3c8I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722070245; c=relaxed/simple; bh=Xsqk0n6ScgrN4MlGX7T/sHpD+Oj95pPo2bugXfZvZvU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=B+HpU9q9mskNPUjvLPQtjcVqNrKveGZ3CIzHP8Lln1plio2xzxIPBUlygQyT3eKJtuzfJNcPpDVoYww0NXml2a5KA8EsqX2t7c0d5MOaHXl8rvp/gaMTjZeRGyTuyjhZ9yib+XrS/YrownTL1GGR9dCYLxzAFKgqhG7TdiELKvw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=Uv/cFNi2; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="Uv/cFNi2" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1722070231; bh=Xsqk0n6ScgrN4MlGX7T/sHpD+Oj95pPo2bugXfZvZvU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Uv/cFNi2kF7Ml+mO9b7wTtIwK61pZHx03tiDHpo6EwGzU+bL2ky+Akpk5Gexe1AoG 4vltQ3mumSR8lxZ3HHXMuL6lo+hG7Gr8V+XaYQMNS4PF+1fznwA9NHC0SyQBPk+arm mUbLrU2GrPW3vYEQbHczaLrsMhfzOnuvq6tn7PSU= Date: Sat, 27 Jul 2024 10:50:30 +0200 From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: Willy Tarreau Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] tools/nolibc: add stdbool.h header Message-ID: <4bdae1cf-ad18-4d16-b6cb-8f4e8adab867@t-8ch.de> References: <20240725-nolibc-stdbool-v1-1-a6ee2c80bcde@weissschuh.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240725-nolibc-stdbool-v1-1-a6ee2c80bcde@weissschuh.net> On 2024-07-25 19:10:44+0000, Thomas Weißschuh wrote: > stdbool.h is very simple. > Provide an implementation for the user convenience. > > Signed-off-by: Thomas Weißschuh > --- > tools/include/nolibc/Makefile | 1 + > tools/include/nolibc/nolibc.h | 3 ++- > tools/include/nolibc/stdbool.h | 16 ++++++++++++++++ > 3 files changed, 19 insertions(+), 1 deletion(-) > diff --git a/tools/include/nolibc/stdbool.h b/tools/include/nolibc/stdbool.h > new file mode 100644 > index 000000000000..709abed93425 > --- /dev/null > +++ b/tools/include/nolibc/stdbool.h > @@ -0,0 +1,16 @@ > +/* SPDX-License-Identifier: LGPL-2.1 OR MIT */ > +/* > + * Boolean types support for NOLIBC > + * Copyright (C) 2024 Thomas Weißschuh > + */ > + > +#ifndef _NOLIBC_STDBOOL_H > +#define _NOLIBC_STDBOOL_H > + > +#define _Bool bool For the record: The claim "stdbool.h is very simple" didn't hold up very well. I managed to switch up this #define. I'll fix it up when applying. > +#define true 1 > +#define false 0 > + > +#define __bool_true_false_are_defined 1 > + > +#endif /* _NOLIBC_STDBOOL_H */