Skip to content

Commit

Permalink
Merge pull request #16 from astromatic/fix/finite
Browse files Browse the repository at this point in the history
Fix portability issue on MacOS with obsolete finite() function.
  • Loading branch information
ebertin authored Apr 13, 2023
2 parents a0de1e8 + f096d49 commit 148803a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 19 deletions.
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# You should have received a copy of the GNU General Public License
# along with PSFEx. If not, see <http://www.gnu.org/licenses/>.
#
# Last modified: 05/04/2023
# Last modified: 11/04/2023
#
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Expand All @@ -31,7 +31,7 @@ define([AC_CACHE_LOAD],)
define([AC_CACHE_SAVE],)

# This is your standard AstrOmatic source code...
AC_INIT(PSFEx, 3.24.1, [[email protected]],
AC_INIT(PSFEx, 3.24.2, [[email protected]],
psfex, [http://astromatic.net/software/psfex])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR(autoconf)
Expand Down
6 changes: 3 additions & 3 deletions doc/src/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@
# built documents.
#
# The short X.Y version.
version = '3.24.1'
version = '3.24.2'
# The full version, including alpha/beta/rc tags.
release = '3.24.1'
release = '3.24.2'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand All @@ -76,7 +76,7 @@

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
today = 'Wed Apr 05 2023'
today = 'Tue Apr 11 2023'
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'

Expand Down
16 changes: 2 additions & 14 deletions src/levmar/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,8 @@
#define inline // other than MSVC, ICC, GCC: define empty
#endif

#ifdef _MSC_VER
#define LM_FINITE _finite // MSVC
#elif defined(__ICC) || defined(__INTEL_COMPILER) || defined(__GNUC__)
#define LM_FINITE finite // ICC, GCC
#else
#define LM_FINITE finite // other than MSVC, ICC, GCC, let's hope this will work
#endif
#define LM_FINITE isfinite // POSIX.1-2001 & C99

#ifdef _MSC_VER
#define LM_ISINF(x) (!_finite(x) && !_isnan(x)) // MSVC
#elif defined(__ICC) || defined(__INTEL_COMPILER) || defined(__GNUC__)
#define LM_ISINF(x) isinf(x) // ICC, GCC
#else
#define LM_ISINF(x) isinf(x) // other than MSVC, ICC, GCC, let's hope this will work
#endif
#define LM_ISINF isinf // POSIX.1-2001 & C99

#endif /* _COMPILER_H_ */

0 comments on commit 148803a

Please sign in to comment.