Skip to content

draw/drawfcall: build on Plan 9 again - #147

Open
imclaren wants to merge 1 commit into
9fans:mainfrom
imclaren:plan9-build
Open

imclaren wants to merge 1 commit into
9fans:mainfrom
imclaren:plan9-build

Conversation

@imclaren

@imclaren imclaren commented Oct 3, 2026

Copy link
Copy Markdown

GOOS=plan9 go build ./draw/... currently fails:

draw/drawfcall/mux_plan9.go:131:11: cannot use atoi(f[4]) (value of type int) as uint32 value in assignment
draw/drawfcall/mux_plan9.go:154:35: cursor.Clr undefined (type *Cursor has no field or method Clr)
draw/drawfcall/mux_plan9.go:154:51: cursor.Set undefined (type *Cursor has no field or method Set)
draw/drawfcall/mux_plan9.go:160:26: cursor.Clr undefined (type *Cursor has no field or method Clr)
draw/drawfcall/mux_plan9.go:161:26: cursor.Set undefined (type *Cursor has no field or method Set)

and once those are fixed, draw itself:

draw/mouse.go:107:16: d.conn.Cursor2 undefined (type *drawfcall.Conn has no field or method Cursor2)

mux_plan9.go had gone stale against msg.go: Msec is a uint32 now, and the Cursor fields are White and Black rather than Clr and Set. It also had no Cursor2, which Display.SwitchCursor2 calls. Plan 9's /dev/cursor takes only the 16x16 image, so the Plan 9 Cursor2 sets that one and ignores the 32x32 image.

With this, GOOS=plan9 go build ./draw/... succeeds, and a program using draw.Init draws in a rio window on 9front over /dev/draw, reads the mouse, and handles clicks. Tested on 9front 11952 (amd64) under qemu.

mux_plan9.go had gone stale against msg.go: Msec is a uint32 now, and the
Cursor fields are White and Black rather than Clr and Set.  It also had no
Cursor2, which draw's SwitchCursor2 calls; Plan 9's /dev/cursor takes only
the 16x16 image, so it sets that one.

With this, GOOS=plan9 go build ./draw/... succeeds, and a program using
draw.Init draws in a rio window on 9front over /dev/draw.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant