diff options
| author | Paul Eggert | 2018-10-15 00:55:37 -0500 |
|---|---|---|
| committer | Paul Eggert | 2018-10-15 00:57:57 -0500 |
| commit | 3d91dc1bb5aeecda786ebe1805c33d14c8bd89fa (patch) | |
| tree | 155498240a837b179319741542aaa78c8a47c9ab /lib/regex_internal.h | |
| parent | 6b8fd34c4ab1aa23b180440cdc8210900896bbf4 (diff) | |
| download | emacs-3d91dc1bb5aeecda786ebe1805c33d14c8bd89fa.tar.gz emacs-3d91dc1bb5aeecda786ebe1805c33d14c8bd89fa.zip | |
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 @@ | |||
| 33 | #include <stdbool.h> | 33 | #include <stdbool.h> |
| 34 | #include <stdint.h> | 34 | #include <stdint.h> |
| 35 | 35 | ||
| 36 | /* Properties of integers. Although Gnulib has intprops.h, glibc does | 36 | #include <intprops.h> |
| 37 | without for now. */ | ||
| 38 | #ifndef _LIBC | ||
| 39 | # include "intprops.h" | ||
| 40 | #else | ||
| 41 | /* True if the real type T is signed. */ | ||
| 42 | # define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) | ||
| 43 | |||
| 44 | /* True if adding the nonnegative Idx values A and B would overflow. | ||
| 45 | If false, set *R to A + B. A, B, and R may be evaluated more than | ||
| 46 | once, or zero times. Although this is not a full implementation of | ||
| 47 | Gnulib INT_ADD_WRAPV, it is good enough for glibc regex code. | ||
| 48 | FIXME: This implementation is a fragile stopgap, and this file would | ||
| 49 | be simpler and more robust if intprops.h were migrated into glibc. */ | ||
| 50 | # define INT_ADD_WRAPV(a, b, r) \ | ||
| 51 | (IDX_MAX - (a) < (b) ? true : (*(r) = (a) + (b), false)) | ||
| 52 | #endif | ||
| 53 | 37 | ||
| 54 | #ifdef _LIBC | 38 | #ifdef _LIBC |
| 55 | # include <libc-lock.h> | 39 | # include <libc-lock.h> |
| @@ -132,8 +116,6 @@ | |||
| 132 | # define RE_ENABLE_I18N | 116 | # define RE_ENABLE_I18N |
| 133 | #endif | 117 | #endif |
| 134 | 118 | ||
| 135 | #define BE(expr, val) __builtin_expect (expr, val) | ||
| 136 | |||
| 137 | /* Number of ASCII characters. */ | 119 | /* Number of ASCII characters. */ |
| 138 | #define ASCII_CHARS 0x80 | 120 | #define ASCII_CHARS 0x80 |
| 139 | 121 | ||