Nico Huber has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/31379
Change subject: libpayload: Draw time_t and suseconds_t into sys/types.h ......................................................................
libpayload: Draw time_t and suseconds_t into sys/types.h
These are not architecture specific and were the only reason to include `arch/types.h` in `sys/types.h`.
Beware this may break payloads that assume non-standard definitions in `sys/types.h`.
Change-Id: I00d513a4775b013221df98d3d96c096320663cdd Signed-off-by: Nico Huber nico.h@gmx.de --- M payloads/libpayload/include/arm/arch/types.h M payloads/libpayload/include/arm64/arch/types.h M payloads/libpayload/include/mips/arch/types.h M payloads/libpayload/include/sys/types.h M payloads/libpayload/include/x86/arch/types.h 5 files changed, 2 insertions(+), 13 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/79/31379/1
diff --git a/payloads/libpayload/include/arm/arch/types.h b/payloads/libpayload/include/arm/arch/types.h index 1bd815b..641fb0a 100644 --- a/payloads/libpayload/include/arm/arch/types.h +++ b/payloads/libpayload/include/arm/arch/types.h @@ -50,9 +50,6 @@ typedef signed long long int64_t; typedef signed long long s64;
-typedef long time_t; -typedef long suseconds_t; - #ifndef NULL #define NULL ((void *)0) #endif diff --git a/payloads/libpayload/include/arm64/arch/types.h b/payloads/libpayload/include/arm64/arch/types.h index 1bd815b..641fb0a 100644 --- a/payloads/libpayload/include/arm64/arch/types.h +++ b/payloads/libpayload/include/arm64/arch/types.h @@ -50,9 +50,6 @@ typedef signed long long int64_t; typedef signed long long s64;
-typedef long time_t; -typedef long suseconds_t; - #ifndef NULL #define NULL ((void *)0) #endif diff --git a/payloads/libpayload/include/mips/arch/types.h b/payloads/libpayload/include/mips/arch/types.h index afa3a37..32537b8 100644 --- a/payloads/libpayload/include/mips/arch/types.h +++ b/payloads/libpayload/include/mips/arch/types.h @@ -62,9 +62,6 @@ typedef unsigned long phys_addr_t; typedef unsigned long phys_size_t;
-typedef long time_t; -typedef long suseconds_t; - #ifndef NULL #define NULL ((void *)0) #endif diff --git a/payloads/libpayload/include/sys/types.h b/payloads/libpayload/include/sys/types.h index 0ed4975..f7e0598 100644 --- a/payloads/libpayload/include/sys/types.h +++ b/payloads/libpayload/include/sys/types.h @@ -30,7 +30,8 @@ #ifndef _SYS_TYPES_H #define _SYS_TYPES_H
-#include <arch/types.h> +typedef long time_t; +typedef long suseconds_t;
typedef signed long int off_t;
diff --git a/payloads/libpayload/include/x86/arch/types.h b/payloads/libpayload/include/x86/arch/types.h index 1bd815b..641fb0a 100644 --- a/payloads/libpayload/include/x86/arch/types.h +++ b/payloads/libpayload/include/x86/arch/types.h @@ -50,9 +50,6 @@ typedef signed long long int64_t; typedef signed long long s64;
-typedef long time_t; -typedef long suseconds_t; - #ifndef NULL #define NULL ((void *)0) #endif
Hello Julius Werner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/31379
to look at the new patch set (#2).
Change subject: libpayload: Draw time_t and suseconds_t into sys/types.h ......................................................................
libpayload: Draw time_t and suseconds_t into sys/types.h
These are not architecture specific and were the only reason to include `arch/types.h` in `sys/types.h`.
Beware this may break payloads that assume non-standard definitions in `sys/types.h`.
Change-Id: I00d513a4775b013221df98d3d96c096320663cdd Signed-off-by: Nico Huber nico.h@gmx.de --- M payloads/libpayload/include/arm/arch/types.h M payloads/libpayload/include/arm64/arch/types.h M payloads/libpayload/include/mips/arch/types.h M payloads/libpayload/include/sys/types.h M payloads/libpayload/include/x86/arch/types.h 5 files changed, 2 insertions(+), 13 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/79/31379/2
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31379 )
Change subject: libpayload: Draw time_t and suseconds_t into sys/types.h ......................................................................
Patch Set 2: Code-Review+2
(1 comment)
https://review.coreboot.org/#/c/31379/2/payloads/libpayload/include/sys/type... File payloads/libpayload/include/sys/types.h:
https://review.coreboot.org/#/c/31379/2/payloads/libpayload/include/sys/type... PS2, Line 33: time_t nit: not directly related to this CL, but really, this would probably be better as int64_t. Many operating systems had to learn that the hard way and do costly migrations later.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31379 )
Change subject: libpayload: Draw time_t and suseconds_t into sys/types.h ......................................................................
Patch Set 2: Code-Review-2
It's not that easy. `time.h` would need `sys/types.h`. I'll try to do some testing...
Stefan Reinauer has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/31379?usp=email )
Change subject: libpayload: Draw time_t and suseconds_t into sys/types.h ......................................................................
Abandoned