Skip to content

Commit b51be13

Browse files
Amos WaterlandJunio C Hamano
authored andcommitted
wcwidth redeclaration
Build fails for git 1.5.1.3 on AIX, with the message: utf8.c:66: error: conflicting types for 'wcwidth' /.../lib/gcc/powerpc-ibm-aix5.3.0.0/4.0.3/include/string.h:266: error: previous declaration of 'wcwidth' was here Fix this by renaming our static variant to our own name. Signed-off-by: Amos Waterland <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 52c8003 commit b51be13

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

utf8.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static int bisearch(ucs_char_t ucs, const struct interval *table, int max) {
6262
* in ISO 10646.
6363
*/
6464

65-
static int wcwidth(ucs_char_t ch)
65+
static int git_wcwidth(ucs_char_t ch)
6666
{
6767
/*
6868
* Sorted list of non-overlapping intervals of non-spacing characters,
@@ -207,7 +207,7 @@ int utf8_width(const char **start)
207207
return 0;
208208
}
209209

210-
return wcwidth(ch);
210+
return git_wcwidth(ch);
211211
}
212212

213213
int is_utf8(const char *text)

0 commit comments

Comments
 (0)