[libc-commits] [libc] [libc] fix another build failure from using limits.h (PR #84827)

Nick Desaulniers via libc-commits libc-commits at lists.llvm.org
Mon Mar 11 13:36:15 PDT 2024


https://github.com/nickdesaulniers created https://github.com/llvm/llvm-project/pull/84827

My GCC build is failing with issues similar why we added our own.  Looks like
we missed one spot. See also:

commit 72ce62941579 ("[libc] Add C23 limits.h header. (#78887)")


>From fcc98adee4c6c37bb47003ae177a4b161d5ef669 Mon Sep 17 00:00:00 2001
From: Nick Desaulniers <ndesaulniers at google.com>
Date: Mon, 11 Mar 2024 13:34:14 -0700
Subject: [PATCH] [libc] fix another build failure from using limits.h

My GCC build is failing with issues similar why we added our own.  Looks like
we missed one spot. See also:

commit 72ce62941579 ("[libc] Add C23 limits.h header. (#78887)")
---
 libc/test/src/__support/integer_to_string_test.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libc/test/src/__support/integer_to_string_test.cpp b/libc/test/src/__support/integer_to_string_test.cpp
index a2a80c81b9f69f..270fddd828b680 100644
--- a/libc/test/src/__support/integer_to_string_test.cpp
+++ b/libc/test/src/__support/integer_to_string_test.cpp
@@ -6,6 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "src/__support/CPP/limits.h"
 #include "src/__support/CPP/span.h"
 #include "src/__support/CPP/string_view.h"
 #include "src/__support/UInt.h"
@@ -15,8 +16,6 @@
 
 #include "test/UnitTest/Test.h"
 
-#include "limits.h"
-
 using LIBC_NAMESPACE::IntegerToString;
 using LIBC_NAMESPACE::cpp::span;
 using LIBC_NAMESPACE::cpp::string_view;



More information about the libc-commits mailing list