zephyr/lib/libc/minimal/include/sys
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
..
_timespec.h lib/libc/minimal: Refined handle duplicate time definitions 2019-08-09 00:43:09 -07:00
_timeval.h lib/libc/minimal: Refined handle duplicate time definitions 2019-08-09 00:43:09 -07:00
_types.h lib/libc/minimal: Refined handle duplicate time definitions 2019-08-09 00:43:09 -07:00
cdefs.h
stat.h posix: Move sys/stat.h to minimal libc 2019-07-25 13:50:58 -04:00
timespec.h lib: posix, minlibc: struct itimerspec is defined by sys/timespec.h 2019-09-25 20:56:29 -07:00
types.h lib: libc: minimal: Define off_t as intptr_t 2022-08-19 02:47:50 +09:00