diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2018-08-05 18:41:20 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2018-08-05 19:36:09 -0700 |
commit | d904cc83f3036db96107a3976cee1a0112547de6 (patch) | |
tree | 7186eee577f0112462a024368c014819c4055152 /lib/gnulib.mk.in | |
parent | e5652268a993ad9117f7253553c143d60460eb8f (diff) | |
download | emacs-d904cc83f3036db96107a3976cee1a0112547de6.tar.gz |
Use Gnulib regex for lib-src
Emacs regular expressions forked from everyone else long ago.
This makes it official and should allow simplification later.
etags.c now uses the glibc regex API, falling back on a
Gnulib-supplied substitute lib/regex.c if necessary.
Emacs proper now uses its own regular expression module.
Although this patch may look dauntingly large, most of it
was generated automatically by admin/merge-gnulib
and contains an exact copy of the glibc regex source,
and the by-hand changes do not grow the Emacs source code.
* admin/merge-gnulib (GNULIB_MODULES): Add regex.
(AVOIDED_MODULES): Add btowc, langinfo, lock, mbrtowc, mbsinit,
nl_langinfo, wchar, wcrtomb, wctype-h.
* lib-src/Makefile.in (regex-emacs.o): Remove; Gnulib does it now.
(etags_deps, etags_libs): Remove regex-emacs.o.
* lib-src/etags.c: Go back to including regex.h.
(add_regex): Use unsigned char translation array,
since glibc regex requires that.
* lib/Makefile.in (not_emacs_OBJECTS, for_emacs_OBJECTS): New macros.
(libegnu_a_OBJECTS): Use them, to avoid building e-regex.o.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib/regcomp.c, lib/regex.c, lib/regex.h, lib/regex_internal.c:
* lib/regex_internal.h, lib/regexec.c, m4/builtin-expect.m4:
* m4/eealloc.m4, m4/glibc21.m4, m4/mbstate_t.m4, m4/regex.m4:
New files, copied from Gnulib.
* src/regex-emacs.h, src/conf_post.h:
(RE_TRANSLATE_TYPE, RE_TRANSLATE, RE_TRANSLATE_P):
Move from src/conf_post.h to src/regex-emacs.h,
so that they don’t interfere with compiling lib/regex.c.
Diffstat (limited to 'lib/gnulib.mk.in')
-rw-r--r-- | lib/gnulib.mk.in | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in index 7d28dcc62b8..7ad390875b0 100644 --- a/lib/gnulib.mk.in +++ b/lib/gnulib.mk.in @@ -34,13 +34,19 @@ # --no-libtool \ # --macro-prefix=gl \ # --no-vc-files \ +# --avoid=btowc \ # --avoid=close \ # --avoid=dup \ # --avoid=fchdir \ # --avoid=fstat \ +# --avoid=langinfo \ +# --avoid=lock \ # --avoid=malloc-posix \ +# --avoid=mbrtowc \ +# --avoid=mbsinit \ # --avoid=msvc-inval \ # --avoid=msvc-nothrow \ +# --avoid=nl_langinfo \ # --avoid=openat-die \ # --avoid=opendir \ # --avoid=raise \ @@ -56,6 +62,9 @@ # --avoid=unsetenv \ # --avoid=utime \ # --avoid=utime-h \ +# --avoid=wchar \ +# --avoid=wcrtomb \ +# --avoid=wctype-h \ # alloca-opt \ # binary-io \ # byteswap \ @@ -113,6 +122,7 @@ # qcopy-acl \ # readlink \ # readlinkat \ +# regex \ # sig2str \ # socklen \ # stat-time \ @@ -216,6 +226,7 @@ GETOPT_CDEFS_H = @GETOPT_CDEFS_H@ GETOPT_H = @GETOPT_H@ GFILENOTIFY_CFLAGS = @GFILENOTIFY_CFLAGS@ GFILENOTIFY_LIBS = @GFILENOTIFY_LIBS@ +GLIBC21 = @GLIBC21@ GL_COND_LIBTOOL = @GL_COND_LIBTOOL@ GL_GENERATE_ALLOCA_H = @GL_GENERATE_ALLOCA_H@ GL_GENERATE_BYTESWAP_H = @GL_GENERATE_BYTESWAP_H@ @@ -1024,6 +1035,7 @@ gameuser = @gameuser@ gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7 = @gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7@ gl_GNULIB_ENABLED_2049e887c7e5308faad27b3f894bb8c9 = @gl_GNULIB_ENABLED_2049e887c7e5308faad27b3f894bb8c9@ gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b = @gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b@ +gl_GNULIB_ENABLED_37f71b604aa9c54446783d80f42fe547 = @gl_GNULIB_ENABLED_37f71b604aa9c54446783d80f42fe547@ gl_GNULIB_ENABLED_5264294aa0a5557541b53c8c741f7f31 = @gl_GNULIB_ENABLED_5264294aa0a5557541b53c8c741f7f31@ gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c = @gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c@ gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec = @gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec@ @@ -2095,6 +2107,17 @@ EXTRA_libgnu_a_SOURCES += at-func.c readlinkat.c endif ## end gnulib module readlinkat +## begin gnulib module regex +ifeq (,$(OMIT_GNULIB_MODULE_regex)) + + +EXTRA_DIST += regcomp.c regex.c regex.h regex_internal.c regex_internal.h regexec.c + +EXTRA_libgnu_a_SOURCES += regcomp.c regex.c regex_internal.c regexec.c + +endif +## end gnulib module regex + ## begin gnulib module root-uid ifeq (,$(OMIT_GNULIB_MODULE_root-uid)) |