1//===--- Definition of Linux stdout ---------------------------------------===//
2//
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
6//
7//===----------------------------------------------------------------------===//
8
9#include "file.h"
10#include <stdio.h>
11
12namespace LIBC_NAMESPACE {
13
14constexpr size_t STDOUT_BUFFER_SIZE = 1024;
15uint8_t stdout_buffer[STDOUT_BUFFER_SIZE];
16static LinuxFile StdOut(1, stdout_buffer, STDOUT_BUFFER_SIZE, _IOLBF, false,
17 File::ModeFlags(File::OpenMode::APPEND));
18File *stdout = &StdOut;
19
20} // namespace LIBC_NAMESPACE
21
22extern "C" {
23FILE *stdout = reinterpret_cast<FILE *>(&LIBC_NAMESPACE::StdOut);
24} // extern "C"
25

source code of libc/src/__support/File/linux/stdout.cpp