Rename stdout and stderr to stdout_str and stderr_str
Support building with musl libc by not reusing the stdout and
stderr names, which are macros in musl.
Bug: 190084016
Test: m USE_HOST_MUSL=true host-native
Change-Id: Ia8093f42ede166c77c04f5524d442de836bde43c
diff --git a/common/subprocess.h b/common/subprocess.h
index 2ed8b81..e59776a 100644
--- a/common/subprocess.h
+++ b/common/subprocess.h
@@ -91,18 +91,18 @@
// |output_pipes|, otherwise returns -1.
int GetPipeFd(pid_t pid, int fd) const;
- // Executes a command synchronously. Returns true on success. If |stdout| is
- // non-null, the process output is stored in it, otherwise the output is
+ // Executes a command synchronously. Returns true on success. If |stdout_str|
+ // is non-null, the process output is stored in it, otherwise the output is
// logged.
static bool SynchronousExec(const std::vector<std::string>& cmd,
int* return_code,
- std::string* stdout,
- std::string* stderr);
+ std::string* stdout_str,
+ std::string* stderr_str);
static bool SynchronousExecFlags(const std::vector<std::string>& cmd,
uint32_t flags,
int* return_code,
- std::string* stdout,
- std::string* stderr);
+ std::string* stdout_str,
+ std::string* stderr_str);
// Gets the one instance.
static Subprocess& Get() { return *subprocess_singleton_; }
@@ -131,7 +131,7 @@
std::unique_ptr<base::FileDescriptorWatcher::Controller> stdout_controller;
int stdout_fd{-1};
- std::string stdout;
+ std::string stdout_str;
};
// Callback which runs whenever there is input available on the subprocess