From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: regex.c simplification Date: Sat, 21 Jul 2018 09:43:19 +0300 Message-ID: <83h8ktytq0.fsf@gnu.org> References: <83fu1mzq09.fsf@gnu.org> <30e30c9d-1e0d-ea7d-2ef5-ae8622875449@cs.ucla.edu> <7cc7d274-ee6a-ab14-c78a-4fdba963578b@cs.ucla.edu> <83va9a1jfz.fsf@gnu.org> <51d08f86-fe0c-4eb1-8b0b-7dadb0257c02@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1532155288 31865 195.159.176.226 (21 Jul 2018 06:41:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 21 Jul 2018 06:41:28 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 21 08:41:23 2018 Return-path: Envelope-to: ged-emacs-devel@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 1fglZz-0008Bk-RM for ged-emacs-devel@m.gmane.org; Sat, 21 Jul 2018 08:41:23 +0200 Original-Received: from localhost ([::1]:50907 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fglc4-0007GT-Um for ged-emacs-devel@m.gmane.org; Sat, 21 Jul 2018 02:43:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41792) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fglbu-0007GE-Rc for emacs-devel@gnu.org; Sat, 21 Jul 2018 02:43:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fglbq-0001ui-6l for emacs-devel@gnu.org; Sat, 21 Jul 2018 02:43:22 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54467) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fglbq-0001ua-31; Sat, 21 Jul 2018 02:43:18 -0400 Original-Received: from [176.228.60.248] (port=2934 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fglbp-0002Ro-Fq; Sat, 21 Jul 2018 02:43:17 -0400 In-reply-to: <51d08f86-fe0c-4eb1-8b0b-7dadb0257c02@cs.ucla.edu> (message from Paul Eggert on Fri, 20 Jul 2018 14:49:15 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:227602 Archived-At: > Cc: emacs-devel@gnu.org > From: Paul Eggert > Date: Fri, 20 Jul 2018 14:49:15 -0700 > > On 07/19/2018 11:59 PM, Eli Zaretskii wrote: > >> I was thinking of just always using the libc regexp code (whether it's > >> GNU libc or something else). > > Yes, that'd be a possibility. Do we have any supported platform that > > does NOT have its own regexp code, whether in libc or as a separate > > library? > > > Every POSIX-conforming platform has regexp code somewhere, using the > POSIX API. However, I can see some trouble using that code: > > * Some of libc regex implementations have been reasonably buggy. Most > GNU apps don't use these implementations any more so I'm not sure what > their status is. > > * We may need to use an option like -lregex to get the system library > implementation, and that would have to be configured. > > * Perhaps 'etags' users are using GNU extensions in their regular > expressions, and if we switch to the libc API their usage will break. We could recommend such users to install GNU regexp, which AFAIK exposes the Posix API as well. > * You're the expert, but as far as I know MS-Windows does not support > the POSIX API so presumably we'd have to provide a substitute anyway, > for MS-Windows. GNU regexp is available as a separate library on Windows, I used it in several ports of GNU and Unix packages. > * etags uses the GNU API so it would have to be changed to use the POSIX > API. Right. There's still the alternative which I asked about a couple of days ago: use the Gnulib regexp without the additional code pulled in by mbrtowc, I hope that's a viable option.