Commit Graph

33 Commits

Author SHA1 Message Date
Saleem Abdulrasool
3ff0531e95 cmath: account for MSVCRT 12.0 changes
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.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@230867 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-28 20:18:39 +00:00
Eric Fiselier
f51d676a0e Get libc++ building on Sun Solaris. Patch from C Bergstrom.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@226947 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-23 22:22:36 +00:00
Eric Fiselier
6cb69ffa0a Fixes to get libc++ building on sun solaris. Patch from C Bergstrom.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@222794 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-25 21:57:41 +00:00
Dan Albert
4c88839716 Fix win32 support header for mingw32.
These functions are defined as static in the mingw32 headers.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@219140 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-06 20:06:33 +00:00
Jonathan Roelofs
6a5a8abe2f Support newlib as libc++'s C library [locale part]
http://reviews.llvm.org/D5385


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@218144 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-19 20:09:12 +00:00
Marshall Clow
a64392627e Add support for BIONIC C library (Android). Patch from Dan Albert
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@212724 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-10 15:20:28 +00:00
Marshall Clow
98760c18f8 Add license headers to a bunch of libc++ files that were missing them. No functionality change. Fixes 18291. Thanks to Nico for the bug report and the patch.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@199400 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-16 16:58:45 +00:00
Yaron Keren
6c27250223 80 cols fixes.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@198482 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-04 09:27:39 +00:00
Yaron Keren
c8d1bbab02 Implement the functions: clz, clzl, clzll, ctz, ctzl, and ctzll
for libcxx when compiled with Visual C++ on Win32 and Win64.

clang and gcc (MinGW) compilers provide these implementations themselves.



git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@198481 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-04 08:56:00 +00:00
Marshall Clow
016d4e847a Patch by Xing Xue to improve libc++ support for AIX
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@195144 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-19 19:16:03 +00:00
Yaron Keren
15c04bedad This patch implements snprintf_l function in a way similar to the other
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.




git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@195044 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-18 21:12:14 +00:00
Yaron Keren
c26c385592 Windows.h is not required.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@194870 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-15 22:54:15 +00:00
Howard Hinnant
2bcdf5e9a0 Yaron Keren: Add missing comment.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192068 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-06 19:48:40 +00:00
Howard Hinnant
1e564246ec G M: Changes all references to "x inline" to "inline x" where x = _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.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191987 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-04 22:09:00 +00:00
Howard Hinnant
ef5aa93b9c G M: Restore the ability for libcxx to compile again on mingw 64.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@190837 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-17 01:34:47 +00:00
Howard Hinnant
5143722d14 Xing Xue: Some minor changes for IBM XLC++/AIX.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189623 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-29 23:37:50 +00:00
Howard Hinnant
7f76450ee9 Xing Xue: port to IBM XLC++/AIX.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188396 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-14 18:00:20 +00:00
Howard Hinnant
e9df0a5c6c Nico Rieck: Currently _MSC_VER and _WIN32 are used to guard code which is
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.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187593 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-01 18:17:34 +00:00
Howard Hinnant
9e98b34a8c Glen: This patch gets the string conversion functions working on Windows. It also refactors repetitive code in string.cpp do greatly reduce the repetitiveness, increasing maintainability.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@182026 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-16 17:13:40 +00:00
Howard Hinnant
a5733b3ad3 Ruben Van Boxem: Turn islower_l and isupper_l into functions (instead of macros) on Windows only to quell a warning during libc++ building.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@179408 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12 20:22:57 +00:00
David Chisnall
b56a4ada33 Define _WCHAR_T in solaris/wchar.h. This fixes a bug where Solaris 10 headers
try to define C++ keywords as typedefs (fixed in Solaris 11).



git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151890 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-02 10:56:04 +00:00
David Chisnall
ea2741973a Add support files required for building on Solaris.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151721 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-29 13:17:28 +00:00
Bob Wilson
d41b60b2b4 Add missing newlines at EOF.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@150965 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-20 16:56:13 +00:00
Howard Hinnant
f6d875f7f5 Fix http://llvm.org/bugs/show_bug.cgi?id=11428. Fix provided by Alberto Ganesh Barbati
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@145698 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-02 19:36:40 +00:00
Howard Hinnant
438377c051 Jean-Daniel: __builtin_popcountll support for Windows
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@145684 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-02 17:22:38 +00:00
Howard Hinnant
9f8884e6c1 Windows port work by Ruben Van Boxem
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@143105 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-27 16:24:42 +00:00
Howard Hinnant
78b6828f14 More windows port work by Ruben Van Boxem
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@142732 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-22 20:59:45 +00:00
Howard Hinnant
f46fc939cb Windows port work by Ruben Van Boxem
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@142578 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-20 12:49:21 +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
3c466fc631 Windows patch work by Ruben Van Boxem
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140781 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-29 13:33:15 +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
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