Remove ambiguity between boost::uint64_t and ::uint64_t.
This has been causing people problems on uclibc builds.
This commit is contained in:
		| @@ -7,7 +7,6 @@ | |||||||
| #include <stdint.h> | #include <stdint.h> | ||||||
| #include <stdexcept> | #include <stdexcept> | ||||||
|  |  | ||||||
| using namespace boost; |  | ||||||
| using namespace std; | using namespace std; | ||||||
|  |  | ||||||
| //---------------------------------------------------------------- | //---------------------------------------------------------------- | ||||||
| @@ -18,9 +17,9 @@ namespace { | |||||||
| 			: max_hint_width(4) { | 			: max_hint_width(4) { | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
| 		optional<uint64_t> device_size; | 		boost::optional<uint64_t> device_size; | ||||||
| 		optional<uint32_t> block_size; | 		boost::optional<uint32_t> block_size; | ||||||
| 		optional<uint64_t> nr_blocks; | 		boost::optional<uint64_t> nr_blocks; | ||||||
| 		uint32_t max_hint_width; | 		uint32_t max_hint_width; | ||||||
| 	}; | 	}; | ||||||
|  |  | ||||||
| @@ -58,19 +57,19 @@ namespace { | |||||||
| 		while ((c = getopt_long(argc, argv, short_opts, long_opts, NULL)) != -1) { | 		while ((c = getopt_long(argc, argv, short_opts, long_opts, NULL)) != -1) { | ||||||
| 			switch (c) { | 			switch (c) { | ||||||
| 			case 0: | 			case 0: | ||||||
| 				fs.block_size = lexical_cast<uint32_t>(optarg); | 				fs.block_size = boost::lexical_cast<uint32_t>(optarg); | ||||||
| 				break; | 				break; | ||||||
|  |  | ||||||
| 			case 1: | 			case 1: | ||||||
| 				fs.device_size = lexical_cast<uint64_t>(optarg); | 				fs.device_size = boost::lexical_cast<uint64_t>(optarg); | ||||||
| 				break; | 				break; | ||||||
|  |  | ||||||
| 			case 2: | 			case 2: | ||||||
| 				fs.nr_blocks = lexical_cast<uint64_t>(optarg); | 				fs.nr_blocks = boost::lexical_cast<uint64_t>(optarg); | ||||||
| 				break; | 				break; | ||||||
|  |  | ||||||
| 			case 3: | 			case 3: | ||||||
| 				fs.max_hint_width = lexical_cast<uint32_t>(optarg); | 				fs.max_hint_width = boost::lexical_cast<uint32_t>(optarg); | ||||||
| 				break; | 				break; | ||||||
|  |  | ||||||
| 			case 'h': | 			case 'h': | ||||||
|   | |||||||
| @@ -5,7 +5,6 @@ | |||||||
| #include <boost/lexical_cast.hpp> | #include <boost/lexical_cast.hpp> | ||||||
| #include <expat.h> | #include <expat.h> | ||||||
|  |  | ||||||
| using namespace boost; |  | ||||||
| using namespace caching; | using namespace caching; | ||||||
| using namespace persistent_data; | using namespace persistent_data; | ||||||
| using namespace std; | using namespace std; | ||||||
| @@ -189,14 +188,14 @@ namespace { | |||||||
|  |  | ||||||
| 		block_address cblock = get_attr<uint64_t>(attr, "cache_block"); | 		block_address cblock = get_attr<uint64_t>(attr, "cache_block"); | ||||||
| 		decoded_or_error doe = base64_decode(get_attr<string>(attr, "data")); | 		decoded_or_error doe = base64_decode(get_attr<string>(attr, "data")); | ||||||
| 		if (!get<vector<unsigned char> >(&doe)) { | 		if (!boost::get<vector<unsigned char> >(&doe)) { | ||||||
| 			ostringstream msg; | 			ostringstream msg; | ||||||
| 			msg << "invalid base64 encoding of hint for cache block " | 			msg << "invalid base64 encoding of hint for cache block " | ||||||
| 			    << cblock << ": " << get<string>(doe); | 			    << cblock << ": " << boost::get<string>(doe); | ||||||
| 			throw runtime_error(msg.str()); | 			throw runtime_error(msg.str()); | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
| 		e->hint(cblock, get<vector<unsigned char> >(doe)); | 		e->hint(cblock, boost::get<vector<unsigned char> >(doe)); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	// FIXME: why passing e by ptr? | 	// FIXME: why passing e by ptr? | ||||||
|   | |||||||
| @@ -4,7 +4,6 @@ | |||||||
| #include "persistent-data/errors.h" | #include "persistent-data/errors.h" | ||||||
|  |  | ||||||
| using namespace base; | using namespace base; | ||||||
| using namespace boost; |  | ||||||
| using namespace era; | using namespace era; | ||||||
| using namespace superblock_damage; | using namespace superblock_damage; | ||||||
| using namespace persistent_data; | using namespace persistent_data; | ||||||
| @@ -149,8 +148,8 @@ superblock_traits::unpack(disk_type const &disk, value_type &value) | |||||||
|  |  | ||||||
| 	block_address ms = to_cpu<uint64_t>(disk.metadata_snap); | 	block_address ms = to_cpu<uint64_t>(disk.metadata_snap); | ||||||
| 	value.metadata_snap = (ms == SUPERBLOCK_LOCATION) ? | 	value.metadata_snap = (ms == SUPERBLOCK_LOCATION) ? | ||||||
| 		optional<block_address>() : | 		boost::optional<block_address>() : | ||||||
| 		optional<block_address>(ms); | 		boost::optional<block_address>(ms); | ||||||
| } | } | ||||||
|  |  | ||||||
| void | void | ||||||
|   | |||||||
| @@ -2,7 +2,6 @@ | |||||||
| #include "persistent-data/data-structures/btree_damage_visitor.h" | #include "persistent-data/data-structures/btree_damage_visitor.h" | ||||||
| #include "persistent-data/data-structures/bitset.h" | #include "persistent-data/data-structures/bitset.h" | ||||||
|  |  | ||||||
| using namespace boost; |  | ||||||
| using namespace era; | using namespace era; | ||||||
| using namespace writeset_tree_detail; | using namespace writeset_tree_detail; | ||||||
| using namespace persistent_data; | using namespace persistent_data; | ||||||
| @@ -90,8 +89,8 @@ namespace { | |||||||
| 	private: | 	private: | ||||||
| 		template <typename T> | 		template <typename T> | ||||||
| 		run<uint32_t> to_uint32(run<T> const &r) { | 		run<uint32_t> to_uint32(run<T> const &r) { | ||||||
| 			return run<uint32_t>(optional<uint32_t>(r.begin_), | 			return run<uint32_t>(boost::optional<uint32_t>(r.begin_), | ||||||
| 					     optional<uint32_t>(r.end_)); | 					     boost::optional<uint32_t>(r.end_)); | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
| 		damage_visitor &v_; | 		damage_visitor &v_; | ||||||
|   | |||||||
| @@ -2,7 +2,6 @@ | |||||||
| #include "persistent-data/data-structures/bitset.h" | #include "persistent-data/data-structures/bitset.h" | ||||||
| #include "persistent-data/math_utils.h" | #include "persistent-data/math_utils.h" | ||||||
|  |  | ||||||
| using namespace boost; |  | ||||||
| using namespace persistent_data; | using namespace persistent_data; | ||||||
| using namespace persistent_data::bitset_detail; | using namespace persistent_data::bitset_detail; | ||||||
| using namespace std; | using namespace std; | ||||||
| @@ -12,7 +11,7 @@ using namespace std; | |||||||
| namespace { | namespace { | ||||||
| 	struct bitset_traits { | 	struct bitset_traits { | ||||||
| 		typedef base::le64 disk_type; | 		typedef base::le64 disk_type; | ||||||
| 		typedef uint64_t value_type; | 		typedef ::uint64_t value_type; | ||||||
| 		typedef no_op_ref_counter<uint64_t> ref_counter; | 		typedef no_op_ref_counter<uint64_t> ref_counter; | ||||||
|  |  | ||||||
| 		static void unpack(disk_type const &disk, value_type &value) { | 		static void unpack(disk_type const &disk, value_type &value) { | ||||||
| @@ -118,11 +117,11 @@ namespace persistent_data { | |||||||
| 				} | 				} | ||||||
|  |  | ||||||
| 			private: | 			private: | ||||||
| 				optional<uint32_t> lifted_mult64(optional<uint32_t> const &m) { | 				boost::optional<uint32_t> lifted_mult64(boost::optional<uint32_t> const &m) { | ||||||
| 					if (!m) | 					if (!m) | ||||||
| 						return m; | 						return m; | ||||||
|  |  | ||||||
| 					return optional<uint32_t>(*m * 64); | 					return boost::optional<uint32_t>(*m * 64); | ||||||
| 				} | 				} | ||||||
|  |  | ||||||
| 				bitset_visitor &v_; | 				bitset_visitor &v_; | ||||||
|   | |||||||
| @@ -4,8 +4,6 @@ | |||||||
| #include "persistent-data/data-structures/btree.h" | #include "persistent-data/data-structures/btree.h" | ||||||
| #include "persistent-data/run.h" | #include "persistent-data/run.h" | ||||||
|  |  | ||||||
| using namespace boost; |  | ||||||
|  |  | ||||||
| //---------------------------------------------------------------- | //---------------------------------------------------------------- | ||||||
|  |  | ||||||
| namespace thin_provisioning { | namespace thin_provisioning { | ||||||
| @@ -50,7 +48,7 @@ namespace thin_provisioning { | |||||||
|  |  | ||||||
| 		class damage_visitor { | 		class damage_visitor { | ||||||
| 		public: | 		public: | ||||||
| 			typedef shared_ptr<damage_visitor> ptr; | 			typedef boost::shared_ptr<damage_visitor> ptr; | ||||||
|  |  | ||||||
| 			virtual ~damage_visitor() {} | 			virtual ~damage_visitor() {} | ||||||
|  |  | ||||||
|   | |||||||
| @@ -226,7 +226,7 @@ thin_provisioning::metadata_dump(metadata::ptr md, emitter::ptr e, bool repair) | |||||||
| 			    md->sb_.trans_id_, | 			    md->sb_.trans_id_, | ||||||
| 			    md->sb_.data_block_size_, | 			    md->sb_.data_block_size_, | ||||||
| 			    md->data_sm_->get_nr_blocks(), | 			    md->data_sm_->get_nr_blocks(), | ||||||
| 			    optional<block_address>()); | 			    boost::optional<block_address>()); | ||||||
|  |  | ||||||
| 	{ | 	{ | ||||||
| 		mapping_tree_detail::damage_visitor::ptr md_policy(mapping_damage_policy(repair)); | 		mapping_tree_detail::damage_visitor::ptr md_policy(mapping_damage_policy(repair)); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user