diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2016-12-16 14:52:59 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2016-12-16 14:57:13 -0800 |
commit | 005973d694fea96d9e8b6a8148a71bd7f0a8d099 (patch) | |
tree | 603672c299975d1c16c3e8a1fa6101507780c8e6 /lib/gl_anytreehash_list1.h | |
parent | 3044ae7f4310079527010ddd52be0e117ae28ca6 (diff) | |
download | gnulib-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 'lib/gl_anytreehash_list1.h')
-rw-r--r-- | lib/gl_anytreehash_list1.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/gl_anytreehash_list1.h b/lib/gl_anytreehash_list1.h index 11578ed6b1..cf44b59688 100644 --- a/lib/gl_anytreehash_list1.h +++ b/lib/gl_anytreehash_list1.h @@ -185,10 +185,8 @@ add_to_bucket (gl_list_t list, gl_list_node_t new_node) return 0; } /* Tell GCC that the likely return value is 0. */ -#if __GNUC__ >= 3 -# define add_to_bucket(list,node) \ +#define add_to_bucket(list,node) \ __builtin_expect ((add_to_bucket) (list, node), 0) -#endif /* Remove a node from the hash table structure. If duplicates are allowed, this function performs in average time |