diff options
author | Tom Hughes <tomhughes@chromium.org> | 2022-07-15 10:31:26 -0700 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-07-19 17:55:20 +0000 |
commit | 3eb29b6aa5a4e5e8c85046be789c6dd8d38afbaa (patch) | |
tree | 9490ccdaf8dcd9f377c13172da7da44072c69055 /builtin | |
parent | b6f385a4492b61ab171dcb97e352cf13e3a21b05 (diff) | |
download | chrome-ec-3eb29b6aa5a4e5e8c85046be789c6dd8d38afbaa.tar.gz |
builtin: Move ssize_t to sys/types.h
According to POSIX ssize_t should be defined in sys/types.h, not
stddef.h:
https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/basedefs/sys_types.h.html
BRANCH=none
BUG=b:234181908
TEST=./util/compare_build.sh -b all
=> MATCH
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: I027a2b26dc183c506d691d483c86644d04db9282
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3765450
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/stddef.h | 6 | ||||
-rw-r--r-- | builtin/sys/types.h | 7 |
2 files changed, 7 insertions, 6 deletions
diff --git a/builtin/stddef.h b/builtin/stddef.h index de8a67688e..d93a8c7f9f 100644 --- a/builtin/stddef.h +++ b/builtin/stddef.h @@ -11,12 +11,6 @@ #endif typedef __SIZE_TYPE__ size_t; -/* There is a GCC macro for a size_t type, but not for a ssize_t type. - * The following construct convinces GCC to make __SIZE_TYPE__ signed. - */ -#define unsigned signed -typedef __SIZE_TYPE__ ssize_t; -#undef unsigned #ifndef NULL #define NULL ((void *)0) diff --git a/builtin/sys/types.h b/builtin/sys/types.h index 3f8de955e0..57dd4ac479 100644 --- a/builtin/sys/types.h +++ b/builtin/sys/types.h @@ -9,4 +9,11 @@ /* Data type for POSIX style clock() implementation */ typedef long clock_t; +/* There is a GCC macro for a size_t type, but not for a ssize_t type. + * The following construct convinces GCC to make __SIZE_TYPE__ signed. + */ +#define unsigned signed +typedef __SIZE_TYPE__ ssize_t; +#undef unsigned + #endif /* __CROS_EC_SYS_TYPES_H__ */ |