Ian Lance Taylor <i...@google.com> writes: > It's possible that this patch will once again break the Solaris and Irix > support. I've tried to ensure that I didn't make any stupid errors, but > I haven't done any actual testing. Sorry about any problems.
Now IRIX finally bootstrap again, I had to make two adjustments to have libgo build there. * go/syscall/wait.c doesn't compile: /vol/gcc/src/hg/trunk/local/libgo/go/syscall/wait.c:11:0: error: "__EXTENSIONS__" redefined [-Werror] /vol/gcc/src/hg/trunk/local/libgo/go/syscall/wait.c:1:0: note: this is the location of the previous definition I've wrapped the __EXTENSIONS__ definition in #ifndef/#endif, but think this is the wrong approach: definitions of _GNU_SOURCE, __EXTENSIONS__ and other platform-specific stuff should go into configure.ac or mksysinfo.sh, not individual sources. There are more instances of this problem, but they don't hurt me on IRIX. * There's a redefinition of IPMreq now: sysinfo.go:3089:6: error: redefinition of 'IPMreq' /vol/gcc/src/hg/trunk/local/libgo/go/syscall/socket_irix.go:81:6: note: previous definition of 'IPMreq' was here For some reason, sysinfo.go now gets the right definition, so the one in socket_irix.go isn't necessary any longer. make check is still running, but it seems that all 64-bit tests fail, as they do on Solaris/x86. Rainer
diff --git a/libgo/go/syscall/socket_irix.go b/libgo/go/syscall/socket_irix.go --- a/libgo/go/syscall/socket_irix.go +++ b/libgo/go/syscall/socket_irix.go @@ -74,17 +74,9 @@ func BindToDevice(fd int, device string) return ENOSYS } -// struct ip_mreg is provived in <netinet/in.h>, but protected with _SGIAPI. -// This could be enabled with -D_SGI_SOURCE, but conflicts with -// -D_XOPEN_SOURCE=500 required for msg_control etc. in struct msghgr, so -// simply provide it here. -type IPMreq struct { - Multiaddr [4]byte - Interface [4]byte -} - -// Similarly, <netdb.h> only provides struct addrinfo, AI_* and EAI_* if -// _NO_XOPEN4 && _NO_XOPEN5. +// <netdb.h> only provides struct addrinfo, AI_* and EAI_* if _NO_XOPEN4 +// && _NO_XOPEN5, but -D_XOPEN_SOURCE=500 is required for msg_control etc. +// in struct msghgr, so simply provide them here. type Addrinfo struct { Ai_flags int32 Ai_family int32 diff --git a/libgo/go/syscall/wait.c b/libgo/go/syscall/wait.c --- a/libgo/go/syscall/wait.c +++ b/libgo/go/syscall/wait.c @@ -8,7 +8,9 @@ OS-independent. */ #define _GNU_SOURCE +#ifndef __EXTENSIONS__ #define __EXTENSIONS__ +#endif #include <stdint.h> #include <sys/wait.h>
-- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University