[libc-commits] [libc] [libc] fix fileno includes (PR #98514)
Michael Jones via libc-commits
libc-commits at lists.llvm.org
Thu Jul 11 11:18:31 PDT 2024
https://github.com/michaelrj-google created https://github.com/llvm/llvm-project/pull/98514
Fileno was directly including the FILE and so I missed it when replacing
all of the direct includes of stdio.h
>From 375420a7c1b9f3e150a73b81ceee73010377d205 Mon Sep 17 00:00:00 2001
From: Michael Jones <michaelrj at google.com>
Date: Thu, 11 Jul 2024 11:17:13 -0700
Subject: [PATCH] [libc] fix fileno includes
Fileno was directly including the FILE and so I missed it when replacing
all of the direct includes of stdio.h
---
libc/src/stdio/CMakeLists.txt | 10 +---------
libc/src/stdio/fileno.h | 5 ++---
libc/src/stdio/generic/fileno.cpp | 2 +-
3 files changed, 4 insertions(+), 13 deletions(-)
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