================ @@ -0,0 +1,23 @@ +//===-- Implementation of ferror for baremetal ------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "src/stdio/ferror.h" + +#include "hdr/types/FILE.h" +#include "src/__support/common.h" +#include "src/__support/macros/config.h" + +namespace LIBC_NAMESPACE_DECL { + +LLVM_LIBC_FUNCTION(int, ferror, (::FILE * stream)) { + (void)stream; + // TODO: Shall we have an embeddeding API for ferror? ---------------- mysterymath wrote:
Now that you've added error handling to the various functions, this doesn't seem to be a valid implementation of ferror (and feof), which state that they report whether or not an error has ocurred on a given stream. I think we would need some kind of error tracking here. https://github.com/llvm/llvm-project/pull/168931 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
