Hey,

I'd like to propose that we use the new type aliases to add C-types (so,
aliases for "unsigned long" and the like) to the x/sys/… packages.
They already contain build-tagged
<https://github.com/golang/sys/blob/master/unix/ztypes_linux_arm64.go> files
for types, because the interpretation of "unsigned long" and the likes is
architecture and OS specific. The benefits I'd see would be a)
simplification of the packages itself, as the ztypes-files would only need
to contain definitions of the integer-types itself and all the other files
could refer to the alias and b) the possibility to use them in other
packages with syscalls, that are not in the x/sys/… repos. This would also
be possible by using cgo and referring to C.ulong and the likes, but that
requires to depend cgo (and thus on a libc).

Specifically, we are currently working on building a minimal pure go
userland for linux without any C-code. But as some syscalls we need are not
existent, that requires duplicating the build-tag logic from x/sys/unix.

Any thoughts? If this is deemed a good idea, I could send a CL.

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to