1diff -uprN misc/vigra1.6.0/configure misc/build/vigra1.6.0/configure 2--- misc/vigra1.6.0/configure 2008-08-13 08:15:32.000000000 -0500 3+++ misc/build/vigra1.6.0/configure 2012-09-19 17:30:24.000000000 -0500 4@@ -7843,7 +7843,7 @@ kfreebsd*-gnu) 5 ;; 6 7 freebsd*) 8- objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` 9+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf` 10 version_type=freebsd-$objformat 11 case $version_type in 12 freebsd-elf*) 13@@ -11504,7 +11504,7 @@ kfreebsd*-gnu) 14 ;; 15 16 freebsd*) 17- objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` 18+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf` 19 version_type=freebsd-$objformat 20 case $version_type in 21 freebsd-elf*) 22@@ -14616,7 +14616,7 @@ kfreebsd*-gnu) 23 ;; 24 25 freebsd*) 26- objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` 27+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf` 28 version_type=freebsd-$objformat 29 case $version_type in 30 freebsd-elf*) 31@@ -16958,7 +16958,7 @@ kfreebsd*-gnu) 32 ;; 33 34 freebsd*) 35- objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` 36+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf` 37 version_type=freebsd-$objformat 38 case $version_type in 39 freebsd-elf*) 40diff -uprN misc/vigra1.6.0/include/vigra/array_vector.hxx misc/build/vigra1.6.0/include/vigra/array_vector.hxx 41--- misc/vigra1.6.0/include/vigra/array_vector.hxx 2008-08-13 08:15:34.000000000 -0500 42+++ misc/build/vigra1.6.0/include/vigra/array_vector.hxx 2012-09-19 17:30:24.000000000 -0500 43@@ -578,7 +578,38 @@ public: 44 iterator insert(iterator p, size_type n, value_type const & v); 45 46 template <class InputIterator> 47- iterator insert(iterator p, InputIterator i, InputIterator iend); 48+ iterator insert(iterator p, InputIterator i, InputIterator iend) 49+ { 50+ difference_type n = iend - i; 51+ difference_type pos = p - begin(); 52+ size_type new_size = size() + n; 53+ if(new_size >= capacity_) 54+ { 55+ pointer new_data = reserve_raw(new_size); 56+ std::uninitialized_copy(begin(), p, new_data); 57+ std::uninitialized_copy(i, iend, new_data + pos); 58+ std::uninitialized_copy(p, end(), new_data + pos + n); 59+ deallocate(data_, size_); 60+ capacity_ = new_size; 61+ data_ = new_data; 62+ } 63+ else if(pos + n >= size_) 64+ { 65+ size_type diff = pos + n - size_; 66+ std::uninitialized_copy(p, end(), end() + diff); 67+ std::uninitialized_copy(iend - diff, iend, end()); 68+ std::copy(i, iend - diff, p); 69+ } 70+ else 71+ { 72+ size_type diff = size_ - (pos + n); 73+ std::uninitialized_copy(end() - n, end(), end()); 74+ std::copy_backward(p, p + diff, end()); 75+ std::copy(i, iend, p); 76+ } 77+ size_ = new_size; 78+ return begin() + pos; 79+ } 80 81 iterator erase(iterator p); 82 83diff -uprN misc/vigra1.6.0/include/vigra/basicimage.hxx misc/build/vigra1.6.0/include/vigra/basicimage.hxx 84--- misc/vigra1.6.0/include/vigra/basicimage.hxx 2008-08-13 08:15:34.000000000 -0500 85+++ misc/build/vigra1.6.0/include/vigra/basicimage.hxx 2012-09-19 17:46:22.000000000 -0500 86@@ -572,7 +572,11 @@ class BasicImage 87 typedef Alloc allocator_type; 88 89 typedef Alloc Allocator; 90+#ifndef VIGRA_WITHOUT_NESTED_TEMPLATE_PARAMS 91 typedef typename Alloc::template rebind<PIXELTYPE *>::other LineAllocator; 92+#else 93+ typedef std::allocator<PIXELTYPE*> LineAllocator; 94+#endif 95 96 /** construct image of size 0x0 97 */ 98@@ -589,39 +593,51 @@ class BasicImage 99 width_(0), 100 height_(0), 101 allocator_(alloc), 102+#ifndef VIGRA_WITHOUT_NESTED_TEMPLATE_PARAMS 103 pallocator_(alloc) 104+#else 105+ pallocator_() 106+#endif 107 {} 108 109 /** construct image of size width x height, use the specified allocator. 110 */ 111- BasicImage(int width, int height, Alloc const & alloc = Alloc()) 112+ BasicImage(int w, int h, Alloc const & alloc = Alloc()) 113 : data_(0), 114 width_(0), 115 height_(0), 116 allocator_(alloc), 117+#ifndef VIGRA_WITHOUT_NESTED_TEMPLATE_PARAMS 118 pallocator_(alloc) 119+#else 120+ pallocator_() 121+#endif 122 { 123- vigra_precondition((width >= 0) && (height >= 0), 124- "BasicImage::BasicImage(int width, int height): " 125+ vigra_precondition((w >= 0) && (h >= 0), 126+ "BasicImage::BasicImage(int w, int h): " 127 "width and height must be >= 0.\n"); 128 129- resize(width, height, value_type()); 130+ resize(w, h, value_type()); 131 } 132 133 /** construct image of size size.x x size.y, use the specified allocator. 134 */ 135- explicit BasicImage(difference_type const & size, Alloc const & alloc = Alloc()) 136+ explicit BasicImage(difference_type const & sz, Alloc const & alloc = Alloc()) 137 : data_(0), 138 width_(0), 139 height_(0), 140 allocator_(alloc), 141+#ifndef VIGRA_WITHOUT_NESTED_TEMPLATE_PARAMS 142 pallocator_(alloc) 143- { 144- vigra_precondition((size.x >= 0) && (size.y >= 0), 145- "BasicImage::BasicImage(Diff2D size): " 146- "size.x and size.y must be >= 0.\n"); 147+#else 148+ pallocator_() 149+#endif 150+ { 151+ vigra_precondition((sz.x >= 0) && (sz.y >= 0), 152+ "BasicImage::BasicImage(Diff2D sz): " 153+ "sz.x and sz.y must be >= 0.\n"); 154 155- resize(size.x, size.y, value_type()); 156+ resize(sz.x, sz.y, value_type()); 157 } 158 159 /** construct image of size width*height and initialize every 160@@ -629,71 +645,87 @@ class BasicImage 161 value_type doesn't have a default constructor). 162 Use the specified allocator. 163 */ 164- BasicImage(int width, int height, value_type const & d, Alloc const & alloc = Alloc()) 165+ BasicImage(int w, int h, value_type const & d, Alloc const & alloc = Alloc()) 166 : data_(0), 167 width_(0), 168 height_(0), 169 allocator_(alloc), 170+#ifndef VIGRA_WITHOUT_NESTED_TEMPLATE_PARAMS 171 pallocator_(alloc) 172+#else 173+ pallocator_() 174+#endif 175 { 176- vigra_precondition((width >= 0) && (height >= 0), 177- "BasicImage::BasicImage(int width, int height, value_type const & ): " 178+ vigra_precondition((w >= 0) && (h >= 0), 179+ "BasicImage::BasicImage(int w, int h, value_type const & ): " 180 "width and height must be >= 0.\n"); 181 182- resize(width, height, d); 183+ resize(w, h, d); 184 } 185 186 /** construct image of size size.x x size.y and initialize 187 every pixel with given data (use this constructor, if 188 value_type doesn't have a default constructor). Use the specified allocator. 189 */ 190- explicit BasicImage(difference_type const & size, value_type const & d, Alloc const & alloc = Alloc()) 191+ explicit BasicImage(difference_type const & sz, value_type const & d, Alloc const & alloc = Alloc()) 192 : data_(0), 193 width_(0), 194 height_(0), 195 allocator_(alloc), 196+#ifndef VIGRA_WITHOUT_NESTED_TEMPLATE_PARAMS 197 pallocator_(alloc) 198- { 199- vigra_precondition((size.x >= 0) && (size.y >= 0), 200- "BasicImage::BasicImage(Diff2D const & size, value_type const & v): " 201- "size.x and size.y must be >= 0.\n"); 202+#else 203+ pallocator_() 204+#endif 205+ { 206+ vigra_precondition((sz.x >= 0) && (sz.y >= 0), 207+ "BasicImage::BasicImage(Diff2D const & sz, value_type const & v): " 208+ "sz.x and sz.y must be >= 0.\n"); 209 210- resize(size.x, size.y, d); 211+ resize(sz.x, sz.y, d); 212 } 213 214 215 /** construct image of size width*height and copy the data from the 216 given C-style array \a d. Use the specified allocator. 217 */ 218- BasicImage(int width, int height, const_pointer d, Alloc const & alloc = Alloc()) 219+ BasicImage(int w, int h, const_pointer d, Alloc const & alloc = Alloc()) 220 : data_(0), 221 width_(0), 222 height_(0), 223 allocator_(alloc), 224+#ifndef VIGRA_WITHOUT_NESTED_TEMPLATE_PARAMS 225 pallocator_(alloc) 226+#else 227+ pallocator_() 228+#endif 229 { 230- vigra_precondition((width >= 0) && (height >= 0), 231- "BasicImage::BasicImage(int width, int height, const_pointer ): " 232+ vigra_precondition((w >= 0) && (h >= 0), 233+ "BasicImage::BasicImage(int w, int h, const_pointer ): " 234 "width and height must be >= 0.\n"); 235 236- resizeCopy(width, height, d); 237+ resizeCopy(w, h, d); 238 } 239 240 /** construct image of size size.x x size.y and copy the data from the 241 given C-style array. Use the specified allocator. 242 */ 243- explicit BasicImage(difference_type const & size, const_pointer d, Alloc const & alloc = Alloc()) 244+ explicit BasicImage(difference_type const & sz, const_pointer d, Alloc const & alloc = Alloc()) 245 : data_(0), 246 width_(0), 247 height_(0), 248 allocator_(alloc), 249+#ifndef VIGRA_WITHOUT_NESTED_TEMPLATE_PARAMS 250 pallocator_(alloc) 251- { 252- vigra_precondition((size.x >= 0) && (size.y >= 0), 253- "BasicImage::BasicImage(Diff2D const & size, const_pointer): " 254- "size.x and size.y must be >= 0.\n"); 255+#else 256+ pallocator_() 257+#endif 258+ { 259+ vigra_precondition((sz.x >= 0) && (sz.y >= 0), 260+ "BasicImage::BasicImage(Diff2D const & sz, const_pointer): " 261+ "sz.x and sz.y must be >= 0.\n"); 262 263- resizeCopy(size.x, size.y, d); 264+ resizeCopy(sz.x, sz.y, d); 265 } 266 267 /** copy rhs image 268@@ -730,20 +762,20 @@ class BasicImage 269 /** reset image to specified size (dimensions must not be negative) 270 (old data are kept if new size matches old size) 271 */ 272- void resize(int width, int height) 273+ void resize(int w, int h) 274 { 275- if(width != width_ || height != height_) 276- resize(width, height, value_type()); 277+ if(w != width_ || h != height_) 278+ resize(w, h, value_type()); 279 } 280 281 /** reset image to specified size (dimensions must not be negative) 282 (old data are kept if new size matches old size) 283 */ 284- void resize(difference_type const & size) 285+ void resize(difference_type const & sz) 286 { 287- if(size.x != width_ || size.y != height_) 288+ if(sz.x != width_ || sz.y != height_) 289 { 290- resize(size.x, size.y, value_type()); 291+ resize(sz.x, sz.y, value_type()); 292 } 293 } 294 295@@ -752,12 +784,12 @@ class BasicImage 296 constructor, dimensions must not be negative, 297 old data are kept if new size matches old size) 298 */ 299- void resize(int width, int height, value_type const & d); 300+ void resize(int w, int h, value_type const & d); 301 302 /** resize image to given size and initialize by copying data 303 from the C-style arra \a data. 304 */ 305- void resizeCopy(int width, int height, const_pointer data); 306+ void resizeCopy(int w, int h, const_pointer data); 307 308 /** resize image to size of other image and copy it's data 309 */ 310@@ -1066,30 +1098,30 @@ BasicImage<PIXELTYPE, Alloc>::init(value 311 312 template <class PIXELTYPE, class Alloc> 313 void 314-BasicImage<PIXELTYPE, Alloc>::resize(int width, int height, value_type const & d) 315+BasicImage<PIXELTYPE, Alloc>::resize(int w, int h, value_type const & d) 316 { 317- vigra_precondition((width >= 0) && (height >= 0), 318- "BasicImage::resize(int width, int height, value_type const &): " 319+ vigra_precondition((w >= 0) && (h >= 0), 320+ "BasicImage::resize(int w, int h, value_type const &): " 321 "width and height must be >= 0.\n"); 322 323- if (width_ != width || height_ != height) // change size? 324+ if (width_ != w || height_ != h) // change size? 325 { 326 value_type * newdata = 0; 327 value_type ** newlines = 0; 328- if(width*height > 0) 329+ if(w*h > 0) 330 { 331- if (width*height != width_*height_) // different sizes, must reallocate 332+ if (w*h != width_*height_) // different sizes, must reallocate 333 { 334- newdata = allocator_.allocate(typename Alloc::size_type(width*height)); 335- std::uninitialized_fill_n(newdata, width*height, d); 336- newlines = initLineStartArray(newdata, width, height); 337+ newdata = allocator_.allocate(typename Alloc::size_type(w*h)); 338+ std::uninitialized_fill_n(newdata, w*h, d); 339+ newlines = initLineStartArray(newdata, w, h); 340 deallocate(); 341 } 342 else // need only to reshape 343 { 344 newdata = data_; 345- std::fill_n(newdata, width*height, d); 346- newlines = initLineStartArray(newdata, width, height); 347+ std::fill_n(newdata, w*h, d); 348+ newlines = initLineStartArray(newdata, w, h); 349 pallocator_.deallocate(lines_, typename Alloc::size_type(height_)); 350 } 351 } 352@@ -1100,22 +1132,22 @@ BasicImage<PIXELTYPE, Alloc>::resize(int 353 354 data_ = newdata; 355 lines_ = newlines; 356- width_ = width; 357- height_ = height; 358+ width_ = w; 359+ height_ = h; 360 } 361- else if(width*height > 0) // keep size, re-init data 362+ else if(w*h > 0) // keep size, re-init data 363 { 364- std::fill_n(data_, width*height, d); 365+ std::fill_n(data_, w*h, d); 366 } 367 } 368 369 370 template <class PIXELTYPE, class Alloc> 371 void 372-BasicImage<PIXELTYPE, Alloc>::resizeCopy(int width, int height, const_pointer data) 373+BasicImage<PIXELTYPE, Alloc>::resizeCopy(int w, int h, const_pointer src_data) 374 { 375- int newsize = width*height; 376- if (width_ != width || height_ != height) // change size? 377+ int newsize = w*h; 378+ if (width_ != w || height_ != h) // change size? 379 { 380 value_type * newdata = 0; 381 value_type ** newlines = 0; 382@@ -1124,15 +1156,15 @@ BasicImage<PIXELTYPE, Alloc>::resizeCopy 383 if (newsize != width_*height_) // different sizes, must reallocate 384 { 385 newdata = allocator_.allocate(typename Alloc::size_type(newsize)); 386- std::uninitialized_copy(data, data + newsize, newdata); 387- newlines = initLineStartArray(newdata, width, height); 388+ std::uninitialized_copy(src_data, src_data + newsize, newdata); 389+ newlines = initLineStartArray(newdata, w, h); 390 deallocate(); 391 } 392 else // need only to reshape 393 { 394 newdata = data_; 395- std::copy(data, data + newsize, newdata); 396- newlines = initLineStartArray(newdata, width, height); 397+ std::copy(src_data, src_data + newsize, newdata); 398+ newlines = initLineStartArray(newdata, w, h); 399 pallocator_.deallocate(lines_, typename Alloc::size_type(height_)); 400 } 401 } 402@@ -1143,12 +1175,12 @@ BasicImage<PIXELTYPE, Alloc>::resizeCopy 403 404 data_ = newdata; 405 lines_ = newlines; 406- width_ = width; 407- height_ = height; 408+ width_ = w; 409+ height_ = h; 410 } 411 else if(newsize > 0) // keep size, copy data 412 { 413- std::copy(data, data + newsize, data_); 414+ std::copy(src_data, src_data + newsize, data_); 415 } 416 } 417 418@@ -1183,11 +1215,11 @@ BasicImage<PIXELTYPE, Alloc>::deallocate 419 420 template <class PIXELTYPE, class Alloc> 421 PIXELTYPE ** 422-BasicImage<PIXELTYPE, Alloc>::initLineStartArray(value_type * data, int width, int height) 423+BasicImage<PIXELTYPE, Alloc>::initLineStartArray(value_type * src_data, int w, int h) 424 { 425- value_type ** lines = pallocator_.allocate(typename Alloc::size_type(height)); 426- for(int y=0; y<height; ++y) 427- lines[y] = data + y*width; 428+ value_type ** lines = pallocator_.allocate(typename Alloc::size_type(h)); 429+ for(int y=0; y<h; ++y) 430+ lines[y] = src_data + y*w; 431 return lines; 432 } 433 434diff -uprN misc/vigra1.6.0/include/vigra/basicimageview.hxx misc/build/vigra1.6.0/include/vigra/basicimageview.hxx 435--- misc/vigra1.6.0/include/vigra/basicimageview.hxx 2008-08-13 08:15:34.000000000 -0500 436+++ misc/build/vigra1.6.0/include/vigra/basicimageview.hxx 2012-09-19 17:30:24.000000000 -0500 437@@ -176,20 +176,20 @@ class BasicImageView 438 439 /** construct view of size w x h 440 */ 441- BasicImageView(const_pointer data, int w, int h, int stride = 0) 442- : data_(const_cast<pointer>(data)), 443+ BasicImageView(const_pointer src_data, int w, int h, int data_stride = 0) 444+ : data_(const_cast<pointer>(src_data)), 445 width_(w), 446 height_(h), 447- stride_(stride == 0 ? w : stride) 448+ stride_(data_stride == 0 ? w : data_stride) 449 {} 450 451 /** construct view of size size.x x size.y 452 */ 453- BasicImageView(const_pointer data, difference_type const & size, int stride = 0) 454- : data_(const_cast<pointer>(data)), 455- width_(size.x), 456- height_(size.y), 457- stride_(stride == 0 ? size.x : stride) 458+ BasicImageView(const_pointer src_data, difference_type const & sz, int data_stride = 0) 459+ : data_(const_cast<pointer>(src_data)), 460+ width_(sz.x), 461+ height_(sz.y), 462+ stride_(data_stride == 0 ? sz.x : data_stride) 463 {} 464 465 /** set Image with const value 466diff -uprN misc/vigra1.6.0/include/vigra/boundarytensor.hxx misc/build/vigra1.6.0/include/vigra/boundarytensor.hxx 467--- misc/vigra1.6.0/include/vigra/boundarytensor.hxx 2008-08-13 08:15:34.000000000 -0500 468+++ misc/build/vigra1.6.0/include/vigra/boundarytensor.hxx 2012-09-19 17:30:24.000000000 -0500 469@@ -71,8 +71,8 @@ initGaussianPolarFilters1(double std_dev 470 int radius = (int)(4.0*std_dev + 0.5); 471 std_dev *= 1.08179074376; 472 double f = 1.0 / VIGRA_CSTD::sqrt(2.0 * M_PI) / std_dev; // norm 473- double a = 0.558868151788 / VIGRA_CSTD::pow(std_dev, 5); 474- double b = -2.04251639729 / VIGRA_CSTD::pow(std_dev, 3); 475+ double a = 0.558868151788 / VIGRA_CSTD::pow(std_dev, 5.0); 476+ double b = -2.04251639729 / VIGRA_CSTD::pow(std_dev, 3.0); 477 double sigma22 = -0.5 / std_dev / std_dev; 478 479 480@@ -175,7 +175,7 @@ initGaussianPolarFilters3(double std_dev 481 std_dev *= 1.15470053838; 482 double sigma22 = -0.5 / std_dev / std_dev; 483 double f = 1.0 / VIGRA_CSTD::sqrt(2.0 * M_PI) / std_dev; // norm 484- double a = 0.883887052922 / VIGRA_CSTD::pow(std_dev, 5); 485+ double a = 0.883887052922 / VIGRA_CSTD::pow(std_dev, 5.0); 486 487 for(unsigned int i=0; i<k.size(); ++i) 488 { 489diff -uprN misc/vigra1.6.0/include/vigra/config.hxx misc/build/vigra1.6.0/include/vigra/config.hxx 490--- misc/vigra1.6.0/include/vigra/config.hxx 2008-08-13 08:15:35.000000000 -0500 491+++ misc/build/vigra1.6.0/include/vigra/config.hxx 2012-09-19 17:30:24.000000000 -0500 492@@ -84,6 +84,12 @@ 493 #endif // VIGRA_NO_STD_MINMAX 494 #endif // (_MSC_VER < 1300) 495 496+ #if _MSC_VER <= 1310 497+ #ifndef CMATH_NOT_IN_STD 498+ #define CMATH_NOT_IN_STD 499+ #endif 500+ #endif // _MSC_VER < 1310 501+ 502 #if _MSC_VER < 1310 503 #define NO_PARTIAL_TEMPLATE_SPECIALIZATION 504 #define NO_OUT_OF_LINE_MEMBER_TEMPLATES 505diff -uprN misc/vigra1.6.0/include/vigra/diff2d.hxx misc/build/vigra1.6.0/include/vigra/diff2d.hxx 506--- misc/vigra1.6.0/include/vigra/diff2d.hxx 2008-08-13 08:15:35.000000000 -0500 507+++ misc/build/vigra1.6.0/include/vigra/diff2d.hxx 2012-09-19 17:30:24.000000000 -0500 508@@ -490,8 +490,8 @@ public: 509 510 /** Construct point at given position. 511 */ 512- Size2D(int width, int height) 513- : Diff2D(width, height) 514+ Size2D(int w, int h) 515+ : Diff2D(w, h) 516 {} 517 518 /** Copy Constructor. 519@@ -620,8 +620,8 @@ public: 520 521 /** Construct point at given position. 522 */ 523- Point2D(int x, int y) 524- : Diff2D(x, y) 525+ Point2D(int x_, int y_) 526+ : Diff2D(x_, y_) 527 {} 528 529 /** Copy Constructor. 530@@ -884,26 +884,26 @@ public: 531 * (lowerRight is considered to be outside the rectangle as 532 * usual in the VIGRA) 533 */ 534- Rect2D(Point2D const &upperLeft, Point2D const &lowerRight) 535- : upperLeft_(upperLeft), lowerRight_(lowerRight) 536+ Rect2D(Point2D const &ul, Point2D const &lr) 537+ : upperLeft_(ul), lowerRight_(lr) 538 {} 539 540 /** Construct a rectangle representing the given range 541 */ 542- Rect2D(int left, int top, int right, int bottom) 543- : upperLeft_(left, top), lowerRight_(right, bottom) 544+ Rect2D(int l, int t, int r, int b) 545+ : upperLeft_(l,t), lowerRight_(r,b) 546 {} 547 548 /** Construct a rectangle of given position and size 549 */ 550- Rect2D(Point2D const &upperLeft, Size2D const &size) 551- : upperLeft_(upperLeft), lowerRight_(upperLeft + size) 552+ Rect2D(Point2D const &ul, Size2D const &sz) 553+ : upperLeft_(ul), lowerRight_(ul + sz) 554 {} 555 556 /** Construct a rectangle of given size at position (0,0) 557 */ 558- explicit Rect2D(Size2D const &size) 559- : lowerRight_(Point2D(size)) 560+ explicit Rect2D(Size2D const &sz) 561+ : lowerRight_(Point2D(sz)) 562 {} 563 564 /** Return the first point (scan-order wise) which is 565@@ -950,9 +950,9 @@ public: 566 /** Move the whole rectangle so that upperLeft() will become 567 * Point2D(left, top) afterwards. 568 */ 569- void moveTo(int left, int top) 570+ void moveTo(int l, int t) 571 { 572- moveTo(Point2D(left, top)); 573+ moveTo(Point2D(l, t)); 574 } 575 576 /** Move the whole rectangle by the given 2D offset. 577@@ -1037,17 +1037,17 @@ public: 578 /** Resize this rectangle to the given extents. This will move 579 * the lower right corner only. 580 */ 581- void setSize(Size2D const &size) 582+ void setSize(Size2D const &sz) 583 { 584- lowerRight_ = upperLeft_ + size; 585+ lowerRight_ = upperLeft_ + sz; 586 } 587 588 /** Resize this rectangle to the given extents. This will move 589 * the lower right corner only. 590 */ 591- void setSize(int width, int height) 592+ void setSize(int w, int h) 593 { 594- lowerRight_ = upperLeft_ + Size2D(width, height); 595+ lowerRight_ = upperLeft_ + Size2D(w, h); 596 } 597 598 /** Increase the size of the rectangle by the given offset. This 599@@ -1131,7 +1131,7 @@ public: 600 bool contains(Rect2D const &r) const 601 { 602 return r.isEmpty() || 603- contains(r.upperLeft()) && contains(r.lowerRight()-Diff2D(1,1)); 604+ (contains(r.upperLeft()) && contains(r.lowerRight()-Diff2D(1,1))); 605 } 606 607 /** Return whether this rectangle overlaps with the given 608diff -uprN misc/vigra1.6.0/include/vigra/fftw.hxx misc/build/vigra1.6.0/include/vigra/fftw.hxx 609--- misc/vigra1.6.0/include/vigra/fftw.hxx 2008-08-13 08:15:36.000000000 -0500 610+++ misc/build/vigra1.6.0/include/vigra/fftw.hxx 2012-09-19 17:30:24.000000000 -0500 611@@ -399,8 +399,6 @@ inline FFTWComplex operator /(FFTWComple 612 return a; 613 } 614 615-using VIGRA_CSTD::abs; 616- 617 inline FFTWComplex::value_type abs(const FFTWComplex &a) 618 { 619 return a.magnitude(); 620diff -uprN misc/vigra1.6.0/include/vigra/fftw3.hxx misc/build/vigra1.6.0/include/vigra/fftw3.hxx 621--- misc/vigra1.6.0/include/vigra/fftw3.hxx 2008-08-13 08:15:36.000000000 -0500 622+++ misc/build/vigra1.6.0/include/vigra/fftw3.hxx 2012-09-19 17:30:24.000000000 -0500 623@@ -572,8 +572,6 @@ inline FFTWComplex operator /(FFTWComple 624 return a; 625 } 626 627-using VIGRA_CSTD::abs; 628- 629 /// absolute value (= magnitude) 630 inline FFTWComplex::value_type abs(const FFTWComplex &a) 631 { 632diff -uprN misc/vigra1.6.0/include/vigra/fixedpoint.hxx misc/build/vigra1.6.0/include/vigra/fixedpoint.hxx 633--- misc/vigra1.6.0/include/vigra/fixedpoint.hxx 2008-08-13 08:15:36.000000000 -0500 634+++ misc/build/vigra1.6.0/include/vigra/fixedpoint.hxx 2012-09-19 17:30:24.000000000 -0500 635@@ -118,20 +118,18 @@ enum FixedPointNoShift { FPNoShift }; 636 637 namespace detail { 638 639-template <bool MustRound> 640+template <bool MustRound, int N> 641 struct FPAssignWithRound; 642 643-template <> 644-struct FPAssignWithRound<false> 645+template <int N> 646+struct FPAssignWithRound<false, N> 647 { 648- template <int N> 649 static inline int exec(int v) { return v << (-N); } 650 }; 651 652-template <> 653-struct FPAssignWithRound<true> 654+template <int N> 655+struct FPAssignWithRound<true, N> 656 { 657- template <int N> 658 static inline int exec(int const v) 659 { 660 return (v + (1 << (N - 1))) >> (N); 661@@ -276,7 +274,7 @@ public: 662 */ 663 template <unsigned Int2, unsigned Frac2> 664 FixedPoint(const FixedPoint<Int2, Frac2> &other) 665- : value(detail::FPAssignWithRound<(Frac2 > FractionalBits)>::template exec<Frac2 - FractionalBits>(other.value)) 666+ : value(detail::FPAssignWithRound<(Frac2 > FractionalBits), Frac2 - FractionalBits>::exec(other.value)) 667 { 668 VIGRA_STATIC_ASSERT((FixedPoint_overflow_error__More_than_31_bits_requested<(IntBits + FractionalBits)>)); 669 VIGRA_STATIC_ASSERT((FixedPoint_assignment_error__Target_object_has_too_few_integer_bits<(IntBits >= Int2)>)); 670@@ -321,7 +319,7 @@ public: 671 FixedPoint & operator=(const FixedPoint<Int2, Frac2> &other) 672 { 673 VIGRA_STATIC_ASSERT((FixedPoint_assignment_error__Target_object_has_too_few_integer_bits<(IntBits >= Int2)>)); 674- value = detail::FPAssignWithRound<(Frac2 > FractionalBits)>::template exec<Frac2 - FractionalBits>(other.value); 675+ value = detail::FPAssignWithRound<(Frac2 > FractionalBits),Frac2 - FractionalBits>::exec(other.value); 676 return *this; 677 } 678 679@@ -373,7 +371,7 @@ public: 680 FixedPoint & operator+=(const FixedPoint<Int2, Frac2> &other) 681 { 682 VIGRA_STATIC_ASSERT((FixedPoint_assignment_error__Target_object_has_too_few_integer_bits<(IntBits >= Int2)>)); 683- value += detail::FPAssignWithRound<(Frac2 > FractionalBits)>::template exec<Frac2 - FractionalBits>(other.value); 684+ value += detail::FPAssignWithRound<(Frac2 > FractionalBits),Frac2 - FractionalBits>::exec(other.value); 685 return *this; 686 } 687 688@@ -384,7 +382,7 @@ public: 689 FixedPoint & operator-=(const FixedPoint<Int2, Frac2> &other) 690 { 691 VIGRA_STATIC_ASSERT((FixedPoint_assignment_error__Target_object_has_too_few_integer_bits<(IntBits >= Int2)>)); 692- value -= detail::FPAssignWithRound<(Frac2 > FractionalBits)>::template exec<Frac2 - FractionalBits>(other.value); 693+ value -= detail::FPAssignWithRound<(Frac2 > FractionalBits),Frac2 - FractionalBits>::exec(other.value); 694 return *this; 695 } 696 697diff -uprN misc/vigra1.6.0/include/vigra/gaborfilter.hxx misc/build/vigra1.6.0/include/vigra/gaborfilter.hxx 698--- misc/vigra1.6.0/include/vigra/gaborfilter.hxx 2008-08-13 08:15:36.000000000 -0500 699+++ misc/build/vigra1.6.0/include/vigra/gaborfilter.hxx 2012-09-19 17:30:24.000000000 -0500 700@@ -287,7 +287,11 @@ inline double angularGaborSigma(int dire 701 Namespace: vigra 702 */ 703 template <class ImageType, 704+#ifndef VIGRA_WITHOUT_NESTED_TEMPLATE_PARAMS 705 class Alloc = typename ImageType::allocator_type::template rebind<ImageType>::other > 706+#else 707+ class Alloc = std::allocator<ImageType> > 708+#endif 709 class GaborFilterFamily 710 : public ImageArray<ImageType, Alloc> 711 { 712diff -uprN misc/vigra1.6.0/include/vigra/gaussians.hxx misc/build/vigra1.6.0/include/vigra/gaussians.hxx 713--- misc/vigra1.6.0/include/vigra/gaussians.hxx 2008-08-13 08:15:36.000000000 -0500 714+++ misc/build/vigra1.6.0/include/vigra/gaussians.hxx 2012-09-19 17:30:24.000000000 -0500 715@@ -88,26 +88,26 @@ class Gaussian 716 sigma > 0.0 717 \endcode 718 */ 719- explicit Gaussian(T sigma = 1.0, unsigned int derivativeOrder = 0) 720- : sigma_(sigma), 721- sigma2_(-0.5 / sigma / sigma), 722+ explicit Gaussian(T s = 1.0, unsigned int derivOrder = 0) 723+ : sigma_(s), 724+ sigma2_(-0.5 / s / s), 725 norm_(0.0), 726- order_(derivativeOrder), 727- hermitePolynomial_(derivativeOrder / 2 + 1) 728+ order_(derivOrder), 729+ hermitePolynomial_(derivOrder / 2 + 1) 730 { 731- vigra_precondition(sigma_ > 0.0, 732+ vigra_precondition(s > 0.0, 733 "Gaussian::Gaussian(): sigma > 0 required."); 734 switch(order_) 735 { 736 case 1: 737 case 2: 738- norm_ = -1.0 / (VIGRA_CSTD::sqrt(2.0 * M_PI) * sq(sigma) * sigma); 739+ norm_ = -1.0 / (VIGRA_CSTD::sqrt(2.0 * M_PI) * sq(s) * s); 740 break; 741 case 3: 742- norm_ = 1.0 / (VIGRA_CSTD::sqrt(2.0 * M_PI) * sq(sigma) * sq(sigma) * sigma); 743+ norm_ = 1.0 / (VIGRA_CSTD::sqrt(2.0 * M_PI) * sq(s) * sq(s) * s); 744 break; 745 default: 746- norm_ = 1.0 / VIGRA_CSTD::sqrt(2.0 * M_PI) / sigma; 747+ norm_ = 1.0 / VIGRA_CSTD::sqrt(2.0 * M_PI) / s; 748 } 749 calculateHermitePolynomial(); 750 } 751--- misc/vigra1.6.0/include/vigra/mathutil.hxx 2008-08-13 08:15:38.000000000 -0500 752+++ misc/build/vigra1.6.0/include/vigra/mathutil.hxx 2012-09-21 02:16:23.000000000 -0500 753@@ -88,7 +88,7 @@ using VIGRA_CSTD::ceil; 754 755 // import abs(float), abs(double), abs(long double) from <cmath> 756 // and abs(int), abs(long), abs(long long) from <cstdlib> 757-using std::abs; 758+//using std::abs; 759 760 // define the missing variants of abs() to avoid 'ambigous overload' 761 // errors in template functions 762@@ -100,17 +100,41 @@ VIGRA_DEFINE_UNSIGNED_ABS(unsigned char) 763 VIGRA_DEFINE_UNSIGNED_ABS(unsigned short) 764 VIGRA_DEFINE_UNSIGNED_ABS(unsigned int) 765 VIGRA_DEFINE_UNSIGNED_ABS(unsigned long) 766+#ifdef VIGRA_HAS_LONG_LONG 767 VIGRA_DEFINE_UNSIGNED_ABS(unsigned long long) 768+#endif 769 770 #undef VIGRA_DEFINE_UNSIGNED_ABS 771 772 #define VIGRA_DEFINE_MISSING_ABS(T) \ 773 inline T abs(T t) { return t < 0 ? -t : t; } 774 775-VIGRA_DEFINE_MISSING_ABS(signed char) 776-VIGRA_DEFINE_MISSING_ABS(signed short) 777+#define VIGRA_DEFINE_SIGNED_ABS(T) \ 778+ inline T abs(T t) { return (T)abs(t); } 779+#define VIGRA_DEFINE_SIGNED_LABS(T) \ 780+ inline T abs(T t) { return (T)labs(t); } 781+#define VIGRA_DEFINE_SIGNED_LLABS(T) \ 782+ inline T abs(T t) { return (T)llabs(t); } 783+#define VIGRA_DEFINE_FABS(T) \ 784+ inline T abs(T t) { return (T)fabs(t); } 785+ 786+VIGRA_DEFINE_SIGNED_ABS(signed char) 787+VIGRA_DEFINE_SIGNED_ABS(signed short) 788+VIGRA_DEFINE_SIGNED_ABS(signed int) 789+VIGRA_DEFINE_SIGNED_LABS(signed long) 790+#ifdef VIGRA_HAS_LONG_LONG 791+VIGRA_DEFINE_SIGNED_LLABS(signed long long) 792+#endif 793+VIGRA_DEFINE_FABS(float) 794+VIGRA_DEFINE_FABS(double) 795+#ifdef VIGRA_HAS_LONG_DOUBLE 796+VIGRA_DEFINE_FABS(long double) 797+#endif 798 799-#undef VIGRA_DEFINE_MISSING_ABS 800+#undef VIGRA_DEFINE_SIGNED_ABS 801+#undef VIGRA_DEFINE_SIGNED_LABS 802+#undef VIGRA_DEFINE_SIGNED_LLABS 803+#undef VIGRA_DEFINE_FABS 804 805 /*! The rounding function. 806 807@@ -134,12 +158,14 @@ inline double round(double t) 808 : ceil(t - 0.5); 809 } 810 811+#ifdef VIGRA_HAS_LONG_DOUBLE 812 inline long double round(long double t) 813 { 814 return t >= 0.0 815 ? floor(t + 0.5) 816 : ceil(t - 0.5); 817 } 818+#endif 819 820 /*! Round up to the nearest power of 2. 821 822@@ -440,9 +466,15 @@ VIGRA_DEFINE_NORM(int) 823 VIGRA_DEFINE_NORM(unsigned int) 824 VIGRA_DEFINE_NORM(long) 825 VIGRA_DEFINE_NORM(unsigned long) 826+#ifdef VIGRA_HAS_LONG_LONG 827+VIGRA_DEFINE_NORM(long long) 828+VIGRA_DEFINE_NORM(unsigned long long) 829+#endif 830 VIGRA_DEFINE_NORM(float) 831 VIGRA_DEFINE_NORM(double) 832+#ifdef VIGRA_HAS_LONG_DOUBLE 833 VIGRA_DEFINE_NORM(long double) 834+#endif 835 836 #undef VIGRA_DEFINE_NORM 837 838diff -uprN misc/vigra1.6.0/include/vigra/numerictraits.hxx misc/build/vigra1.6.0/include/vigra/numerictraits.hxx 839--- misc/vigra1.6.0/include/vigra/numerictraits.hxx 2008-08-13 08:15:39.000000000 -0500 840+++ misc/build/vigra1.6.0/include/vigra/numerictraits.hxx 2012-09-19 17:30:24.000000000 -0500 841@@ -863,6 +863,90 @@ struct NumericTraits<long> 842 } 843 }; 844 845+#ifdef VIGRA_HAS_LONG_LONG 846+template<> 847+struct NumericTraits<long long> 848+{ 849+ typedef long long Type; 850+ typedef long long Promote; 851+ typedef double RealPromote; 852+ typedef std::complex<RealPromote> ComplexPromote; 853+ typedef Type ValueType; 854+ 855+ typedef VigraTrueType isIntegral; 856+ typedef VigraTrueType isScalar; 857+ typedef VigraTrueType isSigned; 858+ typedef VigraTrueType isOrdered; 859+ typedef VigraFalseType isComplex; 860+ 861+ static long long zero() { return 0; } 862+ static long long one() { return 1; } 863+ static long long nonZero() { return 1; } 864+ static long long min() { return LLONG_MIN; } 865+ static long long max() { return LLONG_MAX; } 866+ 867+#ifdef NO_INLINE_STATIC_CONST_DEFINITION 868+ enum { minConst = LONG_MIN, maxConst = LLONG_MAX }; 869+#else 870+ static const long long minConst = LLONG_MIN; 871+ static const long long maxConst = LLONG_MAX; 872+#endif 873+ 874+ static Promote toPromote(long long v) { return v; } 875+ static RealPromote toRealPromote(long long v) { return v; } 876+ static long long fromPromote(Promote v) { return v; } 877+ static long long fromRealPromote(RealPromote v) { 878+ return ((v < 0.0) 879+ ? ((v < (RealPromote)LLONG_MIN) 880+ ? LLONG_MIN 881+ : static_cast<long long>(v - 0.5)) 882+ : ((v > (RealPromote)LLONG_MAX) 883+ ? LLONG_MAX 884+ : static_cast<long long>(v + 0.5))); 885+ } 886+}; 887+ 888+template<> 889+struct NumericTraits<unsigned long long> 890+{ 891+ typedef unsigned long long Type; 892+ typedef unsigned long long Promote; 893+ typedef double RealPromote; 894+ typedef std::complex<RealPromote> ComplexPromote; 895+ typedef Type ValueType; 896+ 897+ typedef VigraTrueType isIntegral; 898+ typedef VigraTrueType isScalar; 899+ typedef VigraFalseType isSigned; 900+ typedef VigraTrueType isOrdered; 901+ typedef VigraFalseType isComplex; 902+ 903+ static unsigned long long zero() { return 0; } 904+ static unsigned long long one() { return 1; } 905+ static unsigned long long nonZero() { return 1; } 906+ static unsigned long long min() { return 0; } 907+ static unsigned long long max() { return ULLONG_MAX; } 908+ 909+#ifdef NO_INLINE_STATIC_CONST_DEFINITION 910+ enum { minConst = 0, maxConst = ULLONG_MAX }; 911+#else 912+ static const unsigned long long minConst = 0; 913+ static const unsigned long long maxConst = ULLONG_MAX; 914+#endif 915+ 916+ static Promote toPromote(unsigned long long v) { return v; } 917+ static RealPromote toRealPromote(unsigned long long v) { return v; } 918+ static unsigned long long fromPromote(Promote v) { return v; } 919+ static unsigned long long fromRealPromote(RealPromote v) { 920+ return ((v < 0.0) 921+ ? 0 922+ : ((v > (RealPromote)ULLONG_MAX) 923+ ? ULLONG_MAX 924+ : static_cast<unsigned long long>(v + 0.5))); 925+ } 926+}; 927+#endif 928+ 929 template<> 930 struct NumericTraits<unsigned long> 931 { 932@@ -1050,6 +1134,7 @@ struct NumericTraits<double> 933 static double fromRealPromote(RealPromote v) { return v; } 934 }; 935 936+#ifdef VIGRA_HAS_LONG_DOUBLE 937 template<> 938 struct NumericTraits<long double> 939 { 940@@ -1079,6 +1164,7 @@ struct NumericTraits<long double> 941 static long double fromPromote(Promote v) { return v; } 942 static long double fromRealPromote(RealPromote v) { return v; } 943 }; 944+#endif 945 946 #ifndef NO_PARTIAL_TEMPLATE_SPECIALIZATION 947 948@@ -1158,9 +1244,15 @@ VIGRA_DEFINE_NORM_TRAITS(int) 949 VIGRA_DEFINE_NORM_TRAITS(unsigned int) 950 VIGRA_DEFINE_NORM_TRAITS(long) 951 VIGRA_DEFINE_NORM_TRAITS(unsigned long) 952+#ifdef VIGRA_HAS_LONG_LONG 953+VIGRA_DEFINE_NORM_TRAITS(long long) 954+VIGRA_DEFINE_NORM_TRAITS(unsigned long long) 955+#endif 956 VIGRA_DEFINE_NORM_TRAITS(float) 957 VIGRA_DEFINE_NORM_TRAITS(double) 958+#ifdef VIGRA_HAS_LONG_DOUBLE 959 VIGRA_DEFINE_NORM_TRAITS(long double) 960+#endif 961 962 #ifdef LLONG_MAX 963 VIGRA_DEFINE_NORM_TRAITS(long long) 964diff -uprN misc/vigra1.6.0/include/vigra/orientedtensorfilters.hxx misc/build/vigra1.6.0/include/vigra/orientedtensorfilters.hxx 965--- misc/vigra1.6.0/include/vigra/orientedtensorfilters.hxx 2008-08-13 08:15:40.000000000 -0500 966+++ misc/build/vigra1.6.0/include/vigra/orientedtensorfilters.hxx 2012-09-19 17:30:24.000000000 -0500 967@@ -435,7 +435,7 @@ class Sin6RingKernel 968 if(x == 0 && y == 0) 969 return weights_(radius_, radius_); 970 double d = dot(vectors_(x+radius_, y+radius_), v); 971- return VIGRA_CSTD::pow(1.0 - d * d, 3) * weights_(x+radius_, y+radius_); 972+ return VIGRA_CSTD::pow(1.0 - d * d, 3.0) * weights_(x+radius_, y+radius_); 973 } 974 }; 975 976@@ -456,7 +456,7 @@ class Sin6Kernel 977 if(x == 0 && y == 0) 978 return weights_(radius_, radius_); 979 double d = dot(vectors_(x+radius_, y+radius_), v); 980- return VIGRA_CSTD::pow(1.0 - d * d, 3) * weights_(x+radius_, y+radius_); 981+ return VIGRA_CSTD::pow(1.0 - d * d, 3.0) * weights_(x+radius_, y+radius_); 982 } 983 }; 984 985@@ -477,7 +477,7 @@ class Cos6RingKernel 986 if(x == 0 && y == 0) 987 return weights_(radius_, radius_); 988 double d = dot(vectors_(x+radius_, y+radius_), v); 989- return (1.0 - VIGRA_CSTD::pow(1.0 - d * d, 3)) * weights_(x+radius_, y+radius_); 990+ return (1.0 - VIGRA_CSTD::pow(1.0 - d * d, 3.0)) * weights_(x+radius_, y+radius_); 991 } 992 }; 993 994@@ -498,7 +498,7 @@ class Cos6Kernel 995 if(x == 0 && y == 0) 996 return weights_(radius_, radius_); 997 double d = dot(vectors_(x+radius_, y+radius_), v); 998- return (1.0 - VIGRA_CSTD::pow(1.0 - d * d, 3)) * weights_(x+radius_, y+radius_); 999+ return (1.0 - VIGRA_CSTD::pow(1.0 - d * d, 3.0)) * weights_(x+radius_, y+radius_); 1000 } 1001 }; 1002 1003diff -uprN misc/vigra1.6.0/include/vigra/polynomial.hxx misc/build/vigra1.6.0/include/vigra/polynomial.hxx 1004--- misc/vigra1.6.0/include/vigra/polynomial.hxx 2008-08-13 08:15:40.000000000 -0500 1005+++ misc/build/vigra1.6.0/include/vigra/polynomial.hxx 2012-09-19 17:30:24.000000000 -0500 1006@@ -119,10 +119,10 @@ class PolynomialView 1007 of subsequent algorithms (especially root finding) performed on the 1008 polynomial. 1009 */ 1010- PolynomialView(T * coeffs, unsigned int order, double epsilon = 1.0e-14) 1011+ PolynomialView(T * coeffs, unsigned int ord, double eps = 1.0e-14) 1012 : coeffs_(coeffs), 1013- order_(order), 1014- epsilon_(epsilon) 1015+ order_(ord), 1016+ epsilon_(eps) 1017 {} 1018 1019 /// Access the coefficient of x^i 1020@@ -245,16 +245,16 @@ class PolynomialView 1021 { epsilon_ = eps; } 1022 1023 protected: 1024- PolynomialView(double epsilon = 1e-14) 1025+ PolynomialView(double eps = 1e-14) 1026 : coeffs_(0), 1027 order_(0), 1028- epsilon_(epsilon) 1029+ epsilon_(eps) 1030 {} 1031 1032- void setCoeffs(T * coeffs, unsigned int order) 1033+ void setCoeffs(T * coeffs, unsigned int ord) 1034 { 1035 coeffs_ = coeffs; 1036- order_ = order; 1037+ order_ = ord; 1038 } 1039 1040 T * coeffs_; 1041@@ -397,9 +397,9 @@ PolynomialView<T>::deflateConjugatePair( 1042 1043 template <class T> 1044 void 1045-PolynomialView<T>::minimizeOrder(double epsilon) 1046+PolynomialView<T>::minimizeOrder(double eps) 1047 { 1048- while(std::abs(coeffs_[order_]) <= epsilon && order_ > 0) 1049+ while(std::abs(coeffs_[order_]) <= eps && order_ > 0) 1050 --order_; 1051 } 1052 1053diff -uprN misc/vigra1.6.0/include/vigra/recursiveconvolution.hxx misc/build/vigra1.6.0/include/vigra/recursiveconvolution.hxx 1054--- misc/vigra1.6.0/include/vigra/recursiveconvolution.hxx 2008-08-13 08:15:40.000000000 -0500 1055+++ misc/build/vigra1.6.0/include/vigra/recursiveconvolution.hxx 2012-09-19 17:30:24.000000000 -0500 1056@@ -261,16 +261,16 @@ void recursiveFilterLine(SrcIterator is, 1057 { 1058 // correction factors for b 1059 double bright = b; 1060- double bleft = VIGRA_CSTD::pow(b, w); 1061+ double bleft = VIGRA_CSTD::pow(b, (double)w); 1062 1063 for(x=w-1; x>=0; --x, --is, --id) 1064 { 1065 TempType f = b * old; 1066 old = as(is) + f; 1067- double norm = (1.0 - b) / (1.0 + b - bleft - bright); 1068+ double norm2 = (1.0 - b) / (1.0 + b - bleft - bright); 1069 bleft /= b; 1070 bright *= b; 1071- ad.set(norm * (line[x] + f), id); 1072+ ad.set(norm2 * (line[x] + f), id); 1073 } 1074 } 1075 else if(border == BORDER_TREATMENT_AVOID) 1076diff -uprN misc/vigra1.6.0/include/vigra/rgbvalue.hxx misc/build/vigra1.6.0/include/vigra/rgbvalue.hxx 1077--- misc/vigra1.6.0/include/vigra/rgbvalue.hxx 2008-08-13 08:15:41.000000000 -0500 1078+++ misc/build/vigra1.6.0/include/vigra/rgbvalue.hxx 2012-09-19 17:30:24.000000000 -0500 1079@@ -39,6 +39,10 @@ 1080 #ifndef VIGRA_RGBVALUE_HXX 1081 #define VIGRA_RGBVALUE_HXX 1082 1083+#if defined __GNUC__ 1084+#pragma GCC system_header 1085+#endif 1086+ 1087 #include <cmath> // abs(double) 1088 #include <cstdlib> // abs(int) 1089 #include "config.hxx" 1090@@ -702,8 +706,6 @@ operator/=(RGBValue<V, RIDX, GIDX, BIDX> 1091 return l; 1092 } 1093 1094-using VIGRA_CSTD::abs; 1095- 1096 /// component-wise absolute value 1097 template <class T, unsigned int RIDX, unsigned int GIDX, unsigned int BIDX> 1098 inline 1099diff -uprN misc/vigra1.6.0/include/vigra/separableconvolution.hxx misc/build/vigra1.6.0/include/vigra/separableconvolution.hxx 1100--- misc/vigra1.6.0/include/vigra/separableconvolution.hxx 2008-08-13 08:15:41.000000000 -0500 1101+++ misc/build/vigra1.6.0/include/vigra/separableconvolution.hxx 2012-09-19 17:30:24.000000000 -0500 1102@@ -1022,11 +1022,11 @@ class Kernel1D 1103 */ 1104 InitProxy operator=(value_type const & v) 1105 { 1106- int size = right_ - left_ + 1; 1107+ int sz = right_ - left_ + 1; 1108 for(unsigned int i=0; i<kernel_.size(); ++i) kernel_[i] = v; 1109- norm_ = (double)size*v; 1110+ norm_ = (double)sz*v; 1111 1112- return InitProxy(kernel_.begin(), size, norm_); 1113+ return InitProxy(kernel_.begin(), sz, norm_); 1114 } 1115 1116 /** Destructor. 1117@@ -1663,8 +1663,8 @@ class Kernel1D 1118 }; 1119 1120 template <class ARITHTYPE> 1121-void Kernel1D<ARITHTYPE>::normalize(value_type norm, 1122- unsigned int derivativeOrder, 1123+void Kernel1D<ARITHTYPE>::normalize(value_type normFactor, 1124+ unsigned int derivOrder, 1125 double offset) 1126 { 1127 typedef typename NumericTraits<value_type>::RealPromote TmpType; 1128@@ -1673,7 +1673,7 @@ void Kernel1D<ARITHTYPE>::normalize(valu 1129 Iterator k = kernel_.begin(); 1130 TmpType sum = NumericTraits<TmpType>::zero(); 1131 1132- if(derivativeOrder == 0) 1133+ if(derivOrder == 0) 1134 { 1135 for(; k < kernel_.end(); ++k) 1136 { 1137@@ -1683,11 +1683,11 @@ void Kernel1D<ARITHTYPE>::normalize(valu 1138 else 1139 { 1140 unsigned int faculty = 1; 1141- for(unsigned int i = 2; i <= derivativeOrder; ++i) 1142+ for(unsigned int i = 2; i <= derivOrder; ++i) 1143 faculty *= i; 1144 for(double x = left() + offset; k < kernel_.end(); ++x, ++k) 1145 { 1146- sum += *k * VIGRA_CSTD::pow(-x, int(derivativeOrder)) / faculty; 1147+ sum += *k * VIGRA_CSTD::pow(-x, (double)derivOrder) / faculty; 1148 } 1149 } 1150 1151@@ -1695,21 +1695,21 @@ void Kernel1D<ARITHTYPE>::normalize(valu 1152 "Kernel1D<ARITHTYPE>::normalize(): " 1153 "Cannot normalize a kernel with sum = 0"); 1154 // normalize 1155- sum = norm / sum; 1156+ sum = normFactor / sum; 1157 k = kernel_.begin(); 1158 for(; k != kernel_.end(); ++k) 1159 { 1160 *k = *k * sum; 1161 } 1162 1163- norm_ = norm; 1164+ norm_ = normFactor; 1165 } 1166 1167 /***********************************************************************/ 1168 1169 template <class ARITHTYPE> 1170 void Kernel1D<ARITHTYPE>::initGaussian(double std_dev, 1171- value_type norm) 1172+ value_type normFactor) 1173 { 1174 vigra_precondition(std_dev >= 0.0, 1175 "Kernel1D::initGaussian(): Standard deviation must be >= 0."); 1176@@ -1742,8 +1742,8 @@ void Kernel1D<ARITHTYPE>::initGaussian(d 1177 right_ = 0; 1178 } 1179 1180- if(norm != 0.0) 1181- normalize(norm); 1182+ if(normFactor != 0.0) 1183+ normalize(normFactor); 1184 else 1185 norm_ = 1.0; 1186 1187@@ -1755,7 +1755,7 @@ void Kernel1D<ARITHTYPE>::initGaussian(d 1188 1189 template <class ARITHTYPE> 1190 void Kernel1D<ARITHTYPE>::initDiscreteGaussian(double std_dev, 1191- value_type norm) 1192+ value_type normFactor) 1193 { 1194 vigra_precondition(std_dev >= 0.0, 1195 "Kernel1D::initDiscreteGaussian(): Standard deviation must be >= 0."); 1196@@ -1797,7 +1797,7 @@ void Kernel1D<ARITHTYPE>::initDiscreteGa 1197 er += warray[i]; 1198 } 1199 1200- double scale = norm / (2*er - warray[0]); 1201+ double scale = normFactor / (2*er - warray[0]); 1202 1203 initExplicitly(-radius, radius); 1204 iterator c = center(); 1205@@ -1810,12 +1810,12 @@ void Kernel1D<ARITHTYPE>::initDiscreteGa 1206 else 1207 { 1208 kernel_.erase(kernel_.begin(), kernel_.end()); 1209- kernel_.push_back(norm); 1210+ kernel_.push_back(normFactor); 1211 left_ = 0; 1212 right_ = 0; 1213 } 1214 1215- norm_ = norm; 1216+ norm_ = normFactor; 1217 1218 // best border treatment for Gaussians is BORDER_TREATMENT_REFLECT 1219 border_treatment_ = BORDER_TREATMENT_REFLECT; 1220@@ -1826,15 +1826,15 @@ void Kernel1D<ARITHTYPE>::initDiscreteGa 1221 template <class ARITHTYPE> 1222 void 1223 Kernel1D<ARITHTYPE>::initGaussianDerivative(double std_dev, 1224- int order, 1225- value_type norm) 1226+ int order, 1227+ value_type normFactor) 1228 { 1229 vigra_precondition(order >= 0, 1230 "Kernel1D::initGaussianDerivative(): Order must be >= 0."); 1231 1232 if(order == 0) 1233 { 1234- initGaussian(std_dev, norm); 1235+ initGaussian(std_dev, normFactor); 1236 return; 1237 } 1238 1239@@ -1865,7 +1865,7 @@ Kernel1D<ARITHTYPE>::initGaussianDerivat 1240 1241 // remove DC, but only if kernel correction is permitted by a non-zero 1242 // value for norm 1243- if(norm != 0.0) 1244+ if(normFactor != 0.0) 1245 { 1246 for(unsigned int i=0; i < kernel_.size(); ++i) 1247 { 1248@@ -1876,8 +1876,8 @@ Kernel1D<ARITHTYPE>::initGaussianDerivat 1249 left_ = -radius; 1250 right_ = radius; 1251 1252- if(norm != 0.0) 1253- normalize(norm, order); 1254+ if(normFactor != 0.0) 1255+ normalize(normFactor, order); 1256 else 1257 norm_ = 1.0; 1258 1259@@ -1891,7 +1891,7 @@ Kernel1D<ARITHTYPE>::initGaussianDerivat 1260 template <class ARITHTYPE> 1261 void 1262 Kernel1D<ARITHTYPE>::initBinomial(int radius, 1263- value_type norm) 1264+ value_type normFactor) 1265 { 1266 vigra_precondition(radius > 0, 1267 "Kernel1D::initBinomial(): Radius must be > 0."); 1268@@ -1921,12 +1921,12 @@ Kernel1D<ARITHTYPE>::initBinomial(int ra 1269 1270 for(i=0; i<=radius*2+1; ++i) 1271 { 1272- kernel_.push_back(kernel[i] * norm); 1273+ kernel_.push_back(kernel[i] * normFactor); 1274 } 1275 1276 left_ = -radius; 1277 right_ = radius; 1278- norm_ = norm; 1279+ norm_ = normFactor; 1280 1281 // best border treatment for Binomial is BORDER_TREATMENT_REFLECT 1282 border_treatment_ = BORDER_TREATMENT_REFLECT; 1283@@ -1936,7 +1936,7 @@ Kernel1D<ARITHTYPE>::initBinomial(int ra 1284 1285 template <class ARITHTYPE> 1286 void Kernel1D<ARITHTYPE>::initAveraging(int radius, 1287- value_type norm) 1288+ value_type normFactor) 1289 { 1290 vigra_precondition(radius > 0, 1291 "Kernel1D::initAveraging(): Radius must be > 0."); 1292@@ -1950,12 +1950,12 @@ void Kernel1D<ARITHTYPE>::initAveraging( 1293 1294 for(int i=0; i<=radius*2+1; ++i) 1295 { 1296- kernel_.push_back(scale * norm); 1297+ kernel_.push_back(scale * normFactor); 1298 } 1299 1300 left_ = -radius; 1301 right_ = radius; 1302- norm_ = norm; 1303+ norm_ = normFactor; 1304 1305 // best border treatment for Averaging is BORDER_TREATMENT_CLIP 1306 border_treatment_ = BORDER_TREATMENT_CLIP; 1307diff -uprN misc/vigra1.6.0/include/vigra/sized_int.hxx misc/build/vigra1.6.0/include/vigra/sized_int.hxx 1308--- misc/vigra1.6.0/include/vigra/sized_int.hxx 2008-08-13 08:15:41.000000000 -0500 1309+++ misc/build/vigra1.6.0/include/vigra/sized_int.hxx 2012-09-19 17:30:24.000000000 -0500 1310@@ -73,11 +73,15 @@ struct SelectIntegerType<SIZE, Int_type_ 1311 typedef Int_type_not_supported_on_this_platform type; 1312 }; 1313 1314+#if defined __SUNPRO_CC 1315+#pragma disable_warn 1316+#endif 1317+ 1318 template<class LIST> 1319 struct SelectBiggestIntegerType 1320 { 1321- enum { cursize = LIST::size, 1322- nextsize = SelectBiggestIntegerType<typename LIST::next>::size, 1323+ enum { cursize = static_cast< int >(LIST::size), 1324+ nextsize = static_cast< int >(SelectBiggestIntegerType<typename LIST::next>::size), 1325 size = (cursize < nextsize) ? nextsize : cursize }; 1326 typedef typename 1327 IfBool<(cursize < nextsize), 1328@@ -86,6 +90,10 @@ struct SelectBiggestIntegerType 1329 type; 1330 }; 1331 1332+#if defined __SUNPRO_CC 1333+#pragma enable_warn 1334+#endif 1335+ 1336 template<> 1337 struct SelectBiggestIntegerType<Int_type_not_supported_on_this_platform> 1338 { 1339diff -uprN misc/vigra1.6.0/include/vigra/splines.hxx misc/build/vigra1.6.0/include/vigra/splines.hxx 1340--- misc/vigra1.6.0/include/vigra/splines.hxx 2008-08-13 08:15:41.000000000 -0500 1341+++ misc/build/vigra1.6.0/include/vigra/splines.hxx 2012-09-19 17:30:24.000000000 -0500 1342@@ -108,8 +108,8 @@ class BSplineBase 1343 /** Create functor for gevine derivative of the spline. The spline's order 1344 is specified spline by the template argument <TT>ORDER</tt>. 1345 */ 1346- explicit BSplineBase(unsigned int derivativeOrder = 0) 1347- : s1_(derivativeOrder) 1348+ explicit BSplineBase(unsigned int derivOrder = 0) 1349+ : s1_(derivOrder) 1350 {} 1351 1352 /** Unary function call. 1353@@ -280,8 +280,8 @@ class BSplineBase<0, T> 1354 typedef T result_type; 1355 enum StaticOrder { order = 0 }; 1356 1357- explicit BSplineBase(unsigned int derivativeOrder = 0) 1358- : derivativeOrder_(derivativeOrder) 1359+ explicit BSplineBase(unsigned int derivOrder = 0) 1360+ : derivativeOrder_(derivOrder) 1361 {} 1362 1363 result_type operator()(argument_type x) const 1364@@ -357,8 +357,8 @@ class BSpline<1, T> 1365 typedef T result_type; 1366 enum StaticOrder { order = 1 }; 1367 1368- explicit BSpline(unsigned int derivativeOrder = 0) 1369- : derivativeOrder_(derivativeOrder) 1370+ explicit BSpline(unsigned int derivOrder = 0) 1371+ : derivativeOrder_(derivOrder) 1372 {} 1373 1374 result_type operator()(argument_type x) const 1375@@ -454,8 +454,8 @@ class BSpline<2, T> 1376 typedef T result_type; 1377 enum StaticOrder { order = 2 }; 1378 1379- explicit BSpline(unsigned int derivativeOrder = 0) 1380- : derivativeOrder_(derivativeOrder) 1381+ explicit BSpline(unsigned int derivOrder = 0) 1382+ : derivativeOrder_(derivOrder) 1383 {} 1384 1385 result_type operator()(argument_type x) const 1386@@ -583,8 +583,8 @@ class BSpline<3, T> 1387 typedef T result_type; 1388 enum StaticOrder { order = 3 }; 1389 1390- explicit BSpline(unsigned int derivativeOrder = 0) 1391- : derivativeOrder_(derivativeOrder) 1392+ explicit BSpline(unsigned int derivOrder = 0) 1393+ : derivativeOrder_(derivOrder) 1394 {} 1395 1396 result_type operator()(argument_type x) const 1397@@ -735,8 +735,8 @@ class BSpline<4, T> 1398 typedef T result_type; 1399 enum StaticOrder { order = 4 }; 1400 1401- explicit BSpline(unsigned int derivativeOrder = 0) 1402- : derivativeOrder_(derivativeOrder) 1403+ explicit BSpline(unsigned int derivOrder = 0) 1404+ : derivativeOrder_(derivOrder) 1405 {} 1406 1407 result_type operator()(argument_type x) const 1408diff -uprN misc/vigra1.6.0/include/vigra/static_assert.hxx misc/build/vigra1.6.0/include/vigra/static_assert.hxx 1409--- misc/vigra1.6.0/include/vigra/static_assert.hxx 2008-08-13 08:15:41.000000000 -0500 1410+++ misc/build/vigra1.6.0/include/vigra/static_assert.hxx 2012-09-19 17:30:24.000000000 -0500 1411@@ -115,7 +115,7 @@ assertImpl( void (*)(Predicate), typenam 1412 1413 TODO: provide more assertion base classes for other (non boolean) types of tests 1414 */ 1415-#if !defined(__GNUC__) || __GNUC__ > 2 1416+#if (!defined(__GNUC__) || __GNUC__ > 2) && (!defined(__SUNPRO_CC) || __SUNPRO_CC > 0x550) 1417 #define VIGRA_STATIC_ASSERT(Predicate) \ 1418 enum { \ 1419 VIGRA_PREPROCESSOR_CONCATENATE(vigra_assertion_in_line_, __LINE__) = sizeof( \ 1420diff -uprN misc/vigra1.6.0/include/vigra/tinyvector.hxx misc/build/vigra1.6.0/include/vigra/tinyvector.hxx 1421--- misc/vigra1.6.0/include/vigra/tinyvector.hxx 2008-08-13 08:15:42.000000000 -0500 1422+++ misc/build/vigra1.6.0/include/vigra/tinyvector.hxx 2012-09-19 17:30:24.000000000 -0500 1423@@ -39,6 +39,10 @@ 1424 #ifndef VIGRA_TINYVECTOR_HXX 1425 #define VIGRA_TINYVECTOR_HXX 1426 1427+#if defined __GNUC__ 1428+#pragma GCC system_header 1429+#endif 1430+ 1431 #include <cmath> // abs(double) 1432 #include <cstdlib> // abs(int) 1433 #include <iosfwd> // ostream 1434@@ -49,7 +53,6 @@ 1435 1436 namespace vigra { 1437 1438-using VIGRA_CSTD::abs; 1439 using VIGRA_CSTD::ceil; 1440 using VIGRA_CSTD::floor; 1441 1442@@ -439,9 +442,9 @@ class TinyVectorBase 1443 /** Initialize from another sequence (must have length SIZE!) 1444 */ 1445 template <class Iterator> 1446- void init(Iterator i, Iterator end) 1447+ void init(Iterator i, Iterator iend) 1448 { 1449- vigra_precondition(end-i == SIZE, 1450+ vigra_precondition(iend-i == SIZE, 1451 "TinyVector::init(): Sequence has wrong size."); 1452 Loop::assignCast(data_, i); 1453 } 1454