Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@google.com>2016-03-31 02:04:28 +0300
committerDavid Benjamin <davidben@google.com>2016-04-20 00:34:20 +0300
commit9dadc3b6e1c2d5e2e8a3b1188c905d5541a75df7 (patch)
tree934579c1a14761a61c23015b3526fc075061715b /crypto/internal.h
parent3ed24f0502ea3f38fa79306dfe263527f0491230 (diff)
Replace CRYPTO_once_t on Windows with INIT_ONCE.
Now that we no longer support Windows XP, this function is available. In doing so, remove the odd run_once_arg_t union and pass in a pointer to a function pointer which is cleaner and still avoids C's silly rule where function pointers can't be placed in a void*. BUG=37 Change-Id: I44888bb3779dacdb660706debd33888ca389ebd5 Reviewed-on: https://boringssl-review.googlesource.com/7613 Reviewed-by: David Benjamin <davidben@google.com>
Diffstat (limited to 'crypto/internal.h')
-rw-r--r--crypto/internal.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/internal.h b/crypto/internal.h
index 61f61002..438d7169 100644
--- a/crypto/internal.h
+++ b/crypto/internal.h
@@ -298,8 +298,8 @@ static inline int constant_time_select_int(unsigned int mask, int a, int b) {
typedef uint32_t CRYPTO_once_t;
#define CRYPTO_ONCE_INIT 0
#elif defined(OPENSSL_WINDOWS)
-typedef volatile LONG CRYPTO_once_t;
-#define CRYPTO_ONCE_INIT 0
+typedef INIT_ONCE CRYPTO_once_t;
+#define CRYPTO_ONCE_INIT INIT_ONCE_STATIC_INIT
#else
typedef pthread_once_t CRYPTO_once_t;
#define CRYPTO_ONCE_INIT PTHREAD_ONCE_INIT