In perl.git, the branch tonyc/time-hires-fix has been created

<http://perl5.git.perl.org/perl.git/commitdiff/608c5595b8cac7cb4860f19ae7d880b15cf95d80?hp=0000000000000000000000000000000000000000>

        at  608c5595b8cac7cb4860f19ae7d880b15cf95d80 (commit)

- Log -----------------------------------------------------------------
commit 608c5595b8cac7cb4860f19ae7d880b15cf95d80
Author: Tony Cook <[email protected]>
Date:   Tue Nov 15 10:15:42 2016 +1100

    avoid a declaration conflict on El Capitan with recent XCode
    
    OS X El Capitan doesn't implement the clock_gettime() or clock_getrez()
    APIs, but recent versions of XCode, which are released to El Capitan
    do include updated headers that declare those functions.
    
    This causes errors like:
    
    HiRes.xs:810:12: error: static declaration of 'clock_gettime' follows 
non-static
          declaration
    static int clock_gettime(clockid_t clock_id, struct timespec *ts) {
               ^
    
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/time.h:177:5:
 note:
          previous declaration is here
    int clock_gettime(clockid_t __clock_id, struct timespec *__tp);
        ^
    HiRes.xs:844:12: error: static declaration of 'clock_getres' follows 
non-static
          declaration
    static int clock_getres(clockid_t clock_id, struct timespec *ts) {
               ^
    
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/time.h:174:5:
 note:
          previous declaration is here
    int clock_getres(clockid_t __clock_id, struct timespec *__res);
        ^
    2 errors generated.
    
    To avoid that, define the emulation functions with our own name
    and use a macro to map the standard names to our implemnentations.
-----------------------------------------------------------------------

--
Perl5 Master Repository

Reply via email to