POSIX specifies that RLIM_INFINITY in C has type rlim_t and that type rlim_t is an “unsigned integral type”, so the `uint64` value seems appropriate. (https://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/resource.h.html)
And it appears that syscall.RLIM_INFINITY has the correct (unsigned) value on most non-Linux platforms already. I wonder why the other Linux architectures use a signed value for an unsigned type? 🤔 On Friday, March 24, 2023 at 1:14:45 PM UTC-4 莫胜文 wrote: > RLIM_INFINITY is a constant generated by mkerrors.sh. Its value is > 0xffffffffffffffff (uint64) in loong64 but -0x1(int64) in other > architectures. > > I'm not sure if it is necessary but it will cause some troubles for > applications such as prometheus > <https://github.com/prometheus/prometheus/blob/main/util/runtime/limits_default.go#L27> > . > -- 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.google.com/d/msgid/golang-nuts/21266f48-f164-496f-b159-c0b93b03ce56n%40googlegroups.com.