From 825ea324f75342d1feff7800413e30967286e600 Mon Sep 17 00:00:00 2001 From: Emmanuel Bertin Date: Wed, 17 Jul 2013 14:40:17 +0000 Subject: [PATCH] Fixed compilation issue with finitef() function in profit.c on OSX 10.8. Pushed version number to 2.19.1. --- config.h.in | 7 +++++-- configure | 33 ++++++++++++--------------------- configure.ac | 10 ++++------ man/sex.1 | 2 +- src/profit.c | 16 ++++++++++++---- 5 files changed, 34 insertions(+), 34 deletions(-) diff --git a/config.h.in b/config.h.in index bc35c96..c185ad8 100644 --- a/config.h.in +++ b/config.h.in @@ -68,8 +68,11 @@ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H -/* Second isnan check */ -#undef HAVE_ISNAN2 +/* Define to 1 if you have the `isinf' function. */ +#undef HAVE_ISINF + +/* Define to 1 if you have the `isnan' function. */ +#undef HAVE_ISNAN /* Define if you have the LAPACK libraries. */ #undef HAVE_LAPACK diff --git a/configure b/configure index 088d202..c3a9854 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for sextractor 2.19.0. +# Generated by GNU Autoconf 2.69 for sextractor 2.19.1. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='sextractor' PACKAGE_TARNAME='sextractor' -PACKAGE_VERSION='2.19.0' -PACKAGE_STRING='sextractor 2.19.0' +PACKAGE_VERSION='2.19.1' +PACKAGE_STRING='sextractor 2.19.1' PACKAGE_BUGREPORT='bertin@iap.fr' PACKAGE_URL='' @@ -1345,7 +1345,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sextractor 2.19.0 to adapt to many kinds of systems. +\`configure' configures sextractor 2.19.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1415,7 +1415,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sextractor 2.19.0:";; + short | recursive ) echo "Configuration of sextractor 2.19.1:";; esac cat <<\_ACEOF @@ -1549,7 +1549,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sextractor configure 2.19.0 +sextractor configure 2.19.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1972,7 +1972,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sextractor $as_me 2.19.0, which was +It was created by sextractor $as_me 2.19.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2786,7 +2786,7 @@ fi # Define the identity of the package. PACKAGE='sextractor' - VERSION='2.19.0' + VERSION='2.19.1' cat >>confdefs.h <<_ACEOF @@ -12582,8 +12582,8 @@ fi fi done -for ac_func in atexit logf getenv gettimeofday memcpy memmove memset mkdir \ - munmap posix_memalign setlinebuf sincosf strstr sysconf +for ac_func in atexit getenv gettimeofday isinf isnan logf memcpy memmove \ + memset mkdir munmap posix_memalign setlinebuf sincosf strstr sysconf do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -12595,15 +12595,6 @@ _ACEOF fi done -ac_fn_c_check_func "$LINENO" "isnan" "ac_cv_func_isnan" -if test "x$ac_cv_func_isnan" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_ISNAN2 1 -_ACEOF - -fi - # Check support for large files # Check whether --enable-largefile was given. @@ -15714,7 +15705,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sextractor $as_me 2.19.0, which was +This file was extended by sextractor $as_me 2.19.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15780,7 +15771,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -sextractor config.status 2.19.0 +sextractor config.status 2.19.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 191dda1..c841d5f 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,7 @@ # You should have received a copy of the GNU General Public License # along with SExtractor. If not, see . # -# Last modified: 05/07/2013 +# Last modified: 17/07/2013 # #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -31,7 +31,7 @@ define([AC_CACHE_LOAD],) define([AC_CACHE_SAVE],) # This is your standard Bertin source code... -AC_INIT(sextractor, 2.19.0, [bertin@iap.fr]) +AC_INIT(sextractor, 2.19.1, [bertin@iap.fr]) AC_CONFIG_SRCDIR(src/makeit.c) AC_CONFIG_AUX_DIR(autoconf) AC_CONFIG_HEADERS(config.h) @@ -124,10 +124,8 @@ AC_FUNC_MMAP AC_TYPE_SIGNAL AC_FUNC_STAT AC_FUNC_STRFTIME -AC_CHECK_FUNCS([atexit logf getenv gettimeofday memcpy memmove memset mkdir \ - munmap posix_memalign setlinebuf sincosf strstr sysconf]) -AC_CHECK_FUNC([isnan], AC_DEFINE_UNQUOTED([HAVE_ISNAN2], 1, - [Second isnan check])) +AC_CHECK_FUNCS([atexit getenv gettimeofday isinf isnan logf memcpy memmove \ + memset mkdir munmap posix_memalign setlinebuf sincosf strstr sysconf]) # Check support for large files AC_SYS_LARGEFILE diff --git a/man/sex.1 b/man/sex.1 index 9c7d613..793e863 100644 --- a/man/sex.1 +++ b/man/sex.1 @@ -1,4 +1,4 @@ -.TH SEXTRACTOR "1" "July 2013" "SExtractor 2.19.0" "User Commands" +.TH SEXTRACTOR "1" "July 2013" "SExtractor 2.19.1" "User Commands" .SH NAME sex \- extract a source catalogue from an astronomical FITS image .SH SYNOPSIS diff --git a/src/profit.c b/src/profit.c index 79e4534..3c0980f 100644 --- a/src/profit.c +++ b/src/profit.c @@ -22,7 +22,7 @@ * You should have received a copy of the GNU General Public License * along with SExtractor. If not, see . * -* Last modified: 05/07/2013 +* Last modified: 17/07/2013 * *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ @@ -1985,7 +1985,7 @@ INPUT Profile-fitting structure, OUTPUT RETURN_ERROR if the rasters don't overlap, RETURN_OK otherwise. NOTES -. AUTHOR E. Bertin (IAP) -VERSION 24/04/2013 +VERSION 17/07/2013 ***/ int profit_resample(profitstruct *profit, float *inpix, PIXTYPE *outpix, float factor) @@ -2010,7 +2010,11 @@ int profit_resample(profitstruct *profit, float *inpix, PIXTYPE *outpix, xsin = xcin - xcout*invpixstep; /* Input start x-coord*/ - if ((int)xsin >= profit->modnaxisn[0] || !finitef(xsin)) + if ((int)xsin >= profit->modnaxisn[0] +#if defined(HAVE_ISNAN) && defined(HAVE_ISINF) + || isnan(xsin) || isinf(xsin) +#endif + ) return RETURN_ERROR; ixsout = 0; /* Int. part of output start x-coord */ if (xsin<0.0) @@ -2036,7 +2040,11 @@ int profit_resample(profitstruct *profit, float *inpix, PIXTYPE *outpix, ycout += *dy/profit->subsamp; ysin = ycin - ycout*invpixstep; /* Input start y-coord*/ - if ((int)ysin >= profit->modnaxisn[1] || !finitef(ysin)) + if ((int)ysin >= profit->modnaxisn[1] +#if defined(HAVE_ISNAN) && defined(HAVE_ISINF) + || isnan(ysin) || isinf(ysin) +#endif + ) return RETURN_ERROR; iysout = 0; /* Int. part of output start y-coord */ if (ysin<0.0) -- GitLab