libcxx fork for Darling build
Go to file
Ed Schouten abd06b4c9b Make the presence of stdin and stdout optional.
The idea behind Nuxi CloudABI is that it is targeted at (but not limited to)
running networked services in a sandboxed environment. The model behind stdin,
stdout and stderr is strongly focused on interactive tools in a command shell.
CloudABI does not support the notion of stdin and stdout, as 'standard
input/output' does not apply to services. The concept of stderr does makes
sense though, as services do need some mechanism to log error messages in a
uniform way.

This patch extends libc++ in such a way that std::cin and std::cout and the
associated <cstdio>/<cwchar> functions can be disabled through the flags
_LIBCPP_HAS_NO_STDIN and _LIBCPP_HAS_NO_STDOUT, respectively. At the same time
it attempts to clean up src/iostream.cpp a bit. Instead of using a single array
of mbstate_t objects and hardcoding the array indices, it creates separate
objects that declared next to the iostream objects and their buffers. The code
is also restructured by interleaving the construction and setup of c* and wc*
objects. That way it is more obvious that this is done identically.

The c* and wc* objects already have separate unit tests. Make use of this fact
by adding XFAILs in case libcpp-has-no-std* is set. That way the tests work in
both directions. If stdin or stdout is disabled, these tests will therefore
test for the absence of c* and wc*.

Differential Revision:	http://reviews.llvm.org/D8340


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@233275 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-26 14:35:46 +00:00
cmake [libcxx] Unify LIBCXX_<ABI-Name>_INCLUDE_PATHS to be LIBCXX_CXX_ABI_INCLUDE_PATHS 2015-03-19 20:59:45 +00:00
include Make the presence of stdin and stdout optional. 2015-03-26 14:35:46 +00:00
lib [libcxx] Add support for linking libc++ against a static ABI library. 2015-03-03 15:59:51 +00:00
src Make the presence of stdin and stdout optional. 2015-03-26 14:35:46 +00:00
test Make the presence of stdin and stdout optional. 2015-03-26 14:35:46 +00:00
utils Improve automatic detection of filetype for sym_check 2015-03-20 23:07:38 +00:00
www [libcxx] Unify LIBCXX_<ABI-Name>_INCLUDE_PATHS to be LIBCXX_CXX_ABI_INCLUDE_PATHS 2015-03-19 20:59:45 +00:00
.arcconfig Update Arcanist config to point to reviews.llvm.org 2014-06-10 18:29:36 +00:00
.gitignore [libc++] Refactor test components into modules. 2015-01-09 18:03:29 +00:00
CMakeLists.txt Make the presence of stdin and stdout optional. 2015-03-26 14:35:46 +00:00
CREDITS.TXT Add self to CREDITS.txt 2015-02-26 00:48:22 +00:00
LICENSE.TXT Update copyright year to 2015. 2015-03-12 20:13:11 +00:00
Makefile Revert "Fix installheaders target's permissions" 2014-12-16 05:28:07 +00:00