[MacPorts] #59007: mariadb-10.2: error: use of undeclared identifier 'finite'; did you mean 'isfinite'?

MacPorts noreply at macports.org
Wed Sep 11 08:50:31 UTC 2019


#59007: mariadb-10.2: error: use of undeclared identifier 'finite'; did you mean
'isfinite'?
---------------------------+-----------------------
  Reporter:  iEFdev        |      Owner:  michaelld
      Type:  defect        |     Status:  assigned
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  2.5.4
Resolution:                |   Keywords:
      Port:  mariadb-10.2  |
---------------------------+-----------------------

Comment (by iEFdev):

 Replying to [comment:1 kencu]:
 > You could look at that file and see why they redefined that function
 name

 Thanks Ken. Here the full code block (`include/my_global.h`):

 {{{
 #!c++
 #ifndef isfinite
 #ifdef HAVE_FINITE
 #define isfinite(x) finite(x)
 #else
 #define finite(x) (1.0 / fabs(x) > 0.0)
 #endif /* HAVE_FINITE */
 #elif (__cplusplus >= 201103L)
 #include <cmath>
 static inline bool isfinite(double x) { return std::isfinite(x); }
 #endif /* isfinite */
 }}}

 So, commenting out, like…

 {{{
 #!c++
 #ifndef isfinite
 /* #ifdef HAVE_FINITE
 #define isfinite(x) finite(x)
 #else */
 #define finite(x) (1.0 / fabs(x) > 0.0)
 /* #endif /* HAVE_FINITE */
 #elif (__cplusplus >= 201103L)
 #include <cmath>
 static inline bool isfinite(double x) { return std::isfinite(x); }
 #endif /* isfinite */
 }}}

 …or just 0 it?

-- 
Ticket URL: <https://trac.macports.org/ticket/59007#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list