From: Junio C Hamano Date: Fri, 28 Aug 2009 00:00:35 +0000 (-0700) Subject: Merge branch 'lt/block-sha1' X-Git-Tag: v1.6.5-rc0~30 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/106a36509dc78e32e0b0e64c8da12ace639c879a?ds=inline;hp=-c Merge branch 'lt/block-sha1' * lt/block-sha1: remove ARM and Mozilla SHA1 implementations block-sha1: guard gcc extensions with __GNUC__ make sure byte swapping is optimal for git block-sha1: make the size member first in the context struct --- 106a36509dc78e32e0b0e64c8da12ace639c879a diff --combined Makefile index a9a4d89667,134606b9b7..d842e52ac3 --- a/Makefile +++ b/Makefile @@@ -16,7 -16,7 +16,7 @@@ all: # when attempting to read from an fopen'ed directory. # # Define NO_OPENSSL environment variable if you do not have OpenSSL. - # This also implies MOZILLA_SHA1. + # This also implies BLK_SHA1. # # Define NO_CURL if you do not have libcurl installed. git-http-pull and # git-http-push are not built, and you cannot use http:// and https:// @@@ -91,14 -91,6 +91,6 @@@ # Define PPC_SHA1 environment variable when running make to make use of # a bundled SHA1 routine optimized for PowerPC. # - # Define ARM_SHA1 environment variable when running make to make use of - # a bundled SHA1 routine optimized for ARM. - # - # Define MOZILLA_SHA1 environment variable when running make to make use of - # a bundled SHA1 routine coming from Mozilla. It is GPL'd and should be fast - # on non-x86 architectures (e.g. PowerPC), while the OpenSSL version (default - # choice) has very fast version optimized for i586. - # # Define NEEDS_SSL_WITH_CRYPTO if you need -lcrypto with -lssl (Darwin). # # Define NEEDS_LIBICONV if linking with libc is not enough (Darwin). @@@ -536,7 -528,6 +528,7 @@@ LIB_OBJS += read-cache. LIB_OBJS += reflog-walk.o LIB_OBJS += refs.o LIB_OBJS += remote.o +LIB_OBJS += replace_object.o LIB_OBJS += rerere.o LIB_OBJS += revision.o LIB_OBJS += run-command.o @@@ -626,7 -617,6 +618,7 @@@ BUILTIN_OBJS += builtin-read-tree. BUILTIN_OBJS += builtin-receive-pack.o BUILTIN_OBJS += builtin-reflog.o BUILTIN_OBJS += builtin-remote.o +BUILTIN_OBJS += builtin-replace.o BUILTIN_OBJS += builtin-rerere.o BUILTIN_OBJS += builtin-reset.o BUILTIN_OBJS += builtin-rev-list.o @@@ -757,6 -747,9 +749,6 @@@ ifeq ($(uname_S),SunOS NO_C99_FORMAT = YesPlease NO_STRTOUMAX = YesPlease endif - ifdef NO_IPV6 - NEEDS_RESOLV = YesPlease - endif INSTALL = /usr/ucb/install TAR = gtar BASIC_CFLAGS += -D__EXTENSIONS__ -D__sun__ -DHAVE_ALLOCA_H @@@ -925,10 -918,6 +917,6 @@@ els NO_PTHREADS = YesPlease endif endif - ifneq (,$(findstring arm,$(uname_M))) - ARM_SHA1 = YesPlease - NO_MKSTEMPS = YesPlease - endif -include config.mak.autogen -include config.mak @@@ -1021,7 -1010,7 +1009,7 @@@ ifndef NO_OPENSS endif else BASIC_CFLAGS += -DNO_OPENSSL - MOZILLA_SHA1 = 1 + BLK_SHA1 = 1 OPENSSL_LIBSSL = endif ifdef NEEDS_SSL_WITH_CRYPTO @@@ -1177,19 -1166,9 +1165,9 @@@ els ifdef PPC_SHA1 SHA1_HEADER = "ppc/sha1.h" LIB_OBJS += ppc/sha1.o ppc/sha1ppc.o - else - ifdef ARM_SHA1 - SHA1_HEADER = "arm/sha1.h" - LIB_OBJS += arm/sha1.o arm/sha1_arm.o - else - ifdef MOZILLA_SHA1 - SHA1_HEADER = "mozilla-sha1/sha1.h" - LIB_OBJS += mozilla-sha1/sha1.o else SHA1_HEADER = EXTLIBS += $(LIB_4_CRYPTO) - endif - endif endif endif ifdef NO_PERL_MAKEMAKER diff --combined git-compat-util.h index 71b5acb6fa,000859ed90..e5e9f39c56 --- a/git-compat-util.h +++ b/git-compat-util.h @@@ -57,8 -57,10 +57,8 @@@ # endif #elif !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__USLC__) && !defined(_M_UNIX) && !defined(sgi) #define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */ -#ifndef __sun__ #define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */ #endif -#endif #define _ALL_SOURCE 1 #define _GNU_SOURCE 1 #define _BSD_SOURCE 1 @@@ -174,6 -176,8 +174,8 @@@ extern char *gitbasename(char *) #endif #endif + #include "compat/bswap.h" + /* General helper functions */ extern void usage(const char *err) NORETURN; extern void die(const char *err, ...) NORETURN __attribute__((format (printf, 1, 2)));