Skip to content

Commit 83a0327

Browse files
committed
NetBSD src for "user", checkout.sh rev e4b64c3eb681dd6882b01b74a1c37f2f3930cb59
1 parent 86f5d65 commit 83a0327

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+6995
-3560
lines changed

external/bsd/libc++/dist/libcxx/include/__bit_reference

+1-2
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ inline _LIBCPP_INLINE_VISIBILITY
705705
__bit_iterator<_Cp, false>
706706
move_backward(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result)
707707
{
708-
return _VSTD::copy(__first, __last, __result);
708+
return _VSTD::copy_backward(__first, __last, __result);
709709
}
710710

711711
// swap_ranges
@@ -906,7 +906,6 @@ rotate(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __middle,
906906
{
907907
typedef __bit_iterator<_Cp, false> _I1;
908908
typedef typename _I1::difference_type difference_type;
909-
typedef typename _I1::__storage_type __storage_type;
910909
difference_type __d1 = __middle - __first;
911910
difference_type __d2 = __last - __middle;
912911
_I1 __r = __first + __d2;

external/bsd/libc++/dist/libcxx/include/__config

+130-33
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@
1717

1818
#ifdef __GNUC__
1919
#define _GNUC_VER (__GNUC__ * 100 + __GNUC_MINOR__)
20+
#else
21+
#define _GNUC_VER 0
2022
#endif
2123

22-
#define _LIBCPP_VERSION 1101
24+
#define _LIBCPP_VERSION 3800
2325

2426
#define _LIBCPP_ABI_VERSION 1
2527

@@ -28,6 +30,26 @@
2830

2931
#define _LIBCPP_NAMESPACE _LIBCPP_CONCAT(__,_LIBCPP_ABI_VERSION)
3032

33+
34+
#ifndef __has_attribute
35+
#define __has_attribute(__x) 0
36+
#endif
37+
#ifndef __has_builtin
38+
#define __has_builtin(__x) 0
39+
#endif
40+
#ifndef __has_extension
41+
#define __has_extension(__x) 0
42+
#endif
43+
#ifndef __has_feature
44+
#define __has_feature(__x) 0
45+
#endif
46+
// '__is_identifier' returns '0' if '__x' is a reserved identifier provided by
47+
// the compiler and '1' otherwise.
48+
#ifndef __is_identifier
49+
#define __is_identifier(__x) 1
50+
#endif
51+
52+
3153
#ifdef __LITTLE_ENDIAN__
3254
#if __LITTLE_ENDIAN__
3355
#define _LIBCPP_LITTLE_ENDIAN 1
@@ -71,10 +93,8 @@
7193
#ifdef _WIN32
7294
# define _LIBCPP_LITTLE_ENDIAN 1
7395
# define _LIBCPP_BIG_ENDIAN 0
74-
// Compiler intrinsics (GCC or MSVC)
75-
# if defined(__clang__) \
76-
|| (defined(_MSC_VER) && _MSC_VER >= 1400) \
77-
|| (defined(__GNUC__) && _GNUC_VER > 403)
96+
// Compiler intrinsics (MSVC)
97+
#if defined(_MSC_VER) && _MSC_VER >= 1400
7898
# define _LIBCPP_HAS_IS_BASE_OF
7999
# endif
80100
# if defined(_MSC_VER) && !defined(__clang__)
@@ -89,12 +109,6 @@
89109
# endif
90110
#endif // _WIN32
91111

92-
#ifdef __linux__
93-
# if defined(__GNUC__) && _GNUC_VER >= 403
94-
# define _LIBCPP_HAS_IS_BASE_OF
95-
# endif
96-
#endif
97-
98112
#ifdef __sun__
99113
# include <sys/isa_defs.h>
100114
# ifdef _LITTLE_ENDIAN
@@ -106,6 +120,23 @@
106120
# endif
107121
#endif // __sun__
108122

123+
#if defined(__CloudABI__)
124+
// Certain architectures provide arc4random(). Prefer using
125+
// arc4random() over /dev/{u,}random to make it possible to obtain
126+
// random data even when using sandboxing mechanisms such as chroots,
127+
// Capsicum, etc.
128+
# define _LIBCPP_USING_ARC4_RANDOM
129+
#elif defined(__native_client__)
130+
// NaCl's sandbox (which PNaCl also runs in) doesn't allow filesystem access,
131+
// including accesses to the special files under /dev. C++11's
132+
// std::random_device is instead exposed through a NaCl syscall.
133+
# define _LIBCPP_USING_NACL_RANDOM
134+
#elif defined(_WIN32)
135+
# define _LIBCPP_USING_WIN32_RANDOM
136+
#else
137+
# define _LIBCPP_USING_DEV_RANDOM
138+
#endif
139+
109140
#if !defined(_LIBCPP_LITTLE_ENDIAN) || !defined(_LIBCPP_BIG_ENDIAN)
110141
# include <endian.h>
111142
# if __BYTE_ORDER == __LITTLE_ENDIAN
@@ -161,10 +192,6 @@
161192

162193
#endif // _WIN32
163194

164-
#ifndef __has_attribute
165-
#define __has_attribute(__x) 0
166-
#endif
167-
168195
#ifndef _LIBCPP_HIDDEN
169196
#define _LIBCPP_HIDDEN __attribute__ ((__visibility__("hidden")))
170197
#endif
@@ -221,13 +248,9 @@
221248
#endif
222249

223250
#if __cplusplus < 201103L
224-
#ifdef __linux__
225-
#define _LIBCPP_HAS_NO_UNICODE_CHARS
226-
#else
227251
typedef __char16_t char16_t;
228252
typedef __char32_t char32_t;
229253
#endif
230-
#endif
231254

232255
#if !(__has_feature(cxx_exceptions))
233256
#define _LIBCPP_NO_EXCEPTIONS
@@ -251,6 +274,8 @@ typedef __char32_t char32_t;
251274
# define _LIBCPP_NORETURN __attribute__ ((noreturn))
252275
#endif
253276

277+
#define _LIBCPP_UNUSED __attribute__((__unused__))
278+
254279
#if !(__has_feature(cxx_defaulted_functions))
255280
#define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
256281
#endif // !(__has_feature(cxx_defaulted_functions))
@@ -299,6 +324,10 @@ typedef __char32_t char32_t;
299324
# define _LIBCPP_HAS_IS_BASE_OF
300325
#endif
301326

327+
#if __has_feature(is_final)
328+
# define _LIBCPP_HAS_IS_FINAL
329+
#endif
330+
302331
// Objective-C++ features (opt-in)
303332
#if __has_feature(objc_arc)
304333
#define _LIBCPP_HAS_OBJC_ARC
@@ -317,6 +346,10 @@ typedef __char32_t char32_t;
317346
#define _LIBCPP_HAS_NO_CXX14_CONSTEXPR
318347
#endif
319348

349+
#if !(__has_feature(cxx_variable_templates))
350+
#define _LIBCPP_HAS_NO_VARIABLE_TEMPLATES
351+
#endif
352+
320353
#if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L
321354
#if defined(__FreeBSD__)
322355
#define _LIBCPP_HAS_QUICK_EXIT
@@ -373,9 +406,16 @@ namespace std {
373406

374407
#define _LIBCPP_NORETURN __attribute__((noreturn))
375408

409+
#define _LIBCPP_UNUSED __attribute__((__unused__))
410+
376411
#if _GNUC_VER >= 407
377412
#define _LIBCPP_UNDERLYING_TYPE(T) __underlying_type(T)
378413
#define _LIBCPP_IS_LITERAL(T) __is_literal_type(T)
414+
#define _LIBCPP_HAS_IS_FINAL
415+
#endif
416+
417+
#if defined(__GNUC__) && _GNUC_VER >= 403
418+
# define _LIBCPP_HAS_IS_BASE_OF
379419
#endif
380420

381421
#if !__EXCEPTIONS
@@ -394,6 +434,8 @@ namespace std {
394434

395435
// No version of GCC supports relaxed constexpr rules
396436
#define _LIBCPP_HAS_NO_CXX14_CONSTEXPR
437+
// GCC 5 will support variable templates
438+
#define _LIBCPP_HAS_NO_VARIABLE_TEMPLATES
397439

398440
#define _NOEXCEPT throw()
399441
#define _NOEXCEPT_(x)
@@ -465,11 +507,13 @@ using namespace _LIBCPP_NAMESPACE __attribute__((__strong__));
465507
#define _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
466508
#define _LIBCPP_HAS_NO_CONSTEXPR
467509
#define _LIBCPP_HAS_NO_CXX14_CONSTEXPR
510+
#define _LIBCPP_HAS_NO_VARIABLE_TEMPLATES
468511
#define _LIBCPP_HAS_NO_UNICODE_CHARS
469512
#define _LIBCPP_HAS_NO_DELETED_FUNCTIONS
470513
#define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
471514
#define __alignof__ __alignof
472515
#define _LIBCPP_NORETURN __declspec(noreturn)
516+
#define _LIBCPP_UNUSED
473517
#define _ALIGNAS(x) __declspec(align(x))
474518
#define _LIBCPP_HAS_NO_VARIADICS
475519

@@ -493,6 +537,7 @@ namespace std {
493537
#define _ALIGNAS_TYPE(x) __attribute__((__aligned__(__alignof(x))))
494538
#define _ATTRIBUTE(x) __attribute__((x))
495539
#define _LIBCPP_NORETURN __attribute__((noreturn))
540+
#define _LIBCPP_UNUSED
496541

497542
#define _NOEXCEPT throw()
498543
#define _NOEXCEPT_(x)
@@ -505,6 +550,8 @@ namespace std {
505550
#define _LIBCPP_HAS_NO_NULLPTR
506551
#define _LIBCPP_HAS_NO_UNICODE_CHARS
507552
#define _LIBCPP_HAS_IS_BASE_OF
553+
#define _LIBCPP_HAS_IS_FINAL
554+
#define _LIBCPP_HAS_NO_VARIABLE_TEMPLATES
508555

509556
#if defined(_AIX)
510557
#define __MULTILOCALE_API
@@ -544,7 +591,12 @@ template <unsigned> struct __static_assert_check {};
544591
#endif // _LIBCPP_HAS_NO_STATIC_ASSERT
545592

546593
#ifdef _LIBCPP_HAS_NO_DECLTYPE
547-
#define decltype(x) __typeof__(x)
594+
// GCC 4.6 provides __decltype in all standard modes.
595+
#if !__is_identifier(__decltype) || _GNUC_VER >= 406
596+
# define decltype(__x) __decltype(__x)
597+
#else
598+
# define decltype(__x) __typeof__(__x)
599+
#endif
548600
#endif
549601

550602
#ifdef _LIBCPP_HAS_NO_CONSTEXPR
@@ -565,14 +617,6 @@ template <unsigned> struct __static_assert_check {};
565617
#define _NOALIAS
566618
#endif
567619

568-
#ifndef __has_feature
569-
#define __has_feature(__x) 0
570-
#endif
571-
572-
#ifndef __has_builtin
573-
#define __has_builtin(__x) 0
574-
#endif
575-
576620
#if __has_feature(cxx_explicit_conversions) || defined(__IBMCPP__)
577621
# define _LIBCPP_EXPLICIT explicit
578622
#else
@@ -608,7 +652,7 @@ template <unsigned> struct __static_assert_check {};
608652
#endif
609653

610654
#ifndef _LIBCPP_EXTERN_TEMPLATE
611-
#define _LIBCPP_EXTERN_TEMPLATE(...)
655+
#define _LIBCPP_EXTERN_TEMPLATE(...) extern template __VA_ARGS__;
612656
#endif
613657

614658
#ifndef _LIBCPP_EXTERN_TEMPLATE2
@@ -619,10 +663,16 @@ template <unsigned> struct __static_assert_check {};
619663
#define _LIBCPP_NONUNIQUE_RTTI_BIT (1ULL << 63)
620664
#endif
621665

622-
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(_WIN32) || defined(__sun__) || defined(__NetBSD__)
666+
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(_WIN32) || \
667+
defined(__sun__) || defined(__NetBSD__) || defined(__CloudABI__)
623668
#define _LIBCPP_LOCALE__L_EXTENSIONS 1
624669
#endif
625670

671+
#if !defined(_WIN32) && !defined(__ANDROID__) && !defined(_NEWLIB_VERSION) && \
672+
!defined(__CloudABI__)
673+
#define _LIBCPP_HAS_CATOPEN 1
674+
#endif
675+
626676
#ifdef __FreeBSD__
627677
#define _DECLARE_C99_LDBL_MATH 1
628678
#endif
@@ -669,6 +719,12 @@ template <unsigned> struct __static_assert_check {};
669719
#define _LIBCPP_CONSTEXPR_AFTER_CXX11
670720
#endif
671721

722+
#ifdef _LIBCPP_HAS_NO_RVALUE_REFERENCES
723+
# define _LIBCPP_EXPLICIT_MOVE(x) _VSTD::move(x)
724+
#else
725+
# define _LIBCPP_EXPLICIT_MOVE(x) (x)
726+
#endif
727+
672728
#ifndef _LIBCPP_HAS_NO_ASAN
673729
extern "C" void __sanitizer_annotate_contiguous_container(
674730
const void *, const void *, const void *, const void *);
@@ -678,8 +734,8 @@ extern "C" void __sanitizer_annotate_contiguous_container(
678734
// g++ and cl.exe have RTTI on by default and define a macro when it is.
679735
// g++ only defines the macro in 4.3.2 and onwards.
680736
#if !defined(_LIBCPP_NO_RTTI)
681-
# if defined(__GNUG__) && (__GNUC__ >= 4 && \
682-
(__GNUC_MINOR__ >= 3 || __GNUC_PATCHLEVEL__ >= 2)) && !defined(__GXX_RTTI)
737+
# if defined(__GNUG__) && ((__GNUC__ >= 5) || (__GNUC__ == 4 && \
738+
(__GNUC_MINOR__ >= 3 || __GNUC_PATCHLEVEL__ >= 2))) && !defined(__GXX_RTTI)
683739
# define _LIBCPP_NO_RTTI
684740
# elif (defined(_MSC_VER) && !defined(__clang__)) && !defined(_CPPRTTI)
685741
# define _LIBCPP_NO_RTTI
@@ -690,4 +746,45 @@ extern "C" void __sanitizer_annotate_contiguous_container(
690746
# define _LIBCPP_WEAK __attribute__((__weak__))
691747
#endif
692748

693-
#endif // _LIBCPP_CONFIG
749+
#if defined(_LIBCPP_HAS_NO_MONOTONIC_CLOCK) && !defined(_LIBCPP_HAS_NO_THREADS)
750+
# error _LIBCPP_HAS_NO_MONOTONIC_CLOCK may only be defined when \
751+
_LIBCPP_HAS_NO_THREADS is defined.
752+
#endif
753+
754+
// Systems that use capability-based security (FreeBSD with Capsicum,
755+
// Nuxi CloudABI) may only provide local filesystem access (using *at()).
756+
// Functions like open(), rename(), unlink() and stat() should not be
757+
// used, as they attempt to access the global filesystem namespace.
758+
#ifdef __CloudABI__
759+
#define _LIBCPP_HAS_NO_GLOBAL_FILESYSTEM_NAMESPACE
760+
#endif
761+
762+
// CloudABI is intended for running networked services. Processes do not
763+
// have standard input and output channels.
764+
#ifdef __CloudABI__
765+
#define _LIBCPP_HAS_NO_STDIN
766+
#define _LIBCPP_HAS_NO_STDOUT
767+
#endif
768+
769+
#if defined(__ANDROID__) || defined(__CloudABI__)
770+
#define _LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE
771+
#endif
772+
773+
// Thread-unsafe functions such as strtok(), mbtowc() and localtime()
774+
// are not available.
775+
#ifdef __CloudABI__
776+
#define _LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS
777+
#endif
778+
779+
#if __has_extension(c_atomic)
780+
#define _LIBCPP_HAS_C_ATOMIC_IMP
781+
#elif _GNUC_VER > 407
782+
#define _LIBCPP_HAS_GCC_ATOMIC_IMP
783+
#endif
784+
785+
#if (!defined(_LIBCPP_HAS_C_ATOMIC_IMP) && !defined(_LIBCPP_HAS_GCC_ATOMIC_IMP)) \
786+
|| defined(_LIBCPP_HAS_NO_THREADS)
787+
#define _LIBCPP_HAS_NO_ATOMIC_HEADER
788+
#endif
789+
790+
#endif // _LIBCPP_CONFIG

external/bsd/libc++/dist/libcxx/include/__debug

+6-2
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,23 @@
1111
#ifndef _LIBCPP_DEBUG_H
1212
#define _LIBCPP_DEBUG_H
1313

14+
#include <__config>
15+
1416
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
1517
#pragma GCC system_header
1618
#endif
1719

1820
#if _LIBCPP_DEBUG_LEVEL >= 1
19-
2021
# include <cstdlib>
2122
# include <cstdio>
2223
# include <cstddef>
2324
# ifndef _LIBCPP_ASSERT
24-
# define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : (_VSTD::printf("%s\n", m), _VSTD::abort()))
25+
# define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : (_VSTD::fprintf(stderr, "%s\n", m), _VSTD::abort()))
2526
# endif
27+
#endif
2628

29+
#ifndef _LIBCPP_ASSERT
30+
# define _LIBCPP_ASSERT(x, m) ((void)0)
2731
#endif
2832

2933
#if _LIBCPP_DEBUG_LEVEL >= 2

0 commit comments

Comments
 (0)