Changes between Version 1 and Version 2 of Ticket #54820, comment 5


Ignore:
Timestamp:
Sep 29, 2017, 4:52:45 PM (7 years ago)
Author:
kencu (Ken)
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #54820, comment 5

    v1 v2  
    22
    33it might be possible to fix or improve these math errors by adding a `-std=c99` to the build line. The missing definitions in `/usr/include/architecture/i386/math.h` then become available on 10.6 when that is defined.
     4
     5
     6On 10.6, it is guarded like so:
     7{{{
     8#if ( defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L ) || ! defined( __STRICT_ANSI__ )  || ! defined( __GNUC__ )
     9    /* long long is not part of C90. Make sure you are passing -std=c99 or -std=gnu99 or better if you need this. */
     10    extern long long int llrintl(long double);
     11    extern long long int llroundl(long double);
     12#endif /* #if ( defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L ) || ! defined( __STRICT_ANSI__ )  || ! defined( __GNUC__ ) */
     13}}}
     14
     15but on 10.7, the guard changes to
     16{{{
     17#if !(__DARWIN_NO_LONG_LONG)
     18    /* long long is not part of C90. Make sure you are passing -std=c99 or -std=gnu99 or better if you need this. */
     19    extern long long int llrintl(long double);
     20    extern long long int llroundl(long double);
     21#endif /* !(__DARWIN_NO_LONG_LONG) */
     22}}}
     23
     24which would explain the change in needs with the system versions 10.7+.