--- src/save_fits_image.cc.orig	2015-06-11 04:19:38.000000000 -0700
+++ src/save_fits_image.cc	2019-03-08 05:23:29.000000000 -0700
@@ -81,7 +81,7 @@
     else if( args(2).is_scalar_type() )
     {
       double val = args(2).double_value();
-      if( (D_NINT( val ) ==  val) )
+      if( (octave::math::x_nint( val ) ==  val) )
       {
         if( BYTE_IMG == val )
           bitperpixel = BYTE_IMG;
--- src/save_fits_image_multi_ext.cc.orig	2015-06-11 04:19:38.000000000 -0700
+++ src/save_fits_image_multi_ext.cc	2019-03-08 05:24:14.000000000 -0700
@@ -78,7 +78,7 @@
     else if( args(2).is_scalar_type() )
     {
       double val = args(2).double_value();
-      if( (D_NINT( val ) ==  val) )
+      if( (octave::math::x_nint( val ) ==  val) )
       {
         if( BYTE_IMG == val )
           bitperpixel = BYTE_IMG;
--- src/read_fits_image.cc.orig	2015-06-11 04:19:38.000000000 -0700
+++ src/read_fits_image.cc	2019-03-08 05:24:04.000000000 -0700
@@ -194,7 +194,7 @@
       return true;
     }
     double val = args(1).double_value();
-    if( (D_NINT( val ) !=  val) || (val < 0) )
+    if( (octave::math::x_nint( val ) !=  val) || (val < 0) )
     {
       error( "read_fits_image: second argument must be a non-negative scalar integer value" );
       return true;
