diff options
author | Brian Gianforcaro <bgianf@serenityos.org> | 2022-03-27 15:26:32 -0700 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2022-03-27 16:41:39 -0700 |
commit | 4674577d80e9b11f7311b1ad88e1ec45a0313591 (patch) | |
tree | 071725e1b2825ace11eea5bd508602821c9e4c39 /Userland/Libraries | |
parent | f3f3b32a0054d523cd27483622a04dabacb5f869 (diff) | |
download | serenity-4674577d80e9b11f7311b1ad88e1ec45a0313591.zip |
Everywhere: Rename CommandResult stdout, stderr members to output, error
The names stdout / stderr are bound to conflict with existing
declarations when compiling against other LibC's. The build on OpenBSD
is broken for this reason at the moment.
Lets rename the members to more generic names to resolve the situation.
Diffstat (limited to 'Userland/Libraries')
-rw-r--r-- | Userland/Libraries/LibCore/Command.cpp | 6 | ||||
-rw-r--r-- | Userland/Libraries/LibCore/Command.h | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Libraries/LibCore/Command.cpp b/Userland/Libraries/LibCore/Command.cpp index b1e3a9e9de..25e48425a6 100644 --- a/Userland/Libraries/LibCore/Command.cpp +++ b/Userland/Libraries/LibCore/Command.cpp @@ -80,8 +80,8 @@ ErrorOr<CommandResult> command(String const& program, Vector<String> const& argu } return String::copy(result_file->read_all()); }; - auto stdout = read_all_from_pipe(stdout_pipe); - auto stderr = read_all_from_pipe(stderr_pipe); + auto output = read_all_from_pipe(stdout_pipe); + auto error = read_all_from_pipe(stderr_pipe); int wstatus { 0 }; waitpid(pid, &wstatus, 0); @@ -94,7 +94,7 @@ ErrorOr<CommandResult> command(String const& program, Vector<String> const& argu # endif } - return CommandResult { WEXITSTATUS(wstatus), stdout, stderr }; + return CommandResult { WEXITSTATUS(wstatus), output, error }; } #endif diff --git a/Userland/Libraries/LibCore/Command.h b/Userland/Libraries/LibCore/Command.h index 8a19986c37..a3680a5962 100644 --- a/Userland/Libraries/LibCore/Command.h +++ b/Userland/Libraries/LibCore/Command.h @@ -17,8 +17,8 @@ namespace Core { struct CommandResult { int exit_code { 0 }; - String stdout; - String stderr; + String output; + String error; }; ErrorOr<CommandResult> command(String const& program, Vector<String> const& arguments, Optional<LexicalPath> chdir); |