Merge branch 'lt/block-sha1'
authorJunio C Hamano <gitster@pobox.com>
Fri, 28 Aug 2009 00:00:35 +0000 (17:00 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 28 Aug 2009 00:00:35 +0000 (17:00 -0700)
* 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

1  2 
Makefile
git-compat-util.h
diff --combined Makefile
index a9a4d89667dbf9b44127aaba3e519a563f3c9324,134606b9b7628805d81a95e1e44cb2682fc4bbb0..d842e52ac38c4c262f13d1b3ea45b4a07539243a
+++ 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://
  # 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 = <openssl/sha.h>
        EXTLIBS += $(LIB_4_CRYPTO)
- endif
- endif
  endif
  endif
  ifdef NO_PERL_MAKEMAKER
diff --combined git-compat-util.h
index 71b5acb6fa2a0de36325cb8c2c6d56b458dfc7e5,000859ed909a286e9caa8b703a2fd10e9c6dc76f..e5e9f39c5678e97c69fe5314a964858ed5412163
  # 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)));