summaryrefslogtreecommitdiffstats
path: root/libcxx/include/support
Commit message (Collapse)AuthorAgeFilesLines
* Split locale management out of locale_win32. NFCIBen Craig2016-03-092-18/+35
| | | | | | | | | | | | | | | | | | 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. Unfortunately, the Windows, Cygwin, and MinGW builds seemed to have bit-rotted, so I wasn't able to test this completely. I don't think I made things any worse than they already are though. http://reviews.llvm.org/D17419 llvm-svn: 263020
* Split locale management out of newlib/xlocale.h. NFCIBen Craig2016-02-182-30/+53
| | | | | | | | | | | | | | | | | | | | | | | 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
* Split locale management out of ibm/xlocale.h. NFCIBen Craig2016-02-182-56/+86
| | | | | | | | | | | | | | | | | | | | 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. Unfortunately, I have no access to an AIX machine to build with, so this change has been made blind. Also, the original author (Xing Xue) does not appear to have a Phabricator account. Reviewed: http://reviews.llvm.org/D17380 llvm-svn: 261230
* Add initial support for the MUSL C library.Vasileios Kalintiris2015-11-091-0/+58
| | | | | | | | | | | | | | | | | | | Summary: This patch adds the LIBCXX_LIBC_IS_MUSL cmake option to allow the building of libcxx with the Musl C library. The option is necessary as Musl does not provide any predefined macro in order to test for its presence, like GLIBC. Most of the changes specify the correct path to choose through the various #if/#else constructs in the locale code. Depends on D13407. Reviewers: mclow.lists, jroelofs, EricWF Subscribers: jfb, tberghammer, danalbert, srhines, cfe-commits Differential Revision: http://reviews.llvm.org/D13673 llvm-svn: 252457
* cmath: account for MSVCRT 12.0 changesSaleem Abdulrasool2015-02-281-1/+3
| | | | | | | | | | | | | | MSVCRT 12.0 introduces better compatibility for C99. This includes a number of math routines that were previously undefined. Use the crtversion.h header to detect the version of MSVCRT being targeted and avoid re-declaring the variables. Since copysign has been introduced in MSVCRT, importing the definition via using makes it difficult to provide overloads (due to minor differences between throw () and noexcept. Avoid defining the overloads on newer MSVCRT targets. llvm-svn: 230867
* Get libc++ building on Sun Solaris. Patch from C Bergstrom.Eric Fiselier2015-01-231-93/+3
| | | | llvm-svn: 226947
* Fixes to get libc++ building on sun solaris. Patch from C Bergstrom.Eric Fiselier2014-11-251-0/+2
| | | | llvm-svn: 222794
* Fix win32 support header for mingw32.Dan Albert2014-10-061-0/+3
| | | | | | These functions are defined as static in the mingw32 headers. llvm-svn: 219140
* Support newlib as libc++'s C library [locale part]Jonathan Roelofs2014-09-193-165/+261
| | | | | | http://reviews.llvm.org/D5385 llvm-svn: 218144
* Add support for BIONIC C library (Android). Patch from Dan AlbertMarshall Clow2014-07-101-0/+192
| | | | llvm-svn: 212724
* Add license headers to a bunch of libc++ files that were missing them. No ↵Marshall Clow2014-01-163-0/+27
| | | | | | functionality change. Fixes 18291. Thanks to Nico for the bug report and the patch. llvm-svn: 199400
* 80 cols fixes.Yaron Keren2014-01-041-99/+123
| | | | llvm-svn: 198482
* Implement the functions: clz, clzl, clzll, ctz, ctzl, and ctzllYaron Keren2014-01-041-27/+88
| | | | | | | | for libcxx when compiled with Visual C++ on Win32 and Win64. clang and gcc (MinGW) compilers provide these implementations themselves. llvm-svn: 198481
* Patch by Xing Xue to improve libc++ support for AIXMarshall Clow2013-11-191-1/+1
| | | | llvm-svn: 195144
* This patch implements snprintf_l function in a way similar to the other Yaron Keren2013-11-181-1/+1
| | | | | | | | | | | functions in src/support/win32/locale_win32.cpp and locale_win32.h, calling upon vsnprintf for which there is a MingW correct alternative. Note! __USE_MINGW_ANSI_STDIO is not modified in this patch. In order to use the __mingw version it must be defined before including the MingW headers. llvm-svn: 195044
* Windows.h is not required.Yaron Keren2013-11-151-1/+0
| | | | llvm-svn: 194870
* Yaron Keren: Add missing comment.Howard Hinnant2013-10-061-1/+1
| | | | llvm-svn: 192068
* G M: Changes all references to "x inline" to "inline x" where x = ↵Howard Hinnant2013-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | _libcpp_always_inline or _libcpp_inline_visibility macros. The patch touches these files: locale array deque new string utility vector __bit_reference __split_buffer locale_win32.h There is no intended functionality change and it is expected that reversing the position of the inline keyword with regard to the other keywords does not change the meaning of anything, least not for apple/Linux etc. It is intended to make libcxx more consistent with itself and to prevent the 1000 or so "inline.cpp(3) : warning C4141: 'inline' : used more than once" warnings that MS's cl.exe compiler emits without this patch, i.e. if inline is not the first keyword before a function name etc. Prefer "inline [other inline related keyword]" over "[other related keyword] inline". After this patch, libcxx should be consistent to this pattern. llvm-svn: 191987
* G M: Restore the ability for libcxx to compile again on mingw 64.Howard Hinnant2013-09-174-21/+28
| | | | llvm-svn: 190837
* Xing Xue: Some minor changes for IBM XLC++/AIX.Howard Hinnant2013-08-291-2/+0
| | | | llvm-svn: 189623
* Xing Xue: port to IBM XLC++/AIX.Howard Hinnant2013-08-143-0/+481
| | | | llvm-svn: 188396
* Nico Rieck: Currently _MSC_VER and _WIN32 are used to guard code which isHoward Hinnant2013-08-013-8/+8
| | | | | | | | | | | | | | | | | | | | | | MSVC-specific, MSVCRT-specific, or Windows-specific. Because Clang can also define _MSC_VER, and MSVCRT is not necessarily the only C runtime, these macros should not be used interchangeably. This patch divides all Windows-related bits into the aforementioned categories. Two new macros are introduced: - _LIBCPP_MSVC: Defined when compiling with MSVC. Detected using _MSC_VER, excluding Clang. - _LIBCPP_MSVCRT: Defined when using the Microsoft CRT. This is the default when _WIN32 is defined. This leaves _WIN32 for code using the Windows API. This also corrects the spelling of _LIBCP_HAS_IS_BASE_OF to _LIBCPP_HAS_IS_BASE_OF. Nico, please prepare a patch for CREDITS.TXT, thanks. llvm-svn: 187593
* Glen: This patch gets the string conversion functions working on Windows. ↵Howard Hinnant2013-05-161-9/+8
| | | | | | It also refactors repetitive code in string.cpp do greatly reduce the repetitiveness, increasing maintainability. llvm-svn: 182026
* Ruben Van Boxem: Turn islower_l and isupper_l into functions (instead of ↵Howard Hinnant2013-04-121-2/+15
| | | | | | macros) on Windows only to quell a warning during libc++ building. llvm-svn: 179408
* Define _WCHAR_T in solaris/wchar.h. This fixes a bug where Solaris 10 headersDavid Chisnall2012-03-021-0/+1
| | | | | | try to define C++ keywords as typedefs (fixed in Solaris 11). llvm-svn: 151890
* Add support files required for building on Solaris.David Chisnall2012-02-293-0/+188
| | | | llvm-svn: 151721
* Add missing newlines at EOF.Bob Wilson2012-02-202-2/+2
| | | | llvm-svn: 150965
* Fix http://llvm.org/bugs/show_bug.cgi?id=11428. Fix provided by Alberto ↵Howard Hinnant2011-12-021-5/+5
| | | | | | Ganesh Barbati llvm-svn: 145698
* Jean-Daniel: __builtin_popcountll support for WindowsHoward Hinnant2011-12-021-3/+26
| | | | llvm-svn: 145684
* Windows port work by Ruben Van BoxemHoward Hinnant2011-10-273-7/+123
| | | | llvm-svn: 143105
* More windows port work by Ruben Van BoxemHoward Hinnant2011-10-222-15/+85
| | | | llvm-svn: 142732
* Windows port work by Ruben Van BoxemHoward Hinnant2011-10-201-0/+73
| | | | llvm-svn: 142578
* Windows port work by Ruben Van BoxemHoward Hinnant2011-09-291-4/+4
| | | | llvm-svn: 140805
* Windows patch work by Ruben Van BoxemHoward Hinnant2011-09-291-0/+5
| | | | llvm-svn: 140781
* Work on Windows port by Ruben Van BoxemHoward Hinnant2011-09-282-34/+75
| | | | llvm-svn: 140728
* Work on Windows port by Ruben Van BoxemHoward Hinnant2011-09-232-4/+47
| | | | llvm-svn: 140384
* Partial Windows port by Ruben Van BoxemHoward Hinnant2011-09-222-0/+52
llvm-svn: 140328
OpenPOWER on IntegriCloud