From: Eli Zaretskii <eliz@gnu.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: 32194@debbugs.gnu.org
Subject: bug#32194: [PATCH] Use Gnulib regex for lib-src
Date: Wed, 18 Jul 2018 19:34:51 +0300 [thread overview]
Message-ID: <83va9c33kk.fsf@gnu.org> (raw)
In-Reply-To: <20180717234729.15507-1-eggert@cs.ucla.edu> (message from Paul Eggert on Tue, 17 Jul 2018 16:47:29 -0700)
> From: Paul Eggert <eggert@cs.ucla.edu>
> Date: Tue, 17 Jul 2018 16:47:29 -0700
> Cc: Paul Eggert <eggert@cs.ucla.edu>
> 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.
Thanks.
I have a couple of comments on this.
1. The test for regex being available in the system library seems to
assume the regex routines are in libc, is that right? (I didn't
try to apply the patch, just read it, so apologies if I missed
something.) If so, would it be possible to let the configure
script also check -lregex for those functions? This could be
important on non-glibc systems.
2. Do we really need to rename src/regex.c? We could have 2 regex.c in
separate directories, couldn't we? If possible, I'd prefer not to
rename files, as that makes VCS forensics more complicated.
3. Is it really necessary to pull mbrtowc, locale_charset,
nl_langinfo, and their dependencies? That brings a lot of code,
where src/regex.c needed none, although it did call btowc. We
currently simply expect btowc to "just work"; why can't we do the
same with mbrtowc? The etags needs for non-ASCII stuff are a very
small subset of what we need in Emacs -- in a nutshell, at most it
needs to handle only the current locale. The code we pull from
Gnulib supports much more, and the related test programs are much
more demanding, so platforms will fail the tests where they don't
have to. For example, AFAICT on MS-Windows many tests will fail
because UTF-8 is not supported by the C runtime.
So I'm asking whether we can take a step back and consider
importing just regex.[ch] without all the supporting stuff, and
assume that the libc functions it calls will work well enough for
etags.
P.S. Is it true that this version will no longer support a build with
WIDE_CHAR_SUPPORT undefined, i.e. those which have only the C locale?
next prev parent reply other threads:[~2018-07-18 16:34 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-17 23:47 bug#32194: [PATCH] Use Gnulib regex for lib-src Paul Eggert
2018-07-18 16:34 ` Eli Zaretskii [this message]
2018-07-31 18:21 ` Paul Eggert
2018-08-01 0:29 ` Noam Postavsky
2018-08-01 0:59 ` Paul Eggert
2018-08-01 1:10 ` Noam Postavsky
2018-08-01 1:27 ` Paul Eggert
2018-08-02 0:58 ` Noam Postavsky
2018-08-02 1:49 ` Paul Eggert
2018-08-02 1:55 ` Noam Postavsky
2018-08-02 2:42 ` Eli Zaretskii
2018-08-02 3:19 ` Paul Eggert
2018-08-02 10:28 ` Noam Postavsky
2018-08-02 14:05 ` Eli Zaretskii
2018-08-02 14:41 ` Paul Eggert
2018-08-02 14:55 ` Eli Zaretskii
2018-08-02 15:41 ` Paul Eggert
2018-08-04 15:41 ` Eli Zaretskii
2018-08-04 23:34 ` Paul Eggert
2018-08-05 17:58 ` Eli Zaretskii
2018-08-06 2:40 ` Paul Eggert
2018-08-06 10:59 ` Andy Moreton
2018-08-06 14:52 ` Eli Zaretskii
2018-08-06 15:40 ` Andy Moreton
2018-08-06 14:54 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83va9c33kk.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=32194@debbugs.gnu.org \
--cc=eggert@cs.ucla.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.