[libc-commits] [libc] [libc] Change fsfilcnt_t and fsblkcnt_t to be 64-bits long (PR #99876)
via libc-commits
libc-commits at lists.llvm.org
Mon Jul 22 07:02:05 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: Mikhail R. Gadelha (mikhailramalho)
<details>
<summary>Changes</summary>
In 32-bit systems with 64-bit offsets, both fsfilcnt_t and fsblkcnt_t are 64-bit long, just like 64-bit systems. This patch changes both types to be 64-bit long for all platforms and follows the reasoning used to change off_t: the standard only requires it to be an unsigned int, so making it 64-bit long doesn't violate this property.
It should be NFC for 64-bit systems.
---
Full diff: https://github.com/llvm/llvm-project/pull/99876.diff
2 Files Affected:
- (modified) libc/include/llvm-libc-types/fsblkcnt_t.h (+1-1)
- (modified) libc/include/llvm-libc-types/fsfilcnt_t.h (+1-1)
``````````diff
diff --git a/libc/include/llvm-libc-types/fsblkcnt_t.h b/libc/include/llvm-libc-types/fsblkcnt_t.h
index 88a53d38cb1b3..c08b62e11bff5 100644
--- a/libc/include/llvm-libc-types/fsblkcnt_t.h
+++ b/libc/include/llvm-libc-types/fsblkcnt_t.h
@@ -9,6 +9,6 @@
#ifndef LLVM_LIBC_TYPES_FSBLKCNT_T_H
#define LLVM_LIBC_TYPES_FSBLKCNT_T_H
-typedef __SIZE_TYPE__ fsblkcnt_t;
+typedef __INT64_TYPE__ fsblkcnt_t;
#endif // LLVM_LIBC_TYPES_FSBLKCNT_T_H
diff --git a/libc/include/llvm-libc-types/fsfilcnt_t.h b/libc/include/llvm-libc-types/fsfilcnt_t.h
index c5693591907ab..14949b18746b4 100644
--- a/libc/include/llvm-libc-types/fsfilcnt_t.h
+++ b/libc/include/llvm-libc-types/fsfilcnt_t.h
@@ -9,6 +9,6 @@
#ifndef LLVM_LIBC_TYPES_FSFILCNT_T_H
#define LLVM_LIBC_TYPES_FSFILCNT_T_H
-typedef __SIZE_TYPE__ fsfilcnt_t;
+typedef __INT64_TYPE__ fsfilcnt_t;
#endif // LLVM_LIBC_TYPES_FSFILCNT_T_H
``````````
</details>
https://github.com/llvm/llvm-project/pull/99876
More information about the libc-commits
mailing list