Alien-CFITSIO
view release on metacpan or search on metacpan
patch/cfitsio-4.6.2.patch view on Meta::CPAN
! - added "#define CFITSIO_MACHINE NATIVE" in fitsio2.h for all machines where
BYTESWAPPED == FALSE. This may improve the file writing performance
by eliminating the need to allocate a temporary buffer in some cases.
***************
*** 2164,2170 ****
with elliptical or rectangular regions.
- cleaned up fitsio.h and fitsio2.h to make the definition of LONGLONG
! and BYTESWAPPED and MACHINE more logical.
- removed HAVE_LONGLONG everywhere since it is no longer needed (the
compiler now must have an 8-byte integer datatype to build CFITSIO).
--- 2164,2170 ----
with elliptical or rectangular regions.
- cleaned up fitsio.h and fitsio2.h to make the definition of LONGLONG
! and BYTESWAPPED and CFITSIO_MACHINE more logical.
- removed HAVE_LONGLONG everywhere since it is no longer needed (the
compiler now must have an 8-byte integer datatype to build CFITSIO).
diff -rc cfitsio-4.6.2.orig/drvrfile.c cfitsio-4.6.2/drvrfile.c
*** cfitsio-4.6.2.orig/drvrfile.c 2025-03-26 14:19:36.000000000 -0400
--- cfitsio-4.6.2/drvrfile.c 2025-04-22 22:20:10.864556740 -0400
***************
*** 214,220 ****
}
#endif
! #if MACHINE == ALPHAVMS || MACHINE == VAXVMS
/* specify VMS record structure: fixed format, 2880 byte records */
/* but force stream mode access to enable random I/O access */
*diskfile = fopen(filename, mode, "rfm=fix", "mrs=2880", "ctx=stm");
--- 214,220 ----
}
#endif
! #if CFITSIO_MACHINE == ALPHAVMS || CFITSIO_MACHINE == VAXVMS
/* specify VMS record structure: fixed format, 2880 byte records */
/* but force stream mode access to enable random I/O access */
*diskfile = fopen(filename, mode, "rfm=fix", "mrs=2880", "ctx=stm");
***************
*** 564,570 ****
}
#endif
! #if MACHINE == ALPHAVMS || MACHINE == VAXVMS
/* specify VMS record structure: fixed format, 2880 byte records */
/* but force stream mode access to enable random I/O access */
diskfile = fopen(filename, mode, "rfm=fix", "mrs=2880", "ctx=stm");
--- 564,570 ----
}
#endif
! #if CFITSIO_MACHINE == ALPHAVMS || CFITSIO_MACHINE == VAXVMS
/* specify VMS record structure: fixed format, 2880 byte records */
/* but force stream mode access to enable random I/O access */
diskfile = fopen(filename, mode, "rfm=fix", "mrs=2880", "ctx=stm");
***************
*** 714,720 ****
/* perhaps others, so seek to original position to be sure. */
/* This seek will do no harm on other systems. */
! #if MACHINE == IBMPC
if (file_seek(handle, handleTable[handle].currentpos))
return(SEEK_ERROR);
--- 714,720 ----
/* perhaps others, so seek to original position to be sure. */
/* This seek will do no harm on other systems. */
! #if CFITSIO_MACHINE == IBMPC
if (file_seek(handle, handleTable[handle].currentpos))
return(SEEK_ERROR);
diff -rc cfitsio-4.6.2.orig/drvrmem.c cfitsio-4.6.2/drvrmem.c
*** cfitsio-4.6.2.orig/drvrmem.c 2025-03-26 14:19:36.000000000 -0400
--- cfitsio-4.6.2/drvrmem.c 2025-04-22 22:20:10.816556551 -0400
***************
*** 145,151 ****
return(FILE_NOT_CREATED);
}
! #if MACHINE == ALPHAVMS || MACHINE == VAXVMS
/* specify VMS record structure: fixed format, 2880 byte records */
/* but force stream mode access to enable random I/O access */
diskfile = fopen(filename, mode, "rfm=fix", "mrs=2880", "ctx=stm");
--- 145,151 ----
return(FILE_NOT_CREATED);
}
! #if CFITSIO_MACHINE == ALPHAVMS || CFITSIO_MACHINE == VAXVMS
/* specify VMS record structure: fixed format, 2880 byte records */
/* but force stream mode access to enable random I/O access */
diskfile = fopen(filename, mode, "rfm=fix", "mrs=2880", "ctx=stm");
diff -rc cfitsio-4.6.2.orig/fitscore.c cfitsio-4.6.2/fitscore.c
*** cfitsio-4.6.2.orig/fitscore.c 2025-03-26 14:19:36.000000000 -0400
--- cfitsio-4.6.2/fitscore.c 2025-04-22 22:20:10.844556661 -0400
***************
*** 9737,9743 ****
}
sptr = (short *) fval;
! #if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS
sptr++; /* point to MSBs */
#endif
iret = fnan(*sptr); /* if iret == 1, then the float value is a NaN */
--- 9737,9743 ----
}
sptr = (short *) fval;
! #if BYTESWAPPED && CFITSIO_MACHINE != VAXVMS && CFITSIO_MACHINE != ALPHAVMS
sptr++; /* point to MSBs */
#endif
iret = fnan(*sptr); /* if iret == 1, then the float value is a NaN */
***************
*** 9812,9818 ****
}
sptr = (short *) dval;
! #if BYTESWAPPED && MACHINE != VAXVMS && MACHINE != ALPHAVMS
sptr += 3; /* point to MSBs */
#endif
iret = dnan(*sptr); /* if iret == 1, then the double value is a NaN */
--- 9812,9818 ----
}
sptr = (short *) dval;
! #if BYTESWAPPED && CFITSIO_MACHINE != VAXVMS && CFITSIO_MACHINE != ALPHAVMS
( run in 2.237 seconds using v1.01-cache-2.11-cpan-fa01517f264 )