On Fri, 6 Jun 2008, Daniel Barkalow wrote: > On Fri, 6 Jun 2008, Boyd Lynn Gerber wrote: > > > From db0574a7f89bb90b6ce02cd44053f8cec2c454cc > > > > This patch has patches to > > > > Makefile > > git-compat-util.h > > progress.c > > > > This patch allows some older OS's, SCO OpenServer 5.0.X, SCO UnixWare 7.1.4, > > and OpenServer 6.0.X to build and run git. Applied suggestions from list. > > > > Developer's Certificate of Origin 1.1 > > > > By making a contribution to this project, I certify that: > > > > (a) The contribution was created in whole or in part by me and I > > have the right to submit it under the open source license > > indicated in the file; or > > > > (b) The contribution is based upon previous work that, to the best > > of my knowledge, is covered under an appropriate open source > > license and I have the right under that license to submit that > > work with modifications, whether created in whole or in part > > by me, under the same open source license (unless I am > > permitted to submit under a different license), as indicated > > in the file; or > > > > (c) The contribution was provided directly to me by some other > > person who certified (a), (b) or (c) and I have not modified > > it. > > > > (d) I understand and agree that this project and the contribution > > are public and that a record of the contribution (including all > > personal information I submit with it, including my sign-off) is > > maintained indefinitely and may be redistributed consistent with > > this project or the open source license(s) involved. > > > > Signed-off-by: Boyd Lynn Gerber <gerberb@xxxxxxxxx> > > > > -- > > Boyd Gerber <gerberb@xxxxxxxxx> > > ZENEZ 1042 East Fort Union #135, Midvale Utah 84047 OK made changes you recommended. diff --git a/Makefile b/Makefile index cce5a6e..000bf1f 100644 --- a/Makefile +++ b/Makefile @@ -165,6 +165,11 @@ 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) + CFLAGS = -O2 + endif +endif LDFLAGS = ALL_CFLAGS = $(CFLAGS) ALL_LDFLAGS = $(LDFLAGS) @@ -564,6 +569,42 @@ endif ifeq ($(uname_S),GNU/kFreeBSD) NO_STRLCPY = YesPlease endif +ifeq ($(uname_S),UnixWare) + CC=cc + NEEDS_SOCKET = YesPlease + NEEDS_NSL = YesPlease + NEEDS_SSL_WITH_CRYPTO = YesPlease + NEEDS_LIBICONV = YesPlease + SHELL_PATH = /usr/local/bin/bash + NO_IPV6 = YesPlease + NO_HSTRERROR = YesPlease + 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 + NEEDS_SSL_WITH_CRYPTO = YesPlease + NEEDS_LIBICONV = YesPlease + SHELL_PATH = /usr/bin/bash + NO_IPV6 = YesPlease + NO_HSTRERROR = YesPlease + ifeq ($(uname_R),5) + CC=cc + BASIC_CFLAGS += -Kalloca -Kthread + endif + BASIC_CFLAGS += -I/usr/local/include + BASIC_LDFLAGS += -L/usr/local/lib + 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..b3cd7b3 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -39,7 +39,12 @@ /* 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__) +/* Added for __USLC__ for any Novell devrived Compiler and Some Sys V + Added _M_UNIX for any XENIX/SCO UNIX/OpenServer less than or equal + OpenServer 5.0.7 This is do avoided compiler hell like the other + OS's __APPLE__ and __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..55a8687 100644 --- a/progress.c +++ b/progress.c @@ -241,16 +241,21 @@ 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[128], *bufp; + size_t len = strlen(msg) + 5; struct throughput *tp = progress->throughput; + + bufp = (len < sizeof(buf)) ? buf : xmalloc(len + 1); if (tp) { unsigned int rate = !tp->avg_misecs ? 0 : tp->avg_bytes / tp->avg_misecs; throughput_string(tp, tp->curr_total, rate); } progress_update = 1; - sprintf(buf, ", %s.\n", msg); - display(progress, progress->last_value, buf); + sprintf(bufp, ", %s.\n", msg); + display(progress, progress->last_value, bufp); + if (buf != bufp) + free(bufp); } clear_progress_signal(); free(progress->throughput); -- Boyd Gerber <gerberb@xxxxxxxxx> ZENEZ 1042 East Fort Union #135, Midvale Utah 84047 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html