Changeset bec377a7e0cd1429e7d3179e0d7dfb5ae8c7f188

Show
Ignore:
Timestamp:
12/18/07 21:40:46 (9 months ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1198010446 +0000
git-parent:

[3040dc9b67a6848f96a8e309cf04882296710d3a]

git-author:
Rémi Denis-Courmont <rem@videolan.org> 1198010446 +0000
Message:

_POSIX_CLOCK_SELECTION at 0 does not mean it's not supported.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/misc/mtime.c

    r253fe31 rbec377a  
    6868#endif 
    6969 
    70 #ifdef HAVE_CLOCK_NANOSLEEP 
    71 #  if !defined _POSIX_CLOCK_SELECTION || (_POSIX_CLOCK_SELECTION - 0 <= 0) 
     70#if (!defined (_POSIX_CLOCK_SELECTION)) || (_POSIX_CLOCK_SELECTION < 0) 
    7271/* 
    7372 * We cannot use the monotonic clock is clock selection is not available, 
     
    7675 * warps the wall clock. 
    7776 */ 
    78 #    undef CLOCK_MONOTONIC 
    79 #    define CLOCK_MONOTONIC CLOCK_REALTIME 
     77#  undef CLOCK_MONOTONIC 
     78#  define CLOCK_MONOTONIC CLOCK_REALTIME 
     79#  ifndef HAVE_CLOCK_NANOSLEEP 
     80#   error We have quite a situation here! Fix me if it ever happens. 
    8081#  endif 
    8182#endif 
  • src/misc/threads.c

    r8ed3857 rbec377a  
    485485        return ret; 
    486486 
    487 # if defined (_POSIX_CLOCK_SELECTION) && (_POSIX_CLOCK_SELECTION - 0 > 0) 
     487# if defined (_POSIX_CLOCK_SELECTION) && (_POSIX_CLOCK_SELECTION >= 0) 
    488488    /* NOTE: This must be the same clock as the one in mtime.c */ 
    489489    pthread_condattr_setclock (&attr, CLOCK_MONOTONIC);