Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(247)

Issue 4626093: code review 4626093: pkg/runtime/goc2c: tweaked to compile using the legacy ... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 12 months ago by lucio
Modified:
10 years, 11 months ago
Reviewers:
CC:
r, rsc, golang-dev
Visibility:
Public.

Description

pkg/runtime/goc2c: tweaked to compile using the legacy Plan 9 compiler. pkg/runtime/Makefile: . Adjusted so "goc2c.c" is built using the Plan 9 libraries. pkg/runtime/goc2c.c: . Added/subtracted #include headers to correspond to Plan 9 toolkit. . Changed fprintf(stderr,...)/exit() combinations to sysfatal() calls, adjusted the "%u" format to "%ud". . Added exits(0) at the end of main(). . Made main() a void-returning function and removed the "return 0" at the end of it. Tested on UBUNTU and Plan 9 only.

Patch Set 1 #

Patch Set 2 : diff -r b5354b8beea1 https://go.googlecode.com/hg/ #

Total comments: 5

Patch Set 3 : diff -r fa6814569009 https://go.googlecode.com/hg/ #

Total comments: 1

Patch Set 4 : diff -r 353a5cdb24e0 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -28 lines) Patch
M src/pkg/runtime/Makefile View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/runtime/goc2c.c View 1 2 3 11 chunks +17 lines, -27 lines 0 comments Download

Messages

Total messages: 17
lucio
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com, rsc@golang.org), I'd like you to review this change to https://go.googlecode.com/hg/
10 years, 12 months ago (2011-07-05 15:00:57 UTC) #1
r2
Leaving for rsc, who is out this week. Personally, I'm not happy about moving the ...
10 years, 12 months ago (2011-07-05 22:17:08 UTC) #2
rsc
This C program was always the odd man out, the only one that didn't use ...
10 years, 11 months ago (2011-07-11 23:39:12 UTC) #3
lucio
On 7/12/11, rsc@golang.org <rsc@golang.org> wrote: > This C program was always the odd man out, ...
10 years, 11 months ago (2011-07-12 06:06:10 UTC) #4
rsc
On Tue, Jul 12, 2011 at 02:06, Lucio De Re <lucio.dere@gmail.com> wrote: > On 7/12/11, ...
10 years, 11 months ago (2011-07-12 06:08:05 UTC) #5
lucio
On 7/12/11, rsc@golang.org <rsc@golang.org> wrote: > > http://codereview.appspot.com/4626093/diff/2001/src/pkg/runtime/goc2c.c#newcode93 > src/pkg/runtime/goc2c.c:93: fprint(2, "%s:%u: unexpected EOF\n", file, ...
10 years, 11 months ago (2011-07-12 06:29:13 UTC) #6
rsc
> sysfatal() can cope without argv0, but seems to have trouble with %r. > Is ...
10 years, 11 months ago (2011-07-12 14:51:48 UTC) #7
rsc
> <stdin>:%:% unexpected EOF > > (I can improve this to "./8.goc2c: <stdin>:%:% unexpected EOF" ...
10 years, 11 months ago (2011-07-12 14:53:18 UTC) #8
lucio
I don't do "obvious", evidently :-) Sadly, I'll need to do some digging, something isn't ...
10 years, 11 months ago (2011-07-12 15:00:26 UTC) #9
rsc
> Sadly, I'll need to do some digging, something isn't quite operating properly. It looks ...
10 years, 11 months ago (2011-07-12 15:45:34 UTC) #10
lucio
Well, having replaced "fprint(2...; exits(..." with "sysfatal(..." I came up with incorrect error reporting, as ...
10 years, 11 months ago (2011-07-13 05:00:55 UTC) #11
lucio
Hello r@golang.org, rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
10 years, 11 months ago (2011-07-14 12:58:08 UTC) #12
rsc
everything else looks fine http://codereview.appspot.com/4626093/diff/16001/src/pkg/runtime/goc2c.c File src/pkg/runtime/goc2c.c (right): http://codereview.appspot.com/4626093/diff/16001/src/pkg/runtime/goc2c.c#newcode28 src/pkg/runtime/goc2c.c:28: static unsigned int lineno = ...
10 years, 11 months ago (2011-07-15 16:00:42 UTC) #13
lucio
On 7/15/11, rsc@golang.org <rsc@golang.org> wrote: > http://codereview.appspot.com/4626093/diff/16001/src/pkg/runtime/goc2c.c#newcode28 > src/pkg/runtime/goc2c.c:28: static unsigned int lineno = 0; ...
10 years, 11 months ago (2011-07-15 18:57:13 UTC) #14
lucio
Hello r@golang.org, rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
10 years, 11 months ago (2011-07-15 19:09:30 UTC) #15
rsc
LGTM
10 years, 11 months ago (2011-07-19 14:48:49 UTC) #16
rsc
10 years, 11 months ago (2011-07-19 15:04:40 UTC) #17
*** Submitted as http://code.google.com/p/go/source/detail?r=85ab018b6c97 ***

runtime: make goc2c build on Plan 9

pkg/runtime/Makefile:
. Adjusted so "goc2c.c" is built using the Plan 9 libraries.

pkg/runtime/goc2c.c:
. Added/subtracted #include headers to correspond to Plan 9
  toolkit.
. Changed fprintf(stderr,...)/exit() combinations to
  sysfatal() calls, adjusted the "%u" format to "%ud".
. Added exits(0) at the end of main().
. Made main() a void-returning function and removed the
  "return 0" at the end of it.

Tested on UBUNTU and Plan 9 only.

R=r, rsc
CC=golang-dev
http://codereview.appspot.com/4626093

Committer: Russ Cox <rsc@golang.org>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b