]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Add "__la_" prefix to our hash functions defined at archive_windows.c
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Mon, 10 May 2010 15:51:56 +0000 (11:51 -0400)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Mon, 10 May 2010 15:51:56 +0000 (11:51 -0400)
SVN-Revision: 2379

libarchive/archive_hash.h
libarchive/archive_windows.c
libarchive/archive_windows.h

index ad4a667c95c2701432997521a6f52900a02d79a4..c0d7eb757cd62a8ff26760980c53dfe9b22b1b39 100644 (file)
@@ -69,9 +69,9 @@ typedef MD5_CTX archive_md5_ctx;
 #elif defined(ARCHIVE_HASH_MD5_WIN)
 #  define ARCHIVE_HAS_MD5
 typedef MD5_CTX archive_md5_ctx;
-#  define archive_md5_init(ctx)                        MD5_Init(ctx)
-#  define archive_md5_final(ctx, buf)          MD5_Final(buf, ctx)
-#  define archive_md5_update(ctx, buf, n)      MD5_Update(ctx, buf, n)
+#  define archive_md5_init(ctx)                        __la_MD5_Init(ctx)
+#  define archive_md5_final(ctx, buf)          __la_MD5_Final(buf, ctx)
+#  define archive_md5_update(ctx, buf, n)      __la_MD5_Update(ctx, buf, n)
 #endif
 
 #if defined(ARCHIVE_HASH_RMD160_LIBC)
@@ -107,9 +107,9 @@ typedef SHA_CTX archive_sha1_ctx;
 #elif defined(ARCHIVE_HASH_SHA1_WIN)
 #  define ARCHIVE_HAS_SHA1
 typedef SHA1_CTX archive_sha1_ctx;
-#  define archive_sha1_init(ctx)               SHA1_Init(ctx)
-#  define archive_sha1_final(ctx, buf)         SHA1_Final(buf, ctx)
-#  define archive_sha1_update(ctx, buf, n)     SHA1_Update(ctx, buf, n)
+#  define archive_sha1_init(ctx)               __la_SHA1_Init(ctx)
+#  define archive_sha1_final(ctx, buf)         __la_SHA1_Final(buf, ctx)
+#  define archive_sha1_update(ctx, buf, n)     __la_SHA1_Update(ctx, buf, n)
 #endif
 
 #if defined(ARCHIVE_HASH_SHA256_LIBC)
@@ -143,9 +143,9 @@ typedef SHA256_CTX archive_sha256_ctx;
 #elif defined(ARCHIVE_HASH_SHA256_WIN)
 #  define ARCHIVE_HAS_SHA256
 typedef SHA256_CTX archive_sha256_ctx;
-#  define archive_sha256_init(ctx)             SHA256_Init(ctx)
-#  define archive_sha256_final(ctx, buf)       SHA256_Final(buf, ctx)
-#  define archive_sha256_update(ctx, buf, n)   SHA256_Update(ctx, buf, n)
+#  define archive_sha256_init(ctx)             __la_SHA256_Init(ctx)
+#  define archive_sha256_final(ctx, buf)       __la_SHA256_Final(buf, ctx)
+#  define archive_sha256_update(ctx, buf, n)   __la_SHA256_Update(ctx, buf, n)
 #endif
 
 #if defined(ARCHIVE_HASH_SHA384_LIBC)
@@ -179,9 +179,9 @@ typedef SHA512_CTX archive_sha384_ctx;
 #elif defined(ARCHIVE_HASH_SHA384_WIN)
 #  define ARCHIVE_HAS_SHA384
 typedef SHA512_CTX archive_sha384_ctx;
-#  define archive_sha384_init(ctx)             SHA384_Init(ctx)
-#  define archive_sha384_final(ctx, buf)       SHA384_Final(buf, ctx)
-#  define archive_sha384_update(ctx, buf, n)   SHA384_Update(ctx, buf, n)
+#  define archive_sha384_init(ctx)             __la_SHA384_Init(ctx)
+#  define archive_sha384_final(ctx, buf)       __la_SHA384_Final(buf, ctx)
+#  define archive_sha384_update(ctx, buf, n)   __la_SHA384_Update(ctx, buf, n)
 #endif
 
 #if defined(ARCHIVE_HASH_SHA512_LIBC)
@@ -215,7 +215,7 @@ typedef SHA512_CTX archive_sha512_ctx;
 #elif defined(ARCHIVE_HASH_SHA512_WIN)
 #  define ARCHIVE_HAS_SHA512
 typedef SHA512_CTX archive_sha512_ctx;
-#  define archive_sha512_init(ctx)             SHA512_Init(ctx)
-#  define archive_sha512_final(ctx, buf)       SHA512_Final(buf, ctx)
-#  define archive_sha512_update(ctx, buf, n)   SHA512_Update(ctx, buf, n)
+#  define archive_sha512_init(ctx)             __la_SHA512_Init(ctx)
+#  define archive_sha512_final(ctx, buf)       __la_SHA512_Final(buf, ctx)
+#  define archive_sha512_update(ctx, buf, n)   __la_SHA512_Update(ctx, buf, n)
 #endif
index 23630d079c75ecf0222d958b974ff5636e15e8a4..b002d9d6233afb7036c3c79c2598547953c17af4 100644 (file)
@@ -1232,19 +1232,19 @@ Digest_Final(unsigned char *buf, int bufsize, Digest_CTX *ctx)
 }
 
 #define DIGEST_INIT(name, algid) \
-void name ## _Init(Digest_CTX *ctx)\
+void __la_ ## name ## _Init(Digest_CTX *ctx)\
 {\
        Digest_Init(ctx, algid);\
 }
 
 #define DIGEST_UPDATE(name) \
-void name ## _Update(Digest_CTX *ctx, const unsigned char *buf, size_t len)\
+void __la_ ## name ## _Update(Digest_CTX *ctx, const unsigned char *buf, size_t len)\
 {\
        Digest_Update(ctx, buf, len);\
 }
 
 #define DIGEST_FINAL(name, size) \
-void name ## _Final(unsigned char *buf, Digest_CTX *ctx)\
+void __la_ ## name ## _Final(unsigned char *buf, Digest_CTX *ctx)\
 {\
        Digest_Final(buf, size, ctx);\
 }
index 2d6c80733608795ec9e67eb4c681f4f2c36578c2..17b2f4ad91a8a4b6cf2ca5492d3aa1221bb609ae 100644 (file)
@@ -380,34 +380,34 @@ extern ssize_t     __la_write(int fd, const void *buf, size_t nbytes);
 
 /* Message digest function */
 #if defined(ARCHIVE_HASH_MD5_WIN)
-extern void     MD5_Init(Digest_CTX *ctx);
-extern void     MD5_Update(Digest_CTX *ctx, const unsigned char *buf,
+extern void     __la_MD5_Init(Digest_CTX *ctx);
+extern void     __la_MD5_Update(Digest_CTX *ctx, const unsigned char *buf,
                     size_t len);
-extern void     MD5_Final(unsigned char *buf, Digest_CTX *ctx);
+extern void     __la_MD5_Final(unsigned char *buf, Digest_CTX *ctx);
 #endif
 #if defined(ARCHIVE_HASH_SHA1_WIN)
-extern void     SHA1_Init(Digest_CTX *ctx);
-extern void     SHA1_Update(Digest_CTX *ctx, const unsigned char *buf,
+extern void     __la_SHA1_Init(Digest_CTX *ctx);
+extern void     __la_SHA1_Update(Digest_CTX *ctx, const unsigned char *buf,
                     size_t len);
-extern void     SHA1_Final(unsigned char *buf, Digest_CTX *ctx);
+extern void     __la_SHA1_Final(unsigned char *buf, Digest_CTX *ctx);
 #endif
 #if defined(ARCHIVE_HASH_SHA256_WIN)
-extern void     SHA256_Init(Digest_CTX *ctx);
-extern void     SHA256_Update(Digest_CTX *ctx, const unsigned char *buf,
+extern void     __la_SHA256_Init(Digest_CTX *ctx);
+extern void     __la_SHA256_Update(Digest_CTX *ctx, const unsigned char *buf,
                     size_t len);
-extern void     SHA256_Final(unsigned char *buf, Digest_CTX *ctx);
+extern void     __la_SHA256_Final(unsigned char *buf, Digest_CTX *ctx);
 #endif
 #if defined(ARCHIVE_HASH_SHA384_WIN)
-extern void     SHA384_Init(Digest_CTX *ctx);
-extern void     SHA384_Update(Digest_CTX *ctx, const unsigned char *buf,
+extern void     __la_SHA384_Init(Digest_CTX *ctx);
+extern void     __la_SHA384_Update(Digest_CTX *ctx, const unsigned char *buf,
                     size_t len);
-extern void     SHA384_Final(unsigned char *buf, Digest_CTX *ctx);
+extern void     __la_SHA384_Final(unsigned char *buf, Digest_CTX *ctx);
 #endif
 #if defined(ARCHIVE_HASH_SHA512_WIN)
-extern void     SHA512_Init(Digest_CTX *ctx);
-extern void     SHA512_Update(Digest_CTX *ctx, const unsigned char *buf,
+extern void     __la_SHA512_Init(Digest_CTX *ctx);
+extern void     __la_SHA512_Update(Digest_CTX *ctx, const unsigned char *buf,
                     size_t len);
-extern void     SHA512_Final(unsigned char *buf, Digest_CTX *ctx);
+extern void     __la_SHA512_Final(unsigned char *buf, Digest_CTX *ctx);
 #endif
 
 #endif /* LIBARCHIVE_ARCHIVE_WINDOWS_H_INCLUDED */