3 changes: 1 addition & 2 deletions libc/src/stdio/gpu/vfprintf_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
//
//===----------------------------------------------------------------------===//

#include "hdr/types/FILE.h"
#include "src/__support/RPC/rpc_client.h"
#include "src/__support/arg_list.h"
#include "src/stdio/gpu/file.h"
#include "src/string/string_utils.h"

#include <stdio.h>

namespace LIBC_NAMESPACE {

template <uint16_t opcode>
Expand Down
2 changes: 0 additions & 2 deletions libc/src/stdio/gpu/vprintf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
#include "src/errno/libc_errno.h"
#include "src/stdio/gpu/vfprintf_utils.h"

#include <stdio.h>

namespace LIBC_NAMESPACE {

LLVM_LIBC_FUNCTION(int, vprintf,
Expand Down
2 changes: 0 additions & 2 deletions libc/src/stdio/linux/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ add_entrypoint_object(
../remove.h
DEPENDS
libc.include.fcntl
libc.include.stdio
libc.include.unistd
libc.include.sys_syscall
libc.src.__support.OSUtil.osutil
Expand All @@ -32,7 +31,6 @@ add_entrypoint_object(
HDRS
../fdopen.h
DEPENDS
libc.include.stdio
libc.src.__support.File.file
libc.src.__support.File.platform_file
)
1 change: 0 additions & 1 deletion libc/src/stdio/printf_core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ add_header_library(
HDRS
vfprintf_internal.h
DEPENDS
libc.include.stdio
libc.src.__support.File.file
libc.src.__support.arg_list
libc.src.stdio.printf_core.printf_main
Expand Down
2 changes: 1 addition & 1 deletion libc/src/stdio/vsscanf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@

#include "src/stdio/vsscanf.h"

#include "hdr/stdio_macros.h"
#include "src/__support/CPP/limits.h"
#include "src/__support/arg_list.h"
#include "src/stdio/scanf_core/reader.h"
#include "src/stdio/scanf_core/scanf_main.h"

#include <stdarg.h>
#include <stdio.h>

namespace LIBC_NAMESPACE_DECL {

Expand Down
1 change: 0 additions & 1 deletion libc/test/src/__support/File/file_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "test/UnitTest/MemoryMatcher.h"
#include "test/UnitTest/Test.h"

#include <stdio.h>
#include <stdlib.h>

using ModeFlags = LIBC_NAMESPACE::File::ModeFlags;
Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/__support/File/platform_file_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "src/__support/File/file.h"
#include "test/UnitTest/Test.h"

#include <stdio.h> // For SEEK_* macros
#include "hdr/stdio_macros.h" // For SEEK_* macros

using File = LIBC_NAMESPACE::File;
constexpr char TEXT[] = "Hello, File";
Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/fcntl/fcntl_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//

#include "hdr/fcntl_macros.h"
#include "hdr/stdio_macros.h"
#include "hdr/types/struct_flock.h"
#include "src/errno/libc_errno.h"
#include "src/fcntl/fcntl.h"
Expand All @@ -16,7 +17,6 @@
#include "test/UnitTest/ErrnoSetterMatcher.h"
#include "test/UnitTest/Test.h"

#include <stdio.h>
#include <sys/stat.h> // For S_IRWXU

TEST(LlvmLibcFcntlTest, FcntlDupfd) {
Expand Down
1 change: 0 additions & 1 deletion libc/test/src/math/smoke/RIntTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

#include "hdr/fenv_macros.h"
#include "hdr/math_macros.h"
#include <stdio.h>

static constexpr int ROUNDING_MODES[4] = {FE_UPWARD, FE_DOWNWARD, FE_TOWARDZERO,
FE_TONEAREST};
Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/stdio/fgetc_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
#include "src/stdio/getc.h"
#include "test/UnitTest/Test.h"

#include "hdr/stdio_macros.h"
#include "src/errno/libc_errno.h"
#include <stdio.h>

class LlvmLibcGetcTest : public LIBC_NAMESPACE::testing::Test {
public:
Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/stdio/fgetc_unlocked_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#include "src/stdio/getc_unlocked.h"
#include "test/UnitTest/Test.h"

#include "hdr/stdio_macros.h"
#include "src/errno/libc_errno.h"
#include <stdio.h>

class LlvmLibcGetcTest : public LIBC_NAMESPACE::testing::Test {
public:
Expand Down
1 change: 0 additions & 1 deletion libc/test/src/stdio/fgets_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "test/UnitTest/Test.h"

#include "src/errno/libc_errno.h"
#include <stdio.h>

TEST(LlvmLibcFgetsTest, WriteAndReadCharacters) {
constexpr char FILENAME[] = "testdata/fgets.test";
Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/stdio/fileop_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
#include "test/UnitTest/ErrnoSetterMatcher.h"
#include "test/UnitTest/Test.h"

#include "hdr/stdio_macros.h"
#include "src/errno/libc_errno.h"
#include <stdio.h>

using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::EQ;
using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::NE;
Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/stdio/fopencookie_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
#include "test/UnitTest/MemoryMatcher.h"
#include "test/UnitTest/Test.h"

#include "hdr/stdio_macros.h"
#include "src/errno/libc_errno.h"
#include <stdio.h>
#include <stdlib.h>

using MemoryView = LIBC_NAMESPACE::testing::MemoryView;
Expand Down
2 changes: 0 additions & 2 deletions libc/test/src/stdio/fprintf_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

#include "test/UnitTest/Test.h"

#include <stdio.h>

namespace printf_test {
#ifndef LIBC_COPT_STDIO_USE_SYSTEM_FILE
using LIBC_NAMESPACE::fclose;
Expand Down
2 changes: 0 additions & 2 deletions libc/test/src/stdio/fscanf_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

#include "test/UnitTest/Test.h"

#include <stdio.h>

namespace scanf_test {
#ifndef LIBC_COPT_STDIO_USE_SYSTEM_FILE
using LIBC_NAMESPACE::fclose;
Expand Down
3 changes: 1 addition & 2 deletions libc/test/src/stdio/ftell_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//
//===----------------------------------------------------------------------===//

#include "hdr/stdio_macros.h"
#include "src/stdio/fclose.h"
#include "src/stdio/fopen.h"
#include "src/stdio/fread.h"
Expand All @@ -17,8 +18,6 @@
#include "src/stdio/setvbuf.h"
#include "test/UnitTest/Test.h"

#include <stdio.h>

class LlvmLibcFTellTest : public LIBC_NAMESPACE::testing::Test {
protected:
void test_with_bufmode(int bufmode) {
Expand Down
2 changes: 0 additions & 2 deletions libc/test/src/stdio/putc_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@

#include "test/UnitTest/Test.h"

#include <stdio.h>

TEST(LlvmLibcPutcTest, WriteToFile) {
constexpr char FILENAME[] = "testdata/putc_output.test";
::FILE *file = LIBC_NAMESPACE::fopen(FILENAME, "w");
Expand Down
3 changes: 1 addition & 2 deletions libc/test/src/stdio/setbuf_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//
//===----------------------------------------------------------------------===//

#include "hdr/stdio_macros.h"
#include "src/stdio/fclose.h"
#include "src/stdio/fopen.h"
#include "src/stdio/fread.h"
Expand All @@ -14,8 +15,6 @@
#include "src/stdio/ungetc.h"
#include "test/UnitTest/Test.h"

#include <stdio.h>

TEST(LlvmLibcSetbufTest, DefaultBufsize) {
// The idea in this test is to change the buffer after opening a file and
// ensure that read and write work as expected.
Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/stdio/setvbuf_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
#include "src/stdio/setvbuf.h"
#include "test/UnitTest/Test.h"

#include "hdr/stdio_macros.h"
#include "src/errno/libc_errno.h"
#include <stdio.h>

TEST(LlvmLibcSetvbufTest, SetNBFBuffer) {
// The idea in this test is that we open a file for writing and reading, and
Expand Down
8 changes: 3 additions & 5 deletions libc/test/src/stdio/sscanf_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@
//
//===----------------------------------------------------------------------===//

#include "src/__support/CPP/limits.h"
#include "src/__support/FPUtil/FPBits.h"

#include "src/stdio/sscanf.h"

#include <stdio.h> // For EOF

#include "hdr/stdio_macros.h" // For EOF
#include "src/__support/CPP/limits.h"
#include "src/__support/FPUtil/FPBits.h"
#include "test/UnitTest/FPMatcher.h"
#include "test/UnitTest/Test.h"

Expand Down
6 changes: 3 additions & 3 deletions libc/test/src/stdio/ungetc_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
//
//===----------------------------------------------------------------------===//

#include "src/stdio/ungetc.h"

#include "hdr/stdio_macros.h"
#include "src/stdio/fclose.h"
#include "src/stdio/fopen.h"
#include "src/stdio/fread.h"
#include "src/stdio/fseek.h"
#include "src/stdio/fwrite.h"
#include "src/stdio/ungetc.h"
#include "test/UnitTest/Test.h"

#include <stdio.h>

TEST(LlvmLibcUngetcTest, UngetAndReadBack) {
constexpr char FILENAME[] = "testdata/ungetc_test.test";
::FILE *file = LIBC_NAMESPACE::fopen(FILENAME, "w");
Expand Down
1 change: 0 additions & 1 deletion libc/test/src/stdio/unlocked_fileop_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "test/UnitTest/Test.h"

#include "src/errno/libc_errno.h"
#include <stdio.h>

TEST(LlvmLibcFILETest, UnlockedReadAndWrite) {
constexpr char fNAME[] = "testdata/unlocked_read_and_write.test";
Expand Down
2 changes: 0 additions & 2 deletions libc/test/src/stdio/vfprintf_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@

#include "test/UnitTest/Test.h"

#include <stdio.h>

namespace printf_test {
#ifndef LIBC_COPT_STDIO_USE_SYSTEM_FILE
using LIBC_NAMESPACE::fclose;
Expand Down
2 changes: 0 additions & 2 deletions libc/test/src/stdio/vfscanf_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

#include "test/UnitTest/Test.h"

#include <stdio.h>

namespace scanf_test {
#ifndef LIBC_COPT_STDIO_USE_SYSTEM_FILE
using LIBC_NAMESPACE::fclose;
Expand Down
2 changes: 0 additions & 2 deletions libc/test/src/unistd/getopt_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
#include "src/stdio/fflush.h"
#include "src/stdio/fopencookie.h"

#include <stdio.h>

using LIBC_NAMESPACE::cpp::array;

namespace test_globals {
Expand Down
4 changes: 1 addition & 3 deletions libc/test/src/wchar/wctob_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@
//
//===----------------------------------------------------------------------===//

#include <stdio.h> //for EOF

#include "hdr/stdio_macros.h" //for EOF
#include "src/wchar/wctob.h"

#include "test/UnitTest/Test.h"

TEST(LlvmLibcWctob, DefaultLocale) {
Expand Down