26 lines · cpp
1//===--- Definition of Linux stderr ---------------------------------------===//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-exception6//7//===----------------------------------------------------------------------===//8 9#include "file.h"10#include "hdr/stdio_macros.h"11#include "hdr/types/FILE.h"12#include "src/__support/macros/config.h"13 14namespace LIBC_NAMESPACE_DECL {15 16constexpr size_t STDERR_BUFFER_SIZE = 0;17static LinuxFile StdErr(2, nullptr, STDERR_BUFFER_SIZE, _IONBF, false,18 File::ModeFlags(File::OpenMode::APPEND));19File *stderr = &StdErr;20 21} // namespace LIBC_NAMESPACE_DECL22 23extern "C" {24FILE *stderr = reinterpret_cast<FILE *>(&LIBC_NAMESPACE::StdErr);25}26