[libc-commits] [libc] 2c05e69 - Revert "[libc] Add unistd overlay" (#119295)

via libc-commits libc-commits at lists.llvm.org
Mon Dec 9 16:09:55 PST 2024


Author: Michael Jones
Date: 2024-12-09T16:09:50-08:00
New Revision: 2c05e690660e9881a5102b3cc86ef244b3bdd852

URL: https://github.com/llvm/llvm-project/commit/2c05e690660e9881a5102b3cc86ef244b3bdd852
DIFF: https://github.com/llvm/llvm-project/commit/2c05e690660e9881a5102b3cc86ef244b3bdd852.diff

LOG: Revert "[libc] Add unistd overlay" (#119295)

Reverts llvm/llvm-project#118882

Several functions are now missing necessary types in fullbuild, e.g.
`off_t`, `ssize_t`. Reverting for now.

Added: 
    

Modified: 
    libc/hdr/CMakeLists.txt
    libc/hdr/unistd_macros.h
    libc/src/unistd/dup.h
    libc/src/unistd/dup2.h
    libc/src/unistd/dup3.h
    libc/src/unistd/fork.h
    libc/src/unistd/ftruncate.h
    libc/src/unistd/getcwd.h
    libc/src/unistd/geteuid.h
    libc/src/unistd/getopt.h
    libc/src/unistd/getpid.h
    libc/src/unistd/getppid.h
    libc/src/unistd/getuid.h
    libc/src/unistd/isatty.h
    libc/src/unistd/link.h
    libc/src/unistd/linux/ftruncate.cpp
    libc/src/unistd/linux/lseek.cpp
    libc/src/unistd/linux/sysconf.cpp
    libc/src/unistd/linux/truncate.cpp
    libc/src/unistd/lseek.h
    libc/src/unistd/pread.h
    libc/src/unistd/pwrite.h
    libc/src/unistd/read.h
    libc/src/unistd/readlink.h
    libc/src/unistd/readlinkat.h
    libc/src/unistd/swab.h
    libc/src/unistd/symlink.h
    libc/src/unistd/symlinkat.h
    libc/src/unistd/syscall.h
    libc/src/unistd/sysconf.h
    libc/src/unistd/truncate.h
    libc/src/unistd/write.h

Removed: 
    libc/hdr/unistd_overlay.h


################################################################################
diff  --git a/libc/hdr/CMakeLists.txt b/libc/hdr/CMakeLists.txt
index 7f523c50e86943..5eb311f4bb2298 100644
--- a/libc/hdr/CMakeLists.txt
+++ b/libc/hdr/CMakeLists.txt
@@ -126,13 +126,10 @@ add_proxy_header_library(
     libc.include.llvm-libc-macros.sys_stat_macros
 )
 
-add_header_library(unistd_overlay HDRS unistd_overlay.h)
 add_proxy_header_library(
   unistd_macros
   HDRS
     unistd_macros.h
-  DEPENDS
-    .unistd_overlay
   FULL_BUILD_DEPENDS
     libc.include.unistd
     libc.include.llvm-libc-macros.unistd_macros

diff  --git a/libc/hdr/unistd_macros.h b/libc/hdr/unistd_macros.h
index 5c2b24354dd3ee..132e123280139f 100644
--- a/libc/hdr/unistd_macros.h
+++ b/libc/hdr/unistd_macros.h
@@ -15,7 +15,7 @@
 
 #else // Overlay mode
 
-#include "unistd_overlay.h"
+#include <unistd.h>
 
 #endif // LLVM_LIBC_FULL_BUILD
 

diff  --git a/libc/hdr/unistd_overlay.h b/libc/hdr/unistd_overlay.h
deleted file mode 100644
index e3001e0cda08f5..00000000000000
--- a/libc/hdr/unistd_overlay.h
+++ /dev/null
@@ -1,69 +0,0 @@
-//===-- Including unistd.h in overlay mode -------------------------------===//
-//
-// 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
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_LIBC_HDR_UNISTD_OVERLAY_H
-#define LLVM_LIBC_HDR_UNISTD_OVERLAY_H
-
-#ifdef LIBC_FULL_BUILD
-#error "This header should only be included in overlay mode"
-#endif
-
-// Overlay mode
-
-// glibc <unistd.h> header might provide extern inline definitions for few
-// functions, causing external alias errors.  They are guarded by
-// `__USE_EXTERN_INLINES` macro.  We temporarily disable `__USE_EXTERN_INLINES`
-// macro by defining `__NO_INLINE__` before including <stdio.h>.
-// And the same with `__USE_FORTIFY_LEVEL`, which will be temporarily disabled
-// with `_FORTIFY_SOURCE`.
-
-#ifdef _FORTIFY_SOURCE
-#define LIBC_OLD_FORTIFY_SOURCE _FORTIFY_SOURCE
-#undef _FORTIFY_SOURCE
-#endif
-
-#ifdef __USE_EXTERN_INLINES
-#define LIBC_OLD_USE_EXTERN_INLINES
-#undef __USE_EXTERN_INLINES
-#endif
-
-#ifdef __USE_FORTIFY_LEVEL
-#define LIBC_OLD_USE_FORTIFY_LEVEL __USE_FORTIFY_LEVEL
-#undef __USE_FORTIFY_LEVEL
-#define __USE_FORTIFY_LEVEL 0
-#endif
-
-#ifndef __NO_INLINE__
-#define __NO_INLINE__ 1
-#define LIBC_SET_NO_INLINE
-#endif
-
-#include <unistd.h>
-
-#ifdef LIBC_OLD_FORTIFY_SOURCE
-#define _FORTIFY_SOURCE LIBC_OLD_FORTIFY_SOURCE
-#undef LIBC_OLD_FORTIFY_SOURCE
-#endif
-
-#ifdef LIBC_SET_NO_INLINE
-#undef __NO_INLINE__
-#undef LIBC_SET_NO_INLINE
-#endif
-
-#ifdef LIBC_OLD_USE_FORTIFY_LEVEL
-#undef __USE_FORTIFY_LEVEL
-#define __USE_FORTIFY_LEVEL LIBC_OLD_USE_FORTIFY_LEVEL
-#undef LIBC_OLD_USE_FORTIFY_LEVEL
-#endif
-
-#ifdef LIBC_OLD_USE_EXTERN_INLINES
-#define __USE_EXTERN_INLINES
-#undef LIBC_OLD_USE_EXTERN_INLINES
-#endif
-
-#endif // LLVM_LIBC_HDR_UNISTD_OVERLAY_H

diff  --git a/libc/src/unistd/dup.h b/libc/src/unistd/dup.h
index 57601455acc61c..63f093c0ee4365 100644
--- a/libc/src/unistd/dup.h
+++ b/libc/src/unistd/dup.h
@@ -9,8 +9,8 @@
 #ifndef LLVM_LIBC_SRC_UNISTD_DUP_H
 #define LLVM_LIBC_SRC_UNISTD_DUP_H
 
-#include "hdr/unistd_macros.h"
 #include "src/__support/macros/config.h"
+#include <unistd.h>
 
 namespace LIBC_NAMESPACE_DECL {
 

diff  --git a/libc/src/unistd/dup2.h b/libc/src/unistd/dup2.h
index e2cf62389bca87..060c112daf08fb 100644
--- a/libc/src/unistd/dup2.h
+++ b/libc/src/unistd/dup2.h
@@ -9,8 +9,8 @@
 #ifndef LLVM_LIBC_SRC_UNISTD_DUP2_H
 #define LLVM_LIBC_SRC_UNISTD_DUP2_H
 
-#include "hdr/unistd_macros.h"
 #include "src/__support/macros/config.h"
+#include <unistd.h>
 
 namespace LIBC_NAMESPACE_DECL {
 

diff  --git a/libc/src/unistd/dup3.h b/libc/src/unistd/dup3.h
index 06d9b23dbd200f..f3868867123b43 100644
--- a/libc/src/unistd/dup3.h
+++ b/libc/src/unistd/dup3.h
@@ -9,8 +9,8 @@
 #ifndef LLVM_LIBC_SRC_UNISTD_DUP3_H
 #define LLVM_LIBC_SRC_UNISTD_DUP3_H
 
-#include "hdr/unistd_macros.h"
 #include "src/__support/macros/config.h"
+#include <unistd.h>
 
 namespace LIBC_NAMESPACE_DECL {
 

diff  --git a/libc/src/unistd/fork.h b/libc/src/unistd/fork.h
index f55ec740cfb12c..b6fd5763b3a5f6 100644
--- a/libc/src/unistd/fork.h
+++ b/libc/src/unistd/fork.h
@@ -9,8 +9,8 @@
 #ifndef LLVM_LIBC_SRC_UNISTD_FORK_H
 #define LLVM_LIBC_SRC_UNISTD_FORK_H
 
-#include "hdr/unistd_macros.h"
 #include "src/__support/macros/config.h"
+#include <unistd.h>
 
 namespace LIBC_NAMESPACE_DECL {
 

diff  --git a/libc/src/unistd/ftruncate.h b/libc/src/unistd/ftruncate.h
index 88a7d13249e8c1..cd8d363727c4ad 100644
--- a/libc/src/unistd/ftruncate.h
+++ b/libc/src/unistd/ftruncate.h
@@ -9,8 +9,8 @@
 #ifndef LLVM_LIBC_SRC_UNISTD_FTRUNCATE_H
 #define LLVM_LIBC_SRC_UNISTD_FTRUNCATE_H
 
-#include "hdr/unistd_macros.h"
 #include "src/__support/macros/config.h"
+#include <unistd.h>
 
 namespace LIBC_NAMESPACE_DECL {
 

diff  --git a/libc/src/unistd/getcwd.h b/libc/src/unistd/getcwd.h
index 36ca48141b93fb..8b63a91c26b5c7 100644
--- a/libc/src/unistd/getcwd.h
+++ b/libc/src/unistd/getcwd.h
@@ -9,8 +9,8 @@
 #ifndef LLVM_LIBC_SRC_UNISTD_GETCWD_H
 #define LLVM_LIBC_SRC_UNISTD_GETCWD_H
 
-#include "hdr/unistd_macros.h"
 #include "src/__support/macros/config.h"
+#include <unistd.h>
 
 namespace LIBC_NAMESPACE_DECL {
 

diff  --git a/libc/src/unistd/geteuid.h b/libc/src/unistd/geteuid.h
index 5cb4ed53ae88f1..9469797bd3d4ef 100644
--- a/libc/src/unistd/geteuid.h
+++ b/libc/src/unistd/geteuid.h
@@ -9,8 +9,8 @@
 #ifndef LLVM_LIBC_SRC_UNISTD_GETEUID_H
 #define LLVM_LIBC_SRC_UNISTD_GETEUID_H
 
-#include "hdr/unistd_macros.h"
 #include "src/__support/macros/config.h"
+#include <unistd.h>
 
 namespace LIBC_NAMESPACE_DECL {
 

diff  --git a/libc/src/unistd/getopt.h b/libc/src/unistd/getopt.h
index 0be639d8711961..1be3331dcd98a4 100644
--- a/libc/src/unistd/getopt.h
+++ b/libc/src/unistd/getopt.h
@@ -10,8 +10,8 @@
 #define LLVM_LIBC_SRC_UNISTD_GETOPT_H
 
 #include "hdr/types/FILE.h"
-#include "hdr/unistd_macros.h"
 #include "src/__support/macros/config.h"
+#include <unistd.h>
 
 namespace LIBC_NAMESPACE_DECL {
 

diff  --git a/libc/src/unistd/getpid.h b/libc/src/unistd/getpid.h
index 4b6011673d06f2..c3c55b0c06b108 100644
--- a/libc/src/unistd/getpid.h
+++ b/libc/src/unistd/getpid.h
@@ -9,8 +9,8 @@
 #ifndef LLVM_LIBC_SRC_UNISTD_GETPID_H
 #define LLVM_LIBC_SRC_UNISTD_GETPID_H
 
-#include "hdr/unistd_macros.h"
 #include "src/__support/macros/config.h"
+#include <unistd.h>
 
 namespace LIBC_NAMESPACE_DECL {
 

diff  --git a/libc/src/unistd/getppid.h b/libc/src/unistd/getppid.h
index ffe05dde1fa437..d820791bc06fad 100644
--- a/libc/src/unistd/getppid.h
+++ b/libc/src/unistd/getppid.h
@@ -9,8 +9,8 @@
 #ifndef LLVM_LIBC_SRC_UNISTD_GETPPID_H
 #define LLVM_LIBC_SRC_UNISTD_GETPPID_H
 
-#include "hdr/unistd_macros.h"
 #include "src/__support/macros/config.h"
+#include <unistd.h>
 
 namespace LIBC_NAMESPACE_DECL {
 

diff  --git a/libc/src/unistd/getuid.h b/libc/src/unistd/getuid.h
index c927f95b1eba78..dd82c7119d4017 100644
--- a/libc/src/unistd/getuid.h
+++ b/libc/src/unistd/getuid.h
@@ -9,8 +9,8 @@
 #ifndef LLVM_LIBC_SRC_UNISTD_GETUID_H
 #define LLVM_LIBC_SRC_UNISTD_GETUID_H
 
-#include "hdr/unistd_macros.h"
 #include "src/__support/macros/config.h"
+#include <unistd.h>
 
 namespace LIBC_NAMESPACE_DECL {
 

diff  --git a/libc/src/unistd/isatty.h b/libc/src/unistd/isatty.h
index 5c8be6541c99cb..6dd1b7b817171a 100644
--- a/libc/src/unistd/isatty.h
+++ b/libc/src/unistd/isatty.h
@@ -9,8 +9,8 @@
 #ifndef LLVM_LIBC_SRC_UNISTD_ISATTY_H
 #define LLVM_LIBC_SRC_UNISTD_ISATTY_H
 
-#include "hdr/unistd_macros.h"
 #include "src/__support/macros/config.h"
+#include <unistd.h>
 
 namespace LIBC_NAMESPACE_DECL {
 

diff  --git a/libc/src/unistd/link.h b/libc/src/unistd/link.h
index c1c26c5e0d4948..9b27aa1accf4ea 100644
--- a/libc/src/unistd/link.h
+++ b/libc/src/unistd/link.h
@@ -9,8 +9,8 @@
 #ifndef LLVM_LIBC_SRC_UNISTD_LINK_H
 #define LLVM_LIBC_SRC_UNISTD_LINK_H
 
-#include "hdr/unistd_macros.h"
 #include "src/__support/macros/config.h"
+#include <unistd.h>
 
 namespace LIBC_NAMESPACE_DECL {
 

diff  --git a/libc/src/unistd/linux/ftruncate.cpp b/libc/src/unistd/linux/ftruncate.cpp
index ccbb0634664aad..39cb3b5778faaf 100644
--- a/libc/src/unistd/linux/ftruncate.cpp
+++ b/libc/src/unistd/linux/ftruncate.cpp
@@ -11,11 +11,11 @@
 #include "src/__support/OSUtil/syscall.h" // For internal syscall function.
 #include "src/__support/common.h"
 
-#include "hdr/unistd_macros.h"
 #include "src/__support/macros/config.h"
 #include "src/errno/libc_errno.h"
 #include <stdint.h>      // For uint64_t.
 #include <sys/syscall.h> // For syscall numbers.
+#include <unistd.h>
 
 namespace LIBC_NAMESPACE_DECL {
 

diff  --git a/libc/src/unistd/linux/lseek.cpp b/libc/src/unistd/linux/lseek.cpp
index 0e957498da7460..9486cecf3b1234 100644
--- a/libc/src/unistd/linux/lseek.cpp
+++ b/libc/src/unistd/linux/lseek.cpp
@@ -14,8 +14,8 @@
 #include "src/__support/OSUtil/syscall.h" // For internal syscall function.
 #include "src/__support/common.h"
 
-#include "hdr/types/off_t.h"
 #include <sys/syscall.h> // For syscall numbers.
+#include <unistd.h>      // For off_t.
 
 namespace LIBC_NAMESPACE_DECL {
 

diff  --git a/libc/src/unistd/linux/sysconf.cpp b/libc/src/unistd/linux/sysconf.cpp
index f785ff321c7d7e..1540eb499ec12d 100644
--- a/libc/src/unistd/linux/sysconf.cpp
+++ b/libc/src/unistd/linux/sysconf.cpp
@@ -10,11 +10,11 @@
 
 #include "src/__support/common.h"
 
-#include "hdr/unistd_macros.h"
 #include "src/__support/macros/config.h"
 #include "src/errno/libc_errno.h"
 #include "src/sys/auxv/getauxval.h"
 #include <sys/auxv.h>
+#include <unistd.h>
 
 namespace LIBC_NAMESPACE_DECL {
 

diff  --git a/libc/src/unistd/linux/truncate.cpp b/libc/src/unistd/linux/truncate.cpp
index 8236edb480d108..283cf4098cf457 100644
--- a/libc/src/unistd/linux/truncate.cpp
+++ b/libc/src/unistd/linux/truncate.cpp
@@ -13,9 +13,9 @@
 #include "src/__support/macros/config.h"
 #include "src/errno/libc_errno.h"
 
-#include "hdr/unistd_macros.h"
 #include <stdint.h>      // For uint64_t.
 #include <sys/syscall.h> // For syscall numbers.
+#include <unistd.h>
 
 namespace LIBC_NAMESPACE_DECL {
 

diff  --git a/libc/src/unistd/lseek.h b/libc/src/unistd/lseek.h
index fdfc7656c4b3ed..a8704ec7058dd2 100644
--- a/libc/src/unistd/lseek.h
+++ b/libc/src/unistd/lseek.h
@@ -9,8 +9,8 @@
 #ifndef LLVM_LIBC_SRC_UNISTD_LSEEK_H
 #define LLVM_LIBC_SRC_UNISTD_LSEEK_H
 
-#include "hdr/unistd_macros.h"
 #include "src/__support/macros/config.h"
+#include <unistd.h>
 
 namespace LIBC_NAMESPACE_DECL {
 

diff  --git a/libc/src/unistd/pread.h b/libc/src/unistd/pread.h
index e2cfce6b53ed5f..4723675e82a20a 100644
--- a/libc/src/unistd/pread.h
+++ b/libc/src/unistd/pread.h
@@ -9,8 +9,8 @@
 #ifndef LLVM_LIBC_SRC_UNISTD_PREAD_H
 #define LLVM_LIBC_SRC_UNISTD_PREAD_H
 
-#include "hdr/unistd_macros.h"
 #include "src/__support/macros/config.h"
+#include <unistd.h>
 
 namespace LIBC_NAMESPACE_DECL {
 

diff  --git a/libc/src/unistd/pwrite.h b/libc/src/unistd/pwrite.h
index 2f5646b048ec96..baffbe48b64371 100644
--- a/libc/src/unistd/pwrite.h
+++ b/libc/src/unistd/pwrite.h
@@ -9,8 +9,8 @@
 #ifndef LLVM_LIBC_SRC_UNISTD_PWRITE_H
 #define LLVM_LIBC_SRC_UNISTD_PWRITE_H
 
-#include "hdr/unistd_macros.h"
 #include "src/__support/macros/config.h"
+#include <unistd.h>
 
 namespace LIBC_NAMESPACE_DECL {
 

diff  --git a/libc/src/unistd/read.h b/libc/src/unistd/read.h
index a12c49e4254eca..01231cb82e35e5 100644
--- a/libc/src/unistd/read.h
+++ b/libc/src/unistd/read.h
@@ -9,8 +9,8 @@
 #ifndef LLVM_LIBC_SRC_UNISTD_READ_H
 #define LLVM_LIBC_SRC_UNISTD_READ_H
 
-#include "hdr/unistd_macros.h"
 #include "src/__support/macros/config.h"
+#include <unistd.h>
 
 namespace LIBC_NAMESPACE_DECL {
 

diff  --git a/libc/src/unistd/readlink.h b/libc/src/unistd/readlink.h
index 9047097f46b24a..a73e9740c74637 100644
--- a/libc/src/unistd/readlink.h
+++ b/libc/src/unistd/readlink.h
@@ -9,8 +9,8 @@
 #ifndef LLVM_LIBC_SRC_UNISTD_READLINK_H
 #define LLVM_LIBC_SRC_UNISTD_READLINK_H
 
-#include "hdr/unistd_macros.h"
 #include "src/__support/macros/config.h"
+#include <unistd.h>
 
 namespace LIBC_NAMESPACE_DECL {
 

diff  --git a/libc/src/unistd/readlinkat.h b/libc/src/unistd/readlinkat.h
index 10fd8bb6a14b8d..6bdd48b537fc8c 100644
--- a/libc/src/unistd/readlinkat.h
+++ b/libc/src/unistd/readlinkat.h
@@ -9,8 +9,8 @@
 #ifndef LLVM_LIBC_SRC_UNISTD_READLINKAT_H
 #define LLVM_LIBC_SRC_UNISTD_READLINKAT_H
 
-#include "hdr/unistd_macros.h"
 #include "src/__support/macros/config.h"
+#include <unistd.h>
 
 namespace LIBC_NAMESPACE_DECL {
 

diff  --git a/libc/src/unistd/swab.h b/libc/src/unistd/swab.h
index f6fa3414c43f55..caa9c71001097b 100644
--- a/libc/src/unistd/swab.h
+++ b/libc/src/unistd/swab.h
@@ -9,8 +9,8 @@
 #ifndef LLVM_LIBC_SRC_UNISTD_SWAB_H
 #define LLVM_LIBC_SRC_UNISTD_SWAB_H
 
-#include "hdr/types/ssize_t.h"
 #include "src/__support/macros/config.h"
+#include <unistd.h> // For ssize_t
 
 namespace LIBC_NAMESPACE_DECL {
 

diff  --git a/libc/src/unistd/symlink.h b/libc/src/unistd/symlink.h
index c743a32a8930f9..47f04f8845b460 100644
--- a/libc/src/unistd/symlink.h
+++ b/libc/src/unistd/symlink.h
@@ -9,8 +9,8 @@
 #ifndef LLVM_LIBC_SRC_UNISTD_SYMLINK_H
 #define LLVM_LIBC_SRC_UNISTD_SYMLINK_H
 
-#include "hdr/unistd_macros.h"
 #include "src/__support/macros/config.h"
+#include <unistd.h>
 
 namespace LIBC_NAMESPACE_DECL {
 

diff  --git a/libc/src/unistd/symlinkat.h b/libc/src/unistd/symlinkat.h
index 6697ce4d537e6a..9f8ad517af5a62 100644
--- a/libc/src/unistd/symlinkat.h
+++ b/libc/src/unistd/symlinkat.h
@@ -9,8 +9,8 @@
 #ifndef LLVM_LIBC_SRC_UNISTD_SYMLINKAT_H
 #define LLVM_LIBC_SRC_UNISTD_SYMLINKAT_H
 
-#include "hdr/unistd_macros.h"
 #include "src/__support/macros/config.h"
+#include <unistd.h>
 
 namespace LIBC_NAMESPACE_DECL {
 

diff  --git a/libc/src/unistd/syscall.h b/libc/src/unistd/syscall.h
index 7f82bd8a452f62..db70745719cfe3 100644
--- a/libc/src/unistd/syscall.h
+++ b/libc/src/unistd/syscall.h
@@ -9,9 +9,9 @@
 #ifndef LLVM_LIBC_SRC_UNISTD_SYSCALL_H
 #define LLVM_LIBC_SRC_UNISTD_SYSCALL_H
 
-#include "hdr/unistd_macros.h"
 #include "src/__support/macros/config.h"
 #include <stdarg.h>
+#include <unistd.h>
 
 namespace LIBC_NAMESPACE_DECL {
 

diff  --git a/libc/src/unistd/sysconf.h b/libc/src/unistd/sysconf.h
index 470c4d846568c7..1b3f39e413508b 100644
--- a/libc/src/unistd/sysconf.h
+++ b/libc/src/unistd/sysconf.h
@@ -9,8 +9,8 @@
 #ifndef LLVM_LIBC_SRC_UNISTD_SYSCONF_H
 #define LLVM_LIBC_SRC_UNISTD_SYSCONF_H
 
-#include "hdr/unistd_macros.h"
 #include "src/__support/macros/config.h"
+#include <unistd.h>
 
 namespace LIBC_NAMESPACE_DECL {
 

diff  --git a/libc/src/unistd/truncate.h b/libc/src/unistd/truncate.h
index 5206a864bcf5db..9ba5cf83175291 100644
--- a/libc/src/unistd/truncate.h
+++ b/libc/src/unistd/truncate.h
@@ -9,8 +9,8 @@
 #ifndef LLVM_LIBC_SRC_UNISTD_TRUNCATE_H
 #define LLVM_LIBC_SRC_UNISTD_TRUNCATE_H
 
-#include "hdr/unistd_macros.h"
 #include "src/__support/macros/config.h"
+#include <unistd.h>
 
 namespace LIBC_NAMESPACE_DECL {
 

diff  --git a/libc/src/unistd/write.h b/libc/src/unistd/write.h
index fa08ae40cf603f..e40ce19e21769c 100644
--- a/libc/src/unistd/write.h
+++ b/libc/src/unistd/write.h
@@ -9,8 +9,8 @@
 #ifndef LLVM_LIBC_SRC_UNISTD_WRITE_H
 #define LLVM_LIBC_SRC_UNISTD_WRITE_H
 
-#include "hdr/unistd_macros.h"
 #include "src/__support/macros/config.h"
+#include <unistd.h>
 
 namespace LIBC_NAMESPACE_DECL {
 


        


More information about the libc-commits mailing list