Don't support OpenSSL on windows. Yet?

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3893 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
Cory McWilliams 2022-06-04 17:14:39 +00:00
parent 9c90b2bc1d
commit 653e16b059

View File

@ -2,7 +2,9 @@
#include <uv.h> #include <uv.h>
#if !defined(_WIN32)
#include <openssl/crypto.h> #include <openssl/crypto.h>
#endif
#include <string.h> #include <string.h>
@ -100,6 +102,7 @@ size_t tf_mem_get_uv_malloc_size()
return s_uv_malloc_size; return s_uv_malloc_size;
} }
#if !defined(_WIN32)
void* _tf_tls_alloc(size_t size, const char* file, int line) void* _tf_tls_alloc(size_t size, const char* file, int line)
{ {
return _tf_alloc(&s_tls_malloc_size, size); return _tf_alloc(&s_tls_malloc_size, size);
@ -114,10 +117,13 @@ void _tf_tls_free(void* ptr, const char* file, int line)
{ {
_tf_free(&s_tls_malloc_size, ptr); _tf_free(&s_tls_malloc_size, ptr);
} }
#endif
void tf_mem_replace_tls_allocator() void tf_mem_replace_tls_allocator()
{ {
#if !defined(_WIN32)
CRYPTO_set_mem_functions(_tf_tls_alloc, _tf_tls_realloc, _tf_tls_free); CRYPTO_set_mem_functions(_tf_tls_alloc, _tf_tls_realloc, _tf_tls_free);
#endif
} }
size_t tf_mem_get_tls_malloc_size() size_t tf_mem_get_tls_malloc_size()