zephyr/lib/libc
Stephanos Ioannidis e918783af1 lib: libc: minimal: Define off_t as intptr_t
The `off_t` type, which is specified by the POSIX standard as a signed
integer type representing file sizes, was defined as `long` or `int`
depending on the target architecture without a clear explanation on why
it was defined as such.

While the POSIX standard does not specify the size requirement of the
`off_t` type, it generally corresponds to the size of a pointer in
practice, mainly because the optimal file handling size is closely tied
to the native pointer size.

For this reason, this commit removes the per-architecture `off_t`
definition and defines it as `intptr_t` such that its size always
matches the native pointer size.

Note that the toolchain-defined `__INTPTR_TYPE__` macro is used instead
of the `intptr_t` typedef as per the common convention used in the C
standard library headers.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-08-19 02:47:50 +09:00
..
arcmwdt lib: migrate includes to <zephyr/...> 2022-05-06 19:58:09 +02:00
armstdc lib: migrate includes to <zephyr/...> 2022-05-06 19:58:09 +02:00
minimal lib: libc: minimal: Define off_t as intptr_t 2022-08-19 02:47:50 +09:00
newlib lib: libc: newlib: Initialise libc heap during POST_KERNEL phase 2022-07-06 10:46:39 +02:00
picolibc libc/picolibc: Place malloc heap in noinit section if possible 2022-08-11 12:20:05 +02:00
CMakeLists.txt lib/libc: Add picolibc support (aarch32, aarch64 and RISC-V) [v21] 2022-06-22 13:15:55 +02:00
Kconfig teslibct: don't allow picolib tests for ARC MWDT toolchain 2022-08-16 08:23:22 +00:00