[libc-commits] [libc] [libc] Change fsfilcnt_t and fsblkcnt_t to be 64-bits long (PR #99876)
Mikhail R. Gadelha via libc-commits
libc-commits at lists.llvm.org
Mon Jul 22 07:01:26 PDT 2024
https://github.com/mikhailramalho created https://github.com/llvm/llvm-project/pull/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.
>From ace35aa3a6b330140cb263db61218046c94ef87b Mon Sep 17 00:00:00 2001
From: "Mikhail R. Gadelha" <mikhail at igalia.com>
Date: Mon, 22 Jul 2024 10:57:11 -0300
Subject: [PATCH] [libc] Change fsfilcnt_t and fsblkcnt_t to be 64-bits long
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.
---
libc/include/llvm-libc-types/fsblkcnt_t.h | 2 +-
libc/include/llvm-libc-types/fsfilcnt_t.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
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
More information about the libc-commits
mailing list