]>
Commit | Line | Data |
---|---|---|
2d54e68a JR |
1 | --- mongodb-src-r2.0.6/pch.h~ 2012-06-04 15:42:54.000000000 +0200 |
2 | +++ mongodb-src-r2.0.6/pch.h 2012-07-11 14:32:55.482057987 +0200 | |
3 | @@ -79,7 +79,7 @@ | |
4 | //#include <boost/any.hpp> | |
5 | #include "boost/thread/once.hpp" | |
6 | //#include <boost/archive/iterators/transform_width.hpp> | |
7 | -#define BOOST_FILESYSTEM_VERSION 2 | |
8 | +#define BOOST_FILESYSTEM_VERSION 3 | |
9 | #include <boost/filesystem/convenience.hpp> | |
10 | #include <boost/filesystem/exception.hpp> | |
11 | #include <boost/filesystem/operations.hpp> | |
d7c33f7a JR |
12 | Binary files mongodb-src-r2.0.6.orig/lib/libboost_thread-gcc41-mt-d-1_34_1.a and mongodb-src-r2.0.6/lib/libboost_thread-gcc41-mt-d-1_34_1.a differ |
13 | diff -ur mongodb-src-r2.0.6.orig/util/background.cpp mongodb-src-r2.0.6/util/background.cpp | |
14 | --- mongodb-src-r2.0.6.orig/util/background.cpp 2012-06-04 15:42:54.000000000 +0200 | |
15 | +++ mongodb-src-r2.0.6/util/background.cpp 2012-07-11 14:35:09.392053263 +0200 | |
16 | @@ -89,7 +89,7 @@ | |
17 | if ( msTimeOut ) { | |
18 | // add msTimeOut millisecond to current time | |
19 | boost::xtime xt; | |
20 | - boost::xtime_get( &xt, boost::TIME_UTC ); | |
21 | + boost::xtime_get( &xt, boost::TIME_UTC_ ); | |
22 | ||
23 | unsigned long long ns = msTimeOut * 1000000ULL; // milli to nano | |
24 | if ( xt.nsec + ns < 1000000000 ) { | |
25 | diff -ur mongodb-src-r2.0.6.orig/util/concurrency/mutex.h mongodb-src-r2.0.6/util/concurrency/mutex.h | |
26 | --- mongodb-src-r2.0.6.orig/util/concurrency/mutex.h 2012-06-04 15:42:54.000000000 +0200 | |
27 | +++ mongodb-src-r2.0.6/util/concurrency/mutex.h 2012-07-11 14:35:09.392053263 +0200 | |
28 | @@ -29,7 +29,7 @@ | |
29 | ||
30 | inline boost::xtime incxtimemillis( long long s ) { | |
31 | boost::xtime xt; | |
32 | - boost::xtime_get(&xt, boost::TIME_UTC); | |
33 | + boost::xtime_get(&xt, boost::TIME_UTC_); | |
34 | xt.sec += (int)( s / 1000 ); | |
35 | xt.nsec += (int)(( s % 1000 ) * 1000000); | |
36 | if ( xt.nsec >= 1000000000 ) { | |
37 | diff -ur mongodb-src-r2.0.6.orig/util/queue.h mongodb-src-r2.0.6/util/queue.h | |
38 | --- mongodb-src-r2.0.6.orig/util/queue.h 2012-06-04 15:42:54.000000000 +0200 | |
39 | +++ mongodb-src-r2.0.6/util/queue.h 2012-07-11 14:35:09.392053263 +0200 | |
40 | @@ -82,7 +82,7 @@ | |
41 | Timer timer; | |
42 | ||
43 | boost::xtime xt; | |
44 | - boost::xtime_get(&xt, boost::TIME_UTC); | |
45 | + boost::xtime_get(&xt, boost::TIME_UTC_); | |
46 | xt.sec += maxSecondsToWait; | |
47 | ||
48 | scoped_lock l( _lock ); | |
49 | diff -ur mongodb-src-r2.0.6.orig/util/time_support.h mongodb-src-r2.0.6/util/time_support.h | |
50 | --- mongodb-src-r2.0.6.orig/util/time_support.h 2012-06-04 15:42:54.000000000 +0200 | |
51 | +++ mongodb-src-r2.0.6/util/time_support.h 2012-07-11 14:35:09.392053263 +0200 | |
52 | @@ -106,7 +106,7 @@ | |
53 | if ( s <= 0 ) | |
54 | return; | |
55 | boost::xtime xt; | |
56 | - boost::xtime_get(&xt, boost::TIME_UTC); | |
57 | + boost::xtime_get(&xt, boost::TIME_UTC_); | |
58 | xt.sec += (int)( s / 1000000 ); | |
59 | xt.nsec += (int)(( s % 1000000 ) * 1000); | |
60 | if ( xt.nsec >= 1000000000 ) { | |
61 | @@ -118,13 +118,13 @@ | |
62 | #elif defined(__sunos__) | |
63 | inline void sleepsecs(int s) { | |
64 | boost::xtime xt; | |
65 | - boost::xtime_get(&xt, boost::TIME_UTC); | |
66 | + boost::xtime_get(&xt, boost::TIME_UTC_); | |
67 | xt.sec += s; | |
68 | boost::thread::sleep(xt); | |
69 | } | |
70 | inline void sleepmillis(long long s) { | |
71 | boost::xtime xt; | |
72 | - boost::xtime_get(&xt, boost::TIME_UTC); | |
73 | + boost::xtime_get(&xt, boost::TIME_UTC_); | |
74 | xt.sec += (int)( s / 1000 ); | |
75 | xt.nsec += (int)(( s % 1000 ) * 1000000); | |
76 | if ( xt.nsec >= 1000000000 ) { | |
77 | @@ -137,7 +137,7 @@ | |
78 | if ( s <= 0 ) | |
79 | return; | |
80 | boost::xtime xt; | |
81 | - boost::xtime_get(&xt, boost::TIME_UTC); | |
82 | + boost::xtime_get(&xt, boost::TIME_UTC_); | |
83 | xt.sec += (int)( s / 1000000 ); | |
84 | xt.nsec += (int)(( s % 1000000 ) * 1000); | |
85 | if ( xt.nsec >= 1000000000 ) { | |
86 | @@ -202,24 +202,24 @@ | |
87 | #ifdef _WIN32 // no gettimeofday on windows | |
88 | inline unsigned long long curTimeMillis64() { | |
89 | boost::xtime xt; | |
90 | - boost::xtime_get(&xt, boost::TIME_UTC); | |
91 | + boost::xtime_get(&xt, boost::TIME_UTC_); | |
92 | return ((unsigned long long)xt.sec) * 1000 + xt.nsec / 1000000; | |
93 | } | |
94 | inline Date_t jsTime() { | |
95 | boost::xtime xt; | |
96 | - boost::xtime_get(&xt, boost::TIME_UTC); | |
97 | + boost::xtime_get(&xt, boost::TIME_UTC_); | |
98 | unsigned long long t = xt.nsec / 1000000; | |
99 | return ((unsigned long long) xt.sec * 1000) + t + getJSTimeVirtualSkew() + getJSTimeVirtualThreadSkew(); | |
100 | } | |
101 | inline unsigned long long curTimeMicros64() { | |
102 | boost::xtime xt; | |
103 | - boost::xtime_get(&xt, boost::TIME_UTC); | |
104 | + boost::xtime_get(&xt, boost::TIME_UTC_); | |
105 | unsigned long long t = xt.nsec / 1000; | |
106 | return (((unsigned long long) xt.sec) * 1000000) + t; | |
107 | } | |
108 | inline unsigned curTimeMicros() { | |
109 | boost::xtime xt; | |
110 | - boost::xtime_get(&xt, boost::TIME_UTC); | |
111 | + boost::xtime_get(&xt, boost::TIME_UTC_); | |
112 | unsigned t = xt.nsec / 1000; | |
113 | unsigned secs = xt.sec % 1024; | |
114 | return secs*1000000 + t; | |
9cae008c JR |
115 | diff -ur mongodb-src-r2.0.6.orig/db/db.cpp mongodb-src-r2.0.6/db/db.cpp |
116 | --- mongodb-src-r2.0.6.orig/db/db.cpp 2012-06-04 15:42:54.000000000 +0200 | |
117 | +++ mongodb-src-r2.0.6/db/db.cpp 2012-07-11 14:39:15.945377899 +0200 | |
886c1094 JR |
118 | @@ -655,11 +655,13 @@ |
119 | dbExecCommand = argv[0]; | |
120 | ||
121 | srand(curTimeMicros()); | |
122 | +#if( BOOST_VERSION < 105000 ) | |
123 | #if( BOOST_VERSION >= 104500 ) | |
124 | boost::filesystem::path::default_name_check( boost::filesystem2::no_check ); | |
125 | #else | |
126 | boost::filesystem::path::default_name_check( boost::filesystem::no_check ); | |
127 | #endif | |
128 | +#endif | |
129 | ||
130 | { | |
131 | unsigned x = 0x12345678; | |
9cae008c JR |
132 | @@ -976,7 +976,7 @@ |
133 | if (params.count("shutdown")){ | |
134 | bool failed = false; | |
135 | ||
136 | - string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).native_file_string(); | |
137 | + string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).native(); | |
138 | if ( !boost::filesystem::exists( name ) || boost::filesystem::file_size( name ) == 0 ) | |
139 | failed = true; | |
140 | ||
141 | diff -ur mongodb-src-r2.0.6.orig/db/dur.cpp mongodb-src-r2.0.6/db/dur.cpp | |
142 | --- mongodb-src-r2.0.6.orig/db/dur.cpp 2012-06-04 15:42:54.000000000 +0200 | |
143 | +++ mongodb-src-r2.0.6/db/dur.cpp 2012-07-11 14:38:50.248712139 +0200 | |
144 | @@ -692,7 +692,7 @@ | |
145 | ||
146 | bool samePartition = true; | |
147 | try { | |
148 | - const string dbpathDir = boost::filesystem::path(dbpath).native_directory_string(); | |
149 | + const string dbpathDir = boost::filesystem::path(dbpath).native(); | |
150 | samePartition = onSamePartition(getJournalDir().string(), dbpathDir); | |
151 | } | |
152 | catch(...) { | |
153 | diff -ur mongodb-src-r2.0.6.orig/db/instance.cpp mongodb-src-r2.0.6/db/instance.cpp | |
154 | --- mongodb-src-r2.0.6.orig/db/instance.cpp 2012-06-04 15:42:54.000000000 +0200 | |
155 | +++ mongodb-src-r2.0.6/db/instance.cpp 2012-07-11 14:39:15.948711232 +0200 | |
156 | @@ -893,7 +893,7 @@ | |
157 | } | |
158 | ||
159 | void acquirePathLock(bool doingRepair) { | |
160 | - string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).native_file_string(); | |
161 | + string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).native(); | |
162 | ||
163 | bool oldFile = false; | |
164 | ||
165 | diff -ur mongodb-src-r2.0.6.orig/db/pdfile.cpp mongodb-src-r2.0.6/db/pdfile.cpp | |
166 | --- mongodb-src-r2.0.6.orig/db/pdfile.cpp 2012-06-04 15:42:54.000000000 +0200 | |
167 | +++ mongodb-src-r2.0.6/db/pdfile.cpp 2012-07-11 14:38:50.252045472 +0200 | |
168 | @@ -2093,7 +2093,7 @@ | |
169 | uniqueReservedPath( ( preserveClonedFilesOnFailure || backupOriginalFiles ) ? | |
170 | "backup" : "$tmp" ); | |
171 | BOOST_CHECK_EXCEPTION( boost::filesystem::create_directory( reservedPath ) ); | |
172 | - string reservedPathString = reservedPath.native_directory_string(); | |
173 | + string reservedPathString = reservedPath.native(); | |
174 | ||
175 | bool res; | |
176 | { | |
177 | diff -ur mongodb-src-r2.0.6.orig/dbtests/framework.cpp mongodb-src-r2.0.6/dbtests/framework.cpp | |
178 | --- mongodb-src-r2.0.6.orig/dbtests/framework.cpp 2012-06-04 15:42:54.000000000 +0200 | |
179 | +++ mongodb-src-r2.0.6/dbtests/framework.cpp 2012-07-11 14:38:50.252045472 +0200 | |
180 | @@ -281,7 +281,7 @@ | |
181 | boost::filesystem::create_directory(p); | |
182 | } | |
183 | ||
184 | - string dbpathString = p.native_directory_string(); | |
185 | + string dbpathString = p.native(); | |
186 | dbpath = dbpathString.c_str(); | |
187 | ||
188 | cmdLine.prealloc = false; | |
189 | diff -ur mongodb-src-r2.0.6.orig/shell/shell_utils.cpp mongodb-src-r2.0.6/shell/shell_utils.cpp | |
190 | --- mongodb-src-r2.0.6.orig/shell/shell_utils.cpp 2012-06-04 15:42:54.000000000 +0200 | |
191 | +++ mongodb-src-r2.0.6/shell/shell_utils.cpp 2012-07-11 14:39:15.948711232 +0200 | |
192 | @@ -388,7 +388,7 @@ | |
193 | #endif | |
194 | } | |
195 | ||
196 | - argv_.push_back( programPath.native_file_string() ); | |
197 | + argv_.push_back( programPath.native() ); | |
198 | ||
199 | port_ = -1; | |
200 | ||
886c1094 JR |
201 | --- mongodb-src-r2.0.6/db/dur_journal.cpp~ 2012-06-04 15:42:54.000000000 +0200 |
202 | +++ mongodb-src-r2.0.6/db/dur_journal.cpp 2012-07-11 14:43:04.345369843 +0200 | |
203 | @@ -169,7 +169,7 @@ | |
204 | for ( boost::filesystem::directory_iterator i( getJournalDir() ); | |
205 | i != boost::filesystem::directory_iterator(); | |
206 | ++i ) { | |
207 | - string fileName = boost::filesystem::path(*i).leaf(); | |
208 | + string fileName = boost::filesystem::path(*i).filename().string(); | |
209 | if( str::startsWith(fileName, "j._") ) | |
210 | return true; | |
211 | } | |
212 | @@ -185,7 +185,7 @@ | |
213 | for ( boost::filesystem::directory_iterator i( getJournalDir() ); | |
214 | i != boost::filesystem::directory_iterator(); | |
215 | ++i ) { | |
216 | - string fileName = boost::filesystem::path(*i).leaf(); | |
217 | + string fileName = boost::filesystem::path(*i).filename().string(); | |
218 | if( str::startsWith(fileName, "j._") ) { | |
219 | try { | |
220 | removeOldJournalFile(*i); | |
221 | --- mongodb-src-r2.0.6/db/dur_recover.cpp~ 2012-06-04 15:42:54.000000000 +0200 | |
222 | +++ mongodb-src-r2.0.6/db/dur_recover.cpp 2012-07-11 14:43:24.775369122 +0200 | |
223 | @@ -71,7 +71,7 @@ | |
224 | i != filesystem::directory_iterator(); | |
225 | ++i ) { | |
226 | filesystem::path filepath = *i; | |
227 | - string fileName = filesystem::path(*i).leaf(); | |
228 | + string fileName = filesystem::path(*i).filename().string(); | |
229 | if( str::startsWith(fileName, "j._") ) { | |
230 | unsigned u = str::toUnsigned( str::after(fileName, '_') ); | |
231 | if( m.count(u) ) { | |
232 | @@ -84,7 +84,7 @@ | |
233 | if( i != m.begin() && m.count(i->first - 1) == 0 ) { | |
234 | uasserted(13532, | |
235 | str::stream() << "unexpected file in journal directory " << dir.string() | |
236 | - << " : " << filesystem::path(i->second).leaf() << " : can't find its preceeding file"); | |
237 | + << " : " << filesystem::path(i->second).filename().string() << " : can't find its preceeding file"); | |
238 | } | |
239 | files.push_back(i->second); | |
240 | } | |
241 | --- mongodb-src-r2.0.6/db/instance.cpp~ 2012-07-11 14:39:59.022043046 +0200 | |
242 | +++ mongodb-src-r2.0.6/db/instance.cpp 2012-07-11 14:43:51.298701519 +0200 | |
243 | @@ -645,13 +645,13 @@ | |
244 | i != boost::filesystem::directory_iterator(); ++i ) { | |
245 | if ( directoryperdb ) { | |
246 | boost::filesystem::path p = *i; | |
247 | - string dbName = p.leaf(); | |
248 | + string dbName = p.filename().string(); | |
249 | p /= ( dbName + ".ns" ); | |
250 | if ( MMF::exists( p ) ) | |
251 | names.push_back( dbName ); | |
252 | } | |
253 | else { | |
254 | - string fileName = boost::filesystem::path(*i).leaf(); | |
255 | + string fileName = boost::filesystem::path(*i).filename().string(); | |
256 | if ( fileName.length() > 3 && fileName.substr( fileName.length() - 3, 3 ) == ".ns" ) | |
257 | names.push_back( fileName.substr( 0, fileName.length() - 3 ) ); | |
258 | } | |
259 | --- mongodb-src-r2.0.6/db/pdfile.cpp~ 2012-07-11 14:39:59.022043046 +0200 | |
260 | +++ mongodb-src-r2.0.6/db/pdfile.cpp 2012-07-11 14:44:07.945367599 +0200 | |
261 | @@ -1987,7 +1987,7 @@ | |
262 | virtual bool apply( const Path &p ) { | |
263 | if ( !boost::filesystem::exists( p ) ) | |
264 | return false; | |
265 | - boostRenameWrapper( p, newPath_ / ( p.leaf() + ".bak" ) ); | |
266 | + boostRenameWrapper( p, newPath_ / ( p.filename().string() + ".bak" ) ); | |
267 | return true; | |
268 | } | |
269 | virtual const char * op() const { | |
270 | @@ -2010,7 +2010,7 @@ | |
271 | virtual bool apply( const Path &p ) { | |
272 | if ( !boost::filesystem::exists( p ) ) | |
273 | return false; | |
274 | - boostRenameWrapper( p, newPath_ / p.leaf() ); | |
275 | + boostRenameWrapper( p, newPath_ / p.filename().string() ); | |
276 | return true; | |
277 | } | |
278 | virtual const char * op() const { | |
279 | --- mongodb-src-r2.0.6/tools/tool.cpp~ 2012-06-04 15:42:54.000000000 +0200 | |
280 | +++ mongodb-src-r2.0.6/tools/tool.cpp 2012-07-11 14:51:25.822018820 +0200 | |
281 | @@ -113,11 +113,13 @@ | |
282 | // we want durability to be disabled. | |
283 | cmdLine.dur = false; | |
284 | ||
285 | +#if( BOOST_VERSION < 105000 ) | |
286 | #if( BOOST_VERSION >= 104500 ) | |
287 | boost::filesystem::path::default_name_check( boost::filesystem2::no_check ); | |
288 | #else | |
289 | boost::filesystem::path::default_name_check( boost::filesystem::no_check ); | |
290 | #endif | |
291 | +#endif | |
292 | ||
293 | _name = argv[0]; | |
294 | ||
295 | --- mongodb-src-r2.0.6/tools/restore.cpp~ 2012-06-04 15:42:54.000000000 +0200 | |
296 | +++ mongodb-src-r2.0.6/tools/restore.cpp 2012-07-11 14:53:11.865348411 +0200 | |
297 | @@ -131,7 +131,7 @@ | |
298 | log(2) << "drillDown: " << root.string() << endl; | |
299 | ||
300 | // skip hidden files and directories | |
301 | - if (root.leaf()[0] == '.' && root.leaf() != ".") | |
302 | + if (root.filename().string()[0] == '.' && root.filename().string() != ".") | |
303 | return; | |
304 | ||
305 | if ( is_directory( root ) ) { | |
306 | @@ -161,10 +161,10 @@ | |
307 | } | |
308 | ||
309 | // don't insert oplog | |
310 | - if (top_level && !use_db && p.leaf() == "oplog.bson") | |
311 | + if (top_level && !use_db && p.filename().string() == "oplog.bson") | |
312 | continue; | |
313 | ||
314 | - if ( p.leaf() == "system.indexes.bson" ) | |
315 | + if ( p.filename().string() == "system.indexes.bson" ) | |
316 | indexes = p; | |
317 | else | |
318 | drillDown(p, use_db, use_coll); | |
319 | @@ -184,7 +184,7 @@ | |
320 | ||
321 | log() << root.string() << endl; | |
322 | ||
323 | - if ( root.leaf() == "system.profile.bson" ) { | |
324 | + if ( root.filename().string() == "system.profile.bson" ) { | |
325 | log() << "\t skipping" << endl; | |
326 | return; | |
327 | } | |
328 | @@ -210,7 +210,7 @@ | |
329 | ns += "." + _coll; | |
330 | } | |
331 | else { | |
332 | - string l = root.leaf(); | |
333 | + string l = root.filename().string(); | |
334 | l = l.substr( 0 , l.find_last_of( "." ) ); | |
335 | ns += "." + l; | |
336 | } | |
337 | @@ -218,7 +218,7 @@ | |
338 | out() << "\t going into namespace [" << ns << "]" << endl; | |
339 | ||
340 | if ( _drop ) { | |
341 | - if (root.leaf() != "system.users.bson" ) { | |
342 | + if (root.filename().string() != "system.users.bson" ) { | |
343 | out() << "\t dropping" << endl; | |
344 | conn().dropCollection( ns ); | |
345 | } else { | |
346 | @@ -235,7 +235,7 @@ | |
347 | _curns = ns.c_str(); | |
348 | _curdb = NamespaceString(_curns).db; | |
349 | processFile( root ); | |
350 | - if (_drop && root.leaf() == "system.users.bson") { | |
351 | + if (_drop && root.filename().string() == "system.users.bson") { | |
352 | // Delete any users that used to exist but weren't in the dump file | |
353 | for (set<string>::iterator it = _users.begin(); it != _users.end(); ++it) { | |
354 | BSONObj userMatch = BSON("user" << *it); |