[libcxx-commits] [PATCH] D146076: [libc++] Remove <cstdlib> includes

Ed Maste via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Apr 3 06:11:50 PDT 2023


emaste added a comment.

Our definition is in /usr/include/xlocale/_stdlib.h which has the comment:

  /*
   * Extended locale versions of the locale-aware functions from stdlib.h.
   *
   * Include <stdlib.h> before <xlocale.h> to expose these.
   */
  ...
  long long                strtoll_l(const char *, char **, int, locale_t);
  ...

/usr/include/xlocal.h:

  #ifdef _STDLIB_H_
  #include <xlocale/_stdlib.h>
  #endif

but there is also this in stdlib.h:

  #ifdef _XLOCALE_H_
  #include <xlocale/_stdlib.h>
  #endif

which was added in:

  commit 3ac9d659890471a1936268bfec06e74caf9025df
  Author: David Chisnall <theraven at FreeBSD.org>
  Date:   Wed Mar 28 12:11:54 2012 +0000
  
      Correctly expose xlocale functions if people include the headers in the wrong
      order (as some ports apparently do).
      
      Approved by:    dim (mentor)
  
  Notes:
      svn path=/head/; revision=233600


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146076/new/

https://reviews.llvm.org/D146076



More information about the libcxx-commits mailing list