[libc-commits] [libc] 7ddcf7a - [libc] Change fsfilcnt_t and fsblkcnt_t to be 64-bits long (#99876)
via libc-commits
libc-commits at lists.llvm.org
Mon Jul 22 08:06:08 PDT 2024
Author: Mikhail R. Gadelha
Date: 2024-07-22T12:06:03-03:00
New Revision: 7ddcf7acf22ac2b490f17d0aea4c2b7f99911d63
URL: https://github.com/llvm/llvm-project/commit/7ddcf7acf22ac2b490f17d0aea4c2b7f99911d63
DIFF: https://github.com/llvm/llvm-project/commit/7ddcf7acf22ac2b490f17d0aea4c2b7f99911d63.diff
LOG: [libc] Change fsfilcnt_t and fsblkcnt_t to be 64-bits long (#99876)
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.
Added:
Modified:
libc/include/llvm-libc-types/fsblkcnt_t.h
libc/include/llvm-libc-types/fsfilcnt_t.h
Removed:
################################################################################
diff --git a/libc/include/llvm-libc-types/fsblkcnt_t.h b/libc/include/llvm-libc-types/fsblkcnt_t.h
index 88a53d38cb1b3..8c7d3307278cd 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 __UINT64_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..12697830e92eb 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 __UINT64_TYPE__ fsfilcnt_t;
#endif // LLVM_LIBC_TYPES_FSFILCNT_T_H
More information about the libc-commits
mailing list