regex fix for cygwin
Alexander Varakin
avarakin00 at hotmail.com
Mon Feb 25 18:59:06 UTC 2002
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?
2. Reenable the mc's regex code for all platforms, i.e. remove those "#if
0" from src/regex.c and src/eregex.h
3. Replace all instances of #include "regex.h" by #include "eregex.h"
4. Unfortunately after this we must test it on all platforms, but I don't
think we will have any problems ...
This way we will be independent of the libc's or os's implementation of
regex.
> Is it sufficient, or your patch from the previous message is still
> required?
Yes, it is required, but instead of replacing "#if 0" by "ifdef __CYGWIN__"
we must just remove them, or maybe replace them by "#if emacs" which is the
original state of this code.
If this is ok with maintainers, I can do all these changes and send a final
patch.
Alex
----- Original Message -----
From: Pavel Roskin <proski at gnu.org>
To: Alexander Varakin <avarakin00 at hotmail.com>
Cc: <mc-devel at gnome.org>
Sent: Monday, February 25, 2002 1:01 AM
Subject: Re: regex fix for cygwin
> Hi, Alexander!
>
> Thank you for fixing the problem on Cygwin. It is very important to fix
> this problem.
>
> My understanding is that MC uses some internal GNU regex functions.
> That's why it uses regex stripped of most other stuff that is supposed to
> be provided by libc. But there is no guarantee that both regex
> implementations don't conflict.
>
> I see two approaches how to fix the problem:
>
> 1) Rename all non-standard regex functions and global variables to avoid
> conflicts with regex from libc.
>
> 2) Always use complete GNU regex, either from libc if it's there or from
> the files included into the distribution.
>
> I prefer the later. I believe that your patch goes in that direction.
>
> > I found another bug related to regex - there is inconsistent usage of
> > regex.h and eregex.h in c files, and since they are very different in
> > cygwin, we have all sort of weird problems.
> > I just grepped all c files and replaced #include "regex.h" by #include
> > "eregex.h", this fixed my problems.
>
>
> --
> Regards,
> Pavel Roskin
>
> _______________________________________________
> Mc-devel mailing list
> Mc-devel at gnome.org
> http://mail.gnome.org/mailman/listinfo/mc-devel
>
More information about the mc-devel
mailing list