[PATCH] D56578: Fix size_t/off_t mixup in std::filesystem.

Dan Albert via Phabricator reviews at reviews.llvm.org
Tue Jan 15 11:20:21 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL351226: Fix size_t/off_t mixup in std::filesystem. (authored by danalbert, committed by ).
Herald added a subscriber: llvm-commits.

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56578/new/

https://reviews.llvm.org/D56578

Files:
  libcxx/trunk/src/filesystem/operations.cpp


Index: libcxx/trunk/src/filesystem/operations.cpp
===================================================================
--- libcxx/trunk/src/filesystem/operations.cpp
+++ libcxx/trunk/src/filesystem/operations.cpp
@@ -439,7 +439,8 @@
   return posix_lstat(p, path_stat, ec);
 }
 
-bool posix_ftruncate(const FileDescriptor& fd, size_t to_size, error_code& ec) {
+// http://pubs.opengroup.org/onlinepubs/9699919799/functions/ftruncate.html
+bool posix_ftruncate(const FileDescriptor& fd, off_t to_size, error_code& ec) {
   if (::ftruncate(fd.fd, to_size) == -1) {
     ec = capture_errno();
     return true;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56578.181835.patch
Type: text/x-patch
Size: 607 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190115/95f4d394/attachment.bin>


More information about the libcxx-commits mailing list