Issue 86034
Summary [libc] Compiler intrinsic headers indirectly pull in public libc headers
Labels libc
Assignees
Reporter michaelrj-google
    As we work to make our header inclusions more hermetic, we are encountering unexpected places where public headers are indirectly included.

Specifically, while moving the epoll functions to a more hermetic design, I ran into an issue where our `sigset_t` conflicts with the system's in overlay mode tests, due to a very long include chain (copied below). We will need to find a solution to this problem eventually.

```
In file included from ~/llvm-project/libc/test/src/sys/epoll/linux/epoll_pwait_test.cpp:16:
In file included from ~/llvm-project/libc/test/UnitTest/ErrnoSetterMatcher.h:13:
In file included from ~/llvm-project/libc/src/__support/FPUtil/fpbits_str.h:12:
In file included from ~/llvm-project/libc/src/__support/CPP/string.h:14:
In file included from ~/llvm-project/libc/src/string/memory_utils/inline_memcpy.h:22:
In file included from ~/llvm-project/libc/src/string/memory_utils/x86_64/inline_memcpy.h:15:
In file included from ~/llvm-project/libc/src/string/memory_utils/op_x86.h:25:
In file included from /usr/lib/llvm-16/lib/clang/16/include/immintrin.h:26:
In file included from /usr/lib/llvm-16/lib/clang/16/include/xmmintrin.h:31:
In file included from /usr/lib/llvm-16/lib/clang/16/include/mm_malloc.h:13:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/stdlib.h:36:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/cstdlib:79:
In file included from /usr/include/stdlib.h:395:
In file included from /usr/include/x86_64-linux-gnu/sys/types.h:179:
In file included from /usr/include/x86_64-linux-gnu/sys/select.h:33:
/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h:7:20: error: typedef redefinition with different types ('__sigset_t' vs 'struct sigset_t')
```

CC: @gchatelet @nickdesaulniers 
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to