aboutsummaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2024-04-28 09:57:35 -0700
committerIan Lance Taylor <iant@golang.org>2024-04-29 10:59:28 -0700
commit678dc5e85053f1a1ca76997eec95ba8823bb6830 (patch)
tree609239618ed383eb8d177630b0aac557cb3166c9 /libgo
parent050a4f7fc5c9c0f4aae26a92281cdca2a3ded53c (diff)
downloadgcc-678dc5e85053f1a1ca76997eec95ba8823bb6830.zip
gcc-678dc5e85053f1a1ca76997eec95ba8823bb6830.tar.gz
gcc-678dc5e85053f1a1ca76997eec95ba8823bb6830.tar.bz2
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 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/582275
Diffstat (limited to 'libgo')
-rw-r--r--libgo/runtime/runtime.h7
1 files changed, 1 insertions, 6 deletions
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 @@ typedef uintptr uintreg;
/* Defined types. */
-typedef _Bool bool;
typedef uint8 byte;
typedef struct g G;
typedef struct mutex Lock;
@@ -116,11 +116,6 @@ extern G* runtime_g(void)
enum
{
- true = 1,
- false = 0,
-};
-enum
-{
PtrSize = sizeof(void*),
};
enum