@matheusbsbs / matheus-bagliano / commits / 3f83bf3784
Fork 0

Change regerror() declaration from K&R style to ANSI C (C89)

The MSVC headers typedef errcode as int, and thus confused the compiler in the K&R style definition. ANSI style deconfuses it. Signed-off-by: Frank Li <lznuaa@gmail.com> Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com> Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Frank Li committed Sep 16, 2009 at 10:20 UTC 3f83bf3784d49e162532212230a271a8cc8edbf0
1 file changed +2 -5
compat/regex/regex.c
+2 -5
@@ -4852,11 +4852,8 @@ regexec (preg, string, nmatch, pmatch, eflags)
4852 from either regcomp or regexec. We don't use PREG here. */
4853
4854 size_t
4855 -regerror (errcode, preg, errbuf, errbuf_size)
4856 - int errcode;
4857 - const regex_t *preg;
4858 - char *errbuf;
4859 - size_t errbuf_size;
4855 +regerror(int errcode, const regex_t *preg,
4856 + char *errbuf, size_t errbuf_size)
4857 {
4858 const char *msg;
4859 size_t msg_size;