[PATCH v2 05/14] Change regerror() definition from K&R style to ANSI C (C89)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Marius Storm-Olsen
Date: Friday, August 21, 2009 - 1:10 pm

From: Frank Li <lznuaa@gmail.com>

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>
---
 Frank, like this one better?

 compat/regex/regex.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/compat/regex/regex.c b/compat/regex/regex.c
index 5ea0075..67d5c37 100644
--- a/compat/regex/regex.c
+++ b/compat/regex/regex.c
@@ -4852,11 +4852,8 @@ regexec (preg, string, nmatch, pmatch, eflags)
    from either regcomp or regexec.   We don't use PREG here.  */
 
 size_t
-regerror (errcode, preg, errbuf, errbuf_size)
-    int errcode;
-    const regex_t *preg;
-    char *errbuf;
-    size_t errbuf_size;
+regerror(int errcode, const regex_t *preg,
+	 char *errbuf, size_t errbuf_size)
 {
   const char *msg;
   size_t msg_size;
-- 
1.6.3.msysgit.0.18.gef407

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 04/14] Add define guards to compat/win32.h, Marius Storm-Olsen, (Fri Aug 21, 6:30 am)
[PATCH 06/14] mingw.c: Use the O_BINARY flag to open files, Marius Storm-Olsen, (Fri Aug 21, 6:30 am)
[PATCH 07/14] Fix __stdcall/WINAPI placement and function ..., Marius Storm-Olsen, (Fri Aug 21, 6:30 am)
[PATCH 08/14] Test for WIN32 instead of __MINGW32_, Marius Storm-Olsen, (Fri Aug 21, 6:30 am)
[PATCH 09/14] Avoid including windows.h in winansi.c for M ..., Marius Storm-Olsen, (Fri Aug 21, 6:30 am)
[PATCH 10/14] Add empty header files for MSVC port, Marius Storm-Olsen, (Fri Aug 21, 6:30 am)
[PATCH 11/14] Add MinGW header files to build git with MSVC, Marius Storm-Olsen, (Fri Aug 21, 6:30 am)
[PATCH 12/14] Add platform files for MSVC porting, Marius Storm-Olsen, (Fri Aug 21, 6:30 am)
[PATCH 13/14] Add MSVC project files, Marius Storm-Olsen, (Fri Aug 21, 6:30 am)
[PATCH 14/14] Add README and gitignore file for MSVC build, Marius Storm-Olsen, (Fri Aug 21, 6:30 am)
Re: [msysGit] [PATCH 07/14] Fix __stdcall/WINAPI placement ..., Marius Storm-Olsen, (Fri Aug 21, 12:42 pm)
[PATCH v2 05/14] Change regerror() definition from K&R sty ..., Marius Storm-Olsen, (Fri Aug 21, 1:10 pm)
Re: [PATCH 09/14] Avoid including windows.h in winansi.c f ..., Marius Storm-Olsen, (Sat Aug 22, 4:40 am)
Re: [PATCH 14/14] Add README and gitignore file for MSVC build, Marius Storm-Olsen, (Sun Aug 23, 11:59 am)
Re: [msysGit] Re: [PATCH 14/14] Add README and gitignore f ..., Marius Storm-Olsen, (Mon Aug 24, 12:03 am)
Re: [PATCH 08/14] Test for WIN32 instead of __MINGW32_, Paolo Bonzini, (Fri Aug 28, 1:15 am)