[libc-commits] [libc] [libc] Clean up sysconf implementation and tests (PR #204130)
Pavel Labath via libc-commits
libc-commits at lists.llvm.org
Wed Jun 17 06:13:53 PDT 2026
================
@@ -26,6 +26,6 @@
#define RLIMIT_RTPRIO 14
#define RLIMIT_RTTIME 15
-#define RLIM_INFINITY (~0UL)
+#define RLIM_INFINITY (~0ULL)
----------------
labath wrote:
Well.. glibc [does that](https://sourceware.org/git/?p=glibc.git;a=blob;f=bits/resource.h;h=6b83374331424da439ad0163e1e992d274847fc2;hb=HEAD#l80) (at least conditionally, in `!__USE_FILE_OFFSET64` mode).
Also the include order problem could be fixed by including rlim_t.h directly from this file (we already have a handful of files that do that).
Or even by doing nothing -- strictly speaking, you don't actually need the type to be defined at the point where you define the macro.
If that doesn't convince you, then I guess this is also fine :)
https://github.com/llvm/llvm-project/pull/204130
More information about the libc-commits
mailing list