From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: from zero.zsh.org (zero.zsh.org [IPv6:2a02:898:31:0:48:4558:7a:7368]) by inbox.vuxu.org (Postfix) with ESMTP id F2FF02225C for ; Wed, 27 Mar 2024 00:17:33 +0100 (CET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1711495053; b=GCFHevivSFcIKctYUv1Njzg4VB/+oIxhzY6p74Iu64BEexN7pdsUzzMMBMFk+yLEhfJaa/uLE1 +gfJLkWEuC56n3BZF0UeyYYFQA25x9DC8d8g5MVreYxoAM5cI5ls9vlGPDaZWCvSd0tKkx5QGt sFtrd98TRxA3mKat6xNnXdJCkOZxD7xUU0UQbEA1GXcaMN4VLNdo9A8Usama6KnA9lBzpv0J+2 88bjgMcqM0s2k+ZChY8SEaU3goUnDlOkcc5lau+hBKif39GJf0eexed/CQkV++0u2nbgIQiMNs a26Udcbb2mgcyfmpNS3J2E+nziiCsHK0OQNJMhaVPaA8HA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (iris.zentaur.org) smtp.remote-ip=198.58.127.206; dkim=pass header.d=zentaur.org header.s=dkim20200120 header.a=rsa-sha256; dmarc=pass header.from=zentaur.org; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1711495053; bh=qKc73/eOajhkhN5++9tXKGL1CNVfLz8jeByUMkKk2HU=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:From:References:To:Subject:MIME-Version:Date: Message-ID:Content-Type:DKIM-Signature:DKIM-Signature; b=EBouMMr3NkQ8pUEu61EJdQooi9F9nbW7dcVf511OrRqhDKZOlmUhk8aE0GNKhJaZcGW4/BE4h+ IWXtP1ozaHoBgh8/jwDcZevteEu9VxCg8YRbx85ghJdctWNtGPhNrG1ZmKfkEk6Imw0ZEWQmXk 5eg7SmweJJ8InUELfJXP38FaIsKxRPUdguM0xN/XaYiXyzCgHLY0MMUbcmK+JugG9Ezasxoesd DlEdCluYOAfZTUlKPXtLDPUug0cIKYZ2bCCd7521hD04VIgWWpyHkBOBjxqapG5q34yUTxA+8r d9zAFRxOnaRuV9HgxRw7rNKNHYvNSgz9ZYcIeNmobssI3w==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:In-Reply-To:From:References:To: Subject:MIME-Version:Date:Message-ID:Content-Type:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=qKc73/eOajhkhN5++9tXKGL1CNVfLz8jeByUMkKk2HU=; b=HIFfmCzsfftJkbkutU7qa6GBX1 7yzqCHVoZ2h22TxDI+8oKiNsBHGO3ZFtJn7fMwuhZSY/vm4LgUPPt1qEJ/SM33x2AqyxTcFQueoKE 8eqgvTyfy40PaCQpSnQhVOPHeC7xiE5G4nNoVIJ6Fl0dFXiRLLxJwi7+vI2JBnW41eT6a+8rc8adI vhCQpBPuNYQSq/w7pcRYktncCRV/XOOy1+DPGlKZOPm4mqNB81EHWGhhVW7XMv8YYfE34HqAxUeWl Yp6Aa6fFcvn2IQ+MRW60H2M5q0DnNjeYHP8SfWl0p/+KL6GxeV6vLDJR8BF8DZcw8j7BnzcXrwNxc 1KBMZBBA==; Received: by zero.zsh.org with local id 1rpG2u-0002y3-2j; Tue, 26 Mar 2024 23:17:32 +0000 Authentication-Results: zsh.org; iprev=pass (iris.zentaur.org) smtp.remote-ip=198.58.127.206; dkim=pass header.d=zentaur.org header.s=dkim20200120 header.a=rsa-sha256; dmarc=pass header.from=zentaur.org; arc=none Received: from iris.zentaur.org ([198.58.127.206]:32992) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1rpG2E-0002dj-VO; Tue, 26 Mar 2024 23:16:52 +0000 Received: from iris.zentaur.org (localhost [127.0.0.1]) by iris.zentaur.org (Postfix) with ESMTP id 4V45KY46RVz3wZv for ; Tue, 26 Mar 2024 23:16:49 +0000 (UTC) Authentication-Results: iris.zentaur.org (amavis); dkim=pass (2048-bit key) reason="pass (just generated, assumed good)" header.d=zentaur.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=zentaur.org; h= in-reply-to:from:references:to:content-language:subject :user-agent:mime-version:date:message-id:content-type; s= dkim20200120; t=1711495009; x=1711498610; bh=qKc73/eOajhkhN5++9t XKGL1CNVfLz8jeByUMkKk2HU=; b=DkaA7pVKEYW/O3ZqZkInT4wVTui21utoTxc IU6rRMq7nxh7SMHPrMAitRY9Ois9iYk3rvh4tPHMESBu6k+SOX48lJrWX1MRA1kF hV2S9TJ27bmAkq4B+O8kX1DNDOW3+tzUyGh617szCDSHPhv9ZkCwRmogydlVlWoT wn50+JQaZmDk52vZez0XW/axophMy0NkPxwouYEcH4cVKC/luuDAFTfWxxypNNBr RNWKEbIJQxkioRF73AA7e8LDtYunvsnROcwbv9Qp6+k7nxNHVH7BXJngFLI4knos cmFjWrdJ4DfSkmY71HWUzkvNSRsmngAeg70AIkxlH29yOpk2GDQ== X-Virus-Scanned: amavis at iris.zentaur.org Received: from iris.zentaur.org ([127.0.0.1]) by iris.zentaur.org (iris.zentaur.org [127.0.0.1]) (amavis, port 10026) with ESMTP id FUZU2piMNS53 for ; Tue, 26 Mar 2024 23:16:49 +0000 (UTC) Received: from [IPV6:2605:a601:a57c:ee00::4000] (unknown [IPv6:2605:a601:a57c:ee00::4000]) by iris.zentaur.org (Postfix) with ESMTPSA id 4V45KY0mpfz3wZt for ; Tue, 26 Mar 2024 23:16:49 +0000 (UTC) Content-Type: multipart/mixed; boundary="------------sdAHLDS0nrugQJmtRY8i74CX" Message-ID: <942b86c4-6dec-4b6c-aeb3-5ca1eafbaa03@zentaur.org> Date: Tue, 26 Mar 2024 18:16:49 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: ANSI C standard of zsh Content-Language: en-US To: zsh-workers@zsh.org References: <4da53188-feb2-42d2-9294-899715991be1@zentaur.org> <64761-1710348596.938223@kqf9.hufK.7DeO> <50d25960-4789-42af-8105-51a364325903@zentaur.org> <33556-1711410422.646791@rS7o.x_eU.PA_L> <727e3cdf-f00c-43cc-9965-5451975731fd@zentaur.org> From: Clinton Bunch In-Reply-To: <727e3cdf-f00c-43cc-9965-5451975731fd@zentaur.org> X-Seq: 52829 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: This is a multi-part message in MIME format. --------------sdAHLDS0nrugQJmtRY8i74CX Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable On 3/25/2024 19:32, Clinton Bunch wrote: > On 3/25/2024 18:47, Oliver Kiddle wrote: >> Clinton Bunch wrote: >>> Here is my first cut at replacement wording for the first two=20 >>> paragraphs >>> of the C coding style section: >> This looks good to me. >> >>> If you wish to use features not present in the ANSI C 99 standard,=20 >>> there >>> are preprocessor macros to provide safe access to some of these.=C2=A0= =20 >>> Always >>> use the macros if you want to use these facilities. >> I was trying to think how this reads to someone completely unfamiliar >> with the zsh code and what macros we have that meet this description. >> Autoconf detects mostly system library/OS features and the macros >> related to that are either defined to 1 (or left undefined). So the >> macros allow you to make the use of such features conditional. "provid= e >> safe access" sounds more like a wrapper =E2=80=93 I couldn't think of = an >> example but that's not to say there aren't any. The preprocessor macro= s >> are for anything that isn't portable rather than a particular language >> standard. >> >> Oliver > I think what was intended was macros like _POSIX_C_SOURCE and=20 > _XOPEN_SOURCE and __STDC__.=C2=A0 The glibc man pages are littered with= them. > > If we're going to say Zsh expects C99 we should probably update autoconf=20 to check for C99 (and set any options needed) I've attached a patch for the trivial change needed. --------------sdAHLDS0nrugQJmtRY8i74CX Content-Type: text/plain; charset=UTF-8; name="zsh-autoconf-c99.patch.txt" Content-Disposition: attachment; filename="zsh-autoconf-c99.patch.txt" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL2NvbmZpZ3VyZS5hYyBiL2NvbmZpZ3VyZS5hYwppbmRleCA3ODYyMTA0 MmQuLjU5ODRiNjY3ZSAxMDA2NDQKLS0tIGEvY29uZmlndXJlLmFjCisrKyBiL2NvbmZpZ3Vy ZS5hYwpAQCAtNDYyLDcgKzQ2Miw3IEBAIGRubCBXZSB3YW50IHRoZXNlIGJlZm9yZSB0aGUg Y2hlY2tzLCBzbyB0aGUgY2hlY2tzIGNhbiBtb2RpZnkgdGhlaXIgdmFsdWVzLgogdGVzdCAt eiAiJHtDRkxBR1Mrc2V0fSIgICYmIENGTEFHUz0gIGF1dG9fY2ZsYWdzPTEKIHRlc3QgLXog IiR7TERGTEFHUytzZXR9IiAmJiBMREZMQUdTPSBhdXRvX2xkZmxhZ3M9MQogCi1BQ19QUk9H X0NDCitBQ19QUk9HX0NDX0M5OQogCiBkbmwgQ2hlY2sgZm9yIGxhcmdlIGZpbGUgc3VwcG9y dC4KIAo= --------------sdAHLDS0nrugQJmtRY8i74CX--