summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2016-12-16 14:52:59 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2016-12-16 14:57:13 -0800
commit005973d694fea96d9e8b6a8148a71bd7f0a8d099 (patch)
tree603672c299975d1c16c3e8a1fa6101507780c8e6 /modules
parent3044ae7f4310079527010ddd52be0e117ae28ca6 (diff)
downloadgnulib-005973d694fea96d9e8b6a8148a71bd7f0a8d099.tar.gz
builtin-expect: new module
Fix fnmatch to use it. Problem reported for z/OS by Daniel Richard G. * lib/fnmatch.c (__builtin_expect): * lib/glob.c (__builtin_expect): * lib/grantpt.c (__builtin_expect) [!_LIBC]: * lib/memmem.c (__builtin_expect) [!_LIBC]: * lib/scandir.c (__builtin_expect): * lib/strstr.c (__builtin_expect) [!_LIBC]: Remove macro; config.h now does this. * lib/gl_anytreehash_list1.h (add_to_bucket): * lib/regex_internal.h (BE): Assume __builtin_expect. * m4/builtin-expect.m4, modules/builtin-expect: New files. * modules/avltreehash-list, modules/fnmatch, modules/glob: * modules/grantpt, modules/memmem-simple, modules/rbtreehash-list: * modules/scandir, modules/strstr-simple: Depend on builtin-expect.
Diffstat (limited to 'modules')
-rw-r--r--modules/avltreehash-list1
-rw-r--r--modules/builtin-expect20
-rw-r--r--modules/fnmatch1
-rw-r--r--modules/glob1
-rw-r--r--modules/grantpt1
-rw-r--r--modules/memmem-simple1
-rw-r--r--modules/rbtreehash-list1
-rw-r--r--modules/scandir2
-rw-r--r--modules/strstr-simple1
9 files changed, 28 insertions, 1 deletions
diff --git a/modules/avltreehash-list b/modules/avltreehash-list
index f4d569917a..a7aa75ec45 100644
--- a/modules/avltreehash-list
+++ b/modules/avltreehash-list
@@ -14,6 +14,7 @@ lib/gl_anytreehash_list1.h
lib/gl_anytreehash_list2.h
Depends-on:
+builtin-expect
list
avltree-oset
stdint
diff --git a/modules/builtin-expect b/modules/builtin-expect
new file mode 100644
index 0000000000..c11d5d96c9
--- /dev/null
+++ b/modules/builtin-expect
@@ -0,0 +1,20 @@
+Description:
+Check for __builtin_expect.
+
+Files:
+m4/builtin-expect.m4
+
+Depends-on:
+
+configure.ac:
+gl___BUILTIN_EXPECT
+
+Makefile.am:
+
+Include:
+
+License:
+LGPLv2+
+
+Maintainer:
+all
diff --git a/modules/fnmatch b/modules/fnmatch
index ab302361ba..70563f9bda 100644
--- a/modules/fnmatch
+++ b/modules/fnmatch
@@ -12,6 +12,7 @@ Depends-on:
extensions
snippet/arg-nonnull
alloca [test -n "$FNMATCH_H"]
+builtin-expect [test -n "$FNMATCH_H"]
flexmember [test -n "$FNMATCH_H"]
stdbool [test -n "$FNMATCH_H"]
wchar [test -n "$FNMATCH_H"]
diff --git a/modules/glob b/modules/glob
index f32fe5f36f..29df7ab89b 100644
--- a/modules/glob
+++ b/modules/glob
@@ -15,6 +15,7 @@ snippet/arg-nonnull
snippet/c++defs
snippet/warn-on-use
alloca [test -n "$GLOB_H"]
+builtin-expect [test -n "$GLOB_H"]
closedir [test -n "$GLOB_H"]
d-type [test -n "$GLOB_H"]
dirfd [test -n "$GLOB_H"]
diff --git a/modules/grantpt b/modules/grantpt
index 38675b6fb5..486bb8550e 100644
--- a/modules/grantpt
+++ b/modules/grantpt
@@ -9,6 +9,7 @@ m4/grantpt.m4
Depends-on:
stdlib
extensions
+builtin-expect [test $HAVE_GRANTPT = 0]
pt_chown [test $HAVE_GRANTPT = 0]
waitpid [test $HAVE_GRANTPT = 0]
configmake [test $HAVE_GRANTPT = 0]
diff --git a/modules/memmem-simple b/modules/memmem-simple
index d4ae332a26..71de887c39 100644
--- a/modules/memmem-simple
+++ b/modules/memmem-simple
@@ -7,6 +7,7 @@ lib/memmem.c
m4/memmem.m4
Depends-on:
+builtin-expect
extensions
string
stdint
diff --git a/modules/rbtreehash-list b/modules/rbtreehash-list
index e7369cbfc0..2b4add5546 100644
--- a/modules/rbtreehash-list
+++ b/modules/rbtreehash-list
@@ -14,6 +14,7 @@ lib/gl_anytreehash_list1.h
lib/gl_anytreehash_list2.h
Depends-on:
+builtin-expect
list
rbtree-oset
stdint
diff --git a/modules/scandir b/modules/scandir
index 71ef4654c2..8d5e1058d8 100644
--- a/modules/scandir
+++ b/modules/scandir
@@ -6,6 +6,7 @@ lib/scandir.c
m4/scandir.m4
Depends-on:
+builtin-expect
closedir
dirent
extensions
@@ -31,4 +32,3 @@ LGPL
Maintainer:
all, glibc
-
diff --git a/modules/strstr-simple b/modules/strstr-simple
index c61afc45ad..bd52b17310 100644
--- a/modules/strstr-simple
+++ b/modules/strstr-simple
@@ -8,6 +8,7 @@ m4/strstr.m4
Depends-on:
string
+builtin-expect [test $REPLACE_STRSTR = 1]
stdbool [test $REPLACE_STRSTR = 1]
memchr [test $REPLACE_STRSTR = 1]
memcmp [test $REPLACE_STRSTR = 1]