[libc-commits] [libc] [libc] Update size_t and ssize_t definitions to use __SIZE_TYPE__ and __PTRDIFF_TYPE__ respectively. (PR #143921)
via libc-commits
libc-commits at lists.llvm.org
Thu Jun 12 09:21:23 PDT 2025
================
@@ -9,11 +9,6 @@
#ifndef LLVM_LIBC_TYPES_SIZE_T_H
#define LLVM_LIBC_TYPES_SIZE_T_H
-// Since __need_size_t is defined, we get the definition of size_t from the
-// standalone C header stddef.h. Also, because __need_size_t is defined,
-// including stddef.h will pull only the type size_t and nothing else.
-#define __need_size_t
-#include <stddef.h>
-#undef __need_size_t
----------------
lntue wrote:
it's cleaner and both clang and gcc provide this type definition, which is used in the stddef.h to define `size_t` anyway.
https://github.com/llvm/llvm-project/pull/143921
More information about the libc-commits
mailing list