00001
00002
00003
00004
00005 #ifndef CRYPTOPP_CONFIG_H
00006 #define CRYPTOPP_CONFIG_H
00007
00008
00009
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
00019 #define HAVE_DLFCN_H 1
00020
00021
00022 #define HAVE_INTTYPES_H 1
00023
00024
00025 #define HAVE_MEMORY_H 1
00026
00027
00028 #define HAVE_STDINT_H 1
00029
00030
00031 #define HAVE_STDLIB_H 1
00032
00033
00034 #define HAVE_STRINGS_H 1
00035
00036
00037 #define HAVE_STRING_H 1
00038
00039
00040 #define HAVE_SYS_STAT_H 1
00041
00042
00043 #define HAVE_SYS_TYPES_H 1
00044
00045
00046 #define HAVE_UNISTD_H 1
00047
00048
00049 #define PACKAGE_BUGREPORT ""
00050
00051
00052 #define PACKAGE_NAME "crypto++"
00053
00054
00055 #define PACKAGE_STRING "crypto++ 5.1"
00056
00057
00058 #define PACKAGE_TARNAME "crypto--"
00059
00060
00061 #define PACKAGE_VERSION "5.1"
00062
00063
00064 #define STDC_HEADERS 1
00065
00066
00067
00068
00069
00070
00071
00072 #ifndef CRYPTOPP_BUILD
00073
00074
00075
00076
00077 #define PACKAGE_BUGREPORT ""
00078 #define PACKAGE_NAME "crypto++"
00079 #define PACKAGE_STRING "crypto++ 5.1"
00080 #define PACKAGE_TARNAME "crypto--"
00081 #define PACKAGE_VERSION "5.1"
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
00088 #endif
00089
00090
00091
00092 #ifdef WORDS_BIGENDIAN
00093 # define IS_BIG_ENDIAN
00094 #else
00095
00096 # if !defined(IS_LITTLE_ENDIAN) && (defined(__BIG_ENDIAN__) || defined(__sparc) || defined(__sparc__) || defined(__hppa__) || defined(__PPC__) || defined(__mips__) || (defined(__MWERKS__) && !defined(__INTEL__)))
00097 # define IS_BIG_ENDIAN
00098 # endif
00099 #endif
00100
00101
00102
00103 #ifndef IS_BIG_ENDIAN
00104 # define IS_LITTLE_ENDIAN
00105 #endif
00106
00107
00108
00109
00110
00111
00112
00113
00114 #define USE_MS_CRYPTOAPI
00115
00116
00117 #ifndef DSA_1024_BIT_MODULUS_ONLY
00118 # define DSA_1024_BIT_MODULUS_ONLY 1
00119 #endif
00120
00121
00122
00123
00124
00125
00126 #define GZIP_OS_CODE 0
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142 #define PREFER_BERKELEY_STYLE_SOCKETS
00143
00144
00145
00146
00147
00148
00149 #ifdef NO_NAMESPACE
00150 # error namespace support is now required
00151 #endif
00152
00153
00154
00155
00156 #define WORKAROUND_MS_BUG_Q258000
00157
00158
00159 #ifdef CRYPTOPP_DOXYGEN_PROCESSING
00160 # define CryptoPP
00161 # define NAMESPACE_BEGIN(x)
00162 # define NAMESPACE_END
00163 #else
00164 # define NAMESPACE_BEGIN(x) namespace x {
00165 # define NAMESPACE_END }
00166 #endif
00167 #define ANONYMOUS_NAMESPACE_BEGIN namespace {
00168 #define USING_NAMESPACE(x) using namespace x;
00169 #define DOCUMENTED_NAMESPACE_BEGIN(x) namespace x {
00170 #define DOCUMENTED_NAMESPACE_END }
00171
00172
00173
00174
00175
00176 #ifndef TYPE_OF_SOCKLEN_T
00177 # if defined(_WIN32) || defined(__CYGWIN__) || defined(__MACH__)
00178 # define TYPE_OF_SOCKLEN_T int
00179 # else
00180 # define TYPE_OF_SOCKLEN_T ::socklen_t
00181 # endif
00182 #endif
00183
00184 #if defined(__CYGWIN__) && defined(PREFER_WINDOWS_STYLE_SOCKETS)
00185 # define __USE_W32_SOCKETS
00186 #endif
00187
00188 typedef unsigned char byte;
00189
00190 NAMESPACE_BEGIN(CryptoPP)
00191
00192 typedef unsigned short word16;
00193 #if defined(__alpha) && !defined(_MSC_VER)
00194 typedef unsigned int word32;
00195 #else
00196 typedef unsigned long word32;
00197 #endif
00198
00199 #if defined(__GNUC__) || defined(__MWERKS__)
00200 # define WORD64_AVAILABLE
00201 typedef unsigned long long word64;
00202 # define W64LIT(x) x##LL
00203 #elif defined(_MSC_VER) || defined(__BCPLUSPLUS__)
00204 # define WORD64_AVAILABLE
00205 typedef unsigned __int64 word64;
00206 # define W64LIT(x) x##ui64
00207 #endif
00208
00209
00210 #if defined(WORD64_AVAILABLE) && !defined(__alpha)
00211 # define SLOW_WORD64
00212 #endif
00213
00214
00215
00216
00217 #if (defined(__GNUC__) && !defined(__alpha)) || defined(__MWERKS__)
00218 typedef unsigned long word;
00219 typedef unsigned long long dword;
00220 #elif defined(_MSC_VER) || defined(__BCPLUSPLUS__)
00221 typedef unsigned __int32 word;
00222 typedef unsigned __int64 dword;
00223 #else
00224 typedef unsigned int word;
00225 typedef unsigned long dword;
00226 #endif
00227
00228 const unsigned int WORD_SIZE = sizeof(word);
00229 const unsigned int WORD_BITS = WORD_SIZE * 8;
00230
00231 #define LOW_WORD(x) (word)(x)
00232
00233 union dword_union
00234 {
00235 dword_union (const dword &dw) : dw(dw) {}
00236 dword dw;
00237 word w[2];
00238 };
00239
00240 #ifdef IS_LITTLE_ENDIAN
00241 # define HIGH_WORD(x) (dword_union(x).w[1])
00242 #else
00243 # define HIGH_WORD(x) (dword_union(x).w[0])
00244 #endif
00245
00246
00247
00248
00249
00250 #if defined(_MSC_VER) || defined(__BCPLUSPLUS__)
00251 # define INTEL_INTRINSICS
00252 # define FAST_ROTATE
00253 #elif defined(__MWERKS__) && TARGET_CPU_PPC
00254 # define PPC_INTRINSICS
00255 # define FAST_ROTATE
00256 #elif defined(__GNUC__) && defined(__i386__)
00257
00258 # define FAST_ROTATE
00259 #endif
00260
00261 NAMESPACE_END
00262
00263
00264 #if defined(_MSC_VER) && (_MSC_VER < 1300)
00265 #define CPP_TYPENAME
00266 #else
00267 #define CPP_TYPENAME typename
00268 #endif
00269
00270 #ifdef _MSC_VER
00271
00272
00273
00274
00275
00276 # pragma warning(disable: 4250 4660 4661 4786 4355)
00277 #endif
00278
00279
00280
00281 #ifndef NO_OS_DEPENDENCE
00282
00283 #if defined(_WIN32) || defined(__CYGWIN__)
00284 #define CRYPTOPP_WIN32_AVAILABLE
00285 #endif
00286
00287 #if defined(__unix__) || defined(__MACH__)
00288 #define CRYPTOPP_UNIX_AVAILABLE
00289 #endif
00290
00291 #if defined(WORD64_AVAILABLE) && (defined(CRYPTOPP_WIN32_AVAILABLE) || defined(CRYPTOPP_UNIX_AVAILABLE) || defined(macintosh))
00292 # define HIGHRES_TIMER_AVAILABLE
00293 #endif
00294
00295 #ifdef CRYPTOPP_UNIX_AVAILABLE
00296 # define HAS_BERKELEY_STYLE_SOCKETS
00297 #endif
00298
00299 #ifdef CRYPTOPP_WIN32_AVAILABLE
00300 # define HAS_WINDOWS_STYLE_SOCKETS
00301 #endif
00302
00303 #if defined(HIGHRES_TIMER_AVAILABLE) && (defined(HAS_BERKELEY_STYLE_SOCKETS) || defined(HAS_WINDOWS_STYLE_SOCKETS))
00304 # define SOCKETS_AVAILABLE
00305 #endif
00306
00307 #if defined(HAS_WINDOWS_STYLE_SOCKETS) && (!defined(HAS_BERKELEY_STYLE_SOCKETS) || defined(PREFER_WINDOWS_STYLE_SOCKETS))
00308 # define USE_WINDOWS_STYLE_SOCKETS
00309 #else
00310 # define USE_BERKELEY_STYLE_SOCKETS
00311 #endif
00312
00313 #if defined(CRYPTOPP_WIN32_AVAILABLE) && !defined(USE_BERKELEY_STYLE_SOCKETS)
00314 # define WINDOWS_PIPES_AVAILABLE
00315 #endif
00316
00317 #if defined(CRYPTOPP_WIN32_AVAILABLE) && defined(USE_MS_CRYPTOAPI)
00318 # define NONBLOCKING_RNG_AVAILABLE
00319 # define OS_RNG_AVAILABLE
00320 #endif
00321
00322 #ifdef CRYPTOPP_UNIX_AVAILABLE
00323 # define NONBLOCKING_RNG_AVAILABLE
00324 # define BLOCKING_RNG_AVAILABLE
00325 # define OS_RNG_AVAILABLE
00326 # define HAS_PTHREADS
00327 # define THREADS_AVAILABLE
00328 #endif
00329
00330 #ifdef CRYPTOPP_WIN32_AVAILABLE
00331 # define HAS_WINTHREADS
00332 # define THREADS_AVAILABLE
00333 #endif
00334
00335 #endif // NO_OS_DEPENDENCE
00336
00337 #endif
00338