+2021-01-19 Paul Eggert <eggert@cs.ucla.edu>
+
+ fnmatch, regex, fts: FALLTHROUGH consistency
+ Be more consistent about how FALLTHROUGH is defined.
+ For Gnulib, use attribute.h. For glibc, use __GNUC__ >= 7.
+ Problem for glibc reported by Vaseeharan Vinayagamoorthy in:
+ https://sourceware.org/pipermail/libc-alpha/2021-January/121778.html
+ * lib/fnmatch.c (FALLTHROUGH) [_LIBC]:
+ * lib/regex_internal.h (FALLTHROUGH) [_LIBC]:
+ Don’t worry about Clang, as it’s not needed and provokes GCC.
+ * lib/fts.c (FALLTHROUGH) [!_LIBC]:
+ * lib/regex_internal.h (FALLTHROUGH) [!_LIBC]:
+ Rely on attribute.h for FALLTHROUGH
+ * modules/regex: Depend on attribute module.
+
2021-01-19 KO Myung-Hun <komh78@gmail.com>
spawn-pipe: Fix SIGSEGV on OS/2 kLIBC.
#endif
#ifdef _LIBC
-# if (__GNUC__ >= 7) || (__clang_major__ >= 10)
+# if __GNUC__ >= 7
# define FALLTHROUGH __attribute__ ((__fallthrough__))
# else
# define FALLTHROUGH ((void) 0)
while (false)
#endif
-#ifndef FALLTHROUGH
-# if (__GNUC__ >= 7) || (__clang_major__ >= 10)
+#ifdef _LIBC
+# if __GNUC__ >= 7
# define FALLTHROUGH __attribute__ ((__fallthrough__))
# else
# define FALLTHROUGH ((void) 0)
}
#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 */
c99
extensions
ssize_t
+attribute [test $ac_use_included_regex = yes]
btowc [test $ac_use_included_regex = yes]
builtin-expect [test $ac_use_included_regex = yes]
dynarray [test $ac_use_included_regex = yes]