fix after nspr fix and enable vswprintf support

This commit is contained in:
robert 2011-10-28 13:09:26 +00:00
parent c9af64bb29
commit 01da3deda6
5 changed files with 26 additions and 72 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.14 2011/10/03 21:08:12 landry Exp $
# $OpenBSD: Makefile,v 1.15 2011/10/28 13:09:26 robert Exp $
COMMENT = Mozilla mobile web browser
@ -7,6 +7,8 @@ MOZILLA_BRANCH = release
MOZILLA_PROJECT = fennec
MOZILLA_CODENAME = mobile
REVISION = 0
SO_VERSION = 3.0
# NOTE: Must bump minor version if any shlib's are removed from the
# components dir to avoid pkg_add -r issues.

View File

@ -1,19 +0,0 @@
$OpenBSD: patch-gfx_qcms_qcmstypes_h,v 1.3 2011/06/28 22:01:18 landry Exp $
https://bugzilla.mozilla.org/show_bug.cgi?id=651444
--- gfx/qcms/qcmstypes.h.orig Wed Jul 21 02:52:13 2010
+++ gfx/qcms/qcmstypes.h Sun Aug 1 12:35:46 2010
@@ -13,14 +13,6 @@
#elif defined (_AIX)
#include <sys/types.h>
#elif !defined(ANDROID)
-typedef PRInt8 int8_t;
-typedef PRUint8 uint8_t;
-typedef PRInt16 int16_t;
-typedef PRUint16 uint16_t;
-typedef PRInt32 int32_t;
-typedef PRUint32 uint32_t;
-typedef PRInt64 int64_t;
-typedef PRUint64 uint64_t;
#ifdef __OS2__
/* OS/2's stdlib typdefs uintptr_t. So we'll just include that so we don't collide */

View File

@ -1,9 +1,13 @@
$OpenBSD: patch-ipc_chromium_src_base_atomicops_h,v 1.1 2011/06/28 22:01:18 landry Exp $
../../ipc/chromium/src/base/singleton.h:118: error: invalid conversion from 'base::subtle::AtomicWord*' to 'const volatile base::subtle::Atomic32*'
https://bugzilla.mozilla.org/show_bug.cgi?id=648735
--- ipc/chromium/src/base/atomicops.h.orig Wed Jun 22 10:23:36 2011
+++ ipc/chromium/src/base/atomicops.h Wed Jun 22 10:24:21 2011
@@ -45,7 +45,11 @@ typedef int64 Atomic64;
$OpenBSD: patch-ipc_chromium_src_base_atomicops_h,v 1.2 2011/10/28 13:09:26 robert Exp $
--- ipc/chromium/src/base/atomicops.h.orig Wed Sep 28 22:24:48 2011
+++ ipc/chromium/src/base/atomicops.h Fri Oct 28 14:46:18 2011
@@ -40,12 +40,16 @@ namespace subtle {
#endif
typedef __w64 int32 Atomic32;
#ifdef ARCH_CPU_64_BITS
-typedef int64 Atomic64;
+typedef intptr_t Atomic64;
#endif
// Use AtomicWord for a machine-sized pointer. It will use the Atomic32 or
// Atomic64 routines below, depending on your architecture.

View File

@ -1,16 +0,0 @@
$OpenBSD: patch-ipc_chromium_src_base_string_util_posix_h,v 1.1 2011/06/28 22:01:18 landry Exp $
--- ipc/chromium/src/base/string_util_posix.h.orig Fri May 27 18:12:07 2011
+++ ipc/chromium/src/base/string_util_posix.h Wed Jun 1 08:48:32 2011
@@ -36,7 +36,12 @@ inline int vsnprintf(char* buffer, size_t size,
inline int vswprintf(wchar_t* buffer, size_t size,
const wchar_t* format, va_list arguments) {
DCHECK(IsWprintfFormatPortable(format));
+#if defined(OS_OPENBSD)
+ // OpenBSD does not have a wide-char equivalent yet
+ return ::vsnprintf((char *)buffer, size, (const char *)format, arguments);
+#else
return ::vswprintf(buffer, size, format, arguments);
+#endif
}
} // namespace base

View File

@ -1,38 +1,21 @@
$OpenBSD: patch-ipc_chromium_src_chrome_common_ipc_message_utils_h,v 1.1 2011/06/28 22:01:18 landry Exp $
--- ipc/chromium/src/chrome/common/ipc_message_utils.h.orig Wed Jun 15 02:35:08 2011
+++ ipc/chromium/src/chrome/common/ipc_message_utils.h Wed Jun 22 09:08:48 2011
@@ -219,7 +219,33 @@ struct ParamTraits<unsigned long> {
$OpenBSD: patch-ipc_chromium_src_chrome_common_ipc_message_utils_h,v 1.2 2011/10/28 13:09:26 robert Exp $
--- ipc/chromium/src/chrome/common/ipc_message_utils.h.orig Wed Sep 28 22:24:48 2011
+++ ipc/chromium/src/chrome/common/ipc_message_utils.h Fri Oct 28 14:46:29 2011
@@ -219,7 +219,7 @@ struct ParamTraits<unsigned long> {
}
};
-#if !(defined(OS_MACOSX) || defined(OS_WIN) || (defined(CHROMIUM_MOZILLA_BUILD) && defined(OS_LINUX) && defined(ARCH_CPU_64_BITS)))
+#if defined(OS_OPENBSD) && defined(ARCH_CPU_64_BITS)
+template <>
+struct ParamTraits<unsigned long long> {
+ typedef unsigned long long param_type;
+ static void Write(Message* m, const param_type& p) {
+ m->WriteData(reinterpret_cast<const char*>(&p), sizeof(param_type));
+ }
+ static bool Read(const Message* m, void** iter, param_type* r) {
+ const char *data;
+ int data_size = 0;
+ bool result = m->ReadData(iter, &data, &data_size);
+ if (result && data_size == sizeof(param_type)) {
+ memcpy(r, data, sizeof(param_type));
+ } else {
+ result = false;
+ NOTREACHED();
+ }
+
+ return result;
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(StringPrintf(L"%ull", p));
+ }
+};
+#endif
+
+#if !(defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_WIN) || (defined(CHROMIUM_MOZILLA_BUILD) && defined(OS_LINUX) && defined(ARCH_CPU_64_BITS)))
// There size_t is a synonym for |unsigned long| ...
template <>
struct ParamTraits<size_t> {
@@ -272,7 +272,7 @@ struct ParamTraits<uint32> {
};
#endif // defined(OS_MACOSX)
-#if !(defined(CHROMIUM_MOZILLA_BUILD) && defined(OS_LINUX) && defined(ARCH_CPU_64_BITS))
+#if !(defined(CHROMIUM_MOZILLA_BUILD) && defined(OS_LINUX) && defined(ARCH_CPU_64_BITS)) || defined(OS_OPENBSD)
// int64 is |long int| on 64-bit systems, uint64 is |unsigned long|
template <>
struct ParamTraits<int64> {