git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Sep 3, 2010, 22:21 UTC
Message-ID
<AANLkTikqWap4nUamS=bx6oJ7mhUTEkFWpf7Hf=Mv1Ek=@mail.gmail.com>
In-Reply-To
<OFF09696E1.DC0D98D7-ONC1257793.0070A82E-C1257793.00758522@DCON.DE>
On Fri, Sep 3, 2010 at 21:23,  <karsten.blees@dcon.de> wrote:
Show 35 quoted lines
>
> 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'
>> > 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.

Previous: karsten.blees@dcon.deNext: Junio C Hamano
Message 21 of 23 in “What's cooking in git.git (Aug 2010, #04; Wed, 18)”
  1. Junio C HamanoAug 18, 2010
  2. Jonathan NiederAug 19, 2010
  3. Johannes SixtAug 19, 2010
  4. Ævar Arnfjörð BjarmasonAug 19, 2010
  5. Ævar Arnfjörð BjarmasonAug 19, 2010
  6. jn/update-contrib-example-merge in puJonathan Nieder, Aug 19, 2010
  7. Ævar Arnfjörð BjarmasonAug 19, 2010
  8. Ævar Arnfjörð BjarmasonAug 19, 2010
  9. Aharon RobbinsAug 19, 2010
  10. compat/regex: define out variables only used under RE_ENABLE_I18NÆvar Arnfjörð Bjarmason, Aug 19, 2010
  11. Junio C HamanoAug 19, 2010
  12. Ævar Arnfjörð BjarmasonAug 19, 2010
  13. Junio C HamanoAug 19, 2010
  14. Ævar Arnfjörð BjarmasonAug 19, 2010
  15. compat/regex: get rid of old-style definitionJunio C Hamano, Aug 19, 2010
  16. Ævar Arnfjörð BjarmasonAug 20, 2010
  17. Karsten BleesAug 25, 2010
  18. Fix compat/regex ANSIfication on MinGWJohannes Sixt, Aug 26, 2010
  19. Ævar Arnfjörð BjarmasonAug 26, 2010
  20. karsten.blees@dcon.deSep 3, 2010
  21. Ævar Arnfjörð BjarmasonSep 3, 2010
  22. Junio C HamanoSep 4, 2010
  23. Johannes SixtSep 7, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.