public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] posix: Fix regex_internal.h on bootstrap
@ 2021-01-20 13:01 Adhemerval Zanella
  0 siblings, 0 replies; only message in thread
From: Adhemerval Zanella @ 2021-01-20 13:01 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=1006250ea2d683e684f65911d738bd84f55c06c1

commit 1006250ea2d683e684f65911d738bd84f55c06c1
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Wed Jan 20 12:55:17 2021 +0000

    posix: Fix regex_internal.h on bootstrap
    
    Only define FALLTHROUGH for _LIBC and do not check __clang_major__
    value.
    
    It partially syncs with gnulib 5c52f00c69f39fe.
    
    Checked with build-many-glibcs.py for aarch64-linux-gnu,
    x86_64-linux-gnu, and s390x-linux-gnu.

Diff:
---
 posix/regex_internal.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/posix/regex_internal.h b/posix/regex_internal.h
index e31ac92674..011f733176 100644
--- a/posix/regex_internal.h
+++ b/posix/regex_internal.h
@@ -848,12 +848,14 @@ re_string_elem_size_at (const re_string_t *pstr, Idx idx)
 }
 #endif /* RE_ENABLE_I18N */
 
-#ifndef FALLTHROUGH
-# if (__GNUC__ >= 7) || (__clang_major__ >= 10)
+#ifdef _LIBC
+# if __GNUC__ >= 7
 #  define FALLTHROUGH __attribute__ ((__fallthrough__))
 # else
 #  define FALLTHROUGH ((void) 0)
 # endif
+#else
+# include "attribute.h"
 #endif
 
 #endif /*  _REGEX_INTERNAL_H */


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-01-20 13:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-20 13:01 [glibc] posix: Fix regex_internal.h on bootstrap Adhemerval Zanella

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).