[libc-commits] [libc] 9340c9f - [libc] fix fileno includes (#98514)

via libc-commits libc-commits at lists.llvm.org
Thu Jul 11 11:21:30 PDT 2024


Author: Michael Jones
Date: 2024-07-11T11:21:27-07:00
New Revision: 9340c9fba6f89f68b5c7359b24fc28defc26fb30

URL: https://github.com/llvm/llvm-project/commit/9340c9fba6f89f68b5c7359b24fc28defc26fb30
DIFF: https://github.com/llvm/llvm-project/commit/9340c9fba6f89f68b5c7359b24fc28defc26fb30.diff

LOG: [libc] fix fileno includes (#98514)

Fileno was directly including the FILE and so I missed it when replacing
all of the direct includes of stdio.h

Added: 
    

Modified: 
    libc/src/stdio/CMakeLists.txt
    libc/src/stdio/fileno.h
    libc/src/stdio/generic/fileno.cpp

Removed: 
    


################################################################################
diff  --git a/libc/src/stdio/CMakeLists.txt b/libc/src/stdio/CMakeLists.txt
index 91b3a864042b9..e5bf5c64ec833 100644
--- a/libc/src/stdio/CMakeLists.txt
+++ b/libc/src/stdio/CMakeLists.txt
@@ -209,15 +209,6 @@ add_entrypoint_object(
     libc.src.stdio.printf_core.vfprintf_internal
 )
 
-add_stdio_entrypoint_object(
-  fileno
-  SRCS
-    fileno.cpp
-  HDRS
-    fileno.h
-  DEPENDS
-    libc.src.stdio.fileno
-)
 
 add_subdirectory(printf_core)
 add_subdirectory(scanf_core)
@@ -251,6 +242,7 @@ add_stdio_entrypoint_object(ferror_unlocked)
 add_stdio_entrypoint_object(fseek)
 add_stdio_entrypoint_object(ftell)
 add_stdio_entrypoint_object(fseeko)
+add_stdio_entrypoint_object(fileno)
 add_stdio_entrypoint_object(ftello)
 add_stdio_entrypoint_object(fflush)
 add_stdio_entrypoint_object(clearerr)

diff  --git a/libc/src/stdio/fileno.h b/libc/src/stdio/fileno.h
index d41f112226c51..667061afbc94d 100644
--- a/libc/src/stdio/fileno.h
+++ b/libc/src/stdio/fileno.h
@@ -1,5 +1,4 @@
-//===-- Implementation header of fileno --------------------------*- C++
-//-*-===//
+//===-- Implementation header of fileno -------------------------*- C++ -*-===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -10,7 +9,7 @@
 #ifndef LLVM_LIBC_SRC_STDIO_FILENO_H
 #define LLVM_LIBC_SRC_STDIO_FILENO_H
 
-#include "include/llvm-libc-types/FILE.h"
+#include "hdr/types/FILE.h"
 
 namespace LIBC_NAMESPACE {
 

diff  --git a/libc/src/stdio/generic/fileno.cpp b/libc/src/stdio/generic/fileno.cpp
index 663ba92663762..4ead752c43dda 100644
--- a/libc/src/stdio/generic/fileno.cpp
+++ b/libc/src/stdio/generic/fileno.cpp
@@ -9,7 +9,7 @@
 
 #include "src/stdio/fileno.h"
 
-#include "include/llvm-libc-types/FILE.h"
+#include "hdr/types/FILE.h"
 #include "src/__support/File/file.h"
 
 namespace LIBC_NAMESPACE {


        


More information about the libc-commits mailing list