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 <dlfcn.h> header file. */ 00019 #define HAVE_DLFCN_H 1 00020 00021 /* Define to 1 if you have the <inttypes.h> header file. */ 00022 #define HAVE_INTTYPES_H 1 00023 00024 /* Define to 1 if you have the <memory.h> header file. */ 00025 #define HAVE_MEMORY_H 1 00026 00027 /* Define to 1 if you have the <stdint.h> header file. */ 00028 #define HAVE_STDINT_H 1 00029 00030 /* Define to 1 if you have the <stdlib.h> header file. */ 00031 #define HAVE_STDLIB_H 1 00032 00033 /* Define to 1 if you have the <strings.h> header file. */ 00034 #define HAVE_STRINGS_H 1 00035 00036 /* Define to 1 if you have the <string.h> header file. */ 00037 #define HAVE_STRING_H 1 00038 00039 /* Define to 1 if you have the <sys/stat.h> header file. */ 00040 #define HAVE_SYS_STAT_H 1 00041 00042 /* Define to 1 if you have the <sys/types.h> header file. */ 00043 #define HAVE_SYS_TYPES_H 1 00044 00045 /* Define to 1 if you have the <unistd.h> header file. */ 00046 #define HAVE_UNISTD_H 1 00047 00048 /* Big-endian architecture */ 00049 #define IS_BIG_ENDIAN 00050 00051 /* Little-endian architecture */ 00052 /* #undef IS_LITTLE_ENDIAN */ 00053 00054 /* Define to the address where bug reports for this package should be sent. */ 00055 #define PACKAGE_BUGREPORT "" 00056 00057 /* Define to the full name of this package. */ 00058 #define PACKAGE_NAME "crypto++" 00059 00060 /* Define to the full name and version of this package. */ 00061 #define PACKAGE_STRING "crypto++ 5.1" 00062 00063 /* Define to the one symbol short name of this package. */ 00064 #define PACKAGE_TARNAME "crypto--" 00065 00066 /* Define to the version of this package. */ 00067 #define PACKAGE_VERSION "5.1" 00068 00069 /* The size of a `long', as computed by sizeof. */ 00070 #define SIZEOF_LONG 4 00071 00072 /* Define to 1 if you have the ANSI C header files. */ 00073 #define STDC_HEADERS 1 00074 00075 00076 00077 #ifndef CRYPTOPP_BUILD 00078 00079 /* Restore PACKAGE_* macro values to prevent conflicts when linking 00080 Crypto++ to other code */ 00081 00082 #define PACKAGE_BUGREPORT "" 00083 #define PACKAGE_NAME "crypto++" 00084 #define PACKAGE_STRING "crypto++ 5.1" 00085 #define PACKAGE_TARNAME "crypto--" 00086 #define PACKAGE_VERSION "5.1" 00087 #define PACKAGE_BUGREPORT "" 00088 #define PACKAGE_NAME "crypto++" 00089 #define PACKAGE_STRING "crypto++ 5.1" 00090 #define PACKAGE_TARNAME "crypto--" 00091 #define PACKAGE_VERSION "5.1" 00092 00093 #endif 00094 00095 // ***************** Important Settings ******************** 00096 00097 // define this if you want to disable all OS-dependent features, 00098 // such as sockets and OS-provided random number generators 00099 // #define NO_OS_DEPENDENCE 00100 00101 // Define this to use features provided by Microsoft's CryptoAPI. 00102 // Currently the only feature used is random number generation. 00103 // This macro will be ignored if NO_OS_DEPENDENCE is defined. 00104 #define USE_MS_CRYPTOAPI 00105 00106 // Define this to 1 to enforce the requirement in FIPS 186-2 Change Notice 1 that only 1024 bit moduli be used 00107 #ifndef DSA_1024_BIT_MODULUS_ONLY 00108 # define DSA_1024_BIT_MODULUS_ONLY 1 00109 #endif 00110 00111 // ***************** Less Important Settings *************** 00112 00113 // define this to retain (as much as possible) old deprecated function and class names 00114 // #define CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY 00115 00116 #define GZIP_OS_CODE 0 00117 00118 // Try this if your CPU has 256K internal cache or a slow multiply instruction 00119 // and you want a (possibly) faster IDEA implementation using log tables 00120 // #define IDEA_LARGECACHE 00121 00122 // Try this if you have a large cache or your CPU is slow manipulating 00123 // individual bytes. 00124 // #define DIAMOND_USE_PERMTABLE 00125 00126 // Define this if, for the linear congruential RNG, you want to use 00127 // the original constants as specified in S.K. Park and K.W. Miller's 00128 // CACM paper. 00129 // #define LCRNG_ORIGINAL_NUMBERS 00130 00131 // choose which style of sockets to wrap (mostly useful for cygwin which has both) 00132 #define PREFER_BERKELEY_STYLE_SOCKETS 00133 // #define PREFER_WINDOWS_STYLE_SOCKETS 00134 00135 // ***************** Important Settings Again ******************** 00136 // But the defaults should be ok. 00137 00138 // namespace support is now required 00139 #ifdef NO_NAMESPACE 00140 # error namespace support is now required 00141 #endif 00142 00143 // Define this to workaround a Microsoft CryptoAPI bug where 00144 // each call to CryptAcquireContext causes a 100 KB memory leak. 00145 // Defining this will cause Crypto++ to make only one call to CryptAcquireContext. 00146 #define WORKAROUND_MS_BUG_Q258000 00147 00148 // Avoid putting "CryptoPP::" in front of everything in Doxygen output 00149 #ifdef CRYPTOPP_DOXYGEN_PROCESSING 00150 # define CryptoPP 00151 # define NAMESPACE_BEGIN(x) 00152 # define NAMESPACE_END 00153 #else 00154 # define NAMESPACE_BEGIN(x) namespace x { 00155 # define NAMESPACE_END } 00156 #endif 00157 #define ANONYMOUS_NAMESPACE_BEGIN namespace { 00158 #define USING_NAMESPACE(x) using namespace x; 00159 #define DOCUMENTED_NAMESPACE_BEGIN(x) namespace x { 00160 #define DOCUMENTED_NAMESPACE_END } 00161 00162 // What is the type of the third parameter to bind? 00163 // For Unix, the new standard is ::socklen_t (typically unsigned int), and the old standard is int. 00164 // Unfortunately there is no way to tell whether or not socklen_t is defined. 00165 // To work around this, TYPE_OF_SOCKLEN_T is a macro so that you can change it from the makefile. 00166 #ifndef TYPE_OF_SOCKLEN_T 00167 # if defined(_WIN32) || defined(__CYGWIN__) || defined(__MACH__) 00168 # define TYPE_OF_SOCKLEN_T int 00169 # else 00170 # define TYPE_OF_SOCKLEN_T ::socklen_t 00171 # endif 00172 #endif 00173 00174 #if defined(__CYGWIN__) && defined(PREFER_WINDOWS_STYLE_SOCKETS) 00175 # define __USE_W32_SOCKETS 00176 #endif 00177 00178 typedef unsigned char byte; // moved outside namespace for Borland C++Builder 5 00179 00180 NAMESPACE_BEGIN(CryptoPP) 00181 00182 typedef unsigned short word16; 00183 #if !defined(_MSC_VER) && (SIZEOF_LONG != 4) 00184 typedef unsigned int word32; 00185 #else 00186 typedef unsigned long word32; 00187 #endif 00188 00189 #if defined(__GNUC__) || defined(__MWERKS__) 00190 # define WORD64_AVAILABLE 00191 typedef unsigned long long word64; 00192 # define W64LIT(x) x##LL 00193 #elif defined(_MSC_VER) || defined(__BCPLUSPLUS__) 00194 # define WORD64_AVAILABLE 00195 typedef unsigned __int64 word64; 00196 # define W64LIT(x) x##ui64 00197 #endif 00198 00199 // defined this if your CPU is not 64-bit 00200 #if defined(WORD64_AVAILABLE) && (SIZEOF_LONG != 8) 00201 # define SLOW_WORD64 00202 #endif 00203 00204 // word should have the same size as your CPU registers 00205 // dword should be twice as big as word 00206 00207 #if (defined(__GNUC__) && (SIZEOF_LONG == 4)) || defined(__MWERKS__) 00208 typedef unsigned long word; 00209 typedef unsigned long long dword; 00210 #elif defined(_MSC_VER) || defined(__BCPLUSPLUS__) 00211 typedef unsigned __int32 word; 00212 typedef unsigned __int64 dword; 00213 #else 00214 typedef unsigned int word; 00215 typedef unsigned long dword; 00216 #endif 00217 00218 const unsigned int WORD_SIZE = sizeof(word); 00219 const unsigned int WORD_BITS = WORD_SIZE * 8; 00220 00221 #define LOW_WORD(x) (word)(x) 00222 00223 union dword_union 00224 { 00225 dword_union (const dword &dw) : dw(dw) {} 00226 dword dw; 00227 word w[2]; 00228 }; 00229 00230 #ifdef IS_LITTLE_ENDIAN 00231 # define HIGH_WORD(x) (dword_union(x).w[1]) 00232 #else 00233 # define HIGH_WORD(x) (dword_union(x).w[0]) 00234 #endif 00235 00236 // if the above HIGH_WORD macro doesn't work (if you are not sure, compile it 00237 // and run the validation tests), try this: 00238 // #define HIGH_WORD(x) (word)((x)>>WORD_BITS) 00239 00240 #if defined(_MSC_VER) || defined(__BCPLUSPLUS__) 00241 # define INTEL_INTRINSICS 00242 # define FAST_ROTATE 00243 #elif defined(__MWERKS__) && TARGET_CPU_PPC 00244 # define PPC_INTRINSICS 00245 # define FAST_ROTATE 00246 #elif defined(__GNUC__) && defined(__i386__) 00247 // GCC does peephole optimizations which should result in using rotate instructions 00248 # define FAST_ROTATE 00249 #endif 00250 00251 NAMESPACE_END 00252 00253 // VC60 workaround: it doesn't allow typename in some places 00254 #if defined(_MSC_VER) && (_MSC_VER < 1300) 00255 #define CPP_TYPENAME 00256 #else 00257 #define CPP_TYPENAME typename 00258 #endif 00259 00260 #ifdef _MSC_VER 00261 // 4250: dominance 00262 // 4660: explicitly instantiating a class that's already implicitly instantiated 00263 // 4661: no suitable definition provided for explicit template instantiation request 00264 // 4786: identifer was truncated in debug information 00265 // 4355: 'this' : used in base member initializer list 00266 # pragma warning(disable: 4250 4660 4661 4786 4355) 00267 #endif 00268 00269 // ***************** determine availability of OS features ******************** 00270 00271 #ifndef NO_OS_DEPENDENCE 00272 00273 #if defined(_WIN32) || defined(__CYGWIN__) 00274 #define CRYPTOPP_WIN32_AVAILABLE 00275 #endif 00276 00277 #if defined(__unix__) || defined(__MACH__) 00278 #define CRYPTOPP_UNIX_AVAILABLE 00279 #endif 00280 00281 #if defined(WORD64_AVAILABLE) && (defined(CRYPTOPP_WIN32_AVAILABLE) || defined(CRYPTOPP_UNIX_AVAILABLE) || defined(macintosh)) 00282 # define HIGHRES_TIMER_AVAILABLE 00283 #endif 00284 00285 #ifdef CRYPTOPP_UNIX_AVAILABLE 00286 # define HAS_BERKELEY_STYLE_SOCKETS 00287 #endif 00288 00289 #ifdef CRYPTOPP_WIN32_AVAILABLE 00290 # define HAS_WINDOWS_STYLE_SOCKETS 00291 #endif 00292 00293 #if defined(HIGHRES_TIMER_AVAILABLE) && (defined(HAS_BERKELEY_STYLE_SOCKETS) || defined(HAS_WINDOWS_STYLE_SOCKETS)) 00294 # define SOCKETS_AVAILABLE 00295 #endif 00296 00297 #if defined(HAS_WINDOWS_STYLE_SOCKETS) && (!defined(HAS_BERKELEY_STYLE_SOCKETS) || defined(PREFER_WINDOWS_STYLE_SOCKETS)) 00298 # define USE_WINDOWS_STYLE_SOCKETS 00299 #else 00300 # define USE_BERKELEY_STYLE_SOCKETS 00301 #endif 00302 00303 #if defined(CRYPTOPP_WIN32_AVAILABLE) && !defined(USE_BERKELEY_STYLE_SOCKETS) 00304 # define WINDOWS_PIPES_AVAILABLE 00305 #endif 00306 00307 #if defined(CRYPTOPP_WIN32_AVAILABLE) && defined(USE_MS_CRYPTOAPI) 00308 # define NONBLOCKING_RNG_AVAILABLE 00309 # define OS_RNG_AVAILABLE 00310 #endif 00311 00312 #ifdef CRYPTOPP_UNIX_AVAILABLE 00313 # define NONBLOCKING_RNG_AVAILABLE 00314 # define BLOCKING_RNG_AVAILABLE 00315 # define OS_RNG_AVAILABLE 00316 # define HAS_PTHREADS 00317 # define THREADS_AVAILABLE 00318 #endif 00319 00320 #ifdef CRYPTOPP_WIN32_AVAILABLE 00321 # define HAS_WINTHREADS 00322 # define THREADS_AVAILABLE 00323 #endif 00324 00325 #endif // NO_OS_DEPENDENCE 00326 00327 #endif 00328

Generated on Wed Jul 28 08:07:06 2004 for Crypto++ by doxygen 1.3.7