[libc-commits] [libc] [libc] Implement fcntl() function (PR #89507)
Michael Jones via libc-commits
libc-commits at lists.llvm.org
Tue Apr 30 10:14:49 PDT 2024
================
@@ -0,0 +1,150 @@
+//===-- Unittest for fcntl ------------------------------------------------===//
+//
+// 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/errno/libc_errno.h"
----------------
michaelrj-google wrote:
this test also needs these includes
```
#include "hdr/fcntl_macros.h"
#include "hdr/types/struct_flock.h"
#include <sys/stat.h> // For S_IRWXU
#include <stdio.h> // For SEEK_SET
```
Additionally, you need the `F_RDLCK`, `F_WRLCK`, and `F_UNLCK` macros to be defined in `fcntl_macros.h`.
https://github.com/llvm/llvm-project/pull/89507
More information about the libc-commits
mailing list