2003-07-04 00:17:37 +00:00
|
|
|
#ifndef CRYPTOPP_STDCPP_H
|
|
|
|
#define CRYPTOPP_STDCPP_H
|
|
|
|
|
2010-07-24 05:35:54 +00:00
|
|
|
#if _MSC_VER >= 1500
|
|
|
|
#define _DO_NOT_DECLARE_INTERLOCKED_INTRINSICS_IN_MEMORY
|
|
|
|
#include <intrin.h>
|
|
|
|
#endif
|
|
|
|
|
2003-07-04 00:17:37 +00:00
|
|
|
#include <stddef.h>
|
|
|
|
#include <assert.h>
|
|
|
|
#include <limits.h>
|
2010-06-18 07:06:59 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
2015-07-27 16:01:55 -04:00
|
|
|
|
2015-07-27 16:10:20 -04:00
|
|
|
// http://marshall.calepin.co/c-and-xcode-46.html. Apple does some wonky stuff with
|
|
|
|
// <memory>, auto_ptr and unique_ptr. Apple's built-in Clang behaves
|
2015-07-27 16:01:55 -04:00
|
|
|
// differently than a LLVM downloaded and compiled CLang. So we fall back to Clang's
|
|
|
|
// __has_include (http://clang.llvm.org/docs/LanguageExtensions.html#id3).
|
2015-07-27 16:46:25 -04:00
|
|
|
// This must be kept in sync with smartptr.h because auto_ptr and unique_ptr are
|
|
|
|
// brought in based on the same logic.
|
|
|
|
#if ((__cplusplus >= 201103L) || (_MSC_VER >= 1600)) && !defined(__clang__)
|
2015-07-27 16:01:55 -04:00
|
|
|
# include <memory>
|
|
|
|
#elif defined(__clang__)
|
|
|
|
# if (__has_include(<tr1/memory>))
|
|
|
|
# include <tr1/memory>
|
|
|
|
# endif
|
|
|
|
#elif (__cplusplus < 201103L)
|
|
|
|
# include <tr1/memory>
|
|
|
|
#else
|
|
|
|
# include <memory>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <map>
|
|
|
|
#include <vector>
|
2003-07-04 00:17:37 +00:00
|
|
|
#include <string>
|
2015-07-27 16:18:43 -04:00
|
|
|
#include <limits>
|
2003-07-04 00:17:37 +00:00
|
|
|
#include <exception>
|
|
|
|
#include <typeinfo>
|
|
|
|
#include <algorithm>
|
2015-07-27 16:01:55 -04:00
|
|
|
#include <functional>
|
2015-07-13 22:53:16 -04:00
|
|
|
|
2010-08-08 08:13:09 +00:00
|
|
|
#ifdef CRYPTOPP_INCLUDE_VECTOR_CC
|
2010-07-05 01:15:14 +00:00
|
|
|
// workaround needed on Sun Studio 12u1 Sun C++ 5.10 SunOS_i386 128229-02 2009/09/21
|
|
|
|
#include <vector.cc>
|
|
|
|
#endif
|
|
|
|
|
2015-07-27 19:43:43 -04:00
|
|
|
// Handle alloca...
|
2015-07-27 16:15:46 -04:00
|
|
|
#if defined(CRYPTOPP_WIN32_AVAILABLE) || defined(__MINGW32__) || defined(__BORLANDC__)
|
2015-07-27 19:43:43 -04:00
|
|
|
# include <malloc.h>
|
2015-07-28 18:18:56 -04:00
|
|
|
#elif defined(CRYPTOPP_BSD_AVAILABLE)
|
|
|
|
# include <stdlib.h>
|
|
|
|
#else // CRYPTOPP_UNIX_AVAILABLE
|
|
|
|
# include <alloca.h>
|
2003-07-04 00:17:37 +00:00
|
|
|
#endif
|
|
|
|
|
2010-06-18 07:06:59 +00:00
|
|
|
#ifdef _MSC_VER
|
|
|
|
#pragma warning(disable: 4231) // re-disable this
|
|
|
|
#ifdef _CRTAPI1
|
2003-07-04 00:17:37 +00:00
|
|
|
#define CRYPTOPP_MSVCRT6
|
|
|
|
#endif
|
2010-06-18 07:06:59 +00:00
|
|
|
#endif
|
2003-07-04 00:17:37 +00:00
|
|
|
|
|
|
|
#endif
|