libfreeimage: correct 0005-Manage-powf64-with-glibc.patch line endings
authorPeter Korsgaard <peter@korsgaard.com>
Sun, 6 May 2018 20:51:35 +0000 (22:51 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Sun, 6 May 2018 20:51:35 +0000 (22:51 +0200)
Fixes:
http://autobuild.buildroot.net/results/131/131f97d2c3525794163e5c7863bb8b8523fb05ba/

The libfreeimage source code uses DOS line endings, which gets stripped by
patchwork so the patch no longer applies.  Fix it by converting line endings
of the patch hunks to DOS (but not the patch meta data).

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/libfreeimage/0005-Manage-powf64-with-glibc.patch

index f85aef541fc56fea40ad7e156d48a868b993c09c..948ba06eb99ca666b82be23361344a3087c8d522 100644 (file)
@@ -17,709 +17,709 @@ index 6bf607d..3e52cec 100644
 --- a/Source/LibRawLite/dcraw/dcraw.c
 +++ b/Source/LibRawLite/dcraw/dcraw.c
 @@ -6727,7 +6727,7 @@ static float powf_lim(float a, float b, float limup)
- {
-   return (b>limup || b < -limup)?0.f:powf(a,b);
- }
--static float powf64(float a, float b)
-+static float powf_64(float a, float b)
- {
-   return powf_lim(a,b,64.f);
- }
+ {\r
+   return (b>limup || b < -limup)?0.f:powf(a,b);\r
+ }\r
+-static float powf64(float a, float b)\r
++static float powf_64(float a, float b)\r
+ {\r
+   return powf_lim(a,b,64.f);\r
+ }\r
 @@ -6764,7 +6764,7 @@ static float _CanonConvert2EV(short in)
- static float _CanonConvertAperture(short in)
- {
-   if (in == (short)0xffe0) return 0.0f;
--  else return powf64(2.0f, _CanonConvert2EV(in) / 2.0f);
-+  else return powf_64(2.0f, _CanonConvert2EV(in) / 2.0f);
- }
- void CLASS setCanonBodyFeatures (unsigned id)
+ static float _CanonConvertAperture(short in)\r
+ {\r
+   if (in == (short)0xffe0) return 0.0f;\r
+-  else return powf64(2.0f, _CanonConvert2EV(in) / 2.0f);\r
++  else return powf_64(2.0f, _CanonConvert2EV(in) / 2.0f);\r
+ }\r
\r
+ void CLASS setCanonBodyFeatures (unsigned id)\r
 @@ -7046,15 +7046,15 @@ void CLASS processNikonLensData (uchar *LensData, unsigned len)
-     imgdata.lens.nikon.NikonLensIDNumber = LensData[i];
-     imgdata.lens.nikon.NikonLensFStops = LensData[i + 1];
-     imgdata.lens.makernotes.LensFStops = (float)imgdata.lens.nikon.NikonLensFStops /12.0f;
--    imgdata.lens.makernotes.MinFocal = 5.0f * powf64(2.0f, (float)LensData[i + 2] / 24.0f);
--    imgdata.lens.makernotes.MaxFocal = 5.0f * powf64(2.0f, (float)LensData[i + 3] / 24.0f);
--    imgdata.lens.makernotes.MaxAp4MinFocal = powf64(2.0f, (float)LensData[i + 4] / 24.0f);
--    imgdata.lens.makernotes.MaxAp4MaxFocal = powf64(2.0f, (float)LensData[i + 5] / 24.0f);
-+    imgdata.lens.makernotes.MinFocal = 5.0f * powf_64(2.0f, (float)LensData[i + 2] / 24.0f);
-+    imgdata.lens.makernotes.MaxFocal = 5.0f * powf_64(2.0f, (float)LensData[i + 3] / 24.0f);
-+    imgdata.lens.makernotes.MaxAp4MinFocal = powf_64(2.0f, (float)LensData[i + 4] / 24.0f);
-+    imgdata.lens.makernotes.MaxAp4MaxFocal = powf_64(2.0f, (float)LensData[i + 5] / 24.0f);
-     imgdata.lens.nikon.NikonMCUVersion = LensData[i + 6];
-     if (i != 2)
-       {
--        imgdata.lens.makernotes.CurFocal = 5.0f * powf64(2.0f, (float)LensData[i - 1] / 24.0f);
--        imgdata.lens.nikon.NikonEffectiveMaxAp = powf64(2.0f, (float)LensData[i + 7] / 24.0f);
-+        imgdata.lens.makernotes.CurFocal = 5.0f * powf_64(2.0f, (float)LensData[i - 1] / 24.0f);
-+        imgdata.lens.nikon.NikonEffectiveMaxAp = powf_64(2.0f, (float)LensData[i + 7] / 24.0f);
-       }
-     imgdata.lens.makernotes.LensID =
-       (unsigned long long) LensData[i] << 56 |
+     imgdata.lens.nikon.NikonLensIDNumber = LensData[i];\r
+     imgdata.lens.nikon.NikonLensFStops = LensData[i + 1];\r
+     imgdata.lens.makernotes.LensFStops = (float)imgdata.lens.nikon.NikonLensFStops /12.0f;\r
+-    imgdata.lens.makernotes.MinFocal = 5.0f * powf64(2.0f, (float)LensData[i + 2] / 24.0f);\r
+-    imgdata.lens.makernotes.MaxFocal = 5.0f * powf64(2.0f, (float)LensData[i + 3] / 24.0f);\r
+-    imgdata.lens.makernotes.MaxAp4MinFocal = powf64(2.0f, (float)LensData[i + 4] / 24.0f);\r
+-    imgdata.lens.makernotes.MaxAp4MaxFocal = powf64(2.0f, (float)LensData[i + 5] / 24.0f);\r
++    imgdata.lens.makernotes.MinFocal = 5.0f * powf_64(2.0f, (float)LensData[i + 2] / 24.0f);\r
++    imgdata.lens.makernotes.MaxFocal = 5.0f * powf_64(2.0f, (float)LensData[i + 3] / 24.0f);\r
++    imgdata.lens.makernotes.MaxAp4MinFocal = powf_64(2.0f, (float)LensData[i + 4] / 24.0f);\r
++    imgdata.lens.makernotes.MaxAp4MaxFocal = powf_64(2.0f, (float)LensData[i + 5] / 24.0f);\r
+     imgdata.lens.nikon.NikonMCUVersion = LensData[i + 6];\r
+     if (i != 2)\r
+       {\r
+-        imgdata.lens.makernotes.CurFocal = 5.0f * powf64(2.0f, (float)LensData[i - 1] / 24.0f);\r
+-        imgdata.lens.nikon.NikonEffectiveMaxAp = powf64(2.0f, (float)LensData[i + 7] / 24.0f);\r
++        imgdata.lens.makernotes.CurFocal = 5.0f * powf_64(2.0f, (float)LensData[i - 1] / 24.0f);\r
++        imgdata.lens.nikon.NikonEffectiveMaxAp = powf_64(2.0f, (float)LensData[i + 7] / 24.0f);\r
+       }\r
+     imgdata.lens.makernotes.LensID =\r
+       (unsigned long long) LensData[i] << 56 |\r
 @@ -7563,11 +7563,11 @@ void CLASS process_Sony_0x9050 (uchar * buf, unsigned id)
-     {
-       if (buf[0])
-         imgdata.lens.makernotes.MaxAp =
--          my_roundf(powf64(2.0f, ((float)SonySubstitution[buf[0]] / 8.0 - 1.06f) / 2.0f)*10.0f) / 10.0f;
-+          my_roundf(powf_64(2.0f, ((float)SonySubstitution[buf[0]] / 8.0 - 1.06f) / 2.0f)*10.0f) / 10.0f;
-       if (buf[1])
-         imgdata.lens.makernotes.MinAp =
--          my_roundf(powf64(2.0f, ((float)SonySubstitution[buf[1]] / 8.0 - 1.06f) / 2.0f)*10.0f) / 10.0f;
-+          my_roundf(powf_64(2.0f, ((float)SonySubstitution[buf[1]] / 8.0 - 1.06f) / 2.0f)*10.0f) / 10.0f;
-     }
-   if (imgdata.lens.makernotes.CameraMount != LIBRAW_MOUNT_FixedLens)
+     {\r
+       if (buf[0])\r
+         imgdata.lens.makernotes.MaxAp =\r
+-          my_roundf(powf64(2.0f, ((float)SonySubstitution[buf[0]] / 8.0 - 1.06f) / 2.0f)*10.0f) / 10.0f;\r
++          my_roundf(powf_64(2.0f, ((float)SonySubstitution[buf[0]] / 8.0 - 1.06f) / 2.0f)*10.0f) / 10.0f;\r
\r
+       if (buf[1])\r
+         imgdata.lens.makernotes.MinAp =\r
+-          my_roundf(powf64(2.0f, ((float)SonySubstitution[buf[1]] / 8.0 - 1.06f) / 2.0f)*10.0f) / 10.0f;\r
++          my_roundf(powf_64(2.0f, ((float)SonySubstitution[buf[1]] / 8.0 - 1.06f) / 2.0f)*10.0f) / 10.0f;\r
+     }\r
\r
+   if (imgdata.lens.makernotes.CameraMount != LIBRAW_MOUNT_FixedLens)\r
 @@ -7577,7 +7577,7 @@ void CLASS process_Sony_0x9050 (uchar * buf, unsigned id)
-           lid = SonySubstitution[buf[0x3d]] << 8 |
-             SonySubstitution[buf[0x3c]];
-           imgdata.lens.makernotes.CurAp =
--            powf64(2.0f, ((float)lid/256.0f - 16.0f) / 2.0f);
-+            powf_64(2.0f, ((float)lid/256.0f - 16.0f) / 2.0f);
-         }
-       if (buf[0x105] && (imgdata.lens.makernotes.LensMount != LIBRAW_MOUNT_Canon_EF))
-         imgdata.lens.makernotes.LensMount =
+           lid = SonySubstitution[buf[0x3d]] << 8 |\r
+             SonySubstitution[buf[0x3c]];\r
+           imgdata.lens.makernotes.CurAp =\r
+-            powf64(2.0f, ((float)lid/256.0f - 16.0f) / 2.0f);\r
++            powf_64(2.0f, ((float)lid/256.0f - 16.0f) / 2.0f);\r
+         }\r
+       if (buf[0x105] && (imgdata.lens.makernotes.LensMount != LIBRAW_MOUNT_Canon_EF))\r
+         imgdata.lens.makernotes.LensMount =\r
 @@ -7957,7 +7957,7 @@ void CLASS parse_makernote_0xc634(int base, int uptag, unsigned dng_writer)
-           {
-             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 * powf_64(2.0, (double)(cc) / 12.0 - 5.0));
-             break;
-           }
-       }
+           {\r
+             unsigned char cc;\r
+             fread(&cc, 1, 1, ifp);\r
+-            iso_speed = (int)(100.0 * powf64(2.0, (double)(cc) / 12.0 - 5.0));\r
++            iso_speed = (int)(100.0 * powf_64(2.0, (double)(cc) / 12.0 - 5.0));\r
+             break;\r
+           }\r
+       }\r
 @@ -7989,7 +7989,7 @@ void CLASS parse_makernote_0xc634(int base, int uptag, unsigned dng_writer)
-           }
-           break;
-         case 0x1002:
--          imgdata.lens.makernotes.CurAp = powf64(2.0f, getreal(type)/2);
-+          imgdata.lens.makernotes.CurAp = powf_64(2.0f, getreal(type)/2);
-           break;
-         case 0x20100201:
-           imgdata.lens.makernotes.LensID =
+           }\r
+           break;\r
+         case 0x1002:\r
+-          imgdata.lens.makernotes.CurAp = powf64(2.0f, getreal(type)/2);\r
++          imgdata.lens.makernotes.CurAp = powf_64(2.0f, getreal(type)/2);\r
+           break;\r
+         case 0x20100201:\r
+           imgdata.lens.makernotes.LensID =\r
 @@ -8009,10 +8009,10 @@ void CLASS parse_makernote_0xc634(int base, int uptag, unsigned dng_writer)
-           fread(imgdata.lens.makernotes.Lens, len, 1, ifp);
-           break;
-         case 0x20100205:
--          imgdata.lens.makernotes.MaxAp4MinFocal = powf64(sqrt(2.0f), get2() / 256.0f);
-+          imgdata.lens.makernotes.MaxAp4MinFocal = powf_64(sqrt(2.0f), get2() / 256.0f);
-           break;
-         case 0x20100206:
--          imgdata.lens.makernotes.MaxAp4MaxFocal = powf64(sqrt(2.0f), get2() / 256.0f);
-+          imgdata.lens.makernotes.MaxAp4MaxFocal = powf_64(sqrt(2.0f), get2() / 256.0f);
-           break;
-         case 0x20100207:
-           imgdata.lens.makernotes.MinFocal = (float)get2();
+           fread(imgdata.lens.makernotes.Lens, len, 1, ifp);\r
+           break;\r
+         case 0x20100205:\r
+-          imgdata.lens.makernotes.MaxAp4MinFocal = powf64(sqrt(2.0f), get2() / 256.0f);\r
++          imgdata.lens.makernotes.MaxAp4MinFocal = powf_64(sqrt(2.0f), get2() / 256.0f);\r
+           break;\r
+         case 0x20100206:\r
+-          imgdata.lens.makernotes.MaxAp4MaxFocal = powf64(sqrt(2.0f), get2() / 256.0f);\r
++          imgdata.lens.makernotes.MaxAp4MaxFocal = powf_64(sqrt(2.0f), get2() / 256.0f);\r
+           break;\r
+         case 0x20100207:\r
+           imgdata.lens.makernotes.MinFocal = (float)get2();\r
 @@ -8023,7 +8023,7 @@ void CLASS parse_makernote_0xc634(int base, int uptag, unsigned dng_writer)
-             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 = powf_64(sqrt(2.0f), get2() / 256.0f);
-           break;
-         case 0x20100301:
-           imgdata.lens.makernotes.TeleconverterID = fgetc(ifp) << 8;
+             imgdata.lens.makernotes.MaxFocal = imgdata.lens.makernotes.MinFocal;\r
+           break;\r
+         case 0x2010020a:\r
+-          imgdata.lens.makernotes.MaxAp4CurFocal = powf64(sqrt(2.0f), get2() / 256.0f);\r
++          imgdata.lens.makernotes.MaxAp4CurFocal = powf_64(sqrt(2.0f), get2() / 256.0f);\r
+           break;\r
+         case 0x20100301:\r
+           imgdata.lens.makernotes.TeleconverterID = fgetc(ifp) << 8;\r
 @@ -8121,13 +8121,13 @@ void CLASS parse_makernote_0xc634(int base, int uptag, unsigned dng_writer)
-                 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) * powf_64(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);
-+                    powf_64(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);
-+                    powf_64(2.0f, (float)((table_buf[iLensData+10] & 0x0f) + 10)/4.0f);
-                 if (
-                     (imgdata.lens.makernotes.CamID != 0x12e6c) &&     // K-r
-                     (imgdata.lens.makernotes.CamID != 0x12e76) &&     // K-5
+                 if (table_buf[iLensData+9] &&\r
+                     (fabs(imgdata.lens.makernotes.CurFocal) < 0.1f))\r
+                   imgdata.lens.makernotes.CurFocal =\r
+-                    10*(table_buf[iLensData+9]>>2) * powf64(4, (table_buf[iLensData+9] & 0x03)-2);\r
++                    10*(table_buf[iLensData+9]>>2) * powf_64(4, (table_buf[iLensData+9] & 0x03)-2);\r
+                 if (table_buf[iLensData+10] & 0xf0)\r
+                   imgdata.lens.makernotes.MaxAp4CurFocal =\r
+-                    powf64(2.0f, (float)((table_buf[iLensData+10] & 0xf0) >>4)/4.0f);\r
++                    powf_64(2.0f, (float)((table_buf[iLensData+10] & 0xf0) >>4)/4.0f);\r
+                 if (table_buf[iLensData+10] & 0x0f)\r
+                   imgdata.lens.makernotes.MinAp4CurFocal =\r
+-                    powf64(2.0f, (float)((table_buf[iLensData+10] & 0x0f) + 10)/4.0f);\r
++                    powf_64(2.0f, (float)((table_buf[iLensData+10] & 0x0f) + 10)/4.0f);\r
+                 if (\r
+                     (imgdata.lens.makernotes.CamID != 0x12e6c) &&     // K-r\r
+                     (imgdata.lens.makernotes.CamID != 0x12e76) &&     // K-5\r
 @@ -8148,14 +8148,14 @@ void CLASS parse_makernote_0xc634(int base, int uptag, unsigned dng_writer)
-                     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);
-+                        powf_64(2.0f, (float)((table_buf[iLensData+14] & 0x7f) -1)/32.0f);
-                   }
-                 else if ((imgdata.lens.makernotes.CamID != 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);
-+                      powf_64(2.0f, (float)((table_buf[iLensData+15] & 0x7f) -1)/32.0f);
-                   }
-               }
-             free(table_buf);
+                     if ((table_buf[iLensData+14] > 1) &&\r
+                         (fabs(imgdata.lens.makernotes.MaxAp4CurFocal) < 0.7f))\r
+                       imgdata.lens.makernotes.MaxAp4CurFocal =\r
+-                        powf64(2.0f, (float)((table_buf[iLensData+14] & 0x7f) -1)/32.0f);\r
++                        powf_64(2.0f, (float)((table_buf[iLensData+14] & 0x7f) -1)/32.0f);\r
+                   }\r
+                 else if ((imgdata.lens.makernotes.CamID != 0x12e76) &&        // K-5\r
+                          (table_buf[iLensData+15] > 1) &&\r
+                          (fabs(imgdata.lens.makernotes.MaxAp4CurFocal) < 0.7f))\r
+                   {\r
+                     imgdata.lens.makernotes.MaxAp4CurFocal =\r
+-                      powf64(2.0f, (float)((table_buf[iLensData+15] & 0x7f) -1)/32.0f);\r
++                      powf_64(2.0f, (float)((table_buf[iLensData+15] & 0x7f) -1)/32.0f);\r
+                   }\r
+               }\r
+             free(table_buf);\r
 @@ -8321,7 +8321,7 @@ void CLASS parse_makernote_0xc634(int base, int uptag, unsigned dng_writer)
-                   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);
-+                    powf_64(2.0f, ((float)lid/8.0f-1.0f)/2.0f);
-                 }
-               break;
-             case 1536:
+                   lid = (((ushort)table_buf[2])<<8) |\r
+                     ((ushort)table_buf[3]);\r
+                   imgdata.lens.makernotes.CurAp =\r
+-                    powf64(2.0f, ((float)lid/8.0f-1.0f)/2.0f);\r
++                    powf_64(2.0f, ((float)lid/8.0f-1.0f)/2.0f);\r
+                 }\r
+               break;\r
+             case 1536:\r
 @@ -8801,7 +8801,7 @@ void CLASS parse_makernote (int base, int uptag)
-           }
-           break;
-         case 0x1002:
--          imgdata.lens.makernotes.CurAp = powf64(2.0f, getreal(type)/2);
-+          imgdata.lens.makernotes.CurAp = powf_64(2.0f, getreal(type)/2);
-           break;
-         case 0x20100201:
-           imgdata.lens.makernotes.LensID =
+           }\r
+           break;\r
+         case 0x1002:\r
+-          imgdata.lens.makernotes.CurAp = powf64(2.0f, getreal(type)/2);\r
++          imgdata.lens.makernotes.CurAp = powf_64(2.0f, getreal(type)/2);\r
+           break;\r
+         case 0x20100201:\r
+           imgdata.lens.makernotes.LensID =\r
 @@ -8821,10 +8821,10 @@ void CLASS parse_makernote (int base, int uptag)
-           fread(imgdata.lens.makernotes.Lens, len, 1, ifp);
-           break;
-         case 0x20100205:
--          imgdata.lens.makernotes.MaxAp4MinFocal = powf64(sqrt(2.0f), get2() / 256.0f);
-+          imgdata.lens.makernotes.MaxAp4MinFocal = powf_64(sqrt(2.0f), get2() / 256.0f);
-           break;
-         case 0x20100206:
--          imgdata.lens.makernotes.MaxAp4MaxFocal = powf64(sqrt(2.0f), get2() / 256.0f);
-+          imgdata.lens.makernotes.MaxAp4MaxFocal = powf_64(sqrt(2.0f), get2() / 256.0f);
-           break;
-         case 0x20100207:
-           imgdata.lens.makernotes.MinFocal = (float)get2();
+           fread(imgdata.lens.makernotes.Lens, len, 1, ifp);\r
+           break;\r
+         case 0x20100205:\r
+-          imgdata.lens.makernotes.MaxAp4MinFocal = powf64(sqrt(2.0f), get2() / 256.0f);\r
++          imgdata.lens.makernotes.MaxAp4MinFocal = powf_64(sqrt(2.0f), get2() / 256.0f);\r
+           break;\r
+         case 0x20100206:\r
+-          imgdata.lens.makernotes.MaxAp4MaxFocal = powf64(sqrt(2.0f), get2() / 256.0f);\r
++          imgdata.lens.makernotes.MaxAp4MaxFocal = powf_64(sqrt(2.0f), get2() / 256.0f);\r
+           break;\r
+         case 0x20100207:\r
+           imgdata.lens.makernotes.MinFocal = (float)get2();\r
 @@ -8835,7 +8835,7 @@ void CLASS parse_makernote (int base, int uptag)
-             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 = powf_64(sqrt(2.0f), get2() / 256.0f);
-           break;
-         case 0x20100301:
-           imgdata.lens.makernotes.TeleconverterID = fgetc(ifp) << 8;
+             imgdata.lens.makernotes.MaxFocal = imgdata.lens.makernotes.MinFocal;\r
+           break;\r
+         case 0x2010020a:\r
+-          imgdata.lens.makernotes.MaxAp4CurFocal = powf64(sqrt(2.0f), get2() / 256.0f);\r
++          imgdata.lens.makernotes.MaxAp4CurFocal = powf_64(sqrt(2.0f), get2() / 256.0f);\r
+           break;\r
+         case 0x20100301:\r
+           imgdata.lens.makernotes.TeleconverterID = fgetc(ifp) << 8;\r
 @@ -8993,13 +8993,13 @@ void CLASS parse_makernote (int base, int uptag)
-               {
-                 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) * powf_64(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);
-+                    powf_64(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);
-+                    powf_64(2.0f, (float)((table_buf[iLensData+10] & 0x0f) + 10)/4.0f);
-                 if (
-                     (imgdata.lens.makernotes.CamID != 0x12e6c) &&     // K-r
-                     (imgdata.lens.makernotes.CamID != 0x12e76) &&     // K-5
+               {\r
+                 if (table_buf[iLensData+9] && (fabs(imgdata.lens.makernotes.CurFocal) < 0.1f))\r
+                   imgdata.lens.makernotes.CurFocal =\r
+-                    10*(table_buf[iLensData+9]>>2) * powf64(4, (table_buf[iLensData+9] & 0x03)-2);\r
++                    10*(table_buf[iLensData+9]>>2) * powf_64(4, (table_buf[iLensData+9] & 0x03)-2);\r
+                 if (table_buf[iLensData+10] & 0xf0)\r
+                   imgdata.lens.makernotes.MaxAp4CurFocal =\r
+-                    powf64(2.0f, (float)((table_buf[iLensData+10] & 0xf0) >>4)/4.0f);\r
++                    powf_64(2.0f, (float)((table_buf[iLensData+10] & 0xf0) >>4)/4.0f);\r
+                 if (table_buf[iLensData+10] & 0x0f)\r
+                   imgdata.lens.makernotes.MinAp4CurFocal =\r
+-                    powf64(2.0f, (float)((table_buf[iLensData+10] & 0x0f) + 10)/4.0f);\r
++                    powf_64(2.0f, (float)((table_buf[iLensData+10] & 0x0f) + 10)/4.0f);\r
+                 if (\r
+                     (imgdata.lens.makernotes.CamID != 0x12e6c) &&     // K-r\r
+                     (imgdata.lens.makernotes.CamID != 0x12e76) &&     // K-5\r
 @@ -9020,14 +9020,14 @@ void CLASS parse_makernote (int base, int uptag)
-                     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);
-+                        powf_64(2.0f, (float)((table_buf[iLensData+14] & 0x7f) -1)/32.0f);
-                   }
-                 else if ((imgdata.lens.makernotes.CamID != 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);
-+                      powf_64(2.0f, (float)((table_buf[iLensData+15] & 0x7f) -1)/32.0f);
-                   }
-               }
-             free(table_buf);
+                     if ((table_buf[iLensData+14] > 1) &&\r
+                         (fabs(imgdata.lens.makernotes.MaxAp4CurFocal) < 0.7f))\r
+                       imgdata.lens.makernotes.MaxAp4CurFocal =\r
+-                        powf64(2.0f, (float)((table_buf[iLensData+14] & 0x7f) -1)/32.0f);\r
++                        powf_64(2.0f, (float)((table_buf[iLensData+14] & 0x7f) -1)/32.0f);\r
+                   }\r
+                 else if ((imgdata.lens.makernotes.CamID != 0x12e76) &&        // K-5\r
+                          (table_buf[iLensData+15] > 1) &&\r
+                          (fabs(imgdata.lens.makernotes.MaxAp4CurFocal) < 0.7f))\r
+                   {\r
+                     imgdata.lens.makernotes.MaxAp4CurFocal =\r
+-                      powf64(2.0f, (float)((table_buf[iLensData+15] & 0x7f) -1)/32.0f);\r
++                      powf_64(2.0f, (float)((table_buf[iLensData+15] & 0x7f) -1)/32.0f);\r
+                   }\r
+               }\r
+             free(table_buf);\r
 @@ -9188,7 +9188,7 @@ void CLASS parse_makernote (int base, int uptag)
-                   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);
-+                    powf_64(2.0f, ((float)lid/8.0f-1.0f)/2.0f);
-                 }
-               break;
-             case 1536:
+                   lid = (((ushort)table_buf[2])<<8) |\r
+                     ((ushort)table_buf[3]);\r
+                   imgdata.lens.makernotes.CurAp =\r
+-                    powf64(2.0f, ((float)lid/8.0f-1.0f)/2.0f);\r
++                    powf_64(2.0f, ((float)lid/8.0f-1.0f)/2.0f);\r
+                 }\r
+               break;\r
+             case 1536:\r
 @@ -9273,15 +9273,15 @@ void CLASS parse_makernote (int base, int uptag)
-       {
-         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 * powf_64(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 * powf_64(2.0, i/32.0 - 4);
-       if ((i=(get2(),get2())) != 0x7fff && !aperture)
--      aperture = powf64(2.0, i/64.0);
-+      aperture = powf_64(2.0, i/64.0);
-       if ((i=get2()) != 0xffff && !shutter)
--      shutter = powf64(2.0, (short) i/-32.0);
-+      shutter = powf_64(2.0, (short) i/-32.0);
-       wbi = (get2(),get2());
-       shot_order = (get2(),get2());
-     }
+       {\r
+         unsigned char cc;\r
+         fread(&cc,1,1,ifp);\r
+-        iso_speed = int(100.0 * powf64(2.0f,float(cc)/12.0-5.0));\r
++        iso_speed = int(100.0 * powf_64(2.0f,float(cc)/12.0-5.0));\r
+       }\r
+     if (tag == 4 && len > 26 && len < 35) {\r
+       if ((i=(get4(),get2())) != 0x7fff && (!iso_speed || iso_speed == 65535))\r
+-      iso_speed = 50 * powf64(2.0, i/32.0 - 4);\r
++      iso_speed = 50 * powf_64(2.0, i/32.0 - 4);\r
+       if ((i=(get2(),get2())) != 0x7fff && !aperture)\r
+-      aperture = powf64(2.0, i/64.0);\r
++      aperture = powf_64(2.0, i/64.0);\r
+       if ((i=get2()) != 0xffff && !shutter)\r
+-      shutter = powf64(2.0, (short) i/-32.0);\r
++      shutter = powf_64(2.0, (short) i/-32.0);\r
+       wbi = (get2(),get2());\r
+       shot_order = (get2(),get2());\r
+     }\r
 @@ -9732,7 +9732,7 @@ void CLASS parse_exif (int base)
-         imgdata.lens.Lens[0] = 0;
-       break;
-     case 0x9205:
--      imgdata.lens.EXIF_MaxAp = powf64(2.0f, (getreal(type) / 2.0f));
-+      imgdata.lens.EXIF_MaxAp = powf_64(2.0f, (getreal(type) / 2.0f));
-       break;
- #endif
-       case 33434:  shutter = getreal(type);           break;
+         imgdata.lens.Lens[0] = 0;\r
+       break;\r
+     case 0x9205:\r
+-      imgdata.lens.EXIF_MaxAp = powf64(2.0f, (getreal(type) / 2.0f));\r
++      imgdata.lens.EXIF_MaxAp = powf_64(2.0f, (getreal(type) / 2.0f));\r
+       break;\r
+ #endif\r
+       case 33434:  shutter = getreal(type);           break;\r
 @@ -9745,10 +9745,10 @@ void CLASS parse_exif (int base)
-       case 36867:
-       case 36868:  get_timestamp(0);                  break;
-       case 37377:  if ((expo = -getreal(type)) < 128 && shutter == 0.)
--          shutter = powf64(2.0, expo);                break;
-+          shutter = powf_64(2.0, expo);               break;
-       case 37378:
-         if (fabs(ape = getreal(type))<256.0)
--          aperture = powf64(2.0, ape/2);
-+          aperture = powf_64(2.0, ape/2);
-         break;
-       case 37385:  flash_used = getreal(type);          break;
-       case 37386:  focal_len = getreal(type);         break;
+       case 36867:\r
+       case 36868:  get_timestamp(0);                  break;\r
+       case 37377:  if ((expo = -getreal(type)) < 128 && shutter == 0.)\r
+-          shutter = powf64(2.0, expo);                break;\r
++          shutter = powf_64(2.0, expo);               break;\r
+       case 37378:\r
+         if (fabs(ape = getreal(type))<256.0)\r
+-          aperture = powf64(2.0, ape/2);\r
++          aperture = powf_64(2.0, ape/2);\r
+         break;\r
+       case 37385:  flash_used = getreal(type);          break;\r
+       case 37386:  focal_len = getreal(type);         break;\r
 @@ -10361,7 +10361,7 @@ int CLASS parse_tiff_ifd (int base)
-         imgdata.lens.Lens[0] = 0;
-       break;
-     case 0x9205:
--                              imgdata.lens.EXIF_MaxAp = powf64(2.0f, (getreal(type) / 2.0f));
-+                              imgdata.lens.EXIF_MaxAp = powf_64(2.0f, (getreal(type) / 2.0f));
-       break;
- // IB end
- #endif
+         imgdata.lens.Lens[0] = 0;\r
+       break;\r
+     case 0x9205:\r
+-                              imgdata.lens.EXIF_MaxAp = powf64(2.0f, (getreal(type) / 2.0f));\r
++                              imgdata.lens.EXIF_MaxAp = powf_64(2.0f, (getreal(type) / 2.0f));\r
+       break;\r
+ // IB end\r
+ #endif\r
 @@ -11130,22 +11130,22 @@ void CLASS parse_ciff (int offset, int length, int depth)
-       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 = powf_64(2.0f, -int_to_float((get4(),get4())));
-+      aperture = powf_64(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 = powf_64(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  = powf_64(2.0, (get2(),(short)get2())/64.0);
- #endif
--      shutter   = powf64(2.0,-((short)get2())/32.0);
-+      shutter   = powf_64(2.0,-((short)get2())/32.0);
-       wbi = (get2(),get2());
-       if (wbi > 17) wbi = 0;
-       fseek (ifp, 32, SEEK_CUR);
+       thumb_length = len;\r
+     }\r
+     if (type == 0x1818) {\r
+-      shutter = powf64(2.0f, -int_to_float((get4(),get4())));\r
+-      aperture = powf64(2.0f, int_to_float(get4())/2);\r
++      shutter = powf_64(2.0f, -int_to_float((get4(),get4())));\r
++      aperture = powf_64(2.0f, int_to_float(get4())/2);\r
+ #ifdef LIBRAW_LIBRARY_BUILD\r
+                       imgdata.lens.makernotes.CurAp = aperture;\r
+ #endif\r
+     }\r
+     if (type == 0x102a) {\r
+                       //      iso_speed = pow (2.0, (get4(),get2())/32.0 - 4) * 50;\r
+-      iso_speed = powf64(2.0f, ((get2(),get2()) + get2())/32.0f - 5.0f) * 100.0f;\r
++      iso_speed = powf_64(2.0f, ((get2(),get2()) + get2())/32.0f - 5.0f) * 100.0f;\r
+ #ifdef LIBRAW_LIBRARY_BUILD\r
+       aperture  = _CanonConvertAperture((get2(),get2()));\r
+       imgdata.lens.makernotes.CurAp = aperture;\r
+ #else\r
+-      aperture  = powf64(2.0, (get2(),(short)get2())/64.0);\r
++      aperture  = powf_64(2.0, (get2(),(short)get2())/64.0);\r
+ #endif\r
+-      shutter   = powf64(2.0,-((short)get2())/32.0);\r
++      shutter   = powf_64(2.0,-((short)get2())/32.0);\r
+       wbi = (get2(),get2());\r
+       if (wbi > 17) wbi = 0;\r
+       fseek (ifp, 32, SEEK_CUR);\r
 @@ -11349,8 +11349,8 @@ void CLASS parse_phase_one (int base)
-       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 =  powf_64(2.0f, (int_to_float(data)/2.0f));
-+      else imgdata.lens.makernotes.CurAp = powf_64(2.0f, (getreal(type)/2.0f));
-       break;
-     case 0x0403:
-       if (type == 4) imgdata.lens.makernotes.CurFocal =  int_to_float(data);
+       setPhaseOneFeatures(unique_id);\r
+       break;\r
+     case 0x0401:\r
+-      if (type == 4) imgdata.lens.makernotes.CurAp =  powf64(2.0f, (int_to_float(data)/2.0f));\r
+-      else imgdata.lens.makernotes.CurAp = powf64(2.0f, (getreal(type)/2.0f));\r
++      if (type == 4) imgdata.lens.makernotes.CurAp =  powf_64(2.0f, (int_to_float(data)/2.0f));\r
++      else imgdata.lens.makernotes.CurAp = powf_64(2.0f, (getreal(type)/2.0f));\r
+       break;\r
+     case 0x0403:\r
+       if (type == 4) imgdata.lens.makernotes.CurFocal =  int_to_float(data);\r
 @@ -11364,16 +11364,16 @@ void CLASS parse_phase_one (int base)
-       break;
-     case 0x0414:
-       if (type == 4) {
--              imgdata.lens.makernotes.MaxAp4CurFocal = powf64(2.0f, (int_to_float(data)/2.0f));
-+              imgdata.lens.makernotes.MaxAp4CurFocal = powf_64(2.0f, (int_to_float(data)/2.0f));
-       } else {
--        imgdata.lens.makernotes.MaxAp4CurFocal = powf64(2.0f, (getreal(type) / 2.0f));
-+        imgdata.lens.makernotes.MaxAp4CurFocal = powf_64(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 = powf_64(2.0f, (int_to_float(data)/2.0f));
-       } else {
--        imgdata.lens.makernotes.MinAp4CurFocal = powf64(2.0f, (getreal(type) / 2.0f));
-+        imgdata.lens.makernotes.MinAp4CurFocal = powf_64(2.0f, (getreal(type) / 2.0f));
-       }
-       break;
-     case 0x0416:
+       break;\r
+     case 0x0414:\r
+       if (type == 4) {\r
+-              imgdata.lens.makernotes.MaxAp4CurFocal = powf64(2.0f, (int_to_float(data)/2.0f));\r
++              imgdata.lens.makernotes.MaxAp4CurFocal = powf_64(2.0f, (int_to_float(data)/2.0f));\r
+       } else {\r
+-        imgdata.lens.makernotes.MaxAp4CurFocal = powf64(2.0f, (getreal(type) / 2.0f));\r
++        imgdata.lens.makernotes.MaxAp4CurFocal = powf_64(2.0f, (getreal(type) / 2.0f));\r
+       }\r
+       break;\r
+     case 0x0415:\r
+       if (type == 4) {\r
+-              imgdata.lens.makernotes.MinAp4CurFocal = powf64(2.0f, (int_to_float(data)/2.0f));\r
++              imgdata.lens.makernotes.MinAp4CurFocal = powf_64(2.0f, (int_to_float(data)/2.0f));\r
+       } else {\r
+-        imgdata.lens.makernotes.MinAp4CurFocal = powf64(2.0f, (getreal(type) / 2.0f));\r
++        imgdata.lens.makernotes.MinAp4CurFocal = powf_64(2.0f, (getreal(type) / 2.0f));\r
+       }\r
+       break;\r
+     case 0x0416:\r
 @@ -13324,15 +13324,15 @@ void CLASS identify()
-       case 18: iso_speed = 320; break;
-       case 19: iso_speed = 400; break;
-     }
--    shutter = powf64(2.0f, (((float)get4())/8.0f)) / 16000.0f;
-+    shutter = powf_64(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 = powf_64(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 = powf_64(2.0f, ((float)get4())/16.0f);
-     fseek (ifp, 124, SEEK_SET);
-     fread(imgdata.lens.makernotes.Lens, 32, 1, ifp);
-     imgdata.lens.makernotes.CameraMount = LIBRAW_MOUNT_Contax_N;
+       case 18: iso_speed = 320; break;\r
+       case 19: iso_speed = 400; break;\r
+     }\r
+-    shutter = powf64(2.0f, (((float)get4())/8.0f)) / 16000.0f;\r
++    shutter = powf_64(2.0f, (((float)get4())/8.0f)) / 16000.0f;\r
+     FORC4 cam_mul[c ^ (c >> 1)] = get4();\r
+     fseek (ifp, 88, SEEK_SET);\r
+-    aperture = powf64(2.0f, ((float)get4())/16.0f);\r
++    aperture = powf_64(2.0f, ((float)get4())/16.0f);\r
+     fseek (ifp, 112, SEEK_SET);\r
+     focal_len = get4();\r
+ #ifdef LIBRAW_LIBRARY_BUILD\r
+     fseek (ifp, 104, SEEK_SET);\r
+-    imgdata.lens.makernotes.MaxAp4CurFocal = powf64(2.0f, ((float)get4())/16.0f);\r
++    imgdata.lens.makernotes.MaxAp4CurFocal = powf_64(2.0f, ((float)get4())/16.0f);\r
+     fseek (ifp, 124, SEEK_SET);\r
+     fread(imgdata.lens.makernotes.Lens, 32, 1, ifp);\r
+     imgdata.lens.makernotes.CameraMount = LIBRAW_MOUNT_Contax_N;\r
 diff --git a/Source/LibRawLite/internal/dcraw_common.cpp b/Source/LibRawLite/internal/dcraw_common.cpp
 index a936a93..0fc4d81 100644
 --- a/Source/LibRawLite/internal/dcraw_common.cpp
 +++ b/Source/LibRawLite/internal/dcraw_common.cpp
 @@ -5543,7 +5543,7 @@ static float powf_lim(float a, float b, float limup)
- {
-   return (b>limup || b < -limup)?0.f:powf(a,b);
- }
--static float powf64(float a, float b)
-+static float powf_64(float a, float b)
- {
-   return powf_lim(a,b,64.f);
- }
+ {\r
+   return (b>limup || b < -limup)?0.f:powf(a,b);\r
+ }\r
+-static float powf64(float a, float b)\r
++static float powf_64(float a, float b)\r
+ {\r
+   return powf_lim(a,b,64.f);\r
+ }\r
 @@ -5580,7 +5580,7 @@ static float _CanonConvert2EV(short in)
- static float _CanonConvertAperture(short in)
- {
-   if (in == (short)0xffe0) return 0.0f;
--  else return powf64(2.0f, _CanonConvert2EV(in) / 2.0f);
-+  else return powf_64(2.0f, _CanonConvert2EV(in) / 2.0f);
- }
- void CLASS setCanonBodyFeatures (unsigned id)
+ static float _CanonConvertAperture(short in)\r
+ {\r
+   if (in == (short)0xffe0) return 0.0f;\r
+-  else return powf64(2.0f, _CanonConvert2EV(in) / 2.0f);\r
++  else return powf_64(2.0f, _CanonConvert2EV(in) / 2.0f);\r
+ }\r
\r
+ void CLASS setCanonBodyFeatures (unsigned id)\r
 @@ -5862,15 +5862,15 @@ void CLASS processNikonLensData (uchar *LensData, unsigned len)
-     imgdata.lens.nikon.NikonLensIDNumber = LensData[i];
-     imgdata.lens.nikon.NikonLensFStops = LensData[i + 1];
-     imgdata.lens.makernotes.LensFStops = (float)imgdata.lens.nikon.NikonLensFStops /12.0f;
--    imgdata.lens.makernotes.MinFocal = 5.0f * powf64(2.0f, (float)LensData[i + 2] / 24.0f);
--    imgdata.lens.makernotes.MaxFocal = 5.0f * powf64(2.0f, (float)LensData[i + 3] / 24.0f);
--    imgdata.lens.makernotes.MaxAp4MinFocal = powf64(2.0f, (float)LensData[i + 4] / 24.0f);
--    imgdata.lens.makernotes.MaxAp4MaxFocal = powf64(2.0f, (float)LensData[i + 5] / 24.0f);
-+    imgdata.lens.makernotes.MinFocal = 5.0f * powf_64(2.0f, (float)LensData[i + 2] / 24.0f);
-+    imgdata.lens.makernotes.MaxFocal = 5.0f * powf_64(2.0f, (float)LensData[i + 3] / 24.0f);
-+    imgdata.lens.makernotes.MaxAp4MinFocal = powf_64(2.0f, (float)LensData[i + 4] / 24.0f);
-+    imgdata.lens.makernotes.MaxAp4MaxFocal = powf_64(2.0f, (float)LensData[i + 5] / 24.0f);
-     imgdata.lens.nikon.NikonMCUVersion = LensData[i + 6];
-     if (i != 2)
-       {
--        imgdata.lens.makernotes.CurFocal = 5.0f * powf64(2.0f, (float)LensData[i - 1] / 24.0f);
--        imgdata.lens.nikon.NikonEffectiveMaxAp = powf64(2.0f, (float)LensData[i + 7] / 24.0f);
-+        imgdata.lens.makernotes.CurFocal = 5.0f * powf_64(2.0f, (float)LensData[i - 1] / 24.0f);
-+        imgdata.lens.nikon.NikonEffectiveMaxAp = powf_64(2.0f, (float)LensData[i + 7] / 24.0f);
-       }
-     imgdata.lens.makernotes.LensID =
-       (unsigned long long) LensData[i] << 56 |
+     imgdata.lens.nikon.NikonLensIDNumber = LensData[i];\r
+     imgdata.lens.nikon.NikonLensFStops = LensData[i + 1];\r
+     imgdata.lens.makernotes.LensFStops = (float)imgdata.lens.nikon.NikonLensFStops /12.0f;\r
+-    imgdata.lens.makernotes.MinFocal = 5.0f * powf64(2.0f, (float)LensData[i + 2] / 24.0f);\r
+-    imgdata.lens.makernotes.MaxFocal = 5.0f * powf64(2.0f, (float)LensData[i + 3] / 24.0f);\r
+-    imgdata.lens.makernotes.MaxAp4MinFocal = powf64(2.0f, (float)LensData[i + 4] / 24.0f);\r
+-    imgdata.lens.makernotes.MaxAp4MaxFocal = powf64(2.0f, (float)LensData[i + 5] / 24.0f);\r
++    imgdata.lens.makernotes.MinFocal = 5.0f * powf_64(2.0f, (float)LensData[i + 2] / 24.0f);\r
++    imgdata.lens.makernotes.MaxFocal = 5.0f * powf_64(2.0f, (float)LensData[i + 3] / 24.0f);\r
++    imgdata.lens.makernotes.MaxAp4MinFocal = powf_64(2.0f, (float)LensData[i + 4] / 24.0f);\r
++    imgdata.lens.makernotes.MaxAp4MaxFocal = powf_64(2.0f, (float)LensData[i + 5] / 24.0f);\r
+     imgdata.lens.nikon.NikonMCUVersion = LensData[i + 6];\r
+     if (i != 2)\r
+       {\r
+-        imgdata.lens.makernotes.CurFocal = 5.0f * powf64(2.0f, (float)LensData[i - 1] / 24.0f);\r
+-        imgdata.lens.nikon.NikonEffectiveMaxAp = powf64(2.0f, (float)LensData[i + 7] / 24.0f);\r
++        imgdata.lens.makernotes.CurFocal = 5.0f * powf_64(2.0f, (float)LensData[i - 1] / 24.0f);\r
++        imgdata.lens.nikon.NikonEffectiveMaxAp = powf_64(2.0f, (float)LensData[i + 7] / 24.0f);\r
+       }\r
+     imgdata.lens.makernotes.LensID =\r
+       (unsigned long long) LensData[i] << 56 |\r
 @@ -6379,11 +6379,11 @@ void CLASS process_Sony_0x9050 (uchar * buf, unsigned id)
-     {
-       if (buf[0])
-         imgdata.lens.makernotes.MaxAp =
--          my_roundf(powf64(2.0f, ((float)SonySubstitution[buf[0]] / 8.0 - 1.06f) / 2.0f)*10.0f) / 10.0f;
-+          my_roundf(powf_64(2.0f, ((float)SonySubstitution[buf[0]] / 8.0 - 1.06f) / 2.0f)*10.0f) / 10.0f;
-       if (buf[1])
-         imgdata.lens.makernotes.MinAp =
--          my_roundf(powf64(2.0f, ((float)SonySubstitution[buf[1]] / 8.0 - 1.06f) / 2.0f)*10.0f) / 10.0f;
-+          my_roundf(powf_64(2.0f, ((float)SonySubstitution[buf[1]] / 8.0 - 1.06f) / 2.0f)*10.0f) / 10.0f;
-     }
-   if (imgdata.lens.makernotes.CameraMount != LIBRAW_MOUNT_FixedLens)
+     {\r
+       if (buf[0])\r
+         imgdata.lens.makernotes.MaxAp =\r
+-          my_roundf(powf64(2.0f, ((float)SonySubstitution[buf[0]] / 8.0 - 1.06f) / 2.0f)*10.0f) / 10.0f;\r
++          my_roundf(powf_64(2.0f, ((float)SonySubstitution[buf[0]] / 8.0 - 1.06f) / 2.0f)*10.0f) / 10.0f;\r
\r
+       if (buf[1])\r
+         imgdata.lens.makernotes.MinAp =\r
+-          my_roundf(powf64(2.0f, ((float)SonySubstitution[buf[1]] / 8.0 - 1.06f) / 2.0f)*10.0f) / 10.0f;\r
++          my_roundf(powf_64(2.0f, ((float)SonySubstitution[buf[1]] / 8.0 - 1.06f) / 2.0f)*10.0f) / 10.0f;\r
+     }\r
\r
+   if (imgdata.lens.makernotes.CameraMount != LIBRAW_MOUNT_FixedLens)\r
 @@ -6393,7 +6393,7 @@ void CLASS process_Sony_0x9050 (uchar * buf, unsigned id)
-           lid = SonySubstitution[buf[0x3d]] << 8 |
-             SonySubstitution[buf[0x3c]];
-           imgdata.lens.makernotes.CurAp =
--            powf64(2.0f, ((float)lid/256.0f - 16.0f) / 2.0f);
-+            powf_64(2.0f, ((float)lid/256.0f - 16.0f) / 2.0f);
-         }
-       if (buf[0x105] && (imgdata.lens.makernotes.LensMount != LIBRAW_MOUNT_Canon_EF))
-         imgdata.lens.makernotes.LensMount =
+           lid = SonySubstitution[buf[0x3d]] << 8 |\r
+             SonySubstitution[buf[0x3c]];\r
+           imgdata.lens.makernotes.CurAp =\r
+-            powf64(2.0f, ((float)lid/256.0f - 16.0f) / 2.0f);\r
++            powf_64(2.0f, ((float)lid/256.0f - 16.0f) / 2.0f);\r
+         }\r
+       if (buf[0x105] && (imgdata.lens.makernotes.LensMount != LIBRAW_MOUNT_Canon_EF))\r
+         imgdata.lens.makernotes.LensMount =\r
 @@ -6773,7 +6773,7 @@ void CLASS parse_makernote_0xc634(int base, int uptag, unsigned dng_writer)
-           {
-             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 * powf_64(2.0, (double)(cc) / 12.0 - 5.0));
-             break;
-           }
-       }
+           {\r
+             unsigned char cc;\r
+             fread(&cc, 1, 1, ifp);\r
+-            iso_speed = (int)(100.0 * powf64(2.0, (double)(cc) / 12.0 - 5.0));\r
++            iso_speed = (int)(100.0 * powf_64(2.0, (double)(cc) / 12.0 - 5.0));\r
+             break;\r
+           }\r
+       }\r
 @@ -6805,7 +6805,7 @@ void CLASS parse_makernote_0xc634(int base, int uptag, unsigned dng_writer)
-           }
-           break;
-         case 0x1002:
--          imgdata.lens.makernotes.CurAp = powf64(2.0f, getreal(type)/2);
-+          imgdata.lens.makernotes.CurAp = powf_64(2.0f, getreal(type)/2);
-           break;
-         case 0x20100201:
-           imgdata.lens.makernotes.LensID =
+           }\r
+           break;\r
+         case 0x1002:\r
+-          imgdata.lens.makernotes.CurAp = powf64(2.0f, getreal(type)/2);\r
++          imgdata.lens.makernotes.CurAp = powf_64(2.0f, getreal(type)/2);\r
+           break;\r
+         case 0x20100201:\r
+           imgdata.lens.makernotes.LensID =\r
 @@ -6825,10 +6825,10 @@ void CLASS parse_makernote_0xc634(int base, int uptag, unsigned dng_writer)
-           fread(imgdata.lens.makernotes.Lens, len, 1, ifp);
-           break;
-         case 0x20100205:
--          imgdata.lens.makernotes.MaxAp4MinFocal = powf64(sqrt(2.0f), get2() / 256.0f);
-+          imgdata.lens.makernotes.MaxAp4MinFocal = powf_64(sqrt(2.0f), get2() / 256.0f);
-           break;
-         case 0x20100206:
--          imgdata.lens.makernotes.MaxAp4MaxFocal = powf64(sqrt(2.0f), get2() / 256.0f);
-+          imgdata.lens.makernotes.MaxAp4MaxFocal = powf_64(sqrt(2.0f), get2() / 256.0f);
-           break;
-         case 0x20100207:
-           imgdata.lens.makernotes.MinFocal = (float)get2();
+           fread(imgdata.lens.makernotes.Lens, len, 1, ifp);\r
+           break;\r
+         case 0x20100205:\r
+-          imgdata.lens.makernotes.MaxAp4MinFocal = powf64(sqrt(2.0f), get2() / 256.0f);\r
++          imgdata.lens.makernotes.MaxAp4MinFocal = powf_64(sqrt(2.0f), get2() / 256.0f);\r
+           break;\r
+         case 0x20100206:\r
+-          imgdata.lens.makernotes.MaxAp4MaxFocal = powf64(sqrt(2.0f), get2() / 256.0f);\r
++          imgdata.lens.makernotes.MaxAp4MaxFocal = powf_64(sqrt(2.0f), get2() / 256.0f);\r
+           break;\r
+         case 0x20100207:\r
+           imgdata.lens.makernotes.MinFocal = (float)get2();\r
 @@ -6839,7 +6839,7 @@ void CLASS parse_makernote_0xc634(int base, int uptag, unsigned dng_writer)
-             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 = powf_64(sqrt(2.0f), get2() / 256.0f);
-           break;
-         case 0x20100301:
-           imgdata.lens.makernotes.TeleconverterID = fgetc(ifp) << 8;
+             imgdata.lens.makernotes.MaxFocal = imgdata.lens.makernotes.MinFocal;\r
+           break;\r
+         case 0x2010020a:\r
+-          imgdata.lens.makernotes.MaxAp4CurFocal = powf64(sqrt(2.0f), get2() / 256.0f);\r
++          imgdata.lens.makernotes.MaxAp4CurFocal = powf_64(sqrt(2.0f), get2() / 256.0f);\r
+           break;\r
+         case 0x20100301:\r
+           imgdata.lens.makernotes.TeleconverterID = fgetc(ifp) << 8;\r
 @@ -6937,13 +6937,13 @@ void CLASS parse_makernote_0xc634(int base, int uptag, unsigned dng_writer)
-                 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) * powf_64(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);
-+                    powf_64(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);
-+                    powf_64(2.0f, (float)((table_buf[iLensData+10] & 0x0f) + 10)/4.0f);
-                 if (
-                     (imgdata.lens.makernotes.CamID != 0x12e6c) &&     // K-r
-                     (imgdata.lens.makernotes.CamID != 0x12e76) &&     // K-5
+                 if (table_buf[iLensData+9] &&\r
+                     (fabs(imgdata.lens.makernotes.CurFocal) < 0.1f))\r
+                   imgdata.lens.makernotes.CurFocal =\r
+-                    10*(table_buf[iLensData+9]>>2) * powf64(4, (table_buf[iLensData+9] & 0x03)-2);\r
++                    10*(table_buf[iLensData+9]>>2) * powf_64(4, (table_buf[iLensData+9] & 0x03)-2);\r
+                 if (table_buf[iLensData+10] & 0xf0)\r
+                   imgdata.lens.makernotes.MaxAp4CurFocal =\r
+-                    powf64(2.0f, (float)((table_buf[iLensData+10] & 0xf0) >>4)/4.0f);\r
++                    powf_64(2.0f, (float)((table_buf[iLensData+10] & 0xf0) >>4)/4.0f);\r
+                 if (table_buf[iLensData+10] & 0x0f)\r
+                   imgdata.lens.makernotes.MinAp4CurFocal =\r
+-                    powf64(2.0f, (float)((table_buf[iLensData+10] & 0x0f) + 10)/4.0f);\r
++                    powf_64(2.0f, (float)((table_buf[iLensData+10] & 0x0f) + 10)/4.0f);\r
+                 if (\r
+                     (imgdata.lens.makernotes.CamID != 0x12e6c) &&     // K-r\r
+                     (imgdata.lens.makernotes.CamID != 0x12e76) &&     // K-5\r
 @@ -6964,14 +6964,14 @@ void CLASS parse_makernote_0xc634(int base, int uptag, unsigned dng_writer)
-                     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);
-+                        powf_64(2.0f, (float)((table_buf[iLensData+14] & 0x7f) -1)/32.0f);
-                   }
-                 else if ((imgdata.lens.makernotes.CamID != 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);
-+                      powf_64(2.0f, (float)((table_buf[iLensData+15] & 0x7f) -1)/32.0f);
-                   }
-               }
-             free(table_buf);
+                     if ((table_buf[iLensData+14] > 1) &&\r
+                         (fabs(imgdata.lens.makernotes.MaxAp4CurFocal) < 0.7f))\r
+                       imgdata.lens.makernotes.MaxAp4CurFocal =\r
+-                        powf64(2.0f, (float)((table_buf[iLensData+14] & 0x7f) -1)/32.0f);\r
++                        powf_64(2.0f, (float)((table_buf[iLensData+14] & 0x7f) -1)/32.0f);\r
+                   }\r
+                 else if ((imgdata.lens.makernotes.CamID != 0x12e76) &&        // K-5\r
+                          (table_buf[iLensData+15] > 1) &&\r
+                          (fabs(imgdata.lens.makernotes.MaxAp4CurFocal) < 0.7f))\r
+                   {\r
+                     imgdata.lens.makernotes.MaxAp4CurFocal =\r
+-                      powf64(2.0f, (float)((table_buf[iLensData+15] & 0x7f) -1)/32.0f);\r
++                      powf_64(2.0f, (float)((table_buf[iLensData+15] & 0x7f) -1)/32.0f);\r
+                   }\r
+               }\r
+             free(table_buf);\r
 @@ -7137,7 +7137,7 @@ void CLASS parse_makernote_0xc634(int base, int uptag, unsigned dng_writer)
-                   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);
-+                    powf_64(2.0f, ((float)lid/8.0f-1.0f)/2.0f);
-                 }
-               break;
-             case 1536:
+                   lid = (((ushort)table_buf[2])<<8) |\r
+                     ((ushort)table_buf[3]);\r
+                   imgdata.lens.makernotes.CurAp =\r
+-                    powf64(2.0f, ((float)lid/8.0f-1.0f)/2.0f);\r
++                    powf_64(2.0f, ((float)lid/8.0f-1.0f)/2.0f);\r
+                 }\r
+               break;\r
+             case 1536:\r
 @@ -7617,7 +7617,7 @@ void CLASS parse_makernote (int base, int uptag)
-           }
-           break;
-         case 0x1002:
--          imgdata.lens.makernotes.CurAp = powf64(2.0f, getreal(type)/2);
-+          imgdata.lens.makernotes.CurAp = powf_64(2.0f, getreal(type)/2);
-           break;
-         case 0x20100201:
-           imgdata.lens.makernotes.LensID =
+           }\r
+           break;\r
+         case 0x1002:\r
+-          imgdata.lens.makernotes.CurAp = powf64(2.0f, getreal(type)/2);\r
++          imgdata.lens.makernotes.CurAp = powf_64(2.0f, getreal(type)/2);\r
+           break;\r
+         case 0x20100201:\r
+           imgdata.lens.makernotes.LensID =\r
 @@ -7637,10 +7637,10 @@ void CLASS parse_makernote (int base, int uptag)
-           fread(imgdata.lens.makernotes.Lens, len, 1, ifp);
-           break;
-         case 0x20100205:
--          imgdata.lens.makernotes.MaxAp4MinFocal = powf64(sqrt(2.0f), get2() / 256.0f);
-+          imgdata.lens.makernotes.MaxAp4MinFocal = powf_64(sqrt(2.0f), get2() / 256.0f);
-           break;
-         case 0x20100206:
--          imgdata.lens.makernotes.MaxAp4MaxFocal = powf64(sqrt(2.0f), get2() / 256.0f);
-+          imgdata.lens.makernotes.MaxAp4MaxFocal = powf_64(sqrt(2.0f), get2() / 256.0f);
-           break;
-         case 0x20100207:
-           imgdata.lens.makernotes.MinFocal = (float)get2();
+           fread(imgdata.lens.makernotes.Lens, len, 1, ifp);\r
+           break;\r
+         case 0x20100205:\r
+-          imgdata.lens.makernotes.MaxAp4MinFocal = powf64(sqrt(2.0f), get2() / 256.0f);\r
++          imgdata.lens.makernotes.MaxAp4MinFocal = powf_64(sqrt(2.0f), get2() / 256.0f);\r
+           break;\r
+         case 0x20100206:\r
+-          imgdata.lens.makernotes.MaxAp4MaxFocal = powf64(sqrt(2.0f), get2() / 256.0f);\r
++          imgdata.lens.makernotes.MaxAp4MaxFocal = powf_64(sqrt(2.0f), get2() / 256.0f);\r
+           break;\r
+         case 0x20100207:\r
+           imgdata.lens.makernotes.MinFocal = (float)get2();\r
 @@ -7651,7 +7651,7 @@ void CLASS parse_makernote (int base, int uptag)
-             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 = powf_64(sqrt(2.0f), get2() / 256.0f);
-           break;
-         case 0x20100301:
-           imgdata.lens.makernotes.TeleconverterID = fgetc(ifp) << 8;
+             imgdata.lens.makernotes.MaxFocal = imgdata.lens.makernotes.MinFocal;\r
+           break;\r
+         case 0x2010020a:\r
+-          imgdata.lens.makernotes.MaxAp4CurFocal = powf64(sqrt(2.0f), get2() / 256.0f);\r
++          imgdata.lens.makernotes.MaxAp4CurFocal = powf_64(sqrt(2.0f), get2() / 256.0f);\r
+           break;\r
+         case 0x20100301:\r
+           imgdata.lens.makernotes.TeleconverterID = fgetc(ifp) << 8;\r
 @@ -7809,13 +7809,13 @@ void CLASS parse_makernote (int base, int uptag)
-               {
-                 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) * powf_64(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);
-+                    powf_64(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);
-+                    powf_64(2.0f, (float)((table_buf[iLensData+10] & 0x0f) + 10)/4.0f);
-                 if (
-                     (imgdata.lens.makernotes.CamID != 0x12e6c) &&     // K-r
-                     (imgdata.lens.makernotes.CamID != 0x12e76) &&     // K-5
+               {\r
+                 if (table_buf[iLensData+9] && (fabs(imgdata.lens.makernotes.CurFocal) < 0.1f))\r
+                   imgdata.lens.makernotes.CurFocal =\r
+-                    10*(table_buf[iLensData+9]>>2) * powf64(4, (table_buf[iLensData+9] & 0x03)-2);\r
++                    10*(table_buf[iLensData+9]>>2) * powf_64(4, (table_buf[iLensData+9] & 0x03)-2);\r
+                 if (table_buf[iLensData+10] & 0xf0)\r
+                   imgdata.lens.makernotes.MaxAp4CurFocal =\r
+-                    powf64(2.0f, (float)((table_buf[iLensData+10] & 0xf0) >>4)/4.0f);\r
++                    powf_64(2.0f, (float)((table_buf[iLensData+10] & 0xf0) >>4)/4.0f);\r
+                 if (table_buf[iLensData+10] & 0x0f)\r
+                   imgdata.lens.makernotes.MinAp4CurFocal =\r
+-                    powf64(2.0f, (float)((table_buf[iLensData+10] & 0x0f) + 10)/4.0f);\r
++                    powf_64(2.0f, (float)((table_buf[iLensData+10] & 0x0f) + 10)/4.0f);\r
+                 if (\r
+                     (imgdata.lens.makernotes.CamID != 0x12e6c) &&     // K-r\r
+                     (imgdata.lens.makernotes.CamID != 0x12e76) &&     // K-5\r
 @@ -7836,14 +7836,14 @@ void CLASS parse_makernote (int base, int uptag)
-                     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);
-+                        powf_64(2.0f, (float)((table_buf[iLensData+14] & 0x7f) -1)/32.0f);
-                   }
-                 else if ((imgdata.lens.makernotes.CamID != 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);
-+                      powf_64(2.0f, (float)((table_buf[iLensData+15] & 0x7f) -1)/32.0f);
-                   }
-               }
-             free(table_buf);
+                     if ((table_buf[iLensData+14] > 1) &&\r
+                         (fabs(imgdata.lens.makernotes.MaxAp4CurFocal) < 0.7f))\r
+                       imgdata.lens.makernotes.MaxAp4CurFocal =\r
+-                        powf64(2.0f, (float)((table_buf[iLensData+14] & 0x7f) -1)/32.0f);\r
++                        powf_64(2.0f, (float)((table_buf[iLensData+14] & 0x7f) -1)/32.0f);\r
+                   }\r
+                 else if ((imgdata.lens.makernotes.CamID != 0x12e76) &&        // K-5\r
+                          (table_buf[iLensData+15] > 1) &&\r
+                          (fabs(imgdata.lens.makernotes.MaxAp4CurFocal) < 0.7f))\r
+                   {\r
+                     imgdata.lens.makernotes.MaxAp4CurFocal =\r
+-                      powf64(2.0f, (float)((table_buf[iLensData+15] & 0x7f) -1)/32.0f);\r
++                      powf_64(2.0f, (float)((table_buf[iLensData+15] & 0x7f) -1)/32.0f);\r
+                   }\r
+               }\r
+             free(table_buf);\r
 @@ -8004,7 +8004,7 @@ void CLASS parse_makernote (int base, int uptag)
-                   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);
-+                    powf_64(2.0f, ((float)lid/8.0f-1.0f)/2.0f);
-                 }
-               break;
-             case 1536:
+                   lid = (((ushort)table_buf[2])<<8) |\r
+                     ((ushort)table_buf[3]);\r
+                   imgdata.lens.makernotes.CurAp =\r
+-                    powf64(2.0f, ((float)lid/8.0f-1.0f)/2.0f);\r
++                    powf_64(2.0f, ((float)lid/8.0f-1.0f)/2.0f);\r
+                 }\r
+               break;\r
+             case 1536:\r
 @@ -8089,15 +8089,15 @@ void CLASS parse_makernote (int base, int uptag)
-       {
-         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 * powf_64(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 * powf_64(2.0, i/32.0 - 4);
-       if ((i=(get2(),get2())) != 0x7fff && !aperture)
--      aperture = powf64(2.0, i/64.0);
-+      aperture = powf_64(2.0, i/64.0);
-       if ((i=get2()) != 0xffff && !shutter)
--      shutter = powf64(2.0, (short) i/-32.0);
-+      shutter = powf_64(2.0, (short) i/-32.0);
-       wbi = (get2(),get2());
-       shot_order = (get2(),get2());
-     }
+       {\r
+         unsigned char cc;\r
+         fread(&cc,1,1,ifp);\r
+-        iso_speed = int(100.0 * powf64(2.0f,float(cc)/12.0-5.0));\r
++        iso_speed = int(100.0 * powf_64(2.0f,float(cc)/12.0-5.0));\r
+       }\r
+     if (tag == 4 && len > 26 && len < 35) {\r
+       if ((i=(get4(),get2())) != 0x7fff && (!iso_speed || iso_speed == 65535))\r
+-      iso_speed = 50 * powf64(2.0, i/32.0 - 4);\r
++      iso_speed = 50 * powf_64(2.0, i/32.0 - 4);\r
+       if ((i=(get2(),get2())) != 0x7fff && !aperture)\r
+-      aperture = powf64(2.0, i/64.0);\r
++      aperture = powf_64(2.0, i/64.0);\r
+       if ((i=get2()) != 0xffff && !shutter)\r
+-      shutter = powf64(2.0, (short) i/-32.0);\r
++      shutter = powf_64(2.0, (short) i/-32.0);\r
+       wbi = (get2(),get2());\r
+       shot_order = (get2(),get2());\r
+     }\r
 @@ -8548,7 +8548,7 @@ void CLASS parse_exif (int base)
-         imgdata.lens.Lens[0] = 0;
-       break;
-     case 0x9205:
--      imgdata.lens.EXIF_MaxAp = powf64(2.0f, (getreal(type) / 2.0f));
-+      imgdata.lens.EXIF_MaxAp = powf_64(2.0f, (getreal(type) / 2.0f));
-       break;
- #endif
-       case 33434:  shutter = getreal(type);           break;
+         imgdata.lens.Lens[0] = 0;\r
+       break;\r
+     case 0x9205:\r
+-      imgdata.lens.EXIF_MaxAp = powf64(2.0f, (getreal(type) / 2.0f));\r
++      imgdata.lens.EXIF_MaxAp = powf_64(2.0f, (getreal(type) / 2.0f));\r
+       break;\r
+ #endif\r
+       case 33434:  shutter = getreal(type);           break;\r
 @@ -8561,10 +8561,10 @@ void CLASS parse_exif (int base)
-       case 36867:
-       case 36868:  get_timestamp(0);                  break;
-       case 37377:  if ((expo = -getreal(type)) < 128 && shutter == 0.)
--          shutter = powf64(2.0, expo);                break;
-+          shutter = powf_64(2.0, expo);               break;
-       case 37378:
-         if (fabs(ape = getreal(type))<256.0)
--          aperture = powf64(2.0, ape/2);
-+          aperture = powf_64(2.0, ape/2);
-         break;
-       case 37385:  flash_used = getreal(type);          break;
-       case 37386:  focal_len = getreal(type);         break;
+       case 36867:\r
+       case 36868:  get_timestamp(0);                  break;\r
+       case 37377:  if ((expo = -getreal(type)) < 128 && shutter == 0.)\r
+-          shutter = powf64(2.0, expo);                break;\r
++          shutter = powf_64(2.0, expo);               break;\r
+       case 37378:\r
+         if (fabs(ape = getreal(type))<256.0)\r
+-          aperture = powf64(2.0, ape/2);\r
++          aperture = powf_64(2.0, ape/2);\r
+         break;\r
+       case 37385:  flash_used = getreal(type);          break;\r
+       case 37386:  focal_len = getreal(type);         break;\r
 @@ -9171,7 +9171,7 @@ int CLASS parse_tiff_ifd (int base)
-         imgdata.lens.Lens[0] = 0;
-       break;
-     case 0x9205:
--                              imgdata.lens.EXIF_MaxAp = powf64(2.0f, (getreal(type) / 2.0f));
-+                              imgdata.lens.EXIF_MaxAp = powf_64(2.0f, (getreal(type) / 2.0f));
-       break;
- // IB end
- #endif
+         imgdata.lens.Lens[0] = 0;\r
+       break;\r
+     case 0x9205:\r
+-                              imgdata.lens.EXIF_MaxAp = powf64(2.0f, (getreal(type) / 2.0f));\r
++                              imgdata.lens.EXIF_MaxAp = powf_64(2.0f, (getreal(type) / 2.0f));\r
+       break;\r
+ // IB end\r
+ #endif\r
 @@ -9940,22 +9940,22 @@ void CLASS parse_ciff (int offset, int length, int depth)
-       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 = powf_64(2.0f, -int_to_float((get4(),get4())));
-+      aperture = powf_64(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 = powf_64(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  = powf_64(2.0, (get2(),(short)get2())/64.0);
- #endif
--      shutter   = powf64(2.0,-((short)get2())/32.0);
-+      shutter   = powf_64(2.0,-((short)get2())/32.0);
-       wbi = (get2(),get2());
-       if (wbi > 17) wbi = 0;
-       fseek (ifp, 32, SEEK_CUR);
+       thumb_length = len;\r
+     }\r
+     if (type == 0x1818) {\r
+-      shutter = powf64(2.0f, -int_to_float((get4(),get4())));\r
+-      aperture = powf64(2.0f, int_to_float(get4())/2);\r
++      shutter = powf_64(2.0f, -int_to_float((get4(),get4())));\r
++      aperture = powf_64(2.0f, int_to_float(get4())/2);\r
+ #ifdef LIBRAW_LIBRARY_BUILD\r
+                       imgdata.lens.makernotes.CurAp = aperture;\r
+ #endif\r
+     }\r
+     if (type == 0x102a) {\r
+                       //      iso_speed = pow (2.0, (get4(),get2())/32.0 - 4) * 50;\r
+-      iso_speed = powf64(2.0f, ((get2(),get2()) + get2())/32.0f - 5.0f) * 100.0f;\r
++      iso_speed = powf_64(2.0f, ((get2(),get2()) + get2())/32.0f - 5.0f) * 100.0f;\r
+ #ifdef LIBRAW_LIBRARY_BUILD\r
+       aperture  = _CanonConvertAperture((get2(),get2()));\r
+       imgdata.lens.makernotes.CurAp = aperture;\r
+ #else\r
+-      aperture  = powf64(2.0, (get2(),(short)get2())/64.0);\r
++      aperture  = powf_64(2.0, (get2(),(short)get2())/64.0);\r
+ #endif\r
+-      shutter   = powf64(2.0,-((short)get2())/32.0);\r
++      shutter   = powf_64(2.0,-((short)get2())/32.0);\r
+       wbi = (get2(),get2());\r
+       if (wbi > 17) wbi = 0;\r
+       fseek (ifp, 32, SEEK_CUR);\r
 @@ -10159,8 +10159,8 @@ void CLASS parse_phase_one (int base)
-       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 =  powf_64(2.0f, (int_to_float(data)/2.0f));
-+      else imgdata.lens.makernotes.CurAp = powf_64(2.0f, (getreal(type)/2.0f));
-       break;
-     case 0x0403:
-       if (type == 4) imgdata.lens.makernotes.CurFocal =  int_to_float(data);
+       setPhaseOneFeatures(unique_id);\r
+       break;\r
+     case 0x0401:\r
+-      if (type == 4) imgdata.lens.makernotes.CurAp =  powf64(2.0f, (int_to_float(data)/2.0f));\r
+-      else imgdata.lens.makernotes.CurAp = powf64(2.0f, (getreal(type)/2.0f));\r
++      if (type == 4) imgdata.lens.makernotes.CurAp =  powf_64(2.0f, (int_to_float(data)/2.0f));\r
++      else imgdata.lens.makernotes.CurAp = powf_64(2.0f, (getreal(type)/2.0f));\r
+       break;\r
+     case 0x0403:\r
+       if (type == 4) imgdata.lens.makernotes.CurFocal =  int_to_float(data);\r
 @@ -10174,16 +10174,16 @@ void CLASS parse_phase_one (int base)
-       break;
-     case 0x0414:
-       if (type == 4) {
--              imgdata.lens.makernotes.MaxAp4CurFocal = powf64(2.0f, (int_to_float(data)/2.0f));
-+              imgdata.lens.makernotes.MaxAp4CurFocal = powf_64(2.0f, (int_to_float(data)/2.0f));
-       } else {
--        imgdata.lens.makernotes.MaxAp4CurFocal = powf64(2.0f, (getreal(type) / 2.0f));
-+        imgdata.lens.makernotes.MaxAp4CurFocal = powf_64(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 = powf_64(2.0f, (int_to_float(data)/2.0f));
-       } else {
--        imgdata.lens.makernotes.MinAp4CurFocal = powf64(2.0f, (getreal(type) / 2.0f));
-+        imgdata.lens.makernotes.MinAp4CurFocal = powf_64(2.0f, (getreal(type) / 2.0f));
-       }
-       break;
-     case 0x0416:
+       break;\r
+     case 0x0414:\r
+       if (type == 4) {\r
+-              imgdata.lens.makernotes.MaxAp4CurFocal = powf64(2.0f, (int_to_float(data)/2.0f));\r
++              imgdata.lens.makernotes.MaxAp4CurFocal = powf_64(2.0f, (int_to_float(data)/2.0f));\r
+       } else {\r
+-        imgdata.lens.makernotes.MaxAp4CurFocal = powf64(2.0f, (getreal(type) / 2.0f));\r
++        imgdata.lens.makernotes.MaxAp4CurFocal = powf_64(2.0f, (getreal(type) / 2.0f));\r
+       }\r
+       break;\r
+     case 0x0415:\r
+       if (type == 4) {\r
+-              imgdata.lens.makernotes.MinAp4CurFocal = powf64(2.0f, (int_to_float(data)/2.0f));\r
++              imgdata.lens.makernotes.MinAp4CurFocal = powf_64(2.0f, (int_to_float(data)/2.0f));\r
+       } else {\r
+-        imgdata.lens.makernotes.MinAp4CurFocal = powf64(2.0f, (getreal(type) / 2.0f));\r
++        imgdata.lens.makernotes.MinAp4CurFocal = powf_64(2.0f, (getreal(type) / 2.0f));\r
+       }\r
+       break;\r
+     case 0x0416:\r
 @@ -11996,15 +11996,15 @@ void CLASS identify()
-       case 18: iso_speed = 320; break;
-       case 19: iso_speed = 400; break;
-     }
--    shutter = powf64(2.0f, (((float)get4())/8.0f)) / 16000.0f;
-+    shutter = powf_64(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 = powf_64(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 = powf_64(2.0f, ((float)get4())/16.0f);
-     fseek (ifp, 124, SEEK_SET);
-     fread(imgdata.lens.makernotes.Lens, 32, 1, ifp);
-     imgdata.lens.makernotes.CameraMount = LIBRAW_MOUNT_Contax_N;
+       case 18: iso_speed = 320; break;\r
+       case 19: iso_speed = 400; break;\r
+     }\r
+-    shutter = powf64(2.0f, (((float)get4())/8.0f)) / 16000.0f;\r
++    shutter = powf_64(2.0f, (((float)get4())/8.0f)) / 16000.0f;\r
+     FORC4 cam_mul[c ^ (c >> 1)] = get4();\r
+     fseek (ifp, 88, SEEK_SET);\r
+-    aperture = powf64(2.0f, ((float)get4())/16.0f);\r
++    aperture = powf_64(2.0f, ((float)get4())/16.0f);\r
+     fseek (ifp, 112, SEEK_SET);\r
+     focal_len = get4();\r
+ #ifdef LIBRAW_LIBRARY_BUILD\r
+     fseek (ifp, 104, SEEK_SET);\r
+-    imgdata.lens.makernotes.MaxAp4CurFocal = powf64(2.0f, ((float)get4())/16.0f);\r
++    imgdata.lens.makernotes.MaxAp4CurFocal = powf_64(2.0f, ((float)get4())/16.0f);\r
+     fseek (ifp, 124, SEEK_SET);\r
+     fread(imgdata.lens.makernotes.Lens, 32, 1, ifp);\r
+     imgdata.lens.makernotes.CameraMount = LIBRAW_MOUNT_Contax_N;\r
 -- 
 2.14.1