patch-dcraw_cc 775 B

123456789101112131415161718192021222324252627
  1. $OpenBSD: patch-dcraw_cc,v 1.3 2017/05/05 13:19:24 espie Exp $
  2. can't find abs of uint with clang
  3. fix stolen from ufraw-current
  4. Index: dcraw.cc
  5. --- dcraw.cc.orig
  6. +++ dcraw.cc
  7. @@ -9240,13 +9240,13 @@ canon_a5:
  8. filters = 0x16161616;
  9. }
  10. if (make[0] == 'O') {
  11. - i = find_green (12, 32, 1188864, 3576832);
  12. - c = find_green (12, 32, 2383920, 2387016);
  13. - if (abs(i) < abs(c)) {
  14. - SWAP(i,c);
  15. + float g1 = find_green (12, 32, 1188864, 3576832);
  16. + float g2 = find_green (12, 32, 2383920, 2387016);
  17. + if (fabsf(g1) < fabsf(g2)) {
  18. + SWAP(g1,g2);
  19. load_flags = 24;
  20. }
  21. - if ((int) i < 0) filters = 0x61616161;
  22. + if (g1 < 0) filters = 0x61616161;
  23. }
  24. } else if (fsize == 5869568) {
  25. if (!timestamp && minolta_z2()) {