From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw1-x112d.google.com (mail-yw1-x112d.google.com [IPv6:2607:f8b0:4864:20::112d]) by sourceware.org (Postfix) with ESMTPS id 860903858D3C for ; Thu, 5 May 2022 16:15:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 860903858D3C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-yw1-x112d.google.com with SMTP id 00721157ae682-2f7d19cac0bso53874517b3.13 for ; Thu, 05 May 2022 09:15:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=xj86J7dDQ5yNoUvXFgMdl7CzjkKI/w1roaN4HY7YTUA=; b=OswHS4JvIBioInoiPNi8IpGGz9KjsNQiXeoIFiz0lu1Mal6Bh/oZYLywfj+rk+J6EA ugdeyryt3SUoXX2A0zltFqMAjcYpriJOb1eVSIoy9YSdidydPoLm+OOzri+KgAx43e0y mJCjdeIBR6COjpGjHIxJhIGzqYoZ2uqoh52NuT0bQvGHDB/ySQBwj64xLCyI3HKd2U1b +/mbtskMwd94Cc4gSfYeXgIU++CFyZc2xDax83wT1u9Z+bjNN5qkczNLGYtvFNB60QYf Egs3Iq8yG3plVGXNYn+6+xqgPGCufZrz62N2rQ6z+iA7id4Jfx6zzReFsBs3iX4XFSVU /NJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=xj86J7dDQ5yNoUvXFgMdl7CzjkKI/w1roaN4HY7YTUA=; b=zIKG8VSXCTW9mHOVqLLxbDiXVNZ/CwzuS33uvzWbspmaC+kHzKiUIUJ5J/HEnzilqX +0+9bcz2QVkiqndlBJ92u+g+/qj43pyeK5qt9BYjN7JHQsLIrlTmTiRYUyApRsTjPVKY dLwzrsfTz2DeB6OLFJnCKehQuJAohJRsMzmW72C6XMpGOGNSGeTxhZue/SjzBcEX1o/0 CG0c0dbHXJj0ku53OOZO5Xl9C5dqzcHAl1HZx0P9kXeq5V7v+mMbC1QlOanPpLFeQDCH KvbdtpL9y9T44IQ1/n03H0bJOTK6LSTtqW5XZaxaTGE+uWgJ+MtfHuTLyIwOwGyLulmd H2zg== X-Gm-Message-State: AOAM533wMYI+Ua6/KBrTRseoxJQZsyz9i1PYQ5X2m8RqQ/NrIAxkgkXF mvv6JcN3NkobiQdeL28vAyubK15BN9KCPnkBe5rv2KNMsCY= X-Google-Smtp-Source: ABdhPJyDhJzl4jrfGlwVsH/xWkHQ0peDE7ke4SJ3niisPZNBQhVVp8JCHp8PNrnwtx8DAkvHAaEMaMMSk7UZUXbWj50= X-Received: by 2002:a81:b8d:0:b0:2f7:cf33:e840 with SMTP id 135-20020a810b8d000000b002f7cf33e840mr24375358ywl.73.1651767356983; Thu, 05 May 2022 09:15:56 -0700 (PDT) MIME-Version: 1.0 References: <9dbc482d-84fd-b3be-babc-e00040a56f5b@embedded-brains.de> In-Reply-To: From: Pavel M Date: Thu, 5 May 2022 19:15:21 +0300 Message-ID: Subject: Re: Issue: #include shall not cause intmax_t to be defined To: newlib@sourceware.org X-Spam-Status: No, score=1.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2022 16:16:00 -0000 > Is there actually a "MUST NOT" defined anywhere in the standards or was this change unnecessary? C11 specifies when header X includes header Y. Examples: 7.25 Type-generic math : > The header includes the headers and 7.26 Threads : > The header includes the header 7.8 Format conversion of integer types : > The header includes the header There are no more occurrences of "includes the header". -- Pavel On Wed, 4 May 2022 at 16:13, Corinna Vinschen wrote: > On May 4 11:02, Sebastian Huber wrote: > > On 04/05/2022 10:54, Corinna Vinschen wrote: > > > On May 4 10:41, Sebastian Huber wrote: > > > > On 04/05/2022 10:37, Corinna Vinschen wrote: > > > > > On May 4 09:59, Sebastian Huber wrote: > > > > > > On 03/05/2022 19:00, Corinna Vinschen wrote: > > > > > > > On Apr 27 00:41, Pavel M wrote: > > > > > > > > Hi all, > > > > > > > > > > > > > > > > Issue: #include shall not cause intmax_t to be > defined. However, > > > > > > > > now it causes. This is because now includes > , which > > > > > > > > includes . > > > > > > > > Note: per C11 the types intmax_t and uintmax_t defined in > the header > > > > > > > > , and is not included in . > > > > > > > > Consider fixing. > > > > > > > I pushed a patch to fix this. > > > > > > In FreeBSD, provides the stdint.h types. Could we > bring back > > > > > > this with > > > > > Is that with FreeeBSD only, or is that with BSDs in general? > > > > It seems to be a general BSD feature: > > > > > > > > https://github.com/openbsd/src/blob/master/sys/sys/types.h#L75 > > > > > > > > > http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/types.h?rev=1.105&content-type=text/x-cvsweb-markup > > > If the BSDs expose stdint.h types via stdio.h anyway, what's the sense > > > of not exposing it in the non-_BSD_VISIBLE scenario? _BSD_VISIBLE is > > > default anyway, so the non-exposure of the stdint types is restricted > to > > > files which define _XOPEN_SOURCE or some such. > > > > > > Is there actually a "MUST NOT" defined anywhere in the standards or > > > was this change unnecessary? > > > > I think the reported problem with stdio.h is because the Newlib stdio.h > > includes . In FreeBSD for example, is > included > > with local type definitions, see: > > > > https://sourceware.org/pipermail/newlib/2022/019592.html > > I guess I'm an idiot. I just dropped my patch and applied yours > instead. It fixes *all* the problems requiring more patches to other > files I saw while building with my change to sys/types.h. > > So, I think what I'll do is revert my patch and apply yours instead. > > The other patch of your patch series is obseleted by this. > > > Thanks a lot! > > > Corinna > >