diff options
| author | Russ Cox <rsc@golang.org> | 2014-07-02 15:41:29 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2014-07-02 15:41:29 -0400 |
| commit | ebce79446dad6251f1d71b1e133a420ff6e8093c (patch) | |
| tree | 69f669a1c17d7a76de0daffa17807113a75902e7 /src/pkg/runtime/stack.h | |
| parent | 4fedb59aec525faadaa5dcdd55c9798f6b4468ae (diff) | |
| download | go-ebce79446dad6251f1d71b1e133a420ff6e8093c.tar.xz | |
build: annotations and modifications for c2go
The main changes fall into a few patterns:
1. Replace #define with enum.
2. Add /*c2go */ comment giving effect of #define.
This is necessary for function-like #defines and
non-enum-able #defined constants.
(Not all compilers handle negative or large enums.)
3. Add extra braces in struct initializer.
(c2go does not implement the full rules.)
This is enough to let c2go typecheck the source tree.
There may be more changes once it is doing
other semantic analyses.
LGTM=minux, iant
R=minux, dave, iant
CC=golang-codereviews
https://golang.org/cl/106860045
Diffstat (limited to 'src/pkg/runtime/stack.h')
| -rw-r--r-- | src/pkg/runtime/stack.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pkg/runtime/stack.h b/src/pkg/runtime/stack.h index 18ab30b69b..ee5fd351d5 100644 --- a/src/pkg/runtime/stack.h +++ b/src/pkg/runtime/stack.h @@ -111,3 +111,9 @@ enum { // Must be greater than any real sp. // 0xfffffade in hex. #define StackPreempt ((uint64)-1314) +/*c2go +enum +{ + StackPreempt = -1314, +}; +*/ |
