]> git.tdb.fi Git - builder.git/commitdiff
Fix compile errors on 64-bit systems
authorMikko Rasa <tdb@tdb.fi>
Sun, 20 Sep 2009 16:19:05 +0000 (16:19 +0000)
committerMikko Rasa <tdb@tdb.fi>
Sun, 20 Sep 2009 16:19:05 +0000 (16:19 +0000)
source/analyzer.cpp
source/builder.cpp
source/condition.cpp
source/config.cpp

index 37c8911c4bcb3e8562837eaae5634c8d9e961bcd..eae9de75a182c5c83c4b36850464634e4b19e11b 100644 (file)
@@ -95,7 +95,7 @@ void Analyzer::build_depend_table(Target &tgt, unsigned depth)
 
 void Analyzer::print_table() const
 {
-       vector<unsigned> col_width;
+       vector<string::size_type> col_width;
 
        // Determine column widths
        for(Table::const_iterator i=table.begin(); i!=table.end(); ++i)
index 21d311a4db2f0573abc0d52e29720adfb6018588..5fb918c512a8e3ce7fc95b023a2dcc2a43a55108 100644 (file)
@@ -124,7 +124,7 @@ Builder::Builder(int argc, char **argv):
        const vector<string> &args=getopt.get_args();
        for(vector<string>::const_iterator i=args.begin(); i!=args.end(); ++i)
        {
-               unsigned equal=i->find('=');
+               string::size_type equal=i->find('=');
                if(equal!=string::npos)
                        cmdline_options.insert(StringMap::value_type(i->substr(0, equal), i->substr(equal+1)));
                else
@@ -387,7 +387,7 @@ Target *Builder::get_header(const string &include, const FS::Path &from, const l
                cxx_ver=Regex("[0-9]\\.[0-9.]+").match(run_command(argv))[0].str;
                while(!cxx_ver.empty() && !FS::is_dir(FS::Path("/usr/include/c++")/cxx_ver))
                {
-                       unsigned dot=cxx_ver.rfind('.');
+                       string::size_type dot=cxx_ver.rfind('.');
                        if(dot==string::npos)
                                break;
                        cxx_ver.erase(dot);
index e0068e02ec8c56eee29b3127ae0d99db9f42571b..4c9ac0b84453935c8afa3b86cc4cfcdb934afcd9 100644 (file)
@@ -23,7 +23,7 @@ Condition::Condition(SourcePackage &p, const string &expr):
                if(*i=="and")
                        continue;
 
-               unsigned token=i->find_first_of("=!");
+               string::size_type token=i->find_first_of("=!");
                if(token==string::npos)
                        expression.insert(StringMap::value_type(*i, "!0"));
                else if(token==0 && (*i)[0]=='!')
index 4c06c836d40936b19fc2b3e81b9e66c228573c4b..99bfeeaf14c84107a87dd9729356f1ea1dec8cdc 100644 (file)
@@ -103,10 +103,10 @@ void Config::finish()
                for(OptionMap::iterator i=options.begin(); i!=options.end(); ++i)
                {
                        Option &opt=i->second;
-                       unsigned dollar=0;
+                       string::size_type dollar=0;
                        while((dollar=opt.value.find('$', dollar))!=string::npos)
                        {
-                               unsigned end;
+                               string::size_type end;
                                string var;
                                if(opt.value[dollar+1]=='{')
                                {