Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:55:09

0001 // stdcpp.h - originally written and placed in the public domain by Wei Dai

0002 
0003 /// \file stdcpp.h

0004 /// \brief Common C++ header files

0005 
0006 #ifndef CRYPTOPP_STDCPP_H
0007 #define CRYPTOPP_STDCPP_H
0008 
0009 #if (CRYPTOPP_MSC_VERSION >= 1500)
0010 #define _DO_NOT_DECLARE_INTERLOCKED_INTRINSICS_IN_MEMORY
0011 #include <intrin.h>
0012 #endif
0013 
0014 #include <string>
0015 #include <memory>
0016 #include <exception>
0017 #include <typeinfo>
0018 #include <algorithm>
0019 #include <functional>
0020 #include <utility>
0021 #include <vector>
0022 #include <limits>
0023 #include <deque>
0024 #include <list>
0025 #include <map>
0026 #include <new>
0027 
0028 // http://connect.microsoft.com/VisualStudio/feedback/details/1600701/type-info-does-not-compile-with-has-exceptions-0

0029 #if defined(CRYPTOPP_MSC_VERSION) && (CRYPTOPP_MSC_VERSION < 1900) && defined(_HAS_EXCEPTIONS) && (_HAS_EXCEPTIONS == 0)
0030 namespace std {
0031   using ::type_info;
0032 }
0033 #endif
0034 
0035 // workaround needed for IBM XLC and debug heaps on AIX

0036 #if defined(_AIX) && (defined(__xlc__) || defined(__xlC__) || defined(__ibmxl__))
0037 # if defined(__DEBUG_ALLOC__)
0038 namespace std {
0039   using ::_debug_memset;
0040   using ::_debug_memcpy;
0041 }
0042 # endif
0043 #endif
0044 
0045 // make_unchecked_array_iterator

0046 #if (CRYPTOPP_MSC_VERSION >= 1600)
0047 #include <iterator>
0048 #endif
0049 
0050 #if defined(CRYPTOPP_CXX11_ATOMIC)
0051 #include <atomic>
0052 #endif
0053 
0054 #if defined(CRYPTOPP_CXX11_SYNCHRONIZATION)
0055 #include <mutex>
0056 #endif
0057 
0058 #if defined(CRYPTOPP_CXX11_RVALUES)
0059 # include <utility>
0060 #endif
0061 
0062 #include <cstdlib>
0063 #include <cstring>
0064 #include <climits>
0065 #include <cmath>
0066 
0067 // It is 2019 and VS2017/Win10 still can't compile a

0068 // program that includes <cstddef> without making users

0069 // do something special. "Epic fail" comes to mind.

0070 // Also see https://github.com/weidai11/cryptopp/issues/781

0071 #ifndef CRYPTOPP_MSC_VERSION
0072 # include <cstddef>
0073 #endif
0074 
0075 // uintptr_t and ptrdiff_t

0076 #if defined(__SUNPRO_CC)
0077 # if (__SUNPRO_CC >= 0x5100)
0078 #  include <stdint.h>
0079 # endif
0080 #elif defined(CRYPTOPP_MSC_VERSION)
0081 # if (CRYPTOPP_MSC_VERSION >= 1700)
0082 #  include <stdint.h>
0083 # else
0084 #  include <stddef.h>
0085 # endif
0086 #elif (__cplusplus < 201103L)
0087 # include <stdint.h>
0088 #endif
0089 
0090 // workaround needed on Sun Studio 12u1 Sun C++ 5.10 SunOS_i386 128229-02 2009/09/21

0091 #ifdef CRYPTOPP_INCLUDE_VECTOR_CC
0092 # include <vector.cc>
0093 #endif
0094 
0095 // C++Builder's standard library (Dinkumware) do not have C's global log() function

0096 // https://github.com/weidai11/cryptopp/issues/520

0097 #ifdef __BORLANDC__
0098 using std::log;
0099 #endif
0100 
0101 #endif  // CRYPTOPP_STDCPP_H