[libc] Implement POSIX truncate and ftruncate functions for Linux.
authorSiva Chandra Reddy <sivachandra@google.com>
Thu, 25 Aug 2022 20:04:50 +0000 (20:04 +0000)
committerSiva Chandra Reddy <sivachandra@google.com>
Fri, 26 Aug 2022 19:27:24 +0000 (19:27 +0000)
commitf6506ec4431341b2d067f2d2fcda846129219695
treea3f4ee7c4cfb275f66778e2fd57a270134cef1f5
parenta5857bd21f3d52a0cbe5114e8be44774da7aab01
[libc] Implement POSIX truncate and ftruncate functions for Linux.

Reviewed By: michaelrj

Differential Revision: https://reviews.llvm.org/D132705
12 files changed:
libc/config/linux/aarch64/entrypoints.txt
libc/config/linux/x86_64/entrypoints.txt
libc/spec/posix.td
libc/src/unistd/CMakeLists.txt
libc/src/unistd/ftruncate.h [new file with mode: 0644]
libc/src/unistd/linux/CMakeLists.txt
libc/src/unistd/linux/ftruncate.cpp [new file with mode: 0644]
libc/src/unistd/linux/truncate.cpp [new file with mode: 0644]
libc/src/unistd/truncate.h [new file with mode: 0644]
libc/test/src/unistd/CMakeLists.txt
libc/test/src/unistd/ftruncate_test.cpp [new file with mode: 0644]
libc/test/src/unistd/truncate_test.cpp [new file with mode: 0644]