Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 May 2013 16:38:29 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r250514 - in stable/9/contrib/libc++: . include include/ext src
Message-ID:  <201305111638.r4BGcTs3067082@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Sat May 11 16:38:29 2013
New Revision: 250514
URL: http://svnweb.freebsd.org/changeset/base/250514

Log:
  MFC r246487 (by theraven):
  
    Import new libc++ to head.  Various small fixes and cleanups.
  
  MFC r249998:
  
    Merge libc++ trunk r180598.  Contains several minor cleanups and bug
    fixes, no major changes.

Modified:
  stable/9/contrib/libc++/CREDITS.TXT
  stable/9/contrib/libc++/LICENSE.TXT
  stable/9/contrib/libc++/include/__bit_reference
  stable/9/contrib/libc++/include/__config
  stable/9/contrib/libc++/include/__debug
  stable/9/contrib/libc++/include/__functional_03
  stable/9/contrib/libc++/include/__functional_base
  stable/9/contrib/libc++/include/__functional_base_03
  stable/9/contrib/libc++/include/__hash_table
  stable/9/contrib/libc++/include/__locale
  stable/9/contrib/libc++/include/__mutex_base
  stable/9/contrib/libc++/include/__std_stream
  stable/9/contrib/libc++/include/__tree
  stable/9/contrib/libc++/include/__tuple
  stable/9/contrib/libc++/include/__tuple_03
  stable/9/contrib/libc++/include/algorithm
  stable/9/contrib/libc++/include/array
  stable/9/contrib/libc++/include/atomic
  stable/9/contrib/libc++/include/bitset
  stable/9/contrib/libc++/include/chrono
  stable/9/contrib/libc++/include/cmath
  stable/9/contrib/libc++/include/codecvt
  stable/9/contrib/libc++/include/complex
  stable/9/contrib/libc++/include/condition_variable
  stable/9/contrib/libc++/include/cstddef
  stable/9/contrib/libc++/include/cstring
  stable/9/contrib/libc++/include/cwchar
  stable/9/contrib/libc++/include/deque
  stable/9/contrib/libc++/include/exception
  stable/9/contrib/libc++/include/ext/__hash
  stable/9/contrib/libc++/include/ext/hash_map
  stable/9/contrib/libc++/include/ext/hash_set
  stable/9/contrib/libc++/include/forward_list
  stable/9/contrib/libc++/include/fstream
  stable/9/contrib/libc++/include/functional
  stable/9/contrib/libc++/include/future
  stable/9/contrib/libc++/include/initializer_list
  stable/9/contrib/libc++/include/ios
  stable/9/contrib/libc++/include/iosfwd
  stable/9/contrib/libc++/include/iostream
  stable/9/contrib/libc++/include/istream
  stable/9/contrib/libc++/include/iterator
  stable/9/contrib/libc++/include/limits
  stable/9/contrib/libc++/include/list
  stable/9/contrib/libc++/include/locale
  stable/9/contrib/libc++/include/map
  stable/9/contrib/libc++/include/memory
  stable/9/contrib/libc++/include/mutex
  stable/9/contrib/libc++/include/new
  stable/9/contrib/libc++/include/ostream
  stable/9/contrib/libc++/include/queue
  stable/9/contrib/libc++/include/random
  stable/9/contrib/libc++/include/ratio
  stable/9/contrib/libc++/include/regex
  stable/9/contrib/libc++/include/scoped_allocator
  stable/9/contrib/libc++/include/set
  stable/9/contrib/libc++/include/sstream
  stable/9/contrib/libc++/include/stack
  stable/9/contrib/libc++/include/streambuf
  stable/9/contrib/libc++/include/string
  stable/9/contrib/libc++/include/strstream
  stable/9/contrib/libc++/include/system_error
  stable/9/contrib/libc++/include/thread
  stable/9/contrib/libc++/include/tuple
  stable/9/contrib/libc++/include/type_traits
  stable/9/contrib/libc++/include/typeindex
  stable/9/contrib/libc++/include/unordered_map
  stable/9/contrib/libc++/include/unordered_set
  stable/9/contrib/libc++/include/utility
  stable/9/contrib/libc++/include/valarray
  stable/9/contrib/libc++/include/vector
  stable/9/contrib/libc++/src/chrono.cpp
  stable/9/contrib/libc++/src/debug.cpp
  stable/9/contrib/libc++/src/exception.cpp
  stable/9/contrib/libc++/src/future.cpp
  stable/9/contrib/libc++/src/hash.cpp
  stable/9/contrib/libc++/src/iostream.cpp
  stable/9/contrib/libc++/src/locale.cpp
  stable/9/contrib/libc++/src/memory.cpp
  stable/9/contrib/libc++/src/new.cpp
  stable/9/contrib/libc++/src/stdexcept.cpp
  stable/9/contrib/libc++/src/string.cpp
  stable/9/contrib/libc++/src/strstream.cpp
  stable/9/contrib/libc++/src/system_error.cpp
  stable/9/contrib/libc++/src/thread.cpp
  stable/9/contrib/libc++/src/typeinfo.cpp
Directory Properties:
  stable/9/contrib/libc++/   (props changed)

Modified: stable/9/contrib/libc++/CREDITS.TXT
==============================================================================
--- stable/9/contrib/libc++/CREDITS.TXT	Sat May 11 16:31:41 2013	(r250513)
+++ stable/9/contrib/libc++/CREDITS.TXT	Sat May 11 16:38:29 2013	(r250514)
@@ -8,69 +8,88 @@ beautification by scripts.  The fields a
 (W), PGP key ID and fingerprint (P), description (D), and snail-mail address
 (S).
 
-N: Howard Hinnant
-E: hhinnant@apple.com
-D: Architect and primary author of libc++
+N: Saleem Abdulrasool
+E: compnerd@compnerd.org
+D: Minor patches and Linux fixes.
+
+N: Dimitry Andric
+E: dimitry@andric.com
+D: Visibility fixes, minor FreeBSD portability patches.
+
+N: Holger Arnold
+E: holgerar@gmail.com
+D: Minor fix.
+
+N: Ruben Van Boxem
+E: vanboxem dot ruben at gmail dot com
+D: Initial Windows patches.
+
+N: David Chisnall
+E: theraven at theravensnest dot org
+D: FreeBSD and Solaris ports, libcxxrt support, some atomics work.
 
 N: Marshall Clow
 E: mclow.lists@gmail.com
 E: marshall@idio.com
 D: Minor patches and bug fixes.
 
-N: Bjorn Reese
-E: breese@users.sourceforge.net
-D: Initial regex prototype
+N: Google Inc.
+D: Copyright owner and contributor of the CityHash algorithm
 
-N: David Chisnall
-E: theraven at theravensnest dot org
-D: FreeBSD and Solaris ports, libcxxrt support, some atomics work.
+N: Howard Hinnant
+E: hhinnant@apple.com
+D: Architect and primary author of libc++
 
-N: Ruben Van Boxem
-E: vanboxem dot ruben at gmail dot com
-D: Initial Windows patches.
+N: Hyeon-bin Jeong
+E: tuhertz@gmail.com
+D: Minor patches and bug fixes.
+
+N: Argyrios Kyrtzidis
+E: kyrtzidis@apple.com
+D: Bug fixes.
+
+N: Michel Morin
+E: mimomorin@gmail.com
+D: Minor patches to is_convertible.
+
+N: Andrew Morrow
+E: andrew.c.morrow@gmail.com
+D: Minor patches and Linux fixes.
 
 N: Arvid Picciani
 E: aep at exys dot org
 D: Minor patches and musl port.
 
-N: Craig Silverstein
-E: csilvers@google.com
-D: Implemented Cityhash as the string hash function on 64-bit machines
-
-N: Google Inc.
-D: Copyright owner and contributor of the CityHash algorithm
-
-N: Jeffrey Yasskin
-E: jyasskin@gmail.com
-E: jyasskin@google.com
-D: Linux fixes.
+N: Bjorn Reese
+E: breese@users.sourceforge.net
+D: Initial regex prototype
 
 N: Jonathan Sauer
 D: Minor patches, mostly related to constexpr
 
+N: Craig Silverstein
+E: csilvers@google.com
+D: Implemented Cityhash as the string hash function on 64-bit machines
+
 N: Richard Smith
 D: Minor patches.
 
-N: Andrew Morrow
-E: andrew.c.morrow@gmail.com
-D: Minor patches and Linux fixes.
+N: Michael van der Westhuizen
+E: r1mikey at gmail dot com
 
-N: Hyeon-bin Jeong
-E: tuhertz@gmail.com
-D: Minor patches and bug fixes.
+N: Klaas de Vries
+E: klaas at klaasgaaf dot nl
+D: Minor bug fix.
 
-N: Michel Morin
-E: mimomorin@gmail.com
-D: Minor patches to is_convertible.
-
-N: Dimitry Andric
-E: dimitry@andric.com
-D: Visibility fixes, minor FreeBSD portability patches.
+N: Zhang Xiongpang
+E: zhangxiongpang@gmail.com
+D: Minor patches and bug fixes.
 
-N: Holger Arnold
-E: holgerar@gmail.com
-D: Minor fix.
+N: Jeffrey Yasskin
+E: jyasskin@gmail.com
+E: jyasskin@google.com
+D: Linux fixes.
 
-N: Argyrios Kyrtzidis
-E: kyrtzidis@apple.com
-D: Bug fixes.
+N: Bruce Mitchener, Jr.
+E: bruce.mitchener@gmail.com
+D: Emscripten-related changes.

Modified: stable/9/contrib/libc++/LICENSE.TXT
==============================================================================
--- stable/9/contrib/libc++/LICENSE.TXT	Sat May 11 16:31:41 2013	(r250513)
+++ stable/9/contrib/libc++/LICENSE.TXT	Sat May 11 16:38:29 2013	(r250514)
@@ -14,7 +14,7 @@ Full text of the relevant licenses is in
 University of Illinois/NCSA
 Open Source License
 
-Copyright (c) 2009-2012 by the contributors listed in CREDITS.TXT
+Copyright (c) 2009-2013 by the contributors listed in CREDITS.TXT
 
 All rights reserved.
 
@@ -55,7 +55,7 @@ SOFTWARE.
 
 ==============================================================================
 
-Copyright (c) 2009-2012 by the contributors listed in CREDITS.TXT
+Copyright (c) 2009-2013 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: stable/9/contrib/libc++/include/__bit_reference
==============================================================================
--- stable/9/contrib/libc++/include/__bit_reference	Sat May 11 16:31:41 2013	(r250513)
+++ stable/9/contrib/libc++/include/__bit_reference	Sat May 11 16:38:29 2013	(r250514)
@@ -81,6 +81,16 @@ class __bit_reference<_Cp, false>
 {
 };
 
+template <class _Cp>
+_LIBCPP_INLINE_VISIBILITY inline
+void
+swap(__bit_reference<_Cp> __x, __bit_reference<_Cp> __y) _NOEXCEPT
+{
+    bool __t = __x;
+    __x = __y;
+    __y = __t;
+}
+
 template <class _Cp, class _Dp>
 _LIBCPP_INLINE_VISIBILITY inline
 void

Modified: stable/9/contrib/libc++/include/__config
==============================================================================
--- stable/9/contrib/libc++/include/__config	Sat May 11 16:31:41 2013	(r250513)
+++ stable/9/contrib/libc++/include/__config	Sat May 11 16:38:29 2013	(r250514)
@@ -11,7 +11,7 @@
 #ifndef _LIBCPP_CONFIG
 #define _LIBCPP_CONFIG
 
-#if !_MSC_VER // explicit macro necessary because it is only defined below in this file
+#ifndef _MSC_VER // explicit macro necessary because it is only defined below in this file
 #pragma GCC system_header
 #endif
 
@@ -66,6 +66,12 @@
 #  endif
 #endif  // _WIN32
 
+#ifdef __linux__
+#  if defined(__GNUC__) && _GNUC_VER >= 403
+#    define _LIBCP_HAS_IS_BASE_OF
+#  endif
+#endif
+
 #ifdef __sun__
 # include <sys/isa_defs.h>
 # ifdef _LITTLE_ENDIAN
@@ -90,24 +96,27 @@
 # endif
 #endif  // !defined(_LIBCPP_LITTLE_ENDIAN) || !defined(_LIBCPP_BIG_ENDIAN)
 
-#if _WIN32
+#ifdef _WIN32
 
 // only really useful for a DLL
 #ifdef _LIBCPP_DLL // this should be a compiler builtin define ideally...
 # ifdef cxx_EXPORTS
 #  define _LIBCPP_HIDDEN
-#  define _LIBCPP_VISIBLE __declspec(dllexport)
+#  define _LIBCPP_FUNC_VIS __declspec(dllexport)
+#  define _LIBCPP_TYPE_VIS __declspec(dllexport)
 # else
 #  define _LIBCPP_HIDDEN
-#  define _LIBCPP_VISIBLE __declspec(dllimport)
+#  define _LIBCPP_FUNC_VIS __declspec(dllimport)
+#  define _LIBCPP_TYPE_VIS __declspec(dllimport)
 # endif
 #else
 # define _LIBCPP_HIDDEN
-# define _LIBCPP_VISIBLE
+# define _LIBCPP_FUNC_VIS
+# define _LIBCPP_TYPE_VIS
 #endif
 
 #ifndef _LIBCPP_INLINE_VISIBILITY
-# if _MSC_VER
+# ifdef _MSC_VER
 #  define _LIBCPP_INLINE_VISIBILITY __forceinline
 # else // MinGW GCC and Clang
 #  define _LIBCPP_INLINE_VISIBILITY __attribute__ ((__always_inline__))
@@ -115,11 +124,11 @@
 #endif
 
 #ifndef _LIBCPP_EXCEPTION_ABI
-#define _LIBCPP_EXCEPTION_ABI _LIBCPP_VISIBLE
+#define _LIBCPP_EXCEPTION_ABI _LIBCPP_TYPE_VIS
 #endif
 
 #ifndef _LIBCPP_ALWAYS_INLINE
-# if _MSC_VER
+# ifdef _MSC_VER
 #  define _LIBCPP_ALWAYS_INLINE __forceinline
 # endif
 #endif
@@ -130,8 +139,16 @@
 #define _LIBCPP_HIDDEN __attribute__ ((__visibility__("hidden")))
 #endif
 
-#ifndef _LIBCPP_VISIBLE
-#define _LIBCPP_VISIBLE __attribute__ ((__visibility__("default")))
+#ifndef _LIBCPP_FUNC_VIS
+#define _LIBCPP_FUNC_VIS __attribute__ ((__visibility__("default")))
+#endif
+
+#ifndef _LIBCPP_TYPE_VIS
+#  if __has_attribute(type_visibility)
+#    define _LIBCPP_TYPE_VIS __attribute__ ((__type_visibility__("default")))
+#  else
+#    define _LIBCPP_TYPE_VIS __attribute__ ((__visibility__("default")))
+#  endif
 #endif
 
 #ifndef _LIBCPP_INLINE_VISIBILITY
@@ -139,7 +156,7 @@
 #endif
 
 #ifndef _LIBCPP_EXCEPTION_ABI
-#define _LIBCPP_EXCEPTION_ABI __attribute__ ((__visibility__("default")))
+#define _LIBCPP_EXCEPTION_ABI _LIBCPP_TYPE_VIS
 #endif
 
 #ifndef _LIBCPP_CANTTHROW
@@ -255,7 +272,7 @@ typedef __char32_t char32_t;
 #define _LIBCPP_HAS_NO_CONSTEXPR
 #endif
 
-#if __FreeBSD__ && (__ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L)
+#if defined(__FreeBSD__) && (__ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L)
 #define _LIBCPP_HAS_QUICK_EXIT
 #define _LIBCPP_HAS_C11_FEATURES
 #endif
@@ -418,7 +435,7 @@ template <unsigned> struct __static_asse
 #endif
 
 #ifdef _LIBCPP_HAS_NO_STRONG_ENUMS
-#define _LIBCPP_DECLARE_STRONG_ENUM(x) struct _LIBCPP_VISIBLE x { enum __lx
+#define _LIBCPP_DECLARE_STRONG_ENUM(x) struct _LIBCPP_TYPE_VIS x { enum __lx
 #define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) \
     __lx __v_; \
     _LIBCPP_ALWAYS_INLINE x(__lx __v) : __v_(__v) {} \
@@ -426,7 +443,7 @@ template <unsigned> struct __static_asse
     _LIBCPP_ALWAYS_INLINE operator int() const {return __v_;} \
     };
 #else  // _LIBCPP_HAS_NO_STRONG_ENUMS
-#define _LIBCPP_DECLARE_STRONG_ENUM(x) enum class _LIBCPP_VISIBLE x
+#define _LIBCPP_DECLARE_STRONG_ENUM(x) enum class _LIBCPP_TYPE_VIS x
 #define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x)
 #endif  // _LIBCPP_HAS_NO_STRONG_ENUMS
 
@@ -434,18 +451,18 @@ template <unsigned> struct __static_asse
 #define _LIBCPP_EXTERN_TEMPLATE(...) extern template __VA_ARGS__;
 #endif
 
-#if __APPLE__ || __FreeBSD__ || _WIN32 || __sun__
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(_WIN32) || defined(__sun__)
 #define _LIBCPP_LOCALE__L_EXTENSIONS 1
 #endif
-#if __FreeBSD__
+#ifdef __FreeBSD__
 #define _DECLARE_C99_LDBL_MATH 1
 #endif
 
-#if __APPLE__ || __FreeBSD__
+#if defined(__APPLE__) || defined(__FreeBSD__)
 #define _LIBCPP_HAS_DEFAULTRUNELOCALE
 #endif
 
-#if __APPLE__ || __FreeBSD__ || __sun__
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun__)
 #define _LIBCPP_WCTYPE_IS_MASK
 #endif
 

Modified: stable/9/contrib/libc++/include/__debug
==============================================================================
--- stable/9/contrib/libc++/include/__debug	Sat May 11 16:31:41 2013	(r250513)
+++ stable/9/contrib/libc++/include/__debug	Sat May 11 16:38:29 2013	(r250514)
@@ -16,7 +16,9 @@
 #   include <cstdlib>
 #   include <cstdio>
 #   include <cstddef>
-#   define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : (_VSTD::printf("%s\n", m), _VSTD::abort()))
+#   ifndef _LIBCPP_ASSERT
+#      define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : (_VSTD::printf("%s\n", m), _VSTD::abort()))
+#   endif
 
 #endif
 
@@ -24,9 +26,9 @@
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-struct _LIBCPP_VISIBLE __c_node;
+struct _LIBCPP_TYPE_VIS __c_node;
 
-struct _LIBCPP_VISIBLE __i_node
+struct _LIBCPP_TYPE_VIS __i_node
 {
     void* __i_;
     __i_node* __next_;
@@ -40,7 +42,7 @@ struct _LIBCPP_VISIBLE __i_node
     ~__i_node();
 };
 
-struct _LIBCPP_VISIBLE __c_node
+struct _LIBCPP_TYPE_VIS __c_node
 {
     void* __c_;
     __c_node* __next_;
@@ -117,7 +119,7 @@ _C_node<_Cont>::__subscriptable(const vo
     return _Cp->__subscriptable(__j, __n);
 }
 
-class _LIBCPP_VISIBLE __libcpp_db
+class _LIBCPP_TYPE_VIS __libcpp_db
 {
     __c_node** __cbeg_;
     __c_node** __cend_;
@@ -176,11 +178,11 @@ private:
     _LIBCPP_HIDDEN
     __i_node* __find_iterator(const void* __i) const;
 
-    friend _LIBCPP_VISIBLE __libcpp_db* __get_db();
+    friend _LIBCPP_FUNC_VIS __libcpp_db* __get_db();
 };
 
-_LIBCPP_VISIBLE __libcpp_db* __get_db();
-_LIBCPP_VISIBLE const __libcpp_db* __get_const_db();
+_LIBCPP_FUNC_VIS __libcpp_db* __get_db();
+_LIBCPP_FUNC_VIS const __libcpp_db* __get_const_db();
 
 
 _LIBCPP_END_NAMESPACE_STD

Modified: stable/9/contrib/libc++/include/__functional_03
==============================================================================
--- stable/9/contrib/libc++/include/__functional_03	Sat May 11 16:31:41 2013	(r250513)
+++ stable/9/contrib/libc++/include/__functional_03	Sat May 11 16:38:29 2013	(r250514)
@@ -203,7 +203,7 @@ class _LIBCPP_EXCEPTION_ABI bad_function
 {
 };
 
-template<class _Fp> class _LIBCPP_VISIBLE function; // undefined
+template<class _Fp> class _LIBCPP_TYPE_VIS function; // undefined
 
 namespace __function
 {
@@ -644,7 +644,7 @@ __func<_Fp, _Alloc, _Rp(_A0, _A1, _A2)>:
 }  // __function
 
 template<class _Rp>
-class _LIBCPP_VISIBLE function<_Rp()>
+class _LIBCPP_TYPE_VIS function<_Rp()>
 {
     typedef __function::__base<_Rp()> __base;
     aligned_storage<3*sizeof(void*)>::type __buf_;
@@ -928,7 +928,7 @@ function<_Rp()>::target() const
 #endif  // _LIBCPP_NO_RTTI
 
 template<class _Rp, class _A0>
-class _LIBCPP_VISIBLE function<_Rp(_A0)>
+class _LIBCPP_TYPE_VIS function<_Rp(_A0)>
     : public unary_function<_A0, _Rp>
 {
     typedef __function::__base<_Rp(_A0)> __base;
@@ -1230,7 +1230,7 @@ function<_Rp(_A0)>::target() const
 #endif  // _LIBCPP_NO_RTTI
 
 template<class _Rp, class _A0, class _A1>
-class _LIBCPP_VISIBLE function<_Rp(_A0, _A1)>
+class _LIBCPP_TYPE_VIS function<_Rp(_A0, _A1)>
     : public binary_function<_A0, _A1, _Rp>
 {
     typedef __function::__base<_Rp(_A0, _A1)> __base;
@@ -1532,7 +1532,7 @@ function<_Rp(_A0, _A1)>::target() const
 #endif  // _LIBCPP_NO_RTTI
 
 template<class _Rp, class _A0, class _A1, class _A2>
-class _LIBCPP_VISIBLE function<_Rp(_A0, _A1, _A2)>
+class _LIBCPP_TYPE_VIS function<_Rp(_A0, _A1, _A2)>
 {
     typedef __function::__base<_Rp(_A0, _A1, _A2)> __base;
     aligned_storage<3*sizeof(void*)>::type __buf_;
@@ -1860,11 +1860,11 @@ swap(function<_Fp>& __x, function<_Fp>& 
 {return __x.swap(__y);}
 
 template<class _Tp> struct __is_bind_expression : public false_type {};
-template<class _Tp> struct _LIBCPP_VISIBLE is_bind_expression
+template<class _Tp> struct _LIBCPP_TYPE_VIS is_bind_expression
     : public __is_bind_expression<typename remove_cv<_Tp>::type> {};
 
 template<class _Tp> struct __is_placeholder : public integral_constant<int, 0> {};
-template<class _Tp> struct _LIBCPP_VISIBLE is_placeholder
+template<class _Tp> struct _LIBCPP_TYPE_VIS is_placeholder
     : public __is_placeholder<typename remove_cv<_Tp>::type> {};
 
 namespace placeholders

Modified: stable/9/contrib/libc++/include/__functional_base
==============================================================================
--- stable/9/contrib/libc++/include/__functional_base	Sat May 11 16:31:41 2013	(r250513)
+++ stable/9/contrib/libc++/include/__functional_base	Sat May 11 16:38:29 2013	(r250514)
@@ -23,21 +23,21 @@
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 template <class _Arg, class _Result>
-struct _LIBCPP_VISIBLE unary_function
+struct _LIBCPP_TYPE_VIS unary_function
 {
     typedef _Arg    argument_type;
     typedef _Result result_type;
 };
 
 template <class _Arg1, class _Arg2, class _Result>
-struct _LIBCPP_VISIBLE binary_function
+struct _LIBCPP_TYPE_VIS binary_function
 {
     typedef _Arg1   first_argument_type;
     typedef _Arg2   second_argument_type;
     typedef _Result result_type;
 };
 
-template <class _Tp> struct _LIBCPP_VISIBLE hash;
+template <class _Tp> struct _LIBCPP_TYPE_VIS hash;
 
 template <class _Tp>
 struct __has_result_type
@@ -51,7 +51,7 @@ public:
 };
 
 template <class _Tp>
-struct _LIBCPP_VISIBLE less : binary_function<_Tp, _Tp, bool>
+struct _LIBCPP_TYPE_VIS less : binary_function<_Tp, _Tp, bool>
 {
     _LIBCPP_INLINE_VISIBILITY bool operator()(const _Tp& __x, const _Tp& __y) const
         {return __x < __y;}
@@ -348,7 +348,7 @@ struct __invoke_return
 };
 
 template <class _Tp>
-class _LIBCPP_VISIBLE reference_wrapper
+class _LIBCPP_TYPE_VIS reference_wrapper
     : public __weak_result_type<_Tp>
 {
 public:

Modified: stable/9/contrib/libc++/include/__functional_base_03
==============================================================================
--- stable/9/contrib/libc++/include/__functional_base_03	Sat May 11 16:31:41 2013	(r250513)
+++ stable/9/contrib/libc++/include/__functional_base_03	Sat May 11 16:38:29 2013	(r250514)
@@ -996,7 +996,7 @@ struct __invoke_return2
 };
 
 template <class _Tp>
-class _LIBCPP_VISIBLE reference_wrapper
+class _LIBCPP_TYPE_VIS reference_wrapper
     : public __weak_result_type<_Tp>
 {
 public:

Modified: stable/9/contrib/libc++/include/__hash_table
==============================================================================
--- stable/9/contrib/libc++/include/__hash_table	Sat May 11 16:31:41 2013	(r250513)
+++ stable/9/contrib/libc++/include/__hash_table	Sat May 11 16:38:29 2013	(r250514)
@@ -26,7 +26,7 @@
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-_LIBCPP_VISIBLE
+_LIBCPP_FUNC_VIS
 size_t __next_prime(size_t __n);
 
 template <class _NodePtr>
@@ -80,14 +80,14 @@ __next_pow2(size_t __n)
 }
 
 template <class _Tp, class _Hash, class _Equal, class _Alloc> class __hash_table;
-template <class _ConstNodePtr> class _LIBCPP_VISIBLE __hash_const_iterator;
-template <class _HashIterator> class _LIBCPP_VISIBLE __hash_map_iterator;
-template <class _HashIterator> class _LIBCPP_VISIBLE __hash_map_const_iterator;
+template <class _ConstNodePtr> class _LIBCPP_TYPE_VIS __hash_const_iterator;
+template <class _HashIterator> class _LIBCPP_TYPE_VIS __hash_map_iterator;
+template <class _HashIterator> class _LIBCPP_TYPE_VIS __hash_map_const_iterator;
 template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
-    class _LIBCPP_VISIBLE unordered_map;
+    class _LIBCPP_TYPE_VIS unordered_map;
 
 template <class _NodePtr>
-class _LIBCPP_VISIBLE __hash_iterator
+class _LIBCPP_TYPE_VIS __hash_iterator
 {
     typedef _NodePtr __node_pointer;
 
@@ -142,14 +142,14 @@ private:
         {}
 
     template <class, class, class, class> friend class __hash_table;
-    template <class> friend class _LIBCPP_VISIBLE __hash_const_iterator;
-    template <class> friend class _LIBCPP_VISIBLE __hash_map_iterator;
-    template <class, class, class, class, class> friend class _LIBCPP_VISIBLE unordered_map;
-    template <class, class, class, class, class> friend class _LIBCPP_VISIBLE unordered_multimap;
+    template <class> friend class _LIBCPP_TYPE_VIS __hash_const_iterator;
+    template <class> friend class _LIBCPP_TYPE_VIS __hash_map_iterator;
+    template <class, class, class, class, class> friend class _LIBCPP_TYPE_VIS unordered_map;
+    template <class, class, class, class, class> friend class _LIBCPP_TYPE_VIS unordered_multimap;
 };
 
 template <class _ConstNodePtr>
-class _LIBCPP_VISIBLE __hash_const_iterator
+class _LIBCPP_TYPE_VIS __hash_const_iterator
 {
     typedef _ConstNodePtr __node_pointer;
 
@@ -220,15 +220,15 @@ private:
         {}
 
     template <class, class, class, class> friend class __hash_table;
-    template <class> friend class _LIBCPP_VISIBLE __hash_map_const_iterator;
-    template <class, class, class, class, class> friend class _LIBCPP_VISIBLE unordered_map;
-    template <class, class, class, class, class> friend class _LIBCPP_VISIBLE unordered_multimap;
+    template <class> friend class _LIBCPP_TYPE_VIS __hash_map_const_iterator;
+    template <class, class, class, class, class> friend class _LIBCPP_TYPE_VIS unordered_map;
+    template <class, class, class, class, class> friend class _LIBCPP_TYPE_VIS unordered_multimap;
 };
 
-template <class _ConstNodePtr> class _LIBCPP_VISIBLE __hash_const_local_iterator;
+template <class _ConstNodePtr> class _LIBCPP_TYPE_VIS __hash_const_local_iterator;
 
 template <class _NodePtr>
-class _LIBCPP_VISIBLE __hash_local_iterator
+class _LIBCPP_TYPE_VIS __hash_local_iterator
 {
     typedef _NodePtr __node_pointer;
 
@@ -294,12 +294,12 @@ private:
         }
 
     template <class, class, class, class> friend class __hash_table;
-    template <class> friend class _LIBCPP_VISIBLE __hash_const_local_iterator;
-    template <class> friend class _LIBCPP_VISIBLE __hash_map_iterator;
+    template <class> friend class _LIBCPP_TYPE_VIS __hash_const_local_iterator;
+    template <class> friend class _LIBCPP_TYPE_VIS __hash_map_iterator;
 };
 
 template <class _ConstNodePtr>
-class _LIBCPP_VISIBLE __hash_const_local_iterator
+class _LIBCPP_TYPE_VIS __hash_const_local_iterator
 {
     typedef _ConstNodePtr __node_pointer;
 
@@ -384,7 +384,7 @@ private:
         }
 
     template <class, class, class, class> friend class __hash_table;
-    template <class> friend class _LIBCPP_VISIBLE __hash_map_const_iterator;
+    template <class> friend class _LIBCPP_TYPE_VIS __hash_map_const_iterator;
 };
 
 template <class _Alloc>

Modified: stable/9/contrib/libc++/include/__locale
==============================================================================
--- stable/9/contrib/libc++/include/__locale	Sat May 11 16:31:41 2013	(r250513)
+++ stable/9/contrib/libc++/include/__locale	Sat May 11 16:38:29 2013	(r250514)
@@ -19,11 +19,11 @@
 #include <cstdint>
 #include <cctype>
 #include <locale.h>
-#if _WIN32
+#ifdef _WIN32
 # include <support/win32/locale_win32.h>
-#elif (__GLIBC__ || __APPLE__ || __FreeBSD__ || __sun__)
+#elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun__)) || defined(EMSCRIPTEN)
 # include <xlocale.h>
-#endif  // _WIN32 || __GLIBC__ || __APPLE__ || __FreeBSD_
+#endif  // _WIN32 || __GLIBC__ || __APPLE__ || __FreeBSD__ || __sun__ || EMSCRIPTEN
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
@@ -31,7 +31,7 @@
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-class _LIBCPP_VISIBLE locale;
+class _LIBCPP_TYPE_VIS locale;
 
 template <class _Facet>
 _LIBCPP_INLINE_VISIBILITY
@@ -43,12 +43,12 @@ _LIBCPP_INLINE_VISIBILITY
 const _Facet&
 use_facet(const locale&);
 
-class _LIBCPP_VISIBLE locale
+class _LIBCPP_TYPE_VIS locale
 {
 public:
     // types:
-    class _LIBCPP_VISIBLE facet;
-    class _LIBCPP_VISIBLE id;
+    class _LIBCPP_TYPE_VIS facet;
+    class _LIBCPP_TYPE_VIS id;
 
     typedef int category;
     static const category // values assigned here are for exposition only
@@ -103,7 +103,7 @@ private:
     template <class _Facet> friend const _Facet& use_facet(const locale&);
 };
 
-class _LIBCPP_VISIBLE locale::facet
+class _LIBCPP_TYPE_VIS locale::facet
     : public __shared_count
 {
 protected:
@@ -119,7 +119,7 @@ private:
     virtual void __on_zero_shared() _NOEXCEPT;
 };
 
-class _LIBCPP_VISIBLE locale::id
+class _LIBCPP_TYPE_VIS locale::id
 {
     once_flag      __flag_;
     int32_t        __id_;
@@ -175,7 +175,7 @@ use_facet(const locale& __l)
 // template <class _CharT> class collate;
 
 template <class _CharT>
-class _LIBCPP_VISIBLE collate
+class _LIBCPP_TYPE_VIS collate
     : public locale::facet
 {
 public:
@@ -254,15 +254,15 @@ collate<_CharT>::do_hash(const char_type
     return static_cast<long>(__h);
 }
 
-_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_VISIBLE collate<char>)
-_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_VISIBLE collate<wchar_t>)
+_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_TYPE_VIS collate<char>)
+_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_TYPE_VIS collate<wchar_t>)
 
 // template <class CharT> class collate_byname;
 
-template <class _CharT> class _LIBCPP_VISIBLE collate_byname;
+template <class _CharT> class _LIBCPP_TYPE_VIS collate_byname;
 
 template <>
-class _LIBCPP_VISIBLE collate_byname<char>
+class _LIBCPP_TYPE_VIS collate_byname<char>
     : public collate<char>
 {
     locale_t __l;
@@ -281,7 +281,7 @@ protected:
 };
 
 template <>
-class _LIBCPP_VISIBLE collate_byname<wchar_t>
+class _LIBCPP_TYPE_VIS collate_byname<wchar_t>
     : public collate<wchar_t>
 {
     locale_t __l;
@@ -312,10 +312,10 @@ locale::operator()(const basic_string<_C
 
 // template <class charT> class ctype
 
-class _LIBCPP_VISIBLE ctype_base
+class _LIBCPP_TYPE_VIS ctype_base
 {
 public:
-#if __GLIBC__
+#ifdef __GLIBC__
     typedef unsigned short mask;
     static const mask space  = _ISspace;
     static const mask print  = _ISprint;
@@ -327,7 +327,7 @@ public:
     static const mask punct  = _ISpunct;
     static const mask xdigit = _ISxdigit;
     static const mask blank  = _ISblank;
-#elif _WIN32
+#elif defined(_WIN32)
     typedef unsigned short mask;
     static const mask space  = _SPACE;
     static const mask print  = _BLANK|_PUNCT|_ALPHA|_DIGIT;
@@ -339,11 +339,13 @@ public:
     static const mask punct  = _PUNCT;
     static const mask xdigit = _HEX;
     static const mask blank  = _BLANK;
-#elif (__APPLE__ || __FreeBSD__)
-#if __APPLE__
+#elif (defined(__APPLE__) || defined(__FreeBSD__)) || defined(EMSCRIPTEN)
+#ifdef __APPLE__
     typedef __uint32_t mask;
-#elif __FreeBSD__
+#elif defined(__FreeBSD__)
     typedef unsigned long mask;
+#elif defined(EMSCRIPTEN)
+    typedef unsigned short mask;
 #endif
     static const mask space  = _CTYPE_S;
     static const mask print  = _CTYPE_R;
@@ -355,7 +357,7 @@ public:
     static const mask punct  = _CTYPE_P;
     static const mask xdigit = _CTYPE_X;
     static const mask blank  = _CTYPE_B;
-#elif __sun__
+#elif defined(__sun__)
     typedef unsigned int mask;
     static const mask space  = _ISSPACE;
     static const mask print  = _ISPRINT;
@@ -367,7 +369,7 @@ public:
     static const mask punct  = _ISPUNCT;
     static const mask xdigit = _ISXDIGIT;
     static const mask blank  = _ISBLANK;
-#else  // __GLIBC__ || _WIN32 || __APPLE__ || __FreeBSD__ || __sun__
+#else  // __GLIBC__ || _WIN32 || __APPLE__ || __FreeBSD__ || EMSCRIPTEN || __sun__
     typedef unsigned long mask;
     static const mask space  = 1<<0;
     static const mask print  = 1<<1;
@@ -386,10 +388,10 @@ public:
     _LIBCPP_ALWAYS_INLINE ctype_base() {}
 };
 
-template <class _CharT> class _LIBCPP_VISIBLE ctype;
+template <class _CharT> class _LIBCPP_TYPE_VIS ctype;
 
 template <>
-class _LIBCPP_VISIBLE ctype<wchar_t>
+class _LIBCPP_TYPE_VIS ctype<wchar_t>
     : public locale::facet,
       public ctype_base
 {
@@ -491,7 +493,7 @@ protected:
 };
 
 template <>
-class _LIBCPP_VISIBLE ctype<char>
+class _LIBCPP_TYPE_VIS ctype<char>
     : public locale::facet, public ctype_base
 {
     const mask* __tab_;
@@ -590,7 +592,7 @@ public:
 #endif
     _LIBCPP_ALWAYS_INLINE const mask* table() const  _NOEXCEPT {return __tab_;}
     static const mask* classic_table()  _NOEXCEPT;
-#if defined(__GLIBC__)
+#if defined(__GLIBC__) || defined(EMSCRIPTEN)
     static const int* __classic_upper_table() _NOEXCEPT;
     static const int* __classic_lower_table() _NOEXCEPT;
 #endif
@@ -609,10 +611,10 @@ protected:
 
 // template <class CharT> class ctype_byname;
 
-template <class _CharT> class _LIBCPP_VISIBLE ctype_byname;
+template <class _CharT> class _LIBCPP_TYPE_VIS ctype_byname;
 
 template <>
-class _LIBCPP_VISIBLE ctype_byname<char>
+class _LIBCPP_TYPE_VIS ctype_byname<char>
     : public ctype<char>
 {
     locale_t __l;
@@ -630,7 +632,7 @@ protected:
 };
 
 template <>
-class _LIBCPP_VISIBLE ctype_byname<wchar_t>
+class _LIBCPP_TYPE_VIS ctype_byname<wchar_t>
     : public ctype<wchar_t>
 {
     locale_t __l;
@@ -761,7 +763,7 @@ tolower(_CharT __c, const locale& __loc)
 
 // codecvt_base
 
-class _LIBCPP_VISIBLE codecvt_base
+class _LIBCPP_TYPE_VIS codecvt_base
 {
 public:
     _LIBCPP_ALWAYS_INLINE codecvt_base() {}
@@ -770,12 +772,12 @@ public:
 
 // template <class internT, class externT, class stateT> class codecvt;
 
-template <class _InternT, class _ExternT, class _StateT> class _LIBCPP_VISIBLE codecvt;
+template <class _InternT, class _ExternT, class _StateT> class _LIBCPP_TYPE_VIS codecvt;
 
 // template <> class codecvt<char, char, mbstate_t>
 
 template <>
-class _LIBCPP_VISIBLE codecvt<char, char, mbstate_t>
+class _LIBCPP_TYPE_VIS codecvt<char, char, mbstate_t>
     : public locale::facet,
       public codecvt_base
 {
@@ -861,7 +863,7 @@ protected:
 // template <> class codecvt<wchar_t, char, mbstate_t>
 
 template <>
-class _LIBCPP_VISIBLE codecvt<wchar_t, char, mbstate_t>
+class _LIBCPP_TYPE_VIS codecvt<wchar_t, char, mbstate_t>
     : public locale::facet,
       public codecvt_base
 {
@@ -944,7 +946,7 @@ protected:
 // template <> class codecvt<char16_t, char, mbstate_t>
 
 template <>
-class _LIBCPP_VISIBLE codecvt<char16_t, char, mbstate_t>
+class _LIBCPP_TYPE_VIS codecvt<char16_t, char, mbstate_t>
     : public locale::facet,
       public codecvt_base
 {
@@ -1030,7 +1032,7 @@ protected:
 // template <> class codecvt<char32_t, char, mbstate_t>
 
 template <>
-class _LIBCPP_VISIBLE codecvt<char32_t, char, mbstate_t>
+class _LIBCPP_TYPE_VIS codecvt<char32_t, char, mbstate_t>
     : public locale::facet,
       public codecvt_base
 {
@@ -1116,7 +1118,7 @@ protected:
 // template <class _InternT, class _ExternT, class _StateT> class codecvt_byname
 
 template <class _InternT, class _ExternT, class _StateT>
-class _LIBCPP_VISIBLE codecvt_byname
+class _LIBCPP_TYPE_VIS codecvt_byname
     : public codecvt<_InternT, _ExternT, _StateT>
 {
 public:
@@ -1140,7 +1142,7 @@ _LIBCPP_EXTERN_TEMPLATE(class codecvt_by
 _LIBCPP_EXTERN_TEMPLATE(class codecvt_byname<char16_t, char, mbstate_t>)
 _LIBCPP_EXTERN_TEMPLATE(class codecvt_byname<char32_t, char, mbstate_t>)
 
-_LIBCPP_VISIBLE void __throw_runtime_error(const char*);
+_LIBCPP_FUNC_VIS void __throw_runtime_error(const char*);
 
 template <size_t _Np>
 struct __narrow_to_utf8
@@ -1324,10 +1326,10 @@ struct __widen_from_utf8<32>
 
 // template <class charT> class numpunct
 
-template <class _CharT> class _LIBCPP_VISIBLE numpunct;
+template <class _CharT> class _LIBCPP_TYPE_VIS numpunct;
 
 template <>
-class _LIBCPP_VISIBLE numpunct<char>
+class _LIBCPP_TYPE_VIS numpunct<char>
     : public locale::facet
 {
 public:
@@ -1358,7 +1360,7 @@ protected:
 };
 
 template <>
-class _LIBCPP_VISIBLE numpunct<wchar_t>
+class _LIBCPP_TYPE_VIS numpunct<wchar_t>
     : public locale::facet
 {
 public:
@@ -1390,10 +1392,10 @@ protected:
 
 // template <class charT> class numpunct_byname
 
-template <class charT> class _LIBCPP_VISIBLE numpunct_byname;
+template <class charT> class _LIBCPP_TYPE_VIS numpunct_byname;
 
 template <>
-class _LIBCPP_VISIBLE numpunct_byname<char>
+class _LIBCPP_TYPE_VIS numpunct_byname<char>
 : public numpunct<char>
 {
 public:
@@ -1411,7 +1413,7 @@ private:
 };
 
 template <>
-class _LIBCPP_VISIBLE numpunct_byname<wchar_t>
+class _LIBCPP_TYPE_VIS numpunct_byname<wchar_t>
 : public numpunct<wchar_t>
 {
 public:

Modified: stable/9/contrib/libc++/include/__mutex_base
==============================================================================
--- stable/9/contrib/libc++/include/__mutex_base	Sat May 11 16:31:41 2013	(r250513)
+++ stable/9/contrib/libc++/include/__mutex_base	Sat May 11 16:38:29 2013	(r250514)
@@ -32,7 +32,7 @@ template <class _Mutex> class upgrade_lo
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-class _LIBCPP_VISIBLE mutex
+class _LIBCPP_TYPE_VIS mutex
 {
     pthread_mutex_t __m_;
 
@@ -58,9 +58,9 @@ public:
     _LIBCPP_INLINE_VISIBILITY native_handle_type native_handle() {return &__m_;}
 };
 
-struct _LIBCPP_VISIBLE defer_lock_t {};
-struct _LIBCPP_VISIBLE try_to_lock_t {};
-struct _LIBCPP_VISIBLE adopt_lock_t {};
+struct _LIBCPP_TYPE_VIS defer_lock_t {};
+struct _LIBCPP_TYPE_VIS try_to_lock_t {};
+struct _LIBCPP_TYPE_VIS adopt_lock_t {};
 
 #if defined(_LIBCPP_HAS_NO_CONSTEXPR) || defined(_LIBCPP_BUILDING_MUTEX)
 
@@ -77,7 +77,7 @@ constexpr adopt_lock_t  adopt_lock  = ad
 #endif
 
 template <class _Mutex>
-class _LIBCPP_VISIBLE lock_guard
+class _LIBCPP_TYPE_VIS lock_guard
 {
 public:
     typedef _Mutex mutex_type;
@@ -101,7 +101,7 @@ private:
 };
 
 template <class _Mutex>
-class _LIBCPP_VISIBLE unique_lock
+class _LIBCPP_TYPE_VIS unique_lock
 {
 public:
     typedef _Mutex mutex_type;
@@ -285,7 +285,7 @@ void
 swap(unique_lock<_Mutex>& __x, unique_lock<_Mutex>& __y) _NOEXCEPT
     {__x.swap(__y);}
 
-struct _LIBCPP_VISIBLE cv_status
+struct _LIBCPP_TYPE_VIS cv_status
 {
     enum __lx {
         no_timeout,
@@ -299,7 +299,7 @@ struct _LIBCPP_VISIBLE cv_status
 
 };
 
-class _LIBCPP_VISIBLE condition_variable
+class _LIBCPP_TYPE_VIS condition_variable
 {
     pthread_cond_t __cv_;
 public:

Modified: stable/9/contrib/libc++/include/__std_stream
==============================================================================
--- stable/9/contrib/libc++/include/__std_stream	Sat May 11 16:31:41 2013	(r250513)
+++ stable/9/contrib/libc++/include/__std_stream	Sat May 11 16:38:29 2013	(r250514)
@@ -41,7 +41,7 @@ public:
     typedef typename traits_type::off_type   off_type;
     typedef typename traits_type::state_type state_type;
 
-    explicit __stdinbuf(FILE* __fp);
+    __stdinbuf(FILE* __fp, state_type* __st);
 
 protected:
     virtual int_type underflow();
@@ -53,7 +53,7 @@ private:
 
     FILE* __file_;
     const codecvt<char_type, char, state_type>* __cv_;
-    state_type __st_;
+    state_type* __st_;
     int __encoding_;
     bool __always_noconv_;
 
@@ -64,9 +64,9 @@ private:
 };
 
 template <class _CharT>
-__stdinbuf<_CharT>::__stdinbuf(FILE* __fp)
+__stdinbuf<_CharT>::__stdinbuf(FILE* __fp, state_type* __st)

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305111638.r4BGcTs3067082>