From 77286e0bc754a7ab2e6cbc6210b7d38b82923f40 Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Thu, 15 Aug 2013 10:35:07 +0100 Subject: [PATCH] Take out some 'typename's to support older versions of gcc (Heinz). --- persistent-data/block.tcc | 2 +- persistent-data/data-structures/btree.h | 8 ++++---- .../space-maps/subtracting_span_iterator.h | 2 +- thin-provisioning/metadata.cc | 2 +- thin-provisioning/metadata_dumper.cc | 2 +- thin-provisioning/thin_check.cc | 15 +++++++-------- thin-provisioning/thin_dump.cc | 3 ++- thin-provisioning/thin_rmap.cc | 2 +- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/persistent-data/block.tcc b/persistent-data/block.tcc index f392b5a..36e872d 100644 --- a/persistent-data/block.tcc +++ b/persistent-data/block.tcc @@ -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) { diff --git a/persistent-data/data-structures/btree.h b/persistent-data/data-structures/btree.h index 0dd9f37..30a3577 100644 --- a/persistent-data/data-structures/btree.h +++ b/persistent-data/data-structures/btree.h @@ -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::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::write_ref> spine_; block_address root_; }; diff --git a/persistent-data/space-maps/subtracting_span_iterator.h b/persistent-data/space-maps/subtracting_span_iterator.h index 92b8fdf..8d83188 100644 --- a/persistent-data/space-maps/subtracting_span_iterator.h +++ b/persistent-data/space-maps/subtracting_span_iterator.h @@ -11,7 +11,7 @@ namespace persistent_data { class subtracting_span_iterator : public space_map::span_iterator { public: - typedef typename base::run_set block_set; + typedef base::run_set block_set; typedef space_map::span span; subtracting_span_iterator(block_address max, diff --git a/thin-provisioning/metadata.cc b/thin-provisioning/metadata.cc index 23317db..00832bb 100644 --- a/thin-provisioning/metadata.cc +++ b/thin-provisioning/metadata.cc @@ -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; diff --git a/thin-provisioning/metadata_dumper.cc b/thin-provisioning/metadata_dumper.cc index aa12cfc..a611354 100644 --- a/thin-provisioning/metadata_dumper.cc +++ b/thin-provisioning/metadata_dumper.cc @@ -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 ptr; typedef btree_checker<1, device_tree_detail::device_details_traits> checker; diff --git a/thin-provisioning/thin_check.cc b/thin-provisioning/thin_check.cc index 517d85d..e0ea2c1 100644 --- a/thin-provisioning/thin_check.cc +++ b/thin-provisioning/thin_check.cc @@ -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[] = { diff --git a/thin-provisioning/thin_dump.cc b/thin-provisioning/thin_dump.cc index 6b3e910..d2c8950 100644 --- a/thin-provisioning/thin_dump.cc +++ b/thin-provisioning/thin_dump.cc @@ -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'}, diff --git a/thin-provisioning/thin_rmap.cc b/thin-provisioning/thin_rmap.cc index 96f2a63..f58682d 100644 --- a/thin-provisioning/thin_rmap.cc +++ b/thin-provisioning/thin_rmap.cc @@ -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)); }