config.h
00001 #ifndef CRYPTOPP_CONFIG_H
00002 #define CRYPTOPP_CONFIG_H
00003
00004
00005
00006
00007 #if !defined(IS_LITTLE_ENDIAN) && (defined(__BIG_ENDIAN__) || defined(__sparc) || defined(__sparc__) || defined(__hppa__) || defined(__mips__) || (defined(__MWERKS__) && !defined(__INTEL__)))
00008 # define IS_BIG_ENDIAN
00009 #endif
00010
00011
00012
00013 #ifndef IS_BIG_ENDIAN
00014 # define IS_LITTLE_ENDIAN
00015 #endif
00016
00017
00018
00019
00020
00021
00022
00023
00024 #define USE_MS_CRYPTOAPI
00025
00026
00027 #ifndef DSA_1024_BIT_MODULUS_ONLY
00028 # define DSA_1024_BIT_MODULUS_ONLY 1
00029 #endif
00030
00031
00032
00033
00034
00035
00036 #define GZIP_OS_CODE 0
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048 #define PREFER_BERKELEY_STYLE_SOCKETS
00049
00050
00051
00052
00053
00054
00055 #ifdef NO_NAMESPACE
00056 # error namespace support is now required
00057 #endif
00058
00059
00060
00061
00062 #define WORKAROUND_MS_BUG_Q258000
00063
00064 #ifdef CRYPTOPP_DOXYGEN_PROCESSING
00065
00066 # define CryptoPP
00067 # define NAMESPACE_BEGIN(x)
00068 # define NAMESPACE_END
00069
00070 # define DOCUMENTED_TYPEDEF(x, y) class y : public x {};
00071 #else
00072 # define NAMESPACE_BEGIN(x) namespace x {
00073 # define NAMESPACE_END }
00074 # define DOCUMENTED_TYPEDEF(x, y) typedef x y;
00075 #endif
00076 #define ANONYMOUS_NAMESPACE_BEGIN namespace {
00077 #define USING_NAMESPACE(x) using namespace x;
00078 #define DOCUMENTED_NAMESPACE_BEGIN(x) namespace x {
00079 #define DOCUMENTED_NAMESPACE_END }
00080
00081
00082
00083
00084
00085 #ifndef TYPE_OF_SOCKLEN_T
00086 # if defined(_WIN32) || defined(__CYGWIN__) || defined(__MACH__)
00087 # define TYPE_OF_SOCKLEN_T int
00088 # else
00089 # define TYPE_OF_SOCKLEN_T ::socklen_t
00090 # endif
00091 #endif
00092
00093 #if defined(__CYGWIN__) && defined(PREFER_WINDOWS_STYLE_SOCKETS)
00094 # define __USE_W32_SOCKETS
00095 #endif
00096
00097 typedef unsigned char byte;
00098
00099 NAMESPACE_BEGIN(CryptoPP)
00100
00101 typedef unsigned short word16;
00102 typedef unsigned int word32;
00103
00104 #if defined(__GNUC__) || defined(__MWERKS__)
00105 #define WORD64_AVAILABLE
00106 typedef unsigned long long word64;
00107 #define W64LIT(x) x##LL
00108 #elif defined(_MSC_VER) || defined(__BCPLUSPLUS__)
00109 #define WORD64_AVAILABLE
00110 typedef unsigned __int64 word64;
00111 #define W64LIT(x) x##ui64
00112 #endif
00113
00114
00115 #ifdef WORD64_AVAILABLE
00116 typedef word64 lword;
00117 #else
00118 typedef word32 lword;
00119 #endif
00120
00121 #if defined(__alpha__) || defined(__ia64__) || defined(_ARCH_PPC64) || defined(__x86_64__) || defined(__mips64)
00122
00123
00124
00125
00126 typedef word32 hword;
00127 typedef word64 word;
00128 #else
00129 #define CRYPTOPP_NATIVE_DWORD_AVAILABLE
00130 #ifdef WORD64_AVAILABLE
00131 #define CRYPTOPP_SLOW_WORD64
00132 typedef word16 hword;
00133 typedef word32 word;
00134 typedef word64 dword;
00135 #else
00136 typedef word8 hword;
00137 typedef word16 word;
00138 typedef word32 dword;
00139 #endif
00140 #endif
00141
00142 const unsigned int WORD_SIZE = sizeof(word);
00143 const unsigned int WORD_BITS = WORD_SIZE * 8;
00144
00145 #if defined(_MSC_VER) || defined(__BCPLUSPLUS__)
00146 #define INTEL_INTRINSICS
00147 #define FAST_ROTATE
00148 #elif defined(__MWERKS__) && TARGET_CPU_PPC
00149 #define PPC_INTRINSICS
00150 #define FAST_ROTATE
00151 #elif defined(__GNUC__) && defined(__i386__)
00152
00153 #define FAST_ROTATE
00154 #endif
00155
00156 NAMESPACE_END
00157
00158
00159 #if defined(_MSC_VER) && (_MSC_VER < 1300)
00160 #define CPP_TYPENAME
00161 #else
00162 #define CPP_TYPENAME typename
00163 #endif
00164
00165 #ifdef _MSC_VER
00166 #define CRYPTOPP_NO_VTABLE __declspec(novtable)
00167 #else
00168 #define CRYPTOPP_NO_VTABLE
00169 #endif
00170
00171 #ifdef _MSC_VER
00172
00173
00174
00175
00176
00177
00178
00179
00180 # pragma warning(disable: 4231 4250 4251 4275 4660 4661 4786 4355)
00181 #endif
00182
00183 #if (defined(_MSC_VER) && _MSC_VER <= 1300) || defined(__MWERKS__) || defined(_STLPORT_VERSION)
00184 #define CRYPTOPP_DISABLE_UNCAUGHT_EXCEPTION
00185 #endif
00186
00187 #ifndef CRYPTOPP_DISABLE_UNCAUGHT_EXCEPTION
00188 #define CRYPTOPP_UNCAUGHT_EXCEPTION_AVAILABLE
00189 #endif
00190
00191
00192 #if !defined(CRYPTOPP_DISABLE_X86ASM) && ((defined(_MSC_VER) && !defined(__MWERKS__) && defined(_M_IX86)) || (defined(__GNUC__) && defined(__i386__)))
00193 #define CRYPTOPP_X86ASM_AVAILABLE
00194 #endif
00195
00196
00197
00198 #ifndef NO_OS_DEPENDENCE
00199
00200 #if defined(_WIN32) || defined(__CYGWIN__)
00201 #define CRYPTOPP_WIN32_AVAILABLE
00202 #endif
00203
00204 #if defined(__unix__) || defined(__MACH__)
00205 #define CRYPTOPP_UNIX_AVAILABLE
00206 #endif
00207
00208 #if defined(WORD64_AVAILABLE) && (defined(CRYPTOPP_WIN32_AVAILABLE) || defined(CRYPTOPP_UNIX_AVAILABLE))
00209 # define HIGHRES_TIMER_AVAILABLE
00210 #endif
00211
00212 #ifdef CRYPTOPP_UNIX_AVAILABLE
00213 # define HAS_BERKELEY_STYLE_SOCKETS
00214 #endif
00215
00216 #ifdef CRYPTOPP_WIN32_AVAILABLE
00217 # define HAS_WINDOWS_STYLE_SOCKETS
00218 #endif
00219
00220 #if defined(HIGHRES_TIMER_AVAILABLE) && (defined(HAS_BERKELEY_STYLE_SOCKETS) || defined(HAS_WINDOWS_STYLE_SOCKETS))
00221 # define SOCKETS_AVAILABLE
00222 #endif
00223
00224 #if defined(HAS_WINDOWS_STYLE_SOCKETS) && (!defined(HAS_BERKELEY_STYLE_SOCKETS) || defined(PREFER_WINDOWS_STYLE_SOCKETS))
00225 # define USE_WINDOWS_STYLE_SOCKETS
00226 #else
00227 # define USE_BERKELEY_STYLE_SOCKETS
00228 #endif
00229
00230 #if defined(CRYPTOPP_WIN32_AVAILABLE) && !defined(USE_BERKELEY_STYLE_SOCKETS)
00231 # define WINDOWS_PIPES_AVAILABLE
00232 #endif
00233
00234 #if defined(CRYPTOPP_WIN32_AVAILABLE) && defined(USE_MS_CRYPTOAPI)
00235 # define NONBLOCKING_RNG_AVAILABLE
00236 # define OS_RNG_AVAILABLE
00237 #endif
00238
00239 #if defined(CRYPTOPP_UNIX_AVAILABLE) || defined(CRYPTOPP_DOXYGEN_PROCESSING)
00240 # define NONBLOCKING_RNG_AVAILABLE
00241 # define BLOCKING_RNG_AVAILABLE
00242 # define OS_RNG_AVAILABLE
00243 # define HAS_PTHREADS
00244 # define THREADS_AVAILABLE
00245 #endif
00246
00247 #ifdef CRYPTOPP_WIN32_AVAILABLE
00248 # define HAS_WINTHREADS
00249 # define THREADS_AVAILABLE
00250 #endif
00251
00252 #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
00253 # define CRYPTOPP_MALLOC_ALIGNMENT_IS_16
00254 #endif
00255
00256 #if defined(__linux__) || defined(__sun__) || defined(__CYGWIN__)
00257 # define CRYPTOPP_MEMALIGN_AVAILABLE
00258 #endif
00259
00260 #endif
00261
00262
00263
00264 #ifdef CRYPTOPP_WIN32_AVAILABLE
00265
00266 #ifdef CRYPTOPP_EXPORTS
00267 #define CRYPTOPP_IS_DLL
00268 #define CRYPTOPP_DLL __declspec(dllexport)
00269 #elif defined(CRYPTOPP_IMPORTS)
00270 #define CRYPTOPP_IS_DLL
00271 #define CRYPTOPP_DLL __declspec(dllimport)
00272 #else
00273 #define CRYPTOPP_DLL
00274 #endif
00275
00276 #define CRYPTOPP_API __stdcall
00277 #define CRYPTOPP_CDECL __cdecl
00278
00279 #else
00280
00281 #define CRYPTOPP_DLL
00282 #define CRYPTOPP_API
00283 #define CRYPTOPP_CDECL
00284
00285 #endif
00286
00287 #if defined(CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES) && !defined(CRYPTOPP_IMPORTS)
00288 #define CRYPTOPP_DLL_TEMPLATE_CLASS template class CRYPTOPP_DLL
00289 #elif defined(__MWERKS__)
00290 #define CRYPTOPP_DLL_TEMPLATE_CLASS extern class CRYPTOPP_DLL
00291 #else
00292 #define CRYPTOPP_DLL_TEMPLATE_CLASS extern template class CRYPTOPP_DLL
00293 #endif
00294
00295 #if defined(CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES) && !defined(CRYPTOPP_EXPORTS)
00296 #define CRYPTOPP_STATIC_TEMPLATE_CLASS template class
00297 #elif defined(__MWERKS__)
00298 #define CRYPTOPP_STATIC_TEMPLATE_CLASS extern class
00299 #else
00300 #define CRYPTOPP_STATIC_TEMPLATE_CLASS extern template class
00301 #endif
00302
00303 #endif
Generated on Wed Jul 21 19:15:21 2004 for Crypto++ by
1.3.7-20040704