{"thread":{"id":"4120","subject":"[PATCH] Fix compilation on newer NetBSD systems","startedAt":"2006-05-11T17:35:31Z","lastAt":"2006-05-15T12:41:16Z","messageCount":3,"participants":["Dennis Stosberg","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"19853","messageId":"20060511173531.G18d4553c@leonov.stosberg.net","threadId":"4120","inReplyTo":null,"subject":"[PATCH] Fix compilation on newer NetBSD systems","fromName":"Dennis Stosberg","fromEmail":"dennis@stosberg.net","sentAt":"2006-05-11T17:35:31Z","receivedAt":"2006-05-11T17:35:31Z","isPatch":true,"sender":{"key":"dennis@stosberg.net","avatar":null},"body":"NetBSD >=2.0 has iconv() in libc.  A libiconv is not required and\ndoes not exist.\n\nSee: http://netbsd.gw.com/cgi-bin/man-cgi?iconv+3+NetBSD-2.0\n\nSigned-off-by: Dennis Stosberg <dennis@stosberg.net>\n\n---\n\n Makefile |    4 +++-\n 1 files changed, 3 insertions(+), 1 deletions(-)\n\n2a73fcf43bfd1f73ec5e1e50396d54b83abae5e1\ndiff --git a/Makefile b/Makefile\nindex 37fbe78..26fa4e6 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -285,7 +285,9 @@ ifeq ($(uname_S),OpenBSD)\n \tALL_LDFLAGS += -L/usr/local/lib\n endif\n ifeq ($(uname_S),NetBSD)\n-\tNEEDS_LIBICONV = YesPlease\n+\tifeq ($(shell test `uname -r | sed -e 's/^\\([0-9]\\).*/\\1/'` -lt 2 && echo y),y)\n+\t\tNEEDS_LIBICONV = YesPlease\n+\tendif\n \tALL_CFLAGS += -I/usr/pkg/include\n \tALL_LDFLAGS += -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib\n endif\n-- \n1.3.2.gbe65\n"},{"id":"19964","messageId":"7vu07rx3a9.fsf@assigned-by-dhcp.cox.net","threadId":"4120","inReplyTo":"20060511173531.G18d4553c@leonov.stosberg.net","subject":"Re: [PATCH] Fix compilation on newer NetBSD systems","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-05-15T05:31:10Z","receivedAt":"2006-05-15T05:31:10Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Dennis Stosberg <dennis@stosberg.net> writes:\n\n> NetBSD >=2.0 has iconv() in libc.  A libiconv is not required and\n> does not exist.\n\nI do not doubt that, but...\n\n> +\tifeq ($(shell test `uname -r | sed -e 's/^\\([0-9]\\).*/\\1/'` -lt 2 && echo y),y)\n> +\t\tNEEDS_LIBICONV = YesPlease\n> +\tendif\n\nThis looks rather ugly.  I do not know if NetBSD has 0.xx\nversions, but perhaps something like this?\n\n\tifeq ($(shell expr \"$(uname_R)\" : '[01]\\.'),2)\n"},{"id":"19993","messageId":"20060515124115.G78828137@leonov.stosberg.net","threadId":"4120","inReplyTo":"7vu07rx3a9.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Fix compilation on newer NetBSD systems","fromName":"Dennis Stosberg","fromEmail":"dennis@stosberg.net","sentAt":"2006-05-15T12:41:16Z","receivedAt":"2006-05-15T12:41:16Z","isPatch":true,"sender":{"key":"dennis@stosberg.net","avatar":null},"body":"Junio C Hamano wrote:\n\n> Dennis Stosberg <dennis@stosberg.net> writes:\n> \n> > +\tifeq ($(shell test `uname -r | sed -e 's/^\\([0-9]\\).*/\\1/'` -lt 2 && echo y),y)\n> > +\t\tNEEDS_LIBICONV = YesPlease\n> > +\tendif\n> \n> This looks rather ugly.  I do not know if NetBSD has 0.xx\n> versions, but perhaps something like this?\n> \n> \tifeq ($(shell expr \"$(uname_R)\" : '[01]\\.'),2)\n\nAdmittedly, that looks a lot nicer.  And it works correctly with\nNetBSD's \"expr\", too.\n\nRegards,\nDennis\n"}]}