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/mathutil.hxx misc/build/vigra1.6.0/include/vigra/mathutil.hxx 743--- misc/vigra1.6.0/include/vigra/mathutil.hxx 2008-08-13 08:15:38.000000000 -0500 744+++ misc/build/vigra1.6.0/include/vigra/mathutil.hxx 2012-09-20 22:05:29.000000000 -0500 745@@ -88,7 +88,7 @@ using VIGRA_CSTD::ceil; 746 747 // import abs(float), abs(double), abs(long double) from <cmath> 748 // and abs(int), abs(long), abs(long long) from <cstdlib> 749-using std::abs; 750+//using std::abs; 751 752 // define the missing variants of abs() to avoid 'ambigous overload' 753 // errors in template functions 754@@ -100,10 +100,39 @@ VIGRA_DEFINE_UNSIGNED_ABS(unsigned char) 755 VIGRA_DEFINE_UNSIGNED_ABS(unsigned short) 756 VIGRA_DEFINE_UNSIGNED_ABS(unsigned int) 757 VIGRA_DEFINE_UNSIGNED_ABS(unsigned long) 758+#ifdef VIGRA_HAS_LONG_LONG 759 VIGRA_DEFINE_UNSIGNED_ABS(unsigned long long) 760+#endif 761 762 #undef VIGRA_DEFINE_UNSIGNED_ABS 763 764+#define VIGRA_DEFINE_SIGNED_ABS(T) \ 765+ inline T abs(T t) { return (T)abs(t); } 766+#define VIGRA_DEFINE_SIGNED_LABS(T) \ 767+ inline T abs(T t) { return (T)labs(t); } 768+#define VIGRA_DEFINE_SIGNED_LLABS(T) \ 769+ inline T abs(T t) { return (T)llabs(t); } 770+#define VIGRA_DEFINE_FABS(T) \ 771+ inline T abs(T t) { return (T)fabs(t); } 772+ 773+VIGRA_DEFINE_SIGNED_ABS(signed char) 774+VIGRA_DEFINE_SIGNED_ABS(signed short) 775+VIGRA_DEFINE_SIGNED_ABS(signed int) 776+VIGRA_DEFINE_SIGNED_LABS(signed long) 777+#ifdef VIGRA_HAS_LONG_LONG 778+VIGRA_DEFINE_SIGNED_LLABS(signed long long) 779+#endif 780+VIGRA_DEFINE_FABS(float) 781+VIGRA_DEFINE_FABS(double) 782+#ifdef VIGRA_HAS_LONG_DOUBLE 783+VIGRA_DEFINE_FABS(long double) 784+#endif 785+ 786+#undef VIGRA_DEFINE_SIGNED_ABS 787+#undef VIGRA_DEFINE_SIGNED_LABS 788+#undef VIGRA_DEFINE_SIGNED_LLABS 789+#undef VIGRA_DEFINE_FABS 790+ 791 #define VIGRA_DEFINE_MISSING_ABS(T) \ 792 inline T abs(T t) { return t < 0 ? -t : t; } 793 794@@ -134,12 +163,14 @@ inline double round(double t) 795 : ceil(t - 0.5); 796 } 797 798+#ifdef VIGRA_HAS_LONG_DOUBLE 799 inline long double round(long double t) 800 { 801 return t >= 0.0 802 ? floor(t + 0.5) 803 : ceil(t - 0.5); 804 } 805+#endif 806 807 /*! Round up to the nearest power of 2. 808 809@@ -440,9 +471,15 @@ VIGRA_DEFINE_NORM(int) 810 VIGRA_DEFINE_NORM(unsigned int) 811 VIGRA_DEFINE_NORM(long) 812 VIGRA_DEFINE_NORM(unsigned long) 813+#ifdef VIGRA_HAS_LONG_LONG 814+VIGRA_DEFINE_NORM(long long) 815+VIGRA_DEFINE_NORM(unsigned long long) 816+#endif 817 VIGRA_DEFINE_NORM(float) 818 VIGRA_DEFINE_NORM(double) 819+#ifdef VIGRA_HAS_LONG_DOUBLE 820 VIGRA_DEFINE_NORM(long double) 821+#endif 822 823 #undef VIGRA_DEFINE_NORM 824 825diff -uprN misc/vigra1.6.0/include/vigra/numerictraits.hxx misc/build/vigra1.6.0/include/vigra/numerictraits.hxx 826--- misc/vigra1.6.0/include/vigra/numerictraits.hxx 2008-08-13 08:15:39.000000000 -0500 827+++ misc/build/vigra1.6.0/include/vigra/numerictraits.hxx 2012-09-19 17:30:24.000000000 -0500 828@@ -863,6 +863,90 @@ struct NumericTraits<long> 829 } 830 }; 831 832+#ifdef VIGRA_HAS_LONG_LONG 833+template<> 834+struct NumericTraits<long long> 835+{ 836+ typedef long long Type; 837+ typedef long long Promote; 838+ typedef double RealPromote; 839+ typedef std::complex<RealPromote> ComplexPromote; 840+ typedef Type ValueType; 841+ 842+ typedef VigraTrueType isIntegral; 843+ typedef VigraTrueType isScalar; 844+ typedef VigraTrueType isSigned; 845+ typedef VigraTrueType isOrdered; 846+ typedef VigraFalseType isComplex; 847+ 848+ static long long zero() { return 0; } 849+ static long long one() { return 1; } 850+ static long long nonZero() { return 1; } 851+ static long long min() { return LLONG_MIN; } 852+ static long long max() { return LLONG_MAX; } 853+ 854+#ifdef NO_INLINE_STATIC_CONST_DEFINITION 855+ enum { minConst = LONG_MIN, maxConst = LLONG_MAX }; 856+#else 857+ static const long long minConst = LLONG_MIN; 858+ static const long long maxConst = LLONG_MAX; 859+#endif 860+ 861+ static Promote toPromote(long long v) { return v; } 862+ static RealPromote toRealPromote(long long v) { return v; } 863+ static long long fromPromote(Promote v) { return v; } 864+ static long long fromRealPromote(RealPromote v) { 865+ return ((v < 0.0) 866+ ? ((v < (RealPromote)LLONG_MIN) 867+ ? LLONG_MIN 868+ : static_cast<long long>(v - 0.5)) 869+ : ((v > (RealPromote)LLONG_MAX) 870+ ? LLONG_MAX 871+ : static_cast<long long>(v + 0.5))); 872+ } 873+}; 874+ 875+template<> 876+struct NumericTraits<unsigned long long> 877+{ 878+ typedef unsigned long long Type; 879+ typedef unsigned long long Promote; 880+ typedef double RealPromote; 881+ typedef std::complex<RealPromote> ComplexPromote; 882+ typedef Type ValueType; 883+ 884+ typedef VigraTrueType isIntegral; 885+ typedef VigraTrueType isScalar; 886+ typedef VigraFalseType isSigned; 887+ typedef VigraTrueType isOrdered; 888+ typedef VigraFalseType isComplex; 889+ 890+ static unsigned long long zero() { return 0; } 891+ static unsigned long long one() { return 1; } 892+ static unsigned long long nonZero() { return 1; } 893+ static unsigned long long min() { return 0; } 894+ static unsigned long long max() { return ULLONG_MAX; } 895+ 896+#ifdef NO_INLINE_STATIC_CONST_DEFINITION 897+ enum { minConst = 0, maxConst = ULLONG_MAX }; 898+#else 899+ static const unsigned long long minConst = 0; 900+ static const unsigned long long maxConst = ULLONG_MAX; 901+#endif 902+ 903+ static Promote toPromote(unsigned long long v) { return v; } 904+ static RealPromote toRealPromote(unsigned long long v) { return v; } 905+ static unsigned long long fromPromote(Promote v) { return v; } 906+ static unsigned long long fromRealPromote(RealPromote v) { 907+ return ((v < 0.0) 908+ ? 0 909+ : ((v > (RealPromote)ULLONG_MAX) 910+ ? ULLONG_MAX 911+ : static_cast<unsigned long long>(v + 0.5))); 912+ } 913+}; 914+#endif 915+ 916 template<> 917 struct NumericTraits<unsigned long> 918 { 919@@ -1050,6 +1134,7 @@ struct NumericTraits<double> 920 static double fromRealPromote(RealPromote v) { return v; } 921 }; 922 923+#ifdef VIGRA_HAS_LONG_DOUBLE 924 template<> 925 struct NumericTraits<long double> 926 { 927@@ -1079,6 +1164,7 @@ struct NumericTraits<long double> 928 static long double fromPromote(Promote v) { return v; } 929 static long double fromRealPromote(RealPromote v) { return v; } 930 }; 931+#endif 932 933 #ifndef NO_PARTIAL_TEMPLATE_SPECIALIZATION 934 935@@ -1158,9 +1244,15 @@ VIGRA_DEFINE_NORM_TRAITS(int) 936 VIGRA_DEFINE_NORM_TRAITS(unsigned int) 937 VIGRA_DEFINE_NORM_TRAITS(long) 938 VIGRA_DEFINE_NORM_TRAITS(unsigned long) 939+#ifdef VIGRA_HAS_LONG_LONG 940+VIGRA_DEFINE_NORM_TRAITS(long long) 941+VIGRA_DEFINE_NORM_TRAITS(unsigned long long) 942+#endif 943 VIGRA_DEFINE_NORM_TRAITS(float) 944 VIGRA_DEFINE_NORM_TRAITS(double) 945+#ifdef VIGRA_HAS_LONG_DOUBLE 946 VIGRA_DEFINE_NORM_TRAITS(long double) 947+#endif 948 949 #ifdef LLONG_MAX 950 VIGRA_DEFINE_NORM_TRAITS(long long) 951diff -uprN misc/vigra1.6.0/include/vigra/orientedtensorfilters.hxx misc/build/vigra1.6.0/include/vigra/orientedtensorfilters.hxx 952--- misc/vigra1.6.0/include/vigra/orientedtensorfilters.hxx 2008-08-13 08:15:40.000000000 -0500 953+++ misc/build/vigra1.6.0/include/vigra/orientedtensorfilters.hxx 2012-09-19 17:30:24.000000000 -0500 954@@ -435,7 +435,7 @@ class Sin6RingKernel 955 if(x == 0 && y == 0) 956 return weights_(radius_, radius_); 957 double d = dot(vectors_(x+radius_, y+radius_), v); 958- return VIGRA_CSTD::pow(1.0 - d * d, 3) * weights_(x+radius_, y+radius_); 959+ return VIGRA_CSTD::pow(1.0 - d * d, 3.0) * weights_(x+radius_, y+radius_); 960 } 961 }; 962 963@@ -456,7 +456,7 @@ class Sin6Kernel 964 if(x == 0 && y == 0) 965 return weights_(radius_, radius_); 966 double d = dot(vectors_(x+radius_, y+radius_), v); 967- return VIGRA_CSTD::pow(1.0 - d * d, 3) * weights_(x+radius_, y+radius_); 968+ return VIGRA_CSTD::pow(1.0 - d * d, 3.0) * weights_(x+radius_, y+radius_); 969 } 970 }; 971 972@@ -477,7 +477,7 @@ class Cos6RingKernel 973 if(x == 0 && y == 0) 974 return weights_(radius_, radius_); 975 double d = dot(vectors_(x+radius_, y+radius_), v); 976- return (1.0 - VIGRA_CSTD::pow(1.0 - d * d, 3)) * weights_(x+radius_, y+radius_); 977+ return (1.0 - VIGRA_CSTD::pow(1.0 - d * d, 3.0)) * weights_(x+radius_, y+radius_); 978 } 979 }; 980 981@@ -498,7 +498,7 @@ class Cos6Kernel 982 if(x == 0 && y == 0) 983 return weights_(radius_, radius_); 984 double d = dot(vectors_(x+radius_, y+radius_), v); 985- return (1.0 - VIGRA_CSTD::pow(1.0 - d * d, 3)) * weights_(x+radius_, y+radius_); 986+ return (1.0 - VIGRA_CSTD::pow(1.0 - d * d, 3.0)) * weights_(x+radius_, y+radius_); 987 } 988 }; 989 990diff -uprN misc/vigra1.6.0/include/vigra/polynomial.hxx misc/build/vigra1.6.0/include/vigra/polynomial.hxx 991--- misc/vigra1.6.0/include/vigra/polynomial.hxx 2008-08-13 08:15:40.000000000 -0500 992+++ misc/build/vigra1.6.0/include/vigra/polynomial.hxx 2012-09-19 17:30:24.000000000 -0500 993@@ -119,10 +119,10 @@ class PolynomialView 994 of subsequent algorithms (especially root finding) performed on the 995 polynomial. 996 */ 997- PolynomialView(T * coeffs, unsigned int order, double epsilon = 1.0e-14) 998+ PolynomialView(T * coeffs, unsigned int ord, double eps = 1.0e-14) 999 : coeffs_(coeffs), 1000- order_(order), 1001- epsilon_(epsilon) 1002+ order_(ord), 1003+ epsilon_(eps) 1004 {} 1005 1006 /// Access the coefficient of x^i 1007@@ -245,16 +245,16 @@ class PolynomialView 1008 { epsilon_ = eps; } 1009 1010 protected: 1011- PolynomialView(double epsilon = 1e-14) 1012+ PolynomialView(double eps = 1e-14) 1013 : coeffs_(0), 1014 order_(0), 1015- epsilon_(epsilon) 1016+ epsilon_(eps) 1017 {} 1018 1019- void setCoeffs(T * coeffs, unsigned int order) 1020+ void setCoeffs(T * coeffs, unsigned int ord) 1021 { 1022 coeffs_ = coeffs; 1023- order_ = order; 1024+ order_ = ord; 1025 } 1026 1027 T * coeffs_; 1028@@ -397,9 +397,9 @@ PolynomialView<T>::deflateConjugatePair( 1029 1030 template <class T> 1031 void 1032-PolynomialView<T>::minimizeOrder(double epsilon) 1033+PolynomialView<T>::minimizeOrder(double eps) 1034 { 1035- while(std::abs(coeffs_[order_]) <= epsilon && order_ > 0) 1036+ while(std::abs(coeffs_[order_]) <= eps && order_ > 0) 1037 --order_; 1038 } 1039 1040diff -uprN misc/vigra1.6.0/include/vigra/recursiveconvolution.hxx misc/build/vigra1.6.0/include/vigra/recursiveconvolution.hxx 1041--- misc/vigra1.6.0/include/vigra/recursiveconvolution.hxx 2008-08-13 08:15:40.000000000 -0500 1042+++ misc/build/vigra1.6.0/include/vigra/recursiveconvolution.hxx 2012-09-19 17:30:24.000000000 -0500 1043@@ -261,16 +261,16 @@ void recursiveFilterLine(SrcIterator is, 1044 { 1045 // correction factors for b 1046 double bright = b; 1047- double bleft = VIGRA_CSTD::pow(b, w); 1048+ double bleft = VIGRA_CSTD::pow(b, (double)w); 1049 1050 for(x=w-1; x>=0; --x, --is, --id) 1051 { 1052 TempType f = b * old; 1053 old = as(is) + f; 1054- double norm = (1.0 - b) / (1.0 + b - bleft - bright); 1055+ double norm2 = (1.0 - b) / (1.0 + b - bleft - bright); 1056 bleft /= b; 1057 bright *= b; 1058- ad.set(norm * (line[x] + f), id); 1059+ ad.set(norm2 * (line[x] + f), id); 1060 } 1061 } 1062 else if(border == BORDER_TREATMENT_AVOID) 1063diff -uprN misc/vigra1.6.0/include/vigra/rgbvalue.hxx misc/build/vigra1.6.0/include/vigra/rgbvalue.hxx 1064--- misc/vigra1.6.0/include/vigra/rgbvalue.hxx 2008-08-13 08:15:41.000000000 -0500 1065+++ misc/build/vigra1.6.0/include/vigra/rgbvalue.hxx 2012-09-19 17:30:24.000000000 -0500 1066@@ -39,6 +39,10 @@ 1067 #ifndef VIGRA_RGBVALUE_HXX 1068 #define VIGRA_RGBVALUE_HXX 1069 1070+#if defined __GNUC__ 1071+#pragma GCC system_header 1072+#endif 1073+ 1074 #include <cmath> // abs(double) 1075 #include <cstdlib> // abs(int) 1076 #include "config.hxx" 1077@@ -702,8 +706,6 @@ operator/=(RGBValue<V, RIDX, GIDX, BIDX> 1078 return l; 1079 } 1080 1081-using VIGRA_CSTD::abs; 1082- 1083 /// component-wise absolute value 1084 template <class T, unsigned int RIDX, unsigned int GIDX, unsigned int BIDX> 1085 inline 1086diff -uprN misc/vigra1.6.0/include/vigra/separableconvolution.hxx misc/build/vigra1.6.0/include/vigra/separableconvolution.hxx 1087--- misc/vigra1.6.0/include/vigra/separableconvolution.hxx 2008-08-13 08:15:41.000000000 -0500 1088+++ misc/build/vigra1.6.0/include/vigra/separableconvolution.hxx 2012-09-19 17:30:24.000000000 -0500 1089@@ -1022,11 +1022,11 @@ class Kernel1D 1090 */ 1091 InitProxy operator=(value_type const & v) 1092 { 1093- int size = right_ - left_ + 1; 1094+ int sz = right_ - left_ + 1; 1095 for(unsigned int i=0; i<kernel_.size(); ++i) kernel_[i] = v; 1096- norm_ = (double)size*v; 1097+ norm_ = (double)sz*v; 1098 1099- return InitProxy(kernel_.begin(), size, norm_); 1100+ return InitProxy(kernel_.begin(), sz, norm_); 1101 } 1102 1103 /** Destructor. 1104@@ -1663,8 +1663,8 @@ class Kernel1D 1105 }; 1106 1107 template <class ARITHTYPE> 1108-void Kernel1D<ARITHTYPE>::normalize(value_type norm, 1109- unsigned int derivativeOrder, 1110+void Kernel1D<ARITHTYPE>::normalize(value_type normFactor, 1111+ unsigned int derivOrder, 1112 double offset) 1113 { 1114 typedef typename NumericTraits<value_type>::RealPromote TmpType; 1115@@ -1673,7 +1673,7 @@ void Kernel1D<ARITHTYPE>::normalize(valu 1116 Iterator k = kernel_.begin(); 1117 TmpType sum = NumericTraits<TmpType>::zero(); 1118 1119- if(derivativeOrder == 0) 1120+ if(derivOrder == 0) 1121 { 1122 for(; k < kernel_.end(); ++k) 1123 { 1124@@ -1683,11 +1683,11 @@ void Kernel1D<ARITHTYPE>::normalize(valu 1125 else 1126 { 1127 unsigned int faculty = 1; 1128- for(unsigned int i = 2; i <= derivativeOrder; ++i) 1129+ for(unsigned int i = 2; i <= derivOrder; ++i) 1130 faculty *= i; 1131 for(double x = left() + offset; k < kernel_.end(); ++x, ++k) 1132 { 1133- sum += *k * VIGRA_CSTD::pow(-x, int(derivativeOrder)) / faculty; 1134+ sum += *k * VIGRA_CSTD::pow(-x, (double)derivOrder) / faculty; 1135 } 1136 } 1137 1138@@ -1695,21 +1695,21 @@ void Kernel1D<ARITHTYPE>::normalize(valu 1139 "Kernel1D<ARITHTYPE>::normalize(): " 1140 "Cannot normalize a kernel with sum = 0"); 1141 // normalize 1142- sum = norm / sum; 1143+ sum = normFactor / sum; 1144 k = kernel_.begin(); 1145 for(; k != kernel_.end(); ++k) 1146 { 1147 *k = *k * sum; 1148 } 1149 1150- norm_ = norm; 1151+ norm_ = normFactor; 1152 } 1153 1154 /***********************************************************************/ 1155 1156 template <class ARITHTYPE> 1157 void Kernel1D<ARITHTYPE>::initGaussian(double std_dev, 1158- value_type norm) 1159+ value_type normFactor) 1160 { 1161 vigra_precondition(std_dev >= 0.0, 1162 "Kernel1D::initGaussian(): Standard deviation must be >= 0."); 1163@@ -1742,8 +1742,8 @@ void Kernel1D<ARITHTYPE>::initGaussian(d 1164 right_ = 0; 1165 } 1166 1167- if(norm != 0.0) 1168- normalize(norm); 1169+ if(normFactor != 0.0) 1170+ normalize(normFactor); 1171 else 1172 norm_ = 1.0; 1173 1174@@ -1755,7 +1755,7 @@ void Kernel1D<ARITHTYPE>::initGaussian(d 1175 1176 template <class ARITHTYPE> 1177 void Kernel1D<ARITHTYPE>::initDiscreteGaussian(double std_dev, 1178- value_type norm) 1179+ value_type normFactor) 1180 { 1181 vigra_precondition(std_dev >= 0.0, 1182 "Kernel1D::initDiscreteGaussian(): Standard deviation must be >= 0."); 1183@@ -1797,7 +1797,7 @@ void Kernel1D<ARITHTYPE>::initDiscreteGa 1184 er += warray[i]; 1185 } 1186 1187- double scale = norm / (2*er - warray[0]); 1188+ double scale = normFactor / (2*er - warray[0]); 1189 1190 initExplicitly(-radius, radius); 1191 iterator c = center(); 1192@@ -1810,12 +1810,12 @@ void Kernel1D<ARITHTYPE>::initDiscreteGa 1193 else 1194 { 1195 kernel_.erase(kernel_.begin(), kernel_.end()); 1196- kernel_.push_back(norm); 1197+ kernel_.push_back(normFactor); 1198 left_ = 0; 1199 right_ = 0; 1200 } 1201 1202- norm_ = norm; 1203+ norm_ = normFactor; 1204 1205 // best border treatment for Gaussians is BORDER_TREATMENT_REFLECT 1206 border_treatment_ = BORDER_TREATMENT_REFLECT; 1207@@ -1826,15 +1826,15 @@ void Kernel1D<ARITHTYPE>::initDiscreteGa 1208 template <class ARITHTYPE> 1209 void 1210 Kernel1D<ARITHTYPE>::initGaussianDerivative(double std_dev, 1211- int order, 1212- value_type norm) 1213+ int order, 1214+ value_type normFactor) 1215 { 1216 vigra_precondition(order >= 0, 1217 "Kernel1D::initGaussianDerivative(): Order must be >= 0."); 1218 1219 if(order == 0) 1220 { 1221- initGaussian(std_dev, norm); 1222+ initGaussian(std_dev, normFactor); 1223 return; 1224 } 1225 1226@@ -1865,7 +1865,7 @@ Kernel1D<ARITHTYPE>::initGaussianDerivat 1227 1228 // remove DC, but only if kernel correction is permitted by a non-zero 1229 // value for norm 1230- if(norm != 0.0) 1231+ if(normFactor != 0.0) 1232 { 1233 for(unsigned int i=0; i < kernel_.size(); ++i) 1234 { 1235@@ -1876,8 +1876,8 @@ Kernel1D<ARITHTYPE>::initGaussianDerivat 1236 left_ = -radius; 1237 right_ = radius; 1238 1239- if(norm != 0.0) 1240- normalize(norm, order); 1241+ if(normFactor != 0.0) 1242+ normalize(normFactor, order); 1243 else 1244 norm_ = 1.0; 1245 1246@@ -1891,7 +1891,7 @@ Kernel1D<ARITHTYPE>::initGaussianDerivat 1247 template <class ARITHTYPE> 1248 void 1249 Kernel1D<ARITHTYPE>::initBinomial(int radius, 1250- value_type norm) 1251+ value_type normFactor) 1252 { 1253 vigra_precondition(radius > 0, 1254 "Kernel1D::initBinomial(): Radius must be > 0."); 1255@@ -1921,12 +1921,12 @@ Kernel1D<ARITHTYPE>::initBinomial(int ra 1256 1257 for(i=0; i<=radius*2+1; ++i) 1258 { 1259- kernel_.push_back(kernel[i] * norm); 1260+ kernel_.push_back(kernel[i] * normFactor); 1261 } 1262 1263 left_ = -radius; 1264 right_ = radius; 1265- norm_ = norm; 1266+ norm_ = normFactor; 1267 1268 // best border treatment for Binomial is BORDER_TREATMENT_REFLECT 1269 border_treatment_ = BORDER_TREATMENT_REFLECT; 1270@@ -1936,7 +1936,7 @@ Kernel1D<ARITHTYPE>::initBinomial(int ra 1271 1272 template <class ARITHTYPE> 1273 void Kernel1D<ARITHTYPE>::initAveraging(int radius, 1274- value_type norm) 1275+ value_type normFactor) 1276 { 1277 vigra_precondition(radius > 0, 1278 "Kernel1D::initAveraging(): Radius must be > 0."); 1279@@ -1950,12 +1950,12 @@ void Kernel1D<ARITHTYPE>::initAveraging( 1280 1281 for(int i=0; i<=radius*2+1; ++i) 1282 { 1283- kernel_.push_back(scale * norm); 1284+ kernel_.push_back(scale * normFactor); 1285 } 1286 1287 left_ = -radius; 1288 right_ = radius; 1289- norm_ = norm; 1290+ norm_ = normFactor; 1291 1292 // best border treatment for Averaging is BORDER_TREATMENT_CLIP 1293 border_treatment_ = BORDER_TREATMENT_CLIP; 1294diff -uprN misc/vigra1.6.0/include/vigra/sized_int.hxx misc/build/vigra1.6.0/include/vigra/sized_int.hxx 1295--- misc/vigra1.6.0/include/vigra/sized_int.hxx 2008-08-13 08:15:41.000000000 -0500 1296+++ misc/build/vigra1.6.0/include/vigra/sized_int.hxx 2012-09-19 17:30:24.000000000 -0500 1297@@ -73,11 +73,15 @@ struct SelectIntegerType<SIZE, Int_type_ 1298 typedef Int_type_not_supported_on_this_platform type; 1299 }; 1300 1301+#if defined __SUNPRO_CC 1302+#pragma disable_warn 1303+#endif 1304+ 1305 template<class LIST> 1306 struct SelectBiggestIntegerType 1307 { 1308- enum { cursize = LIST::size, 1309- nextsize = SelectBiggestIntegerType<typename LIST::next>::size, 1310+ enum { cursize = static_cast< int >(LIST::size), 1311+ nextsize = static_cast< int >(SelectBiggestIntegerType<typename LIST::next>::size), 1312 size = (cursize < nextsize) ? nextsize : cursize }; 1313 typedef typename 1314 IfBool<(cursize < nextsize), 1315@@ -86,6 +90,10 @@ struct SelectBiggestIntegerType 1316 type; 1317 }; 1318 1319+#if defined __SUNPRO_CC 1320+#pragma enable_warn 1321+#endif 1322+ 1323 template<> 1324 struct SelectBiggestIntegerType<Int_type_not_supported_on_this_platform> 1325 { 1326diff -uprN misc/vigra1.6.0/include/vigra/splines.hxx misc/build/vigra1.6.0/include/vigra/splines.hxx 1327--- misc/vigra1.6.0/include/vigra/splines.hxx 2008-08-13 08:15:41.000000000 -0500 1328+++ misc/build/vigra1.6.0/include/vigra/splines.hxx 2012-09-19 17:30:24.000000000 -0500 1329@@ -108,8 +108,8 @@ class BSplineBase 1330 /** Create functor for gevine derivative of the spline. The spline's order 1331 is specified spline by the template argument <TT>ORDER</tt>. 1332 */ 1333- explicit BSplineBase(unsigned int derivativeOrder = 0) 1334- : s1_(derivativeOrder) 1335+ explicit BSplineBase(unsigned int derivOrder = 0) 1336+ : s1_(derivOrder) 1337 {} 1338 1339 /** Unary function call. 1340@@ -280,8 +280,8 @@ class BSplineBase<0, T> 1341 typedef T result_type; 1342 enum StaticOrder { order = 0 }; 1343 1344- explicit BSplineBase(unsigned int derivativeOrder = 0) 1345- : derivativeOrder_(derivativeOrder) 1346+ explicit BSplineBase(unsigned int derivOrder = 0) 1347+ : derivativeOrder_(derivOrder) 1348 {} 1349 1350 result_type operator()(argument_type x) const 1351@@ -357,8 +357,8 @@ class BSpline<1, T> 1352 typedef T result_type; 1353 enum StaticOrder { order = 1 }; 1354 1355- explicit BSpline(unsigned int derivativeOrder = 0) 1356- : derivativeOrder_(derivativeOrder) 1357+ explicit BSpline(unsigned int derivOrder = 0) 1358+ : derivativeOrder_(derivOrder) 1359 {} 1360 1361 result_type operator()(argument_type x) const 1362@@ -454,8 +454,8 @@ class BSpline<2, T> 1363 typedef T result_type; 1364 enum StaticOrder { order = 2 }; 1365 1366- explicit BSpline(unsigned int derivativeOrder = 0) 1367- : derivativeOrder_(derivativeOrder) 1368+ explicit BSpline(unsigned int derivOrder = 0) 1369+ : derivativeOrder_(derivOrder) 1370 {} 1371 1372 result_type operator()(argument_type x) const 1373@@ -583,8 +583,8 @@ class BSpline<3, T> 1374 typedef T result_type; 1375 enum StaticOrder { order = 3 }; 1376 1377- explicit BSpline(unsigned int derivativeOrder = 0) 1378- : derivativeOrder_(derivativeOrder) 1379+ explicit BSpline(unsigned int derivOrder = 0) 1380+ : derivativeOrder_(derivOrder) 1381 {} 1382 1383 result_type operator()(argument_type x) const 1384@@ -735,8 +735,8 @@ class BSpline<4, T> 1385 typedef T result_type; 1386 enum StaticOrder { order = 4 }; 1387 1388- explicit BSpline(unsigned int derivativeOrder = 0) 1389- : derivativeOrder_(derivativeOrder) 1390+ explicit BSpline(unsigned int derivOrder = 0) 1391+ : derivativeOrder_(derivOrder) 1392 {} 1393 1394 result_type operator()(argument_type x) const 1395diff -uprN misc/vigra1.6.0/include/vigra/static_assert.hxx misc/build/vigra1.6.0/include/vigra/static_assert.hxx 1396--- misc/vigra1.6.0/include/vigra/static_assert.hxx 2008-08-13 08:15:41.000000000 -0500 1397+++ misc/build/vigra1.6.0/include/vigra/static_assert.hxx 2012-09-19 17:30:24.000000000 -0500 1398@@ -115,7 +115,7 @@ assertImpl( void (*)(Predicate), typenam 1399 1400 TODO: provide more assertion base classes for other (non boolean) types of tests 1401 */ 1402-#if !defined(__GNUC__) || __GNUC__ > 2 1403+#if (!defined(__GNUC__) || __GNUC__ > 2) && (!defined(__SUNPRO_CC) || __SUNPRO_CC > 0x550) 1404 #define VIGRA_STATIC_ASSERT(Predicate) \ 1405 enum { \ 1406 VIGRA_PREPROCESSOR_CONCATENATE(vigra_assertion_in_line_, __LINE__) = sizeof( \ 1407diff -uprN misc/vigra1.6.0/include/vigra/tinyvector.hxx misc/build/vigra1.6.0/include/vigra/tinyvector.hxx 1408--- misc/vigra1.6.0/include/vigra/tinyvector.hxx 2008-08-13 08:15:42.000000000 -0500 1409+++ misc/build/vigra1.6.0/include/vigra/tinyvector.hxx 2012-09-19 17:30:24.000000000 -0500 1410@@ -39,6 +39,10 @@ 1411 #ifndef VIGRA_TINYVECTOR_HXX 1412 #define VIGRA_TINYVECTOR_HXX 1413 1414+#if defined __GNUC__ 1415+#pragma GCC system_header 1416+#endif 1417+ 1418 #include <cmath> // abs(double) 1419 #include <cstdlib> // abs(int) 1420 #include <iosfwd> // ostream 1421@@ -49,7 +53,6 @@ 1422 1423 namespace vigra { 1424 1425-using VIGRA_CSTD::abs; 1426 using VIGRA_CSTD::ceil; 1427 using VIGRA_CSTD::floor; 1428 1429@@ -439,9 +442,9 @@ class TinyVectorBase 1430 /** Initialize from another sequence (must have length SIZE!) 1431 */ 1432 template <class Iterator> 1433- void init(Iterator i, Iterator end) 1434+ void init(Iterator i, Iterator iend) 1435 { 1436- vigra_precondition(end-i == SIZE, 1437+ vigra_precondition(iend-i == SIZE, 1438 "TinyVector::init(): Sequence has wrong size."); 1439 Loop::assignCast(data_, i); 1440 } 1441