summaryrefslogtreecommitdiff
path: root/src/global.h
diff options
context:
space:
mode:
authorVicent Martí <vicent@github.com>2012-11-13 13:28:08 -0800
committerVicent Martí <vicent@github.com>2012-11-13 13:28:08 -0800
commit3741a37f5ee80d7475cdfedcd4de7d8ea64cf1e8 (patch)
tree8861ec34c51061c59ed2daf945d2b7cf77456fed /src/global.h
parent70572ff80b071aae5d6b398572e1aa0be45f6844 (diff)
parent2a612fe3c31f2c386236ccb1483741835a5db318 (diff)
downloadlibgit2-3741a37f5ee80d7475cdfedcd4de7d8ea64cf1e8.tar.gz
Merge pull request #1055 from ethomson/sha1_win32
Win32 CryptoAPI and CNG support for SHA1
Diffstat (limited to 'src/global.h')
-rw-r--r--src/global.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/global.h b/src/global.h
index 0ad41ee63..b117714a8 100644
--- a/src/global.h
+++ b/src/global.h
@@ -8,6 +8,15 @@
#define INCLUDE_global_h__
#include "mwindow.h"
+#include "hash.h"
+
+#if defined(GIT_THREADS) && defined(_MSC_VER)
+# define GIT_MEMORY_BARRIER MemoryBarrier()
+#elif defined(GIT_THREADS)
+# define GIT_MEMORY_BARRIER __sync_synchronize()
+#else
+# define GIT_MEMORY_BARRIER /* noop */
+#endif
typedef struct {
git_error *last_error;