summaryrefslogtreecommitdiffstats
path: root/libcxx/include/support/newlib/xlocale.h
Commit message (Collapse)AuthorAgeFilesLines
* Update more file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | | to reflect the new license. These used slightly different spellings that defeated my regular expressions. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351648
* [libc++] Exclude posix_l/strtonum fallback inclusion for newlib > 2.4Jordan Rupprecht2018-07-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: [libc++] Exclude posix_l/strtonum fallback inclusion for newlib > 2.4 r338122 changed the linkage of some methods which revealed an existing ODR violation, e.g.: projects/libcxx/include/support/xlocale/__posix_l_fallback.h:83:38: error: 'internal_linkage' attribute does not appear on the first declaration of 'iswcntrl_l' inline _LIBCPP_INLINE_VISIBILITY int iswcntrl_l(wint_t c, locale_t) { ^ lib/include/wctype.h:55:12: note: previous definition is here extern int iswcntrl_l (wint_t, locale_t); These were added to newlib in 2.4 [1] [2], so move them to the already existing include guard. [1] https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;a=commit;h=238455adfab4f8070ac65400aac22bb8a9e502fc [2] https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;a=commit;h=8493c1631643fada62384768408852bc0fa6ff44 Reviewers: ldionne, rsmith, EricWF Subscribers: christof, cfe-commits Differential Revision: https://reviews.llvm.org/D49927 llvm-svn: 338157
* PR32476: __nop_locale_mgmt.h not needed with newlib 2.5+James Y Knight2017-06-141-0/+3
| | | | | | | | | | | | | | | | | | | | Newlib 2.5 added the locale management functions, so it should not include __nop_local_mgmt.h. This change adds proper guard around that include statement. For newlib 2.4, some releases contain these functions and some don't, and they all have the same version numbers. This patch will work properly with the initial "2.4.0" release which does not include these functions and require __nop_local_mgmt.h. This has been tested against newlib 2.2 and 2.5, and also sanity checks against other different version numbers. Patch by Martin J. O'Riordan and Walter Lee Differential Revision: https://reviews.llvm.org/D32146 llvm-svn: 305394
* Reorganize locale extension fallbacks. NFCIBen Craig2016-05-201-11/+2
| | | | | | | | | | | | | | | | | | | | | | | The various _l locale extension functions originate from very different places. Some come from POSIX, some are BSD extensions, and some are shared BSD and GLIBC extensions. This patch tries to group the local extension reimplementations by source. This should make it easier to make libcxx work with POSIX compliant C libraries that lack these extensions. The fallback locale functions are also useful on their own for other lightweight platforms. Putting these fallback implementations in support/xlocale should enable code sharing. I have no access to a newlib system or an android system to build and test with. I _do_ have access to a system without any of the _l locale extensions though, and I was able to ensure that the new __posix_l_fallback.h and __strtonum_fallback.h didn't have any massive problems. http://reviews.llvm.org/D17416 llvm-svn: 270213
* Split locale management out of newlib/xlocale.h. NFCIBen Craig2016-02-181-30/+1
| | | | | | | | | | | | | | | | | | | | | | | This is one part of many of a locale refactor. See http://reviews.llvm.org/D17146 for an idea of where this is going. For the locale refactor, the locale management functions (newlocale, freelocale, uselocale) are needed in a separate header from the various _l functions. This is because some platforms implement the _l functions in terms of a locale switcher RAII helper, and the locale switcher RAII helper needs the locale management functions. This patch helps pave the way by getting all the functions in the right files, so that later diffs aren't completely horrible. The "do-nothing" / "nop" locale functions are also useful on their own for other lightweight platforms. Putting these nop implementations in support/xlocale should enable code sharing. Unfortunately, I have no access to a newlib system to build and test with, so this change has been made blind. Reviewed: http://reviews.llvm.org/D17382 llvm-svn: 261231
* Support newlib as libc++'s C library [locale part]Jonathan Roelofs2014-09-191-0/+63
http://reviews.llvm.org/D5385 llvm-svn: 218144
OpenPOWER on IntegriCloud