From: Junio C Hamano Date: Thu, 08 Sep 2005 02:06:38 GMT Subject: Re: patches Message-ID: <7vr7c0xqhd.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <1125962642.15293.20.camel@divert> Patrick Mauritz writes: I would have appreciated if you said "Solaris portability patch" or somesuch on the subject line. > diff -ur git-core-0.99.4.orig/convert-cache.c git-core-0.99.4/convert-cache.c > --- git-core-0.99.5.orig/convert-cache.c Wed Aug 17 09:55:00 2005 > +++ git-core-0.99.5/convert-cache.c Wed Aug 17 09:58:48 2005 > @@ -1,4 +1,5 @@ > #define _XOPEN_SOURCE /* glibc2 needs this */ > +#define __EXTENSIONS__ /* solaris needs this */ > #include > #include > #include "cache.h" I'll take this; thanks. > diff -ur git-core-0.99.4.orig/ident.c git-core-0.99.4/ident.c > --- git-core-0.99.5.orig/ident.c Wed Aug 17 09:55:00 2005 > +++ git-core-0.99.5/ident.c Wed Aug 17 09:57:54 2005 > @@ -36,12 +36,13 @@ > memcpy(real_email, pw->pw_name, len); > real_email[len++] = '@'; > gethostname(real_email + len, sizeof(real_email) - len); > +#ifndef __sun > if (!strchr(real_email+len, '.')) { > len = strlen(real_email); > real_email[len++] = '.'; > getdomainname(real_email+len, sizeof(real_email)-len); > } > - > +#endif > /* And set the default date */ > datestamp(real_date, sizeof(real_date)); > return 0; I'll do this slightly differently, because I do not want to have "ifdef __platform_name" in the code when possible. > --- git-core-0.99.5/Makefile~ Thu Aug 25 03:54:24 2005 > +++ git-core-0.99.5/Makefile Tue Sep 6 01:18:32 2005 > @@ -146,7 +146,11 @@ > endif > endif > endif > +ifeq ($(shell uname -s),SunOS) > + LIBS += -lsocket > +endif > > + > DEFINES += '-DSHA1_HEADER=$(SHA1_HEADER)' I'll do this in the way similar to how I did -liconv for Darwin. > +ifdef CURLDIR > +git-http-pull: LIBS += -lcurl -L$(CURLDIR)/lib -R$(CURLDIR)/lib > +else > git-http-pull: LIBS += -lcurl > +endif Curious. Doesn't the order of -l and -L/-R matter these days? I am sympathetic to the reason why you need this, but if we go this route we should also do openssl as well. I'd drop this part for now.