Fix an MSVC warning.
[openssl.git] / crypto / include / internal / cryptlib.h
1 /*
2  * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
3  *
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
8  */
9
10 #ifndef HEADER_CRYPTLIB_H
11 # define HEADER_CRYPTLIB_H
12
13 # include <stdlib.h>
14 # include <string.h>
15
16 # include "e_os.h"
17
18 # ifdef OPENSSL_USE_APPLINK
19 #  undef BIO_FLAGS_UPLINK
20 #  define BIO_FLAGS_UPLINK 0x8000
21 #  include "ms/uplink.h"
22 # endif
23
24 # include <openssl/crypto.h>
25 # include <openssl/buffer.h>
26 # include <openssl/bio.h>
27 # include <openssl/err.h>
28 # include <openssl/opensslconf.h>
29
30 #ifdef  __cplusplus
31 extern "C" {
32 #endif
33
34 typedef struct ex_callback_st EX_CALLBACK;
35
36 DEFINE_STACK_OF(EX_CALLBACK)
37
38 typedef struct app_mem_info_st APP_INFO;
39 DEFINE_LHASH_OF(APP_INFO);
40 typedef struct mem_st MEM;
41 DEFINE_LHASH_OF(MEM);
42
43 # ifndef OPENSSL_SYS_VMS
44 #  define X509_CERT_AREA          OPENSSLDIR
45 #  define X509_CERT_DIR           OPENSSLDIR "/certs"
46 #  define X509_CERT_FILE          OPENSSLDIR "/cert.pem"
47 #  define X509_PRIVATE_DIR        OPENSSLDIR "/private"
48 #  define CTLOG_FILE              OPENSSLDIR "/ct_log_list.cnf"
49 # else
50 #  define X509_CERT_AREA          "SSLROOT:[000000]"
51 #  define X509_CERT_DIR           "SSLCERTS:"
52 #  define X509_CERT_FILE          "SSLCERTS:cert.pem"
53 #  define X509_PRIVATE_DIR        "SSLPRIVATE:"
54 #  define CTLOG_FILE              "SSLROOT:ct_log_list.cnf"
55 # endif
56
57 # define X509_CERT_DIR_EVP        "SSL_CERT_DIR"
58 # define X509_CERT_FILE_EVP       "SSL_CERT_FILE"
59 # define CTLOG_FILE_EVP           "CTLOG_FILE"
60
61 /* size of string representations */
62 # define DECIMAL_SIZE(type)      ((sizeof(type)*8+2)/3+1)
63 # define HEX_SIZE(type)          (sizeof(type)*2)
64
65 void OPENSSL_cpuid_setup(void);
66 extern unsigned int OPENSSL_ia32cap_P[];
67 void OPENSSL_showfatal(const char *fmta, ...);
68 extern int OPENSSL_NONPIC_relocated;
69 void crypto_cleanup_all_ex_data_int(void);
70
71 int openssl_strerror_r(int errnum, char *buf, size_t buflen);
72
73 #ifdef  __cplusplus
74 }
75 #endif
76
77 #endif