runtime: use <stdbool.h> <stdbool.h> has been available since C99. Use it rather than defining our own boolean type and values. Fixes https://gcc.gnu.org/PR114875 Change-Id: I9feff55465edb20cbcabee0846aea9d7ac73a97b Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/582275 Reviewed-by: Joedian Reid <joedian@google.com> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Than McIntosh <thanm@google.com>
diff --git a/libgo/runtime/runtime.h b/libgo/runtime/runtime.h index 699770d..da31e11 100644 --- a/libgo/runtime/runtime.h +++ b/libgo/runtime/runtime.h
@@ -7,6 +7,7 @@ #include "go-assert.h" #include <complex.h> #include <signal.h> +#include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> @@ -51,7 +52,6 @@ /* Defined types. */ -typedef _Bool bool; typedef uint8 byte; typedef struct g G; typedef struct mutex Lock; @@ -116,11 +116,6 @@ enum { - true = 1, - false = 0, -}; -enum -{ PtrSize = sizeof(void*), }; enum