mirror-llvm-project/libc/hdr/sys_wait_macros.h
Pavel Labath 89a4b2f880
[libc] Replace sys/select.h, sys/utsname.h and sys/wait.h includes with proxy headers (#209851)
I'm replacing system includes of <sys/select.h>, <sys/utsname.h>, and
<sys/wait.h> in non-test and non-proxy code with granular proxy headers.

- add proxy headers for sys/select.h and sys/wait.h macros as well as
fd_set, struct rusage, and struct utsname types
- switch select, uname, gethostname, and wait4 internal headers and
implementations to include the proxy headers instead of system headers
- update cmake dependencies for the affected entry points

Assisted by Gemini.
2026-07-16 08:30:36 +02:00

27 lines
786 B
C

//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
///
/// \file
/// Definition of macros from sys/wait.h.
///
//===----------------------------------------------------------------------===//
#ifndef LLVM_LIBC_HDR_SYS_WAIT_MACROS_H
#define LLVM_LIBC_HDR_SYS_WAIT_MACROS_H
#ifdef LIBC_FULL_BUILD
#include "include/llvm-libc-macros/sys-wait-macros.h"
#else // Overlay mode
#include <sys/wait.h>
#endif // LIBC_FULL_BUILD
#endif // LLVM_LIBC_HDR_SYS_WAIT_MACROS_H