aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/stubs
diff options
context:
space:
mode:
authorGravatar kenton@google.com <kenton@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2009-08-17 20:34:29 +0000
committerGravatar kenton@google.com <kenton@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2009-08-17 20:34:29 +0000
commit3aa7a0dafe24faba4af8f70a257f74f07162e277 (patch)
tree282b3ee1e5c9ba4e5dfee215b708fda2404dad7d /src/google/protobuf/stubs
parentad5672bad71821354380959eaf80ea487b9007f2 (diff)
HPUX patch from Alexander Melnikov.
Diffstat (limited to 'src/google/protobuf/stubs')
-rw-r--r--src/google/protobuf/stubs/hash.h2
-rw-r--r--src/google/protobuf/stubs/strutil.cc2
-rw-r--r--src/google/protobuf/stubs/strutil.h1
3 files changed, 3 insertions, 2 deletions
diff --git a/src/google/protobuf/stubs/hash.h b/src/google/protobuf/stubs/hash.h
index c3414138..a828a9c6 100644
--- a/src/google/protobuf/stubs/hash.h
+++ b/src/google/protobuf/stubs/hash.h
@@ -98,7 +98,7 @@ template <typename Key,
class hash_set : public std::set<Key, HashFcn> {
};
-#elif defined(_MSC_VER)
+#elif defined(_MSC_VER) && !defined(_STLPORT_VERSION)
template <typename Key>
struct hash : public HASH_NAMESPACE::hash_compare<Key> {
diff --git a/src/google/protobuf/stubs/strutil.cc b/src/google/protobuf/stubs/strutil.cc
index a4764753..32b0f031 100644
--- a/src/google/protobuf/stubs/strutil.cc
+++ b/src/google/protobuf/stubs/strutil.cc
@@ -1027,7 +1027,7 @@ char* DoubleToBuffer(double value, char* buffer) {
bool safe_strtof(const char* str, float* value) {
char* endptr;
errno = 0; // errno only gets set on errors
-#ifdef _WIN32 // has no strtof()
+#if defined(_WIN32) || defined (__hpux) // has no strtof()
*value = strtod(str, &endptr);
#else
*value = strtof(str, &endptr);
diff --git a/src/google/protobuf/stubs/strutil.h b/src/google/protobuf/stubs/strutil.h
index 7f6bd96f..c04c1230 100644
--- a/src/google/protobuf/stubs/strutil.h
+++ b/src/google/protobuf/stubs/strutil.h
@@ -33,6 +33,7 @@
#ifndef GOOGLE_PROTOBUF_STUBS_STRUTIL_H__
#define GOOGLE_PROTOBUF_STUBS_STRUTIL_H__
+#include <stdlib.h>
#include <vector>
#include <google/protobuf/stubs/common.h>