Commit Graph

35 Commits

Author SHA1 Message Date
Howard Hinnant 0be8f64c44 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.

llvm-svn: 187593
2013-08-01 18:17:34 +00:00
Joerg Sonnenberger 50544e7e65 Add NetBSD support.
llvm-svn: 182162
2013-05-17 21:17:34 +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 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 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 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 aeb85680fb Dimitry Andric: many visibility fixes. Howard: Much appreciated. Can you send me a patch to CREDITS.TXT?
llvm-svn: 163862
2012-09-14 00:39:16 +00:00
Howard Hinnant 6a03f169db locale::id really needs to be constructed at compile time.
llvm-svn: 160785
2012-07-26 16:14:37 +00:00
David Chisnall 14c25b80e9 Solaris port. Currently sees around 200 test failures, mostly related to
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
2012-02-29 13:05:08 +00:00
Howard Hinnant c206366fd7 Quash a whole bunch of warnings
llvm-svn: 145624
2011-12-01 20:21:04 +00:00
Howard Hinnant c003db1fca Further macro protection by replacing _[A-Z] with _[A-Z]p
llvm-svn: 145410
2011-11-29 18:15:50 +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 0c06e58fae Windows patch work by Ruben Van Boxem
llvm-svn: 140781
2011-09-29 13:33:15 +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 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
David Chisnall 0a0f599f2c Enable __locale to work on FreeBSD.
llvm-svn: 140005
2011-09-18 19:23: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 3739fe79e5 noexcept for <memory>. I've added a few extension noexcept to: allocator_traits<A>::deallocate, allocaate<T>::deallocate, return_temporary_buffer, and default_delete<T>::operator()(T*) const. My rationale was: If a std-dicated noexcept function needs to call another std-defined function, that called function must be noexcept. We're all a little new to noexcept, so things like this are to be expected. Also included fix for broken __is_swappable trait pointed out by Marc Glisse, thanks Marc|. And fixed a test case for is_nothrow_destructible. Destructors are now noexcept by default|
llvm-svn: 132261
2011-05-28 14:41:13 +00:00
Howard Hinnant c950e77d1d Effort to reduce the number of exported symbols
llvm-svn: 122057
2010-12-17 14:46:43 +00:00
Howard Hinnant 412dbebe1b license change
llvm-svn: 119395
2010-11-16 22:09:02 +00:00
Howard Hinnant 35ae4a20cd visibility-decoration.
llvm-svn: 114465
2010-09-21 18:58:51 +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 0c17e32edd [locale.stdcvt]
llvm-svn: 105174
2010-05-30 21:39:41 +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