summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/libugly/mktime.c
diff options
context:
space:
mode:
authorMystery Man <unknown@mandriva.org>2002-09-04 21:08:29 +0000
committerMystery Man <unknown@mandriva.org>2002-09-04 21:08:29 +0000
commit11f3a2c1890eca25f56dbb751de6e8021aec46fa (patch)
tree6b7d5fcb8f4f5dd1b60b80a4e123606c6953a2c0 /mdk-stage1/dietlibc/libugly/mktime.c
parent5b6711eb067f905e3f67f11eb4188033d7f779f9 (diff)
downloaddrakx-11f3a2c1890eca25f56dbb751de6e8021aec46fa.tar
drakx-11f3a2c1890eca25f56dbb751de6e8021aec46fa.tar.gz
drakx-11f3a2c1890eca25f56dbb751de6e8021aec46fa.tar.bz2
drakx-11f3a2c1890eca25f56dbb751de6e8021aec46fa.tar.xz
drakx-11f3a2c1890eca25f56dbb751de6e8021aec46fa.zip
This commit was manufactured by cvs2svn to create tag 'V1_1_9_35mdk'.V1_1_9_35mdk
Diffstat (limited to 'mdk-stage1/dietlibc/libugly/mktime.c')
-rw-r--r--mdk-stage1/dietlibc/libugly/mktime.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/mdk-stage1/dietlibc/libugly/mktime.c b/mdk-stage1/dietlibc/libugly/mktime.c
deleted file mode 100644
index ee4dab6c1..000000000
--- a/mdk-stage1/dietlibc/libugly/mktime.c
+++ /dev/null
@@ -1,21 +0,0 @@
-#include <time.h>
-
-/* seconds per day */
-#define SPD 24*60*60
-
-extern unsigned int __spm[];
-
-time_t mktime(struct tm *t) {
- time_t x=0;
- unsigned int i;
- if (t->tm_year<70) return (time_t)(-1);
- for (i=70; i<t->tm_year; ++i) {
- x+=__isleap(i+1900)?366:365;
- }
- t->tm_yday=__spm[t->tm_mon] + t->tm_mday-1 + ((t->tm_mon>2) && __isleap(t->tm_year)?1:0);
- x+=t->tm_yday;
- /* x is now the number of days since Jan 1 1970 */
- t->tm_wday=(4+x)%7;
- x = x*SPD + t->tm_hour*60*60 + t->tm_min*60 + t->tm_sec;
- return x;
-}