This change allows compiling the google-breakpad code using a global ::string class instead of std::string. For more details take a look at common/using_std_string.h

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@974 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
ivan.penkov@gmail.com 2012-06-28 22:46:01 +00:00
parent 93cebf538e
commit 6de969a304
103 changed files with 521 additions and 385 deletions

View file

@ -39,6 +39,9 @@
#include <string.h>
#include <time.h>
#include <string>
#include "common/using_std_string.h"
#include "processor/logging.h"
#include "processor/pathname_stripper.h"
@ -80,25 +83,25 @@ LogStream::~LogStream() {
stream_ << std::endl;
}
std::string HexString(u_int32_t number) {
string HexString(u_int32_t number) {
char buffer[11];
snprintf(buffer, sizeof(buffer), "0x%x", number);
return std::string(buffer);
return string(buffer);
}
std::string HexString(u_int64_t number) {
string HexString(u_int64_t number) {
char buffer[19];
snprintf(buffer, sizeof(buffer), "0x%" PRIx64, number);
return std::string(buffer);
return string(buffer);
}
std::string HexString(int number) {
string HexString(int number) {
char buffer[19];
snprintf(buffer, sizeof(buffer), "0x%x", number);
return std::string(buffer);
return string(buffer);
}
int ErrnoString(std::string *error_string) {
int ErrnoString(string *error_string) {
assert(error_string);
// strerror isn't necessarily thread-safe. strerror_r would be preferrable,