svn commit: r277244 - in projects/ifnet: cddl/contrib/opensolaris/lib/libzfs/common contrib/libc++ contrib/libc++/include contrib/libc++/include/experimental contrib/libc++/include/ext contrib/libc...
Gleb Smirnoff
glebius at FreeBSD.org
Fri Jan 16 11:51:53 UTC 2015
Author: glebius
Date: Fri Jan 16 11:51:47 2015
New Revision: 277244
URL: https://svnweb.freebsd.org/changeset/base/277244
Log:
Merge head.
Added:
projects/ifnet/contrib/libc++/include/__refstring
- copied unchanged from r277243, head/contrib/libc++/include/__refstring
projects/ifnet/contrib/libc++/include/experimental/__config
- copied unchanged from r277243, head/contrib/libc++/include/experimental/__config
projects/ifnet/contrib/libc++/include/experimental/string_view
- copied unchanged from r277243, head/contrib/libc++/include/experimental/string_view
projects/ifnet/contrib/libc++/include/experimental/type_traits
- copied unchanged from r277243, head/contrib/libc++/include/experimental/type_traits
projects/ifnet/contrib/libc++/include/experimental/utility
- copied unchanged from r277243, head/contrib/libc++/include/experimental/utility
projects/ifnet/contrib/libc++/include/module.modulemap
- copied unchanged from r277243, head/contrib/libc++/include/module.modulemap
projects/ifnet/etc/periodic/daily/510.status-world-kernel
- copied unchanged from r277243, head/etc/periodic/daily/510.status-world-kernel
projects/ifnet/share/man/man4/ixl.4
- copied unchanged from r277243, head/share/man/man4/ixl.4
projects/ifnet/share/man/man4/ixlv.4
- copied unchanged from r277243, head/share/man/man4/ixlv.4
projects/ifnet/sys/boot/i386/libi386/multiboot.c
- copied unchanged from r277243, head/sys/boot/i386/libi386/multiboot.c
projects/ifnet/sys/boot/i386/libi386/multiboot.h
- copied unchanged from r277243, head/sys/boot/i386/libi386/multiboot.h
projects/ifnet/sys/boot/i386/libi386/multiboot_tramp.S
- copied unchanged from r277243, head/sys/boot/i386/libi386/multiboot_tramp.S
Modified:
projects/ifnet/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c
projects/ifnet/contrib/libc++/CREDITS.TXT
projects/ifnet/contrib/libc++/LICENSE.TXT
projects/ifnet/contrib/libc++/include/__bit_reference
projects/ifnet/contrib/libc++/include/__config
projects/ifnet/contrib/libc++/include/__debug
projects/ifnet/contrib/libc++/include/__functional_03
projects/ifnet/contrib/libc++/include/__functional_base
projects/ifnet/contrib/libc++/include/__functional_base_03
projects/ifnet/contrib/libc++/include/__hash_table
projects/ifnet/contrib/libc++/include/__locale
projects/ifnet/contrib/libc++/include/__mutex_base
projects/ifnet/contrib/libc++/include/__sso_allocator
projects/ifnet/contrib/libc++/include/__tree
projects/ifnet/contrib/libc++/include/__tuple
projects/ifnet/contrib/libc++/include/algorithm
projects/ifnet/contrib/libc++/include/atomic
projects/ifnet/contrib/libc++/include/bitset
projects/ifnet/contrib/libc++/include/chrono
projects/ifnet/contrib/libc++/include/cmath
projects/ifnet/contrib/libc++/include/condition_variable
projects/ifnet/contrib/libc++/include/cstddef
projects/ifnet/contrib/libc++/include/deque
projects/ifnet/contrib/libc++/include/experimental/dynarray
projects/ifnet/contrib/libc++/include/experimental/optional
projects/ifnet/contrib/libc++/include/ext/__hash
projects/ifnet/contrib/libc++/include/ext/hash_map
projects/ifnet/contrib/libc++/include/forward_list
projects/ifnet/contrib/libc++/include/functional
projects/ifnet/contrib/libc++/include/future
projects/ifnet/contrib/libc++/include/iomanip
projects/ifnet/contrib/libc++/include/ios
projects/ifnet/contrib/libc++/include/istream
projects/ifnet/contrib/libc++/include/iterator
projects/ifnet/contrib/libc++/include/limits
projects/ifnet/contrib/libc++/include/list
projects/ifnet/contrib/libc++/include/locale
projects/ifnet/contrib/libc++/include/map
projects/ifnet/contrib/libc++/include/memory
projects/ifnet/contrib/libc++/include/mutex
projects/ifnet/contrib/libc++/include/new
projects/ifnet/contrib/libc++/include/numeric
projects/ifnet/contrib/libc++/include/ostream
projects/ifnet/contrib/libc++/include/random
projects/ifnet/contrib/libc++/include/regex
projects/ifnet/contrib/libc++/include/set
projects/ifnet/contrib/libc++/include/shared_mutex
projects/ifnet/contrib/libc++/include/sstream
projects/ifnet/contrib/libc++/include/stdexcept
projects/ifnet/contrib/libc++/include/string
projects/ifnet/contrib/libc++/include/thread
projects/ifnet/contrib/libc++/include/tuple
projects/ifnet/contrib/libc++/include/type_traits
projects/ifnet/contrib/libc++/include/typeinfo
projects/ifnet/contrib/libc++/include/unordered_map
projects/ifnet/contrib/libc++/include/unordered_set
projects/ifnet/contrib/libc++/include/utility
projects/ifnet/contrib/libc++/include/valarray
projects/ifnet/contrib/libc++/include/vector
projects/ifnet/contrib/libc++/src/algorithm.cpp
projects/ifnet/contrib/libc++/src/chrono.cpp
projects/ifnet/contrib/libc++/src/condition_variable.cpp
projects/ifnet/contrib/libc++/src/debug.cpp
projects/ifnet/contrib/libc++/src/exception.cpp
projects/ifnet/contrib/libc++/src/future.cpp
projects/ifnet/contrib/libc++/src/hash.cpp
projects/ifnet/contrib/libc++/src/ios.cpp
projects/ifnet/contrib/libc++/src/locale.cpp
projects/ifnet/contrib/libc++/src/memory.cpp
projects/ifnet/contrib/libc++/src/mutex.cpp
projects/ifnet/contrib/libc++/src/new.cpp
projects/ifnet/contrib/libc++/src/optional.cpp
projects/ifnet/contrib/libc++/src/random.cpp
projects/ifnet/contrib/libc++/src/regex.cpp
projects/ifnet/contrib/libc++/src/shared_mutex.cpp
projects/ifnet/contrib/libc++/src/stdexcept.cpp
projects/ifnet/contrib/libc++/src/string.cpp
projects/ifnet/contrib/libc++/src/strstream.cpp
projects/ifnet/contrib/libc++/src/system_error.cpp
projects/ifnet/contrib/libc++/src/thread.cpp
projects/ifnet/contrib/libc++/src/valarray.cpp
projects/ifnet/contrib/ofed/management/opensm/osmtest/osmtest.c
projects/ifnet/etc/defaults/periodic.conf
projects/ifnet/etc/periodic/daily/Makefile
projects/ifnet/lib/libc++/Makefile
projects/ifnet/lib/libpam/modules/pam_radius/pam_radius.c
projects/ifnet/sbin/route/route.c
projects/ifnet/share/man/man4/Makefile
projects/ifnet/share/man/man4/bpf.4
projects/ifnet/share/man/man5/periodic.conf.5
projects/ifnet/share/man/man9/Makefile
projects/ifnet/share/man/man9/timeout.9
projects/ifnet/sys/amd64/conf/NOTES
projects/ifnet/sys/amd64/include/metadata.h
projects/ifnet/sys/arm/conf/NOTES
projects/ifnet/sys/boot/common/bootstrap.h
projects/ifnet/sys/boot/common/load_elf.c
projects/ifnet/sys/boot/common/load_elf_obj.c
projects/ifnet/sys/boot/common/module.c
projects/ifnet/sys/boot/fdt/fdt_loader_cmd.c
projects/ifnet/sys/boot/forth/beastie.4th
projects/ifnet/sys/boot/forth/loader.4th
projects/ifnet/sys/boot/forth/support.4th
projects/ifnet/sys/boot/i386/libi386/Makefile
projects/ifnet/sys/boot/i386/libi386/bootinfo64.c
projects/ifnet/sys/boot/i386/libi386/elf64_freebsd.c
projects/ifnet/sys/boot/i386/libi386/libi386.h
projects/ifnet/sys/boot/i386/loader/conf.c
projects/ifnet/sys/compat/freebsd32/freebsd32_misc.c
projects/ifnet/sys/conf/NOTES
projects/ifnet/sys/conf/files
projects/ifnet/sys/dev/ath/if_ath.c
projects/ifnet/sys/dev/cxgbe/t4_main.c
projects/ifnet/sys/dev/cxgbe/t4_mp_ring.c
projects/ifnet/sys/dev/pccbb/pccbb.c
projects/ifnet/sys/dev/pccbb/pccbb_isa.c
projects/ifnet/sys/dev/pccbb/pccbb_pci.c
projects/ifnet/sys/dev/sound/pci/emu10kx.c
projects/ifnet/sys/dev/sound/pci/envy24.c
projects/ifnet/sys/dev/sound/pci/envy24ht.c
projects/ifnet/sys/dev/sound/pcm/channel.c
projects/ifnet/sys/i386/include/metadata.h
projects/ifnet/sys/kern/init_main.c
projects/ifnet/sys/kern/kern_condvar.c
projects/ifnet/sys/kern/kern_lock.c
projects/ifnet/sys/kern/kern_sig.c
projects/ifnet/sys/kern/kern_switch.c
projects/ifnet/sys/kern/kern_synch.c
projects/ifnet/sys/kern/kern_thread.c
projects/ifnet/sys/kern/kern_timeout.c
projects/ifnet/sys/kern/subr_sleepqueue.c
projects/ifnet/sys/modules/Makefile
projects/ifnet/sys/modules/cxgbe/if_cxgbe/Makefile
projects/ifnet/sys/net/bpf.c
projects/ifnet/sys/netpfil/ipfw/ip_fw_nat.c
projects/ifnet/sys/ofed/include/linux/completion.h
projects/ifnet/sys/ofed/include/linux/linux_idr.c
projects/ifnet/sys/powerpc/conf/NOTES
projects/ifnet/sys/sys/_callout.h
projects/ifnet/sys/sys/callout.h
projects/ifnet/sys/sys/param.h
projects/ifnet/sys/sys/proc.h
projects/ifnet/sys/x86/xen/pv.c
Directory Properties:
projects/ifnet/ (props changed)
projects/ifnet/cddl/ (props changed)
projects/ifnet/cddl/contrib/opensolaris/ (props changed)
projects/ifnet/cddl/contrib/opensolaris/lib/libzfs/ (props changed)
projects/ifnet/contrib/libc++/ (props changed)
projects/ifnet/etc/ (props changed)
projects/ifnet/sbin/ (props changed)
projects/ifnet/share/ (props changed)
projects/ifnet/share/man/man4/ (props changed)
projects/ifnet/sys/ (props changed)
projects/ifnet/sys/boot/ (props changed)
projects/ifnet/sys/conf/ (props changed)
Modified: projects/ifnet/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c
==============================================================================
--- projects/ifnet/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Fri Jan 16 11:45:54 2015 (r277243)
+++ projects/ifnet/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Fri Jan 16 11:51:47 2015 (r277244)
@@ -1916,6 +1916,7 @@ zpool_scan(zpool_handle_t *zhp, pool_sca
}
}
+#ifdef illumos
/*
* This provides a very minimal check whether a given string is likely a
* c#t#d# style string. Users of this are expected to do their own
@@ -1947,6 +1948,7 @@ ctd_check_path(char *str) {
}
return (CTD_CHECK(str));
}
+#endif
/*
* Find a vdev that matches the search criteria specified. We use the
@@ -2002,6 +2004,7 @@ vdev_to_nvlist_iter(nvlist_t *nv, nvlist
*
* Otherwise, all other searches are simple string compares.
*/
+#ifdef illumos
if (strcmp(srchkey, ZPOOL_CONFIG_PATH) == 0 &&
ctd_check_path(val)) {
uint64_t wholedisk = 0;
@@ -2041,6 +2044,9 @@ vdev_to_nvlist_iter(nvlist_t *nv, nvlist
break;
}
} else if (strcmp(srchkey, ZPOOL_CONFIG_TYPE) == 0 && val) {
+#else
+ if (strcmp(srchkey, ZPOOL_CONFIG_TYPE) == 0 && val) {
+#endif
char *type, *idx, *end, *p;
uint64_t id, vdev_id;
Modified: projects/ifnet/contrib/libc++/CREDITS.TXT
==============================================================================
--- projects/ifnet/contrib/libc++/CREDITS.TXT Fri Jan 16 11:45:54 2015 (r277243)
+++ projects/ifnet/contrib/libc++/CREDITS.TXT Fri Jan 16 11:51:47 2015 (r277244)
@@ -33,6 +33,10 @@ E: mclow.lists at gmail.com
E: marshall at idio.com
D: C++14 support, patches and bug fixes.
+N: Eric Fiselier
+E: eric at efcs.ca
+D: LFTS support, patches and bug fixes.
+
N: Bill Fisher
E: william.w.fisher at gmail.com
D: Regex bug fixes.
Modified: projects/ifnet/contrib/libc++/LICENSE.TXT
==============================================================================
--- projects/ifnet/contrib/libc++/LICENSE.TXT Fri Jan 16 11:45:54 2015 (r277243)
+++ projects/ifnet/contrib/libc++/LICENSE.TXT Fri Jan 16 11:51:47 2015 (r277244)
@@ -14,7 +14,7 @@ Full text of the relevant licenses is in
University of Illinois/NCSA
Open Source License
-Copyright (c) 2009-2013 by the contributors listed in CREDITS.TXT
+Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT
All rights reserved.
@@ -55,7 +55,7 @@ SOFTWARE.
==============================================================================
-Copyright (c) 2009-2013 by the contributors listed in CREDITS.TXT
+Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Modified: projects/ifnet/contrib/libc++/include/__bit_reference
==============================================================================
--- projects/ifnet/contrib/libc++/include/__bit_reference Fri Jan 16 11:45:54 2015 (r277243)
+++ projects/ifnet/contrib/libc++/include/__bit_reference Fri Jan 16 11:51:47 2015 (r277244)
@@ -174,7 +174,7 @@ __find_bool_true(__bit_iterator<_Cp, _Is
if (__b)
return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__ctz(__b)));
if (__n == __dn)
- return _It(__first.__seg_, __first.__ctz_ + __n);
+ return __first + __n;
__n -= __dn;
++__first.__seg_;
}
@@ -210,7 +210,7 @@ __find_bool_false(__bit_iterator<_Cp, _I
if (__b)
return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__ctz(__b)));
if (__n == __dn)
- return _It(__first.__seg_, __first.__ctz_ + __n);
+ return __first + __n;
__n -= __dn;
++__first.__seg_;
}
@@ -705,7 +705,7 @@ inline _LIBCPP_INLINE_VISIBILITY
__bit_iterator<_Cp, false>
move_backward(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result)
{
- return _VSTD::copy(__first, __last, __result);
+ return _VSTD::copy_backward(__first, __last, __result);
}
// swap_ranges
Modified: projects/ifnet/contrib/libc++/include/__config
==============================================================================
--- projects/ifnet/contrib/libc++/include/__config Fri Jan 16 11:45:54 2015 (r277243)
+++ projects/ifnet/contrib/libc++/include/__config Fri Jan 16 11:51:47 2015 (r277244)
@@ -19,6 +19,11 @@
#define _GNUC_VER (__GNUC__ * 100 + __GNUC_MINOR__)
#endif
+#if !_WIN32
+#include <unistd.h>
+#include <errno.h> // for ELAST on FreeBSD
+#endif
+
#define _LIBCPP_VERSION 1101
#define _LIBCPP_ABI_VERSION 1
@@ -106,6 +111,13 @@
# endif
#endif // __sun__
+#if defined(__native_client__)
+ // NaCl's sandbox (which PNaCl also runs in) doesn't allow filesystem access,
+ // including accesses to the special files under /dev. C++11's
+ // std::random_device is instead exposed through a NaCl syscall.
+# define _LIBCPP_USING_NACL_RANDOM
+#endif // defined(__native_client__)
+
#if !defined(_LIBCPP_LITTLE_ENDIAN) || !defined(_LIBCPP_BIG_ENDIAN)
# include <endian.h>
# if __BYTE_ORDER == __LITTLE_ENDIAN
@@ -194,7 +206,7 @@
#endif
#ifndef _LIBCPP_EXCEPTION_ABI
-#define _LIBCPP_EXCEPTION_ABI _LIBCPP_TYPE_VIS
+#define _LIBCPP_EXCEPTION_ABI __attribute__ ((__visibility__("default")))
#endif
#ifndef _LIBCPP_ALWAYS_INLINE
@@ -203,6 +215,11 @@
#if defined(__clang__)
+#if defined(__APPLE__) && !defined(__i386__) && !defined(__x86_64__) && \
+ !defined(__arm__)
+#define _LIBCPP_ALTERNATE_STRING_LAYOUT
+#endif
+
#if __has_feature(cxx_alignas)
# define _ALIGNAS_TYPE(x) alignas(x)
# define _ALIGNAS(x) alignas(x)
@@ -215,14 +232,10 @@
#define _LIBCPP_HAS_NO_TEMPLATE_ALIASES
#endif
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
-#ifdef __linux__
-#define _LIBCPP_HAS_NO_UNICODE_CHARS
-#else
+#if __cplusplus < 201103L
typedef __char16_t char16_t;
typedef __char32_t char32_t;
#endif
-#endif
#if !(__has_feature(cxx_exceptions))
#define _LIBCPP_NO_EXCEPTIONS
@@ -246,6 +259,8 @@ typedef __char32_t char32_t;
# define _LIBCPP_NORETURN __attribute__ ((noreturn))
#endif
+#define _LIBCPP_UNUSED __attribute__((__unused__))
+
#if !(__has_feature(cxx_defaulted_functions))
#define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
#endif // !(__has_feature(cxx_defaulted_functions))
@@ -308,10 +323,16 @@ typedef __char32_t char32_t;
#define _LIBCPP_HAS_NO_CONSTEXPR
#endif
+#if !(__has_feature(cxx_relaxed_constexpr))
+#define _LIBCPP_HAS_NO_CXX14_CONSTEXPR
+#endif
+
#if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L
#if defined(__FreeBSD__)
#define _LIBCPP_HAS_QUICK_EXIT
#define _LIBCPP_HAS_C11_FEATURES
+#elif defined(__ANDROID__)
+#define _LIBCPP_HAS_QUICK_EXIT
#elif defined(__linux__)
#include <features.h>
#if __GLIBC_PREREQ(2, 15)
@@ -326,13 +347,19 @@ typedef __char32_t char32_t;
#if (__has_feature(cxx_noexcept))
# define _NOEXCEPT noexcept
# define _NOEXCEPT_(x) noexcept(x)
+# define _NOEXCEPT_OR_FALSE(x) noexcept(x)
#else
# define _NOEXCEPT throw()
# define _NOEXCEPT_(x)
+# define _NOEXCEPT_OR_FALSE(x) false
#endif
#if __has_feature(underlying_type)
-# define _LIBCXX_UNDERLYING_TYPE(T) __underlying_type(T)
+# define _LIBCPP_UNDERLYING_TYPE(T) __underlying_type(T)
+#endif
+
+#if __has_feature(is_literal)
+# define _LIBCPP_IS_LITERAL(T) __is_literal(T)
#endif
// Inline namespaces are available in Clang regardless of C++ dialect.
@@ -345,6 +372,10 @@ namespace std {
}
}
+#if !defined(_LIBCPP_HAS_NO_ASAN) && !__has_feature(address_sanitizer)
+#define _LIBCPP_HAS_NO_ASAN
+#endif
+
#elif defined(__GNUC__)
#define _ALIGNAS(x) __attribute__((__aligned__(x)))
@@ -352,15 +383,33 @@ namespace std {
#define _LIBCPP_NORETURN __attribute__((noreturn))
+#define _LIBCPP_UNUSED __attribute__((__unused__))
+
+#if _GNUC_VER >= 407
+#define _LIBCPP_UNDERLYING_TYPE(T) __underlying_type(T)
+#define _LIBCPP_IS_LITERAL(T) __is_literal_type(T)
+#endif
+
#if !__EXCEPTIONS
#define _LIBCPP_NO_EXCEPTIONS
#endif
#define _LIBCPP_HAS_NO_TEMPLATE_ALIASES
+
+// constexpr was added to GCC in 4.6.
+#if _GNUC_VER < 406
+#define _LIBCPP_HAS_NO_CONSTEXPR
+// Can only use constexpr in c++11 mode.
+#elif !defined(__GXX_EXPERIMENTAL_CXX0X__) && __cplusplus < 201103L
#define _LIBCPP_HAS_NO_CONSTEXPR
+#endif
+
+// No version of GCC supports relaxed constexpr rules
+#define _LIBCPP_HAS_NO_CXX14_CONSTEXPR
#define _NOEXCEPT throw()
#define _NOEXCEPT_(x)
+#define _NOEXCEPT_OR_FALSE(x) false
#ifndef __GXX_EXPERIMENTAL_CXX0X__
@@ -390,9 +439,7 @@ namespace std {
#endif
#if _GNUC_VER < 404
-#define _LIBCPP_HAS_NO_ADVANCED_SFINAE
#define _LIBCPP_HAS_NO_DECLTYPE
-#define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
#define _LIBCPP_HAS_NO_DELETED_FUNCTIONS
#define _LIBCPP_HAS_NO_UNICODE_CHARS
#define _LIBCPP_HAS_NO_VARIADICS
@@ -403,6 +450,11 @@ namespace std {
#define _LIBCPP_HAS_NO_NULLPTR
#endif
+#if _GNUC_VER < 407
+#define _LIBCPP_HAS_NO_ADVANCED_SFINAE
+#define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
+#endif
+
#endif // __GXX_EXPERIMENTAL_CXX0X__
#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std { namespace _LIBCPP_NAMESPACE {
@@ -415,21 +467,28 @@ namespace _LIBCPP_NAMESPACE {
using namespace _LIBCPP_NAMESPACE __attribute__((__strong__));
}
+#if !defined(_LIBCPP_HAS_NO_ASAN) && !defined(__SANITIZE_ADDRESS__)
+#define _LIBCPP_HAS_NO_ASAN
+#endif
+
#elif defined(_LIBCPP_MSVC)
#define _LIBCPP_HAS_NO_TEMPLATE_ALIASES
#define _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
#define _LIBCPP_HAS_NO_CONSTEXPR
+#define _LIBCPP_HAS_NO_CXX14_CONSTEXPR
#define _LIBCPP_HAS_NO_UNICODE_CHARS
#define _LIBCPP_HAS_NO_DELETED_FUNCTIONS
#define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
#define __alignof__ __alignof
#define _LIBCPP_NORETURN __declspec(noreturn)
+#define _LIBCPP_UNUSED
#define _ALIGNAS(x) __declspec(align(x))
#define _LIBCPP_HAS_NO_VARIADICS
-#define _NOEXCEPT throw()
+#define _NOEXCEPT throw ()
#define _NOEXCEPT_(x)
+#define _NOEXCEPT_OR_FALSE(x) false
#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {
#define _LIBCPP_END_NAMESPACE_STD }
@@ -439,15 +498,19 @@ using namespace _LIBCPP_NAMESPACE __attr
namespace std {
}
+#define _LIBCPP_HAS_NO_ASAN
+
#elif defined(__IBMCPP__)
#define _ALIGNAS(x) __attribute__((__aligned__(x)))
#define _ALIGNAS_TYPE(x) __attribute__((__aligned__(__alignof(x))))
#define _ATTRIBUTE(x) __attribute__((x))
#define _LIBCPP_NORETURN __attribute__((noreturn))
+#define _LIBCPP_UNUSED
#define _NOEXCEPT throw()
#define _NOEXCEPT_(x)
+#define _NOEXCEPT_OR_FALSE(x) false
#define _LIBCPP_HAS_NO_TEMPLATE_ALIASES
#define _LIBCPP_HAS_NO_ADVANCED_SFINAE
@@ -455,7 +518,6 @@ namespace std {
#define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#define _LIBCPP_HAS_NO_NULLPTR
#define _LIBCPP_HAS_NO_UNICODE_CHARS
-#define _LIBCPP_HAS_NO_STRONG_ENUMS
#define _LIBCPP_HAS_IS_BASE_OF
#if defined(_AIX)
@@ -471,13 +533,19 @@ namespace std {
}
}
-#endif // __clang__ || __GNUC___ || _MSC_VER || __IBMCPP__
+#define _LIBCPP_HAS_NO_ASAN
+
+#endif // __clang__ || __GNUC__ || _MSC_VER || __IBMCPP__
#ifdef _LIBCPP_HAS_NO_UNICODE_CHARS
typedef unsigned short char16_t;
typedef unsigned int char32_t;
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
+#ifndef __SIZEOF_INT128__
+#define _LIBCPP_HAS_NO_INT128
+#endif
+
#ifdef _LIBCPP_HAS_NO_STATIC_ASSERT
template <bool> struct __static_assert_test;
@@ -515,12 +583,20 @@ template <unsigned> struct __static_asse
#define __has_feature(__x) 0
#endif
-#if __has_feature(cxx_explicit_conversions)
+#ifndef __has_builtin
+#define __has_builtin(__x) 0
+#endif
+
+#if __has_feature(cxx_explicit_conversions) || defined(__IBMCPP__)
# define _LIBCPP_EXPLICIT explicit
#else
# define _LIBCPP_EXPLICIT
#endif
+#if !__has_builtin(__builtin_operator_new) || !__has_builtin(__builtin_operator_delete)
+# define _LIBCPP_HAS_NO_BUILTIN_OPERATOR_NEW_DELETE
+#endif
+
#ifdef _LIBCPP_HAS_NO_STRONG_ENUMS
#define _LIBCPP_DECLARE_STRONG_ENUM(x) struct _LIBCPP_TYPE_VIS x { enum __lx
#define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) \
@@ -546,16 +622,21 @@ template <unsigned> struct __static_asse
#endif
#ifndef _LIBCPP_EXTERN_TEMPLATE
-#define _LIBCPP_EXTERN_TEMPLATE(...)
+#define _LIBCPP_EXTERN_TEMPLATE(...) extern template __VA_ARGS__;
#endif
#ifndef _LIBCPP_EXTERN_TEMPLATE2
#define _LIBCPP_EXTERN_TEMPLATE2(...) extern template __VA_ARGS__;
#endif
+#if defined(__APPLE__) && defined(__LP64__) && !defined(__x86_64__)
+#define _LIBCPP_NONUNIQUE_RTTI_BIT (1ULL << 63)
+#endif
+
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(_WIN32) || defined(__sun__) || defined(__NetBSD__)
#define _LIBCPP_LOCALE__L_EXTENSIONS 1
#endif
+
#ifdef __FreeBSD__
#define _DECLARE_C99_LDBL_MATH 1
#endif
@@ -568,21 +649,39 @@ template <unsigned> struct __static_asse
#define _LIBCPP_WCTYPE_IS_MASK
#endif
-#if defined(__APPLE__) || defined(__FreeBSD__)
-#ifndef _LIBCPP_TRIVIAL_PAIR_COPY_CTOR
-# define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 0
-#endif
+#if defined(ELAST)
+#define _LIBCPP_ELAST ELAST
+#elif defined(__linux__)
+#define _LIBCPP_ELAST 4095
+#elif defined(_NEWLIB_VERSION)
+#define _LIBCPP_ELAST __ELASTERROR
+#elif defined(__APPLE__)
+// Not _LIBCPP_ELAST needed on Apple
+#elif defined(__sun__)
+#define _LIBCPP_ELAST ESTALE
+#else
+// Warn here so that the person doing the libcxx port has an easier time:
+#warning This platform's ELAST hasn't been ported yet
#endif
#ifndef _LIBCPP_TRIVIAL_PAIR_COPY_CTOR
-# define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 1
+# if defined(__FreeBSD__)
+// Making the std::pair copy constructor trivial breaks ABI compatibility with
+// earlier versions of libc++ shipped by FreeBSD, so turn it off by default.
+// See also http://svnweb.freebsd.org/changeset/base/261801
+# define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 0
+# else
+# define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 1
+# endif
#endif
#ifndef _LIBCPP_STD_VER
# if __cplusplus <= 201103L
# define _LIBCPP_STD_VER 11
+# elif __cplusplus <= 201402L
+# define _LIBCPP_STD_VER 14
# else
-# define _LIBCPP_STD_VER 13 // current year, or date of c++14 ratification
+# define _LIBCPP_STD_VER 15 // current year, or date of c++17 ratification
# endif
#endif // _LIBCPP_STD_VER
@@ -593,21 +692,30 @@ template <unsigned> struct __static_asse
#endif
#if _LIBCPP_STD_VER <= 11
-#define _LIBCPP_CONSTEXPR_AFTER_CXX11
#define _LIBCPP_EXPLICIT_AFTER_CXX11
#define _LIBCPP_DEPRECATED_AFTER_CXX11
#else
-#define _LIBCPP_CONSTEXPR_AFTER_CXX11 constexpr
#define _LIBCPP_EXPLICIT_AFTER_CXX11 explicit
#define _LIBCPP_DEPRECATED_AFTER_CXX11 [[deprecated]]
#endif
+#if _LIBCPP_STD_VER > 11 && !defined(_LIBCPP_HAS_NO_CXX14_CONSTEXPR)
+#define _LIBCPP_CONSTEXPR_AFTER_CXX11 constexpr
+#else
+#define _LIBCPP_CONSTEXPR_AFTER_CXX11
+#endif
+
+#ifndef _LIBCPP_HAS_NO_ASAN
+extern "C" void __sanitizer_annotate_contiguous_container(
+ const void *, const void *, const void *, const void *);
+#endif
+
// Try to find out if RTTI is disabled.
// g++ and cl.exe have RTTI on by default and define a macro when it is.
// g++ only defines the macro in 4.3.2 and onwards.
#if !defined(_LIBCPP_NO_RTTI)
-# if defined(__GNUG__) && (__GNUC__ >= 4 && \
- (__GNUC_MINOR__ >= 3 || __GNUC_PATCHLEVEL__ >= 2)) && !defined(__GXX_RTTI)
+# if defined(__GNUG__) && ((__GNUC__ >= 5) || (__GNUC__ == 4 && \
+ (__GNUC_MINOR__ >= 3 || __GNUC_PATCHLEVEL__ >= 2))) && !defined(__GXX_RTTI)
# define _LIBCPP_NO_RTTI
# elif (defined(_MSC_VER) && !defined(__clang__)) && !defined(_CPPRTTI)
# define _LIBCPP_NO_RTTI
@@ -618,4 +726,9 @@ template <unsigned> struct __static_asse
# define _LIBCPP_WEAK __attribute__((__weak__))
#endif
+#if defined(_LIBCPP_HAS_NO_MONOTONIC_CLOCK) && !defined(_LIBCPP_HAS_NO_THREADS)
+# error _LIBCPP_HAS_NO_MONOTONIC_CLOCK may only be defined when \
+ _LIBCPP_HAS_NO_THREADS is defined.
+#endif
+
#endif // _LIBCPP_CONFIG
Modified: projects/ifnet/contrib/libc++/include/__debug
==============================================================================
--- projects/ifnet/contrib/libc++/include/__debug Fri Jan 16 11:45:54 2015 (r277243)
+++ projects/ifnet/contrib/libc++/include/__debug Fri Jan 16 11:51:47 2015 (r277244)
@@ -11,19 +11,23 @@
#ifndef _LIBCPP_DEBUG_H
#define _LIBCPP_DEBUG_H
+#include <__config>
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
#if _LIBCPP_DEBUG_LEVEL >= 1
-
# include <cstdlib>
# include <cstdio>
# include <cstddef>
# ifndef _LIBCPP_ASSERT
# define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : (_VSTD::printf("%s\n", m), _VSTD::abort()))
# endif
+#endif
+#ifndef _LIBCPP_ASSERT
+# define _LIBCPP_ASSERT(x, m) ((void)0)
#endif
#if _LIBCPP_DEBUG_LEVEL >= 2
Modified: projects/ifnet/contrib/libc++/include/__functional_03
==============================================================================
--- projects/ifnet/contrib/libc++/include/__functional_03 Fri Jan 16 11:45:54 2015 (r277243)
+++ projects/ifnet/contrib/libc++/include/__functional_03 Fri Jan 16 11:51:47 2015 (r277244)
@@ -651,9 +651,14 @@ class _LIBCPP_TYPE_VIS_ONLY function<_Rp
__base* __f_;
template <class _Fp>
+ _LIBCPP_INLINE_VISIBILITY
static bool __not_null(const _Fp&) {return true;}
template <class _R2>
- static bool __not_null(const function<_Rp()>& __p) {return __p;}
+ _LIBCPP_INLINE_VISIBILITY
+ static bool __not_null(_R2 (*__p)()) {return __p;}
+ template <class _R2>
+ _LIBCPP_INLINE_VISIBILITY
+ static bool __not_null(const function<_R2()>& __p) {return __p;}
public:
typedef _Rp result_type;
@@ -955,7 +960,7 @@ class _LIBCPP_TYPE_VIS_ONLY function<_Rp
static bool __not_null(_R2 (_Cp::*__p)() const volatile) {return __p;}
template <class _R2, class _B0>
_LIBCPP_INLINE_VISIBILITY
- static bool __not_null(const function<_Rp(_B0)>& __p) {return __p;}
+ static bool __not_null(const function<_R2(_B0)>& __p) {return __p;}
public:
typedef _Rp result_type;
@@ -1257,7 +1262,7 @@ class _LIBCPP_TYPE_VIS_ONLY function<_Rp
static bool __not_null(_R2 (_Cp::*__p)(_B1) const volatile) {return __p;}
template <class _R2, class _B0, class _B1>
_LIBCPP_INLINE_VISIBILITY
- static bool __not_null(const function<_Rp(_B0, _B1)>& __p) {return __p;}
+ static bool __not_null(const function<_R2(_B0, _B1)>& __p) {return __p;}
public:
typedef _Rp result_type;
@@ -1558,7 +1563,7 @@ class _LIBCPP_TYPE_VIS_ONLY function<_Rp
static bool __not_null(_R2 (_Cp::*__p)(_B1, _B2) const volatile) {return __p;}
template <class _R2, class _B0, class _B1, class _B2>
_LIBCPP_INLINE_VISIBILITY
- static bool __not_null(const function<_Rp(_B0, _B1, _B2)>& __p) {return __p;}
+ static bool __not_null(const function<_R2(_B0, _B1, _B2)>& __p) {return __p;}
public:
typedef _Rp result_type;
@@ -1911,7 +1916,7 @@ inline _LIBCPP_INLINE_VISIBILITY
typename __mu_return1<true, _Ti, _Uj...>::type
__mu_expand(_Ti& __ti, tuple<_Uj...>&& __uj, __tuple_indices<_Indx...>)
{
- __ti(_VSTD::forward<typename tuple_element<_Indx, _Uj>::type>(get<_Indx>(__uj))...);
+ __ti(_VSTD::forward<typename tuple_element<_Indx, _Uj>::type>(_VSTD::get<_Indx>(__uj))...);
}
template <class _Ti, class ..._Uj>
@@ -1947,9 +1952,9 @@ __mu(_Ti&, _Uj& __uj)
{
const size_t _Indx = is_placeholder<_Ti>::value - 1;
// compiler bug workaround
- typename tuple_element<_Indx, _Uj>::type __t = get<_Indx>(__uj);
+ typename tuple_element<_Indx, _Uj>::type __t = _VSTD::get<_Indx>(__uj);
return __t;
-// return _VSTD::forward<typename tuple_element<_Indx, _Uj>::type>(get<_Indx>(__uj));
+// return _VSTD::forward<typename tuple_element<_Indx, _Uj>::type>(_VSTD::get<_Indx>(__uj));
}
template <class _Ti, class _Uj>
@@ -2040,7 +2045,7 @@ typename __bind_return<_Fp, _BoundArgs,
__apply_functor(_Fp& __f, _BoundArgs& __bound_args, __tuple_indices<_Indx...>,
_Args&& __args)
{
- return __invoke(__f, __mu(get<_Indx>(__bound_args), __args)...);
+ return __invoke(__f, __mu(_VSTD::get<_Indx>(__bound_args), __args)...);
}
template<class _Fp, class ..._BoundArgs>
Modified: projects/ifnet/contrib/libc++/include/__functional_base
==============================================================================
--- projects/ifnet/contrib/libc++/include/__functional_base Fri Jan 16 11:45:54 2015 (r277243)
+++ projects/ifnet/contrib/libc++/include/__functional_base Fri Jan 16 11:51:47 2015 (r277244)
@@ -451,10 +451,10 @@ public:
}
};
-template <class _Tp> struct ____is_reference_wrapper : public false_type {};
-template <class _Tp> struct ____is_reference_wrapper<reference_wrapper<_Tp> > : public true_type {};
+template <class _Tp> struct __is_reference_wrapper_impl : public false_type {};
+template <class _Tp> struct __is_reference_wrapper_impl<reference_wrapper<_Tp> > : public true_type {};
template <class _Tp> struct __is_reference_wrapper
- : public ____is_reference_wrapper<typename remove_cv<_Tp>::type> {};
+ : public __is_reference_wrapper_impl<typename remove_cv<_Tp>::type> {};
template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
Modified: projects/ifnet/contrib/libc++/include/__functional_base_03
==============================================================================
--- projects/ifnet/contrib/libc++/include/__functional_base_03 Fri Jan 16 11:45:54 2015 (r277243)
+++ projects/ifnet/contrib/libc++/include/__functional_base_03 Fri Jan 16 11:51:47 2015 (r277244)
@@ -1027,7 +1027,7 @@ public:
typename __invoke_return0<type&, _A0>::type
operator() (_A0& __a0) const
{
- return __invoke(get(), __a0);
+ return __invoke<type&, _A0>(get(), __a0);
}
template <class _A0, class _A1>
@@ -1035,7 +1035,7 @@ public:
typename __invoke_return1<type&, _A0, _A1>::type
operator() (_A0& __a0, _A1& __a1) const
{
- return __invoke(get(), __a0, __a1);
+ return __invoke<type&, _A0, _A1>(get(), __a0, __a1);
}
template <class _A0, class _A1, class _A2>
@@ -1043,14 +1043,14 @@ public:
typename __invoke_return2<type&, _A0, _A1, _A2>::type
operator() (_A0& __a0, _A1& __a1, _A2& __a2) const
{
- return __invoke(get(), __a0, __a1, __a2);
+ return __invoke<type&, _A0, _A1, _A2>(get(), __a0, __a1, __a2);
}
};
-template <class _Tp> struct ____is_reference_wrapper : public false_type {};
-template <class _Tp> struct ____is_reference_wrapper<reference_wrapper<_Tp> > : public true_type {};
+template <class _Tp> struct __is_reference_wrapper_impl : public false_type {};
+template <class _Tp> struct __is_reference_wrapper_impl<reference_wrapper<_Tp> > : public true_type {};
template <class _Tp> struct __is_reference_wrapper
- : public ____is_reference_wrapper<typename remove_cv<_Tp>::type> {};
+ : public __is_reference_wrapper_impl<typename remove_cv<_Tp>::type> {};
template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
Modified: projects/ifnet/contrib/libc++/include/__hash_table
==============================================================================
--- projects/ifnet/contrib/libc++/include/__hash_table Fri Jan 16 11:45:54 2015 (r277243)
+++ projects/ifnet/contrib/libc++/include/__hash_table Fri Jan 16 11:51:47 2015 (r277244)
@@ -20,11 +20,7 @@
#include <__undef_min_max>
-#ifdef _LIBCPP_DEBUG
-# include <__debug>
-#else
-# define _LIBCPP_ASSERT(x, m) ((void)0)
-#endif
+#include <__debug>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
Modified: projects/ifnet/contrib/libc++/include/__locale
==============================================================================
--- projects/ifnet/contrib/libc++/include/__locale Fri Jan 16 11:45:54 2015 (r277243)
+++ projects/ifnet/contrib/libc++/include/__locale Fri Jan 16 11:51:47 2015 (r277244)
@@ -21,11 +21,22 @@
#include <locale.h>
#if defined(_LIBCPP_MSVCRT) || defined(__MINGW32__)
# include <support/win32/locale_win32.h>
-#elif _AIX
+#elif defined(_AIX)
# include <support/ibm/xlocale.h>
-#elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun__)) || defined(__EMSCRIPTEN__) || defined(__IBMCPP__)
+#elif defined(__ANDROID__)
+// Android gained the locale aware functions in L (API level 21)
+# include <android/api-level.h>
+# if __ANDROID_API__ <= 20
+# include <support/android/locale_bionic.h>
+# endif
+#elif defined(__sun__)
+# include <support/solaris/xlocale.h>
+#elif defined(_NEWLIB_VERSION)
+# include <support/newlib/xlocale.h>
+#elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) \
+ || defined(__EMSCRIPTEN__) || defined(__IBMCPP__))
# include <xlocale.h>
-#endif // _WIN32 || __GLIBC__ || __APPLE__ || __FreeBSD__ || __sun__ || __EMSCRIPTEN__ || __IBMCPP__
+#endif // __GLIBC__ || __APPLE__ || __FreeBSD__ || __sun__ || __EMSCRIPTEN__ || __IBMCPP__
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
@@ -341,13 +352,15 @@ public:
static const mask punct = _PUNCT;
static const mask xdigit = _HEX;
static const mask blank = _BLANK;
-#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__)
+#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__) || defined(__ANDROID__)
#ifdef __APPLE__
typedef __uint32_t mask;
#elif defined(__FreeBSD__)
typedef unsigned long mask;
#elif defined(__EMSCRIPTEN__) || defined(__NetBSD__)
typedef unsigned short mask;
+#elif defined(__ANDROID__)
+ typedef unsigned char mask;
#endif
static const mask space = _CTYPE_S;
static const mask print = _CTYPE_R;
@@ -357,7 +370,12 @@ public:
static const mask alpha = _CTYPE_A;
static const mask digit = _CTYPE_D;
static const mask punct = _CTYPE_P;
+# if defined(__ANDROID__)
+ static const mask xdigit = _CTYPE_X | _CTYPE_D;
+# else
static const mask xdigit = _CTYPE_X;
+# endif
+
# if defined(__NetBSD__)
static const mask blank = _CTYPE_BL;
# else
Modified: projects/ifnet/contrib/libc++/include/__mutex_base
==============================================================================
--- projects/ifnet/contrib/libc++/include/__mutex_base Fri Jan 16 11:45:54 2015 (r277243)
+++ projects/ifnet/contrib/libc++/include/__mutex_base Fri Jan 16 11:51:47 2015 (r277244)
@@ -22,6 +22,8 @@
_LIBCPP_BEGIN_NAMESPACE_STD
+#ifndef _LIBCPP_HAS_NO_THREADS
+
class _LIBCPP_TYPE_VIS mutex
{
pthread_mutex_t __m_;
@@ -254,19 +256,13 @@ void
swap(unique_lock<_Mutex>& __x, unique_lock<_Mutex>& __y) _NOEXCEPT
{__x.swap(__y);}
-struct _LIBCPP_TYPE_VIS cv_status
+//enum class cv_status
+_LIBCPP_DECLARE_STRONG_ENUM(cv_status)
{
- enum __lx {
- no_timeout,
- timeout
- };
-
- __lx __v_;
-
- _LIBCPP_INLINE_VISIBILITY cv_status(__lx __v) : __v_(__v) {}
- _LIBCPP_INLINE_VISIBILITY operator int() const {return __v_;}
-
+ no_timeout,
+ timeout
};
+_LIBCPP_DECLARE_STRONG_ENUM_EPILOG(cv_status)
class _LIBCPP_TYPE_VIS condition_variable
{
@@ -288,7 +284,7 @@ public:
void notify_one() _NOEXCEPT;
void notify_all() _NOEXCEPT;
- void wait(unique_lock<mutex>& __lk);
+ void wait(unique_lock<mutex>& __lk) _NOEXCEPT;
template <class _Predicate>
void wait(unique_lock<mutex>& __lk, _Predicate __pred);
@@ -319,8 +315,9 @@ public:
private:
void __do_timed_wait(unique_lock<mutex>& __lk,
- chrono::time_point<chrono::system_clock, chrono::nanoseconds>);
+ chrono::time_point<chrono::system_clock, chrono::nanoseconds>) _NOEXCEPT;
};
+#endif // !_LIBCPP_HAS_NO_THREADS
template <class _To, class _Rep, class _Period>
inline _LIBCPP_INLINE_VISIBILITY
@@ -338,6 +335,7 @@ __ceil(chrono::duration<_Rep, _Period> _
return __r;
}
+#ifndef _LIBCPP_HAS_NO_THREADS
template <class _Predicate>
void
condition_variable::wait(unique_lock<mutex>& __lk, _Predicate __pred)
@@ -402,6 +400,8 @@ condition_variable::wait_for(unique_lock
_VSTD::move(__pred));
}
+#endif // !_LIBCPP_HAS_NO_THREADS
+
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP___MUTEX_BASE
Copied: projects/ifnet/contrib/libc++/include/__refstring (from r277243, head/contrib/libc++/include/__refstring)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/ifnet/contrib/libc++/include/__refstring Fri Jan 16 11:51:47 2015 (r277244, copy of r277243, head/contrib/libc++/include/__refstring)
@@ -0,0 +1,139 @@
+//===------------------------ __refstring ---------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___REFSTRING
+#define _LIBCPP___REFSTRING
+
+#include <__config>
+#include <cstddef>
+#include <cstring>
+#if __APPLE__
+#include <dlfcn.h>
+#include <mach-o/dyld.h>
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+class _LIBCPP_HIDDEN __libcpp_refstring
+{
+private:
+ const char* str_;
+
+ typedef int count_t;
+
+ struct _Rep_base
+ {
+ std::size_t len;
+ std::size_t cap;
+ count_t count;
+ };
+
+ static
+ _Rep_base*
+ rep_from_data(const char *data_) _NOEXCEPT
+ {
+ char *data = const_cast<char *>(data_);
+ return reinterpret_cast<_Rep_base *>(data - sizeof(_Rep_base));
+ }
+ static
+ char *
+ data_from_rep(_Rep_base *rep) _NOEXCEPT
+ {
+ char *data = reinterpret_cast<char *>(rep);
+ return data + sizeof(*rep);
+ }
+
+#if __APPLE__
+ static
+ const char*
+ compute_gcc_empty_string_storage() _NOEXCEPT
+ {
+ void* handle = dlopen("/usr/lib/libstdc++.6.dylib", RTLD_NOLOAD);
+ if (handle == nullptr)
+ return nullptr;
+ void* sym = dlsym(handle, "_ZNSs4_Rep20_S_empty_rep_storageE");
+ if (sym == nullptr)
+ return nullptr;
+ return data_from_rep(reinterpret_cast<_Rep_base *>(sym));
+ }
+
+ static
+ const char*
+ get_gcc_empty_string_storage() _NOEXCEPT
+ {
+ static const char* p = compute_gcc_empty_string_storage();
+ return p;
+ }
+
+ bool
+ uses_refcount() const
+ {
+ return str_ != get_gcc_empty_string_storage();
+ }
+#else
+ bool
+ uses_refcount() const
+ {
+ return true;
+ }
+#endif
+
+public:
+ explicit __libcpp_refstring(const char* msg) {
+ std::size_t len = strlen(msg);
+ _Rep_base* rep = static_cast<_Rep_base *>(::operator new(sizeof(*rep) + len + 1));
+ rep->len = len;
+ rep->cap = len;
+ rep->count = 0;
+ char *data = data_from_rep(rep);
+ std::memcpy(data, msg, len + 1);
+ str_ = data;
+ }
+
+ __libcpp_refstring(const __libcpp_refstring& s) _NOEXCEPT : str_(s.str_)
+ {
+ if (uses_refcount())
+ __sync_add_and_fetch(&rep_from_data(str_)->count, 1);
+ }
+
+ __libcpp_refstring& operator=(const __libcpp_refstring& s) _NOEXCEPT
+ {
+ bool adjust_old_count = uses_refcount();
+ struct _Rep_base *old_rep = rep_from_data(str_);
+ str_ = s.str_;
+ if (uses_refcount())
+ __sync_add_and_fetch(&rep_from_data(str_)->count, 1);
+ if (adjust_old_count)
+ {
+ if (__sync_add_and_fetch(&old_rep->count, count_t(-1)) < 0)
+ {
+ ::operator delete(old_rep);
+ }
+ }
+ return *this;
+ }
+
+ ~__libcpp_refstring()
+ {
+ if (uses_refcount())
+ {
+ _Rep_base* rep = rep_from_data(str_);
+ if (__sync_add_and_fetch(&rep->count, count_t(-1)) < 0)
+ {
+ ::operator delete(rep);
+ }
+ }
+ }
+
+ const char* c_str() const _NOEXCEPT {return str_;}
+};
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif //_LIBCPP___REFSTRING
Modified: projects/ifnet/contrib/libc++/include/__sso_allocator
==============================================================================
--- projects/ifnet/contrib/libc++/include/__sso_allocator Fri Jan 16 11:45:54 2015 (r277243)
+++ projects/ifnet/contrib/libc++/include/__sso_allocator Fri Jan 16 11:51:47 2015 (r277244)
@@ -55,14 +55,14 @@ public:
__allocated_ = true;
return (pointer)&buf_;
}
- return static_cast<pointer>(::operator new(__n * sizeof(_Tp)));
+ return static_cast<pointer>(_VSTD::__allocate(__n * sizeof(_Tp)));
}
_LIBCPP_INLINE_VISIBILITY void deallocate(pointer __p, size_type)
{
if (__p == (pointer)&buf_)
__allocated_ = false;
else
- ::operator delete(__p);
+ _VSTD::__deallocate(__p);
}
_LIBCPP_INLINE_VISIBILITY size_type max_size() const throw() {return size_type(~0) / sizeof(_Tp);}
Modified: projects/ifnet/contrib/libc++/include/__tree
==============================================================================
--- projects/ifnet/contrib/libc++/include/__tree Fri Jan 16 11:45:54 2015 (r277243)
+++ projects/ifnet/contrib/libc++/include/__tree Fri Jan 16 11:51:47 2015 (r277244)
@@ -1980,9 +1980,9 @@ __tree<_Tp, _Compare, _Allocator>::erase
__begin_node() = __r.__ptr_;
--size();
__node_allocator& __na = __node_alloc();
- __node_traits::destroy(__na, const_cast<value_type*>(_VSTD::addressof(*__p)));
__tree_remove(__end_node()->__left_,
static_cast<__node_base_pointer>(__np));
+ __node_traits::destroy(__na, const_cast<value_type*>(_VSTD::addressof(*__p)));
__node_traits::deallocate(__na, __np, 1);
return __r;
}
Modified: projects/ifnet/contrib/libc++/include/__tuple
==============================================================================
--- projects/ifnet/contrib/libc++/include/__tuple Fri Jan 16 11:45:54 2015 (r277243)
+++ projects/ifnet/contrib/libc++/include/__tuple Fri Jan 16 11:51:47 2015 (r277244)
@@ -27,6 +27,32 @@
_LIBCPP_BEGIN_NAMESPACE_STD
+// __lazy_and
+
+template <bool _Last, class ..._Preds>
+struct __lazy_and_impl;
+
+template <class ..._Preds>
+struct __lazy_and_impl<false, _Preds...> : false_type {};
+
+template <>
+struct __lazy_and_impl<true> : true_type {};
+
+template <class _Pred>
+struct __lazy_and_impl<true, _Pred> : integral_constant<bool, _Pred::type::value> {};
+
+template <class _Hp, class ..._Tp>
+struct __lazy_and_impl<true, _Hp, _Tp...> : __lazy_and_impl<_Hp::type::value, _Tp...> {};
+
+template <class _P1, class ..._Pr>
+struct __lazy_and : __lazy_and_impl<_P1::type::value, _Pr...> {};
+
+// __lazy_not
+
+template <class _Pred>
+struct __lazy_not : integral_constant<bool, !_Pred::type::value> {};
+
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list