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
00050
00051
00052 #define IS_LITTLE_ENDIAN
00053
00054
00055 #define PACKAGE_BUGREPORT ""
00056
00057
00058 #define PACKAGE_NAME "crypto++"
00059
00060
00061 #define PACKAGE_STRING "crypto++ 5.1"
00062
00063
00064 #define PACKAGE_TARNAME "crypto--"
00065
00066
00067 #define PACKAGE_VERSION "5.1"
00068
00069
00070 #define SIZEOF_LONG 4
00071
00072
00073 #define STDC_HEADERS 1
00074
00075
00076
00077 #ifndef CRYPTOPP_BUILD
00078
00079
00080
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
00096
00097
00098
00099
00100
00101
00102
00103
00104 #define USE_MS_CRYPTOAPI
00105
00106
00107 #ifndef DSA_1024_BIT_MODULUS_ONLY
00108 # define DSA_1024_BIT_MODULUS_ONLY 1
00109 #endif
00110
00111
00112
00113
00114
00115
00116 #define GZIP_OS_CODE 0
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132 #define PREFER_BERKELEY_STYLE_SOCKETS
00133
00134
00135
00136
00137
00138
00139 #ifdef NO_NAMESPACE
00140 # error namespace support is now required
00141 #endif
00142
00143
00144
00145
00146 #define WORKAROUND_MS_BUG_Q258000
00147
00148
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
00163
00164
00165
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;
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
00200 #if defined(WORD64_AVAILABLE) && (SIZEOF_LONG != 8)
00201 # define SLOW_WORD64
00202 #endif
00203
00204
00205
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
00237
00238
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
00248 # define FAST_ROTATE
00249 #endif
00250
00251 NAMESPACE_END
00252
00253
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
00262
00263
00264
00265
00266 # pragma warning(disable: 4250 4660 4661 4786 4355)
00267 #endif
00268
00269
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