1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-08-10 07:27:46 +00:00

LibCore: Rename identifiers that can clash with libc macros (#4127)

POSIX allows the default streams (stdin, stdout and stderr) to be
macros, which means that on such systems (musl libc is one) building
Lagom will fail due to the File::std*() names.

Also fix any files that use these identifiers.
This commit is contained in:
Érico Nogueira Rolim 2020-12-22 19:37:11 -03:00 committed by GitHub
parent abc98dea09
commit a8f0e489a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 13 additions and 13 deletions

View file

@ -186,7 +186,7 @@ int main(int argc, char** argv)
};
if (!files.size() && !recursive) {
auto stdin_file = Core::File::stdin();
auto stdin_file = Core::File::standard_input();
for (;;) {
auto line = stdin_file->read_line();
bool is_binary = line.bytes().contains_slow(0);

View file

@ -41,7 +41,7 @@ int main(int argc, char** argv)
RefPtr<Core::File> file;
if (!path) {
file = Core::File::stdin();
file = Core::File::standard_input();
} else {
auto file_or_error = Core::File::open(path, Core::File::ReadOnly);
if (file_or_error.is_error()) {

View file

@ -62,7 +62,7 @@ int main(int argc, char** argv)
}
if (list || extract) {
auto file = Core::File::stdin();
auto file = Core::File::standard_input();
if (archive_file) {
auto maybe_file = Core::File::open(archive_file, Core::IODevice::OpenMode::ReadOnly);