aboutsummaryrefslogtreecommitdiff
path: root/crypto/thread.c
diff options
context:
space:
mode:
authorBrian Smith <brian@briansmith.org>2015-03-27 21:12:01 -1000
committerAdam Langley <agl@google.com>2015-04-13 20:49:18 +0000
commit054e68267553e0b64975444741efa8099688d960 (patch)
tree48ad376df5dd4e09a2406784020f10626149a66a /crypto/thread.c
parentef24ac396ac61872c95f277732dcf8dd669f6f75 (diff)
downloadboringssl-054e68267553e0b64975444741efa8099688d960.zip
boringssl-054e68267553e0b64975444741efa8099688d960.tar.gz
boringssl-054e68267553e0b64975444741efa8099688d960.tar.bz2
Eliminate unnecessary includes from low-level crypto modules.
Beyond generally eliminating unnecessary includes, eliminate as many includes of headers that declare/define particularly error-prone functionality like strlen, malloc, and free. crypto/err/internal.h was added to remove the dependency on openssl/thread.h from the public openssl/err.h header. The include of <stdlib.h> in openssl/mem.h was retained since it defines OPENSSL_malloc and friends as macros around the stdlib.h functions. The public x509.h, x509v3.h, and ssl.h headers were not changed in order to minimize breakage of source compatibility with external code. Change-Id: I0d264b73ad0a720587774430b2ab8f8275960329 Reviewed-on: https://boringssl-review.googlesource.com/4220 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'crypto/thread.c')
-rw-r--r--crypto/thread.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/thread.c b/crypto/thread.c
index 48d5bbc..abc8b6f 100644
--- a/crypto/thread.c
+++ b/crypto/thread.c
@@ -56,10 +56,11 @@
#include <openssl/thread.h>
-#include <errno.h>
#include <string.h>
-#if defined(OPENSSL_WINDOWS)
+#if !defined(OPENSSL_WINDOWS)
+#include <errno.h>
+#else
#pragma warning(push, 3)
#include <windows.h>
#pragma warning(pop)