More disambiguation of Python in makefiles (#18284)
[mono-project.git] / mono / btls / btls-util.h
blob2f50b7ee0e6434b427a21b9bb02f937558997491
1 //
2 // btls-util.h
3 // MonoBtls
4 //
5 // Created by Martin Baulig on 3/23/16.
6 // Copyright © 2016 Xamarin. All rights reserved.
7 //
9 #ifndef __btls__btls_util__
10 #define __btls__btls_util__
12 #include <stdio.h>
13 #include <stdlib.h>
14 #include <string.h>
15 #include <openssl/ssl.h>
17 #ifndef MONO_API
19 #if !defined(MONO_DLL_IMPORT) && !defined(MONO_DLL_EXPORT)
20 #define MONO_DLL_EXPORT
21 #endif
23 #if defined(_MSC_VER)
25 #define MONO_API_EXPORT __declspec(dllexport)
26 #define MONO_API_IMPORT __declspec(dllimport)
28 #else
30 #if defined (__clang__) || defined (__GNUC__)
31 #define MONO_API_EXPORT __attribute__ ((__visibility__ ("default")))
32 #else
33 #define MONO_API_EXPORT
34 #endif
35 #define MONO_API_IMPORT
37 #endif
39 #ifdef __cplusplus
40 #define MONO_EXTERN_C extern "C"
41 #else
42 #define MONO_EXTERN_C /* nothing */
43 #endif
45 #if defined(MONO_DLL_EXPORT)
46 #define MONO_API_NO_EXTERN_C MONO_API_EXPORT
47 #elif defined(MONO_DLL_IMPORT)
48 #define MONO_API_NO_EXTERN_C MONO_API_IMPORT
49 #else
50 #define MONO_API_NO_EXTERN_C /* nothing */
51 #endif
53 #define MONO_API MONO_EXTERN_C MONO_API_NO_EXTERN_C
54 #endif
56 MONO_API void
57 mono_btls_free (void *data);
59 int64_t
60 mono_btls_util_asn1_time_to_ticks (ASN1_TIME *time);
62 int
63 mono_btls_debug_printf (BIO *bio, const char *format, va_list args);
65 OPENSSL_EXPORT void CRYPTO_refcount_inc(CRYPTO_refcount_t *count);
66 OPENSSL_EXPORT int CRYPTO_refcount_dec_and_test_zero(CRYPTO_refcount_t *count);
68 #endif /* __btls__btls_util__ */