[libcxx-commits] [PATCH] D136947: [libc++] newlib/xlocale.h: remove redundant includes

Michael Platings via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Oct 28 06:33:39 PDT 2022


michaelplatings created this revision.
michaelplatings added a reviewer: ldionne.
michaelplatings added a project: libc++.
Herald added a project: All.
michaelplatings requested review of this revision.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

This permits using the <locale> header with newlib or picolibc when LIBCXX_ENABLE_WIDE_CHARACTERS=FALSE.

      

Since D136682 <https://reviews.llvm.org/D136682> the __support/xlocale headers themselves include the headers they require, respecting the LIBCXX_ENABLE_WIDE_CHARACTERS option.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D136947

Files:
  libcxx/include/__support/newlib/xlocale.h


Index: libcxx/include/__support/newlib/xlocale.h
===================================================================
--- libcxx/include/__support/newlib/xlocale.h
+++ libcxx/include/__support/newlib/xlocale.h
@@ -11,10 +11,6 @@
 
 #if defined(_NEWLIB_VERSION)
 
-#include <cstdlib>
-#include <clocale>
-#include <cwctype>
-#include <ctype.h>
 #if !defined(__NEWLIB__) || __NEWLIB__ < 2 || \
     __NEWLIB__ == 2 && __NEWLIB_MINOR__ < 5
 #include <__support/xlocale/__nop_locale_mgmt.h>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136947.471526.patch
Type: text/x-patch
Size: 486 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20221028/a4b1be3d/attachment.bin>


More information about the libcxx-commits mailing list