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. This patch was originally applied as v1.6.5-rc2~23 but needs to be re-applied since compat/regex was overwritten by Ævar Arnfjörð Bjarmason with the gawk regex engine. 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> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
a997bf423d
commit
de831726de
@ -546,11 +546,8 @@ weak_alias (__regcomp, regcomp)
|
|||||||
from either regcomp or regexec. We don't use PREG here. */
|
from either regcomp or regexec. We don't use PREG here. */
|
||||||
|
|
||||||
size_t
|
size_t
|
||||||
regerror (errcode, preg, errbuf, errbuf_size)
|
regerror(int errcode, const regex_t *__restrict preg,
|
||||||
int errcode;
|
char *__restrict errbuf, size_t errbuf_size)
|
||||||
const regex_t *__restrict preg;
|
|
||||||
char *__restrict errbuf;
|
|
||||||
size_t errbuf_size;
|
|
||||||
{
|
{
|
||||||
const char *msg;
|
const char *msg;
|
||||||
size_t msg_size;
|
size_t msg_size;
|
||||||
|
Loading…
Reference in New Issue
Block a user