Checking errno without first checking that the call failed means that
if some other call prior to mkstemp failed with EINVAL prior to this,
the assert would fire even if mkstemp succeeded. If something failed
with EEXIST, it would go in to an infinite loop.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@229035 91177308-0d34-0410-b5e6-96231b3b80d8
Change-Id: I512f29f2cb4b379e9f33e9bc12c060851152647c
This rebase skips the following patches in upstream:
+ 37025e1b32
Make the helper routines in string really be constexpr. This required a
bit of refacoring in algorithm as well. Give them better names while
we're at it. All of these are internal rotines; no visible functionality
change.
+ 164b297099
Implement string_view from the library fundamentals TS (n4023). Also
works in C++11 and 03, with reduced functionality (mostly in the area of
constexpr)
+ e4694b4129
Formatting improvements in the <string_view> synopsis suggested by
RSmith. No functionality change.
+ 3a61b30f3a
Minor cleanup for string_view; mostly from suggestions by Richard Smith.
Also, make the tests pass under c++03
+ 484728789e
string_view enhancements. Move to the correct namespace. Better
constexpr support (thanks to Richard for the suggestions). Update the
tests to match this. Add <experimental/__config for experimental
macros/etc to live.
+ b1a40264dc
[libcxx] Add <experimental/utility> header for LFTS.
+ 3ee7233c80
[libcxx] expose experimental::erased_type for all standard versions.
+ 67740670f9
NFC. Remove trailing whitespace and tabs.
+ b9536101dc
NFC. Move definition of _LIBCPP_ASSERT into __debug header and remove
external include guards.
+ 98c4e404ca.
Revert "Turn off extern templates for most uses."
Bug: 17255369
Change-Id: I629ff16275d50e4cc8767b253a2c0542468348d8
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