Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

cryptopp_config.h

00001 /* cryptopp_config.h. Generated by configure. */ 00002 /* cryptopp_config.h.in. Generated from configure.in by autoheader. */ 00003 00004 00005 #ifndef CRYPTOPP_CONFIG_H 00006 #define CRYPTOPP_CONFIG_H 00007 00008 /* Save PACKAGE_* macro values to prevent conflicts when linking 00009 Crypto++ to other code */ 00010 00011 #define _PACKAGE_BUGREPORT PACKAGE_BUGREPORT 00012 #define _PACKAGE_NAME PACKAGE_NAME 00013 #define _PACKAGE_STRING PACKAGE_STRING 00014 #define _PACKAGE_TARNAME PACKAGE_TARNAME 00015 #define _PACKAGE_VERSION PACKAGE_VERSION 00016 00017 00018 /* Define to 1 if you have the <arpa/inet.h> header file. */ 00019 #define HAVE_ARPA_INET_H 1 00020 00021 /* Define to 1 if you have the <dlfcn.h> header file. */ 00022 #define HAVE_DLFCN_H 1 00023 00024 /* Define to 1 if you have the <fcntl.h> header file. */ 00025 #define HAVE_FCNTL_H 1 00026 00027 /* Define to 1 if you have the `gethostbyname' function. */ 00028 #define HAVE_GETHOSTBYNAME 1 00029 00030 /* Define to 1 if you have the `gettimeofday' function. */ 00031 #define HAVE_GETTIMEOFDAY 1 00032 00033 /* Define to 1 if you have the <inttypes.h> header file. */ 00034 #define HAVE_INTTYPES_H 1 00035 00036 /* Define to 1 if you have the <limits.h> header file. */ 00037 #define HAVE_LIMITS_H 1 00038 00039 /* Define to 1 if your system has a GNU libc compatible `malloc' function, and 00040 to 0 otherwise. */ 00041 #define HAVE_MALLOC 1 00042 00043 /* Define to 1 if you have the <malloc.h> header file. */ 00044 #define HAVE_MALLOC_H 1 00045 00046 /* Define to 1 if you have the `memmove' function. */ 00047 #define HAVE_MEMMOVE 1 00048 00049 /* Define to 1 if you have the <memory.h> header file. */ 00050 #define HAVE_MEMORY_H 1 00051 00052 /* Define to 1 if you have the `memset' function. */ 00053 #define HAVE_MEMSET 1 00054 00055 /* Define to 1 if you have the <netdb.h> header file. */ 00056 #define HAVE_NETDB_H 1 00057 00058 /* Define to 1 if you have the <netinet/in.h> header file. */ 00059 #define HAVE_NETINET_IN_H 1 00060 00061 /* Define to 1 if you have the `pow' function. */ 00062 /* #undef HAVE_POW */ 00063 00064 /* Define to 1 if the system has the type `ptrdiff_t'. */ 00065 #define HAVE_PTRDIFF_T 1 00066 00067 /* Define to 1 if you have the `select' function. */ 00068 #define HAVE_SELECT 1 00069 00070 /* Define to 1 if you have the `socket' function. */ 00071 #define HAVE_SOCKET 1 00072 00073 /* Define to 1 if stdbool.h conforms to C99. */ 00074 #define HAVE_STDBOOL_H 1 00075 00076 /* Define to 1 if you have the <stddef.h> header file. */ 00077 #define HAVE_STDDEF_H 1 00078 00079 /* Define to 1 if you have the <stdint.h> header file. */ 00080 #define HAVE_STDINT_H 1 00081 00082 /* Define to 1 if you have the <stdlib.h> header file. */ 00083 #define HAVE_STDLIB_H 1 00084 00085 /* Define to 1 if you have the <strings.h> header file. */ 00086 #define HAVE_STRINGS_H 1 00087 00088 /* Define to 1 if you have the <string.h> header file. */ 00089 #define HAVE_STRING_H 1 00090 00091 /* Define to 1 if you have the <sys/ioctl.h> header file. */ 00092 #define HAVE_SYS_IOCTL_H 1 00093 00094 /* Define to 1 if you have the <sys/select.h> header file. */ 00095 #define HAVE_SYS_SELECT_H 1 00096 00097 /* Define to 1 if you have the <sys/socket.h> header file. */ 00098 #define HAVE_SYS_SOCKET_H 1 00099 00100 /* Define to 1 if you have the <sys/stat.h> header file. */ 00101 #define HAVE_SYS_STAT_H 1 00102 00103 /* Define to 1 if you have the <sys/time.h> header file. */ 00104 #define HAVE_SYS_TIME_H 1 00105 00106 /* Define to 1 if you have the <sys/types.h> header file. */ 00107 #define HAVE_SYS_TYPES_H 1 00108 00109 /* Define to 1 if you have the <unistd.h> header file. */ 00110 #define HAVE_UNISTD_H 1 00111 00112 /* Define to 1 if the system has the type `_Bool'. */ 00113 #define HAVE__BOOL 1 00114 00115 /* Big-endian architecture */ 00116 /* #undef IS_BIG_ENDIAN */ 00117 00118 /* Little-endian architecture */ 00119 #define IS_LITTLE_ENDIAN 00120 00121 /* Define to the address where bug reports for this package should be sent. */ 00122 #define PACKAGE_BUGREPORT "" 00123 00124 /* Define to the full name of this package. */ 00125 #define PACKAGE_NAME "crypto++" 00126 00127 /* Define to the full name and version of this package. */ 00128 #define PACKAGE_STRING "crypto++ 5.2" 00129 00130 /* Define to the one symbol short name of this package. */ 00131 #define PACKAGE_TARNAME "crypto--" 00132 00133 /* Define to the version of this package. */ 00134 #define PACKAGE_VERSION "5.2" 00135 00136 /* Define as the return type of signal handlers (`int' or `void'). */ 00137 #define RETSIGTYPE void 00138 00139 /* Define to the type of arg 1 for `select'. */ 00140 #define SELECT_TYPE_ARG1 int 00141 00142 /* Define to the type of args 2, 3 and 4 for `select'. */ 00143 #define SELECT_TYPE_ARG234 (fd_set *) 00144 00145 /* Define to the type of arg 5 for `select'. */ 00146 #define SELECT_TYPE_ARG5 (struct timeval *) 00147 00148 /* The size of a `long', as computed by sizeof. */ 00149 #define SIZEOF_LONG 4 00150 00151 /* Define to 1 if you have the ANSI C header files. */ 00152 #define STDC_HEADERS 1 00153 00154 /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ 00155 #define TIME_WITH_SYS_TIME 1 00156 00157 /* int socket */ 00158 /* #undef TYPE_OF_SOCKLEN_T */ 00159 00160 /* Define to empty if `const' does not conform to ANSI C. */ 00161 /* #undef const */ 00162 00163 /* Define to `__inline__' or `__inline' if that's what the C compiler 00164 calls it, or to nothing if 'inline' is not supported under any name. */ 00165 #ifndef __cplusplus 00166 /* #undef inline */ 00167 #endif 00168 00169 /* Define to rpl_malloc if the replacement function should be used. */ 00170 /* #undef malloc */ 00171 00172 /* Define to `unsigned' if <sys/types.h> does not define. */ 00173 /* #undef size_t */ 00174 00175 00176 00177 #ifndef CRYPTOPP_BUILD 00178 00179 /* Restore PACKAGE_* macro values to prevent conflicts when linking 00180 Crypto++ to other code */ 00181 00182 #define PACKAGE_BUGREPORT "" 00183 #define PACKAGE_NAME "crypto++" 00184 #define PACKAGE_STRING "crypto++ 5.2" 00185 #define PACKAGE_TARNAME "crypto--" 00186 #define PACKAGE_VERSION "5.2" 00187 #define PACKAGE_BUGREPORT "" 00188 #define PACKAGE_NAME "crypto++" 00189 #define PACKAGE_STRING "crypto++ 5.2" 00190 #define PACKAGE_TARNAME "crypto--" 00191 #define PACKAGE_VERSION "5.2" 00192 00193 #endif 00194 00195 // ***************** Important Settings ******************** 00196 00197 // define this if you want to disable all OS-dependent features, 00198 // such as sockets and OS-provided random number generators 00199 // #define NO_OS_DEPENDENCE 00200 00201 // Define this to use features provided by Microsoft's CryptoAPI. 00202 // Currently the only feature used is random number generation. 00203 // This macro will be ignored if NO_OS_DEPENDENCE is defined. 00204 #define USE_MS_CRYPTOAPI 00205 00206 // Define this to 1 to enforce the requirement in FIPS 186-2 Change Notice 1 that only 1024 bit moduli be used 00207 #ifndef DSA_1024_BIT_MODULUS_ONLY 00208 # define DSA_1024_BIT_MODULUS_ONLY 1 00209 #endif 00210 00211 // ***************** Less Important Settings *************** 00212 00213 // define this to retain (as much as possible) old deprecated function and class names 00214 // #define CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY 00215 00216 #define GZIP_OS_CODE 0 00217 00218 // Try this if your CPU has 256K internal cache or a slow multiply instruction 00219 // and you want a (possibly) faster IDEA implementation using log tables 00220 // #define IDEA_LARGECACHE 00221 00222 // Define this if, for the linear congruential RNG, you want to use 00223 // the original constants as specified in S.K. Park and K.W. Miller's 00224 // CACM paper. 00225 // #define LCRNG_ORIGINAL_NUMBERS 00226 00227 // choose which style of sockets to wrap (mostly useful for cygwin which has both) 00228 #define PREFER_BERKELEY_STYLE_SOCKETS 00229 // #define PREFER_WINDOWS_STYLE_SOCKETS 00230 00231 // ***************** Important Settings Again ******************** 00232 // But the defaults should be ok. 00233 00234 // namespace support is now required 00235 #ifdef NO_NAMESPACE 00236 # error namespace support is now required 00237 #endif 00238 00239 // Define this to workaround a Microsoft CryptoAPI bug where 00240 // each call to CryptAcquireContext causes a 100 KB memory leak. 00241 // Defining this will cause Crypto++ to make only one call to CryptAcquireContext. 00242 #define WORKAROUND_MS_BUG_Q258000 00243 00244 #ifdef CRYPTOPP_DOXYGEN_PROCESSING 00245 // Avoid putting "CryptoPP::" in front of everything in Doxygen output 00246 # define CryptoPP 00247 # define NAMESPACE_BEGIN(x) 00248 # define NAMESPACE_END 00249 // Get Doxygen to generate better documentation for these typedefs 00250 # define DOCUMENTED_TYPEDEF(x, y) class y : public x {}; 00251 #else 00252 # define NAMESPACE_BEGIN(x) namespace x { 00253 # define NAMESPACE_END } 00254 # define DOCUMENTED_TYPEDEF(x, y) typedef x y; 00255 #endif 00256 #define ANONYMOUS_NAMESPACE_BEGIN namespace { 00257 #define USING_NAMESPACE(x) using namespace x; 00258 #define DOCUMENTED_NAMESPACE_BEGIN(x) namespace x { 00259 #define DOCUMENTED_NAMESPACE_END } 00260 00261 00262 #ifndef TYPE_OF_SOCKLEN_T 00263 # if defined(_WIN32) || defined(__CYGWIN__) || defined(__MACH__) 00264 # define TYPE_OF_SOCKLEN_T int 00265 # else 00266 # define TYPE_OF_SOCKLEN_T ::socklen_t 00267 # endif 00268 #endif 00269 00270 #if defined(__CYGWIN__) && defined(PREFER_WINDOWS_STYLE_SOCKETS) 00271 # define __USE_W32_SOCKETS 00272 #endif 00273 00274 typedef unsigned char byte; // put in global namespace to avoid ambiguity with other byte typedefs 00275 00276 NAMESPACE_BEGIN(CryptoPP) 00277 00278 typedef unsigned short word16; 00279 typedef unsigned int word32; 00280 00281 #if defined(__GNUC__) || defined(__MWERKS__) 00282 #define WORD64_AVAILABLE 00283 typedef unsigned long long word64; 00284 #define W64LIT(x) x##LL 00285 #elif defined(_MSC_VER) || defined(__BCPLUSPLUS__) 00286 #define WORD64_AVAILABLE 00287 typedef unsigned __int64 word64; 00288 #define W64LIT(x) x##ui64 00289 #endif 00290 00291 // define largest word type 00292 #ifdef WORD64_AVAILABLE 00293 typedef word64 lword; 00294 #else 00295 typedef word32 lword; 00296 #endif 00297 00298 #if defined(__alpha__) || defined(__ia64__) || defined(_ARCH_PPC64) || defined(__x86_64__) || defined(__mips64) 00299 // These platforms have 64-bit CPU registers. Unfortunately most C++ compilers doesn't 00300 // allow any way to access the 64-bit by 64-bit multiply instruction without using 00301 // assembly, so in order to use word64 as word, the assembly instruction must be defined 00302 // in Dword::Multiply(). 00303 typedef word32 hword; 00304 typedef word64 word; 00305 #else 00306 #define CRYPTOPP_NATIVE_DWORD_AVAILABLE 00307 #ifdef WORD64_AVAILABLE 00308 #define CRYPTOPP_SLOW_WORD64 // defined this if your CPU is not 64-bit to use alternative code that avoids word64 00309 typedef word16 hword; 00310 typedef word32 word; 00311 typedef word64 dword; 00312 #else 00313 typedef word8 hword; 00314 typedef word16 word; 00315 typedef word32 dword; 00316 #endif 00317 #endif 00318 00319 const unsigned int WORD_SIZE = sizeof(word); 00320 const unsigned int WORD_BITS = WORD_SIZE * 8; 00321 00322 #if defined(_MSC_VER) || defined(__BCPLUSPLUS__) 00323 #define INTEL_INTRINSICS 00324 #define FAST_ROTATE 00325 #elif defined(__MWERKS__) && TARGET_CPU_PPC 00326 #define PPC_INTRINSICS 00327 #define FAST_ROTATE 00328 #elif defined(__GNUC__) && defined(__i386__) 00329 // GCC does peephole optimizations which should result in using rotate instructions 00330 #define FAST_ROTATE 00331 #endif 00332 00333 NAMESPACE_END 00334 00335 // VC60 workaround: it doesn't allow typename in some places 00336 #if defined(_MSC_VER) && (_MSC_VER < 1300) 00337 #define CPP_TYPENAME 00338 #else 00339 #define CPP_TYPENAME typename 00340 #endif 00341 00342 #ifdef _MSC_VER 00343 #define CRYPTOPP_NO_VTABLE __declspec(novtable) 00344 #else 00345 #define CRYPTOPP_NO_VTABLE 00346 #endif 00347 00348 #ifdef _MSC_VER 00349 // 4231: nonstandard extension used : 'extern' before template explicit instantiation 00350 // 4250: dominance 00351 // 4251: member needs to have dll-interface 00352 // 4275: base needs to have dll-interface 00353 // 4660: explicitly instantiating a class that's already implicitly instantiated 00354 // 4661: no suitable definition provided for explicit template instantiation request 00355 // 4786: identifer was truncated in debug information 00356 // 4355: 'this' : used in base member initializer list 00357 # pragma warning(disable: 4231 4250 4251 4275 4660 4661 4786 4355) 00358 #endif 00359 00360 #if (defined(_MSC_VER) && _MSC_VER <= 1300) || defined(__MWERKS__) || defined(_STLPORT_VERSION) 00361 #define CRYPTOPP_DISABLE_UNCAUGHT_EXCEPTION 00362 #endif 00363 00364 #ifndef CRYPTOPP_DISABLE_UNCAUGHT_EXCEPTION 00365 #define CRYPTOPP_UNCAUGHT_EXCEPTION_AVAILABLE 00366 #endif 00367 00368 // CodeWarrior defines _MSC_VER 00369 #if !defined(CRYPTOPP_DISABLE_X86ASM) && ((defined(_MSC_VER) && !defined(__MWERKS__) && defined(_M_IX86)) || (defined(__GNUC__) && defined(__i386__))) 00370 #define CRYPTOPP_X86ASM_AVAILABLE 00371 #endif 00372 00373 // ***************** determine availability of OS features ******************** 00374 00375 #ifndef NO_OS_DEPENDENCE 00376 00377 #if defined(_WIN32) || defined(__CYGWIN__) 00378 #define CRYPTOPP_WIN32_AVAILABLE 00379 #endif 00380 00381 #if defined(__unix__) || defined(__MACH__) 00382 #define CRYPTOPP_UNIX_AVAILABLE 00383 #endif 00384 00385 #if defined(WORD64_AVAILABLE) && (defined(CRYPTOPP_WIN32_AVAILABLE) || defined(CRYPTOPP_UNIX_AVAILABLE)) 00386 # define HIGHRES_TIMER_AVAILABLE 00387 #endif 00388 00389 #ifdef CRYPTOPP_UNIX_AVAILABLE 00390 # define HAS_BERKELEY_STYLE_SOCKETS 00391 #endif 00392 00393 #ifdef CRYPTOPP_WIN32_AVAILABLE 00394 # define HAS_WINDOWS_STYLE_SOCKETS 00395 #endif 00396 00397 #if defined(HIGHRES_TIMER_AVAILABLE) && (defined(HAS_BERKELEY_STYLE_SOCKETS) || defined(HAS_WINDOWS_STYLE_SOCKETS)) 00398 # define SOCKETS_AVAILABLE 00399 #endif 00400 00401 #if defined(HAS_WINDOWS_STYLE_SOCKETS) && (!defined(HAS_BERKELEY_STYLE_SOCKETS) || defined(PREFER_WINDOWS_STYLE_SOCKETS)) 00402 # define USE_WINDOWS_STYLE_SOCKETS 00403 #else 00404 # define USE_BERKELEY_STYLE_SOCKETS 00405 #endif 00406 00407 #if defined(CRYPTOPP_WIN32_AVAILABLE) && !defined(USE_BERKELEY_STYLE_SOCKETS) 00408 # define WINDOWS_PIPES_AVAILABLE 00409 #endif 00410 00411 #if defined(CRYPTOPP_WIN32_AVAILABLE) && defined(USE_MS_CRYPTOAPI) 00412 # define NONBLOCKING_RNG_AVAILABLE 00413 # define OS_RNG_AVAILABLE 00414 #endif 00415 00416 #if defined(CRYPTOPP_UNIX_AVAILABLE) || defined(CRYPTOPP_DOXYGEN_PROCESSING) 00417 # define NONBLOCKING_RNG_AVAILABLE 00418 # define BLOCKING_RNG_AVAILABLE 00419 # define OS_RNG_AVAILABLE 00420 # define HAS_PTHREADS 00421 # define THREADS_AVAILABLE 00422 #endif 00423 00424 #ifdef CRYPTOPP_WIN32_AVAILABLE 00425 # define HAS_WINTHREADS 00426 # define THREADS_AVAILABLE 00427 #endif 00428 00429 #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) 00430 # define CRYPTOPP_MALLOC_ALIGNMENT_IS_16 00431 #endif 00432 00433 #if defined(__linux__) || defined(__sun__) || defined(__CYGWIN__) 00434 # define CRYPTOPP_MEMALIGN_AVAILABLE 00435 #endif 00436 00437 #endif // NO_OS_DEPENDENCE 00438 00439 // ***************** DLL related ******************** 00440 00441 #ifdef CRYPTOPP_WIN32_AVAILABLE 00442 00443 #ifdef CRYPTOPP_EXPORTS 00444 #define CRYPTOPP_IS_DLL 00445 #define CRYPTOPP_DLL __declspec(dllexport) 00446 #elif defined(CRYPTOPP_IMPORTS) 00447 #define CRYPTOPP_IS_DLL 00448 #define CRYPTOPP_DLL __declspec(dllimport) 00449 #else 00450 #define CRYPTOPP_DLL 00451 #endif 00452 00453 #define CRYPTOPP_API __stdcall 00454 #define CRYPTOPP_CDECL __cdecl 00455 00456 #else // CRYPTOPP_WIN32_AVAILABLE 00457 00458 #define CRYPTOPP_DLL 00459 #define CRYPTOPP_API 00460 #define CRYPTOPP_CDECL 00461 00462 #endif // CRYPTOPP_WIN32_AVAILABLE 00463 00464 #if defined(CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES) && !defined(CRYPTOPP_IMPORTS) 00465 #define CRYPTOPP_DLL_TEMPLATE_CLASS template class CRYPTOPP_DLL 00466 #elif defined(__MWERKS__) 00467 #define CRYPTOPP_DLL_TEMPLATE_CLASS extern class CRYPTOPP_DLL 00468 #else 00469 #define CRYPTOPP_DLL_TEMPLATE_CLASS extern template class CRYPTOPP_DLL 00470 #endif 00471 00472 #if defined(CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES) && !defined(CRYPTOPP_EXPORTS) 00473 #define CRYPTOPP_STATIC_TEMPLATE_CLASS template class 00474 #elif defined(__MWERKS__) 00475 #define CRYPTOPP_STATIC_TEMPLATE_CLASS extern class 00476 #else 00477 #define CRYPTOPP_STATIC_TEMPLATE_CLASS extern template class 00478 #endif 00479 00480 #endif 00481

Generated on Fri Aug 27 14:06:57 2004 for Crypto++ by doxygen 1.3.8