diff options
| -rw-r--r-- | src/time64.c | 24 | ||||
| -rw-r--r-- | src/time64.h | 4 |
2 files changed, 0 insertions, 28 deletions
diff --git a/src/time64.c b/src/time64.c index 8f82e39..371f2f9 100644 --- a/src/time64.c +++ b/src/time64.c | |||
| @@ -49,11 +49,6 @@ gmtime64_r() is a 64-bit equivalent of gmtime_r(). | |||
| 49 | #include "time64_limits.h" | 49 | #include "time64_limits.h" |
| 50 | 50 | ||
| 51 | 51 | ||
| 52 | /* Spec says except for stftime() and the _r() functions, these | ||
| 53 | all return static memory. Stabbings! */ | ||
| 54 | static struct TM Static_Return_Date; | ||
| 55 | static char Static_Return_String[35]; | ||
| 56 | |||
| 57 | static const char days_in_month[2][12] = { | 52 | static const char days_in_month[2][12] = { |
| 58 | {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}, | 53 | {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}, |
| 59 | {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}, | 54 | {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}, |
| @@ -815,22 +810,3 @@ char *ctime64_r( const Time64_T* time, char* result ) { | |||
| 815 | return asctime64_r( &date, result ); | 810 | return asctime64_r( &date, result ); |
| 816 | } | 811 | } |
| 817 | 812 | ||
| 818 | |||
| 819 | /* Non-thread safe versions of the above */ | ||
| 820 | struct TM *localtime64(const Time64_T *time) { | ||
| 821 | tzset(); | ||
| 822 | return localtime64_r(time, &Static_Return_Date); | ||
| 823 | } | ||
| 824 | |||
| 825 | struct TM *gmtime64(const Time64_T *time) { | ||
| 826 | return gmtime64_r(time, &Static_Return_Date); | ||
| 827 | } | ||
| 828 | |||
| 829 | char *asctime64( const struct TM* date ) { | ||
| 830 | return asctime64_r( date, Static_Return_String ); | ||
| 831 | } | ||
| 832 | |||
| 833 | char *ctime64( const Time64_T* time ) { | ||
| 834 | tzset(); | ||
| 835 | return asctime64(localtime64(time)); | ||
| 836 | } | ||
diff --git a/src/time64.h b/src/time64.h index 556e06f..bf174c6 100644 --- a/src/time64.h +++ b/src/time64.h | |||
| @@ -45,13 +45,9 @@ struct TM64 { | |||
| 45 | /* Declare public functions */ | 45 | /* Declare public functions */ |
| 46 | struct TM *gmtime64_r (const Time64_T *, struct TM *); | 46 | struct TM *gmtime64_r (const Time64_T *, struct TM *); |
| 47 | struct TM *localtime64_r (const Time64_T *, struct TM *); | 47 | struct TM *localtime64_r (const Time64_T *, struct TM *); |
| 48 | struct TM *gmtime64 (const Time64_T *); | ||
| 49 | struct TM *localtime64 (const Time64_T *); | ||
| 50 | 48 | ||
| 51 | char *asctime64 (const struct TM *); | ||
| 52 | char *asctime64_r (const struct TM *, char *); | 49 | char *asctime64_r (const struct TM *, char *); |
| 53 | 50 | ||
| 54 | char *ctime64 (const Time64_T*); | ||
| 55 | char *ctime64_r (const Time64_T*, char*); | 51 | char *ctime64_r (const Time64_T*, char*); |
| 56 | 52 | ||
| 57 | Time64_T timegm64 (const struct TM *); | 53 | Time64_T timegm64 (const struct TM *); |
