[libc-commits] [libc] [libc] Add the implementation of the fdopen function (PR #94186)

Xu Zhang via libc-commits libc-commits at lists.llvm.org
Wed Jun 5 23:49:07 PDT 2024


================
@@ -0,0 +1,76 @@
+//===-- Implementation of fprintf -------------------------------*- 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/fdopen.h"
+
+#include "include/llvm-libc-macros/generic-error-number-macros.h"
+#include "include/llvm-libc-macros/linux/fcntl-macros.h"
+#include "src/__support/File/linux/file.h"
+#include "src/errno/libc_errno.h"
+#include "src/fcntl/fcntl.h"
----------------
simonzgx wrote:

I'm a little confused. Did you mean create a new wrapper function of `fcntl` in the OSUtil directory? Should ``LIBC_NAMESPACE::fcntl`` or  ``LIBC_NAMESPACE::syscall_impl`` be called inside the wrapper?

https://github.com/llvm/llvm-project/pull/94186


More information about the libc-commits mailing list