File indexing completed on 2025-01-18 09:54:55
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022 #ifndef CRYPTOPP_CONFIG_OS_H
0023 #define CRYPTOPP_CONFIG_OS_H
0024
0025 #include "config_ver.h"
0026
0027
0028
0029
0030
0031
0032 #if (defined(_MSC_VER) && defined(__clang__))
0033 # error: "Unsupported configuration"
0034 #endif
0035
0036
0037 #if defined(_WIN32) || defined(_WIN64) || defined(__CYGWIN__)
0038 #define CRYPTOPP_WIN32_AVAILABLE
0039 #endif
0040
0041
0042 #if defined(__unix__) || defined(__MACH__) || defined(__NetBSD__) || defined(__sun)
0043 #define CRYPTOPP_UNIX_AVAILABLE
0044 #endif
0045
0046
0047 #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
0048 #define CRYPTOPP_BSD_AVAILABLE
0049 #endif
0050
0051
0052 #if defined(CRYPTOPP_MSC_VERSION) || defined(__fastcall)
0053 #define CRYPTOPP_FASTCALL __fastcall
0054 #else
0055 #define CRYPTOPP_FASTCALL
0056 #endif
0057
0058
0059 #if defined(CRYPTOPP_MSC_VERSION)
0060 #define CRYPTOPP_NO_VTABLE __declspec(novtable)
0061 #else
0062 #define CRYPTOPP_NO_VTABLE
0063 #endif
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081
0082
0083 #if !defined(USE_MS_CRYPTOAPI) && !defined(USE_MS_CNGAPI)
0084 # if !defined(_USING_V110_SDK71_) && ((WINVER >= 0x0602 ) || \
0085 (_WIN32_WINNT >= 0x0602 ))
0086 # define USE_MS_CNGAPI
0087 # else
0088 # define USE_MS_CRYPTOAPI
0089 # endif
0090 #endif
0091
0092
0093 #ifndef NO_OS_DEPENDENCE
0094
0095
0096
0097
0098
0099
0100
0101
0102 #ifndef CRYPTOPP_INIT_PRIORITY
0103 # define CRYPTOPP_INIT_PRIORITY 250
0104 #endif
0105
0106
0107
0108
0109 #ifndef CRYPTOPP_USER_PRIORITY
0110 # define CRYPTOPP_USER_PRIORITY (CRYPTOPP_INIT_PRIORITY+101)
0111 #endif
0112
0113
0114 #if (CRYPTOPP_INIT_PRIORITY > 0) && !(defined(NO_OS_DEPENDENCE) || defined(__APPLE__) || defined(__sun__))
0115 # if (CRYPTOPP_GCC_VERSION >= 30000) || (CRYPTOPP_LLVM_CLANG_VERSION >= 20900) || (_INTEL_COMPILER >= 800)
0116 # define HAVE_GCC_INIT_PRIORITY 1
0117 # elif (CRYPTOPP_MSC_VERSION >= 1310)
0118 # define HAVE_MSC_INIT_PRIORITY 1
0119 # elif defined(__xlc__) || defined(__xlC__) || defined(__ibmxl__)
0120 # define HAVE_XLC_INIT_PRIORITY 1
0121 # endif
0122 #endif
0123
0124 #if defined(CRYPTOPP_WIN32_AVAILABLE) || defined(CRYPTOPP_UNIX_AVAILABLE)
0125 # define HIGHRES_TIMER_AVAILABLE
0126 #endif
0127
0128 #ifdef CRYPTOPP_WIN32_AVAILABLE
0129 # if !defined(WINAPI_FAMILY)
0130 # define THREAD_TIMER_AVAILABLE
0131 # elif defined(WINAPI_FAMILY)
0132 # if (WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP))
0133 # define THREAD_TIMER_AVAILABLE
0134 # endif
0135 # endif
0136 #endif
0137
0138 #if defined(CRYPTOPP_UNIX_AVAILABLE) || defined(CRYPTOPP_DOXYGEN_PROCESSING)
0139 # define NONBLOCKING_RNG_AVAILABLE
0140 # define BLOCKING_RNG_AVAILABLE
0141 # define OS_RNG_AVAILABLE
0142 #endif
0143
0144
0145 #if defined(CRYPTOPP_UNIX_AVAILABLE)
0146 # define UNIX_SIGNALS_AVAILABLE 1
0147 #endif
0148
0149 #ifdef CRYPTOPP_WIN32_AVAILABLE
0150 # if !defined(WINAPI_FAMILY)
0151 # define NONBLOCKING_RNG_AVAILABLE
0152 # define OS_RNG_AVAILABLE
0153 # elif defined(WINAPI_FAMILY)
0154 # if (WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP))
0155 # define NONBLOCKING_RNG_AVAILABLE
0156 # define OS_RNG_AVAILABLE
0157 # elif !(WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP))
0158 # if ((WINVER >= 0x0A00 ) || (_WIN32_WINNT >= 0x0A00 ))
0159 # define NONBLOCKING_RNG_AVAILABLE
0160 # define OS_RNG_AVAILABLE
0161 # endif
0162 # endif
0163 # endif
0164 #endif
0165
0166 #endif
0167
0168 #endif