Joerg Sonnenberger
a71a952634
Add NetBSD support.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@182162 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-17 21:17:34 +00:00
Howard Hinnant
ae57a1ab1d
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
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@179556 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-15 20:40:06 +00:00
Howard Hinnant
4f67100219
Set failbit when strtold sets errno to ERANGE when parsing floating point values.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@179461 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-13 18:19:25 +00:00
Howard Hinnant
fc2f021bdd
Bruce Mitchener, Jr.: Port to emscripten. Fixes http://llvm.org/bugs/show_bug.cgi?id=15624 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178354 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-29 18:27:28 +00:00
Marshall Clow
9b145da078
Fix buffer read overflow in money_get::do_get(). Found by UBSan
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177694 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-22 02:14:40 +00:00
Marshall Clow
53e2763966
Removed raw references to __sun__, __FreeBSD__, __GLIBC__ and __linux__; now just check to see if they are defined.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177310 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18 19:34:07 +00:00
Marshall Clow
dece7fe670
Removed raw references to __APPLE__; now just check to see if it is defined.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177297 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18 17:45:34 +00:00
Marshall Clow
a22d2addb1
Removed raw references to _WIN32; now just check to see if it is defined.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177291 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18 17:04:29 +00:00
Howard Hinnant
6319f1462d
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 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176711 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-08 19:06:24 +00:00
Howard Hinnant
83eade6abb
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.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176593 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-06 23:30:19 +00:00
Howard Hinnant
54e2fff2e1
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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@173172 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-22 17:26:08 +00:00
Chandler Carruth
ed9f69d342
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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171276 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-31 06:09:54 +00:00
Howard Hinnant
0a69fa14d2
Zhang Xiongpang: Add definitions for const data members. Fixes http://llvm.org/bugs/show_bug.cgi?id=14585 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@170026 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-12 21:14:28 +00:00
Howard Hinnant
537b2fa6b8
Restrict optimized __pad_and_output implementation detail to desired releases.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@167980 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-14 21:17:15 +00:00
Howard Hinnant
9bae2a9dc5
Dimitry Andric: Silence some warnings in <locale>.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@167492 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-06 21:48:33 +00:00
Howard Hinnant
ff9267709d
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.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@167486 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-06 21:08:48 +00:00
Howard Hinnant
a585de645c
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.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@164241 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-19 19:14:15 +00:00
Howard Hinnant
1ca23672a0
Fixed a bug in wstring_convert concerning zero-length inputs. Thanks to Jonathan Coxhead for reporting this bug.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160136 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-12 18:07:41 +00:00
Jeffrey Yasskin
558ae17391
Fix moneypunct_byname algorithm to more accurately represent C locales in C++.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@152501 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-10 18:31:43 +00:00
Howard Hinnant
05b57d5cdf
Change some smart_ptr == 0 to smart_ptr == nullptr. Fixes http://llvm.org/bugs/show_bug.cgi?id=12185 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@152240 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-07 20:37:43 +00:00
David Chisnall
8fa14e97ca
Don't define __locale_raii if we are not going to be using it.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151718 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-29 13:00:07 +00:00
Howard Hinnant
b04ad4162d
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
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@150609 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-15 19:19:37 +00:00
Howard Hinnant
ec3773c2da
Quash a whole bunch of warnings
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@145624 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-01 20:21:04 +00:00
Howard Hinnant
66c6f9733b
Add protection from min/max macros
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@145407 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-29 16:45:27 +00:00
Howard Hinnant
08e17472e4
Windows support by Ruben Van Boxem.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@142235 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-17 20:05:10 +00:00
Howard Hinnant
11624459ef
Starting on musl port by Arvid Picciani
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@141672 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-11 16:00:46 +00:00
Howard Hinnant
14fa9f9d8f
Windows port work by Ruben Van Boxem
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140805 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-29 20:33:10 +00:00
Howard Hinnant
866569b8c3
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.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140734 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 23:39:33 +00:00
Howard Hinnant
efbe4067f2
Work on Windows port by Ruben Van Boxem
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140728 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 21:39:20 +00:00
Howard Hinnant
2ea1ca9bdd
Attempt to enable locale simplification. On which platforms can we now #define _LIBCPP_STABLE_APPLE_ABI?
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140724 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 21:05:01 +00:00
Howard Hinnant
6cd05eeb35
Work on Windows port by Ruben Van Boxem
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140384 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-23 16:11:27 +00:00
Howard Hinnant
92a07003b2
Partial Windows port by Ruben Van Boxem
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140328 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-22 19:10:18 +00:00
David Chisnall
c512df1950
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...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140245 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-21 08:39:44 +00:00
Howard Hinnant
bcbbd4d14f
Revert locale for apple back to original design, getting rid of now useless helper *_l functions
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@135272 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 14:46:11 +00:00
Howard Hinnant
9a2078137f
_LIBCXX_STABLE_APPLE_ABI -> _LIBCPP_STABLE_APPLE_ABI
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@135271 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 14:25:40 +00:00
Sean Hunt
f3907e6cc0
Reapply 135035 with proper conditional inclusion, hopefully solving
...
issues with it.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@135246 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 05:40:33 +00:00
Howard Hinnant
8d75632ad0
Reverted to 134947. Once I got into it, I discovered there were too many problems to fix in 135035.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@135044 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-13 15:48:16 +00:00
Sean Hunt
c97da3a590
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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@135035 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-13 06:40:50 +00:00
Sean Hunt
0389c53f44
Make sure that __time_put constructors properly on non-Apple platforms.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@134947 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-12 00:55:04 +00:00
Sean Hunt
e59f724f79
Conditionally wrap the changes from r134781.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@134783 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-09 01:09:31 +00:00
Sean Hunt
62a6ac33a2
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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@134781 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-09 00:56:23 +00:00
Howard Hinnant
0949eedbd6
_STD -> _VSTD to avoid macro clash on windows
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@134190 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-30 21:18:19 +00:00
Howard Hinnant
c983454d30
noexcept for Chapter 22 [localization].
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132337 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-31 15:34:58 +00:00
Howard Hinnant
506b36487c
time_get was missing the %F specifier. This change impacts the binary.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@129251 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-10 17:54:14 +00:00
Howard Hinnant
80586729e4
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
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@127303 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-09 01:03:19 +00:00
Howard Hinnant
e7c8da6f2d
http://llvm.org/bugs/show_bug.cgi?id=9326
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@126504 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-25 19:52:41 +00:00
Howard Hinnant
b2080c70d4
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.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@126462 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-25 00:51:08 +00:00
Howard Hinnant
6cf5d8c3aa
Chris Jefferson noted many places where function calls needed to be qualified (thanks Chris).
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@125510 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-14 19:12:38 +00:00
Howard Hinnant
2d72b1e393
Effort to reduce the number of exported symbols
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@122057 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-17 14:46:43 +00:00
Michael J. Spencer
626916fc25
Add CMake build and fix major Linux blockers.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@121510 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 19:47:54 +00:00