[libcxx-commits] [PATCH] D137132: [libc++][Android] Use fopen/ftruncate64/off64_t on 32-bit Bionic

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Nov 1 09:09:25 PDT 2022


ldionne requested changes to this revision.
ldionne added inline comments.
This revision now requires changes to proceed.


================
Comment at: libcxx/test/support/filesystem_test_helper.h:193-198
+#elif defined(__BIONIC__)
+        // Bionic does not distinguish between fopen and fopen64, and it has an
+        // ftruncate64 that accepts off64_t.
+        auto large_file_fopen = fopen;
+        auto large_file_ftruncate = ftruncate64;
+        using large_file_offset_t = off64_t;
----------------
I think it would be better to instead add `utils::fopen64`, `utils::ftruncate64` and `utils::off64_t`. That way, we can simplify this code and hide the complexity inside `utils::` above, which was the original goal.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137132



More information about the libcxx-commits mailing list