Source: libraw
Version: 0.18.7-2
Severity: important
Tags: patch
User: debian-gl...@lists.debian.org
Usertags: 2.27

libraw 0.18.7-2 fails to build with glibc 2.27 (2.27-0experimental0 from
experimental):

| internal/dcraw_fileio.cpp: In member function 'void 
LibRaw::apply_profile(const char*, const char*)':
| internal/dcraw_fileio.cpp:192:11: warning: ignoring return value of 'size_t 
fread(void*, size_t, size_t, FILE*)', declared with attribute 
warn_unused_result [-Wunused-result]
|      fread (&size, 4, 1, fp);
|      ~~~~~~^~~~~~~~~~~~~~~~~
| internal/dcraw_fileio.cpp:196:11: warning: ignoring return value of 'size_t 
fread(void*, size_t, size_t, FILE*)', declared with attribute 
warn_unused_result [-Wunused-result]
|      fread (oprof, 1, size, fp);
|      ~~~~~~^~~~~~~~~~~~~~~~~~~~
| In file included from src/libraw_cxx.cpp:5472:0:
| src/../internal/libraw_x3f.cpp: In function 'void 
huffman_decode_row(x3f_info_t*, x3f_directory_entry_t*, int, int, int, int*)':
| src/../internal/libraw_x3f.cpp:1404:39: warning: narrowing conversion of 
'offset' from 'int' to 'int16_t {aka short int}' inside { } [-Wnarrowing]
|    int16_t c[3] = {offset,offset,offset};
|                                        ^
| src/../internal/libraw_x3f.cpp:1404:39: warning: narrowing conversion of 
'offset' from 'int' to 'int16_t {aka short int}' inside { } [-Wnarrowing]
| src/../internal/libraw_x3f.cpp:1404:39: warning: narrowing conversion of 
'offset' from 'int' to 'int16_t {aka short int}' inside { } [-Wnarrowing]
| libtool: compile:  g++ -DPACKAGE_NAME=\"LibRaw\" -DPACKAGE_TARNAME=\"libraw\" 
-DPACKAGE_VERSION=\"0.18.7\" "-DPACKAGE_STRING=\"LibRaw 0.18.7\"" 
-DPACKAGE_BUGREPORT=\"i...@libraw.org\" -DPACKAGE_URL=\"http://www.libraw.org\"; 
-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 
-DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" 
-DHAVE_JPEGLIB_H=1 -I. -Wdate-time -D_FORTIFY_SOURCE=2 -DUSE_JPEG -DUSE_JPEG8 
-DUSE_LCMS2 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. 
-fstack-protector-strong -Wformat -Werror=format-security -fopenmp -c 
src/libraw_c_api.cpp -o src/libraw_c_api.o >/dev/null 2>&1
| internal/dcraw_common.cpp: In member function 'void 
LibRaw::PentaxLensInfo(unsigned int, unsigned int)':
| internal/dcraw_common.cpp:6830:80: error: call of overloaded 'powf64(int, 
int)' is ambiguous
|     10*(table_buf[iLensData+9]>>2) * powf64(4, (table_buf[iLensData+9] & 
0x03)-2);
|                                                                               
  ^
| In file included from /usr/include/c++/7/cmath:45:0,
|                  from /usr/include/c++/7/math.h:36,
|                  from internal/dcraw_common.cpp:22:
| /usr/include/x86_64-linux-gnu/bits/mathcalls.h:140:1: note: candidate: 
_Float64 powf64(_Float64, _Float64)
|  __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
|  ^
| internal/dcraw_common.cpp:5852:14: note: candidate: float powf64(float, float)
|  static float powf64(float a, float b)
|               ^~~~~~
| internal/dcraw_common.cpp: In member function 'void 
LibRaw::process_Sony_0x9050(uchar*, unsigned int)':
| internal/dcraw_common.cpp:7352:88: warning: ISO C++ says that these are 
ambiguous, even though the worst conversion for the first is better than the 
worst conversion for the second:
|            my_roundf(powf64(2.0f, ((float)SonySubstitution[buf[0]] / 8.0 - 
1.06f) / 2.0f)*10.0f) / 10.0f;
|                                                                               
          ^
| In file included from /usr/include/c++/7/cmath:45:0,
|                  from /usr/include/c++/7/math.h:36,
|                  from internal/dcraw_common.cpp:22:
| /usr/include/x86_64-linux-gnu/bits/mathcalls.h:140:1: note: candidate 1: 
_Float64 powf64(_Float64, _Float64)
|  __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
|  ^
| internal/dcraw_common.cpp:5852:14: note: candidate 2: float powf64(float, 
float)
|  static float powf64(float a, float b)
|               ^~~~~~
| internal/dcraw_common.cpp:7356:88: warning: ISO C++ says that these are 
ambiguous, even though the worst conversion for the first is better than the 
worst conversion for the second:
|            my_roundf(powf64(2.0f, ((float)SonySubstitution[buf[1]] / 8.0 - 
1.06f) / 2.0f)*10.0f) / 10.0f;
|                                                                               
          ^
| In file included from /usr/include/c++/7/cmath:45:0,
|                  from /usr/include/c++/7/math.h:36,
|                  from internal/dcraw_common.cpp:22:
| /usr/include/x86_64-linux-gnu/bits/mathcalls.h:140:1: note: candidate 1: 
_Float64 powf64(_Float64, _Float64)
|  __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
|  ^
| internal/dcraw_common.cpp:5852:14: note: candidate 2: float powf64(float, 
float)
|  static float powf64(float a, float b)
|               ^~~~~~
| libtool: compile:  g++ -DPACKAGE_NAME=\"LibRaw\" -DPACKAGE_TARNAME=\"libraw\" 
-DPACKAGE_VERSION=\"0.18.7\" "-DPACKAGE_STRING=\"LibRaw 0.18.7\"" 
-DPACKAGE_BUGREPORT=\"i...@libraw.org\" -DPACKAGE_URL=\"http://www.libraw.org\"; 
-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 
-DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" 
-DHAVE_JPEGLIB_H=1 -I. -Wdate-time -D_FORTIFY_SOURCE=2 -DUSE_JPEG -DUSE_JPEG8 
-DUSE_LCMS2 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. 
-fstack-protector-strong -Wformat -Werror=format-security -fopenmp -c 
internal/dcraw_fileio.cpp -o internal/dcraw_fileio.o >/dev/null 2>&1
| internal/dcraw_common.cpp: In member function 'void 
LibRaw::parse_makernote_0xc634(int, int, unsigned int)':
| internal/dcraw_common.cpp:7797:71: warning: ISO C++ says that these are 
ambiguous, even though the worst conversion for the first is better than the 
worst conversion for the second:
|            imgdata.lens.makernotes.CurAp = powf64(2.0f, getreal(type)/2);
|                                                                        ^
| In file included from /usr/include/c++/7/cmath:45:0,
|                  from /usr/include/c++/7/math.h:36,
|                  from internal/dcraw_common.cpp:22:
| /usr/include/x86_64-linux-gnu/bits/mathcalls.h:140:1: note: candidate 1: 
_Float64 powf64(_Float64, _Float64)
|  __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
|  ^
| internal/dcraw_common.cpp:5852:14: note: candidate 2: float powf64(float, 
float)
|  static float powf64(float a, float b)
|               ^~~~~~
| internal/dcraw_common.cpp: In member function 'void 
LibRaw::parse_makernote(int, int)':
| internal/dcraw_common.cpp:8678:71: warning: ISO C++ says that these are 
ambiguous, even though the worst conversion for the first is better than the 
worst conversion for the second:
|            imgdata.lens.makernotes.CurAp = powf64(2.0f, getreal(type)/2);

A full build log is available there:
http://aws-logs.debian.net/2018/02/07/glibc-exp/libraw_0.18.7-2_unstable_glibc-exp.log

glibc 2.27 added TS 18661-3 support which adds *f64 and *f32x function
aliases for double functions. This collide with the powf64 declared in
libraw. To avoid that, the attached patch renames it into internal_powf64.
diff -Nru libraw-0.18.7/debian/patches/powf64.patch 
libraw-0.18.7/debian/patches/powf64.patch
--- libraw-0.18.7/debian/patches/powf64.patch   1970-01-01 01:00:00.000000000 
+0100
+++ libraw-0.18.7/debian/patches/powf64.patch   2018-02-24 01:06:35.000000000 
+0100
@@ -0,0 +1,334 @@
+On glibc 2.27 onwards, the powf64 function is defined as part of the
+TS 18661-3 support which adds *f64 and *f32x function aliases for double
+functions. This collide with the powf64 declared in libraw. To avoid
+that, rename it into internal_powf64.
+
+--- a/internal/dcraw_common.cpp
++++ b/internal/dcraw_common.cpp
+@@ -5849,7 +5849,7 @@
+ {
+   return (b>limup || b < -limup)?0.f:powf(a,b);
+ }
+-static float powf64(float a, float b)
++static float internal_powf64(float a, float b)
+ {
+   return powf_lim(a,b,64.f);
+ }
+@@ -5873,7 +5873,7 @@
+ static float _CanonConvertAperture(ushort in)
+ {
+   if ((in == (ushort)0xffe0) || (in == (ushort)0x7fff)) return 0.0f;
+-  return powf64(2.0, in/64.0);
++  return internal_powf64(2.0, in/64.0);
+ }
+ 
+ static float _CanonConvertEV (short in)
+@@ -6336,21 +6336,21 @@
+     if (fabsf(imgdata.lens.makernotes.MinFocal) < 1.1f)
+     {
+       if ((imgdata.lens.nikon.NikonLensType ^ (uchar)0x01) || LensData[i + 2])
+-        imgdata.lens.makernotes.MinFocal = 5.0f * powf64(2.0f, 
(float)LensData[i + 2] / 24.0f);
++        imgdata.lens.makernotes.MinFocal = 5.0f * internal_powf64(2.0f, 
(float)LensData[i + 2] / 24.0f);
+       if ((imgdata.lens.nikon.NikonLensType ^ (uchar)0x01) || LensData[i + 3])
+-        imgdata.lens.makernotes.MaxFocal = 5.0f * powf64(2.0f, 
(float)LensData[i + 3] / 24.0f);
++        imgdata.lens.makernotes.MaxFocal = 5.0f * internal_powf64(2.0f, 
(float)LensData[i + 3] / 24.0f);
+       if ((imgdata.lens.nikon.NikonLensType ^ (uchar)0x01) || LensData[i + 4])
+-        imgdata.lens.makernotes.MaxAp4MinFocal = powf64(2.0f, 
(float)LensData[i + 4] / 24.0f);
++        imgdata.lens.makernotes.MaxAp4MinFocal = internal_powf64(2.0f, 
(float)LensData[i + 4] / 24.0f);
+       if ((imgdata.lens.nikon.NikonLensType ^ (uchar)0x01) || LensData[i + 5])
+-        imgdata.lens.makernotes.MaxAp4MaxFocal = powf64(2.0f, 
(float)LensData[i + 5] / 24.0f);
++        imgdata.lens.makernotes.MaxAp4MaxFocal = internal_powf64(2.0f, 
(float)LensData[i + 5] / 24.0f);
+     }
+     imgdata.lens.nikon.NikonMCUVersion = LensData[i + 6];
+     if (i != 2)
+       {
+         if ((LensData[i - 1]) &&
+             (fabsf(imgdata.lens.makernotes.CurFocal) < 1.1f))
+-          imgdata.lens.makernotes.CurFocal = 5.0f * powf64(2.0f, 
(float)LensData[i - 1] / 24.0f);
+-        if (LensData[i + 7]) imgdata.lens.nikon.NikonEffectiveMaxAp = 
powf64(2.0f, (float)LensData[i + 7] / 24.0f);
++          imgdata.lens.makernotes.CurFocal = 5.0f * internal_powf64(2.0f, 
(float)LensData[i - 1] / 24.0f);
++        if (LensData[i + 7]) imgdata.lens.nikon.NikonEffectiveMaxAp = 
internal_powf64(2.0f, (float)LensData[i + 7] / 24.0f);
+       }
+     imgdata.lens.makernotes.LensID =
+       (unsigned long long) LensData[i] << 56 |
+@@ -6827,13 +6827,13 @@
+               if (table_buf[iLensData+9] &&
+                       (fabs(imgdata.lens.makernotes.CurFocal) < 0.1f))
+                 imgdata.lens.makernotes.CurFocal =
+-                      10*(table_buf[iLensData+9]>>2) * powf64(4, 
(table_buf[iLensData+9] & 0x03)-2);
++                      10*(table_buf[iLensData+9]>>2) * internal_powf64(4, 
(table_buf[iLensData+9] & 0x03)-2);
+               if (table_buf[iLensData+10] & 0xf0)
+                 imgdata.lens.makernotes.MaxAp4CurFocal =
+-                      powf64(2.0f, (float)((table_buf[iLensData+10] & 0xf0) 
>>4)/4.0f);
++                      internal_powf64(2.0f, (float)((table_buf[iLensData+10] 
& 0xf0) >>4)/4.0f);
+               if (table_buf[iLensData+10] & 0x0f)
+                 imgdata.lens.makernotes.MinAp4CurFocal =
+-                      powf64(2.0f, (float)((table_buf[iLensData+10] & 0x0f) + 
10)/4.0f);
++                      internal_powf64(2.0f, (float)((table_buf[iLensData+10] 
& 0x0f) + 10)/4.0f);
+ 
+               if (iLensData != 12)
+                 {
+@@ -6854,14 +6854,14 @@
+                       if ((table_buf[iLensData+14] > 1) &&
+                               (fabs(imgdata.lens.makernotes.MaxAp4CurFocal) < 
0.7f))
+                         imgdata.lens.makernotes.MaxAp4CurFocal =
+-                              powf64(2.0f, (float)((table_buf[iLensData+14] & 
0x7f) -1)/32.0f);
++                              internal_powf64(2.0f, 
(float)((table_buf[iLensData+14] & 0x7f) -1)/32.0f);
+                 }
+               else if ((id != 0x12e76) &&     // K-5
+                                (table_buf[iLensData+15] > 1) &&
+                                (fabs(imgdata.lens.makernotes.MaxAp4CurFocal) 
< 0.7f))
+                 {
+                       imgdata.lens.makernotes.MaxAp4CurFocal =
+-                        powf64(2.0f, (float)((table_buf[iLensData+15] & 0x7f) 
-1)/32.0f);
++                        internal_powf64(2.0f, 
(float)((table_buf[iLensData+15] & 0x7f) -1)/32.0f);
+                 }
+         }
+       free(table_buf);
+@@ -7349,11 +7349,11 @@
+     {
+       if (buf[0])
+         imgdata.lens.makernotes.MaxAp4CurFocal =
+-          my_roundf(powf64(2.0f, ((float)SonySubstitution[buf[0]] / 8.0 - 
1.06f) / 2.0f)*10.0f) / 10.0f;
++          my_roundf(internal_powf64(2.0f, ((float)SonySubstitution[buf[0]] / 
8.0 - 1.06f) / 2.0f)*10.0f) / 10.0f;
+ 
+       if (buf[1])
+         imgdata.lens.makernotes.MinAp4CurFocal =
+-          my_roundf(powf64(2.0f, ((float)SonySubstitution[buf[1]] / 8.0 - 
1.06f) / 2.0f)*10.0f) / 10.0f;
++          my_roundf(internal_powf64(2.0f, ((float)SonySubstitution[buf[1]] / 
8.0 - 1.06f) / 2.0f)*10.0f) / 10.0f;
+     }
+ 
+   if (imgdata.lens.makernotes.CameraMount != LIBRAW_MOUNT_FixedLens)
+@@ -7363,7 +7363,7 @@
+           lid = SonySubstitution[buf[0x3d]] << 8 |
+             SonySubstitution[buf[0x3c]];
+           imgdata.lens.makernotes.CurAp =
+-            powf64(2.0f, ((float)lid/256.0f - 16.0f) / 2.0f);
++            internal_powf64(2.0f, ((float)lid/256.0f - 16.0f) / 2.0f);
+         }
+       if (buf[0x105] &&
+           (imgdata.lens.makernotes.LensMount != LIBRAW_MOUNT_Canon_EF) &&
+@@ -7749,7 +7749,7 @@
+           {
+             unsigned char cc;
+             fread(&cc, 1, 1, ifp);
+-            iso_speed = (int)(100.0 * powf64(2.0, (double)(cc) / 12.0 - 5.0));
++            iso_speed = (int)(100.0 * internal_powf64(2.0, (double)(cc) / 
12.0 - 5.0));
+             break;
+           }
+       }
+@@ -7794,7 +7794,7 @@
+           }
+           break;
+         case 0x1002:
+-          imgdata.lens.makernotes.CurAp = powf64(2.0f, getreal(type)/2);
++          imgdata.lens.makernotes.CurAp = internal_powf64(2.0f, 
getreal(type)/2);
+           break;
+         case 0x20100102:
+             stmread(imgdata.shootinginfo.InternalBodySerial, len, ifp);
+@@ -7821,10 +7821,10 @@
+           stmread(imgdata.lens.makernotes.Lens,len, ifp);
+           break;
+         case 0x20100205:
+-          imgdata.lens.makernotes.MaxAp4MinFocal = powf64(sqrt(2.0f), get2() 
/ 256.0f);
++          imgdata.lens.makernotes.MaxAp4MinFocal = 
internal_powf64(sqrt(2.0f), get2() / 256.0f);
+           break;
+         case 0x20100206:
+-          imgdata.lens.makernotes.MaxAp4MaxFocal = powf64(sqrt(2.0f), get2() 
/ 256.0f);
++          imgdata.lens.makernotes.MaxAp4MaxFocal = 
internal_powf64(sqrt(2.0f), get2() / 256.0f);
+           break;
+         case 0x20100207:
+           imgdata.lens.makernotes.MinFocal = (float)get2();
+@@ -7835,7 +7835,7 @@
+             imgdata.lens.makernotes.MaxFocal = 
imgdata.lens.makernotes.MinFocal;
+           break;
+         case 0x2010020a:
+-          imgdata.lens.makernotes.MaxAp4CurFocal = powf64(sqrt(2.0f), get2() 
/ 256.0f);
++          imgdata.lens.makernotes.MaxAp4CurFocal = 
internal_powf64(sqrt(2.0f), get2() / 256.0f);
+           break;
+         case 0x20100301:
+           imgdata.lens.makernotes.TeleconverterID = fgetc(ifp) << 8;
+@@ -8144,7 +8144,7 @@
+                   lid = (((ushort)table_buf[2])<<8) |
+                     ((ushort)table_buf[3]);
+                   imgdata.lens.makernotes.CurAp =
+-                    powf64(2.0f, ((float)lid/8.0f-1.0f)/2.0f);
++                    internal_powf64(2.0f, ((float)lid/8.0f-1.0f)/2.0f);
+                 }
+               break;
+             case 1536:
+@@ -8675,7 +8675,7 @@
+           }
+           break;
+         case 0x1002:
+-          imgdata.lens.makernotes.CurAp = powf64(2.0f, getreal(type)/2);
++          imgdata.lens.makernotes.CurAp = internal_powf64(2.0f, 
getreal(type)/2);
+           break;
+         case 0x20401112:
+           imgdata.makernotes.olympus.OlympusCropID = get2();
+@@ -8709,10 +8709,10 @@
+           stmread(imgdata.lens.makernotes.Lens, len, ifp);
+           break;
+         case 0x20100205:
+-          imgdata.lens.makernotes.MaxAp4MinFocal = powf64(sqrt(2.0f), get2() 
/ 256.0f);
++          imgdata.lens.makernotes.MaxAp4MinFocal = 
internal_powf64(sqrt(2.0f), get2() / 256.0f);
+           break;
+         case 0x20100206:
+-          imgdata.lens.makernotes.MaxAp4MaxFocal = powf64(sqrt(2.0f), get2() 
/ 256.0f);
++          imgdata.lens.makernotes.MaxAp4MaxFocal = 
internal_powf64(sqrt(2.0f), get2() / 256.0f);
+           break;
+         case 0x20100207:
+           imgdata.lens.makernotes.MinFocal = (float)get2();
+@@ -8723,7 +8723,7 @@
+             imgdata.lens.makernotes.MaxFocal = 
imgdata.lens.makernotes.MinFocal;
+           break;
+         case 0x2010020a:
+-          imgdata.lens.makernotes.MaxAp4CurFocal = powf64(sqrt(2.0f), get2() 
/ 256.0f);
++          imgdata.lens.makernotes.MaxAp4CurFocal = 
internal_powf64(sqrt(2.0f), get2() / 256.0f);
+           break;
+         case 0x20100301:
+           imgdata.lens.makernotes.TeleconverterID = fgetc(ifp) << 8;
+@@ -9150,7 +9150,7 @@
+                   lid = (((ushort)table_buf[2])<<8) |
+                     ((ushort)table_buf[3]);
+                   imgdata.lens.makernotes.CurAp =
+-                    powf64(2.0f, ((float)lid/8.0f-1.0f)/2.0f);
++                    internal_powf64(2.0f, ((float)lid/8.0f-1.0f)/2.0f);
+                 }
+               break;
+             case 1536:
+@@ -9248,19 +9248,19 @@
+       {
+         unsigned char cc;
+         fread(&cc,1,1,ifp);
+-        iso_speed = int(100.0 * powf64(2.0f,float(cc)/12.0-5.0));
++        iso_speed = int(100.0 * internal_powf64(2.0f,float(cc)/12.0-5.0));
+       }
+     if (tag == 4 && len > 26 && len < 35) {
+       if ((i=(get4(),get2())) != 0x7fff && (!iso_speed || iso_speed == 65535))
+-      iso_speed = 50 * powf64(2.0, i/32.0 - 4);
++      iso_speed = 50 * internal_powf64(2.0, i/32.0 - 4);
+ #ifdef LIBRAW_LIBRARY_BUILD
+       get4();
+ #else
+       if ((i=(get2(),get2())) != 0x7fff && !aperture)
+-      aperture = powf64(2.0, i/64.0);
++      aperture = internal_powf64(2.0, i/64.0);
+ #endif
+       if ((i=get2()) != 0xffff && !shutter)
+-      shutter = powf64(2.0, (short) i/-32.0);
++      shutter = internal_powf64(2.0, (short) i/-32.0);
+       wbi = (get2(),get2());
+       shot_order = (get2(),get2());
+     }
+@@ -9854,7 +9854,7 @@
+         imgdata.lens.Lens[0] = 0;
+       break;
+     case 0x9205:
+-      imgdata.lens.EXIF_MaxAp = powf64(2.0f, (getreal(type) / 2.0f));
++      imgdata.lens.EXIF_MaxAp = internal_powf64(2.0f, (getreal(type) / 2.0f));
+       break;
+ #endif
+       case 33434:  tiff_ifd[tiff_nifds-1].t_shutter =
+@@ -9869,11 +9869,11 @@
+       case 36868:  get_timestamp(0);                  break;
+       case 37377:  if ((expo = -getreal(type)) < 128 && shutter == 0.)
+                    tiff_ifd[tiff_nifds-1].t_shutter =
+-                      shutter = powf64(2.0, expo);
++                      shutter = internal_powf64(2.0, expo);
+               break;
+       case 37378:                                       // 0x9202 
ApertureValue
+         if ((fabs(ape = getreal(type))<256.0) && (!aperture))
+-          aperture = powf64(2.0, ape/2);
++          aperture = internal_powf64(2.0, ape/2);
+         break;
+       case 37385:  flash_used = getreal(type);          break;
+       case 37386:  focal_len = getreal(type);         break;
+@@ -10769,7 +10769,7 @@
+         imgdata.lens.Lens[0] = 0;
+       break;
+     case 0x9205:
+-      imgdata.lens.EXIF_MaxAp = powf64(2.0f, (getreal(type) / 2.0f));
++      imgdata.lens.EXIF_MaxAp = internal_powf64(2.0f, (getreal(type) / 2.0f));
+       break;
+ // IB end
+ #endif
+@@ -11804,22 +11804,22 @@
+       thumb_length = len;
+     }
+     if (type == 0x1818) {
+-      shutter = powf64(2.0f, -int_to_float((get4(),get4())));
+-      aperture = powf64(2.0f, int_to_float(get4())/2);
++      shutter = internal_powf64(2.0f, -int_to_float((get4(),get4())));
++      aperture = internal_powf64(2.0f, int_to_float(get4())/2);
+ #ifdef LIBRAW_LIBRARY_BUILD
+       imgdata.lens.makernotes.CurAp = aperture;
+ #endif
+     }
+     if (type == 0x102a) {
+ //      iso_speed = pow (2.0, (get4(),get2())/32.0 - 4) * 50;
+-      iso_speed = powf64(2.0f, ((get2(),get2()) + get2())/32.0f - 5.0f) * 
100.0f;
++      iso_speed = internal_powf64(2.0f, ((get2(),get2()) + get2())/32.0f - 
5.0f) * 100.0f;
+ #ifdef LIBRAW_LIBRARY_BUILD
+       aperture  = _CanonConvertAperture((get2(),get2()));
+       imgdata.lens.makernotes.CurAp = aperture;
+ #else
+-      aperture  = powf64(2.0, (get2(),(short)get2())/64.0);
++      aperture  = internal_powf64(2.0, (get2(),(short)get2())/64.0);
+ #endif
+-      shutter   = powf64(2.0,-((short)get2())/32.0);
++      shutter   = internal_powf64(2.0,-((short)get2())/32.0);
+       wbi = (get2(),get2());
+       if (wbi > 17) wbi = 0;
+       fseek (ifp, 32, SEEK_CUR);
+@@ -12024,8 +12024,8 @@
+       setPhaseOneFeatures(unique_id);
+       break;
+     case 0x0401:
+-      if (type == 4) imgdata.lens.makernotes.CurAp =  powf64(2.0f, 
(int_to_float(data)/2.0f));
+-      else imgdata.lens.makernotes.CurAp = powf64(2.0f, (getreal(type)/2.0f));
++      if (type == 4) imgdata.lens.makernotes.CurAp =  internal_powf64(2.0f, 
(int_to_float(data)/2.0f));
++      else imgdata.lens.makernotes.CurAp = internal_powf64(2.0f, 
(getreal(type)/2.0f));
+       break;
+     case 0x0403:
+       if (type == 4) imgdata.lens.makernotes.CurFocal =  int_to_float(data);
+@@ -12039,16 +12039,16 @@
+       break;
+     case 0x0414:
+       if (type == 4) {
+-              imgdata.lens.makernotes.MaxAp4CurFocal = powf64(2.0f, 
(int_to_float(data)/2.0f));
++              imgdata.lens.makernotes.MaxAp4CurFocal = internal_powf64(2.0f, 
(int_to_float(data)/2.0f));
+       } else {
+-        imgdata.lens.makernotes.MaxAp4CurFocal = powf64(2.0f, (getreal(type) 
/ 2.0f));
++        imgdata.lens.makernotes.MaxAp4CurFocal = internal_powf64(2.0f, 
(getreal(type) / 2.0f));
+       }
+       break;
+     case 0x0415:
+       if (type == 4) {
+-              imgdata.lens.makernotes.MinAp4CurFocal = powf64(2.0f, 
(int_to_float(data)/2.0f));
++              imgdata.lens.makernotes.MinAp4CurFocal = internal_powf64(2.0f, 
(int_to_float(data)/2.0f));
+       } else {
+-        imgdata.lens.makernotes.MinAp4CurFocal = powf64(2.0f, (getreal(type) 
/ 2.0f));
++        imgdata.lens.makernotes.MinAp4CurFocal = internal_powf64(2.0f, 
(getreal(type) / 2.0f));
+       }
+       break;
+     case 0x0416:
+@@ -14237,15 +14237,15 @@
+       case 18: iso_speed = 320; break;
+       case 19: iso_speed = 400; break;
+     }
+-    shutter = powf64(2.0f, (((float)get4())/8.0f)) / 16000.0f;
++    shutter = internal_powf64(2.0f, (((float)get4())/8.0f)) / 16000.0f;
+     FORC4 cam_mul[c ^ (c >> 1)] = get4();
+     fseek (ifp, 88, SEEK_SET);
+-    aperture = powf64(2.0f, ((float)get4())/16.0f);
++    aperture = internal_powf64(2.0f, ((float)get4())/16.0f);
+     fseek (ifp, 112, SEEK_SET);
+     focal_len = get4();
+ #ifdef LIBRAW_LIBRARY_BUILD
+     fseek (ifp, 104, SEEK_SET);
+-    imgdata.lens.makernotes.MaxAp4CurFocal = powf64(2.0f, 
((float)get4())/16.0f);
++    imgdata.lens.makernotes.MaxAp4CurFocal = internal_powf64(2.0f, 
((float)get4())/16.0f);
+     fseek (ifp, 124, SEEK_SET);
+     stmread(imgdata.lens.makernotes.Lens, 32, ifp);
+     imgdata.lens.makernotes.CameraMount = LIBRAW_MOUNT_Contax_N;
diff -Nru libraw-0.18.7/debian/patches/series 
libraw-0.18.7/debian/patches/series
--- libraw-0.18.7/debian/patches/series 1970-01-01 01:00:00.000000000 +0100
+++ libraw-0.18.7/debian/patches/series 2018-02-24 01:06:42.000000000 +0100
@@ -0,0 +1 @@
+powf64.patch
_______________________________________________
Pkg-phototools-devel mailing list
Pkg-phototools-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-phototools-devel

Reply via email to