Эх сурвалжийг харах

Windows support by Ruben Van Boxem.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@142235 91177308-0d34-0410-b5e6-96231b3b80d8
Howard Hinnant 14 жил өмнө
parent
commit
08e17472e4
93 өөрчлөгдсөн 286 нэмэгдсэн , 40 устгасан
  1. 2 0
      include/__bit_reference
  2. 80 19
      include/__config
  3. 2 0
      include/__functional_03
  4. 2 0
      include/__functional_base
  5. 2 0
      include/__hash_table
  6. 2 0
      include/__locale
  7. 2 0
      include/__mutex_base
  8. 2 0
      include/__split_buffer
  9. 2 0
      include/__sso_allocator
  10. 2 0
      include/__std_stream
  11. 2 0
      include/__tree
  12. 2 0
      include/__tuple
  13. 2 0
      include/__tuple_03
  14. 2 0
      include/algorithm
  15. 2 0
      include/array
  16. 2 0
      include/atomic
  17. 2 0
      include/bitset
  18. 2 0
      include/cassert
  19. 2 0
      include/ccomplex
  20. 2 0
      include/cctype
  21. 2 0
      include/cerrno
  22. 2 0
      include/cfenv
  23. 2 0
      include/cfloat
  24. 2 0
      include/chrono
  25. 2 0
      include/cinttypes
  26. 2 0
      include/ciso646
  27. 2 0
      include/climits
  28. 2 0
      include/clocale
  29. 2 0
      include/cmath
  30. 2 0
      include/codecvt
  31. 2 0
      include/complex
  32. 2 0
      include/complex.h
  33. 2 0
      include/condition_variable
  34. 2 0
      include/csetjmp
  35. 2 0
      include/csignal
  36. 2 0
      include/cstdarg
  37. 2 0
      include/cstdbool
  38. 2 0
      include/cstddef
  39. 2 0
      include/cstdint
  40. 2 0
      include/cstdio
  41. 2 0
      include/cstdlib
  42. 2 0
      include/cstring
  43. 2 0
      include/ctgmath
  44. 2 0
      include/ctime
  45. 2 0
      include/cwchar
  46. 2 0
      include/cwctype
  47. 2 0
      include/deque
  48. 2 0
      include/exception
  49. 2 0
      include/forward_list
  50. 2 0
      include/fstream
  51. 2 0
      include/functional
  52. 2 0
      include/future
  53. 2 0
      include/initializer_list
  54. 2 0
      include/iomanip
  55. 2 0
      include/ios
  56. 2 0
      include/iosfwd
  57. 2 0
      include/iostream
  58. 2 0
      include/istream
  59. 2 0
      include/iterator
  60. 2 0
      include/limits
  61. 2 0
      include/list
  62. 2 0
      include/locale
  63. 2 0
      include/map
  64. 2 0
      include/memory
  65. 2 0
      include/mutex
  66. 2 0
      include/new
  67. 2 0
      include/numeric
  68. 2 0
      include/ostream
  69. 2 0
      include/queue
  70. 2 0
      include/random
  71. 2 0
      include/ratio
  72. 2 0
      include/regex
  73. 2 0
      include/scoped_allocator
  74. 2 0
      include/set
  75. 2 0
      include/sstream
  76. 2 0
      include/stack
  77. 2 0
      include/stdexcept
  78. 2 0
      include/streambuf
  79. 2 0
      include/string
  80. 2 0
      include/strstream
  81. 2 0
      include/system_error
  82. 2 0
      include/tgmath.h
  83. 2 0
      include/thread
  84. 2 0
      include/tuple
  85. 10 5
      include/type_traits
  86. 2 0
      include/typeindex
  87. 2 0
      include/typeinfo
  88. 2 0
      include/unordered_map
  89. 2 0
      include/unordered_set
  90. 2 0
      include/utility
  91. 2 0
      include/valarray
  92. 2 0
      include/vector
  93. 16 16
      www/results.Windows.html

+ 2 - 0
include/__bit_reference

@@ -14,7 +14,9 @@
 #include <__config>
 #include <algorithm>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 80 - 19
include/__config

@@ -11,7 +11,9 @@
 #ifndef _LIBCPP_CONFIG
 #define _LIBCPP_CONFIG
 
+#if !_MSC_VER // explicit macro necessary because it is only defined below in this file
 #pragma GCC system_header
+#endif
 
 #define _LIBCPP_VERSION 1001
 
@@ -69,17 +71,45 @@
 # endif
 #endif  // !defined(_LIBCPP_LITTLE_ENDIAN) || !defined(_LIBCPP_BIG_ENDIAN)
 
-#ifndef _LIBCPP_VISIBILITY_TAG
-#define _LIBCPP_VISIBILITY_TAG 1
+#if _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)
+# else
+#  define _LIBCPP_HIDDEN
+#  define _LIBCPP_VISIBLE __declspec(dllimport)
+# endif
+#else
+# define _LIBCPP_HIDDEN
+# define _LIBCPP_VISIBLE
+#endif
+
+#ifndef _LIBCPP_INLINE_VISIBILITY
+#define _LIBCPP_INLINE_VISIBILITY __forceinline
+#endif
+
+#ifndef _LIBCPP_EXCEPTION_ABI
+#define _LIBCPP_EXCEPTION_ABI _LIBCPP_VISIBLE
 #endif
 
-#if _LIBCPP_VISIBILITY_TAG
+#ifndef _LIBCPP_ALWAYS_INLINE
+# if _MSC_VER
+# define _LIBCPP_ALWAYS_INLINE __forceinline
+# endif
+#endif
+
+#endif // _WIN32
+
+#ifndef _LIBCPP_HIDDEN
 #define _LIBCPP_HIDDEN __attribute__ ((__visibility__("hidden")))
+#endif
+
+#ifndef _LIBCPP_VISIBLE
 #define _LIBCPP_VISIBLE __attribute__ ((__visibility__("default")))
-#else  // _LIBCPP_VISIBILITY_TAG
-#define _LIBCPP_HIDDEN
-#define _LIBCPP_VISIBLE
-#endif  // _LIBCPP_VISIBILITY_TAG
+#endif
 
 #ifndef _LIBCPP_INLINE_VISIBILITY
 #define _LIBCPP_INLINE_VISIBILITY __attribute__ ((__visibility__("hidden"), __always_inline__))
@@ -89,12 +119,22 @@
 #define _LIBCPP_EXCEPTION_ABI __attribute__ ((__visibility__("default")))
 #endif
 
+#ifndef _LIBCPP_CANTTHROW
 #define _LIBCPP_CANTTHROW __attribute__ ((__nothrow__))
+#endif
 
+#ifndef _LIBCPP_ALWAYS_INLINE
 #define _LIBCPP_ALWAYS_INLINE  __attribute__ ((__visibility__("hidden"), __always_inline__))
+#endif
 
 #if defined(__clang__)
 
+#if __has_feature(cxx_alignas)
+#  define _ALIGNAS(x) alignas(x)
+#else
+#  define _ALIGNAS(x) __attribute__((__aligned__(x)))
+#endif
+
 #if !__has_feature(cxx_alias_templates)
 #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES
 #endif
@@ -181,16 +221,6 @@ typedef __char32_t char32_t;
 #define _LIBCPP_HAS_OBJC_ARC_WEAK
 #endif
 
-// Inline namespaces are available in Clang regardless of C++ dialect.
-#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {inline namespace _LIBCPP_NAMESPACE {
-#define _LIBCPP_END_NAMESPACE_STD  } }
-#define _VSTD std::_LIBCPP_NAMESPACE
-
-namespace std {
-  inline namespace _LIBCPP_NAMESPACE {
-  }
-}
-
 #if !(__has_feature(cxx_constexpr))
 #define _LIBCPP_HAS_NO_CONSTEXPR
 #endif
@@ -207,10 +237,20 @@ namespace std {
 #  define _LIBCXX_UNDERLYING_TYPE(T) __underlying_type(T)
 #endif
 
-// end defined(__clang__)
+// Inline namespaces are available in Clang regardless of C++ dialect.
+#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {inline namespace _LIBCPP_NAMESPACE {
+#define _LIBCPP_END_NAMESPACE_STD  } }
+#define _VSTD std::_LIBCPP_NAMESPACE
+
+namespace std {
+  inline namespace _LIBCPP_NAMESPACE {
+  }
+}
 
 #elif defined(__GNUC__)
 
+#define _ALIGNAS(x) __attribute__((__aligned__(x)))
+
 #define _ATTRIBUTE(x) __attribute__((x))
 
 #if !__EXCEPTIONS
@@ -275,7 +315,28 @@ namespace _LIBCPP_NAMESPACE {
 using namespace _LIBCPP_NAMESPACE __attribute__((__strong__));
 }
 
-#endif  // defined(__GNUC__)
+#elif defined(_MSC_VER)
+
+#define _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
+#define _LIBCPP_HAS_NO_CONSTEXPR
+#define _LIBCPP_HAS_NO_UNICODE_CHARS
+#define _LIBCPP_HAS_NO_DELETED_FUNCTIONS
+#define __alignof__ __alignof
+#define _ATTRIBUTE __declspec
+#define _ALIGNAS(x) __declspec(align(x))
+#define _LIBCPP_HAS_NO_VARIADICS
+
+#define _NOEXCEPT throw()
+#define _NOEXCEPT_(x)
+
+#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {
+#define _LIBCPP_END_NAMESPACE_STD  }
+#define _VSTD std
+
+namespace std {
+}
+
+#endif // __clang__ || __GNUC___ || _MSC_VER
 
 #ifdef _LIBCPP_HAS_NO_UNICODE_CHARS
 typedef unsigned short char16_t;

+ 2 - 0
include/__functional_03

@@ -13,7 +13,9 @@
 
 // manual variadic expansion for <functional>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 template <class _Tp>
 class __mem_fn

+ 2 - 0
include/__functional_base

@@ -16,7 +16,9 @@
 #include <typeinfo>
 #include <exception>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/__hash_table

@@ -18,7 +18,9 @@
 #include <algorithm>
 #include <cmath>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/__locale

@@ -25,7 +25,9 @@
 # include <xlocale.h>
 #endif  // _WIN32 || __GLIBC__ || __APPLE__ || __FreeBSD_
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/__mutex_base

@@ -16,7 +16,9 @@
 #include <system_error>
 #include <pthread.h>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 #ifdef _LIBCPP_SHARED_LOCK
 

+ 2 - 0
include/__split_buffer

@@ -6,7 +6,9 @@
 #include <type_traits>
 #include <algorithm>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/__sso_allocator

@@ -15,7 +15,9 @@
 #include <type_traits>
 #include <new>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/__std_stream

@@ -17,7 +17,9 @@
 #include <__locale>
 #include <cstdio>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/__tree

@@ -17,7 +17,9 @@
 #include <stdexcept>
 #include <algorithm>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/__tuple

@@ -15,7 +15,9 @@
 #include <cstddef>
 #include <type_traits>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 #ifdef _LIBCPP_HAS_NO_VARIADICS
 

+ 2 - 0
include/__tuple_03

@@ -13,7 +13,9 @@
 
 #include <__config>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/algorithm

@@ -595,7 +595,9 @@ template <class BidirectionalIterator, class Compare>
 #include <iterator>
 #include <cstdlib>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/array

@@ -111,7 +111,9 @@ template <int I, class T, size_t N> T&& get(array<T, N>&&) noexcept;
     #include <cassert>
 #endif
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/atomic

@@ -526,7 +526,9 @@ void atomic_signal_fence(memory_order m);
 #include <cstdint>
 #include <type_traits>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/bitset

@@ -113,7 +113,9 @@ template <size_t N> struct hash<std::bitset<N>>;
 
 */
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 #include <__config>
 #include <__bit_reference>

+ 2 - 0
include/cassert

@@ -20,4 +20,6 @@ Macros:
 #include <__config>
 #include <assert.h>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif

+ 2 - 0
include/ccomplex

@@ -20,7 +20,9 @@
 
 #include <complex>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 // hh 080623 Created
 

+ 2 - 0
include/cctype

@@ -38,7 +38,9 @@ int toupper(int c);
 #include <__config>
 #include <ctype.h>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/cerrno

@@ -26,7 +26,9 @@ Macros:
 #include <__config>
 #include <errno.h>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 #if !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE)
 

+ 2 - 0
include/cfenv

@@ -56,7 +56,9 @@ int feupdateenv(const fenv_t* envp);
 #include <__config>
 #include <fenv.h>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/cfloat

@@ -63,7 +63,9 @@ Macros:
 #include <__config>
 #include <float.h>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 #ifndef FLT_EVAL_METHOD
 #define FLT_EVAL_METHOD __FLT_EVAL_METHOD__

+ 2 - 0
include/chrono

@@ -255,7 +255,9 @@ typedef steady_clock high_resolution_clock;
 #include <ratio>
 #include <limits>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/cinttypes

@@ -239,7 +239,9 @@ uintmax_t wcstoumax(const wchar_t* restrict nptr, wchar_t** restrict endptr, int
 #include <cstdint>
 #include <inttypes.h>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/ciso646

@@ -18,6 +18,8 @@
 
 #include <__config>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 #endif  // _LIBCPP_CISO646

+ 2 - 0
include/climits

@@ -41,6 +41,8 @@ Macros:
 #include <__config>
 #include <limits.h>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 #endif  // _LIBCPP_CLIMITS

+ 2 - 0
include/clocale

@@ -38,7 +38,9 @@ lconv* localeconv();
 #include <__config>
 #include <locale.h>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/cmath

@@ -301,7 +301,9 @@ long double    truncl(long double x);
 #include <math.h>
 #include <type_traits>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 // signbit
 

+ 2 - 0
include/codecvt

@@ -55,7 +55,9 @@ class codecvt_utf8_utf16
 #include <__config>
 #include <__locale>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/complex

@@ -249,7 +249,9 @@ template<class T, class charT, class traits>
     #include <cassert>
 #endif
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/complex.h

@@ -28,6 +28,8 @@
 
 #endif  // __cplusplus
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 #endif  // _LIBCPP_COMPLEX_H

+ 2 - 0
include/condition_variable

@@ -111,7 +111,9 @@ public:
 #include <__mutex_base>
 #include <memory>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/csetjmp

@@ -34,7 +34,9 @@ void longjmp(jmp_buf env, int val);
 #include <__config>
 #include <setjmp.h>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 #ifndef setjmp
 #define setjmp(env) setjmp(env)

+ 2 - 0
include/csignal

@@ -43,7 +43,9 @@ int raise(int sig);
 #include <__config>
 #include <signal.h>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/cstdarg

@@ -35,7 +35,9 @@ Types:
 #include <__config>
 #include <stdarg.h>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/cstdbool

@@ -22,7 +22,9 @@ Macros:
 
 #include <__config>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 #undef __bool_true_false_are_defined
 #define __bool_true_false_are_defined 1

+ 2 - 0
include/cstddef

@@ -43,7 +43,9 @@ Types:
 
 #include <stddef.h>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/cstdint

@@ -144,7 +144,9 @@ Types:
 #include <__config>
 #include <stdint.h>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/cstdio

@@ -99,7 +99,9 @@ void perror(const char* s);
 #include <__config>
 #include <stdio.h>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/cstdlib

@@ -82,7 +82,9 @@ size_t wcstombs(char* restrict s, const wchar_t* restrict pwcs, size_t n);
 #include <__config>
 #include <stdlib.h>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/cstring

@@ -60,7 +60,9 @@ size_t strlen(const char* s);
 #include <__config>
 #include <string.h>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/ctgmath

@@ -22,6 +22,8 @@
 #include <ccomplex>
 #include <cmath>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 #endif  // _LIBCPP_CTGMATH

+ 2 - 0
include/ctime

@@ -47,7 +47,9 @@ size_t strftime(char* restrict s, size_t maxsize, const char* restrict format,
 #include <__config>
 #include <time.h>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/cwchar

@@ -110,7 +110,9 @@ size_t wcsrtombs(char* restrict dst, const wchar_t** restrict src, size_t len,
 #include <support/win32/support.h> // pull in *swprintf defines
 #endif // _WIN32
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/cwctype

@@ -54,7 +54,9 @@ wctrans_t wctrans(const char* property);
 #include <cctype>
 #include <wctype.h>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/deque

@@ -150,7 +150,9 @@ template <class T, class Allocator>
 
 */
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 #include <__config>
 #include <__split_buffer>

+ 2 - 0
include/exception

@@ -80,7 +80,9 @@ template <class E> void rethrow_if_nested(const E& e);
 #include <cstddef>
 #include <type_traits>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 namespace std  // purposefully not using versioning namespace
 {

+ 2 - 0
include/forward_list

@@ -174,7 +174,9 @@ template <class T, class Allocator>
 #include <iterator>
 #include <algorithm>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/fstream

@@ -171,7 +171,9 @@ typedef basic_fstream<wchar_t> wfstream;
 #include <__locale>
 #include <cstdio>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/functional

@@ -467,7 +467,9 @@ POLICY:  For non-variadic implementations, the number of arguments is limited
 
 #include <__functional_base>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/future

@@ -370,7 +370,9 @@ template <class R, class Alloc> struct uses_allocator<packaged_task<R>, Alloc>;
 #include <mutex>
 #include <thread>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/initializer_list

@@ -46,7 +46,9 @@ template<class E> const E* end(initializer_list<E> il) noexcept;
 #include <__config>
 #include <cstddef>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 namespace std  // purposefully not versioned
 {

+ 2 - 0
include/iomanip

@@ -33,7 +33,9 @@ template <class charT> T10 put_time(const struct tm* tmb, const charT* fmt);
 #include <__config>
 #include <istream>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/ios

@@ -216,7 +216,9 @@ storage-class-specifier const error_category& iostream_category;
 #include <__locale>
 #include <system_error>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/iosfwd

@@ -89,7 +89,9 @@ typedef fpos<char_traits<wchar_t>::state_type> wstreampos;
 #include <__config>
 #include <wchar.h>  // for mbstate_t
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/iostream

@@ -40,7 +40,9 @@ extern wostream wclog;
 #include <istream>
 #include <ostream>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/istream

@@ -155,7 +155,9 @@ template <class charT, class traits, class T>
 #include <__config>
 #include <ostream>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/iterator

@@ -321,7 +321,9 @@ template <class T, size_t N> T* end(T (&array)[N]);
 #include <cassert>
 #endif
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/limits

@@ -102,7 +102,9 @@ template<> class numeric_limits<cv long double>;
 
 */
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 #include <__config>
 #include <type_traits>

+ 2 - 0
include/list

@@ -176,7 +176,9 @@ template <class T, class Alloc>
 #include <iterator>
 #include <algorithm>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/locale

@@ -192,7 +192,9 @@ template <class charT> class messages_byname;
 #include <nl_types.h>
 #endif  // !_WIN32
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/map

@@ -375,7 +375,9 @@ swap(multimap<Key, T, Compare, Allocator>& x,
 #include <functional>
 #include <initializer_list>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/memory

@@ -600,7 +600,9 @@ void* align(size_t alignment, size_t size, void*& ptr, size_t& space);
     #include <cassert>
 #endif
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/mutex

@@ -179,7 +179,9 @@ template<class Callable, class ...Args>
 #include <tuple>
 #endif
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/new

@@ -56,7 +56,9 @@ void  operator delete[](void* ptr, void*) noexcept;
 #include <exception>
 #include <cstddef>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 namespace std  // purposefully not using versioning namespace
 {

+ 2 - 0
include/numeric

@@ -60,7 +60,9 @@ template <class ForwardIterator, class T>
 #include <__config>
 #include <iterator>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/ostream

@@ -133,7 +133,9 @@ template <class charT, class traits, class T>
 #include <iterator>
 #include <bitset>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/queue

@@ -171,7 +171,9 @@ template <class T, class Container, class Compare>
 #include <functional>
 #include <algorithm>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/random

@@ -1646,7 +1646,9 @@ class piecewise_linear_distribution
 #include <ostream>
 #include <cmath>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/ratio

@@ -70,7 +70,9 @@ typedef ratio<1000000000000000000000000, 1> yotta;  // not supported
 #include <climits>
 #include <type_traits>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/regex

@@ -732,7 +732,9 @@ typedef regex_token_iterator<wstring::const_iterator> wsregex_token_iterator;
 #include <vector>
 #include <deque>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/scoped_allocator

@@ -106,7 +106,9 @@ template <class OuterA1, class OuterA2, class... InnerAllocs>
 #include <__config>
 #include <memory>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/set

@@ -338,7 +338,9 @@ swap(multiset<Key, Compare, Allocator>& x, multiset<Key, Compare, Allocator>& y)
 #include <__tree>
 #include <functional>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/sstream

@@ -175,7 +175,9 @@ typedef basic_stringstream<wchar_t> wstringstream;
 #include <istream>
 #include <string>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/stack

@@ -85,7 +85,9 @@ template <class T, class Container>
 #include <__config>
 #include <deque>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/stdexcept

@@ -46,7 +46,9 @@ public:
 #include <exception>
 #include <iosfwd>  // for string forward decl
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 namespace std  // purposefully not using versioning namespace
 {

+ 2 - 0
include/streambuf

@@ -112,7 +112,9 @@ protected:
 #include <iosfwd>
 #include <ios>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/string

@@ -446,7 +446,9 @@ template <> struct hash<wstring>;
 #include <cassert>
 #endif
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/strstream

@@ -131,7 +131,9 @@ private:
 #include <ostream>
 #include <istream>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/system_error

@@ -223,7 +223,9 @@ template <> struct hash<std::error_code>;
 #include <stdexcept>
 #include <__functional_base>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/tgmath.h

@@ -22,6 +22,8 @@
 #include <complex.h>
 #include <math.h>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 #endif  // _LIBCPP_TGMATH_H

+ 2 - 0
include/thread

@@ -100,7 +100,9 @@ void sleep_for(const chrono::duration<Rep, Period>& rel_time);
 #endif
 #include <pthread.h>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 #define __STDCPP_THREADS__ __cplusplus
 

+ 2 - 0
include/tuple

@@ -119,7 +119,9 @@ template <class... Types>
 #include <memory>
 #include <type_traits>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 10 - 5
include/type_traits

@@ -142,7 +142,9 @@ namespace std
 #include <__config>
 #include <cstddef>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
@@ -891,12 +893,12 @@ struct _LIBCPP_VISIBLE aligned_storage
 
 #define _CREATE_ALIGNED_STORAGE_SPECIALIZATION(n) \
 template <size_t _Len>\
-struct __attribute__ ((__visibility__("default"))) aligned_storage<_Len, n>\
+struct _LIBCPP_VISIBLE aligned_storage<_Len, n>\
 {\
-    struct type\
+    struct _ALIGNAS(n) type\
     {\
         unsigned char _[_Len];\
-    } __attribute__((__aligned__(n)));\
+    };\
 }
 
 _CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x1);
@@ -913,7 +915,10 @@ _CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x400);
 _CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x800);
 _CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x1000);
 _CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x2000);
+// MSDN says that MSVC does not support alignment beyond 8192 (=0x2000)
+#if !defined(_MSC_VER)
 _CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x4000);
+#endif // !_MSC_VER
 
 #undef _CREATE_ALIGNED_STORAGE_SPECIALIZATION
 
@@ -933,7 +938,7 @@ private:
     typedef typename __promote<_A2>::type __type2;
     typedef typename __promote<_A3>::type __type3;
 public:
-    typedef __typeof__(__type1() + __type2() + __type3()) type;
+    typedef decltype(__type1() + __type2() + __type3()) type;
 };
 
 template <class _A1, class _A2>
@@ -943,7 +948,7 @@ private:
     typedef typename __promote<_A1>::type __type1;
     typedef typename __promote<_A2>::type __type2;
 public:
-    typedef __typeof__(__type1() + __type2()) type;
+    typedef decltype(__type1() + __type2()) type;
 };
 
 template <class _A1>

+ 2 - 0
include/typeindex

@@ -49,7 +49,9 @@ struct hash<type_index>
 #include <typeinfo>
 #include <__functional_base>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/typeinfo

@@ -61,7 +61,9 @@ public:
 #include <exception>
 #include <cstddef>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 namespace std  // purposefully not using versioning namespace
 {

+ 2 - 0
include/unordered_map

@@ -319,7 +319,9 @@ template <class Key, class T, class Hash, class Pred, class Alloc>
 #include <functional>
 #include <stdexcept>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/unordered_set

@@ -305,7 +305,9 @@ template <class Value, class Hash, class Pred, class Alloc>
 #include <__hash_table>
 #include <functional>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/utility

@@ -125,7 +125,9 @@ template<size_t I, class T1, class T2>
 #include <__tuple>
 #include <type_traits>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/valarray

@@ -346,7 +346,9 @@ template <class T> unspecified2 end(const valarray<T>& v);
 #include <algorithm>
 #include <functional>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 2 - 0
include/vector

@@ -270,7 +270,9 @@ void swap(vector<T,Allocator>& x, vector<T,Allocator>& y)
 #include <__split_buffer>
 #include <__functional_base>
 
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
+#endif
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 

+ 16 - 16
www/results.Windows.html

@@ -157,7 +157,8 @@ input.output/
     copy.pass.cpp: Windows locale names don't follow UNIX convention.
     default.pass.cpp: idem.
    streambuf.members/
-    locales.pass.cpp: Windows locale names don't follow UNIX convention.
+    streambuf.locales/
+     locales.pass.cpp: Windows locale names don't follow UNIX convention.
    streambuf.protected/
     streambuf.assign/
 	 assign.pass.cpp: Windows locale names don't follow UNIX convention.
@@ -223,21 +224,20 @@ localization/
      wchar_t_unshift.pass.cpp: idem.
    locale.codecvt.byname/
     ctor_wchar_t.pass.cpp: Windows locale names don't follow UNIX convention.
-   locale.ctype/
-    locale.ctype.byname/
-     is_1.pass.cpp: Windows locale names don't follow UNIX convention.
-     is_many.pass.cpp: idem.
-     narrow_1.pass.cpp: idem.
-     narrow_many.pass.cpp: idem.
-     scan_is.pass.cpp: idem.
-     scan_not.pass.cpp: idem.
-     tolower_1.pass.cpp: idem.
-     tolower_many.pass.cpp: idem.
-     toupper_1.pass.cpp: idem.
-     toupper_many.pass.cpp: idem.
-     types.pass.cpp: idem.
-     widen_1.pass.cpp: idem.
-     widen_many.pass.cpp: idem.
+   locale.ctype.byname/
+    is_1.pass.cpp: Windows locale names don't follow UNIX convention.
+    is_many.pass.cpp: idem.
+    narrow_1.pass.cpp: idem.
+    narrow_many.pass.cpp: idem.
+    scan_is.pass.cpp: idem.
+    scan_not.pass.cpp: idem.
+    tolower_1.pass.cpp: idem.
+    tolower_many.pass.cpp: idem.
+    toupper_1.pass.cpp: idem.
+    toupper_many.pass.cpp: idem.
+    types.pass.cpp: idem.
+    widen_1.pass.cpp: idem.
+    widen_many.pass.cpp: idem.
   category.monetary/
    locale.money.get/
     locale.money.get.members/