{"thread":{"id":"8029","subject":"[PATCH] wcwidth redeclaration","startedAt":"2007-05-08T04:46:08Z","lastAt":"2007-05-08T17:18:55Z","messageCount":4,"participants":["Amos Waterland","Junio C Hamano","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"41413","messageId":"20070508044608.GA32223@us.ibm.com","threadId":"8029","inReplyTo":null,"subject":"[PATCH] wcwidth redeclaration","fromName":"Amos Waterland","fromEmail":"apw@us.ibm.com","sentAt":"2007-05-08T04:46:08Z","receivedAt":"2007-05-08T04:46:08Z","isPatch":true,"sender":{"key":"apw@debian.org","avatar":null},"body":"Build fails for git 1.5.1.3 on AIX, with the message: \n\nutf8.c:66: error: conflicting types for 'wcwidth'\n/.../lib/gcc/powerpc-ibm-aix5.3.0.0/4.0.3/include/string.h:266: error: previous declaration of 'wcwidth' was here\n\nHere is a patch that fixes it for me.  If there is a different way that\nis preferred, please let me know.\n\nSigned-off-by: Amos Waterland <apw@us.ibm.com>\n\n---\n\n utf8.c |    4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\n--- utf8.c.orig\tTue May  8 00:40:18 2007\n+++ utf8.c\tTue May  8 00:45:00 2007\n@@ -62,7 +62,7 @@\n  * in ISO 10646.\n  */\n \n-static int wcwidth(ucs_char_t ch)\n+static int git_wcwidth(ucs_char_t ch)\n {\n \t/*\n \t * Sorted list of non-overlapping intervals of non-spacing characters,\n@@ -207,7 +207,7 @@\n \t\treturn 0;\n \t}\n \n-\treturn wcwidth(ch);\n+\treturn git_wcwidth(ch);\n }\n \n int is_utf8(const char *text)\n"},{"id":"41415","messageId":"7vmz0f52no.fsf@assigned-by-dhcp.cox.net","threadId":"8029","inReplyTo":"20070508044608.GA32223@us.ibm.com","subject":"Re: [PATCH] wcwidth redeclaration","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-05-08T05:02:03Z","receivedAt":"2007-05-08T05:02:03Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"apw@us.ibm.com (Amos Waterland) writes:\n\n> Build fails for git 1.5.1.3 on AIX, with the message: \n>\n> utf8.c:66: error: conflicting types for 'wcwidth'\n> /.../lib/gcc/powerpc-ibm-aix5.3.0.0/4.0.3/include/string.h:266: error: previous declaration of 'wcwidth' was here\n>\n> Here is a patch that fixes it for me.  If there is a different way that\n> is preferred, please let me know.\n\nIt's static in that file, so renaming our version to our own\nname as you did is perfectly good.\n\nThanks for helping, as not many people seem to be on AIX on this\nlist.\n"},{"id":"41434","messageId":"Pine.LNX.4.64.0705081202080.4167@racer.site","threadId":"8029","inReplyTo":"7vmz0f52no.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] wcwidth redeclaration","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-05-08T10:03:47Z","receivedAt":"2007-05-08T10:03:47Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 7 May 2007, Junio C Hamano wrote:\n\n> apw@us.ibm.com (Amos Waterland) writes:\n> \n> > Build fails for git 1.5.1.3 on AIX, with the message: \n> >\n> > utf8.c:66: error: conflicting types for 'wcwidth'\n> > /.../lib/gcc/powerpc-ibm-aix5.3.0.0/4.0.3/include/string.h:266: error: previous declaration of 'wcwidth' was here\n> >\n> > Here is a patch that fixes it for me.  If there is a different way that\n> > is preferred, please let me know.\n> \n> It's static in that file, so renaming our version to our own\n> name as you did is perfectly good.\n> \n> Thanks for helping, as not many people seem to be on AIX on this\n> list.\n\nThanks indeed. I thought that a static function could shadow a global \nfunction, but probably not with a different signature. Just out of \ncuriosity: what is the signature of wcwidth in your string.h?\n\nCiao,\nDscho\n"},{"id":"41477","messageId":"20070508171855.GA19533@us.ibm.com","threadId":"8029","inReplyTo":"Pine.LNX.4.64.0705081202080.4167@racer.site","subject":"Re: [PATCH] wcwidth redeclaration","fromName":"Amos Waterland","fromEmail":"apw@us.ibm.com","sentAt":"2007-05-08T17:18:55Z","receivedAt":"2007-05-08T17:18:55Z","isPatch":true,"sender":{"key":"apw@debian.org","avatar":null},"body":"On Tue, May 08, 2007 at 12:03:47PM +0200, Johannes Schindelin wrote:\n> Thanks indeed. I thought that a static function could shadow a global \n> function, but probably not with a different signature. Just out of \n> curiosity: what is the signature of wcwidth in your string.h?\n\nThis is it:\n\n        extern int      wcwidth(wchar_t);\n"}]}