mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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
This commit is contained in:
parent
4fedb59aec
commit
ebce79446d
41 changed files with 1757 additions and 1628 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue