[libc-commits] [libc] [libc] Implement fallocate (PR #222843)
Pavel Labath via libc-commits
libc-commits at lists.llvm.org
Fri Sep 11 03:59:48 PDT 2026
================
@@ -0,0 +1,59 @@
+//===-- Unittests for fallocate -------------------------------------------===//
+//
+// 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/fcntl/fallocate.h"
+#include "src/fcntl/open.h"
+#include "src/sys/stat/fstat.h"
+#include "src/unistd/close.h"
+#include "src/unistd/unlink.h"
+#include "src/__support/libc_errno.h"
+#include "test/UnitTest/ErrnoSetterMatcher.h"
+#include "test/UnitTest/Test.h"
+#include "test/UnitTest/ErrnoCheckingTest.h"
+#include <fcntl.h>
+#include <sys/stat.h>
----------------
labath wrote:
Don't include system headers here. You probably want to include `hdr/XXX_macros.h`
https://github.com/llvm/llvm-project/pull/222843
More information about the libc-commits
mailing list