[libc-commits] [libc] [libc] Add loff_t type (PR #204641)

Pavel Labath via libc-commits libc-commits at lists.llvm.org
Tue Jun 23 07:45:02 PDT 2026


================
@@ -48,6 +48,11 @@ add_header(
 )
 add_header(ldiv_t HDR ldiv_t.h)
 add_header(lldiv_t HDR lldiv_t.h)
+if(LIBC_TARGET_OS STREQUAL "linux")
----------------
labath wrote:

Yeah, that would be better.

As far as cruft goes, I think that even this approach is suboptimal since we still end up including an empty `loff_t.h` header from the main include file -- which could be very surprising to someone browsing through that header. Ideally, I think we'd have some mechanism to completely omit the header file on other OSs. I don't know if that would be through entrypoints.txt, changes in hdrgen/yaml, or ...

https://github.com/llvm/llvm-project/pull/204641


More information about the libc-commits mailing list