Message ID | 87tvcss1ga.fsf@oldenburg2.str.redhat.com |
---|---|
State | Committed |
Headers |
Received: (qmail 74681 invoked by alias); 14 Jun 2019 14:09:45 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <libc-alpha.sourceware.org> List-Unsubscribe: <mailto:libc-alpha-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:libc-alpha-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 74673 invoked by uid 89); 14 Jun 2019 14:09:45 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-19.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=anticipate X-HELO: mx1.redhat.com From: Florian Weimer <fweimer@redhat.com> To: libc-alpha@sourceware.org Subject: Re: [PATCH] <sys/cdefs.h>: Inhibit macro expansion for __glibc_has_include References: <87a7em6ben.fsf@oldenburg2.str.redhat.com> Date: Fri, 14 Jun 2019 16:09:41 +0200 In-Reply-To: <87a7em6ben.fsf@oldenburg2.str.redhat.com> (Florian Weimer's message of "Wed, 12 Jun 2019 18:01:04 +0200") Message-ID: <87tvcss1ga.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain |
Commit Message
Florian Weimer
June 14, 2019, 2:09 p.m. UTC
* Florian Weimer: > This is currently ineffective with GCC because of GC PR 80005, but > it makes sense to anticipate a fix for this defect. > > Suggested by Zack Weinberg. > > 2019-06-12 Florian Weimer <fweimer@redhat.com> > > * misc/sys/cdefs.h (__glibc_has_include): Do not use a > function-like macro, so that __has_include can inhibit expansion > of its argument. > > diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h > index 638872b87b..ed146ce20b 100644 > --- a/misc/sys/cdefs.h > +++ b/misc/sys/cdefs.h > @@ -413,7 +413,7 @@ > #endif > > #ifdef __has_include > -# define __glibc_has_include(header) __has_include (header) > +# define __glibc_has_include __has_include > #else > # define __glibc_has_include(header) 0 > #endif This is what I plan to commit shortly. I don't want to mention the GCC PR in the public header because it will be outdated soon (I hope). Thanks, Florian <sys/cdefs.h>: Inhibit macro expansion for __glibc_has_include This is currently ineffective with GCC because of GCC PR 80005, but it makes sense to anticipate a fix for this defect. Suggested by Zack Weinberg. 2019-06-14 Florian Weimer <fweimer@redhat.com> * misc/sys/cdefs.h (__glibc_has_include): Do not use a function-like macro, so that __has_include can inhibit expansion of its argument.
Comments
On 6/14/19 10:09 AM, Florian Weimer wrote: > * Florian Weimer: > >> This is currently ineffective with GCC because of GC PR 80005, but >> it makes sense to anticipate a fix for this defect. >> >> Suggested by Zack Weinberg. >> >> 2019-06-12 Florian Weimer <fweimer@redhat.com> >> >> * misc/sys/cdefs.h (__glibc_has_include): Do not use a >> function-like macro, so that __has_include can inhibit expansion >> of its argument. >> >> diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h >> index 638872b87b..ed146ce20b 100644 >> --- a/misc/sys/cdefs.h >> +++ b/misc/sys/cdefs.h >> @@ -413,7 +413,7 @@ >> #endif >> >> #ifdef __has_include >> -# define __glibc_has_include(header) __has_include (header) >> +# define __glibc_has_include __has_include >> #else >> # define __glibc_has_include(header) 0 >> #endif > > This is what I plan to commit shortly. > > I don't want to mention the GCC PR in the public header because it will > be outdated soon (I hope). > > Thanks, > Florian > > <sys/cdefs.h>: Inhibit macro expansion for __glibc_has_include > > This is currently ineffective with GCC because of GCC PR 80005, but > it makes sense to anticipate a fix for this defect. > > Suggested by Zack Weinberg. > > 2019-06-14 Florian Weimer <fweimer@redhat.com> > > * misc/sys/cdefs.h (__glibc_has_include): Do not use a > function-like macro, so that __has_include can inhibit expansion > of its argument. > LGTM. Reviewed-by: Carlos O'Donell <carlos@redhat.com> > diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h > index 638872b87b..f1bd994a10 100644 > --- a/misc/sys/cdefs.h > +++ b/misc/sys/cdefs.h > @@ -413,7 +413,9 @@ > #endif > > #ifdef __has_include > -# define __glibc_has_include(header) __has_include (header) > +/* Do not use a function-like macro, so that __has_include can inhibit > + macro expansion. */ > +# define __glibc_has_include __has_include > #else > # define __glibc_has_include(header) 0 > #endif >
diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h index 638872b87b..f1bd994a10 100644 --- a/misc/sys/cdefs.h +++ b/misc/sys/cdefs.h @@ -413,7 +413,9 @@ #endif #ifdef __has_include -# define __glibc_has_include(header) __has_include (header) +/* Do not use a function-like macro, so that __has_include can inhibit + macro expansion. */ +# define __glibc_has_include __has_include #else # define __glibc_has_include(header) 0 #endif