The powl(3) function is not actually needed here. Replace it with

constant number and make R-bigmemory compiled back again on systems
where double long mathlib functions missed.
This commit is contained in:
Mike M. Volokhov 2012-07-19 13:12:01 +00:00 committed by Thomas Klausner
parent 82caea118d
commit a2d0e45ee8
2 changed files with 17 additions and 1 deletions

View file

@ -1,5 +1,6 @@
$NetBSD: distinfo,v 1.1.1.1 2011/08/16 02:50:08 bubuchka Exp $
$NetBSD: distinfo,v 1.2 2012/07/19 13:12:01 bubuchka Exp $
SHA1 (R/bigmemory_4.2.11.tar.gz) = 3dd3c3a02dbb6ca742b81bf501e598bb6e0bdc1f
RMD160 (R/bigmemory_4.2.11.tar.gz) = 7407fa28852f1f7981b45c36a8b7a3b254fb450a
Size (R/bigmemory_4.2.11.tar.gz) = 1434562 bytes
SHA1 (patch-aa) = 287e1117dcd23ba21b9b1d3c6f7c7c11fea9f596

View file

@ -0,0 +1,15 @@
$NetBSD: patch-aa,v 1.1 2012/07/19 13:12:02 bubuchka Exp $
The powl(3) actually can be avoided in this particular case.
--- src/bigmemory.cpp.orig 2011-07-26 16:35:38.000000000 +0000
+++ src/bigmemory.cpp
@@ -39,7 +39,7 @@ string ttos<char>(char i)
bool TooManyRIndices( index_type val )
{
- return val > (powl(2, 31)-1);
+ return val > (double long)0xffffffff; /* (powl(2, 31)-1) */
}
template<typename CType, typename RType, typename BMAccessorType>