summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2019-04-07 19:10:16 +0900
committerGitHub <noreply@github.com>2019-04-07 19:10:16 +0900
commitc4cd69b25825daac70707591d340baf9ec41afd3 (patch)
tree4efd4e1e9b10649d9dce17941709a5cd78d7398e
parent5a190ad31d7e30eaa2f6da3fb563eebbe4050d59 (diff)
parente5aecaf62a6a6d88bd082904608952675aec6802 (diff)
downloadlibgit2-c4cd69b25825daac70707591d340baf9ec41afd3.tar.gz
Merge pull request #5039 from libgit2/ethomson/win32_hash
sha1: don't inline `git_hash_global_init` for win32
-rw-r--r--src/hash/hash_win32.c15
-rw-r--r--src/hash/hash_win32.h15
2 files changed, 16 insertions, 14 deletions
diff --git a/src/hash/hash_win32.c b/src/hash/hash_win32.c
index 792298f39..4b6830358 100644
--- a/src/hash/hash_win32.c
+++ b/src/hash/hash_win32.c
@@ -109,6 +109,21 @@ static void git_hash_global_shutdown(void)
hash_cryptoapi_prov_shutdown();
}
+int git_hash_global_init(void)
+{
+ int error = 0;
+
+ if (hash_prov.type != INVALID)
+ return 0;
+
+ if ((error = hash_cng_prov_init()) < 0)
+ error = hash_cryptoapi_prov_init();
+
+ git__on_shutdown(git_hash_global_shutdown);
+
+ return error;
+}
+
/* CryptoAPI: available in Windows XP and newer */
GIT_INLINE(int) hash_ctx_cryptoapi_init(git_hash_ctx *ctx)
diff --git a/src/hash/hash_win32.h b/src/hash/hash_win32.h
index 6cddcaa72..ca448c241 100644
--- a/src/hash/hash_win32.h
+++ b/src/hash/hash_win32.h
@@ -138,19 +138,6 @@ struct git_hash_ctx {
} ctx;
};
-GIT_INLINE(int) git_hash_global_init(void)
-{
- int error = 0;
-
- if (hash_prov.type != INVALID)
- return 0;
-
- if ((error = hash_cng_prov_init()) < 0)
- error = hash_cryptoapi_prov_init();
-
- git__on_shutdown(git_hash_global_shutdown);
-
- return error;
-}
+extern int git_hash_global_init(void);
#endif