diff options
author | David 'Digit' Turner <digit@google.com> | 2010-12-06 12:23:16 +0100 |
---|---|---|
committer | David 'Digit' Turner <digit@google.com> | 2010-12-06 12:25:52 +0100 |
commit | 6481b91520150e9664a3c4abc5d2aebdce422f93 (patch) | |
tree | 8fadb7aadcc6002a7053da60d50b49704423a5f9 /libc/tzcode | |
parent | 23d24394e72715ddf580726655c8ba3fbcf11bfe (diff) | |
download | bionic-6481b91520150e9664a3c4abc5d2aebdce422f93.zip bionic-6481b91520150e9664a3c4abc5d2aebdce422f93.tar.gz bionic-6481b91520150e9664a3c4abc5d2aebdce422f93.tar.bz2 |
<time.h>: Add timegm(), timelocal() and others.
Add timegm(), timelocal(), time2posix() and posix2time() to the
C library.
Change-Id: I34d5771ed83dd994870a5ca58a511d01898b1ffb
Diffstat (limited to 'libc/tzcode')
-rw-r--r-- | libc/tzcode/localtime.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/libc/tzcode/localtime.c b/libc/tzcode/localtime.c index 85a913e..e442a03 100644 --- a/libc/tzcode/localtime.c +++ b/libc/tzcode/localtime.c @@ -60,6 +60,14 @@ static char elsieid[] = "@(#)localtime.c 8.3"; # define XLOG(x) do{}while (0) #endif +/* Add the following function implementations: + * timelocal() + * timegm() + * time2posix() + * posix2time() + */ +#define STD_INSPIRED 1 + /* THREAD-SAFETY SUPPORT GOES HERE */ static pthread_mutex_t _tzMutex = PTHREAD_MUTEX_INITIALIZER; @@ -1509,7 +1517,7 @@ struct tm * tmp; } #ifdef STD_INSPIRED - +#if 0 /* disabled because there is no good documentation for this function */ struct tm * offtime(timep, offset) const time_t * const timep; @@ -1517,7 +1525,7 @@ const long offset; { return gmtsub(timep, offset, &tmGlobal); } - +#endif /* 0 */ #endif /* defined STD_INSPIRED */ /* @@ -2106,6 +2114,7 @@ struct tm * const tmp; return result; } +#if 0 /* disable due to lack of clear documentation on this function */ time_t timeoff(tmp, offset) struct tm * const tmp; @@ -2120,6 +2129,7 @@ const long offset; return result; } +#endif /* 0 */ #endif /* defined STD_INSPIRED */ |