Howard Hinnant
e7389a6915
Numeric parsing was getting the wrong answer when faced with very long inputs. This fixes both http://llvm.org/bugs/show_bug.cgi?id=15751 and http://llvm.org/bugs/show_bug.cgi?id=15740
...
llvm-svn: 179556
2013-04-15 20:40:06 +00:00
Howard Hinnant
40487ca25e
Set failbit when strtold sets errno to ERANGE when parsing floating point values.
...
llvm-svn: 179461
2013-04-13 18:19:25 +00:00
Howard Hinnant
9cb970074f
Bruce Mitchener, Jr.: Port to emscripten. Fixes http://llvm.org/bugs/show_bug.cgi?id=15624 .
...
llvm-svn: 178354
2013-03-29 18:27:28 +00:00
Marshall Clow
c962cdf8a5
Fix buffer read overflow in money_get::do_get(). Found by UBSan
...
llvm-svn: 177694
2013-03-22 02:14:40 +00:00
Marshall Clow
69e76f80e2
Removed raw references to __sun__, __FreeBSD__, __GLIBC__ and __linux__; now just check to see if they are defined.
...
llvm-svn: 177310
2013-03-18 19:34:07 +00:00
Marshall Clow
b56e8587af
Removed raw references to __APPLE__; now just check to see if it is defined.
...
llvm-svn: 177297
2013-03-18 17:45:34 +00:00
Marshall Clow
91907cbe82
Removed raw references to _WIN32; now just check to see if it is defined.
...
llvm-svn: 177291
2013-03-18 17:04:29 +00:00
Howard Hinnant
7e4844b353
Parsing floating point numbers with very long precision was broken, and this patch fixes it. This fixes http://llvm.org/bugs/show_bug.cgi?id=15445 .
...
llvm-svn: 176711
2013-03-08 19:06:24 +00:00
Howard Hinnant
6e41256f68
No functionality change at this time. I've split _LIBCPP_VISIBLE up into two flags: _LIBCPP_TYPE_VIS and _LIBCPP_FUNC_VIS. This is in preparation for taking advantage of clang's new __type_visibility__ attribute.
...
llvm-svn: 176593
2013-03-06 23:30:19 +00:00
Howard Hinnant
2446649c1e
Saleem Abdulrasool: If errno is defined as volatile int, the qualifier differences can cause
...
template typename deductions on swap<> (used in string.cpp). Use
decltype(errno) to replicate the type and qualifier information for holding the
errno value. Because errno is expected to be assignable, there is no need to
use typename std::remove_const<decltype(errno)>::type to hold the value.
llvm-svn: 173172
2013-01-22 17:26:08 +00:00
Chandler Carruth
e70a813b59
Don't mark variadic functions as always inline -- they cannot in fact be
...
inlined.
Patch by Saleem Abdulrasool, reviewed by Michael Spencer and Richard Smith.
llvm-svn: 171276
2012-12-31 06:09:54 +00:00
Howard Hinnant
16694b5df5
Zhang Xiongpang: Add definitions for const data members. Fixes http://llvm.org/bugs/show_bug.cgi?id=14585 .
...
llvm-svn: 170026
2012-12-12 21:14:28 +00:00
Howard Hinnant
b5c63a2e07
Restrict optimized __pad_and_output implementation detail to desired releases.
...
llvm-svn: 167980
2012-11-14 21:17:15 +00:00
Howard Hinnant
3e2740a36c
Dimitry Andric: Silence some warnings in <locale>.
...
llvm-svn: 167492
2012-11-06 21:48:33 +00:00
Howard Hinnant
cd47cbc7a4
Provide a way to disable use of extern templates in libc++. This is intended for the clients of libc++, not the libc++ build. The dylib should always contain the extern templates. To disable the client needs to put -D'_LIBCPP_EXTERN_TEMPLATE(...)=' on the command line.
...
llvm-svn: 167486
2012-11-06 21:08:48 +00:00
Howard Hinnant
92b5940fbb
Overloaded __pad_and_output on ostreambuf_iterator and in this overload call sputn instead of dereferencing the iterator which calls sputc. This is intended to be purely a performance optimization, especially for clients who may have overloaded the virtual function xsputn.
...
llvm-svn: 164241
2012-09-19 19:14:15 +00:00
Howard Hinnant
9146984e73
Fixed a bug in wstring_convert concerning zero-length inputs. Thanks to Jonathan Coxhead for reporting this bug.
...
llvm-svn: 160136
2012-07-12 18:07:41 +00:00
Jeffrey Yasskin
9c95b19f9e
Fix moneypunct_byname algorithm to more accurately represent C locales in C++.
...
llvm-svn: 152501
2012-03-10 18:31:43 +00:00
Howard Hinnant
8d5df9b9d4
Change some smart_ptr == 0 to smart_ptr == nullptr. Fixes http://llvm.org/bugs/show_bug.cgi?id=12185 .
...
llvm-svn: 152240
2012-03-07 20:37:43 +00:00
David Chisnall
ca78592c16
Don't define __locale_raii if we are not going to be using it.
...
llvm-svn: 151718
2012-02-29 13:00:07 +00:00
Howard Hinnant
6560953383
Do not parse sign if a sign is not the next legal character when parsing floating point from an input stream. Fixes http://llvm.org/bugs/show_bug.cgi?id=11871
...
llvm-svn: 150609
2012-02-15 19:19:37 +00:00
Howard Hinnant
c206366fd7
Quash a whole bunch of warnings
...
llvm-svn: 145624
2011-12-01 20:21:04 +00:00
Howard Hinnant
ab4f438239
Add protection from min/max macros
...
llvm-svn: 145407
2011-11-29 16:45:27 +00:00
Howard Hinnant
073458b1ab
Windows support by Ruben Van Boxem.
...
llvm-svn: 142235
2011-10-17 20:05:10 +00:00
Howard Hinnant
a33d4bc1ff
Starting on musl port by Arvid Picciani
...
llvm-svn: 141672
2011-10-11 16:00:46 +00:00
Howard Hinnant
8909cdfff9
Windows port work by Ruben Van Boxem
...
llvm-svn: 140805
2011-09-29 20:33:10 +00:00
Howard Hinnant
9978e3709f
Attempted locale refactoring. _LIBCPP_LOCALE__L_EXTENSIONS now should be 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
2011-09-28 23:39:33 +00:00
Howard Hinnant
3438889dec
Work on Windows port by Ruben Van Boxem
...
llvm-svn: 140728
2011-09-28 21:39:20 +00:00
Howard Hinnant
0470a63776
Attempt to enable locale simplification. On which platforms can we now #define _LIBCPP_STABLE_APPLE_ABI?
...
llvm-svn: 140724
2011-09-28 21:05:01 +00:00
Howard Hinnant
dbe8111948
Work on Windows port by Ruben Van Boxem
...
llvm-svn: 140384
2011-09-23 16:11:27 +00:00
Howard Hinnant
3c78ca07bc
Partial Windows port by Ruben Van Boxem
...
llvm-svn: 140328
2011-09-22 19:10:18 +00:00
David Chisnall
89728139cb
Fixes for FreeBSD, including some fairly obvious copy-and-paste errors.
...
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
2011-09-21 08:39:44 +00:00
Howard Hinnant
8ebf07a3de
Revert locale for apple back to original design, getting rid of now useless helper *_l functions
...
llvm-svn: 135272
2011-07-15 14:46:11 +00:00
Howard Hinnant
3b13c94a14
_LIBCXX_STABLE_APPLE_ABI -> _LIBCPP_STABLE_APPLE_ABI
...
llvm-svn: 135271
2011-07-15 14:25:40 +00:00
Alexis Hunt
4084c9ebe5
Reapply 135035 with proper conditional inclusion, hopefully solving
...
issues with it.
llvm-svn: 135246
2011-07-15 05:40:33 +00:00
Howard Hinnant
f6b7e20bc8
Reverted to 134947. Once I got into it, I discovered there were too many problems to fix in 135035.
...
llvm-svn: 135044
2011-07-13 15:48:16 +00:00
Alexis Hunt
8a02a632be
Implement the __nolocale functions properly so that they will work on
...
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
2011-07-13 06:40:50 +00:00
Alexis Hunt
8dfec1ac7d
Make sure that __time_put constructors properly on non-Apple platforms.
...
llvm-svn: 134947
2011-07-12 00:55:04 +00:00
Alexis Hunt
f023519770
Conditionally wrap the changes from r134781.
...
llvm-svn: 134783
2011-07-09 01:09:31 +00:00
Alexis Hunt
3f60bca9e9
Implement generalized table lookups for upper, lower, and character
...
traits.
To the best of my knowledge, this will not break the ABI for Apple.
However, it does introduce three publicly visible (although with
reserved name) functions that will fail to link against the just-shipped
Apple version of libc++. Since they are not used in any inline
functions, no actual breakage should occur.
If Howard doesn't want to put undefined functions (even internal ones)
into a header, they could be surrounded by additional conditional
compilation.
llvm-svn: 134781
2011-07-09 00:56:23 +00:00
Howard Hinnant
ce48a1137d
_STD -> _VSTD to avoid macro clash on windows
...
llvm-svn: 134190
2011-06-30 21:18:19 +00:00
Howard Hinnant
b5d866d4a3
noexcept for Chapter 22 [localization].
...
llvm-svn: 132337
2011-05-31 15:34:58 +00:00
Howard Hinnant
1444d85b5a
time_get was missing the %F specifier. This change impacts the binary.
...
llvm-svn: 129251
2011-04-10 17:54:14 +00:00
Howard Hinnant
f1bf6f9a3a
Chris Jefferson found a defect in the C++0x working draft by trying to run libc++ against boost. I've submitted an issue to the LWG, and this commit attempts to implement the proposed resolution of that defect report. I'd point to the issue but it hasn't been put into the LWG list yet. The title of the issue will be: Stage 2 accumulate incompatibilty
...
llvm-svn: 127303
2011-03-09 01:03:19 +00:00
Howard Hinnant
a8d8ca4d6f
http://llvm.org/bugs/show_bug.cgi?id=9326
...
llvm-svn: 126504
2011-02-25 19:52:41 +00:00
Howard Hinnant
0c68ed006d
Chris Jefferson spotted a problem with messages_base::catalog while getting libc++ to work on boost. The standard says this type must be an int. But this type is the key returned by the OS facility catopen. On OS X the type returned by catopen is void*, which doesn't fit into an int on 64 bit platforms. Chris suggested using ptrdiff_t instead of void*. It still isn't compliant with the standard, but chances are that this change will fix what is ailing boost. Chris also supplied the algorithm for distinguishing high-order pointers from error conditions. Thanks Chris.
...
llvm-svn: 126462
2011-02-25 00:51:08 +00:00
Howard Hinnant
a0fe8c436e
Chris Jefferson noted many places where function calls needed to be qualified (thanks Chris).
...
llvm-svn: 125510
2011-02-14 19:12:38 +00:00
Howard Hinnant
c950e77d1d
Effort to reduce the number of exported symbols
...
llvm-svn: 122057
2010-12-17 14:46:43 +00:00
Michael J. Spencer
f5799be4a8
Add CMake build and fix major Linux blockers.
...
llvm-svn: 121510
2010-12-10 19:47:54 +00:00
Howard Hinnant
412dbebe1b
license change
...
llvm-svn: 119395
2010-11-16 22:09:02 +00:00
Howard Hinnant
848a5374d0
visibility-decoration.
...
llvm-svn: 114551
2010-09-22 16:48:34 +00:00
Howard Hinnant
959cf8aede
Fix whitespace
...
llvm-svn: 113089
2010-09-04 23:46:48 +00:00
Howard Hinnant
7609c9b665
Changed __config to react to all of clang's currently documented has_feature flags, and renamed _LIBCPP_MOVE to _LIBCPP_HAS_NO_RVALUE_REFERENCES to be more consistent with the rest of the libc++'s flags, and with clang's nomenclature.
...
llvm-svn: 113086
2010-09-04 23:28:19 +00:00
Howard Hinnant
b3371f6f49
Fixing whitespace problems
...
llvm-svn: 111750
2010-08-22 00:02:43 +00:00
Howard Hinnant
54b409fdb9
now works with -fno-exceptions and -fno-rtti
...
llvm-svn: 110828
2010-08-11 17:04:31 +00:00
Howard Hinnant
6508e9936c
[conversions.buffer]
...
llvm-svn: 105286
2010-06-01 20:09:18 +00:00
Howard Hinnant
5d3c11337a
[conversions.string]
...
llvm-svn: 105254
2010-05-31 20:58:54 +00:00
Howard Hinnant
128ba7191d
patch by Jeffrey Yasskin for porting to Ubuntu Hardy. Everything was accepted except there were some bug fixes needed in <locale> for the __nolocale_* series. For the apple branch I ended up using templates instead of the var_args solution because it seemed both safer and more efficient.
...
llvm-svn: 104516
2010-05-24 17:49:41 +00:00
Howard Hinnant
5b08a8a432
Wiped out some non-ascii characters that snuck into the copyright.
...
llvm-svn: 103516
2010-05-11 21:36:01 +00:00
Howard Hinnant
3e519524c1
libcxx initial import
...
llvm-svn: 103490
2010-05-11 19:42:16 +00:00