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

Re: [PATCH] This patch is to allow 12 different OS's to compile and run git.

From
Brandon Casey <casey@nrlssc.navy.mil>
Date
Jun 6, 2008, 22:16 UTC
Message-ID
<zT6Kk5prw6MLDU9U02XgwHxqkW1_ihaulXp9SEp2upryFMd7jIWyVw@cipher.nrlssc.navy.mil>
In-Reply-To
<Pine.LNX.4.64.0806061359080.18454@xenau.zenez.com>
Boyd Lynn Gerber wrote:
Show 5 quoted lines
> On Fri, 6 Jun 2008, Jeremy Maitin-Shepard wrote:
>> This change will result in the allocated memory being leaked, which is
>> probably not correct.  Perhaps change it to alloca instead.
> 
> OK below is a new version with the suggestions.
Comments below basically amount to:
  1) Use tab when indenting.
  2) Remove commented-out dead code
  3) Don't put space between function name and open parenthesis.
Show 10 quoted lines
> diff --git a/Makefile b/Makefile
> index cce5a6e..6df008a 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -165,6 +165,20 @@ uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not')
>  # CFLAGS and LDFLAGS are for the users to override from the command line.
>  
>  CFLAGS = -g -O2 -Wall
> +ifeq ($(uname_S),SCO_SV)
> +  ifeq ($(uname_R),3.2)
Indent with a tab not 2 spaces.
> +#    CFLAGS = -g -O2
These commented out assignments should not be included in the final patch.
> +    CFLAGS = -g
Use tab.
> +  endif
> +  ifeq ($(uname_R),5)
> +    CFLAGS = -g -O2 -Wall
> +#    CFLAGS = -g -O2
ditto on comment and tab.
Show 5 quoted lines
> +  endif
> +endif
> +ifeq ($(uname_S),UnixWare)
> +    CFLAGS = -g -O2 -Wall
> +#    CFLAGS = -g -O2
ditto
Show 11 quoted lines
> +endif
>  LDFLAGS =
>  ALL_CFLAGS = $(CFLAGS)
>  ALL_LDFLAGS = $(LDFLAGS)
> @@ -207,7 +221,8 @@ GITWEB_SITE_FOOTER =
>  
>  export prefix bindir gitexecdir sharedir template_dir htmldir sysconfdir
>  
> -CC = gcc
> +#CC = gcc
> +CC = "cc"

This one is up to Junio. Perhaps he has some reason for specifically configuring gcc. In which case this CC selection maybe should go in the UnixWare section.

Show 10 quoted lines
>  AR = ar
>  RM = rm -f
>  TAR = tar
> @@ -564,6 +579,42 @@ endif
>  ifeq ($(uname_S),GNU/kFreeBSD)
>  	NO_STRLCPY = YesPlease
>  endif
> +ifeq ($(uname_S),UnixWare)
> +	NEEDS_SOCKET = YesPlease
> +#	NEEDS_NSL = YesPlease
Commented out. Why is it in the patch?
Show 6 quoted lines
> +	NEEDS_SSL_WITH_CRYPTO = YesPlease
> +	NEEDS_LIBICONV = YesPlease
> +	SHELL_PATH = /usr/local/bin/bash
> +	NO_IPV6 = YesPlease
> +	NO_HSTRERROR = YesPlease
> +#	BASIC_CFLAGS +=  -E -H
ummhmm.
Show 11 quoted lines
> +	BASIC_CFLAGS +=  -Kalloca -Kthread
> +	BASIC_CFLAGS += -I/usr/local/include
> +	BASIC_LDFLAGS += -L/usr/local/lib
> +	INSTALL = ginstall
> +	TAR = gtar
> +	NO_STRCASESTR = YesPlease
> +	NO_MEMMEM = YesPlease
> +endif
> +ifeq ($(uname_S),SCO_SV)
> +	NEEDS_SOCKET = YesPlease
> +#	NEEDS_NSL = YesPlease
Show 6 quoted lines
> +	NEEDS_SSL_WITH_CRYPTO = YesPlease
> +	NEEDS_LIBICONV = YesPlease
> +	SHELL_PATH = /usr/bin/bash
> +	NO_IPV6 = YesPlease
> +#	NO_HSTRERROR = YesPlease
> +#	BASIC_CFLAGS +=  -E -H
> +      ifeq ($(uname_R),5)
tabs
> +	BASIC_CFLAGS +=  -Kalloca -Kthread
> +      endif
tab.
> +#	BASIC_CFLAGS += -I/usr/local/include
> +#	BASIC_LDFLAGS += -L/usr/local/lib
Show 32 quoted lines
> +	NO_STRCASESTR = YesPlease
> +	NO_MEMMEM = YesPlease
> +	INSTALL = ginstall
> +	TAR = gtar
> +endif
>  ifeq ($(uname_S),Darwin)
>  	NEEDS_SSL_WITH_CRYPTO = YesPlease
>  	NEEDS_LIBICONV = YesPlease
> diff --git a/git-compat-util.h b/git-compat-util.h
> index 01c4045..f27aea3 100644
> --- a/git-compat-util.h
> +++ b/git-compat-util.h
> @@ -39,7 +39,8 @@
>  /* Approximation of the length of the decimal representation of this type. */
>  #define decimal_length(x)	((int)(sizeof(x) * 2.56 + 0.5) + 1)
>  
> -#if !defined(__APPLE__) && !defined(__FreeBSD__)
> +#if !defined(__APPLE__) && !defined(__FreeBSD__)  && !defined(__USLC__) && !de
> +fined(_M_UNIX)
>  #define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */
>  #define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */
>  #endif
> diff --git a/progress.c b/progress.c
> index d19f80c..295c4e3 100644
> --- a/progress.c
> +++ b/progress.c
> @@ -241,7 +241,8 @@ void stop_progress_msg(struct progress **p_progress, const char *msg)
>  	*p_progress = NULL;
>  	if (progress->last_value != -1) {
>  		/* Force the last update */
> -		char buf[strlen(msg) + 5];
> +		/* char buf[strlen(msg) + 5]; */
       This should just be deleted.
> +		char *buf = alloca (strlen(msg) + 5 );
                                  ^
       we don't put spaces between function name and open parens.
-brandon
Previous: Boyd Lynn GerberNext: Junio C Hamano
Message 7 of 24 in “This patch is to allow 12 different OS's to compile and run git.”
  1. This patch is to allow 12 different OS's to compile and run git.Boyd Lynn Gerber, Jun 6, 2008
  2. Jeremy Maitin-ShepardJun 6, 2008
  3. Boyd Lynn GerberJun 6, 2008
  4. Stephan BeyerJun 6, 2008
  5. Linus TorvaldsJun 6, 2008
  6. Boyd Lynn GerberJun 6, 2008
  7. Brandon CaseyJun 6, 2008
  8. Junio C HamanoJun 6, 2008
  9. Boyd Lynn GerberJun 6, 2008
  10. Boyd Lynn GerberJun 7, 2008
  11. Daniel BarkalowJun 7, 2008
  12. Boyd Lynn GerberJun 7, 2008
  13. Junio C HamanoJun 7, 2008
  14. Boyd Lynn GerberJun 7, 2008
  15. Daniel BarkalowJun 7, 2008
  16. Boyd Lynn GerberJun 8, 2008
  17. Junio C HamanoJun 8, 2008
  18. progress.c: avoid use of dynamic-sized arrayBoyd Lynn Gerber, Jun 8, 2008
  19. Port to 12 other Platforms.Boyd Lynn Gerber, Jun 8, 2008
  20. Boyd Lynn GerberJun 8, 2008
  21. Boyd Lynn GerberJun 8, 2008
  22. Thomas HarningJun 6, 2008
  23. Daniel BarkalowJun 6, 2008
  24. Boyd Lynn GerberJun 6, 2008

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.