]>
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 | |
bced33ee JR |
118 | @@ -326,7 +326,7 @@ |
119 | boost::filesystem::path path( dbpath ); | |
120 | for ( boost::filesystem::directory_iterator i( path ); | |
121 | i != boost::filesystem::directory_iterator(); ++i ) { | |
122 | - string fileName = boost::filesystem::path(*i).leaf(); | |
123 | + string fileName = boost::filesystem::path(*i).filename().string(); | |
124 | if ( boost::filesystem::is_directory( *i ) && | |
125 | fileName.length() && fileName[ 0 ] == '$' ) | |
126 | boost::filesystem::remove_all( *i ); | |
886c1094 JR |
127 | @@ -655,11 +655,13 @@ |
128 | dbExecCommand = argv[0]; | |
129 | ||
130 | srand(curTimeMicros()); | |
131 | +#if( BOOST_VERSION < 105000 ) | |
132 | #if( BOOST_VERSION >= 104500 ) | |
133 | boost::filesystem::path::default_name_check( boost::filesystem2::no_check ); | |
134 | #else | |
135 | boost::filesystem::path::default_name_check( boost::filesystem::no_check ); | |
136 | #endif | |
137 | +#endif | |
138 | ||
139 | { | |
140 | unsigned x = 0x12345678; | |
9cae008c JR |
141 | @@ -976,7 +976,7 @@ |
142 | if (params.count("shutdown")){ | |
143 | bool failed = false; | |
144 | ||
145 | - string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).native_file_string(); | |
146 | + string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).native(); | |
147 | if ( !boost::filesystem::exists( name ) || boost::filesystem::file_size( name ) == 0 ) | |
148 | failed = true; | |
149 | ||
150 | diff -ur mongodb-src-r2.0.6.orig/db/dur.cpp mongodb-src-r2.0.6/db/dur.cpp | |
151 | --- mongodb-src-r2.0.6.orig/db/dur.cpp 2012-06-04 15:42:54.000000000 +0200 | |
152 | +++ mongodb-src-r2.0.6/db/dur.cpp 2012-07-11 14:38:50.248712139 +0200 | |
153 | @@ -692,7 +692,7 @@ | |
154 | ||
155 | bool samePartition = true; | |
156 | try { | |
157 | - const string dbpathDir = boost::filesystem::path(dbpath).native_directory_string(); | |
158 | + const string dbpathDir = boost::filesystem::path(dbpath).native(); | |
159 | samePartition = onSamePartition(getJournalDir().string(), dbpathDir); | |
160 | } | |
161 | catch(...) { | |
162 | diff -ur mongodb-src-r2.0.6.orig/db/instance.cpp mongodb-src-r2.0.6/db/instance.cpp | |
163 | --- mongodb-src-r2.0.6.orig/db/instance.cpp 2012-06-04 15:42:54.000000000 +0200 | |
164 | +++ mongodb-src-r2.0.6/db/instance.cpp 2012-07-11 14:39:15.948711232 +0200 | |
165 | @@ -893,7 +893,7 @@ | |
166 | } | |
167 | ||
168 | void acquirePathLock(bool doingRepair) { | |
169 | - string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).native_file_string(); | |
170 | + string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).native(); | |
171 | ||
172 | bool oldFile = false; | |
173 | ||
174 | diff -ur mongodb-src-r2.0.6.orig/db/pdfile.cpp mongodb-src-r2.0.6/db/pdfile.cpp | |
175 | --- mongodb-src-r2.0.6.orig/db/pdfile.cpp 2012-06-04 15:42:54.000000000 +0200 | |
176 | +++ mongodb-src-r2.0.6/db/pdfile.cpp 2012-07-11 14:38:50.252045472 +0200 | |
177 | @@ -2093,7 +2093,7 @@ | |
178 | uniqueReservedPath( ( preserveClonedFilesOnFailure || backupOriginalFiles ) ? | |
179 | "backup" : "$tmp" ); | |
180 | BOOST_CHECK_EXCEPTION( boost::filesystem::create_directory( reservedPath ) ); | |
181 | - string reservedPathString = reservedPath.native_directory_string(); | |
182 | + string reservedPathString = reservedPath.native(); | |
183 | ||
184 | bool res; | |
185 | { | |
186 | diff -ur mongodb-src-r2.0.6.orig/dbtests/framework.cpp mongodb-src-r2.0.6/dbtests/framework.cpp | |
187 | --- mongodb-src-r2.0.6.orig/dbtests/framework.cpp 2012-06-04 15:42:54.000000000 +0200 | |
188 | +++ mongodb-src-r2.0.6/dbtests/framework.cpp 2012-07-11 14:38:50.252045472 +0200 | |
189 | @@ -281,7 +281,7 @@ | |
190 | boost::filesystem::create_directory(p); | |
191 | } | |
192 | ||
193 | - string dbpathString = p.native_directory_string(); | |
194 | + string dbpathString = p.native(); | |
195 | dbpath = dbpathString.c_str(); | |
196 | ||
197 | cmdLine.prealloc = false; | |
198 | diff -ur mongodb-src-r2.0.6.orig/shell/shell_utils.cpp mongodb-src-r2.0.6/shell/shell_utils.cpp | |
199 | --- mongodb-src-r2.0.6.orig/shell/shell_utils.cpp 2012-06-04 15:42:54.000000000 +0200 | |
200 | +++ mongodb-src-r2.0.6/shell/shell_utils.cpp 2012-07-11 14:39:15.948711232 +0200 | |
201 | @@ -388,7 +388,7 @@ | |
202 | #endif | |
203 | } | |
204 | ||
205 | - argv_.push_back( programPath.native_file_string() ); | |
206 | + argv_.push_back( programPath.native() ); | |
207 | ||
208 | port_ = -1; | |
209 | ||
886c1094 JR |
210 | --- mongodb-src-r2.0.6/db/dur_journal.cpp~ 2012-06-04 15:42:54.000000000 +0200 |
211 | +++ mongodb-src-r2.0.6/db/dur_journal.cpp 2012-07-11 14:43:04.345369843 +0200 | |
212 | @@ -169,7 +169,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 | return true; | |
220 | } | |
221 | @@ -185,7 +185,7 @@ | |
222 | for ( boost::filesystem::directory_iterator i( getJournalDir() ); | |
223 | i != boost::filesystem::directory_iterator(); | |
224 | ++i ) { | |
225 | - string fileName = boost::filesystem::path(*i).leaf(); | |
226 | + string fileName = boost::filesystem::path(*i).filename().string(); | |
227 | if( str::startsWith(fileName, "j._") ) { | |
228 | try { | |
229 | removeOldJournalFile(*i); | |
230 | --- mongodb-src-r2.0.6/db/dur_recover.cpp~ 2012-06-04 15:42:54.000000000 +0200 | |
231 | +++ mongodb-src-r2.0.6/db/dur_recover.cpp 2012-07-11 14:43:24.775369122 +0200 | |
232 | @@ -71,7 +71,7 @@ | |
233 | i != filesystem::directory_iterator(); | |
234 | ++i ) { | |
235 | filesystem::path filepath = *i; | |
236 | - string fileName = filesystem::path(*i).leaf(); | |
237 | + string fileName = filesystem::path(*i).filename().string(); | |
238 | if( str::startsWith(fileName, "j._") ) { | |
239 | unsigned u = str::toUnsigned( str::after(fileName, '_') ); | |
240 | if( m.count(u) ) { | |
241 | @@ -84,7 +84,7 @@ | |
242 | if( i != m.begin() && m.count(i->first - 1) == 0 ) { | |
243 | uasserted(13532, | |
244 | str::stream() << "unexpected file in journal directory " << dir.string() | |
245 | - << " : " << filesystem::path(i->second).leaf() << " : can't find its preceeding file"); | |
246 | + << " : " << filesystem::path(i->second).filename().string() << " : can't find its preceeding file"); | |
247 | } | |
248 | files.push_back(i->second); | |
249 | } | |
250 | --- mongodb-src-r2.0.6/db/instance.cpp~ 2012-07-11 14:39:59.022043046 +0200 | |
251 | +++ mongodb-src-r2.0.6/db/instance.cpp 2012-07-11 14:43:51.298701519 +0200 | |
252 | @@ -645,13 +645,13 @@ | |
253 | i != boost::filesystem::directory_iterator(); ++i ) { | |
254 | if ( directoryperdb ) { | |
255 | boost::filesystem::path p = *i; | |
256 | - string dbName = p.leaf(); | |
257 | + string dbName = p.filename().string(); | |
258 | p /= ( dbName + ".ns" ); | |
259 | if ( MMF::exists( p ) ) | |
260 | names.push_back( dbName ); | |
261 | } | |
262 | else { | |
263 | - string fileName = boost::filesystem::path(*i).leaf(); | |
264 | + string fileName = boost::filesystem::path(*i).filename().string(); | |
265 | if ( fileName.length() > 3 && fileName.substr( fileName.length() - 3, 3 ) == ".ns" ) | |
266 | names.push_back( fileName.substr( 0, fileName.length() - 3 ) ); | |
267 | } | |
268 | --- mongodb-src-r2.0.6/db/pdfile.cpp~ 2012-07-11 14:39:59.022043046 +0200 | |
269 | +++ mongodb-src-r2.0.6/db/pdfile.cpp 2012-07-11 14:44:07.945367599 +0200 | |
270 | @@ -1987,7 +1987,7 @@ | |
271 | virtual bool apply( const Path &p ) { | |
272 | if ( !boost::filesystem::exists( p ) ) | |
273 | return false; | |
274 | - boostRenameWrapper( p, newPath_ / ( p.leaf() + ".bak" ) ); | |
275 | + boostRenameWrapper( p, newPath_ / ( p.filename().string() + ".bak" ) ); | |
276 | return true; | |
277 | } | |
278 | virtual const char * op() const { | |
279 | @@ -2010,7 +2010,7 @@ | |
280 | virtual bool apply( const Path &p ) { | |
281 | if ( !boost::filesystem::exists( p ) ) | |
282 | return false; | |
283 | - boostRenameWrapper( p, newPath_ / p.leaf() ); | |
284 | + boostRenameWrapper( p, newPath_ / p.filename().string() ); | |
285 | return true; | |
286 | } | |
287 | virtual const char * op() const { | |
288 | --- mongodb-src-r2.0.6/tools/tool.cpp~ 2012-06-04 15:42:54.000000000 +0200 | |
289 | +++ mongodb-src-r2.0.6/tools/tool.cpp 2012-07-11 14:51:25.822018820 +0200 | |
290 | @@ -113,11 +113,13 @@ | |
291 | // we want durability to be disabled. | |
292 | cmdLine.dur = false; | |
293 | ||
294 | +#if( BOOST_VERSION < 105000 ) | |
295 | #if( BOOST_VERSION >= 104500 ) | |
296 | boost::filesystem::path::default_name_check( boost::filesystem2::no_check ); | |
297 | #else | |
298 | boost::filesystem::path::default_name_check( boost::filesystem::no_check ); | |
299 | #endif | |
300 | +#endif | |
301 | ||
302 | _name = argv[0]; | |
303 | ||
304 | --- mongodb-src-r2.0.6/tools/restore.cpp~ 2012-06-04 15:42:54.000000000 +0200 | |
305 | +++ mongodb-src-r2.0.6/tools/restore.cpp 2012-07-11 14:53:11.865348411 +0200 | |
306 | @@ -131,7 +131,7 @@ | |
307 | log(2) << "drillDown: " << root.string() << endl; | |
308 | ||
309 | // skip hidden files and directories | |
310 | - if (root.leaf()[0] == '.' && root.leaf() != ".") | |
311 | + if (root.filename().string()[0] == '.' && root.filename().string() != ".") | |
312 | return; | |
313 | ||
314 | if ( is_directory( root ) ) { | |
315 | @@ -161,10 +161,10 @@ | |
316 | } | |
317 | ||
318 | // don't insert oplog | |
319 | - if (top_level && !use_db && p.leaf() == "oplog.bson") | |
320 | + if (top_level && !use_db && p.filename().string() == "oplog.bson") | |
321 | continue; | |
322 | ||
323 | - if ( p.leaf() == "system.indexes.bson" ) | |
324 | + if ( p.filename().string() == "system.indexes.bson" ) | |
325 | indexes = p; | |
326 | else | |
327 | drillDown(p, use_db, use_coll); | |
328 | @@ -184,7 +184,7 @@ | |
329 | ||
330 | log() << root.string() << endl; | |
331 | ||
332 | - if ( root.leaf() == "system.profile.bson" ) { | |
333 | + if ( root.filename().string() == "system.profile.bson" ) { | |
334 | log() << "\t skipping" << endl; | |
335 | return; | |
336 | } | |
337 | @@ -210,7 +210,7 @@ | |
338 | ns += "." + _coll; | |
339 | } | |
340 | else { | |
341 | - string l = root.leaf(); | |
342 | + string l = root.filename().string(); | |
343 | l = l.substr( 0 , l.find_last_of( "." ) ); | |
344 | ns += "." + l; | |
345 | } | |
346 | @@ -218,7 +218,7 @@ | |
347 | out() << "\t going into namespace [" << ns << "]" << endl; | |
348 | ||
349 | if ( _drop ) { | |
350 | - if (root.leaf() != "system.users.bson" ) { | |
351 | + if (root.filename().string() != "system.users.bson" ) { | |
352 | out() << "\t dropping" << endl; | |
353 | conn().dropCollection( ns ); | |
354 | } else { | |
355 | @@ -235,7 +235,7 @@ | |
356 | _curns = ns.c_str(); | |
357 | _curdb = NamespaceString(_curns).db; | |
358 | processFile( root ); | |
359 | - if (_drop && root.leaf() == "system.users.bson") { | |
360 | + if (_drop && root.filename().string() == "system.users.bson") { | |
361 | // Delete any users that used to exist but weren't in the dump file | |
362 | for (set<string>::iterator it = _users.begin(); it != _users.end(); ++it) { | |
363 | BSONObj userMatch = BSON("user" << *it); |