Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | RSS feed

  1. /* local header used by libc/time routines */
  2. #include <_ansi.h>
  3. #include <time.h>
  4.  
  5. #define SECSPERMIN      60L
  6. #define MINSPERHOUR     60L
  7. #define HOURSPERDAY     24L
  8. #define SECSPERHOUR     (SECSPERMIN * MINSPERHOUR)
  9. #define SECSPERDAY      (SECSPERHOUR * HOURSPERDAY)
  10. #define DAYSPERWEEK     7
  11. #define MONSPERYEAR     12
  12.  
  13. #define YEAR_BASE       1900
  14. #define EPOCH_YEAR      1970
  15. #define EPOCH_WDAY      4
  16. #define EPOCH_YEARS_SINCE_LEAP 2
  17. #define EPOCH_YEARS_SINCE_CENTURY 70
  18. #define EPOCH_YEARS_SINCE_LEAP_CENTURY 370
  19.  
  20. #define isleap(y) ((((y) % 4) == 0 && ((y) % 100) != 0) || ((y) % 400) == 0)
  21.  
  22. struct tm * _EXFUN (_mktm_r, (_CONST time_t *, struct tm *, int __is_gmtime));
  23. int         _EXFUN (__tzcalc_limits, (int __year));
  24.  
  25. /* locks for multi-threading */
  26. #ifdef __SINGLE_THREAD__
  27. #define TZ_LOCK
  28. #define TZ_UNLOCK
  29. #else
  30. #define TZ_LOCK __tz_lock()
  31. #define TZ_UNLOCK __tz_unlock()
  32. #endif
  33.  
  34. void _EXFUN(__tz_lock,(_VOID));
  35. void _EXFUN(__tz_unlock,(_VOID));
  36.  
  37.