1 //===--- Definition of Linux stdout ---------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
12 namespace LIBC_NAMESPACE
{
14 constexpr size_t STDOUT_BUFFER_SIZE
= 1024;
15 uint8_t stdout_buffer
[STDOUT_BUFFER_SIZE
];
16 static LinuxFile
StdOut(1, stdout_buffer
, STDOUT_BUFFER_SIZE
, _IOLBF
, false,
17 File::ModeFlags(File::OpenMode::APPEND
));
18 File
*stdout
= &StdOut
;
20 } // namespace LIBC_NAMESPACE
23 FILE *stdout
= reinterpret_cast<FILE *>(&LIBC_NAMESPACE::StdOut
);