moby / term

Apache License 2.0
66 stars 27 forks source link

Fix windows integer overflow #24

Closed cpuguy83 closed 4 years ago

cpuguy83 commented 4 years ago

Makes it possible to build with GOOS=windows and GOARCH=arm

thaJeztah commented 4 years ago

related; https://github.com/moby/term/pull/14 ?

cpuguy83 commented 4 years ago

CI isn't testing on Windows, FYI.

cpuguy83 commented 4 years ago

I'm definitely not an expert in these things.

These consts are defined as:

    STD_INPUT_HANDLE  = -10 & (1<<32 - 1)
    STD_OUTPUT_HANDLE = -11 & (1<<32 - 1)
    STD_ERROR_HANDLE  = -12 & (1<<32 - 1)
cpuguy83 commented 4 years ago

Yes, #14 seems related.

I need this for moby 20.10. It doesn't currently compile in our arm build pipeline.

thaJeztah commented 4 years ago

Let's get this one in.

Perhaps we can get some traction on the upstream PRs https://github.com/Azure/go-ansiterm/pulls (have a WIP branch to make it use more of golang.org/x/sys/windows, which I think may help with some things)