Message ID | 87woi0up0l.fsf@oldenburg2.str.redhat.com |
---|---|
State | Committed |
Headers |
Received: (qmail 96945 invoked by alias); 5 Jun 2019 13:42:54 -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 96937 invoked by uid 89); 5 Jun 2019 13:42:54 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.9 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=HX-Languages-Length:735 X-HELO: mx1.redhat.com From: Florian Weimer <fweimer@redhat.com> To: libc-alpha@sourceware.org Subject: [PATCH] riscv: Do not use __has_include__ Date: Wed, 05 Jun 2019 15:42:50 +0200 Message-ID: <87woi0up0l.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 5, 2019, 1:42 p.m. UTC
The user-visible preprocessor construct is called __has_include. 2019-06-05 Florian Weimer <fweimer@redhat.com> * sysdeps/unix/sysv/linux/riscv/flush-icache.c: Do not use internal GCC preprocessor identifier __has_include__.
Comments
On Wed, 05 Jun 2019 06:42:50 PDT (-0700), fweimer@redhat.com wrote: > The user-visible preprocessor construct is called __has_include. > > 2019-06-05 Florian Weimer <fweimer@redhat.com> > > * sysdeps/unix/sysv/linux/riscv/flush-icache.c: Do not use > internal GCC preprocessor identifier __has_include__. > > diff --git a/sysdeps/unix/sysv/linux/riscv/flush-icache.c b/sysdeps/unix/sysv/linux/riscv/flush-icache.c > index cd5c400977..f2dfcc50d0 100644 > --- a/sysdeps/unix/sysv/linux/riscv/flush-icache.c > +++ b/sysdeps/unix/sysv/linux/riscv/flush-icache.c > @@ -21,7 +21,7 @@ > #include <stdlib.h> > #include <atomic.h> > #include <sys/cachectl.h> > -#if __has_include__ (<asm/syscalls.h>) > +#if __has_include (<asm/syscalls.h>) > # include <asm/syscalls.h> > #else > # include <asm/unistd.h> Thanks!
* Palmer Dabbelt: > On Wed, 05 Jun 2019 06:42:50 PDT (-0700), fweimer@redhat.com wrote: >> The user-visible preprocessor construct is called __has_include. >> >> 2019-06-05 Florian Weimer <fweimer@redhat.com> >> >> * sysdeps/unix/sysv/linux/riscv/flush-icache.c: Do not use >> internal GCC preprocessor identifier __has_include__. >> >> diff --git a/sysdeps/unix/sysv/linux/riscv/flush-icache.c b/sysdeps/unix/sysv/linux/riscv/flush-icache.c >> index cd5c400977..f2dfcc50d0 100644 >> --- a/sysdeps/unix/sysv/linux/riscv/flush-icache.c >> +++ b/sysdeps/unix/sysv/linux/riscv/flush-icache.c >> @@ -21,7 +21,7 @@ >> #include <stdlib.h> >> #include <atomic.h> >> #include <sys/cachectl.h> >> -#if __has_include__ (<asm/syscalls.h>) >> +#if __has_include (<asm/syscalls.h>) >> # include <asm/syscalls.h> >> #else >> # include <asm/unistd.h> > > Thanks! I'll consider this a review and push this later. 8-) Florian
Hi, Le mercredi 05 juin 2019 à 15:42 +0200, Florian Weimer a écrit : > The user-visible preprocessor construct is called __has_include. > > 2019-06-05 Florian Weimer <fweimer@redhat.com> > > * sysdeps/unix/sysv/linux/riscv/flush-icache.c: Do not use > internal GCC preprocessor identifier __has_include__. > > diff --git a/sysdeps/unix/sysv/linux/riscv/flush-icache.c > b/sysdeps/unix/sysv/linux/riscv/flush-icache.c > index cd5c400977..f2dfcc50d0 100644 > --- a/sysdeps/unix/sysv/linux/riscv/flush-icache.c > +++ b/sysdeps/unix/sysv/linux/riscv/flush-icache.c > @@ -21,7 +21,7 @@ > #include <stdlib.h> > #include <atomic.h> > #include <sys/cachectl.h> > -#if __has_include__ (<asm/syscalls.h>) > +#if __has_include (<asm/syscalls.h>) Candidate for __glibc_has_include() ? > # include <asm/syscalls.h> > #else > # include <asm/unistd.h> Regards.
* Yann Droneaud: > Hi, > > Le mercredi 05 juin 2019 à 15:42 +0200, Florian Weimer a écrit : >> The user-visible preprocessor construct is called __has_include. >> >> 2019-06-05 Florian Weimer <fweimer@redhat.com> >> >> * sysdeps/unix/sysv/linux/riscv/flush-icache.c: Do not use >> internal GCC preprocessor identifier __has_include__. >> >> diff --git a/sysdeps/unix/sysv/linux/riscv/flush-icache.c >> b/sysdeps/unix/sysv/linux/riscv/flush-icache.c >> index cd5c400977..f2dfcc50d0 100644 >> --- a/sysdeps/unix/sysv/linux/riscv/flush-icache.c >> +++ b/sysdeps/unix/sysv/linux/riscv/flush-icache.c >> @@ -21,7 +21,7 @@ >> #include <stdlib.h> >> #include <atomic.h> >> #include <sys/cachectl.h> >> -#if __has_include__ (<asm/syscalls.h>) >> +#if __has_include (<asm/syscalls.h>) > > Candidate for __glibc_has_include() ? That patch hasn't been reviewed it. Furthermore, we only need to use __glibc_has_include in public header files. Inside glibc itself, we can use __has_include directly because GCC 5 has it. I prefer to avoid unconditionally available GCC features directly, without abstracing macros, because it reduces cognitive overhead for the reader. Thanks, Florian
diff --git a/sysdeps/unix/sysv/linux/riscv/flush-icache.c b/sysdeps/unix/sysv/linux/riscv/flush-icache.c index cd5c400977..f2dfcc50d0 100644 --- a/sysdeps/unix/sysv/linux/riscv/flush-icache.c +++ b/sysdeps/unix/sysv/linux/riscv/flush-icache.c @@ -21,7 +21,7 @@ #include <stdlib.h> #include <atomic.h> #include <sys/cachectl.h> -#if __has_include__ (<asm/syscalls.h>) +#if __has_include (<asm/syscalls.h>) # include <asm/syscalls.h> #else # include <asm/unistd.h>