summaryrefslogtreecommitdiffstats
path: root/newlib/libc/time/month_lengths.c
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2014-09-12 16:38:10 +0000
committerJeff Johnston <jjohnstn@redhat.com>2014-09-12 16:38:10 +0000
commit43b3310bc9cb03c9625b0d248ea93392b21c0434 (patch)
treecb8f9a37124eb9a6c842f20005e9c1690c790f2b /newlib/libc/time/month_lengths.c
parentc9dded6775ca8a0934739f56c29337a893b5da7c (diff)
downloadcygnal-43b3310bc9cb03c9625b0d248ea93392b21c0434.tar.gz
cygnal-43b3310bc9cb03c9625b0d248ea93392b21c0434.tar.bz2
cygnal-43b3310bc9cb03c9625b0d248ea93392b21c0434.zip
2014-09-12 Jeff Johnston <jjohnstn@redhat.com>
* libc/time/month_lengths.c: Actually add file this time. * libc/time/tzcalc_limits.c: Ditto.
Diffstat (limited to 'newlib/libc/time/month_lengths.c')
-rw-r--r--newlib/libc/time/month_lengths.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/newlib/libc/time/month_lengths.c b/newlib/libc/time/month_lengths.c
new file mode 100644
index 000000000..764e70042
--- /dev/null
+++ b/newlib/libc/time/month_lengths.c
@@ -0,0 +1,14 @@
+/*
+ * month_lengths.c
+ *
+ * Array month_lengths[] is (indirectly) needed by tzset(), mktime(), gmtime()
+ * and localtime(). To break any dependencies, this array is moved to separate
+ * source file.
+ */
+
+#include "local.h"
+
+_CONST int month_lengths[2][MONSPERYEAR] = {
+ {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
+ {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}
+} ;