Re: [PATCH] Fix compat/regex ANSIfication on MinGW
- From
karsten.blees@dcon.de <karsten.blees@dcon.de>
- Date
- Sep 3, 2010, 21:23 UTC
- Message-ID
- <OFF09696E1.DC0D98D7-ONC1257793.0070A82E-C1257793.00758522@DCON.DE>
- In-Reply-To
- <4C761EA2.2060904@viscovery.net>
Johannes Sixt <j.sixt@viscovery.net> wrote on 26.08.2010 09:58:26:
> Am 8/25/2010 20:24, schrieb Karsten Blees: > > this doesn't compile if internal_function is #defined non-empty (e.g.
on
> > mingw/msysgit). The old-style definitions work. > > > > In file included from compat/regex/regex.c:78: > > compat/regex/regexec.c:357: error: conflicting types for
're_search_2_stub'
Show 6 quoted lines
> > compat/regex/regexec.c:44: note: previous declaration of > 're_search_2_stub' was > > here > > Here's a fix. >
Sorry, I realize I should've cross-posted this to the msysgit list (adding cc).
In the meantime, Dscho has fixed the function definitions in the msysgit fork like so: static int internal_function re_search_2_stub (struct re_pattern_buffer *bufp,...
Your patch removes internal_function from the declaration, so now it doesn't compile again...
There're basically three solutions: 1. revert the whole ANSIfication stuff (stay in sync with glibc upstream) 2. add internal_function before function definition (like everywhere else in regexec.c - efe33c61 in git://repo.or.cz/git/mingw/4msysgit.git) 3. remove internal_function from declaration (ce518bbd)
As I don't think you plan active development on this (or push changes upstream?), I'd opt for (1).
Bye, Karsten