git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: patches

From
Junio C Hamano <junkio@cox.net>
Date
Sep 8, 2005, 02:06 UTC
Message-ID
<7vr7c0xqhd.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<1125962642.15293.20.camel@divert>
Patrick Mauritz <oxygene@studentenbude.ath.cx> writes:

I would have appreciated if you said "Solaris portability patch" or somesuch on the subject line.

Show 9 quoted lines
> 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 <time.h>
>  #include <ctype.h>
>  #include "cache.h"
I'll take this; thanks.
Show 18 quoted lines
> 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.

Show 12 quoted lines
> --- 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.
Show 5 quoted lines
> +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.

Previous: Patrick MauritzNext: Patrick Mauritz
Message 2 of 5 in “patches”
  1. Patrick MauritzSep 5, 2005
  2. Junio C HamanoSep 8, 2005
  3. Patrick MauritzSep 8, 2005
  4. Jason RiedySep 9, 2005
  5. getdomainname should be usable on SunOS with -lnslJunio C Hamano, Sep 12, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.