From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#32194: [PATCH] Use Gnulib regex for lib-src Date: Wed, 18 Jul 2018 19:34:51 +0300 Message-ID: <83va9c33kk.fsf@gnu.org> References: <20180717234729.15507-1-eggert@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1531931645 9136 195.159.176.226 (18 Jul 2018 16:34:05 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 18 Jul 2018 16:34:05 +0000 (UTC) Cc: 32194@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 18 18:34:01 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ffpOq-0002FO-UM for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 Jul 2018 18:34:01 +0200 Original-Received: from localhost ([::1]:37587 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffpQx-00066C-WC for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 Jul 2018 12:36:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38030) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffpQr-000658-TX for bug-gnu-emacs@gnu.org; Wed, 18 Jul 2018 12:36:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ffpQo-0000vw-P5 for bug-gnu-emacs@gnu.org; Wed, 18 Jul 2018 12:36:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42103) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ffpQo-0000vr-L0 for bug-gnu-emacs@gnu.org; Wed, 18 Jul 2018 12:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ffpQo-0003M4-9c for bug-gnu-emacs@gnu.org; Wed, 18 Jul 2018 12:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Jul 2018 16:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32194 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 32194-submit@debbugs.gnu.org id=B32194.153193170712827 (code B ref 32194); Wed, 18 Jul 2018 16:36:02 +0000 Original-Received: (at 32194) by debbugs.gnu.org; 18 Jul 2018 16:35:07 +0000 Original-Received: from localhost ([127.0.0.1]:47121 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ffpPt-0003Km-FI for submit@debbugs.gnu.org; Wed, 18 Jul 2018 12:35:05 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46825) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ffpPr-0003KA-SR for 32194@debbugs.gnu.org; Wed, 18 Jul 2018 12:35:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ffpPj-0008WE-JP for 32194@debbugs.gnu.org; Wed, 18 Jul 2018 12:34:58 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34365) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffpPj-0008W6-FH; Wed, 18 Jul 2018 12:34:55 -0400 Original-Received: from [176.228.60.248] (port=3694 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ffpPi-00083d-TQ; Wed, 18 Jul 2018 12:34:55 -0400 In-reply-to: <20180717234729.15507-1-eggert@cs.ucla.edu> (message from Paul Eggert on Tue, 17 Jul 2018 16:47:29 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:148641 Archived-At: > From: Paul Eggert > Date: Tue, 17 Jul 2018 16:47:29 -0700 > Cc: Paul Eggert > 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?