lib: libc: arcmwdt: move ssize_t definition from the toolchain header

Until POSIX layer decoupling is done, we still need the size_t type
definition across the codebase, but it should come through sys/types.h
and not through toolchain-specific headers.

Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
This commit is contained in:
Ilya Tagunov 2024-11-12 17:26:16 +00:00 committed by Anas Nashif
parent 9d229e5c18
commit 390a7f8950
2 changed files with 9 additions and 10 deletions

View file

@ -114,16 +114,6 @@
#else /* defined(_ASMLANGUAGE) */
/* MWDT toolchain misses ssize_t definition which is used by Zephyr */
#ifndef _SSIZE_T_DEFINED
#define _SSIZE_T_DEFINED
#ifdef CONFIG_64BIT
typedef long ssize_t;
#else
typedef int ssize_t;
#endif
#endif /* _SSIZE_T_DEFINED */
#ifdef CONFIG_NEWLIB_LIBC
#error "ARC MWDT doesn't support building with CONFIG_NEWLIB_LIBC as it doesn't have newlib"
#endif /* CONFIG_NEWLIB_LIBC */

View file

@ -15,4 +15,13 @@
#define _UID_T_DECLARED
#define _GID_T_DECLARED
#ifndef _SSIZE_T_DEFINED
#define _SSIZE_T_DEFINED
#ifdef CONFIG_64BIT
typedef long ssize_t;
#else /* CONFIG_64BIT */
typedef int ssize_t;
#endif /* CONFIG_64BIT */
#endif /* _SSIZE_T_DEFINED */
#endif /* LIB_LIBC_ARCMWDT_INCLUDE_SYS_TYPES_H_ */