Re: [PATCH] Fix compat/regex ANSIfication on MinGW

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

 



On Fri, Sep 3, 2010 at 21:23,  <karsten.blees@xxxxxxx> wrote:
>
> Johannes Sixt <j.sixt@xxxxxxxxxxxxx> 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'
>> > 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).

Yeah, wasn't the only reason they were ANSI-fied because Junio had
some script in the todo branch that explicitly used -Werror in
conjunction with a warning for k&r declerations/

I've forgotten what all these fixes to compat/regex were about, but if
that's the case 1) looks simplest.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]