https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83308

--- Comment #10 from John Paul Adrian Glaubitz <glaubitz at physik dot 
fu-berlin.de> ---
Oh, and it seems the function signature for ioctl is wrong:

./libtool: line 1143: warning: setlocale: LC_ALL: cannot change locale
(en_US.UTF-8)
 ../../../src/libgo/go/exp/terminal/util.go:70:23: error: integer constant
overflow
   if ioctl(fd, syscall.TIOCGWINSZ, unsafe.Pointer(&dimensions)) < 0 {
                        ^
 Makefile:3342: recipe for target 'exp/terminal.lo' failed

Changing the second parameter to 'uint' fixes this issue:

//extern ioctl
func ioctl(int, uint, unsafe.Pointer) int

which also matches what "man ioctl" says:

SYNOPSIS
       #include <sys/ioctl.h>

       int ioctl(int fd, unsigned long request, ...);

Reply via email to