Rainer Orth <r...@cebitec.uni-bielefeld.de> writes:

> I've got a similar issue on IRIX 6.5: <sys/time.h> has
>
> struct timeval {
> #if _MIPS_SZLONG == 64
>       __int32_t :32;
> #endif
>       time_t  tv_sec;         /* seconds */
>       long    tv_usec;        /* and microseconds */
> };
>
> which causes the 64-bit libgo build to break.

I don't immediately see why that would break anything.  For a case like
this I would expect layout_decl to turn the first field into an ordinary
non-bit-field anyhow.

What does the line for timeval look like in gen-sysinfo.go?

> It would be good to have a generic solution for this problem which will
> probably return on other platforms.

Unfortunately I have not been able to think of a generic solution.  The
basic problem is that we need to get Go representations of structures
that the libc functions use, and we need to have names for the fields
that the library can use.  The -fdump-go-spec= option can give us the Go
representations.  The trick is getting the names for the fields.

Ian

Reply via email to