]> git.pld-linux.org Git - packages/mongodb.git/blame - boost-1.50.patch
- fix for "'swap' is not a member of 'std'" in gcc 4
[packages/mongodb.git] / boost-1.50.patch
CommitLineData
8f59c17f
JK
1diff -dur mongodb-src-r2.2.0.orig/src/mongo/db/db.cpp mongodb-src-r2.2.0/src/mongo/db/db.cpp
2--- mongodb-src-r2.2.0.orig/src/mongo/db/db.cpp 2012-08-28 07:28:11.000000000 +0200
3+++ mongodb-src-r2.2.0/src/mongo/db/db.cpp 2012-09-28 13:37:59.000000000 +0200
4@@ -348,7 +348,7 @@
bced33ee
JR
5 boost::filesystem::path path( dbpath );
6 for ( boost::filesystem::directory_iterator i( path );
7 i != boost::filesystem::directory_iterator(); ++i ) {
8- string fileName = boost::filesystem::path(*i).leaf();
9+ string fileName = boost::filesystem::path(*i).filename().string();
10 if ( boost::filesystem::is_directory( *i ) &&
11 fileName.length() && fileName[ 0 ] == '$' )
12 boost::filesystem::remove_all( *i );
8f59c17f 13@@ -748,11 +748,13 @@
886c1094
JR
14 dbExecCommand = argv[0];
15
16 srand(curTimeMicros());
17+#if( BOOST_VERSION < 105000 )
18 #if( BOOST_VERSION >= 104500 )
19 boost::filesystem::path::default_name_check( boost::filesystem2::no_check );
20 #else
21 boost::filesystem::path::default_name_check( boost::filesystem::no_check );
22 #endif
23+#endif
24
25 {
26 unsigned x = 0x12345678;
8f59c17f 27@@ -1083,7 +1085,7 @@
9cae008c
JR
28 if (params.count("shutdown")){
29 bool failed = false;
30
31- string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).native_file_string();
32+ string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).native();
33 if ( !boost::filesystem::exists( name ) || boost::filesystem::file_size( name ) == 0 )
34 failed = true;
35
8f59c17f
JK
36diff -dur mongodb-src-r2.2.0.orig/src/mongo/db/dur.cpp mongodb-src-r2.2.0/src/mongo/db/dur.cpp
37--- mongodb-src-r2.2.0.orig/src/mongo/db/dur.cpp 2012-08-28 07:28:11.000000000 +0200
38+++ mongodb-src-r2.2.0/src/mongo/db/dur.cpp 2012-09-28 13:37:59.000000000 +0200
39@@ -770,7 +770,7 @@
9cae008c
JR
40
41 bool samePartition = true;
42 try {
43- const string dbpathDir = boost::filesystem::path(dbpath).native_directory_string();
44+ const string dbpathDir = boost::filesystem::path(dbpath).native();
45 samePartition = onSamePartition(getJournalDir().string(), dbpathDir);
46 }
47 catch(...) {
8f59c17f
JK
48diff -dur mongodb-src-r2.2.0.orig/src/mongo/db/dur_journal.cpp mongodb-src-r2.2.0/src/mongo/db/dur_journal.cpp
49--- mongodb-src-r2.2.0.orig/src/mongo/db/dur_journal.cpp 2012-08-28 07:28:11.000000000 +0200
50+++ mongodb-src-r2.2.0/src/mongo/db/dur_journal.cpp 2012-09-28 13:42:45.000000000 +0200
51@@ -176,7 +176,7 @@
886c1094
JR
52 for ( boost::filesystem::directory_iterator i( getJournalDir() );
53 i != boost::filesystem::directory_iterator();
54 ++i ) {
55- string fileName = boost::filesystem::path(*i).leaf();
56+ string fileName = boost::filesystem::path(*i).filename().string();
8f59c17f 57 if( anyFiles || str::startsWith(fileName, "j._") )
886c1094
JR
58 return true;
59 }
8f59c17f 60@@ -194,7 +194,7 @@
886c1094
JR
61 for ( boost::filesystem::directory_iterator i( getJournalDir() );
62 i != boost::filesystem::directory_iterator();
63 ++i ) {
64- string fileName = boost::filesystem::path(*i).leaf();
65+ string fileName = boost::filesystem::path(*i).filename().string();
66 if( str::startsWith(fileName, "j._") ) {
67 try {
68 removeOldJournalFile(*i);
8f59c17f
JK
69diff -dur mongodb-src-r2.2.0.orig/src/mongo/db/dur_recover.cpp mongodb-src-r2.2.0/src/mongo/db/dur_recover.cpp
70--- mongodb-src-r2.2.0.orig/src/mongo/db/dur_recover.cpp 2012-08-28 07:28:11.000000000 +0200
71+++ mongodb-src-r2.2.0/src/mongo/db/dur_recover.cpp 2012-09-28 13:43:01.000000000 +0200
72@@ -72,7 +72,7 @@
73 i != boost::filesystem::directory_iterator();
886c1094 74 ++i ) {
8f59c17f
JK
75 boost::filesystem::path filepath = *i;
76- string fileName = boost::filesystem::path(*i).leaf();
77+ string fileName = boost::filesystem::path(*i).filename().string();
886c1094
JR
78 if( str::startsWith(fileName, "j._") ) {
79 unsigned u = str::toUnsigned( str::after(fileName, '_') );
80 if( m.count(u) ) {
8f59c17f 81@@ -85,7 +85,7 @@
886c1094
JR
82 if( i != m.begin() && m.count(i->first - 1) == 0 ) {
83 uasserted(13532,
84 str::stream() << "unexpected file in journal directory " << dir.string()
8f59c17f
JK
85- << " : " << boost::filesystem::path(i->second).leaf() << " : can't find its preceeding file");
86+ << " : " << boost::filesystem::path(i->second).filename().string() << " : can't find its preceeding file");
886c1094
JR
87 }
88 files.push_back(i->second);
89 }
8f59c17f
JK
90diff -dur mongodb-src-r2.2.0.orig/src/mongo/db/instance.cpp mongodb-src-r2.2.0/src/mongo/db/instance.cpp
91--- mongodb-src-r2.2.0.orig/src/mongo/db/instance.cpp 2012-08-28 07:28:11.000000000 +0200
92+++ mongodb-src-r2.2.0/src/mongo/db/instance.cpp 2012-09-28 13:43:18.000000000 +0200
93@@ -833,13 +833,13 @@
886c1094
JR
94 i != boost::filesystem::directory_iterator(); ++i ) {
95 if ( directoryperdb ) {
96 boost::filesystem::path p = *i;
97- string dbName = p.leaf();
98+ string dbName = p.filename().string();
99 p /= ( dbName + ".ns" );
8f59c17f 100 if ( exists( p ) )
886c1094
JR
101 names.push_back( dbName );
102 }
103 else {
104- string fileName = boost::filesystem::path(*i).leaf();
105+ string fileName = boost::filesystem::path(*i).filename().string();
106 if ( fileName.length() > 3 && fileName.substr( fileName.length() - 3, 3 ) == ".ns" )
107 names.push_back( fileName.substr( 0, fileName.length() - 3 ) );
108 }
8f59c17f
JK
109@@ -1102,7 +1102,7 @@
110 }
111
112 void acquirePathLock(bool doingRepair) {
113- string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).native_file_string();
114+ string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).native();
115
116 bool oldFile = false;
117
118diff -dur mongodb-src-r2.2.0.orig/src/mongo/db/pdfile.cpp mongodb-src-r2.2.0/src/mongo/db/pdfile.cpp
119--- mongodb-src-r2.2.0.orig/src/mongo/db/pdfile.cpp 2012-08-28 07:28:11.000000000 +0200
120+++ mongodb-src-r2.2.0/src/mongo/db/pdfile.cpp 2012-09-28 13:43:42.000000000 +0200
121@@ -1675,7 +1675,7 @@
886c1094
JR
122 virtual bool apply( const Path &p ) {
123 if ( !boost::filesystem::exists( p ) )
124 return false;
125- boostRenameWrapper( p, newPath_ / ( p.leaf() + ".bak" ) );
126+ boostRenameWrapper( p, newPath_ / ( p.filename().string() + ".bak" ) );
127 return true;
128 }
129 virtual const char * op() const {
8f59c17f 130@@ -1698,7 +1698,7 @@
886c1094
JR
131 virtual bool apply( const Path &p ) {
132 if ( !boost::filesystem::exists( p ) )
133 return false;
134- boostRenameWrapper( p, newPath_ / p.leaf() );
135+ boostRenameWrapper( p, newPath_ / p.filename().string() );
136 return true;
137 }
138 virtual const char * op() const {
8f59c17f
JK
139@@ -1783,7 +1783,7 @@
140 uniqueReservedPath( ( preserveClonedFilesOnFailure || backupOriginalFiles ) ?
141 "backup" : "_tmp" );
142 MONGO_ASSERT_ON_EXCEPTION( boost::filesystem::create_directory( reservedPath ) );
143- string reservedPathString = reservedPath.native_directory_string();
144+ string reservedPathString = reservedPath.native();
886c1094 145
8f59c17f
JK
146 bool res;
147 {
148diff -dur mongodb-src-r2.2.0.orig/src/mongo/dbtests/framework.cpp mongodb-src-r2.2.0/src/mongo/dbtests/framework.cpp
149--- mongodb-src-r2.2.0.orig/src/mongo/dbtests/framework.cpp 2012-08-28 07:28:11.000000000 +0200
150+++ mongodb-src-r2.2.0/src/mongo/dbtests/framework.cpp 2012-09-28 13:37:59.000000000 +0200
151@@ -199,7 +199,7 @@
152 boost::filesystem::create_directory(p);
153 }
154
155- string dbpathString = p.native_directory_string();
156+ string dbpathString = p.native();
157 dbpath = dbpathString.c_str();
158
159 cmdLine.prealloc = false;
160Only in mongodb-src-r2.2.0/src/mongo/dbtests: framework.cpp.orig
161diff -dur mongodb-src-r2.2.0.orig/src/mongo/pch.h mongodb-src-r2.2.0/src/mongo/pch.h
162--- mongodb-src-r2.2.0.orig/src/mongo/pch.h 2012-08-28 07:28:11.000000000 +0200
163+++ mongodb-src-r2.2.0/src/mongo/pch.h 2012-09-28 13:38:28.000000000 +0200
164@@ -44,7 +44,7 @@
165 #include "string.h"
166 #include "limits.h"
167
168-#define BOOST_FILESYSTEM_VERSION 2
169+#define BOOST_FILESYSTEM_VERSION 3
170 #include <boost/shared_ptr.hpp>
171 #include <boost/smart_ptr.hpp>
172 #include <boost/function.hpp>
173diff -dur mongodb-src-r2.2.0.orig/src/mongo/shell/shell_utils_launcher.cpp mongodb-src-r2.2.0/src/mongo/shell/shell_utils_launcher.cpp
174--- mongodb-src-r2.2.0.orig/src/mongo/shell/shell_utils_launcher.cpp 2012-08-28 07:28:11.000000000 +0200
175+++ mongodb-src-r2.2.0/src/mongo/shell/shell_utils_launcher.cpp 2012-09-28 13:39:57.000000000 +0200
176@@ -184,7 +184,7 @@
177 }
886c1094 178 #endif
886c1094 179
8f59c17f
JK
180- _argv.push_back( programPath.native_file_string() );
181+ _argv.push_back( programPath.native() );
182
183 _port = -1;
886c1094 184
8f59c17f
JK
185Only in mongodb-src-r2.2.0/src/mongo/shell: shell_utils_launcher.cpp~
186diff -dur mongodb-src-r2.2.0.orig/src/mongo/tools/restore.cpp mongodb-src-r2.2.0/src/mongo/tools/restore.cpp
187--- mongodb-src-r2.2.0.orig/src/mongo/tools/restore.cpp 2012-08-28 07:28:11.000000000 +0200
188+++ mongodb-src-r2.2.0/src/mongo/tools/restore.cpp 2012-09-28 13:41:57.000000000 +0200
189@@ -174,7 +174,7 @@
886c1094
JR
190 log(2) << "drillDown: " << root.string() << endl;
191
192 // skip hidden files and directories
193- if (root.leaf()[0] == '.' && root.leaf() != ".")
194+ if (root.filename().string()[0] == '.' && root.filename().string() != ".")
195 return;
196
197 if ( is_directory( root ) ) {
8f59c17f 198@@ -204,10 +204,10 @@
886c1094
JR
199 }
200
201 // don't insert oplog
202- if (top_level && !use_db && p.leaf() == "oplog.bson")
203+ if (top_level && !use_db && p.filename().string() == "oplog.bson")
204 continue;
205
8f59c17f
JK
206- if ( p.leaf() == "system.indexes.bson" ) {
207+ if ( p.filename().string() == "system.indexes.bson" ) {
886c1094 208 indexes = p;
8f59c17f 209 } else {
886c1094 210 drillDown(p, use_db, use_coll);
8f59c17f 211@@ -233,7 +233,7 @@
886c1094
JR
212
213 log() << root.string() << endl;
214
215- if ( root.leaf() == "system.profile.bson" ) {
216+ if ( root.filename().string() == "system.profile.bson" ) {
217 log() << "\t skipping" << endl;
218 return;
219 }
8f59c17f
JK
220@@ -255,7 +255,7 @@
221
222 verify( ns.size() );
223
224- string oldCollName = root.leaf(); // Name of the collection that was dumped from
225+ string oldCollName = root.filename().string(); // Name of the collection that was dumped from
226 oldCollName = oldCollName.substr( 0 , oldCollName.find_last_of( "." ) );
227 if (use_coll) {
886c1094 228 ns += "." + _coll;
8f59c17f
JK
229@@ -267,7 +267,7 @@
230 log() << "\tgoing into namespace [" << ns << "]" << endl;
886c1094
JR
231
232 if ( _drop ) {
233- if (root.leaf() != "system.users.bson" ) {
234+ if (root.filename().string() != "system.users.bson" ) {
8f59c17f 235 log() << "\t dropping" << endl;
886c1094
JR
236 conn().dropCollection( ns );
237 } else {
8f59c17f
JK
238@@ -287,7 +287,7 @@
239 if (!boost::filesystem::exists(metadataFile.string())) {
240 // This is fine because dumps from before 2.1 won't have a metadata file, just print a warning.
241 // System collections shouldn't have metadata so don't warn if that file is missing.
242- if (!startsWith(metadataFile.leaf(), "system.")) {
243+ if (!startsWith(metadataFile.filename().string(), "system.")) {
244 log() << metadataFile.string() << " not found. Skipping." << endl;
245 }
246 } else {
247@@ -317,7 +317,7 @@
248 }
249
886c1094
JR
250 processFile( root );
251- if (_drop && root.leaf() == "system.users.bson") {
252+ if (_drop && root.filename().string() == "system.users.bson") {
253 // Delete any users that used to exist but weren't in the dump file
254 for (set<string>::iterator it = _users.begin(); it != _users.end(); ++it) {
255 BSONObj userMatch = BSON("user" << *it);
8f59c17f
JK
256diff -dur mongodb-src-r2.2.0.orig/src/mongo/tools/tool.cpp mongodb-src-r2.2.0/src/mongo/tools/tool.cpp
257--- mongodb-src-r2.2.0.orig/src/mongo/tools/tool.cpp 2012-08-28 07:28:11.000000000 +0200
258+++ mongodb-src-r2.2.0/src/mongo/tools/tool.cpp 2012-09-28 13:37:59.000000000 +0200
259@@ -118,11 +118,13 @@
260 // we want durability to be disabled.
261 cmdLine.dur = false;
262
263+#if( BOOST_VERSION < 105000 )
264 #if( BOOST_VERSION >= 104500 )
265 boost::filesystem::path::default_name_check( boost::filesystem2::no_check );
266 #else
267 boost::filesystem::path::default_name_check( boost::filesystem::no_check );
268 #endif
269+#endif
270
271 _name = argv[0];
272
This page took 0.095709 seconds and 4 git commands to generate.