Re: [go-nuts] Trying to port Go to HPE NonStop x86 - Need some guidance

2020-06-06 Thread Ian Lance Taylor
On Sat, Jun 6, 2020 at 8:57 AM Randall Becker wrote: > > Thanks. Where do fix the linker. I found the files to modify - so will > basically copy the *_linux.go, *_linux.s in both runtime and syscalls to > *_nsx.go and *_nsx.s, replacing +build lines with nsx instead of linux, I > assume. Curren

Re: [go-nuts] Trying to port Go to HPE NonStop x86 - Need some guidance

2020-06-06 Thread Randall Becker
Thanks. Where do fix the linker. I found the files to modify - so will basically copy the *_linux.go, *_linux.s in both runtime and syscalls to *_nsx.go and *_nsx.s, replacing +build lines with nsx instead of linux, I assume. Currently looking for an assembler cross-compiler for the platform (I

[go-nuts] Re: Right way to convert c char to golang bytes

2020-06-06 Thread Jake Montgomery
Can you post some code that reproduces the C.GoBytes() behavior you see? According to the documentation it should work as you expect. This "simulation" works (but can not be run in the playground because of cgo usage): https://play.golang.org/p/gec7VNy4-UW On Saturday, June 6, 2020 at 2:57:41 AM

[go-nuts] Re: Right way to convert c char to golang bytes

2020-06-06 Thread Tamás Gulácsi
:-) Thanks! -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.go

Re: [go-nuts] Trying to port Go to HPE NonStop x86 - Need some guidance

2020-06-06 Thread Randall Becker
There are two variants - TNS/E, which uses Itanium, and TNS/X, which is x86-64. I'm going for the TNS/X variant because it is the future of the platform. On Friday, 5 June 2020 22:09:09 UTC-4, Gé Weijers wrote: > > I thought HPE Nonstop uses the Itanium processor (X64, not X86-64, it's > comple

[go-nuts] Re: Right way to convert c char to golang bytes

2020-06-06 Thread peterGo
Tamás, You have an off-by-one error. For 32-bit ints, maxInt is 1<<31 - 1, not 1<<31. For GOARCH=386, constant 2147483648 overflows int array bound is too large Peter On Saturday, June 6, 2020 at 3:35:27 AM UTC-4, Tamás Gulácsi wrote: > > Use 1<<31 instead of 1024. > And ifthe C side won't mo

[go-nuts] Re: trouble parsing XML with embedded structs

2020-06-06 Thread Ain
On Thursday, June 4, 2020 at 9:06:50 PM UTC+3, Lars R. Damerow wrote: > > Hello all, > > I need to parse XML messages from a source I don't control. Each one has > an envelope node that shows its source, and the first node in that envelope > encodes the message type. I'm trying to compose struct

[go-nuts] Right way to convert c char to golang bytes

2020-06-06 Thread Tamás Gulácsi
Use 1<<31 instead of 1024. And ifthe C side won't modify/free the *uchar, then you don't need the copy. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nut