aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/compiler/subprocess.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/compiler/subprocess.h')
-rw-r--r--src/google/protobuf/compiler/subprocess.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/google/protobuf/compiler/subprocess.h b/src/google/protobuf/compiler/subprocess.h
index 9d980b06..977abff7 100644
--- a/src/google/protobuf/compiler/subprocess.h
+++ b/src/google/protobuf/compiler/subprocess.h
@@ -44,6 +44,8 @@
#include <string>
+#include <google/protobuf/port_def.inc>
+
namespace google {
namespace protobuf {
@@ -52,7 +54,7 @@ class Message;
namespace compiler {
// Utility class for launching sub-processes.
-class LIBPROTOC_EXPORT Subprocess {
+class PROTOC_EXPORT Subprocess {
public:
Subprocess();
~Subprocess();
@@ -64,19 +66,19 @@ class LIBPROTOC_EXPORT Subprocess {
// Start the subprocess. Currently we don't provide a way to specify
// arguments as protoc plugins don't have any.
- void Start(const string& program, SearchMode search_mode);
+ void Start(const std::string& program, SearchMode search_mode);
// Serialize the input message and pipe it to the subprocess's stdin, then
// close the pipe. Meanwhile, read from the subprocess's stdout and parse
// the data into *output. All this is done carefully to avoid deadlocks.
// Returns true if successful. On any sort of error, returns false and sets
// *error to a description of the problem.
- bool Communicate(const Message& input, Message* output, string* error);
+ bool Communicate(const Message& input, Message* output, std::string* error);
#ifdef _WIN32
// Given an error code, returns a human-readable error message. This is
// defined here so that CommandLineInterface can share it.
- static string Win32ErrorMessage(DWORD error_code);
+ static std::string Win32ErrorMessage(DWORD error_code);
#endif
private:
@@ -102,6 +104,8 @@ class LIBPROTOC_EXPORT Subprocess {
} // namespace compiler
} // namespace protobuf
-
} // namespace google
+
+#include <google/protobuf/port_undef.inc>
+
#endif // GOOGLE_PROTOBUF_COMPILER_SUBPROCESS_H__