From ebce79446dad6251f1d71b1e133a420ff6e8093c Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Wed, 2 Jul 2014 15:41:29 -0400 Subject: 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 --- src/pkg/runtime/stack.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/pkg/runtime/stack.h') 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, +}; +*/ -- cgit v1.3-5-g9baa