diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2018-10-15 00:55:37 -0500 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2018-10-15 00:57:57 -0500 |
commit | 3d91dc1bb5aeecda786ebe1805c33d14c8bd89fa (patch) | |
tree | 155498240a837b179319741542aaa78c8a47c9ab /lib/regex_internal.h | |
parent | 6b8fd34c4ab1aa23b180440cdc8210900896bbf4 (diff) | |
download | emacs-3d91dc1bb5aeecda786ebe1805c33d14c8bd89fa.tar.gz |
Update lib/regex from glibc via Gnulib
This syncs recent refactorings from glibc, and incorporates:
2018-10-15 libc-config: merge from glibc
2018-10-15 regex: depend on libc-config
* .gitignore: Do not ignore m4/_*.m4.
* lib/cdefs.h: New file, copied from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib/libc-config.h, m4/__inline.m4: New files, copied from Gnulib.
* lib/regcomp.c, lib/regex.c, lib/regex_internal.c:
* lib/regex_internal.h, lib/regexec.c:
Copy from glibc via Gnulib.
Diffstat (limited to 'lib/regex_internal.h')
-rw-r--r-- | lib/regex_internal.h | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/lib/regex_internal.h b/lib/regex_internal.h index dd0900b719f..b0e49cd828f 100644 --- a/lib/regex_internal.h +++ b/lib/regex_internal.h @@ -33,23 +33,7 @@ #include <stdbool.h> #include <stdint.h> -/* Properties of integers. Although Gnulib has intprops.h, glibc does - without for now. */ -#ifndef _LIBC -# include "intprops.h" -#else -/* True if the real type T is signed. */ -# define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) - -/* True if adding the nonnegative Idx values A and B would overflow. - If false, set *R to A + B. A, B, and R may be evaluated more than - once, or zero times. Although this is not a full implementation of - Gnulib INT_ADD_WRAPV, it is good enough for glibc regex code. - FIXME: This implementation is a fragile stopgap, and this file would - be simpler and more robust if intprops.h were migrated into glibc. */ -# define INT_ADD_WRAPV(a, b, r) \ - (IDX_MAX - (a) < (b) ? true : (*(r) = (a) + (b), false)) -#endif +#include <intprops.h> #ifdef _LIBC # include <libc-lock.h> @@ -132,8 +116,6 @@ # define RE_ENABLE_I18N #endif -#define BE(expr, val) __builtin_expect (expr, val) - /* Number of ASCII characters. */ #define ASCII_CHARS 0x80 |