Mercurial > octave-libtiff
comparison m4/acinclude.m4 @ 21187:f569ba0ee237
eliminate FCN_PTR_CAST macro and associated configure test
* acinclude.m4 (CTAVE_CXX_BROKEN_REINTERPRET_CAST):
Delete macro definition.
* configure.ac: Don't use it.
* oct-conf-post.in.h (FCN_PTR_CAST): Delete macro definition.
* dynamic-ld.cc, mex.cc: Use reinterpret_cast instead of FCN_PTR_CAST
macro.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 04 Feb 2016 00:30:42 -0500 |
parents | e7fda94aec6b |
children | 6c4f41a9439d |
comparison
equal
deleted
inserted
replaced
21186:7f35125714b4 | 21187:f569ba0ee237 |
---|---|
1334 AC_LANG_POP(C++) | 1334 AC_LANG_POP(C++) |
1335 ]) | 1335 ]) |
1336 if test $octave_cv_cxx_bitwise_op_templates = yes; then | 1336 if test $octave_cv_cxx_bitwise_op_templates = yes; then |
1337 AC_DEFINE(HAVE_CXX_BITWISE_OP_TEMPLATES, 1, | 1337 AC_DEFINE(HAVE_CXX_BITWISE_OP_TEMPLATES, 1, |
1338 [Define to 1 if C++ library has templated bitwise operators.]) | 1338 [Define to 1 if C++ library has templated bitwise operators.]) |
1339 fi | |
1340 ]) | |
1341 dnl | |
1342 dnl Check if C++ reinterpret cast works for function pointers. | |
1343 dnl | |
1344 AC_DEFUN([OCTAVE_CXX_BROKEN_REINTERPRET_CAST], | |
1345 [AC_REQUIRE([AC_PROG_CXX]) | |
1346 AC_CACHE_CHECK([for broken C++ reinterpret_cast], | |
1347 [octave_cv_cxx_broken_reinterpret_cast], | |
1348 [AC_LANG_PUSH(C++) | |
1349 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ | |
1350 #include <cmath> ]], [[ | |
1351 typedef double (*fptr) (double); | |
1352 fptr psin = sin; | |
1353 void *vptr = reinterpret_cast<void *> (psin); | |
1354 psin = reinterpret_cast<fptr> (vptr); | |
1355 ]])], | |
1356 octave_cv_cxx_broken_reinterpret_cast=no, | |
1357 octave_cv_cxx_broken_reinterpret_cast=yes) | |
1358 AC_LANG_POP(C++) | |
1359 ]) | |
1360 if test $octave_cv_cxx_broken_reinterpret_cast = yes; then | |
1361 AC_DEFINE(CXX_BROKEN_REINTERPRET_CAST, 1, | |
1362 [Define to 1 if C++ reinterpret_cast fails for function pointers.]) | |
1363 fi | 1339 fi |
1364 ]) | 1340 ]) |
1365 dnl | 1341 dnl |
1366 dnl Check if the C++ library has functions to access real and imaginary | 1342 dnl Check if the C++ library has functions to access real and imaginary |
1367 dnl parts of complex numbers independently via references. | 1343 dnl parts of complex numbers independently via references. |