Cygwin: mmap: allow remapping part of an existing anonymous mapping
[newlib-cygwin.git] / newlib / libc / time / local.h
blobbfe06e62230dce6890a053137a418ede3ebaa3cb
1 /* local header used by libc/time routines */
2 #include <_ansi.h>
3 #include <time.h>
4 #include <sys/_tz_structs.h>
6 #define SECSPERMIN 60L
7 #define MINSPERHOUR 60L
8 #define HOURSPERDAY 24L
9 #define SECSPERHOUR (SECSPERMIN * MINSPERHOUR)
10 #define SECSPERDAY (SECSPERHOUR * HOURSPERDAY)
11 #define DAYSPERWEEK 7
12 #define MONSPERYEAR 12
14 #define YEAR_BASE 1900
15 #define EPOCH_YEAR 1970
16 #define EPOCH_WDAY 4
17 #define EPOCH_YEARS_SINCE_LEAP 2
18 #define EPOCH_YEARS_SINCE_CENTURY 70
19 #define EPOCH_YEARS_SINCE_LEAP_CENTURY 370
21 #define isleap(y) ((((y) % 4) == 0 && ((y) % 100) != 0) || ((y) % 400) == 0)
23 int __tzcalc_limits (int __year);
25 extern const int __month_lengths[2][MONSPERYEAR];
27 void _tzset_unlocked_r (struct _reent *);
28 void _tzset_unlocked (void);
30 /* locks for multi-threading */
31 #ifdef __SINGLE_THREAD__
32 #define TZ_LOCK
33 #define TZ_UNLOCK
34 #else
35 #define TZ_LOCK __tz_lock()
36 #define TZ_UNLOCK __tz_unlock()
37 #endif
39 void __tz_lock (void);
40 void __tz_unlock (void);