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