Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / security / botan / patches / patch-src_math_gfpmath_gfp__element.h
blobaf65baf4f1d2f29400d628bb110880b3899a2c76
1 $NetBSD$
3 --- src/math/gfpmath/gfp_element.h.orig 2013-04-30 22:49:33.000000000 +0000
4 +++ src/math/gfpmath/gfp_element.h
5 @@ -14,9 +14,12 @@
7 #include <botan/bigint.h>
8 #include <botan/gfp_modulus.h>
9 +#include <ciso646>
10 #include <iosfwd>
12 -#if defined(BOTAN_USE_STD_TR1)
13 +#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
14 + #include <memory>
15 +#elif defined(BOTAN_USE_STD_TR1)
16 #include <tr1/memory>
17 #elif defined(BOTAN_USE_BOOST_TR1)
18 #include <boost/tr1/memory.hpp>
19 @@ -25,6 +28,14 @@
20 #endif
22 namespace Botan {
23 +#ifndef BOTAN_SHARED_PTR
24 +#define BOTAN_SHARED_PTR
25 +#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
26 + using std::shared_ptr;
27 +#else
28 + using std::tr1::shared_ptr;
29 +#endif
30 +#endif
32 struct Illegal_Transformation : public Exception
34 @@ -40,7 +51,7 @@ struct Illegal_Transformation : public E
35 class BOTAN_DLL GFpElement
37 private:
38 - std::tr1::shared_ptr<GFpModulus> mp_mod;
39 + shared_ptr<GFpModulus> mp_mod;
40 mutable BigInt m_value; // ordinary residue or m-residue respectively
41 mutable BigInt workspace;
43 @@ -79,7 +90,7 @@ class BOTAN_DLL GFpElement
44 * @param value the element value
45 * @param use_montgm whether this object will use Montgomery multiplication
47 - explicit GFpElement(std::tr1::shared_ptr<GFpModulus> const mod,
48 + explicit GFpElement(shared_ptr<GFpModulus> const mod,
49 const BigInt& value, bool use_mongm = false);
51 /**
52 @@ -190,7 +201,7 @@ class BOTAN_DLL GFpElement
53 * the shared GFpModulus objects!
54 * @result the shared pointer to the GFpModulus of *this
56 - inline std::tr1::shared_ptr<GFpModulus> const get_ptr_mod() const
57 + inline shared_ptr<GFpModulus> const get_ptr_mod() const
59 return mp_mod;
61 @@ -203,7 +214,7 @@ class BOTAN_DLL GFpElement
62 * the shared GFpModulus objects!
63 * @param mod a shared pointer to a GFpModulus that will be held in *this
65 - void set_shrd_mod(std::tr1::shared_ptr<GFpModulus> const mod);
66 + void set_shrd_mod(shared_ptr<GFpModulus> const mod);
68 /**
69 * Tells whether this GFpElement is currently transformed to it´ m-residue,