diff options
author | kenton@google.com <kenton@google.com@630680e5-0e50-0410-840e-4b1c322b438d> | 2009-08-17 20:34:29 +0000 |
---|---|---|
committer | kenton@google.com <kenton@google.com@630680e5-0e50-0410-840e-4b1c322b438d> | 2009-08-17 20:34:29 +0000 |
commit | 3aa7a0dafe24faba4af8f70a257f74f07162e277 (patch) | |
tree | 282b3ee1e5c9ba4e5dfee215b708fda2404dad7d /src/google/protobuf/testing/googletest.cc | |
parent | ad5672bad71821354380959eaf80ea487b9007f2 (diff) | |
download | protobuf-3aa7a0dafe24faba4af8f70a257f74f07162e277.tar.gz protobuf-3aa7a0dafe24faba4af8f70a257f74f07162e277.tar.bz2 protobuf-3aa7a0dafe24faba4af8f70a257f74f07162e277.zip |
HPUX patch from Alexander Melnikov.
Diffstat (limited to 'src/google/protobuf/testing/googletest.cc')
-rw-r--r-- | src/google/protobuf/testing/googletest.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/google/protobuf/testing/googletest.cc b/src/google/protobuf/testing/googletest.cc index 1339b332..cd094d0c 100644 --- a/src/google/protobuf/testing/googletest.cc +++ b/src/google/protobuf/testing/googletest.cc @@ -46,6 +46,8 @@ #endif #include <stdio.h> #include <fcntl.h> +#include <iostream> +#include <fstream> namespace google { namespace protobuf { @@ -94,7 +96,8 @@ string GetTemporaryDirectoryName() { // tmpnam() is generally not considered safe but we're only using it for // testing. We cannot use tmpfile() or mkstemp() since we're creating a // directory. - string result = tmpnam(NULL); + char b[L_tmpnam + 1]; // HPUX multithread return 0 if s is 0 + string result = tmpnam(b); #ifdef _WIN32 // On Win32, tmpnam() returns a file prefixed with '\', but which is supposed // to be used in the current working directory. WTF? |