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 /include | |
| 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 'include')
| -rw-r--r-- | include/bio.h | 8 | ||||
| -rw-r--r-- | include/link.h | 4 |
2 files changed, 11 insertions, 1 deletions
diff --git a/include/bio.h b/include/bio.h index f61409b8a3..982b881f16 100644 --- a/include/bio.h +++ b/include/bio.h @@ -129,6 +129,14 @@ int Bungetc(Biobuf*); int Bungetrune(Biobuf*); long Bwrite(Biobuf*, void*, long); int Bvprint(Biobuf*, char*, va_list); +/*c2go +int BGETC(Biobuf*); +int BGETLE2(Biobuf*); +int BGETLE4(Biobuf*); +int BPUTC(Biobuf*, int); +int BPUTLE2(Biobuf*, int); +int BPUTLE4(Biobuf*, int); +*/ #if defined(__cplusplus) } diff --git a/include/link.h b/include/link.h index b4a46a9821..e7bc76c02a 100644 --- a/include/link.h +++ b/include/link.h @@ -112,6 +112,8 @@ struct Prog char width; /* fake for DATA */ char mode; /* 16, 32, or 64 in 6l, 8l; internal use in 5g, 6g, 8g */ + + /*c2go uchar TEXTFLAG; */ }; // prevent incompatible type signatures between liblink and 8l on Plan 9 @@ -167,7 +169,7 @@ struct LSym // SDATA, SBSS uchar* p; - int32 np; + int np; int32 maxp; Reloc* r; int32 nr; |
