From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 978FE1F4B5 for ; Thu, 21 Nov 2019 13:02:22 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-type:content-transfer-encoding; q=dns; s=default; b=rNV0vEsFpsj7ukpQ9k9S2mLoIye3cc8/MptD1vhR89q 0R7Tq1h5LxuEn3ngPuzRFIJg4Kbt2rygm14k7u2sdCZw+P2Pa9bN9UTj47rpbRxr oDUufjUxCUDkBNMDL/sIzfuK46974kS3raRJZ96AZ+FKeYT8PPrYkiu+qEMh/siE = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-type:content-transfer-encoding; s=default; bh=Op/kvxq3j8FralQ2y9Mrg8UnqVA=; b=H5fIEeR8h2KwSBgId uRxurWFKqzrAbptxF5V4Fip5lzEF+KmJGBmXRPuWWQOFE9RWX4bC/FuPQ7u+YK0w XUh2uNwXBvqMeVYHiZFIC7keAUewCUg3w9d7kuS+PcwZvSWyx4AfRCe8MfaIpZL4 8ZvxGsTY9QMHVnOYAtFvkf8O6Y= Received: (qmail 105275 invoked by alias); 21 Nov 2019 13:02:20 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 105264 invoked by uid 89); 21 Nov 2019 13:02:20 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: us-smtp-1.mimecast.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574341337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XJopDm9qziKi3CXFb5gNbs0dpdu+G4ENL/P0e+dG5tg=; b=Sb+2s1ZEar49z6jpG+19LwQBs18DD4Zl2E6Lqtle9bhv5ehHf0EacRuUvyafI4J228zfUa Sv8eYv5CaqpV5FYoJ2kTmZphgMTwrj0BgHI5Ys2saGxSRhUnmU7RPTQcJxD/rxmPQQoaym GyziNHTiBdHFwMAZYW6vaISgmvmrZdQ= From: Florian Weimer To: Emilio Cobos =?utf-8?Q?=C3=81lvarez?= Cc: libc-alpha@sourceware.org Subject: Re: [PATCH] libc: Don't use a custom wrapper macro around __has_include. References: <20191112183115.2048865-1-emilio@crisal.io> Date: Thu, 21 Nov 2019 14:00:26 +0100 In-Reply-To: <20191112183115.2048865-1-emilio@crisal.io> ("Emilio Cobos \=\?utf-8\?Q\?\=C3\=81lvarez\=22's\?\= message of "Tue, 12 Nov 2019 19:31:15 +0100") Message-ID: <875zjdo045.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable * Emilio Cobos =C3=81lvarez: > This causes issues when using clang with -frewrite-includes to e.g., subm= it 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'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. > In my case, I was building Firefox using sccache. > > See https://bugs.llvm.org/show_bug.cgi?id=3D43982 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. > (See https://bugs.llvm.org/show_bug.cgi?id=3D37990) > > Signed-off-by: Emilio Cobos =C3=81lvarez 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. > diff --git a/sysdeps/unix/sysv/linux/bits/statx.h b/sysdeps/unix/sysv/lin= ux/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 @@ > =20 > /* 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