[libc-commits] [libc] [libc] implement pathconf/fpathconf (PR #87165)

Nick Desaulniers via libc-commits libc-commits at lists.llvm.org
Thu Jun 20 08:22:47 PDT 2024


================
@@ -0,0 +1,122 @@
+//===-- Linux implementation of pathconf_utils ----------------------------===//
+//
+// 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/__support/OSUtil/syscall.h" // For internal syscall function.
+#include "src/__support/common.h"
+#include "src/errno/libc_errno.h"
+#include "src/sys/statvfs/linux/statfs_utils.h"
+#include <linux/bfs_fs.h>
+#if __has_include(<linux/ufs_fs.h>)
+#include <linux/ufs_fs.h>
+#else
+// from https://elixir.bootlin.com/linux/latest/source/fs/ufs/ufs_fs.h
+#define UFS_MAGIC 0x00011954
+#endif
+#include "hdr/limits_macros.h"
+#include "hdr/unistd_macros.h"
----------------
nickdesaulniers wrote:

These should go before src/ includes.

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


More information about the libc-commits mailing list