Skip to content

Commit

Permalink
wcwidth redeclaration
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Amos Waterland authored and Junio C Hamano committed May 8, 2007
1 parent 52c8003 commit b51be13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utf8.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ static int bisearch(ucs_char_t ucs, const struct interval *table, int max) {
* in ISO 10646.
*/

static int wcwidth(ucs_char_t ch)
static int git_wcwidth(ucs_char_t ch)
{
/*
* Sorted list of non-overlapping intervals of non-spacing characters,
Expand Down Expand Up @@ -207,7 +207,7 @@ int utf8_width(const char **start)
return 0;
}

return wcwidth(ch);
return git_wcwidth(ch);
}

int is_utf8(const char *text)
Expand Down

0 comments on commit b51be13

Please sign in to comment.