Commit ced1493d authored by ager@chromium.org's avatar ager@chromium.org

Remove use of strtoll in favor of strtol which should be supported on

more platforms.
Review URL: http://codereview.chromium.org/11607

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@813 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 8831e4ab
......@@ -304,13 +304,14 @@ PosixMemoryMappedFile::~PosixMemoryMappedFile() {
fclose(file_);
}
#ifdef ENABLE_LOGGING_AND_PROFILING
static unsigned StringToLongLong(char* buffer) {
return static_cast<unsigned>(strtoll(buffer, NULL, 16)); // NOLINT
static unsigned StringToLong(char* buffer) {
return static_cast<unsigned>(strtol(buffer, NULL, 16)); // NOLINT
}
#endif
void OS::LogSharedLibraryAddresses() {
#ifdef ENABLE_LOGGING_AND_PROFILING
static const int MAP_LENGTH = 1024;
......@@ -323,13 +324,13 @@ void OS::LogSharedLibraryAddresses() {
addr_buffer[10] = 0;
int result = read(fd, addr_buffer + 2, 8);
if (result < 8) break;
unsigned start = StringToLongLong(addr_buffer);
unsigned start = StringToLong(addr_buffer);
result = read(fd, addr_buffer + 2, 1);
if (result < 1) break;
if (addr_buffer[2] != '-') break;
result = read(fd, addr_buffer + 2, 8);
if (result < 8) break;
unsigned end = StringToLongLong(addr_buffer);
unsigned end = StringToLong(addr_buffer);
char buffer[MAP_LENGTH];
int bytes_read = -1;
do {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment