1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-05 00:37:55 +01:00
git/compat/regex
Johannes Sixt ce518bbd6c Fix compat/regex ANSIfication on MinGW
compat/regexec.c had a weird combination of function declaration in ANSI
style and function definition in K&R style, for example:

 static unsigned
 re_copy_regs (struct re_registers *regs, regmatch_t *pmatch,
      int nregs, int regs_allocated) internal_function;

 static unsigned
 re_copy_regs (regs, pmatch, nregs, regs_allocated)
     struct re_registers *regs;
     regmatch_t *pmatch;
     int nregs, regs_allocated;
 { ... }

with this #define:

 #ifndef _LIBC
 # ifdef __i386__
 #  define internal_function   __attribute ((regparm (3), stdcall))
 # else
 #  define internal_function
 # endif
 #endif

The original version as shown above was fine, but with the ANSIfied
function definition and in the case where internal_function is not empty,
gcc identifies the declaration and definition as different and bails out.

Adding internal_function to the definition doesn't help (it results in
a syntax error); hence, remove it from the subset of declarations that gcc
flags as erroneous.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-26 09:25:53 -07:00
..
regcomp.c compat/regex: get rid of old-style definition 2010-08-19 15:46:06 -07:00
regex.c compat/regex: use the regex engine from gawk for compat 2010-08-18 14:06:48 -07:00
regex.h compat/regex: get the gawk regex engine to compile within git 2010-08-18 14:06:54 -07:00
regex_internal.c compat/regex: define out variables only used under RE_ENABLE_I18N 2010-08-19 13:00:44 -07:00
regex_internal.h compat/regex: use the regex engine from gawk for compat 2010-08-18 14:06:48 -07:00
regexec.c Fix compat/regex ANSIfication on MinGW 2010-08-26 09:25:53 -07:00