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 | cd15c4f2581257e0fd8d2fdbb03f41f8577d3d1f (patch) | |
tree | 58cd265be4d401fcb4e716006738500b990c3961 /include | |
parent | c0874fe1faea174b892b4498e1481d86925dd6b8 (diff) | |
download | go-cd15c4f2581257e0fd8d2fdbb03f41f8577d3d1f.tar.gz |
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://codereview.appspot.com/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 f61409b8a..982b881f1 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 b4a46a982..e7bc76c02 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; |