First post, by eurobob12
Trying to compile the megabuild on ubuntu 10.04. I get this when I try to compile:
setup.cpp: In member function ‘bool Value::set_hex(const std::string&)’:
setup.cpp:148: error: ‘INT_MIN’ was not declared in this scope
setup.cpp: In member function ‘bool Value::set_int(const std::string&)’:
setup.cpp:157: error: ‘INT_MIN’ was not declared in this scope
make[3]: *** [setup.o] Error 1
make[3]: Leaving directory `/usr/local/bobsoft/current/dosbox/src/misc'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/bobsoft/current/dosbox/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/bobsoft/current/dosbox'
make: *** [all] Error 2
This is what the setup.cpp file looks like. Not sure what is wrong:
bool Value::set_hex(std::string const& in) {
istringstream input(in);
input.flags(ios::hex);
Bits result = INT_MIN;
input >> result;
if(result == INT_MIN) return false;
_hex = result;
return true;
}
bool Value::set_int(string const &in) {
istringstream input(in);
Bits result = INT_MIN;
input >> result;
if(result == INT_MIN) return false;
_int = result;
return true;
}
bool Value::set_double(string const &in) {
istringstream input(in);
double result = std::numeric_limits<double>::infinity();
input >> result;
if(result == std::numeric_limits<double>::infinity()) return false;
_double = result;
return true;
}
bool Value::set_bool(string const &in) {
istringstream input(in);
string result;
input >> result;
lowcase(result);
_bool = true; // TODO
if(!result.size()) return false;
if(result=="0" || result=="disabled" || result=="false" || result=="off") {
_bool = false;
} else if(result=="1" || result=="enabled" || result=="true" || result=="on") {
_bool = true;
} else return false;
return true;