Code

fix openssl headers conflicting with custom SHA1 implementations
[git.git] / ppc / sha1.h
index c3c51aa4d487f2e85c02b0257c1f0b57d6158d76..c405f734c2050e2e4ad3469d087368a29a98d27e 100644 (file)
@@ -5,7 +5,7 @@
  */
 #include <stdint.h>
 
-typedef struct sha_context {
+typedef struct {
        uint32_t hash[5];
        uint32_t cnt;
        uint64_t len;
@@ -13,8 +13,13 @@ typedef struct sha_context {
                unsigned char b[64];
                uint64_t l[8];
        } buf;
-} SHA_CTX;
+} ppc_SHA_CTX;
 
-int SHA1_Init(SHA_CTX *c);
-int SHA1_Update(SHA_CTX *c, const void *p, unsigned long n);
-int SHA1_Final(unsigned char *hash, SHA_CTX *c);
+int ppc_SHA1_Init(ppc_SHA_CTX *c);
+int ppc_SHA1_Update(ppc_SHA_CTX *c, const void *p, unsigned long n);
+int ppc_SHA1_Final(unsigned char *hash, ppc_SHA_CTX *c);
+
+#define git_SHA_CTX    ppc_SHA_CTX
+#define git_SHA1_Init  ppc_SHA1_Init
+#define git_SHA1_Update        ppc_SHA1_Update
+#define git_SHA1_Final ppc_SHA1_Final