Re: regex fix for cygwin



Alexander Varakin wrote:

----- Original Message -----
From: "Andrew V. Samoilov" <kai cmail ru>
To: "Pavel Roskin" <proski gnu org>
Cc: "Alexander Varakin" <avarakin00 hotmail com>; <mc-devel gnome org>
Sent: Wednesday, March 20, 2002 10:11 AM
Subject: Re: regex fix for cygwin

>

Pavel Roskin wrote:


Hi!



I agree that we must use the second approach, i.e.:

1. Use the mc's regex code, i.e. src/regex.c and src/eregex.h.
Maybe we should rename src/regex.c to src/eregex.c just to be

consistent?

I would rather call them both regex.* unless it causes problems (it
should not).

2. Reenable the mc's regex code for all platforms, i.e. remove those

"#if

0"  from  src/regex.c and src/eregex.h


Take the latest regex sources from gnu.  It is Ok if all code is

disabled

when GNU libc is found - libc should provide the same functions,

although

I'm a bit worried if those internal functions can be used - if not, then
the included regex should be used.

Important is that either you disable all or you enable all.  No mix of
libc regex and included regex.



3. Replace all instances of  #include "regex.h"  by  #include "eregex.h"


Or vice versa, but make sure that the included regex.h has preference.


I use Slackware 7.1 with glibc-2.1.3.  After March 18
mc compiles and use its own regex.c and ignores glibc's
ones.  And I am not happy with ~28k overhead and 6 warnings.


--
Regards,
Andrew V. Samoilov.



Hi Andrew,

I don't understand - are you saying that after March 18 you can't compile
mc?


I can't find where did you read this.

I agree that having extra 6 warnings from regex.c is not good. I took this
version of regex.c from the latest stable release of glibc - 2.2.5. Maybe we
should escalate this issue to glibc folks, or just fix this warnings.
I don't think we should worry about ~28k overhead - people are switching
from CDs to DVDs and from 32 bits to 64 bits already , whereas MC can fit on
just few floppies.


But another people use 1 floppy or 1 CD distros and embedded systems.
And people with already installed glibc-2.2.5+ will use regex from 2.2.5. I have not any problems with glibc-2.1.x regex implementation,
but I must compile and use new regex.c.
And now we will need to track and fix any bugs if they will be found in this implementation instead of enjoing all of benefits of system installed software.

As far as I can see configure checks for glibc-2.1 now.
And I suggest to eliminate src/regex.[ch] including/compilation
for glibc-2.1+ based systems.

There no need to change all of files with included eregex.h.
Something like

#ifdef GLIBC_2_1
#include <regex.h>
#else

can be added into our eregex.h.

Regards,
Andrew.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]