Take out some 'typename's to support older versions of gcc (Heinz).

This commit is contained in:
Joe Thornber 2013-08-15 10:35:07 +01:00
parent c6ec0c9c9c
commit 77286e0bc7
8 changed files with 18 additions and 18 deletions

View File

@ -61,7 +61,7 @@ namespace {
}
bool file_exists(string const &path) {
typename ::stat info;
struct ::stat info;
int r = ::stat(path.c_str(), &info);
if (r) {

View File

@ -213,7 +213,7 @@ namespace persistent_data {
class ro_spine : private boost::noncopyable {
public:
ro_spine(transaction_manager::ptr tm,
typename block_manager<>::validator::ptr v)
block_manager<>::validator::ptr v)
: tm_(tm),
validator_(v) {
}
@ -227,7 +227,7 @@ namespace persistent_data {
private:
transaction_manager::ptr tm_;
typename block_manager<>::validator::ptr validator_;
block_manager<>::validator::ptr validator_;
std::list<block_manager<>::read_ref> spine_;
};
@ -237,7 +237,7 @@ namespace persistent_data {
typedef transaction_manager::write_ref write_ref;
shadow_spine(transaction_manager::ptr tm,
typename block_manager<>::validator::ptr v)
block_manager<>::validator::ptr v)
: tm_(tm),
validator_(v) {
@ -287,7 +287,7 @@ namespace persistent_data {
private:
transaction_manager::ptr tm_;
typename block_manager<>::validator::ptr validator_;
block_manager<>::validator::ptr validator_;
std::list<block_manager<>::write_ref> spine_;
block_address root_;
};

View File

@ -11,7 +11,7 @@
namespace persistent_data {
class subtracting_span_iterator : public space_map::span_iterator {
public:
typedef typename base::run_set<block_address> block_set;
typedef base::run_set<block_address> block_set;
typedef space_map::span span;
subtracting_span_iterator(block_address max,

View File

@ -42,7 +42,7 @@ namespace {
block_manager<>::ptr open_bm(string const &dev_path, bool writeable) {
block_address nr_blocks = get_nr_blocks(dev_path);
typename block_io<>::mode m = writeable ?
block_io<>::mode m = writeable ?
block_io<>::READ_WRITE :
block_io<>::READ_ONLY;

View File

@ -139,7 +139,7 @@ namespace {
class details_extractor : public btree<1, device_tree_detail::device_details_traits>::visitor {
public:
typedef typename btree<1, device_tree_detail::device_details_traits>::visitor::node_location node_location;
typedef btree<1, device_tree_detail::device_details_traits>::visitor::node_location node_location;
typedef boost::shared_ptr<details_extractor> ptr;
typedef btree_checker<1, device_tree_detail::device_details_traits> checker;

View File

@ -144,7 +144,7 @@ namespace {
block_manager<>::ptr
open_bm(string const &path) {
block_address nr_blocks = get_nr_blocks(path);
typename block_io<>::mode m = block_io<>::READ_ONLY;
block_io<>::mode m = block_io<>::READ_ONLY;
return block_manager<>::ptr(new block_manager<>(path, nr_blocks, 1, m));
}
@ -344,13 +344,12 @@ namespace {
int main(int argc, char **argv)
{
int c;
flags fs = {
.check_device_tree = true,
.check_mapping_tree_level1 = true,
.check_mapping_tree_level2 = true,
.ignore_non_fatal_errors = false,
.quiet = false
};
flags fs;
fs.check_device_tree = true;
fs.check_mapping_tree_level1 = true,
fs.check_mapping_tree_level2 = true,
fs.ignore_non_fatal_errors = false,
fs.quiet = false;
char const shortopts[] = "qhV";
option const longopts[] = {

View File

@ -94,7 +94,8 @@ int main(int argc, char **argv)
char *end_ptr;
string format = "xml";
block_address metadata_snap = 0;
struct flags flags = { .find_metadata_snap = false, .repair = false };
struct flags flags;
flags.find_metadata_snap = flags.repair = false;
const struct option longopts[] = {
{ "help", no_argument, NULL, 'h'},

View File

@ -23,7 +23,7 @@ namespace {
block_manager<>::ptr
open_bm(string const &path) {
block_address nr_blocks = get_nr_blocks(path);
typename block_io<>::mode m = block_io<>::READ_ONLY;
block_io<>::mode m = block_io<>::READ_ONLY;
return block_manager<>::ptr(new block_manager<>(path, nr_blocks, 1, m));
}