diff options
author | wiz <wiz> | 2013-11-29 17:41:08 +0000 |
---|---|---|
committer | wiz <wiz> | 2013-11-29 17:41:08 +0000 |
commit | defaff60bbbd91a83c020f21bceeaf9e828b8f17 (patch) | |
tree | 8d91908b3d46e7e0046c6e7c6f9a18660e537df7 /mail | |
parent | edefb28cbd3ee52015ce90db3ef8740c83fb316a (diff) | |
download | pkgsrc-defaff60bbbd91a83c020f21bceeaf9e828b8f17.tar.gz |
Fix build with clang using the patches from www/firefox.
Diffstat (limited to 'mail')
4 files changed, 267 insertions, 1 deletions
diff --git a/mail/thunderbird/distinfo b/mail/thunderbird/distinfo index a3a9ef5bb6a..a74df4e6c65 100644 --- a/mail/thunderbird/distinfo +++ b/mail/thunderbird/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.130 2013/11/13 14:36:58 ryoon Exp $ +$NetBSD: distinfo,v 1.131 2013/11/29 17:41:08 wiz Exp $ SHA1 (enigmail-1.6.tar.gz) = 51a7eb7d86ce24d8199f741a0079f0d56ecd6368 RMD160 (enigmail-1.6.tar.gz) = a854bb37a6a7f298f6cc268110dcb21d00909fa4 @@ -110,6 +110,9 @@ SHA1 (patch-mozilla_media_webrtc_trunk_webrtc_modules_video__capture_video__capt SHA1 (patch-mozilla_media_webrtc_trunk_webrtc_system__wrappers_source_condition__variable.cc) = 3c44db3c63d29bacafd84d50972604c7f39866dc SHA1 (patch-mozilla_media_webrtc_trunk_webrtc_system__wrappers_source_spreadsortlib_spreadsort.hpp) = 14f62a7864ac3164c8532580f55ba731c6163c3c SHA1 (patch-mozilla_media_webrtc_trunk_webrtc_system__wrappers_source_thread__posix.cc) = a6eb42961b0e9e7c26b19af44c08306c7ff5d997 +SHA1 (patch-mozilla_memory_mozalloc_fallible.h) = db33e1a805e7f76c7fc7c2a414660a1ed2ca1727 +SHA1 (patch-mozilla_memory_mozalloc_mozalloc.cpp) = 38ff96261f55acffe67bd3e9099544c71e028e85 +SHA1 (patch-mozilla_memory_mozalloc_mozalloc.h) = 6f034541e01d75882d4f06c67c6b2ce355c6c315 SHA1 (patch-mozilla_memory_mozalloc_mozalloc__abort.cpp) = 74d938d0f984d16c28f22f77919d5212cfc47f09 SHA1 (patch-mozilla_mfbt_Atomics.h) = 8184a728871a10fe9bff9940146a504117fe60af SHA1 (patch-mozilla_mfbt_Poison.cpp) = 2c4ec88d6d47c93120d1d10457853e67ef52d239 diff --git a/mail/thunderbird/patches/patch-mozilla_memory_mozalloc_fallible.h b/mail/thunderbird/patches/patch-mozilla_memory_mozalloc_fallible.h new file mode 100644 index 00000000000..d3ffb07c1d1 --- /dev/null +++ b/mail/thunderbird/patches/patch-mozilla_memory_mozalloc_fallible.h @@ -0,0 +1,28 @@ +$NetBSD: patch-mozilla_memory_mozalloc_fallible.h,v 1.1 2013/11/29 17:41:08 wiz Exp $ + +--- mozilla/memory/mozalloc/fallible.h.orig 2013-10-23 22:09:13.000000000 +0000 ++++ mozilla/memory/mozalloc/fallible.h +@@ -5,9 +5,22 @@ + #ifndef mozilla_fallible_h + #define mozilla_fallible_h + ++#if defined(MOZALLOC_EXPORT) ++/* do nothing: it's been defined to __declspec(dllexport) by ++ * mozalloc*.cpp on platforms where that's required. */ ++#elif defined(XP_WIN) || (defined(XP_OS2) && defined(__declspec)) ++# define MOZALLOC_EXPORT __declspec(dllimport) ++#elif defined(HAVE_VISIBILITY_ATTRIBUTE) ++/* Make sure symbols are still exported even if we're wrapped in a ++ * |visibility push(hidden)| blanket. */ ++# define MOZALLOC_EXPORT __attribute__ ((visibility ("default"))) ++#else ++# define MOZALLOC_EXPORT ++#endif ++ + namespace mozilla { + +-struct fallible_t { }; ++struct MOZALLOC_EXPORT fallible_t { }; + + } // namespace mozilla + diff --git a/mail/thunderbird/patches/patch-mozilla_memory_mozalloc_mozalloc.cpp b/mail/thunderbird/patches/patch-mozilla_memory_mozalloc_mozalloc.cpp new file mode 100644 index 00000000000..60aba294084 --- /dev/null +++ b/mail/thunderbird/patches/patch-mozilla_memory_mozalloc_mozalloc.cpp @@ -0,0 +1,81 @@ +$NetBSD: patch-mozilla_memory_mozalloc_mozalloc.cpp,v 1.1 2013/11/29 17:41:08 wiz Exp $ + +--- mozilla/memory/mozalloc/mozalloc.cpp.orig 2013-10-23 22:09:13.000000000 +0000 ++++ mozilla/memory/mozalloc/mozalloc.cpp +@@ -229,3 +229,76 @@ namespace mozilla { + const fallible_t fallible = fallible_t(); + + } // namespace mozilla ++ ++ ++MOZALLOC_EXPORT ++void* operator new(size_t size) MOZALLOC_THROW_BAD_ALLOC ++{ ++ return moz_xmalloc(size); ++} ++ ++MOZALLOC_EXPORT ++void* operator new(size_t size, const std::nothrow_t&) MOZALLOC_THROW_IF_HAS_EXCEPTIONS ++{ ++ return moz_malloc(size); ++} ++ ++MOZALLOC_EXPORT ++void* operator new[](size_t size) MOZALLOC_THROW_BAD_ALLOC ++{ ++ return moz_xmalloc(size); ++} ++ ++MOZALLOC_EXPORT ++void* operator new[](size_t size, const std::nothrow_t&) MOZALLOC_THROW_IF_HAS_EXCEPTIONS ++{ ++ return moz_malloc(size); ++} ++ ++MOZALLOC_EXPORT ++void operator delete(void* ptr) MOZALLOC_THROW_IF_HAS_EXCEPTIONS ++{ ++ return moz_free(ptr); ++} ++ ++MOZALLOC_EXPORT ++void operator delete(void* ptr, const std::nothrow_t&) MOZALLOC_THROW_IF_HAS_EXCEPTIONS ++{ ++ return moz_free(ptr); ++} ++ ++MOZALLOC_EXPORT ++void operator delete[](void* ptr) MOZALLOC_THROW_IF_HAS_EXCEPTIONS ++{ ++ return moz_free(ptr); ++} ++ ++MOZALLOC_EXPORT ++void operator delete[](void* ptr, const std::nothrow_t&) MOZALLOC_THROW_IF_HAS_EXCEPTIONS ++{ ++ return moz_free(ptr); ++} ++ ++MOZALLOC_EXPORT ++void* operator new(size_t size, const mozilla::fallible_t&) MOZALLOC_THROW_IF_HAS_EXCEPTIONS ++{ ++ return moz_malloc(size); ++} ++ ++MOZALLOC_EXPORT ++void* operator new[](size_t size, const mozilla::fallible_t&) MOZALLOC_THROW_IF_HAS_EXCEPTIONS ++{ ++ return moz_malloc(size); ++} ++ ++MOZALLOC_EXPORT ++void operator delete(void* ptr, const mozilla::fallible_t&) MOZALLOC_THROW_IF_HAS_EXCEPTIONS ++{ ++ moz_free(ptr); ++} ++ ++MOZALLOC_EXPORT ++void operator delete[](void* ptr, const mozilla::fallible_t&) MOZALLOC_THROW_IF_HAS_EXCEPTIONS ++{ ++ moz_free(ptr); ++} diff --git a/mail/thunderbird/patches/patch-mozilla_memory_mozalloc_mozalloc.h b/mail/thunderbird/patches/patch-mozilla_memory_mozalloc_mozalloc.h new file mode 100644 index 00000000000..025e3ce5942 --- /dev/null +++ b/mail/thunderbird/patches/patch-mozilla_memory_mozalloc_mozalloc.h @@ -0,0 +1,154 @@ +$NetBSD: patch-mozilla_memory_mozalloc_mozalloc.h,v 1.1 2013/11/29 17:41:08 wiz Exp $ + +--- mozilla/memory/mozalloc/mozalloc.h.orig 2013-10-23 22:09:13.000000000 +0000 ++++ mozilla/memory/mozalloc/mozalloc.h +@@ -39,15 +39,6 @@ + # define MOZALLOC_EXPORT + #endif + +- +-#if defined(MOZ_ALWAYS_INLINE_EVEN_DEBUG) +-# define MOZALLOC_INLINE MOZ_ALWAYS_INLINE_EVEN_DEBUG +-#elif defined(HAVE_FORCEINLINE) +-# define MOZALLOC_INLINE __forceinline +-#else +-# define MOZALLOC_INLINE inline +-#endif +- + /* Workaround build problem with Sun Studio 12 */ + #if defined(__SUNPRO_C) || defined(__SUNPRO_CC) + # undef NS_WARN_UNUSED_RESULT +@@ -171,15 +162,6 @@ MOZALLOC_EXPORT void* moz_valloc(size_t + * that |::operator new() throw(std::bad_alloc)| will never return NULL. + */ + +-/* NB: This is defined just to silence vacuous warnings about symbol +- * visibility on OS X/gcc. These symbols are force-inline and not +- * exported. */ +-#if defined(XP_MACOSX) +-# define MOZALLOC_EXPORT_NEW MOZALLOC_EXPORT +-#else +-# define MOZALLOC_EXPORT_NEW +-#endif +- + #if defined(ANDROID) || defined(_MSC_VER) + /* + * Android doesn't fully support exceptions, so its <new> header +@@ -195,53 +177,29 @@ MOZALLOC_EXPORT void* moz_valloc(size_t + + #define MOZALLOC_THROW_BAD_ALLOC MOZALLOC_THROW_BAD_ALLOC_IF_HAS_EXCEPTIONS + +-MOZALLOC_EXPORT_NEW MOZALLOC_INLINE +-void* operator new(size_t size) MOZALLOC_THROW_BAD_ALLOC +-{ +- return moz_xmalloc(size); +-} +- +-MOZALLOC_EXPORT_NEW MOZALLOC_INLINE +-void* operator new(size_t size, const std::nothrow_t&) MOZALLOC_THROW_IF_HAS_EXCEPTIONS +-{ +- return moz_malloc(size); +-} +- +-MOZALLOC_EXPORT_NEW MOZALLOC_INLINE +-void* operator new[](size_t size) MOZALLOC_THROW_BAD_ALLOC +-{ +- return moz_xmalloc(size); +-} +- +-MOZALLOC_EXPORT_NEW MOZALLOC_INLINE +-void* operator new[](size_t size, const std::nothrow_t&) MOZALLOC_THROW_IF_HAS_EXCEPTIONS +-{ +- return moz_malloc(size); +-} +- +-MOZALLOC_EXPORT_NEW MOZALLOC_INLINE +-void operator delete(void* ptr) MOZALLOC_THROW_IF_HAS_EXCEPTIONS +-{ +- return moz_free(ptr); +-} +- +-MOZALLOC_EXPORT_NEW MOZALLOC_INLINE +-void operator delete(void* ptr, const std::nothrow_t&) MOZALLOC_THROW_IF_HAS_EXCEPTIONS +-{ +- return moz_free(ptr); +-} +- +-MOZALLOC_EXPORT_NEW MOZALLOC_INLINE +-void operator delete[](void* ptr) MOZALLOC_THROW_IF_HAS_EXCEPTIONS +-{ +- return moz_free(ptr); +-} +- +-MOZALLOC_EXPORT_NEW MOZALLOC_INLINE +-void operator delete[](void* ptr, const std::nothrow_t&) MOZALLOC_THROW_IF_HAS_EXCEPTIONS +-{ +- return moz_free(ptr); +-} ++MOZALLOC_EXPORT ++void* operator new(size_t size) MOZALLOC_THROW_BAD_ALLOC; ++ ++MOZALLOC_EXPORT ++void* operator new(size_t size, const std::nothrow_t&) MOZALLOC_THROW_IF_HAS_EXCEPTIONS; ++ ++MOZALLOC_EXPORT ++void* operator new[](size_t size) MOZALLOC_THROW_BAD_ALLOC; ++ ++MOZALLOC_EXPORT ++void* operator new[](size_t size, const std::nothrow_t&) MOZALLOC_THROW_IF_HAS_EXCEPTIONS; ++ ++MOZALLOC_EXPORT ++void operator delete(void* ptr) MOZALLOC_THROW_IF_HAS_EXCEPTIONS; ++ ++MOZALLOC_EXPORT ++void operator delete(void* ptr, const std::nothrow_t&) MOZALLOC_THROW_IF_HAS_EXCEPTIONS; ++ ++MOZALLOC_EXPORT ++void operator delete[](void* ptr) MOZALLOC_THROW_IF_HAS_EXCEPTIONS; ++ ++MOZALLOC_EXPORT ++void operator delete[](void* ptr, const std::nothrow_t&) MOZALLOC_THROW_IF_HAS_EXCEPTIONS; + + + /* +@@ -263,29 +221,17 @@ void operator delete[](void* ptr, const + * (4) the matching system |operator delete(void*) throw(std::bad_alloc)| + */ + +-MOZALLOC_INLINE +-void* operator new(size_t size, const mozilla::fallible_t&) MOZALLOC_THROW_IF_HAS_EXCEPTIONS +-{ +- return moz_malloc(size); +-} +- +-MOZALLOC_INLINE +-void* operator new[](size_t size, const mozilla::fallible_t&) MOZALLOC_THROW_IF_HAS_EXCEPTIONS +-{ +- return moz_malloc(size); +-} +- +-MOZALLOC_INLINE +-void operator delete(void* ptr, const mozilla::fallible_t&) MOZALLOC_THROW_IF_HAS_EXCEPTIONS +-{ +- moz_free(ptr); +-} +- +-MOZALLOC_INLINE +-void operator delete[](void* ptr, const mozilla::fallible_t&) MOZALLOC_THROW_IF_HAS_EXCEPTIONS +-{ +- moz_free(ptr); +-} ++MOZALLOC_EXPORT ++void* operator new(size_t size, const mozilla::fallible_t&) MOZALLOC_THROW_IF_HAS_EXCEPTIONS; ++ ++MOZALLOC_EXPORT ++void* operator new[](size_t size, const mozilla::fallible_t&) MOZALLOC_THROW_IF_HAS_EXCEPTIONS; ++ ++MOZALLOC_EXPORT ++void operator delete(void* ptr, const mozilla::fallible_t&) MOZALLOC_THROW_IF_HAS_EXCEPTIONS; ++ ++MOZALLOC_EXPORT ++void operator delete[](void* ptr, const mozilla::fallible_t&) MOZALLOC_THROW_IF_HAS_EXCEPTIONS; + + #endif /* ifdef __cplusplus */ + |