summaryrefslogtreecommitdiffstats
path: root/libcxx/src/locale.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Patch by Bruce Mitchener. Change all references to EMSCRIPTEN to ↵Marshall Clow2013-11-191-12/+12
| | | | | | __EMSCRIPTEN__. If you're not using the PP symbol EMSCRIPTEN, then you should see no functionality change. llvm-svn: 195136
* Patch from GM: locale.cpp; make implicit conversions to bool explicit, fix ↵Marshall Clow2013-10-211-3/+21
| | | | | | some 'unknown pragma' warnings when compiling under MSVC, and don't use the __sso_allocator under windows, b/c MSVC doesn't support aligned-by value parameters llvm-svn: 193086
* G M: Restore the ability for libcxx to compile again on mingw 64.Howard Hinnant2013-09-171-8/+8
| | | | llvm-svn: 190837
* Xing Xue: Some minor changes for IBM XLC++/AIX.Howard Hinnant2013-08-291-0/+5
| | | | llvm-svn: 189623
* Turn off extern templates for most uses. It is causing more problems than ↵Howard Hinnant2013-08-291-0/+2
| | | | | | it is worth. The extern templates will still be built into the dylib, mainly for ABI stability purposes. And the client can still turn these back on with a #define if desire. This fixes http://llvm.org/bugs/show_bug.cgi?id=17027. However there's no associated test for the test suite because http://llvm.org/bugs/show_bug.cgi?id=17027 needs mismatched dylib and headers to fire. llvm-svn: 189610
* Xing Xue: port to IBM XLC++/AIX.Howard Hinnant2013-08-141-0/+2
| | | | llvm-svn: 188396
* Nico Rieck: Currently _MSC_VER and _WIN32 are used to guard code which isHoward Hinnant2013-08-011-22/+22
| | | | | | | | | | | | | | | | | | | | | | 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: Minor tweaks to locale.cpp to help it compile with exceptions turned off.Howard Hinnant2013-07-281-2/+3
| | | | llvm-svn: 187332
* Add some friendly messages to libcxx calls to abort().Howard Hinnant2013-07-231-0/+2
| | | | llvm-svn: 186951
* Windows port for __codecvt_utf8<wchar_t>.Howard Hinnant2013-07-081-0/+19
| | | | llvm-svn: 185849
* Don't free the C locale on NetBSD.Joerg Sonnenberger2013-07-021-1/+1
| | | | llvm-svn: 185467
* Add NetBSD support.Joerg Sonnenberger2013-05-171-9/+30
| | | | llvm-svn: 182162
* Don't try to free the C locale.Joerg Sonnenberger2013-05-091-1/+1
| | | | llvm-svn: 181559
* Initialize codecvt explicitly with the C locale, which might not be 0.Joerg Sonnenberger2013-05-091-1/+1
| | | | llvm-svn: 181534
* The push/pop variant of pragma GCC diagnostic is only supported by ClangJoerg Sonnenberger2013-05-021-0/+4
| | | | | | and GCC 4.6 and newer, so protect accordingly. llvm-svn: 180943
* Add explicit casts to unsigned char before calling ctype functions.Joerg Sonnenberger2013-05-021-4/+4
| | | | | | Fixes the value range on platforms with signed char. llvm-svn: 180940
* Fix typos.Joerg Sonnenberger2013-04-261-2/+2
| | | | llvm-svn: 180598
* Bruce Mitchener, Jr.: Port to emscripten. Fixes ↵Howard Hinnant2013-03-291-8/+30
| | | | | | http://llvm.org/bugs/show_bug.cgi?id=15624. llvm-svn: 178354
* Fix a few warnings/errors for compiling with -fno-exceptions.Howard Hinnant2013-03-281-0/+2
| | | | llvm-svn: 178267
* Removed raw references to _WIN32; now just check to see if it is defined.Marshall Clow2013-03-181-8/+8
| | | | llvm-svn: 177291
* More libc++ warning suppression on Linux; no functionality changeMarshall Clow2013-02-071-2/+6
| | | | llvm-svn: 174636
* Clean up some warnings for Linux build; No functionality changeMarshall Clow2013-02-071-43/+50
| | | | llvm-svn: 174611
* Saleem Abdulrasool: GCC complains about the template functions as ↵Howard Hinnant2012-12-281-28/+5
| | | | | | | | | potentially not being able to be inlined. These do not need to be always-inlined for ABI stability because they are not exported beyond this source due to the unnamed namespace. Also simplified use of the Wmissing-field-initializers pragma as was done for clang. llvm-svn: 171202
* Saleem Abdulrasool: cleanup a few more compile warnings emitted by GCC.Howard Hinnant2012-12-271-0/+31
| | | | llvm-svn: 171173
* Saleem Abdulrasool: avoid hardcoding buffer lengths.Howard Hinnant2012-12-271-43/+61
| | | | llvm-svn: 171169
* Saleem Abdulrasool: This just rounds up a few compile warnings emitted by ↵Howard Hinnant2012-12-271-13/+12
| | | | | | GCC (4.7.2). llvm-svn: 171165
* Remove redundant inits. Patch by Eitan Adler.Chad Rosier2012-12-221-3/+0
| | | | llvm-svn: 170967
* Zhang Xiongpang: Add definitions for const data members. Fixes ↵Howard Hinnant2012-12-121-0/+22
| | | | | | http://llvm.org/bugs/show_bug.cgi?id=14585. llvm-svn: 170026
* Andrew Morrow: The attached patch updates the initialization of the 'struct ↵Howard Hinnant2012-08-021-1/+1
| | | | | | | | | | tm' in __time_get_storage<char> to match the initialization behavior in __time_get_storage<wchar>. Without the initialization, valgrind reports errors in the subsequent calls to strftime_l. llvm-svn: 161196
* Andrew Morrow: Among the various libc++ tests that currently don't pass on ↵Howard Hinnant2012-08-021-22/+21
| | | | | | | | | | | | | | | | Linux are localization/locale.categories/category.collate/category.ctype/locale.ctype.byname/is_1.pass.cpp and scan_is.pass.cpp. The tests fail when the character class being tested is compound, like ctype_base::alnum or ctype_base::graph, because the existing series of conditionals in do_is an do_scan_is will abort too early. For instance, if the character class being tested is alnum, and the character is numeric, do_is will return false because iswalpha_l will return false, 'result' becomes false, and the 'true' result from the later call to iswdigit_l ends up being ignored . A similar problem exists in do_scan_is. llvm-svn: 161192
* Fix moneypunct_byname algorithm to more accurately represent C locales in C++.Jeffrey Yasskin2012-03-101-67/+235
| | | | llvm-svn: 152501
* Change some smart_ptr == 0 to smart_ptr == nullptr. Fixes ↵Howard Hinnant2012-03-071-6/+6
| | | | | | http://llvm.org/bugs/show_bug.cgi?id=12185. llvm-svn: 152240
* Add a warning to ctype<char>::classic_table() if not implemented.Howard Hinnant2012-02-291-0/+1
| | | | llvm-svn: 151728
* Solaris port. Currently sees around 200 test failures, mostly related toDavid Chisnall2012-02-291-0/+11
| | | | | | | | | | Solaris not providing some of the locales that the test suite uses. Note: This depends on an xlocale (partial) implementation for Solaris and a couple of fixed standard headers. These will be committed to a branch later today. llvm-svn: 151720
* Silence -Wmissing-field-initializers a little higher in the source.Howard Hinnant2012-02-201-1/+2
| | | | llvm-svn: 150964
* Initialize all the fields of struct tm before passing it to strftime. One of ↵Howard Hinnant2012-02-191-2/+2
| | | | | | the uninitialized fields, probably the pointer field tm_zone, was causing a segfault on linux. Patch contributed by Jeffrey Yasskin. llvm-svn: 150929
* Fix up narrowing conversions in switch statement.Howard Hinnant2012-02-081-4/+4
| | | | llvm-svn: 150082
* Quash a whole bunch of warningsHoward Hinnant2011-12-011-119/+126
| | | | llvm-svn: 145624
* de-tabbifyHoward Hinnant2011-10-171-1/+1
| | | | llvm-svn: 142237
* Windows port work by Ruben Van BoxemHoward Hinnant2011-09-291-1/+1
| | | | llvm-svn: 140805
* Windows patch work by Ruben Van BoxemHoward Hinnant2011-09-291-43/+49
| | | | llvm-svn: 140781
* Attempted locale refactoring. _LIBCPP_LOCALE__L_EXTENSIONS now should be ↵Howard Hinnant2011-09-281-62/+47
| | | | | | defined if one has all of the xxx_l() functions. I've defined this for apple, freebsd and win32. _LIBCPP_HAS_DEFAULTRUNELOCALE should be defined if there is a _DefaultRuneLocale. I've defined this for apple and freebsd. The block of code we're trying to migrate away from is now under #ifdef __linux__. I've tested only on OS X. I hope I haven't broken things too badly elsewhere. Please let me know. llvm-svn: 140734
* Work on Windows port by Ruben Van BoxemHoward Hinnant2011-09-231-0/+30
| | | | llvm-svn: 140384
* Fixes for FreeBSD, including some fairly obvious copy-and-paste errors.David Chisnall2011-09-211-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libc++ now mostly works on FreeBSD with libcxxrt and this patch applied to the base system: http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20110920/e666632c/xlocale-0001.obj Summary of tests on FreeBSD: **************************************************** Results for /root/libcxx/test: using FreeBSD clang version 3.0 (trunk 135360) 20110717 Target: x86_64-unknown-freebsd9.0 Thread model: posix with -std=c++0x -stdlib=libc++ -I/root/libcxx/include -L/root/libcxx/build/lib ---------------------------------------------------- sections without tests : 1 sections with failures : 48 sections without failures: 1015 + ---- total number of sections : 1064 ---------------------------------------------------- number of tests failed : 145 number of tests passed : 4179 + ---- total number of tests : 4324 **************************************************** (Many due to this clang version not supporting C++ atomics) More fixes to follow... llvm-svn: 140245
* Correct misspelling:_LIBCPP_APPLE_STABLE_ABI -> _LIBCPP_STABLE_APPLE_ABIHoward Hinnant2011-07-311-3/+3
| | | | llvm-svn: 136597
* Reapply 135035 with proper conditional inclusion, hopefully solvingAlexis Hunt2011-07-151-124/+183
| | | | | | issues with it. llvm-svn: 135246
* Reverted to 134947. Once I got into it, I discovered there were too many ↵Howard Hinnant2011-07-131-43/+124
| | | | | | problems to fix in 135035. llvm-svn: 135044
* Implement the __nolocale functions properly so that they will work onAlexis Hunt2011-07-131-124/+43
| | | | | | | | | | | all platforms. Unfortunately a lot of this remains conditionally compiled so as not to break Apple's ABI. The new _LIBCPP_LOCALE__L_EXTENSIONS macro can be defined on other platforms that support _l suffixes for all functions in order to use them. llvm-svn: 135035
* Toralf Niebuhr: This is just a tiny patch fixing some small (probably copy & ↵Howard Hinnant2011-07-091-3/+3
| | | | | | paste) errors. llvm-svn: 134843
* Don't assume that wctype produces a nice mask on all platforms. OnAlexis Hunt2011-07-091-0/+46
| | | | | | glibc, for instance, it's a const char *. llvm-svn: 134787
OpenPOWER on IntegriCloud