pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/47233: xulrunner DragonFly x86_64 call of overloaded 'FromTicks(long long int)' is ambiguous



The following reply was made to PR pkg/47233; it has been noted by GNATS.

From: David Shao <davshao%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: pkg/47233: xulrunner DragonFly x86_64 call of overloaded
 'FromTicks(long long int)' is ambiguous
Date: Tue, 27 Nov 2012 07:08:03 -0800

 As was pointed out in a followup to
 http://bugs.dragonflybsd.org/issues/2463
 the problem on DragonFly is not the use of __thread, it is omission of
 __BEGIN_DECLS and __END_DECLS around the relevant errno related parts
 of /usr/src/sys/sys/errno.h.
 
 The following patch allows successful building of Firefox 17.0esr on
 DragonFly x86_64.  It is not intended to be submitted as an official
 patch as the part defining out the use of errno only for DragonFly
 will hopefully be made redundant if / when the missing __BEGIN_DECLS
 and __END_DECLS are added.  The part using an explicit cast to int64_t
 for INT64_MIN and INT64_MAX may have to be submitted as an official
 patch that hopefully does no harm on platforms other than DragonFly.
 No reply so far has been made for whether it is a problem on x86_64 to
 define INT64_MIN and INT64_MAX as long long ints LL.
 http://bugs.dragonflybsd.org/issues/2461
 
 I note the patch only for those using DragonFly who wish to build and
 the latest xulrunner and firefox 17.0esr while more permanent fixes
 are hopefully made elsewhere.
 
 diff --git a/devel/xulrunner/distinfo b/devel/xulrunner/distinfo
 index dbb4e23..744e621 100644
 --- a/devel/xulrunner/distinfo
 +++ b/devel/xulrunner/distinfo
 @@ -91,6 +91,7 @@ SHA1 (patch-pd) = c6b261264770c8a5eda31690b37f7eb992333f2a
  SHA1 (patch-pg) = a89cb4b92f974d32d4a309a4628f32aff306de71
  SHA1 (patch-rc) = 13b0253d166cac6b4b1e7efaba006e37015cbbdb
  SHA1 (patch-storage_src_Makefile.in) = 
3f9a4bc71a6b64df819bbce6dbae18705d2183ac
 +SHA1 (patch-toolkit_components_osfile_osfileutils.cpp) =
 68f51d761e096c7df7185207ad4ac57d4480d140
  SHA1 (patch-toolkit_library_Makefile.in) =
 4193e7bafdac62a84c5a5ce4a21f0c616ce51362
  SHA1 (patch-toolkit_toolkit-tiers.mk) =
 7c878d6d4a2ad3ddaa353d6f56d4954b7861d1ad
  SHA1 (patch-xa) = 5b66ed59bc9603a059e11695ae4c380093b36157
 @@ -107,5 +108,6 @@ SHA1 (patch-xm) = aab7aa76909b520b9c1fdc5a27c4ec440e060cce
  SHA1 (patch-xn) = 27ca333ce018a5f72278461a55d141c063ac98ca
  SHA1 (patch-xo) = 3d875dad673a47b2059b8eea9f41fe9e370295d5
  SHA1 (patch-xpcom_Makefile.in) = c44608dc176900c3ce49fb7059e42e404a7c6df3
 +SHA1 (patch-xpcom_ds_TimeStamp.h) = 450cca178f916082c75ef1b2deb23b0f3446ff02
  SHA1 (patch-xpcom_idl-parser_Makefile.in) =
 0382a7ab00c2e7245f5ddbbe5a50036a8ae418ef
  SHA1 (patch-xpcom_typelib_xpidl_Makefile.in) =
 4821d564e467494f65e70bb9ecec7cac2754ca0c
 diff --git 
a/devel/xulrunner/patches/patch-toolkit_components_osfile_osfileutils.cpp
 b/devel/xulrunner/patches/patch-toolkit_components_osfile_osfileutils.cpp
 new file mode 100644
 index 0000000..8a2266b
 --- /dev/null
 +++ b/devel/xulrunner/patches/patch-toolkit_components_osfile_osfileutils.cpp
 @@ -0,0 +1,34 @@
 +$NetBSD$
 +
 +--- toolkit/components/osfile/osfileutils.cpp.orig    2012-11-27
 05:54:16.000000000 +0000
 ++++ toolkit/components/osfile/osfileutils.cpp
 +@@ -48,7 +48,9 @@ void error_no_memory() {
 +  * the last operation failed because it is not supported.
 +  */
 + void error_not_supported() {
 ++#if !defined(__DragonFly__)
 +   errno = ENOTSUP;
 ++#endif
 + }
 +
 + /**
 +@@ -57,7 +59,9 @@ void error_not_supported() {
 +  * argument.
 +  */
 + void error_invalid_argument() {
 ++#if !defined(__DragonFly__)
 +   errno = EINVAL;
 ++#endif
 + }
 +
 + /**
 +@@ -66,7 +70,9 @@ void error_invalid_argument() {
 +  * memory.
 +  */
 + void error_no_memory() {
 ++#if !defined(__DragonFly__)
 +   errno = ENOMEM;
 ++#endif
 + }
 +
 + #endif // defined(XP_WIN)
 diff --git a/devel/xulrunner/patches/patch-xpcom_ds_TimeStamp.h
 b/devel/xulrunner/patches/patch-xpcom_ds_TimeStamp.h
 new file mode 100644
 index 0000000..80ebdfd
 --- /dev/null
 +++ b/devel/xulrunner/patches/patch-xpcom_ds_TimeStamp.h
 @@ -0,0 +1,18 @@
 +$NetBSD$
 +
 +--- xpcom/ds/TimeStamp.h.orig 2012-11-19 15:43:32.000000000 +0000
 ++++ xpcom/ds/TimeStamp.h
 +@@ -130,11 +130,11 @@ private:
 +     // NOTE: this MUST be a >= test, because int64_t(double(INT64_MAX))
 +     // overflows and gives LL_MININT.
 +     if (aTicks >= double(INT64_MAX))
 +-      return TimeDuration::FromTicks(INT64_MAX);
 ++      return TimeDuration::FromTicks(int64_t(INT64_MAX));
 +
 +     // This MUST be a <= test.
 +     if (aTicks <= double(INT64_MIN))
 +-      return TimeDuration::FromTicks(INT64_MIN);
 ++      return TimeDuration::FromTicks(int64_t(INT64_MIN));
 +
 +     return TimeDuration::FromTicks(int64_t(aTicks));
 +   }
 


Home | Main Index | Thread Index | Old Index