summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/autoconf/android.m46
-rw-r--r--build/moz.configure/keyfiles.configure4
-rw-r--r--gfx/cairo/libpixman/src/pixman.h10
-rw-r--r--gfx/harfbuzz/src/hb-common.h10
-rw-r--r--gfx/harfbuzz/src/hb-private.hh4
-rw-r--r--mfbt/Span.h202
-rwxr-xr-xnetwerk/sctp/src/netinet/sctp_os_userspace.h37
-rw-r--r--old-configure.in64
-rw-r--r--parser/expat/lib/expat_external.h5
-rw-r--r--toolkit/content/license.html36
-rw-r--r--toolkit/modules/AppConstants.jsm7
-rw-r--r--toolkit/mozapps/update/common/updatedefines.h3
12 files changed, 91 insertions, 297 deletions
diff --git a/build/autoconf/android.m4 b/build/autoconf/android.m4
index 4ab6d5a82..6c55a3f3f 100644
--- a/build/autoconf/android.m4
+++ b/build/autoconf/android.m4
@@ -210,12 +210,6 @@ fi
AC_DEFUN([MOZ_ANDROID_INSTALL_TRACKING],
[
-if test -n "$MOZ_INSTALL_TRACKING"; then
- AC_SUBST(MOZ_INSTALL_TRACKING)
- MOZ_ANDROID_AAR(play-services-ads, $ANDROID_GOOGLE_PLAY_SERVICES_VERSION, google, com/google/android/gms)
- MOZ_ANDROID_AAR(play-services-basement, $ANDROID_GOOGLE_PLAY_SERVICES_VERSION, google, com/google/android/gms)
-fi
-
])
dnl Configure an Android SDK.
diff --git a/build/moz.configure/keyfiles.configure b/build/moz.configure/keyfiles.configure
index 99df5050c..92aea5eda 100644
--- a/build/moz.configure/keyfiles.configure
+++ b/build/moz.configure/keyfiles.configure
@@ -36,10 +36,6 @@ def keyfile(desc, help=None, callback=lambda x: x):
def simple_keyfile(desc):
value = keyfile(desc)
set_config('MOZ_%s_KEY' % desc.upper().replace(' ', '_'), value)
- # Only really required for MOZ_ADJUST_SDK_KEY currently still used in
- # old-configure.
- add_old_configure_assignment('MOZ_%s_KEY' % desc.upper().replace(' ', '_'),
- value)
@template
diff --git a/gfx/cairo/libpixman/src/pixman.h b/gfx/cairo/libpixman/src/pixman.h
index 23408b028..893adc50e 100644
--- a/gfx/cairo/libpixman/src/pixman.h
+++ b/gfx/cairo/libpixman/src/pixman.h
@@ -94,16 +94,6 @@ PIXMAN_BEGIN_DECLS
#if defined (_SVR4) || defined (SVR4) || defined (__OpenBSD__) || defined (_sgi) || defined (__sun) || defined (sun) || defined (__digital__) || defined (__HP_cc)
# include <inttypes.h>
-/* VS 2010 (_MSC_VER 1600) has stdint.h */
-#elif defined (_MSC_VER) && _MSC_VER < 1600
-typedef __int8 int8_t;
-typedef unsigned __int8 uint8_t;
-typedef __int16 int16_t;
-typedef unsigned __int16 uint16_t;
-typedef __int32 int32_t;
-typedef unsigned __int32 uint32_t;
-typedef __int64 int64_t;
-typedef unsigned __int64 uint64_t;
#else
# include <stdint.h>
#endif
diff --git a/gfx/harfbuzz/src/hb-common.h b/gfx/harfbuzz/src/hb-common.h
index 2cbee76a8..2e17d4bb0 100644
--- a/gfx/harfbuzz/src/hb-common.h
+++ b/gfx/harfbuzz/src/hb-common.h
@@ -51,16 +51,6 @@
# include <inttypes.h>
#elif defined (_AIX)
# include <sys/inttypes.h>
-/* VS 2010 (_MSC_VER 1600) has stdint.h */
-#elif defined (_MSC_VER) && _MSC_VER < 1600
-typedef __int8 int8_t;
-typedef unsigned __int8 uint8_t;
-typedef __int16 int16_t;
-typedef unsigned __int16 uint16_t;
-typedef __int32 int32_t;
-typedef unsigned __int32 uint32_t;
-typedef __int64 int64_t;
-typedef unsigned __int64 uint64_t;
#else
# include <stdint.h>
#endif
diff --git a/gfx/harfbuzz/src/hb-private.hh b/gfx/harfbuzz/src/hb-private.hh
index 666af6260..c1418d8a5 100644
--- a/gfx/harfbuzz/src/hb-private.hh
+++ b/gfx/harfbuzz/src/hb-private.hh
@@ -178,9 +178,7 @@ static int errno = 0; /* Use something better? */
# elif defined(WINAPI_FAMILY) && (WINAPI_FAMILY==WINAPI_FAMILY_PC_APP || WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP)
# define getenv(Name) NULL
# endif
-# if defined(_MSC_VER) && _MSC_VER < 1900
-# define snprintf _snprintf
-# elif defined(_MSC_VER) && _MSC_VER >= 1900
+# if defined(_MSC_VER)
# /* Covers VC++ Error for strdup being a deprecated POSIX name and to instead use _strdup instead */
# define strdup _strdup
# endif
diff --git a/mfbt/Span.h b/mfbt/Span.h
index f031a928b..e71e068c6 100644
--- a/mfbt/Span.h
+++ b/mfbt/Span.h
@@ -1,6 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2015 Microsoft Corporation. All rights reserved.
+// Copyright (c) 2020 Moonchild Productions. All rights reserved.
//
// This code is licensed under the MIT License (MIT).
//
@@ -33,15 +34,6 @@
#include <cstring>
#include <iterator>
-// Classifications for reasons why constexpr was removed in C++14 to C++11
-// conversion. Once we upgrade compilers, we can try defining each of these
-// to constexpr to restore a category of constexprs at a time.
-#define MOZ_SPAN_ASSERTION_CONSTEXPR
-#define MOZ_SPAN_GCC_CONSTEXPR
-#define MOZ_SPAN_EXPLICITLY_DEFAULTED_CONSTEXPR
-#define MOZ_SPAN_CONSTEXPR_NOT_JUST_RETURN
-#define MOZ_SPAN_NON_CONST_CONSTEXPR
-
#ifdef _MSC_VER
#pragma warning(push)
@@ -53,11 +45,6 @@
// more targeted suppressions will be added in a future update to the GSL
#pragma warning(disable : 26481 26482 26483 26485 26490 26491 26492 26493 26495)
-#if _MSC_VER < 1910
-#pragma push_macro("constexpr")
-#define constexpr /*constexpr*/
-
-#endif // _MSC_VER < 1910
#endif // _MSC_VER
namespace mozilla {
@@ -66,7 +53,7 @@ namespace mozilla {
// narrow_cast(): a searchable way to do narrowing casts of values
template<class T, class U>
-inline constexpr T
+inline T
narrow_cast(U&& u)
{
return static_cast<T>(mozilla::Forward<U>(u));
@@ -79,7 +66,7 @@ narrow_cast(U&& u)
// and reserving a magic value that realistically doesn't occur in
// compile-time-constant Span sizes makes things a lot less messy in terms of
// comparison between signed and unsigned.
-constexpr const size_t dynamic_extent = mozilla::MaxValue<size_t>::value;
+const size_t dynamic_extent = mozilla::MaxValue<size_t>::value;
template<class ElementType, size_t Extent = dynamic_extent>
class Span;
@@ -157,10 +144,9 @@ public:
using reference = conditional_t<IsConst, const element_type_, element_type_>&;
using pointer = add_pointer_t<reference>;
- constexpr span_iterator() : span_iterator(nullptr, 0) {}
+ span_iterator() : span_iterator(nullptr, 0) {}
- MOZ_SPAN_ASSERTION_CONSTEXPR span_iterator(const Span* span,
- typename Span::index_type index)
+ span_iterator(const Span* span, typename Span::index_type index)
: span_(span)
, index_(index)
{
@@ -169,62 +155,62 @@ public:
}
friend class span_iterator<Span, true>;
- constexpr MOZ_IMPLICIT span_iterator(const span_iterator<Span, false>& other)
+ MOZ_IMPLICIT span_iterator(const span_iterator<Span, false>& other)
: span_iterator(other.span_, other.index_)
{
}
- MOZ_SPAN_EXPLICITLY_DEFAULTED_CONSTEXPR span_iterator<Span, IsConst>&
+ span_iterator<Span, IsConst>&
operator=(const span_iterator<Span, IsConst>&) = default;
- MOZ_SPAN_GCC_CONSTEXPR reference operator*() const
+ reference operator*() const
{
MOZ_RELEASE_ASSERT(span_);
return (*span_)[index_];
}
- MOZ_SPAN_GCC_CONSTEXPR pointer operator->() const
+ pointer operator->() const
{
MOZ_RELEASE_ASSERT(span_);
return &((*span_)[index_]);
}
- MOZ_SPAN_NON_CONST_CONSTEXPR span_iterator& operator++()
+ span_iterator& operator++()
{
MOZ_RELEASE_ASSERT(span_ && index_ >= 0 && index_ < span_->Length());
++index_;
return *this;
}
- MOZ_SPAN_NON_CONST_CONSTEXPR span_iterator operator++(int)
+ span_iterator operator++(int)
{
auto ret = *this;
++(*this);
return ret;
}
- MOZ_SPAN_NON_CONST_CONSTEXPR span_iterator& operator--()
+ span_iterator& operator--()
{
MOZ_RELEASE_ASSERT(span_ && index_ > 0 && index_ <= span_->Length());
--index_;
return *this;
}
- MOZ_SPAN_NON_CONST_CONSTEXPR span_iterator operator--(int)
+ span_iterator operator--(int)
{
auto ret = *this;
--(*this);
return ret;
}
- MOZ_SPAN_CONSTEXPR_NOT_JUST_RETURN span_iterator
+ span_iterator
operator+(difference_type n) const
{
auto ret = *this;
return ret += n;
}
- MOZ_SPAN_GCC_CONSTEXPR span_iterator& operator+=(difference_type n)
+ span_iterator& operator+=(difference_type n)
{
MOZ_RELEASE_ASSERT(span_ && (index_ + n) >= 0 &&
(index_ + n) <= span_->Length());
@@ -232,64 +218,59 @@ public:
return *this;
}
- MOZ_SPAN_CONSTEXPR_NOT_JUST_RETURN span_iterator
+ span_iterator
operator-(difference_type n) const
{
auto ret = *this;
return ret -= n;
}
- MOZ_SPAN_NON_CONST_CONSTEXPR span_iterator& operator-=(difference_type n)
-
+ span_iterator& operator-=(difference_type n)
{
return *this += -n;
}
- MOZ_SPAN_GCC_CONSTEXPR difference_type
+ difference_type
operator-(const span_iterator& rhs) const
{
MOZ_RELEASE_ASSERT(span_ == rhs.span_);
return index_ - rhs.index_;
}
- constexpr reference operator[](difference_type n) const
+ reference operator[](difference_type n) const
{
return *(*this + n);
}
- constexpr friend bool operator==(const span_iterator& lhs,
+ friend bool operator==(const span_iterator& lhs,
const span_iterator& rhs)
{
return lhs.span_ == rhs.span_ && lhs.index_ == rhs.index_;
}
- constexpr friend bool operator!=(const span_iterator& lhs,
+ friend bool operator!=(const span_iterator& lhs,
const span_iterator& rhs)
{
return !(lhs == rhs);
}
- MOZ_SPAN_GCC_CONSTEXPR friend bool operator<(const span_iterator& lhs,
- const span_iterator& rhs)
+ friend bool operator<(const span_iterator& lhs, const span_iterator& rhs)
{
MOZ_RELEASE_ASSERT(lhs.span_ == rhs.span_);
return lhs.index_ < rhs.index_;
}
- MOZ_SPAN_GCC_CONSTEXPR friend bool operator<=(const span_iterator& lhs,
- const span_iterator& rhs)
+ friend bool operator<=(const span_iterator& lhs, const span_iterator& rhs)
{
return !(rhs < lhs);
}
- MOZ_SPAN_GCC_CONSTEXPR friend bool operator>(const span_iterator& lhs,
- const span_iterator& rhs)
+ friend bool operator>(const span_iterator& lhs, const span_iterator& rhs)
{
return rhs < lhs;
}
- MOZ_SPAN_GCC_CONSTEXPR friend bool operator>=(const span_iterator& lhs,
- const span_iterator& rhs)
+ friend bool operator>=(const span_iterator& lhs, const span_iterator& rhs)
{
return !(rhs > lhs);
}
@@ -306,7 +287,7 @@ protected:
};
template<class Span, bool IsConst>
-inline constexpr span_iterator<Span, IsConst>
+inline span_iterator<Span, IsConst>
operator+(typename span_iterator<Span, IsConst>::difference_type n,
const span_iterator<Span, IsConst>& rhs)
{
@@ -321,10 +302,10 @@ public:
static_assert(Ext >= 0, "A fixed-size Span must be >= 0 in size.");
- constexpr extent_type() {}
+ extent_type() {}
template<index_type Other>
- MOZ_SPAN_ASSERTION_CONSTEXPR MOZ_IMPLICIT extent_type(extent_type<Other> ext)
+ MOZ_IMPLICIT extent_type(extent_type<Other> ext)
{
static_assert(
Other == Ext || Other == dynamic_extent,
@@ -332,12 +313,12 @@ public:
MOZ_RELEASE_ASSERT(ext.size() == Ext);
}
- MOZ_SPAN_ASSERTION_CONSTEXPR MOZ_IMPLICIT extent_type(index_type length)
+ MOZ_IMPLICIT extent_type(index_type length)
{
MOZ_RELEASE_ASSERT(length == Ext);
}
- constexpr index_type size() const { return Ext; }
+ index_type size() const { return Ext; }
};
template<>
@@ -347,17 +328,17 @@ public:
using index_type = size_t;
template<index_type Other>
- explicit constexpr extent_type(extent_type<Other> ext)
+ explicit extent_type(extent_type<Other> ext)
: size_(ext.size())
{
}
- explicit constexpr extent_type(index_type length)
+ explicit extent_type(index_type length)
: size_(length)
{
}
- constexpr index_type size() const { return size_; }
+ index_type size() const { return size_; }
private:
index_type size_;
@@ -442,7 +423,7 @@ public:
using reverse_iterator = std::reverse_iterator<iterator>;
using const_reverse_iterator = std::reverse_iterator<const_iterator>;
- constexpr static const index_type extent = Extent;
+ static const index_type extent = Extent;
// [Span.cons], Span constructors, copy, assignment, and destructor
// "Dependent" is needed to make "span_details::enable_if_t<(Dependent || Extent == 0 || Extent == mozilla::MaxValue<size_t>::value)>" SFINAE,
@@ -454,7 +435,7 @@ public:
bool Dependent = false,
class = span_details::enable_if_t<
(Dependent || Extent == 0 || Extent == mozilla::MaxValue<size_t>::value)>>
- constexpr Span()
+ Span()
: storage_(nullptr, span_details::extent_type<0>())
{
}
@@ -462,12 +443,12 @@ public:
/**
* Constructor for nullptr.
*/
- constexpr MOZ_IMPLICIT Span(std::nullptr_t) : Span() {}
+ MOZ_IMPLICIT Span(std::nullptr_t) : Span() {}
/**
* Constructor for pointer and length.
*/
- constexpr Span(pointer aPtr, index_type aLength)
+ Span(pointer aPtr, index_type aLength)
: storage_(aPtr, aLength)
{
}
@@ -475,7 +456,7 @@ public:
/**
* Constructor for start pointer and pointer past end.
*/
- constexpr Span(pointer aStartPtr, pointer aEndPtr)
+ Span(pointer aStartPtr, pointer aEndPtr)
: storage_(aStartPtr, std::distance(aStartPtr, aEndPtr))
{
}
@@ -484,7 +465,7 @@ public:
* Constructor for C array.
*/
template<size_t N>
- constexpr MOZ_IMPLICIT Span(element_type (&aArr)[N])
+ MOZ_IMPLICIT Span(element_type (&aArr)[N])
: storage_(&aArr[0], span_details::extent_type<N>())
{
}
@@ -494,7 +475,7 @@ public:
*/
template<size_t N,
class ArrayElementType = span_details::remove_const_t<element_type>>
- constexpr MOZ_IMPLICIT Span(std::array<ArrayElementType, N>& aArr)
+ MOZ_IMPLICIT Span(std::array<ArrayElementType, N>& aArr)
: storage_(&aArr[0], span_details::extent_type<N>())
{
}
@@ -503,7 +484,7 @@ public:
* Constructor for const std::array.
*/
template<size_t N>
- constexpr MOZ_IMPLICIT Span(
+ MOZ_IMPLICIT Span(
const std::array<span_details::remove_const_t<element_type>, N>& aArr)
: storage_(&aArr[0], span_details::extent_type<N>())
{
@@ -514,7 +495,7 @@ public:
*/
template<size_t N,
class ArrayElementType = span_details::remove_const_t<element_type>>
- constexpr MOZ_IMPLICIT Span(mozilla::Array<ArrayElementType, N>& aArr)
+ MOZ_IMPLICIT Span(mozilla::Array<ArrayElementType, N>& aArr)
: storage_(&aArr[0], span_details::extent_type<N>())
{
}
@@ -523,7 +504,7 @@ public:
* Constructor for const mozilla::Array.
*/
template<size_t N>
- constexpr MOZ_IMPLICIT Span(
+ MOZ_IMPLICIT Span(
const mozilla::Array<span_details::remove_const_t<element_type>, N>& aArr)
: storage_(&aArr[0], span_details::extent_type<N>())
{
@@ -533,7 +514,7 @@ public:
* Constructor for mozilla::UniquePtr holding an array and length.
*/
template<class ArrayElementType = std::add_pointer<element_type>>
- constexpr Span(const mozilla::UniquePtr<ArrayElementType>& aPtr,
+ Span(const mozilla::UniquePtr<ArrayElementType>& aPtr,
index_type aLength)
: storage_(aPtr.get(), aLength)
{
@@ -552,7 +533,7 @@ public:
mozilla::IsConvertible<typename Container::pointer, pointer>::value &&
mozilla::IsConvertible<typename Container::pointer,
decltype(mozilla::DeclVal<Container>().data())>::value>>
- constexpr MOZ_IMPLICIT Span(Container& cont)
+ MOZ_IMPLICIT Span(Container& cont)
: Span(cont.data(), ReleaseAssertedCast<index_type>(cont.size()))
{
}
@@ -568,7 +549,7 @@ public:
mozilla::IsConvertible<typename Container::pointer, pointer>::value &&
mozilla::IsConvertible<typename Container::pointer,
decltype(mozilla::DeclVal<Container>().data())>::value>>
- constexpr MOZ_IMPLICIT Span(const Container& cont)
+ MOZ_IMPLICIT Span(const Container& cont)
: Span(cont.data(), ReleaseAssertedCast<index_type>(cont.size()))
{
}
@@ -576,12 +557,12 @@ public:
/**
* Constructor from other Span.
*/
- constexpr Span(const Span& other) = default;
+ Span(const Span& other) = default;
/**
* Constructor from other Span.
*/
- constexpr Span(Span&& other) = default;
+ Span(Span&& other) = default;
/**
* Constructor from other Span with conversion of element type.
@@ -593,7 +574,7 @@ public:
span_details::is_allowed_extent_conversion<OtherExtent, Extent>::value &&
span_details::is_allowed_element_type_conversion<OtherElementType,
element_type>::value>>
- constexpr MOZ_IMPLICIT Span(const Span<OtherElementType, OtherExtent>& other)
+ MOZ_IMPLICIT Span(const Span<OtherElementType, OtherExtent>& other)
: storage_(other.data(),
span_details::extent_type<OtherExtent>(other.size()))
{
@@ -609,17 +590,17 @@ public:
span_details::is_allowed_extent_conversion<OtherExtent, Extent>::value &&
span_details::is_allowed_element_type_conversion<OtherElementType,
element_type>::value>>
- constexpr MOZ_IMPLICIT Span(Span<OtherElementType, OtherExtent>&& other)
+ MOZ_IMPLICIT Span(Span<OtherElementType, OtherExtent>&& other)
: storage_(other.data(),
span_details::extent_type<OtherExtent>(other.size()))
{
}
~Span() = default;
- MOZ_SPAN_EXPLICITLY_DEFAULTED_CONSTEXPR Span& operator=(const Span& other)
+ Span& operator=(const Span& other)
= default;
- MOZ_SPAN_EXPLICITLY_DEFAULTED_CONSTEXPR Span& operator=(Span&& other)
+ Span& operator=(Span&& other)
= default;
// [Span.sub], Span subviews
@@ -627,7 +608,7 @@ public:
* Subspan with first N elements with compile-time N.
*/
template<size_t Count>
- MOZ_SPAN_GCC_CONSTEXPR Span<element_type, Count> First() const
+ Span<element_type, Count> First() const
{
MOZ_RELEASE_ASSERT(Count <= size());
return { data(), Count };
@@ -637,7 +618,7 @@ public:
* Subspan with last N elements with compile-time N.
*/
template<size_t Count>
- MOZ_SPAN_GCC_CONSTEXPR Span<element_type, Count> Last() const
+ Span<element_type, Count> Last() const
{
MOZ_RELEASE_ASSERT(Count <= size());
return { data() + (size() - Count), Count };
@@ -647,7 +628,7 @@ public:
* Subspan with compile-time start index and length.
*/
template<size_t Offset, size_t Count = dynamic_extent>
- MOZ_SPAN_GCC_CONSTEXPR Span<element_type, Count> Subspan() const
+ Span<element_type, Count> Subspan() const
{
MOZ_RELEASE_ASSERT(Offset <= size() &&
(Count == dynamic_extent || (Offset + Count <= size())));
@@ -658,7 +639,7 @@ public:
/**
* Subspan with first N elements with run-time N.
*/
- MOZ_SPAN_GCC_CONSTEXPR Span<element_type, dynamic_extent> First(
+ Span<element_type, dynamic_extent> First(
index_type aCount) const
{
MOZ_RELEASE_ASSERT(aCount <= size());
@@ -668,7 +649,7 @@ public:
/**
* Subspan with last N elements with run-time N.
*/
- MOZ_SPAN_GCC_CONSTEXPR Span<element_type, dynamic_extent> Last(
+ Span<element_type, dynamic_extent> Last(
index_type aCount) const
{
MOZ_RELEASE_ASSERT(aCount <= size());
@@ -678,7 +659,7 @@ public:
/**
* Subspan with run-time start index and length.
*/
- MOZ_SPAN_GCC_CONSTEXPR Span<element_type, dynamic_extent> Subspan(
+ Span<element_type, dynamic_extent> Subspan(
index_type aStart,
index_type aLength = dynamic_extent) const
{
@@ -692,8 +673,7 @@ public:
/**
* Subspan with run-time start index. (Rust's &foo[start..])
*/
- MOZ_SPAN_GCC_CONSTEXPR Span<element_type, dynamic_extent> From(
- index_type aStart) const
+ Span<element_type, dynamic_extent> From(index_type aStart) const
{
return Subspan(aStart);
}
@@ -701,8 +681,7 @@ public:
/**
* Subspan with run-time exclusive end index. (Rust's &foo[..end])
*/
- MOZ_SPAN_GCC_CONSTEXPR Span<element_type, dynamic_extent> To(
- index_type aEnd) const
+ Span<element_type, dynamic_extent> To(index_type aEnd) const
{
return Subspan(0, aEnd);
}
@@ -711,9 +690,7 @@ public:
* Subspan with run-time start index and exclusive end index.
* (Rust's &foo[start..end])
*/
- MOZ_SPAN_GCC_CONSTEXPR Span<element_type, dynamic_extent> FromTo(
- index_type aStart,
- index_type aEnd) const
+ Span<element_type, dynamic_extent> FromTo(index_type aStart, index_type aEnd) const
{
MOZ_RELEASE_ASSERT(aStart <= aEnd);
return Subspan(aStart, aEnd - aStart);
@@ -723,22 +700,22 @@ public:
/**
* Number of elements in the span.
*/
- constexpr index_type Length() const { return size(); }
+ index_type Length() const { return size(); }
/**
* Number of elements in the span (standard-libray duck typing version).
*/
- constexpr index_type size() const { return storage_.size(); }
+ index_type size() const { return storage_.size(); }
/**
* Size of the span in bytes.
*/
- constexpr index_type LengthBytes() const { return size_bytes(); }
+ index_type LengthBytes() const { return size_bytes(); }
/**
* Size of the span in bytes (standard-library naming style version).
*/
- constexpr index_type size_bytes() const
+ index_type size_bytes() const
{
return size() * narrow_cast<index_type>(sizeof(element_type));
}
@@ -746,16 +723,16 @@ public:
/**
* Checks if the the length of the span is zero.
*/
- constexpr bool IsEmpty() const { return empty(); }
+ bool IsEmpty() const { return empty(); }
/**
* Checks if the the length of the span is zero (standard-libray duck
* typing version).
*/
- constexpr bool empty() const { return size() == 0; }
+ bool empty() const { return size() == 0; }
// [Span.elem], Span element access
- MOZ_SPAN_GCC_CONSTEXPR reference operator[](index_type idx) const
+ reference operator[](index_type idx) const
{
MOZ_RELEASE_ASSERT(idx < storage_.size());
return data()[idx];
@@ -764,9 +741,9 @@ public:
/**
* Access element of span by index (standard-library duck typing version).
*/
- constexpr reference at(index_type idx) const { return this->operator[](idx); }
+ reference at(index_type idx) const { return this->operator[](idx); }
- constexpr reference operator()(index_type idx) const
+ reference operator()(index_type idx) const
{
return this->operator[](idx);
}
@@ -774,12 +751,12 @@ public:
/**
* Pointer to the first element of the span.
*/
- constexpr pointer Elements() const { return data(); }
+ pointer Elements() const { return data(); }
/**
* Pointer to the first element of the span (standard-libray duck typing version).
*/
- constexpr pointer data() const { return storage_.data(); }
+ pointer data() const { return storage_.data(); }
// [Span.iter], Span iterator support
iterator begin() const { return { this, 0 }; }
@@ -815,8 +792,7 @@ private:
{
public:
template<class OtherExtentType>
- MOZ_SPAN_ASSERTION_CONSTEXPR storage_type(pointer elements,
- OtherExtentType ext)
+ storage_type(pointer elements, OtherExtentType ext)
: ExtentType(ext)
, data_(elements)
{
@@ -825,7 +801,7 @@ private:
(elements && ExtentType::size() != mozilla::MaxValue<size_t>::value));
}
- constexpr pointer data() const { return data_; }
+ pointer data() const { return data_; }
private:
pointer data_;
@@ -836,7 +812,7 @@ private:
// [Span.comparison], Span comparison operators
template<class ElementType, size_t FirstExtent, size_t SecondExtent>
-inline constexpr bool
+inline bool
operator==(const Span<ElementType, FirstExtent>& l,
const Span<ElementType, SecondExtent>& r)
{
@@ -844,7 +820,7 @@ operator==(const Span<ElementType, FirstExtent>& l,
}
template<class ElementType, size_t Extent>
-inline constexpr bool
+inline bool
operator!=(const Span<ElementType, Extent>& l,
const Span<ElementType, Extent>& r)
{
@@ -852,7 +828,7 @@ operator!=(const Span<ElementType, Extent>& l,
}
template<class ElementType, size_t Extent>
-inline constexpr bool
+inline bool
operator<(const Span<ElementType, Extent>& l,
const Span<ElementType, Extent>& r)
{
@@ -860,7 +836,7 @@ operator<(const Span<ElementType, Extent>& l,
}
template<class ElementType, size_t Extent>
-inline constexpr bool
+inline bool
operator<=(const Span<ElementType, Extent>& l,
const Span<ElementType, Extent>& r)
{
@@ -868,7 +844,7 @@ operator<=(const Span<ElementType, Extent>& l,
}
template<class ElementType, size_t Extent>
-inline constexpr bool
+inline bool
operator>(const Span<ElementType, Extent>& l,
const Span<ElementType, Extent>& r)
{
@@ -876,7 +852,7 @@ operator>(const Span<ElementType, Extent>& l,
}
template<class ElementType, size_t Extent>
-inline constexpr bool
+inline bool
operator>=(const Span<ElementType, Extent>& l,
const Span<ElementType, Extent>& r)
{
@@ -884,12 +860,6 @@ operator>=(const Span<ElementType, Extent>& l,
}
namespace span_details {
-// if we only supported compilers with good constexpr support then
-// this pair of classes could collapse down to a constexpr function
-
-// we should use a narrow_cast<> to go to size_t, but older compilers may not see it as
-// constexpr
-// and so will fail compilation of the template
template<class ElementType, size_t Extent>
struct calculate_byte_size
: mozilla::IntegralConstant<size_t,
@@ -1023,19 +993,7 @@ MakeCStringSpan(const char* aStr)
} // namespace mozilla
#ifdef _MSC_VER
-#if _MSC_VER < 1910
-#undef constexpr
-#pragma pop_macro("constexpr")
-
-#endif // _MSC_VER < 1910
-
#pragma warning(pop)
#endif // _MSC_VER
-#undef MOZ_SPAN_ASSERTION_CONSTEXPR
-#undef MOZ_SPAN_GCC_CONSTEXPR
-#undef MOZ_SPAN_EXPLICITLY_DEFAULTED_CONSTEXPR
-#undef MOZ_SPAN_CONSTEXPR_NOT_JUST_RETURN
-#undef MOZ_SPAN_NON_CONST_CONSTEXPR
-
#endif // mozilla_Span_h
diff --git a/netwerk/sctp/src/netinet/sctp_os_userspace.h b/netwerk/sctp/src/netinet/sctp_os_userspace.h
index 13df42423..46d6ba9c2 100755
--- a/netwerk/sctp/src/netinet/sctp_os_userspace.h
+++ b/netwerk/sctp/src/netinet/sctp_os_userspace.h
@@ -3,6 +3,7 @@
* Copyright (c) 2008-2011, by Randall Stewart. All rights reserved.
* Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved.
* Copyright (c) 2008-2011, by Brad Penoff. All rights reserved.
+ * Copyright (c) 2020 by Moonchild Productions. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -49,46 +50,13 @@
#include <Windows.h>
#include "user_environment.h"
typedef CRITICAL_SECTION userland_mutex_t;
-#if WINVER < 0x0600
-enum {
- C_SIGNAL = 0,
- C_BROADCAST = 1,
- C_MAX_EVENTS = 2
-};
-typedef struct
-{
- u_int waiters_count;
- CRITICAL_SECTION waiters_count_lock;
- HANDLE events_[C_MAX_EVENTS];
-} userland_cond_t;
-void InitializeXPConditionVariable(userland_cond_t *);
-void DeleteXPConditionVariable(userland_cond_t *);
-int SleepXPConditionVariable(userland_cond_t *, userland_mutex_t *);
-void WakeAllXPConditionVariable(userland_cond_t *);
-#define InitializeConditionVariable(cond) InitializeXPConditionVariable(cond)
-#define DeleteConditionVariable(cond) DeleteXPConditionVariable(cond)
-#define SleepConditionVariableCS(cond, mtx, time) SleepXPConditionVariable(cond, mtx)
-#define WakeAllConditionVariable(cond) WakeAllXPConditionVariable(cond)
-#else
#define DeleteConditionVariable(cond)
typedef CONDITION_VARIABLE userland_cond_t;
-#endif
typedef HANDLE userland_thread_t;
#define ADDRESS_FAMILY unsigned __int8
#define IPVERSION 4
#define MAXTTL 255
-/* VS2010 comes with stdint.h */
-#if _MSC_VER >= 1600
#include <stdint.h>
-#else
-#define uint64_t unsigned __int64
-#define uint32_t unsigned __int32
-#define int32_t __int32
-#define uint16_t unsigned __int16
-#define int16_t __int16
-#define uint8_t unsigned __int8
-#define int8_t __int8
-#endif
#ifndef _SIZE_T_DEFINED
#define size_t __int32
#endif
@@ -218,9 +186,6 @@ typedef char* caddr_t;
#define bzero(buf, len) memset(buf, 0, len)
#define bcopy(srcKey, dstKey, len) memcpy(dstKey, srcKey, len)
-#if _MSC_VER < 1900
-#define snprintf(data, size, format, ...) _snprintf_s(data, size, _TRUNCATE, format, __VA_ARGS__)
-#endif
#define inline __inline
#define __inline__ __inline
#define MSG_EOR 0x8 /* data completes record */
diff --git a/old-configure.in b/old-configure.in
index ade675e95..c06687f14 100644
--- a/old-configure.in
+++ b/old-configure.in
@@ -961,16 +961,10 @@ case "$target" in
CXXFLAGS="$CXXFLAGS -utf-8"
fi
if test "$CPU_ARCH" = "x86"; then
- dnl VS2012+ defaults to -arch:SSE2. We want to target nothing
- dnl more recent, so set that explicitly here unless another
- dnl target arch has already been set.
changequote(,)
- if test -z `echo $CFLAGS | grep -i [-/]arch:`; then
- CFLAGS="$CFLAGS -arch:SSE2"
- fi
- if test -z `echo $CXXFLAGS | grep -i [-/]arch:`; then
- CXXFLAGS="$CXXFLAGS -arch:SSE2"
- fi
+ dnl VS2012+ defaults to -arch:SSE2. We want to target nothing
+ dnl more recent, so no need to set it explicitly in the default
+ dnl case.
changequote([,])
SSE_FLAGS="-arch:SSE"
SSE2_FLAGS="-arch:SSE2"
@@ -1086,15 +1080,15 @@ case "$target" in
WARNINGS_AS_ERRORS='-WX'
MOZ_OPTIMIZE_FLAGS='-O1 -Oi'
MOZ_FIX_LINK_PATHS=
- LDFLAGS="$LDFLAGS -LARGEADDRESSAWARE -NXCOMPAT"
+ num_cores=$($PYTHON -c 'import multiprocessing; print(min(8,multiprocessing.cpu_count()))')
+ cgthreads="-CGTHREADS:${num_cores}"
+ LDFLAGS="$LDFLAGS -LARGEADDRESSAWARE -NXCOMPAT -DYNAMICBASE -OPT:REF -OPT:ICF=${num_cores} $cgthreads"
if test -z "$DEVELOPER_OPTIONS"; then
LDFLAGS="$LDFLAGS -RELEASE"
fi
dnl For profile-guided optimization
PROFILE_GEN_CFLAGS="-GL"
- num_cores=$($PYTHON -c 'import multiprocessing; print(min(8,multiprocessing.cpu_count()))')
- cgthreads="-CGTHREADS:${num_cores}"
- PROFILE_GEN_LDFLAGS="-LTCG:PGINSTRUMENT -PogoSafeMode $cgthreads"
+ PROFILE_GEN_LDFLAGS="-LTCG:PGINSTRUMENT"
dnl XXX: PGO builds can fail with warnings treated as errors,
dnl specifically "no profile data available" appears to be
dnl treated as an error sometimes. This might be a consequence
@@ -1105,19 +1099,11 @@ case "$target" in
PROFILE_USE_CFLAGS="-GL -wd4624 -wd4952"
dnl XXX: should be -LTCG:PGOPTIMIZE, but that fails on libxul.
dnl Probably also a compiler bug, but what can you do?
- PROFILE_USE_LDFLAGS="-LTCG:PGUPDATE $cgthreads"
- LDFLAGS="$LDFLAGS -DYNAMICBASE"
+ PROFILE_USE_LDFLAGS="-LTCG:PGUPDATE"
RCFLAGS="-nologo"
- if test "$CC_VERSION" = "18.00.31101"; then
- dnl Use MaxILKSize as a workaround for LNK1248 in VS2013update4
- dnl See https://connect.microsoft.com/VisualStudio/feedback/details/1044914/fatal-error-lnk1248
- LDFLAGS="$LDFLAGS -MaxILKSize:0x7FF00000"
- fi
- dnl Minimum reqiurement of Gecko is VS2010 or later which supports
- dnl both SSSE3 and SSE4.1.
+ dnl Minimum required VS version supports SSSE3, SSE4.1 and AVX2.
HAVE_TOOLCHAIN_SUPPORT_MSSSE3=1
HAVE_TOOLCHAIN_SUPPORT_MSSE4_1=1
- dnl allow AVX2 code from VS2012
HAVE_X86_AVX2=1
fi
AC_DEFINE(WIN32_LEAN_AND_MEAN)
@@ -2149,7 +2135,6 @@ MOZ_NECKO_WIFI=1
NECKO_COOKIES=1
MOZ_USE_NATIVE_POPUP_WINDOWS=
MOZ_EXCLUDE_HYPHENATION_DICTIONARIES=
-MOZ_INSTALL_TRACKING=
ACCESSIBILITY=1
MOZ_TIME_MANAGER=
MOZ_AUDIO_CHANNEL_MANAGER=
@@ -2185,22 +2170,6 @@ case "${target}" in
esac
-# Optional Firefox for Android partner distribution directory.
-MOZ_ARG_WITH_STRING(android-distribution-directory,
-[ --with-android-distribution-directory=dir
- Optional Firefox for Android partner distribution directory.],
- MOZ_ANDROID_DISTRIBUTION_DIRECTORY=$withval)
-
-if test -n "$MOZ_ANDROID_DISTRIBUTION_DIRECTORY"; then
- # A distribution directory must have an assets/distribution directory.
- # See https://wiki.mozilla.org/Mobile/Distribution_Files.
- if test ! -d "$MOZ_ANDROID_DISTRIBUTION_DIRECTORY/assets/distribution" ; then
- AC_MSG_ERROR([--with-android-distribution-directory does not contain assets/distribution;
- (looked for ${MOZ_ANDROID_DISTRIBUTION_DIRECTORY}/assets/distribution).])
- fi
-fi
-AC_SUBST(MOZ_ANDROID_DISTRIBUTION_DIRECTORY)
-
dnl ========================================================
dnl = Vendor override
dnl ========================================================
@@ -2250,11 +2219,6 @@ if test -n "$WITH_APP_BASENAME" ; then
MOZ_APP_BASENAME="$WITH_APP_BASENAME"
fi
-# Graphene is a desktop runtime for running applications with a HTML UI.
-if test -n "$MOZ_GRAPHENE"; then
- AC_DEFINE(MOZ_GRAPHENE)
-fi
-
dnl ========================================================
dnl Ensure Android SDK and build-tools versions depending on
dnl mobile target.
@@ -2633,15 +2597,6 @@ if test -n "$MOZ_EXCLUDE_HYPHENATION_DICTIONARIES"; then
fi
dnl ========================================================
-dnl = Include install tracking on Android
-dnl ========================================================
-if test -n "$MOZ_INSTALL_TRACKING"; then
- if test -z "$MOZ_ADJUST_SDK_KEY"; then
- AC_MSG_ERROR([Must specify --with-adjust-sdk-keyfile when MOZ_INSTALL_TRACKING is defined!])
- fi
-fi
-
-dnl ========================================================
dnl accessibility support on by default on all platforms
dnl ========================================================
MOZ_ARG_DISABLE_BOOL(accessibility,
@@ -4994,7 +4949,6 @@ AC_SUBST(MOZ_ANDROID_APPLICATION_CLASS)
AC_SUBST(MOZ_ANDROID_BROWSER_INTENT_CLASS)
AC_SUBST(MOZ_ANDROID_SEARCH_INTENT_CLASS)
AC_SUBST(MOZ_EXCLUDE_HYPHENATION_DICTIONARIES)
-AC_SUBST(MOZ_INSTALL_TRACKING)
AC_SUBST(ENABLE_STRIP)
AC_SUBST(PKG_SKIP_STRIP)
AC_SUBST(STRIP_FLAGS)
diff --git a/parser/expat/lib/expat_external.h b/parser/expat/lib/expat_external.h
index 70c630bc9..cb046cfc0 100644
--- a/parser/expat/lib/expat_external.h
+++ b/parser/expat/lib/expat_external.h
@@ -102,13 +102,8 @@ typedef char XML_LChar;
/* END MOZILLA CHANGE */
#ifdef XML_LARGE_SIZE /* Use large integers for file/stream positions. */
-#if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400
-typedef __int64 XML_Index;
-typedef unsigned __int64 XML_Size;
-#else
typedef long long XML_Index;
typedef unsigned long long XML_Size;
-#endif
#else
typedef long XML_Index;
typedef unsigned long XML_Size;
diff --git a/toolkit/content/license.html b/toolkit/content/license.html
index 1041ec42f..d97a3c7f1 100644
--- a/toolkit/content/license.html
+++ b/toolkit/content/license.html
@@ -67,9 +67,6 @@
</li>
<li><a href="about:license#ACE">ACE License</a></li>
<li><a href="about:license#acorn">acorn License</a></li>
-#ifdef MOZ_INSTALL_TRACKING
- <li><a href="about:license#adjust">Adjust SDK License</a></li>
-#endif
<li><a href="about:license#adobecmap">Adobe CMap License</a></li>
<li><a href="about:license#android">Android Open Source License</a></li>
<li><a href="about:license#angle">ANGLE License</a></li>
@@ -2233,39 +2230,6 @@ licences.
<hr>
-#ifdef MOZ_INSTALL_TRACKING
- <h1><a id="adjust"></a>Adjust SDK License</h1>
-
- <p>This license applies to all files in the directory
- <span class="path">mobile/android/thirdparty/com/adjust/sdk</span>.</p>
-
-<pre>
-Copyright (c) 2012-2014 adjust GmbH,
-http://www.adjust.com
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-</pre>
-
- <hr>
-
-#endif
<h1><a id="apache"></a>Apache License 2.0</h1>
<p>This license applies to various files in the Mozilla codebase.</p>
diff --git a/toolkit/modules/AppConstants.jsm b/toolkit/modules/AppConstants.jsm
index 5eea04b0f..889a38b93 100644
--- a/toolkit/modules/AppConstants.jsm
+++ b/toolkit/modules/AppConstants.jsm
@@ -180,13 +180,6 @@ MOZ_SAFE_BROWSING:
false,
#endif
- MOZ_GRAPHENE:
-#ifdef MOZ_GRAPHENE
- true,
-#else
- false,
-#endif
-
MOZ_PLACES:
#ifdef MOZ_PLACES
true,
diff --git a/toolkit/mozapps/update/common/updatedefines.h b/toolkit/mozapps/update/common/updatedefines.h
index 871755246..49fbde6f2 100644
--- a/toolkit/mozapps/update/common/updatedefines.h
+++ b/toolkit/mozapps/update/common/updatedefines.h
@@ -44,9 +44,6 @@
# define access _access
# define putenv _putenv
-# if defined(_MSC_VER) && _MSC_VER < 1900
-# define stat _stat
-# endif
# define DELETE_DIR L"tobedeleted"
# define CALLBACK_BACKUP_EXT L".moz-callback"