ports/178765: www/firefox: v21.0_1,1 fails to compile
Arrigo Marchiori
ardovm at yahoo.it
Mon Jun 3 15:40:01 UTC 2013
The following reply was made to PR ports/178765; it has been noted by GNATS.
From: Arrigo Marchiori <ardovm at yahoo.it>
To: bug-followup at FreeBSD.org, marka at isc.org
Cc:
Subject: Re: ports/178765: www/firefox: v21.0_1,1 fails to compile
Date: Mon, 3 Jun 2013 17:32:30 +0200
--GvXjxJ+pjyke8COw
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Hello,
the attached patch seem to fix the compilation on my system
(9.1-STABLE, x86, gcc-based, world and ports updated from SVN today)
It is ready to be copied in /usr/ports/www/firefox/files.
$ uname -a
FreeBSD myhost 9.1-STABLE FreeBSD 9.1-STABLE #31 r251291: Mon Jun
3 08:46:07 CEST 2013 root at myhost:/usr/obj/usr/src/sys/GENERIC i386
$ cc --version
cc (GCC) 4.2.1 20070831 patched [FreeBSD]
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
I don't know how to stress-test the patched unit. I tried some random
browsing, including HTML5 multimedia elements, and found no problems
so far.
The problem seem come from a very complicated system to obtain the
absolute value of a number. This page gives some insight:
http://whereswalden.com/2013/04/30/introducing-mozillaabs-to-mfbt/
In fact, I am not sure that the attached patch fixes the problem on
64bit machines, neither when using clang. I am sorry I don't have any
other systems to check it.
I hope this helps nevertheless.
--
rigo
http://rigo.altervista.org
--GvXjxJ+pjyke8COw
Content-Type: text/x-c; charset=utf-8
Content-Disposition: attachment; filename="patch-xpcom-io-nsMultiplexInputStream.cpp"
--- xpcom/io/nsMultiplexInputStream.cpp.orig 2013-06-03 15:37:00.000000000 +0200
+++ xpcom/io/nsMultiplexInputStream.cpp 2013-06-03 15:44:11.000000000 +0200
@@ -19,7 +19,7 @@
#include "nsIClassInfoImpl.h"
#include "nsIIPCSerializableInputStream.h"
#include "mozilla/ipc/InputStreamUtils.h"
-#include <cstdlib> // for std::abs(int/long)
+#include <stdlib.h> // for llabs(long long)
#include <cmath> // for std::abs(float/double)
using namespace mozilla::ipc;
@@ -511,7 +511,7 @@
}
// See if we have enough data in the current stream.
- if (std::abs(remaining) < streamPos) {
+ if (llabs(remaining) < streamPos) {
rv = stream->Seek(NS_SEEK_END, remaining);
NS_ENSURE_SUCCESS(rv, rv);
@@ -519,7 +519,7 @@
mStartedReadingCurrent = true;
remaining = 0;
- } else if (std::abs(remaining) > streamPos) {
+ } else if (llabs(remaining) > streamPos) {
if (i > oldCurrentStream ||
(i == oldCurrentStream && !oldStartedReadingCurrent)) {
// We're already at start so no need to seek this stream
@@ -529,7 +529,7 @@
rv = stream->Tell(&avail);
NS_ENSURE_SUCCESS(rv, rv);
- int64_t newPos = streamPos + XPCOM_MIN(avail, std::abs(remaining));
+ int64_t newPos = streamPos + XPCOM_MIN(avail, llabs(remaining));
rv = stream->Seek(NS_SEEK_END, -newPos);
NS_ENSURE_SUCCESS(rv, rv);
--GvXjxJ+pjyke8COw--
More information about the freebsd-gecko
mailing list