OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [torture/] [pr49938.C] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
#include 
2
#include 
3
typedef unsigned short uint16;
4
 
5
namespace base {
6
    class StringPiece
7
      {
8
    public:
9
        typedef std::size_t size_type;
10
        size_type size() const { return length_; }
11
        size_type length_;
12
      };
13
}
14
 
15
namespace net {
16
    class DNSSECKeySet
17
      {
18
        bool CheckSignature (const base::StringPiece& name, const
19
                             base::StringPiece& zone, const
20
                             base::StringPiece& signature, uint16 rrtype,
21
                             const std::vector& rrdatas);
22
      };
23
}
24
 
25
template  class scoped_array
26
{
27
public: typedef C element_type;
28
        explicit scoped_array(C* p = __null):array_(p) {}
29
private:   C* array_;
30
};
31
 
32
namespace net {
33
    bool DNSSECKeySet::CheckSignature (const base::StringPiece& name,
34
                                       const base::StringPiece& zone, const base::StringPiece& signature,
35
                                       uint16 rrtype, const std::vector& rrdatas)
36
      {
37
        unsigned signed_data_len = 0;
38
        for (std::vector::const_iterator i =
39
             rrdatas.begin();
40
             i != rrdatas.end(); i++) {
41
            signed_data_len += 2;
42
            signed_data_len += i->size();
43
        }
44
        scoped_array signed_data(new unsigned
45
                                                char[signed_data_len]);
46
      }
47
}
48
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.