At least, gcc-4.1.3 does not have abs(signed long long).

PR 45922.
This commit is contained in:
obache 2012-02-26 08:38:21 +00:00
parent 9192f4930d
commit c5c65acec2
2 changed files with 16 additions and 4 deletions

View file

@ -1,6 +1,6 @@
$NetBSD: distinfo,v 1.8 2011/12/15 18:48:02 marino Exp $
$NetBSD: distinfo,v 1.9 2012/02/26 08:38:21 obache Exp $
SHA1 (vigra-1.8.0-src.tar.gz) = 09f1d506c2748ebeb7d9f1c77ce387f9e7b837d2
RMD160 (vigra-1.8.0-src.tar.gz) = 99d781da6e0ca94ce3404e1bcb3adeb9e43a2017
Size (vigra-1.8.0-src.tar.gz) = 29814914 bytes
SHA1 (patch-include-vigra-mathutil.hxx) = d6c6f12f073c9659781eef5fb032c31676c1381d
SHA1 (patch-include-vigra-mathutil.hxx) = ccbf0061582f09493169f686d504e4c5a5b1924d

View file

@ -1,7 +1,19 @@
$NetBSD: patch-include-vigra-mathutil.hxx,v 1.2 2011/12/15 18:48:02 marino Exp $
$NetBSD: patch-include-vigra-mathutil.hxx,v 1.3 2012/02/26 08:38:21 obache Exp $
--- include/vigra/mathutil.hxx.orig 2011-12-15 07:07:07.573857000 +0000
* missing abs(signed long long) in old GCC.
* Fix ambiguous math functions for DragonFly.
--- include/vigra/mathutil.hxx.orig 2011-09-20 18:38:36.000000000 +0000
+++ include/vigra/mathutil.hxx
@@ -149,7 +149,7 @@ VIGRA_DEFINE_UNSIGNED_ABS(unsigned long
VIGRA_DEFINE_MISSING_ABS(signed char)
VIGRA_DEFINE_MISSING_ABS(signed short)
-#if defined(_MSC_VER) && _MSC_VER < 1600
+#if defined(_MSC_VER) && _MSC_VER < 1600 || defined(__GNUC__) && (__GNUC__ < 4 || __GNUC__ == 4 && __GNUC_MINOR__ < 2)
VIGRA_DEFINE_MISSING_ABS(signed long long)
#endif
@@ -553,7 +553,12 @@ VIGRA_DEFINE_NORM(int)
VIGRA_DEFINE_NORM(unsigned int)
VIGRA_DEFINE_NORM(long)