2 * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved.
4 * Licensed under the OpenSSL license (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
11 #include "crypto/cryptlib.h"
13 #if defined(_WIN32) || defined(__CYGWIN__)
15 /* pick DLL_[PROCESS|THREAD]_[ATTACH|DETACH] definitions */
18 * this has side-effect of _WIN32 getting defined, which otherwise is
19 * mutually exclusive with __CYGWIN__...
24 * All we really need to do is remove the 'error' state when a thread
28 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved);
29 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
32 case DLL_PROCESS_ATTACH:
33 OPENSSL_cpuid_setup();
35 case DLL_THREAD_ATTACH:
37 case DLL_THREAD_DETACH:
38 OPENSSL_thread_stop();
40 case DLL_PROCESS_DETACH: