1a1be5d69SJoseph Huber //===-- Implementation of ferror_unlocked ---------------------------------===// 2a1be5d69SJoseph Huber // 3a1be5d69SJoseph Huber // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4a1be5d69SJoseph Huber // See https://llvm.org/LICENSE.txt for license information. 5a1be5d69SJoseph Huber // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6a1be5d69SJoseph Huber // 7a1be5d69SJoseph Huber //===----------------------------------------------------------------------===// 8a1be5d69SJoseph Huber 9a1be5d69SJoseph Huber #include "src/stdio/ferror_unlocked.h" 10a1be5d69SJoseph Huber #include "src/__support/File/file.h" 11*5ff3ff33SPetr Hosek #include "src/__support/macros/config.h" 12a1be5d69SJoseph Huber 135aed6d67SMichael Jones #include "hdr/types/FILE.h" 14a1be5d69SJoseph Huber 15*5ff3ff33SPetr Hosek namespace LIBC_NAMESPACE_DECL { 16a1be5d69SJoseph Huber 17a1be5d69SJoseph Huber LLVM_LIBC_FUNCTION(int, ferror_unlocked, (::FILE * stream)) { 18b6bc9d72SGuillaume Chatelet return reinterpret_cast<LIBC_NAMESPACE::File *>(stream)->error_unlocked(); 19a1be5d69SJoseph Huber } 20a1be5d69SJoseph Huber 21*5ff3ff33SPetr Hosek } // namespace LIBC_NAMESPACE_DECL 22