git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix compilation on newer NetBSD systems
@ 2006-05-11 17:35 Dennis Stosberg
  2006-05-15  5:31 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Dennis Stosberg @ 2006-05-11 17:35 UTC (permalink / raw)
  To: git

NetBSD >=2.0 has iconv() in libc.  A libiconv is not required and
does not exist.

See: http://netbsd.gw.com/cgi-bin/man-cgi?iconv+3+NetBSD-2.0

Signed-off-by: Dennis Stosberg <dennis@stosberg.net>

---

 Makefile |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

2a73fcf43bfd1f73ec5e1e50396d54b83abae5e1
diff --git a/Makefile b/Makefile
index 37fbe78..26fa4e6 100644
--- a/Makefile
+++ b/Makefile
@@ -285,7 +285,9 @@ ifeq ($(uname_S),OpenBSD)
 	ALL_LDFLAGS += -L/usr/local/lib
 endif
 ifeq ($(uname_S),NetBSD)
-	NEEDS_LIBICONV = YesPlease
+	ifeq ($(shell test `uname -r | sed -e 's/^\([0-9]\).*/\1/'` -lt 2 && echo y),y)
+		NEEDS_LIBICONV = YesPlease
+	endif
 	ALL_CFLAGS += -I/usr/pkg/include
 	ALL_LDFLAGS += -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib
 endif
-- 
1.3.2.gbe65

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix compilation on newer NetBSD systems
  2006-05-11 17:35 [PATCH] Fix compilation on newer NetBSD systems Dennis Stosberg
@ 2006-05-15  5:31 ` Junio C Hamano
  2006-05-15 12:41   ` Dennis Stosberg
  0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2006-05-15  5:31 UTC (permalink / raw)
  To: Dennis Stosberg; +Cc: git

Dennis Stosberg <dennis@stosberg.net> writes:

> NetBSD >=2.0 has iconv() in libc.  A libiconv is not required and
> does not exist.

I do not doubt that, but...

> +	ifeq ($(shell test `uname -r | sed -e 's/^\([0-9]\).*/\1/'` -lt 2 && echo y),y)
> +		NEEDS_LIBICONV = YesPlease
> +	endif

This looks rather ugly.  I do not know if NetBSD has 0.xx
versions, but perhaps something like this?

	ifeq ($(shell expr "$(uname_R)" : '[01]\.'),2)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix compilation on newer NetBSD systems
  2006-05-15  5:31 ` Junio C Hamano
@ 2006-05-15 12:41   ` Dennis Stosberg
  0 siblings, 0 replies; 3+ messages in thread
From: Dennis Stosberg @ 2006-05-15 12:41 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Junio C Hamano wrote:

> Dennis Stosberg <dennis@stosberg.net> writes:
> 
> > +	ifeq ($(shell test `uname -r | sed -e 's/^\([0-9]\).*/\1/'` -lt 2 && echo y),y)
> > +		NEEDS_LIBICONV = YesPlease
> > +	endif
> 
> This looks rather ugly.  I do not know if NetBSD has 0.xx
> versions, but perhaps something like this?
> 
> 	ifeq ($(shell expr "$(uname_R)" : '[01]\.'),2)

Admittedly, that looks a lot nicer.  And it works correctly with
NetBSD's "expr", too.

Regards,
Dennis

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-05-15 12:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-11 17:35 [PATCH] Fix compilation on newer NetBSD systems Dennis Stosberg
2006-05-15  5:31 ` Junio C Hamano
2006-05-15 12:41   ` Dennis Stosberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).