zephyr/lib/libc/minimal
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
..
include lib: libc: minimal: Define off_t as intptr_t 2022-08-19 02:47:50 +09:00
source scripts: move gen_strerror_table.py to scripts/build 2022-07-12 10:03:45 +02:00
CMakeLists.txt scripts: move gen_strerror_table.py to scripts/build 2022-07-12 10:03:45 +02:00