about summary refs log tree commit diff
path: root/posix/regex.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2018-10-14 22:20:08 -0500
committerPaul Eggert <eggert@cs.ucla.edu>2018-10-14 23:36:55 -0500
commitf4efbdfb44ebb7dfe4c19759c426153bdd48a1dd (patch)
tree1e0e5597ff21cbf2da31cb3438b73510d296dda4 /posix/regex.c
parent9f9feb6d5db3bf7b3cda6d7a23029f93da80895d (diff)
downloadglibc-f4efbdfb44ebb7dfe4c19759c426153bdd48a1dd.tar.gz
glibc-f4efbdfb44ebb7dfe4c19759c426153bdd48a1dd.tar.xz
glibc-f4efbdfb44ebb7dfe4c19759c426153bdd48a1dd.zip
regex: __builtin_expect → __glibc_unlikely
[BZ#23744]
This refactoring was prompted by a problem when the regex code is
used as part of Gnulib and when the builder’s compiler does not grok
__builtin_expect.  Problem reported for Gawk by Nelson H.F. Beebe in:
https://lists.gnu.org/r/bug-gnulib/2018-09/msg00137.html
Although this refactoring does not fix the problem directly,
we might as well have Gawk use the now-preferred glibc style for when
__builtin_expect is unavailable.
* posix/regex_internal.h (BE): Remove.
All uses replaced by __glibc_unlikely or __glibc_likely.
Diffstat (limited to 'posix/regex.c')
-rw-r--r--posix/regex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/posix/regex.c b/posix/regex.c
index d6591e8670..a80e740c68 100644
--- a/posix/regex.c
+++ b/posix/regex.c
@@ -18,7 +18,7 @@
    <https://www.gnu.org/licenses/>.  */
 
 #ifndef _LIBC
-# include <config.h>
+# include <libc-config.h>
 
 # if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__
 #  pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"