[libc-commits] [libc] [libc] Remove the `stdio.h` include from `puts.h` (PR #98132)
Petr Hosek via libc-commits
libc-commits at lists.llvm.org
Tue Jul 9 01:52:41 PDT 2024
https://github.com/petrhosek updated https://github.com/llvm/llvm-project/pull/98132
>From a70227c62b64588ed9f7f5a2294ccdbc98b9bf46 Mon Sep 17 00:00:00 2001
From: Petr Hosek <phosek at google.com>
Date: Tue, 9 Jul 2024 01:46:03 -0700
Subject: [PATCH 1/2] [libc] Remove the `stdio.h` include from `puts.h`
This is unused.
---
libc/src/stdio/puts.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/libc/src/stdio/puts.h b/libc/src/stdio/puts.h
index 11fbd0be897cf..68d5225b00a17 100644
--- a/libc/src/stdio/puts.h
+++ b/libc/src/stdio/puts.h
@@ -9,8 +9,6 @@
#ifndef LLVM_LIBC_SRC_STDIO_PUTS_H
#define LLVM_LIBC_SRC_STDIO_PUTS_H
-#include <stdio.h>
-
namespace LIBC_NAMESPACE {
int puts(const char *__restrict str);
>From 772ea9c6d9019fa06951addcf3b79e8d7592fa4c Mon Sep 17 00:00:00 2001
From: Petr Hosek <phosek at google.com>
Date: Tue, 9 Jul 2024 01:51:28 -0700
Subject: [PATCH 2/2] Remove stdio.h from getchar as well
---
libc/src/stdio/baremetal/getchar.cpp | 2 --
1 file changed, 2 deletions(-)
diff --git a/libc/src/stdio/baremetal/getchar.cpp b/libc/src/stdio/baremetal/getchar.cpp
index bbd5ba7a954fb..6398197e2f143 100644
--- a/libc/src/stdio/baremetal/getchar.cpp
+++ b/libc/src/stdio/baremetal/getchar.cpp
@@ -9,8 +9,6 @@
#include "src/stdio/getchar.h"
#include "src/__support/OSUtil/io.h"
-#include <stdio.h>
-
namespace LIBC_NAMESPACE {
LLVM_LIBC_FUNCTION(int, getchar, ()) {
More information about the libc-commits
mailing list