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,8 +1156,8 @@ 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@@ -1143,12 +1175,12 @@ BasicImage<PIXELTYPE, Alloc>::resizeCopy 394 395 data_ = newdata; 396 lines_ = newlines; 397- width_ = width; 398- height_ = height; 399+ width_ = w; 400+ height_ = h; 401 } 402 else if(newsize > 0) // keep size, copy data 403 { 404- std::copy(data, data + newsize, data_); 405+ std::copy(src_data, src_data + newsize, data_); 406 } 407 } 408 409@@ -1183,11 +1215,11 @@ BasicImage<PIXELTYPE, Alloc>::deallocate 410 411 template <class PIXELTYPE, class Alloc> 412 PIXELTYPE ** 413-BasicImage<PIXELTYPE, Alloc>::initLineStartArray(value_type * data, int width, int height) 414+BasicImage<PIXELTYPE, Alloc>::initLineStartArray(value_type * src_data, int w, int h) 415 { 416- value_type ** lines = pallocator_.allocate(typename Alloc::size_type(height)); 417- for(int y=0; y<height; ++y) 418- lines[y] = data + y*width; 419+ value_type ** lines = pallocator_.allocate(typename Alloc::size_type(h)); 420+ for(int y=0; y<h; ++y) 421+ lines[y] = src_data + y*w; 422 return lines; 423 } 424 425diff -uprN misc/vigra1.6.0/include/vigra/basicimageview.hxx misc/build/vigra1.6.0/include/vigra/basicimageview.hxx 426--- misc/vigra1.6.0/include/vigra/basicimageview.hxx 2008-08-13 08:15:34.000000000 -0500 427+++ misc/build/vigra1.6.0/include/vigra/basicimageview.hxx 2012-09-19 17:30:24.000000000 -0500 428@@ -176,20 +176,20 @@ class BasicImageView 429 430 /** construct view of size w x h 431 */ 432- BasicImageView(const_pointer data, int w, int h, int stride = 0) 433- : data_(const_cast<pointer>(data)), 434+ BasicImageView(const_pointer src_data, int w, int h, int data_stride = 0) 435+ : data_(const_cast<pointer>(src_data)), 436 width_(w), 437 height_(h), 438- stride_(stride == 0 ? w : stride) 439+ stride_(data_stride == 0 ? w : data_stride) 440 {} 441 442 /** construct view of size size.x x size.y 443 */ 444- BasicImageView(const_pointer data, difference_type const & size, int stride = 0) 445- : data_(const_cast<pointer>(data)), 446- width_(size.x), 447- height_(size.y), 448- stride_(stride == 0 ? size.x : stride) 449+ BasicImageView(const_pointer src_data, difference_type const & sz, int data_stride = 0) 450+ : data_(const_cast<pointer>(src_data)), 451+ width_(sz.x), 452+ height_(sz.y), 453+ stride_(data_stride == 0 ? sz.x : data_stride) 454 {} 455 456 /** set Image with const value 457diff -uprN misc/vigra1.6.0/include/vigra/boundarytensor.hxx misc/build/vigra1.6.0/include/vigra/boundarytensor.hxx 458--- misc/vigra1.6.0/include/vigra/boundarytensor.hxx 2008-08-13 08:15:34.000000000 -0500 459+++ misc/build/vigra1.6.0/include/vigra/boundarytensor.hxx 2012-09-19 17:30:24.000000000 -0500 460@@ -71,8 +71,8 @@ initGaussianPolarFilters1(double std_dev 461 int radius = (int)(4.0*std_dev + 0.5); 462 std_dev *= 1.08179074376; 463 double f = 1.0 / VIGRA_CSTD::sqrt(2.0 * M_PI) / std_dev; // norm 464- double a = 0.558868151788 / VIGRA_CSTD::pow(std_dev, 5); 465- double b = -2.04251639729 / VIGRA_CSTD::pow(std_dev, 3); 466+ double a = 0.558868151788 / VIGRA_CSTD::pow(std_dev, 5.0); 467+ double b = -2.04251639729 / VIGRA_CSTD::pow(std_dev, 3.0); 468 double sigma22 = -0.5 / std_dev / std_dev; 469 470 471@@ -175,7 +175,7 @@ initGaussianPolarFilters3(double std_dev 472 std_dev *= 1.15470053838; 473 double sigma22 = -0.5 / std_dev / std_dev; 474 double f = 1.0 / VIGRA_CSTD::sqrt(2.0 * M_PI) / std_dev; // norm 475- double a = 0.883887052922 / VIGRA_CSTD::pow(std_dev, 5); 476+ double a = 0.883887052922 / VIGRA_CSTD::pow(std_dev, 5.0); 477 478 for(unsigned int i=0; i<k.size(); ++i) 479 { 480diff -uprN misc/vigra1.6.0/include/vigra/config.hxx misc/build/vigra1.6.0/include/vigra/config.hxx 481--- misc/vigra1.6.0/include/vigra/config.hxx 2008-08-13 08:15:35.000000000 -0500 482+++ misc/build/vigra1.6.0/include/vigra/config.hxx 2012-09-19 17:30:24.000000000 -0500 483@@ -84,6 +84,12 @@ 484 #endif // VIGRA_NO_STD_MINMAX 485 #endif // (_MSC_VER < 1300) 486 487+ #if _MSC_VER <= 1310 488+ #ifndef CMATH_NOT_IN_STD 489+ #define CMATH_NOT_IN_STD 490+ #endif 491+ #endif // _MSC_VER < 1310 492+ 493 #if _MSC_VER < 1310 494 #define NO_PARTIAL_TEMPLATE_SPECIALIZATION 495 #define NO_OUT_OF_LINE_MEMBER_TEMPLATES 496diff -uprN misc/vigra1.6.0/include/vigra/diff2d.hxx misc/build/vigra1.6.0/include/vigra/diff2d.hxx 497--- misc/vigra1.6.0/include/vigra/diff2d.hxx 2008-08-13 08:15:35.000000000 -0500 498+++ misc/build/vigra1.6.0/include/vigra/diff2d.hxx 2012-09-19 17:30:24.000000000 -0500 499@@ -490,8 +490,8 @@ public: 500 501 /** Construct point at given position. 502 */ 503- Size2D(int width, int height) 504- : Diff2D(width, height) 505+ Size2D(int w, int h) 506+ : Diff2D(w, h) 507 {} 508 509 /** Copy Constructor. 510@@ -620,8 +620,8 @@ public: 511 512 /** Construct point at given position. 513 */ 514- Point2D(int x, int y) 515- : Diff2D(x, y) 516+ Point2D(int x_, int y_) 517+ : Diff2D(x_, y_) 518 {} 519 520 /** Copy Constructor. 521@@ -884,26 +884,26 @@ public: 522 * (lowerRight is considered to be outside the rectangle as 523 * usual in the VIGRA) 524 */ 525- Rect2D(Point2D const &upperLeft, Point2D const &lowerRight) 526- : upperLeft_(upperLeft), lowerRight_(lowerRight) 527+ Rect2D(Point2D const &ul, Point2D const &lr) 528+ : upperLeft_(ul), lowerRight_(lr) 529 {} 530 531 /** Construct a rectangle representing the given range 532 */ 533- Rect2D(int left, int top, int right, int bottom) 534- : upperLeft_(left, top), lowerRight_(right, bottom) 535+ Rect2D(int l, int t, int r, int b) 536+ : upperLeft_(l,t), lowerRight_(r,b) 537 {} 538 539 /** Construct a rectangle of given position and size 540 */ 541- Rect2D(Point2D const &upperLeft, Size2D const &size) 542- : upperLeft_(upperLeft), lowerRight_(upperLeft + size) 543+ Rect2D(Point2D const &ul, Size2D const &sz) 544+ : upperLeft_(ul), lowerRight_(ul + sz) 545 {} 546 547 /** Construct a rectangle of given size at position (0,0) 548 */ 549- explicit Rect2D(Size2D const &size) 550- : lowerRight_(Point2D(size)) 551+ explicit Rect2D(Size2D const &sz) 552+ : lowerRight_(Point2D(sz)) 553 {} 554 555 /** Return the first point (scan-order wise) which is 556@@ -950,9 +950,9 @@ public: 557 /** Move the whole rectangle so that upperLeft() will become 558 * Point2D(left, top) afterwards. 559 */ 560- void moveTo(int left, int top) 561+ void moveTo(int l, int t) 562 { 563- moveTo(Point2D(left, top)); 564+ moveTo(Point2D(l, t)); 565 } 566 567 /** Move the whole rectangle by the given 2D offset. 568@@ -1037,17 +1037,17 @@ public: 569 /** Resize this rectangle to the given extents. This will move 570 * the lower right corner only. 571 */ 572- void setSize(Size2D const &size) 573+ void setSize(Size2D const &sz) 574 { 575- lowerRight_ = upperLeft_ + size; 576+ lowerRight_ = upperLeft_ + sz; 577 } 578 579 /** Resize this rectangle to the given extents. This will move 580 * the lower right corner only. 581 */ 582- void setSize(int width, int height) 583+ void setSize(int w, int h) 584 { 585- lowerRight_ = upperLeft_ + Size2D(width, height); 586+ lowerRight_ = upperLeft_ + Size2D(w, h); 587 } 588 589 /** Increase the size of the rectangle by the given offset. This 590@@ -1131,7 +1131,7 @@ public: 591 bool contains(Rect2D const &r) const 592 { 593 return r.isEmpty() || 594- contains(r.upperLeft()) && contains(r.lowerRight()-Diff2D(1,1)); 595+ (contains(r.upperLeft()) && contains(r.lowerRight()-Diff2D(1,1))); 596 } 597 598 /** Return whether this rectangle overlaps with the given 599diff -uprN misc/vigra1.6.0/include/vigra/fftw.hxx misc/build/vigra1.6.0/include/vigra/fftw.hxx 600--- misc/vigra1.6.0/include/vigra/fftw.hxx 2008-08-13 08:15:36.000000000 -0500 601+++ misc/build/vigra1.6.0/include/vigra/fftw.hxx 2012-09-19 17:30:24.000000000 -0500 602@@ -399,8 +399,6 @@ inline FFTWComplex operator /(FFTWComple 603 return a; 604 } 605 606-using VIGRA_CSTD::abs; 607- 608 inline FFTWComplex::value_type abs(const FFTWComplex &a) 609 { 610 return a.magnitude(); 611diff -uprN misc/vigra1.6.0/include/vigra/fftw3.hxx misc/build/vigra1.6.0/include/vigra/fftw3.hxx 612--- misc/vigra1.6.0/include/vigra/fftw3.hxx 2008-08-13 08:15:36.000000000 -0500 613+++ misc/build/vigra1.6.0/include/vigra/fftw3.hxx 2012-09-19 17:30:24.000000000 -0500 614@@ -572,8 +572,6 @@ inline FFTWComplex operator /(FFTWComple 615 return a; 616 } 617 618-using VIGRA_CSTD::abs; 619- 620 /// absolute value (= magnitude) 621 inline FFTWComplex::value_type abs(const FFTWComplex &a) 622 { 623diff -uprN misc/vigra1.6.0/include/vigra/fixedpoint.hxx misc/build/vigra1.6.0/include/vigra/fixedpoint.hxx 624--- misc/vigra1.6.0/include/vigra/fixedpoint.hxx 2008-08-13 08:15:36.000000000 -0500 625+++ misc/build/vigra1.6.0/include/vigra/fixedpoint.hxx 2012-09-19 17:30:24.000000000 -0500 626@@ -118,20 +118,18 @@ enum FixedPointNoShift { FPNoShift }; 627 628 namespace detail { 629 630-template <bool MustRound> 631+template <bool MustRound, int N> 632 struct FPAssignWithRound; 633 634-template <> 635-struct FPAssignWithRound<false> 636+template <int N> 637+struct FPAssignWithRound<false, N> 638 { 639- template <int N> 640 static inline int exec(int v) { return v << (-N); } 641 }; 642 643-template <> 644-struct FPAssignWithRound<true> 645+template <int N> 646+struct FPAssignWithRound<true, N> 647 { 648- template <int N> 649 static inline int exec(int const v) 650 { 651 return (v + (1 << (N - 1))) >> (N); 652@@ -276,7 +274,7 @@ public: 653 */ 654 template <unsigned Int2, unsigned Frac2> 655 FixedPoint(const FixedPoint<Int2, Frac2> &other) 656- : value(detail::FPAssignWithRound<(Frac2 > FractionalBits)>::template exec<Frac2 - FractionalBits>(other.value)) 657+ : value(detail::FPAssignWithRound<(Frac2 > FractionalBits), Frac2 - FractionalBits>::exec(other.value)) 658 { 659 VIGRA_STATIC_ASSERT((FixedPoint_overflow_error__More_than_31_bits_requested<(IntBits + FractionalBits)>)); 660 VIGRA_STATIC_ASSERT((FixedPoint_assignment_error__Target_object_has_too_few_integer_bits<(IntBits >= Int2)>)); 661@@ -321,7 +319,7 @@ public: 662 FixedPoint & operator=(const FixedPoint<Int2, Frac2> &other) 663 { 664 VIGRA_STATIC_ASSERT((FixedPoint_assignment_error__Target_object_has_too_few_integer_bits<(IntBits >= Int2)>)); 665- value = detail::FPAssignWithRound<(Frac2 > FractionalBits)>::template exec<Frac2 - FractionalBits>(other.value); 666+ value = detail::FPAssignWithRound<(Frac2 > FractionalBits),Frac2 - FractionalBits>::exec(other.value); 667 return *this; 668 } 669 670@@ -373,7 +371,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@@ -384,7 +382,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 688diff -uprN misc/vigra1.6.0/include/vigra/gaborfilter.hxx misc/build/vigra1.6.0/include/vigra/gaborfilter.hxx 689--- misc/vigra1.6.0/include/vigra/gaborfilter.hxx 2008-08-13 08:15:36.000000000 -0500 690+++ misc/build/vigra1.6.0/include/vigra/gaborfilter.hxx 2012-09-19 17:30:24.000000000 -0500 691@@ -287,7 +287,11 @@ inline double angularGaborSigma(int dire 692 Namespace: vigra 693 */ 694 template <class ImageType, 695+#ifndef VIGRA_WITHOUT_NESTED_TEMPLATE_PARAMS 696 class Alloc = typename ImageType::allocator_type::template rebind<ImageType>::other > 697+#else 698+ class Alloc = std::allocator<ImageType> > 699+#endif 700 class GaborFilterFamily 701 : public ImageArray<ImageType, Alloc> 702 { 703diff -uprN misc/vigra1.6.0/include/vigra/gaussians.hxx misc/build/vigra1.6.0/include/vigra/gaussians.hxx 704--- misc/vigra1.6.0/include/vigra/gaussians.hxx 2008-08-13 08:15:36.000000000 -0500 705+++ misc/build/vigra1.6.0/include/vigra/gaussians.hxx 2012-09-19 17:30:24.000000000 -0500 706@@ -88,26 +88,26 @@ class Gaussian 707 sigma > 0.0 708 \endcode 709 */ 710- explicit Gaussian(T sigma = 1.0, unsigned int derivativeOrder = 0) 711- : sigma_(sigma), 712- sigma2_(-0.5 / sigma / sigma), 713+ explicit Gaussian(T s = 1.0, unsigned int derivOrder = 0) 714+ : sigma_(s), 715+ sigma2_(-0.5 / s / s), 716 norm_(0.0), 717- order_(derivativeOrder), 718- hermitePolynomial_(derivativeOrder / 2 + 1) 719+ order_(derivOrder), 720+ hermitePolynomial_(derivOrder / 2 + 1) 721 { 722- vigra_precondition(sigma_ > 0.0, 723+ vigra_precondition(s > 0.0, 724 "Gaussian::Gaussian(): sigma > 0 required."); 725 switch(order_) 726 { 727 case 1: 728 case 2: 729- norm_ = -1.0 / (VIGRA_CSTD::sqrt(2.0 * M_PI) * sq(sigma) * sigma); 730+ norm_ = -1.0 / (VIGRA_CSTD::sqrt(2.0 * M_PI) * sq(s) * s); 731 break; 732 case 3: 733- norm_ = 1.0 / (VIGRA_CSTD::sqrt(2.0 * M_PI) * sq(sigma) * sq(sigma) * sigma); 734+ norm_ = 1.0 / (VIGRA_CSTD::sqrt(2.0 * M_PI) * sq(s) * sq(s) * s); 735 break; 736 default: 737- norm_ = 1.0 / VIGRA_CSTD::sqrt(2.0 * M_PI) / sigma; 738+ norm_ = 1.0 / VIGRA_CSTD::sqrt(2.0 * M_PI) / s; 739 } 740 calculateHermitePolynomial(); 741 } 742diff -uprN misc/vigra1.6.0/include/vigra/numerictraits.hxx misc/build/vigra1.6.0/include/vigra/numerictraits.hxx 743--- misc/vigra1.6.0/include/vigra/numerictraits.hxx 2008-08-13 08:15:39.000000000 -0500 744+++ misc/build/vigra1.6.0/include/vigra/numerictraits.hxx 2012-09-19 17:30:24.000000000 -0500 745@@ -863,6 +863,90 @@ struct NumericTraits<long> 746 } 747 }; 748 749+#ifdef VIGRA_HAS_LONG_LONG 750+template<> 751+struct NumericTraits<long long> 752+{ 753+ typedef long long Type; 754+ typedef long long Promote; 755+ typedef double RealPromote; 756+ typedef std::complex<RealPromote> ComplexPromote; 757+ typedef Type ValueType; 758+ 759+ typedef VigraTrueType isIntegral; 760+ typedef VigraTrueType isScalar; 761+ typedef VigraTrueType isSigned; 762+ typedef VigraTrueType isOrdered; 763+ typedef VigraFalseType isComplex; 764+ 765+ static long long zero() { return 0; } 766+ static long long one() { return 1; } 767+ static long long nonZero() { return 1; } 768+ static long long min() { return LLONG_MIN; } 769+ static long long max() { return LLONG_MAX; } 770+ 771+#ifdef NO_INLINE_STATIC_CONST_DEFINITION 772+ enum { minConst = LONG_MIN, maxConst = LLONG_MAX }; 773+#else 774+ static const long long minConst = LLONG_MIN; 775+ static const long long maxConst = LLONG_MAX; 776+#endif 777+ 778+ static Promote toPromote(long long v) { return v; } 779+ static RealPromote toRealPromote(long long v) { return v; } 780+ static long long fromPromote(Promote v) { return v; } 781+ static long long fromRealPromote(RealPromote v) { 782+ return ((v < 0.0) 783+ ? ((v < (RealPromote)LLONG_MIN) 784+ ? LLONG_MIN 785+ : static_cast<long long>(v - 0.5)) 786+ : ((v > (RealPromote)LLONG_MAX) 787+ ? LLONG_MAX 788+ : static_cast<long long>(v + 0.5))); 789+ } 790+}; 791+ 792+template<> 793+struct NumericTraits<unsigned long long> 794+{ 795+ typedef unsigned long long Type; 796+ typedef unsigned long long Promote; 797+ typedef double RealPromote; 798+ typedef std::complex<RealPromote> ComplexPromote; 799+ typedef Type ValueType; 800+ 801+ typedef VigraTrueType isIntegral; 802+ typedef VigraTrueType isScalar; 803+ typedef VigraFalseType isSigned; 804+ typedef VigraTrueType isOrdered; 805+ typedef VigraFalseType isComplex; 806+ 807+ static unsigned long long zero() { return 0; } 808+ static unsigned long long one() { return 1; } 809+ static unsigned long long nonZero() { return 1; } 810+ static unsigned long long min() { return 0; } 811+ static unsigned long long max() { return ULLONG_MAX; } 812+ 813+#ifdef NO_INLINE_STATIC_CONST_DEFINITION 814+ enum { minConst = 0, maxConst = ULLONG_MAX }; 815+#else 816+ static const unsigned long long minConst = 0; 817+ static const unsigned long long maxConst = ULLONG_MAX; 818+#endif 819+ 820+ static Promote toPromote(unsigned long long v) { return v; } 821+ static RealPromote toRealPromote(unsigned long long v) { return v; } 822+ static unsigned long long fromPromote(Promote v) { return v; } 823+ static unsigned long long fromRealPromote(RealPromote v) { 824+ return ((v < 0.0) 825+ ? 0 826+ : ((v > (RealPromote)ULLONG_MAX) 827+ ? ULLONG_MAX 828+ : static_cast<unsigned long long>(v + 0.5))); 829+ } 830+}; 831+#endif 832+ 833 template<> 834 struct NumericTraits<unsigned long> 835 { 836@@ -1050,6 +1134,7 @@ struct NumericTraits<double> 837 static double fromRealPromote(RealPromote v) { return v; } 838 }; 839 840+#ifdef VIGRA_HAS_LONG_DOUBLE 841 template<> 842 struct NumericTraits<long double> 843 { 844@@ -1079,6 +1164,7 @@ struct NumericTraits<long double> 845 static long double fromPromote(Promote v) { return v; } 846 static long double fromRealPromote(RealPromote v) { return v; } 847 }; 848+#endif 849 850 #ifndef NO_PARTIAL_TEMPLATE_SPECIALIZATION 851 852@@ -1158,9 +1244,15 @@ VIGRA_DEFINE_NORM_TRAITS(int) 853 VIGRA_DEFINE_NORM_TRAITS(unsigned int) 854 VIGRA_DEFINE_NORM_TRAITS(long) 855 VIGRA_DEFINE_NORM_TRAITS(unsigned long) 856+#ifdef VIGRA_HAS_LONG_LONG 857+VIGRA_DEFINE_NORM_TRAITS(long long) 858+VIGRA_DEFINE_NORM_TRAITS(unsigned long long) 859+#endif 860 VIGRA_DEFINE_NORM_TRAITS(float) 861 VIGRA_DEFINE_NORM_TRAITS(double) 862+#ifdef VIGRA_HAS_LONG_DOUBLE 863 VIGRA_DEFINE_NORM_TRAITS(long double) 864+#endif 865 866 #ifdef LLONG_MAX 867 VIGRA_DEFINE_NORM_TRAITS(long long) 868diff -uprN misc/vigra1.6.0/include/vigra/orientedtensorfilters.hxx misc/build/vigra1.6.0/include/vigra/orientedtensorfilters.hxx 869--- misc/vigra1.6.0/include/vigra/orientedtensorfilters.hxx 2008-08-13 08:15:40.000000000 -0500 870+++ misc/build/vigra1.6.0/include/vigra/orientedtensorfilters.hxx 2012-09-19 17:30:24.000000000 -0500 871@@ -435,7 +435,7 @@ class Sin6RingKernel 872 if(x == 0 && y == 0) 873 return weights_(radius_, radius_); 874 double d = dot(vectors_(x+radius_, y+radius_), v); 875- return VIGRA_CSTD::pow(1.0 - d * d, 3) * weights_(x+radius_, y+radius_); 876+ return VIGRA_CSTD::pow(1.0 - d * d, 3.0) * weights_(x+radius_, y+radius_); 877 } 878 }; 879 880@@ -456,7 +456,7 @@ class Sin6Kernel 881 if(x == 0 && y == 0) 882 return weights_(radius_, radius_); 883 double d = dot(vectors_(x+radius_, y+radius_), v); 884- return VIGRA_CSTD::pow(1.0 - d * d, 3) * weights_(x+radius_, y+radius_); 885+ return VIGRA_CSTD::pow(1.0 - d * d, 3.0) * weights_(x+radius_, y+radius_); 886 } 887 }; 888 889@@ -477,7 +477,7 @@ class Cos6RingKernel 890 if(x == 0 && y == 0) 891 return weights_(radius_, radius_); 892 double d = dot(vectors_(x+radius_, y+radius_), v); 893- return (1.0 - VIGRA_CSTD::pow(1.0 - d * d, 3)) * weights_(x+radius_, y+radius_); 894+ return (1.0 - VIGRA_CSTD::pow(1.0 - d * d, 3.0)) * weights_(x+radius_, y+radius_); 895 } 896 }; 897 898@@ -498,7 +498,7 @@ class Cos6Kernel 899 if(x == 0 && y == 0) 900 return weights_(radius_, radius_); 901 double d = dot(vectors_(x+radius_, y+radius_), v); 902- return (1.0 - VIGRA_CSTD::pow(1.0 - d * d, 3)) * weights_(x+radius_, y+radius_); 903+ return (1.0 - VIGRA_CSTD::pow(1.0 - d * d, 3.0)) * weights_(x+radius_, y+radius_); 904 } 905 }; 906 907diff -uprN misc/vigra1.6.0/include/vigra/polynomial.hxx misc/build/vigra1.6.0/include/vigra/polynomial.hxx 908--- misc/vigra1.6.0/include/vigra/polynomial.hxx 2008-08-13 08:15:40.000000000 -0500 909+++ misc/build/vigra1.6.0/include/vigra/polynomial.hxx 2012-09-19 17:30:24.000000000 -0500 910@@ -119,10 +119,10 @@ class PolynomialView 911 of subsequent algorithms (especially root finding) performed on the 912 polynomial. 913 */ 914- PolynomialView(T * coeffs, unsigned int order, double epsilon = 1.0e-14) 915+ PolynomialView(T * coeffs, unsigned int ord, double eps = 1.0e-14) 916 : coeffs_(coeffs), 917- order_(order), 918- epsilon_(epsilon) 919+ order_(ord), 920+ epsilon_(eps) 921 {} 922 923 /// Access the coefficient of x^i 924@@ -245,16 +245,16 @@ class PolynomialView 925 { epsilon_ = eps; } 926 927 protected: 928- PolynomialView(double epsilon = 1e-14) 929+ PolynomialView(double eps = 1e-14) 930 : coeffs_(0), 931 order_(0), 932- epsilon_(epsilon) 933+ epsilon_(eps) 934 {} 935 936- void setCoeffs(T * coeffs, unsigned int order) 937+ void setCoeffs(T * coeffs, unsigned int ord) 938 { 939 coeffs_ = coeffs; 940- order_ = order; 941+ order_ = ord; 942 } 943 944 T * coeffs_; 945@@ -397,9 +397,9 @@ PolynomialView<T>::deflateConjugatePair( 946 947 template <class T> 948 void 949-PolynomialView<T>::minimizeOrder(double epsilon) 950+PolynomialView<T>::minimizeOrder(double eps) 951 { 952- while(std::abs(coeffs_[order_]) <= epsilon && order_ > 0) 953+ while(std::abs(coeffs_[order_]) <= eps && order_ > 0) 954 --order_; 955 } 956 957diff -uprN misc/vigra1.6.0/include/vigra/recursiveconvolution.hxx misc/build/vigra1.6.0/include/vigra/recursiveconvolution.hxx 958--- misc/vigra1.6.0/include/vigra/recursiveconvolution.hxx 2008-08-13 08:15:40.000000000 -0500 959+++ misc/build/vigra1.6.0/include/vigra/recursiveconvolution.hxx 2012-09-19 17:30:24.000000000 -0500 960@@ -261,16 +261,16 @@ void recursiveFilterLine(SrcIterator is, 961 { 962 // correction factors for b 963 double bright = b; 964- double bleft = VIGRA_CSTD::pow(b, w); 965+ double bleft = VIGRA_CSTD::pow(b, (double)w); 966 967 for(x=w-1; x>=0; --x, --is, --id) 968 { 969 TempType f = b * old; 970 old = as(is) + f; 971- double norm = (1.0 - b) / (1.0 + b - bleft - bright); 972+ double norm2 = (1.0 - b) / (1.0 + b - bleft - bright); 973 bleft /= b; 974 bright *= b; 975- ad.set(norm * (line[x] + f), id); 976+ ad.set(norm2 * (line[x] + f), id); 977 } 978 } 979 else if(border == BORDER_TREATMENT_AVOID) 980diff -uprN misc/vigra1.6.0/include/vigra/rgbvalue.hxx misc/build/vigra1.6.0/include/vigra/rgbvalue.hxx 981--- misc/vigra1.6.0/include/vigra/rgbvalue.hxx 2008-08-13 08:15:41.000000000 -0500 982+++ misc/build/vigra1.6.0/include/vigra/rgbvalue.hxx 2012-09-19 17:30:24.000000000 -0500 983@@ -39,6 +39,10 @@ 984 #ifndef VIGRA_RGBVALUE_HXX 985 #define VIGRA_RGBVALUE_HXX 986 987+#if defined __GNUC__ 988+#pragma GCC system_header 989+#endif 990+ 991 #include <cmath> // abs(double) 992 #include <cstdlib> // abs(int) 993 #include "config.hxx" 994@@ -702,8 +706,6 @@ operator/=(RGBValue<V, RIDX, GIDX, BIDX> 995 return l; 996 } 997 998-using VIGRA_CSTD::abs; 999- 1000 /// component-wise absolute value 1001 template <class T, unsigned int RIDX, unsigned int GIDX, unsigned int BIDX> 1002 inline 1003diff -uprN misc/vigra1.6.0/include/vigra/separableconvolution.hxx misc/build/vigra1.6.0/include/vigra/separableconvolution.hxx 1004--- misc/vigra1.6.0/include/vigra/separableconvolution.hxx 2008-08-13 08:15:41.000000000 -0500 1005+++ misc/build/vigra1.6.0/include/vigra/separableconvolution.hxx 2012-09-19 17:30:24.000000000 -0500 1006@@ -1022,11 +1022,11 @@ class Kernel1D 1007 */ 1008 InitProxy operator=(value_type const & v) 1009 { 1010- int size = right_ - left_ + 1; 1011+ int sz = right_ - left_ + 1; 1012 for(unsigned int i=0; i<kernel_.size(); ++i) kernel_[i] = v; 1013- norm_ = (double)size*v; 1014+ norm_ = (double)sz*v; 1015 1016- return InitProxy(kernel_.begin(), size, norm_); 1017+ return InitProxy(kernel_.begin(), sz, norm_); 1018 } 1019 1020 /** Destructor. 1021@@ -1663,8 +1663,8 @@ class Kernel1D 1022 }; 1023 1024 template <class ARITHTYPE> 1025-void Kernel1D<ARITHTYPE>::normalize(value_type norm, 1026- unsigned int derivativeOrder, 1027+void Kernel1D<ARITHTYPE>::normalize(value_type normFactor, 1028+ unsigned int derivOrder, 1029 double offset) 1030 { 1031 typedef typename NumericTraits<value_type>::RealPromote TmpType; 1032@@ -1673,7 +1673,7 @@ void Kernel1D<ARITHTYPE>::normalize(valu 1033 Iterator k = kernel_.begin(); 1034 TmpType sum = NumericTraits<TmpType>::zero(); 1035 1036- if(derivativeOrder == 0) 1037+ if(derivOrder == 0) 1038 { 1039 for(; k < kernel_.end(); ++k) 1040 { 1041@@ -1683,11 +1683,11 @@ void Kernel1D<ARITHTYPE>::normalize(valu 1042 else 1043 { 1044 unsigned int faculty = 1; 1045- for(unsigned int i = 2; i <= derivativeOrder; ++i) 1046+ for(unsigned int i = 2; i <= derivOrder; ++i) 1047 faculty *= i; 1048 for(double x = left() + offset; k < kernel_.end(); ++x, ++k) 1049 { 1050- sum += *k * VIGRA_CSTD::pow(-x, int(derivativeOrder)) / faculty; 1051+ sum += *k * VIGRA_CSTD::pow(-x, (double)derivOrder) / faculty; 1052 } 1053 } 1054 1055@@ -1695,21 +1695,21 @@ void Kernel1D<ARITHTYPE>::normalize(valu 1056 "Kernel1D<ARITHTYPE>::normalize(): " 1057 "Cannot normalize a kernel with sum = 0"); 1058 // normalize 1059- sum = norm / sum; 1060+ sum = normFactor / sum; 1061 k = kernel_.begin(); 1062 for(; k != kernel_.end(); ++k) 1063 { 1064 *k = *k * sum; 1065 } 1066 1067- norm_ = norm; 1068+ norm_ = normFactor; 1069 } 1070 1071 /***********************************************************************/ 1072 1073 template <class ARITHTYPE> 1074 void Kernel1D<ARITHTYPE>::initGaussian(double std_dev, 1075- value_type norm) 1076+ value_type normFactor) 1077 { 1078 vigra_precondition(std_dev >= 0.0, 1079 "Kernel1D::initGaussian(): Standard deviation must be >= 0."); 1080@@ -1742,8 +1742,8 @@ void Kernel1D<ARITHTYPE>::initGaussian(d 1081 right_ = 0; 1082 } 1083 1084- if(norm != 0.0) 1085- normalize(norm); 1086+ if(normFactor != 0.0) 1087+ normalize(normFactor); 1088 else 1089 norm_ = 1.0; 1090 1091@@ -1755,7 +1755,7 @@ void Kernel1D<ARITHTYPE>::initGaussian(d 1092 1093 template <class ARITHTYPE> 1094 void Kernel1D<ARITHTYPE>::initDiscreteGaussian(double std_dev, 1095- value_type norm) 1096+ value_type normFactor) 1097 { 1098 vigra_precondition(std_dev >= 0.0, 1099 "Kernel1D::initDiscreteGaussian(): Standard deviation must be >= 0."); 1100@@ -1797,7 +1797,7 @@ void Kernel1D<ARITHTYPE>::initDiscreteGa 1101 er += warray[i]; 1102 } 1103 1104- double scale = norm / (2*er - warray[0]); 1105+ double scale = normFactor / (2*er - warray[0]); 1106 1107 initExplicitly(-radius, radius); 1108 iterator c = center(); 1109@@ -1810,12 +1810,12 @@ void Kernel1D<ARITHTYPE>::initDiscreteGa 1110 else 1111 { 1112 kernel_.erase(kernel_.begin(), kernel_.end()); 1113- kernel_.push_back(norm); 1114+ kernel_.push_back(normFactor); 1115 left_ = 0; 1116 right_ = 0; 1117 } 1118 1119- norm_ = norm; 1120+ norm_ = normFactor; 1121 1122 // best border treatment for Gaussians is BORDER_TREATMENT_REFLECT 1123 border_treatment_ = BORDER_TREATMENT_REFLECT; 1124@@ -1826,15 +1826,15 @@ void Kernel1D<ARITHTYPE>::initDiscreteGa 1125 template <class ARITHTYPE> 1126 void 1127 Kernel1D<ARITHTYPE>::initGaussianDerivative(double std_dev, 1128- int order, 1129- value_type norm) 1130+ int order, 1131+ value_type normFactor) 1132 { 1133 vigra_precondition(order >= 0, 1134 "Kernel1D::initGaussianDerivative(): Order must be >= 0."); 1135 1136 if(order == 0) 1137 { 1138- initGaussian(std_dev, norm); 1139+ initGaussian(std_dev, normFactor); 1140 return; 1141 } 1142 1143@@ -1865,7 +1865,7 @@ Kernel1D<ARITHTYPE>::initGaussianDerivat 1144 1145 // remove DC, but only if kernel correction is permitted by a non-zero 1146 // value for norm 1147- if(norm != 0.0) 1148+ if(normFactor != 0.0) 1149 { 1150 for(unsigned int i=0; i < kernel_.size(); ++i) 1151 { 1152@@ -1876,8 +1876,8 @@ Kernel1D<ARITHTYPE>::initGaussianDerivat 1153 left_ = -radius; 1154 right_ = radius; 1155 1156- if(norm != 0.0) 1157- normalize(norm, order); 1158+ if(normFactor != 0.0) 1159+ normalize(normFactor, order); 1160 else 1161 norm_ = 1.0; 1162 1163@@ -1891,7 +1891,7 @@ Kernel1D<ARITHTYPE>::initGaussianDerivat 1164 template <class ARITHTYPE> 1165 void 1166 Kernel1D<ARITHTYPE>::initBinomial(int radius, 1167- value_type norm) 1168+ value_type normFactor) 1169 { 1170 vigra_precondition(radius > 0, 1171 "Kernel1D::initBinomial(): Radius must be > 0."); 1172@@ -1921,12 +1921,12 @@ Kernel1D<ARITHTYPE>::initBinomial(int ra 1173 1174 for(i=0; i<=radius*2+1; ++i) 1175 { 1176- kernel_.push_back(kernel[i] * norm); 1177+ kernel_.push_back(kernel[i] * normFactor); 1178 } 1179 1180 left_ = -radius; 1181 right_ = radius; 1182- norm_ = norm; 1183+ norm_ = normFactor; 1184 1185 // best border treatment for Binomial is BORDER_TREATMENT_REFLECT 1186 border_treatment_ = BORDER_TREATMENT_REFLECT; 1187@@ -1936,7 +1936,7 @@ Kernel1D<ARITHTYPE>::initBinomial(int ra 1188 1189 template <class ARITHTYPE> 1190 void Kernel1D<ARITHTYPE>::initAveraging(int radius, 1191- value_type norm) 1192+ value_type normFactor) 1193 { 1194 vigra_precondition(radius > 0, 1195 "Kernel1D::initAveraging(): Radius must be > 0."); 1196@@ -1950,12 +1950,12 @@ void Kernel1D<ARITHTYPE>::initAveraging( 1197 1198 for(int i=0; i<=radius*2+1; ++i) 1199 { 1200- kernel_.push_back(scale * norm); 1201+ kernel_.push_back(scale * normFactor); 1202 } 1203 1204 left_ = -radius; 1205 right_ = radius; 1206- norm_ = norm; 1207+ norm_ = normFactor; 1208 1209 // best border treatment for Averaging is BORDER_TREATMENT_CLIP 1210 border_treatment_ = BORDER_TREATMENT_CLIP; 1211diff -uprN misc/vigra1.6.0/include/vigra/sized_int.hxx misc/build/vigra1.6.0/include/vigra/sized_int.hxx 1212--- misc/vigra1.6.0/include/vigra/sized_int.hxx 2008-08-13 08:15:41.000000000 -0500 1213+++ misc/build/vigra1.6.0/include/vigra/sized_int.hxx 2012-09-19 17:30:24.000000000 -0500 1214@@ -73,11 +73,15 @@ struct SelectIntegerType<SIZE, Int_type_ 1215 typedef Int_type_not_supported_on_this_platform type; 1216 }; 1217 1218+#if defined __SUNPRO_CC 1219+#pragma disable_warn 1220+#endif 1221+ 1222 template<class LIST> 1223 struct SelectBiggestIntegerType 1224 { 1225- enum { cursize = LIST::size, 1226- nextsize = SelectBiggestIntegerType<typename LIST::next>::size, 1227+ enum { cursize = static_cast< int >(LIST::size), 1228+ nextsize = static_cast< int >(SelectBiggestIntegerType<typename LIST::next>::size), 1229 size = (cursize < nextsize) ? nextsize : cursize }; 1230 typedef typename 1231 IfBool<(cursize < nextsize), 1232@@ -86,6 +90,10 @@ struct SelectBiggestIntegerType 1233 type; 1234 }; 1235 1236+#if defined __SUNPRO_CC 1237+#pragma enable_warn 1238+#endif 1239+ 1240 template<> 1241 struct SelectBiggestIntegerType<Int_type_not_supported_on_this_platform> 1242 { 1243diff -uprN misc/vigra1.6.0/include/vigra/splines.hxx misc/build/vigra1.6.0/include/vigra/splines.hxx 1244--- misc/vigra1.6.0/include/vigra/splines.hxx 2008-08-13 08:15:41.000000000 -0500 1245+++ misc/build/vigra1.6.0/include/vigra/splines.hxx 2012-09-19 17:30:24.000000000 -0500 1246@@ -108,8 +108,8 @@ class BSplineBase 1247 /** Create functor for gevine derivative of the spline. The spline's order 1248 is specified spline by the template argument <TT>ORDER</tt>. 1249 */ 1250- explicit BSplineBase(unsigned int derivativeOrder = 0) 1251- : s1_(derivativeOrder) 1252+ explicit BSplineBase(unsigned int derivOrder = 0) 1253+ : s1_(derivOrder) 1254 {} 1255 1256 /** Unary function call. 1257@@ -280,8 +280,8 @@ class BSplineBase<0, T> 1258 typedef T result_type; 1259 enum StaticOrder { order = 0 }; 1260 1261- explicit BSplineBase(unsigned int derivativeOrder = 0) 1262- : derivativeOrder_(derivativeOrder) 1263+ explicit BSplineBase(unsigned int derivOrder = 0) 1264+ : derivativeOrder_(derivOrder) 1265 {} 1266 1267 result_type operator()(argument_type x) const 1268@@ -357,8 +357,8 @@ class BSpline<1, T> 1269 typedef T result_type; 1270 enum StaticOrder { order = 1 }; 1271 1272- explicit BSpline(unsigned int derivativeOrder = 0) 1273- : derivativeOrder_(derivativeOrder) 1274+ explicit BSpline(unsigned int derivOrder = 0) 1275+ : derivativeOrder_(derivOrder) 1276 {} 1277 1278 result_type operator()(argument_type x) const 1279@@ -454,8 +454,8 @@ class BSpline<2, T> 1280 typedef T result_type; 1281 enum StaticOrder { order = 2 }; 1282 1283- explicit BSpline(unsigned int derivativeOrder = 0) 1284- : derivativeOrder_(derivativeOrder) 1285+ explicit BSpline(unsigned int derivOrder = 0) 1286+ : derivativeOrder_(derivOrder) 1287 {} 1288 1289 result_type operator()(argument_type x) const 1290@@ -583,8 +583,8 @@ class BSpline<3, T> 1291 typedef T result_type; 1292 enum StaticOrder { order = 3 }; 1293 1294- explicit BSpline(unsigned int derivativeOrder = 0) 1295- : derivativeOrder_(derivativeOrder) 1296+ explicit BSpline(unsigned int derivOrder = 0) 1297+ : derivativeOrder_(derivOrder) 1298 {} 1299 1300 result_type operator()(argument_type x) const 1301@@ -735,8 +735,8 @@ class BSpline<4, T> 1302 typedef T result_type; 1303 enum StaticOrder { order = 4 }; 1304 1305- explicit BSpline(unsigned int derivativeOrder = 0) 1306- : derivativeOrder_(derivativeOrder) 1307+ explicit BSpline(unsigned int derivOrder = 0) 1308+ : derivativeOrder_(derivOrder) 1309 {} 1310 1311 result_type operator()(argument_type x) const 1312diff -uprN misc/vigra1.6.0/include/vigra/static_assert.hxx misc/build/vigra1.6.0/include/vigra/static_assert.hxx 1313--- misc/vigra1.6.0/include/vigra/static_assert.hxx 2008-08-13 08:15:41.000000000 -0500 1314+++ misc/build/vigra1.6.0/include/vigra/static_assert.hxx 2012-09-19 17:30:24.000000000 -0500 1315@@ -115,7 +115,7 @@ assertImpl( void (*)(Predicate), typenam 1316 1317 TODO: provide more assertion base classes for other (non boolean) types of tests 1318 */ 1319-#if !defined(__GNUC__) || __GNUC__ > 2 1320+#if (!defined(__GNUC__) || __GNUC__ > 2) && (!defined(__SUNPRO_CC) || __SUNPRO_CC > 0x550) 1321 #define VIGRA_STATIC_ASSERT(Predicate) \ 1322 enum { \ 1323 VIGRA_PREPROCESSOR_CONCATENATE(vigra_assertion_in_line_, __LINE__) = sizeof( \ 1324diff -uprN misc/vigra1.6.0/include/vigra/tinyvector.hxx misc/build/vigra1.6.0/include/vigra/tinyvector.hxx 1325--- misc/vigra1.6.0/include/vigra/tinyvector.hxx 2008-08-13 08:15:42.000000000 -0500 1326+++ misc/build/vigra1.6.0/include/vigra/tinyvector.hxx 2012-09-19 17:30:24.000000000 -0500 1327@@ -39,6 +39,10 @@ 1328 #ifndef VIGRA_TINYVECTOR_HXX 1329 #define VIGRA_TINYVECTOR_HXX 1330 1331+#if defined __GNUC__ 1332+#pragma GCC system_header 1333+#endif 1334+ 1335 #include <cmath> // abs(double) 1336 #include <cstdlib> // abs(int) 1337 #include <iosfwd> // ostream 1338@@ -49,7 +53,6 @@ 1339 1340 namespace vigra { 1341 1342-using VIGRA_CSTD::abs; 1343 using VIGRA_CSTD::ceil; 1344 using VIGRA_CSTD::floor; 1345 1346@@ -439,9 +442,9 @@ class TinyVectorBase 1347 /** Initialize from another sequence (must have length SIZE!) 1348 */ 1349 template <class Iterator> 1350- void init(Iterator i, Iterator end) 1351+ void init(Iterator i, Iterator iend) 1352 { 1353- vigra_precondition(end-i == SIZE, 1354+ vigra_precondition(iend-i == SIZE, 1355 "TinyVector::init(): Sequence has wrong size."); 1356 Loop::assignCast(data_, i); 1357 } 1358