From: "Emilio Cobos Álvarez" <emilio@crisal.io>
To: Florian Weimer <fweimer@redhat.com>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH] libc: Don't use a custom wrapper macro around __has_include.
Date: Thu, 21 Nov 2019 14:28:48 +0100 [thread overview]
Message-ID: <9ef64984-0340-7fac-1c9d-682b37b49315@crisal.io> (raw)
In-Reply-To: <875zjdo045.fsf@oldenburg2.str.redhat.com>
On 11/21/19 2:00 PM, Florian Weimer wrote:
> * Emilio Cobos Álvarez:
>
>> This causes issues when using clang with -frewrite-includes to e.g., submit the
>> translation unit to a distributed compiler.
>
> Thanks for the patch. The substance of the patch is okay. I would
> prefer if you could repost it with the minor issues mentioned below
> addressed, then I can push it on your behalf.
I think I did this right, but let me know otherwise :)
> I've tried to push this into Gerrit, but we can't Cc: people who do not
> have accounts in the tool. Not your fault. We can continue on the
> mailing list.
Ah, cool. Are there docs for pushing to Gerrit? I saw the revision, and
it seems I can edit the revision description, but not sure how to set up
the instance for glibc :)
I am familiar with Gerrit itself so I'd be ok with following-up there if
needed. Anyhow hopefully the second version of the patch looks good.
>> In my case, I was building Firefox using sccache.
>>
>> See https://bugs.llvm.org/show_bug.cgi?id=43982 for a reduced test-case since I
>> initially thought this was a clang bug.
>>
>> Apparently doing this is invalid C++ per:
>>
>> * http://eel.is/c++draft/cpp.cond#7.sentence-2
>
> I think it's probably better to quote the actual language in the
> standard.
Rephrased the commit message to be a little cleaner and quote the
standard directly.
>
>> (See https://bugs.llvm.org/show_bug.cgi?id=37990)
>>
>> Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
>
> We do not use Signed-off-by, but copyright assignments, but we have been
> advised that this is not necessary for changes of this size.
Removed.
Thanks!
-- Emilio
>> diff --git a/sysdeps/unix/sysv/linux/bits/statx.h b/sysdeps/unix/sysv/linux/bits/statx.h
>> index ff3f2e8973..14d5992226 100644
>> --- a/sysdeps/unix/sysv/linux/bits/statx.h
>> +++ b/sysdeps/unix/sysv/linux/bits/statx.h
>> @@ -26,12 +26,14 @@
>>
>> /* Use "" to work around incorrect macro expansion of the
>> __has_include argument (GCC PR 80005). */
>> -#if __glibc_has_include ("linux/stat.h")
>> -# include "linux/stat.h"
>> -# ifdef STATX_TYPE
>> -# define __statx_timestamp_defined 1
>> -# define __statx_defined 1
>> -# endif
>> +#ifdef __has_include
>> +# if __has_include("linux/stat.h")
>> +# include "linux/stat.h"
>> +# ifdef STATX_TYPE
>> +# define __statx_timestamp_defined 1
>> +# define __statx_defined 1
>> +# endif
>> +# endif
>> #endif
>
> The indentation is slight off here, I think. Each nested conditional
> adds one space after the #. Please also include a space after
> __has_include.
>
> Thanks,
> Florian
>
prev parent reply other threads:[~2019-11-21 13:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-12 18:31 [PATCH] libc: Don't use a custom wrapper macro around __has_include Emilio Cobos Álvarez
2019-11-21 13:00 ` Florian Weimer
2019-11-21 13:21 ` [PATCH v2] " Emilio Cobos Álvarez
2019-11-21 13:28 ` Emilio Cobos Álvarez [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9ef64984-0340-7fac-1c9d-682b37b49315@crisal.io \
--to=emilio@crisal.io \
--cc=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).