-
Notifications
You must be signed in to change notification settings - Fork 18k
x/sys/unix: clean up the AIX Timespec/StTimespec difference #32073
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
There is no Looking at the code Yuval gave in this CL :
we have something similar on AIX. However, when using the equivalent of
are being replaced by
Therefore, we can't remove the use of |
Are the AIX headers available somwhere? I've found this snippet
Is this still the representation? If so I'm not sure I understand what is causing the extra padding at the end of the StTimespec struct (I would expect cgo -godefs to inject the padding in between the tv_sec and tv_nsec fields). |
I'm not sure if it's a good idea, but we could rewrite the Stat_t members to be Timespec: |
I don't think so. But the snippet you gave is the correct one. Not idea about the cgo padding though.
GOARCH==ppc is not available on Go toolchain only on gccgo. But, it should also be possible to modify the script generating the ztypes equivalent quite easily. |
This is for x/sys/unix for now, so I think there are no issues with Go1 compatibility. |
Arf, I thought it was for syscall package, my bad. |
Change https://golang.org/cl/177838 mentions this issue: |
(From discussion on https://go-review.googlesource.com/c/sys/+/177437)
AIX is the only GOOS in x/sys/unix that has Stat_t fields of type StTimespec instead of Timespec. But AIX also is unique in that it has both Timespec and StTimespec.
But seems like we could fix that if we re-generate the AIX Go files with __USE_XOPEN2K8 set?
/cc @trex58 @tklauser @paulzhol @ianlancetaylor @Helflym
The text was updated successfully, but these errors were encountered: