summaryrefslogtreecommitdiff
path: root/libc/misc/time
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-12-03 00:34:49 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-12-03 00:34:49 +0000
commitc885bf5cf94a12202f849477a845d728cbd12889 (patch)
tree106e36d57ea684166ebde05a8d4be54664e0e6ce /libc/misc/time
parentca3067b8cec6e7ffd600c92510197df5aedd8606 (diff)
More hiding, including __mempcpy
Diffstat (limited to 'libc/misc/time')
-rw-r--r--libc/misc/time/adjtime.c3
-rw-r--r--libc/misc/time/time.c27
2 files changed, 20 insertions, 10 deletions
diff --git a/libc/misc/time/adjtime.c b/libc/misc/time/adjtime.c
index 2049bc896..fd33ff60d 100644
--- a/libc/misc/time/adjtime.c
+++ b/libc/misc/time/adjtime.c
@@ -1,3 +1,5 @@
+#define adjtimex __adjtimex
+
#include <limits.h>
#include <sys/time.h>
#include <sys/timex.h>
@@ -49,4 +51,3 @@ adjtime(const struct timeval * itv, struct timeval * otv)
}
return 0;
}
-
diff --git a/libc/misc/time/time.c b/libc/misc/time/time.c
index 4d3c43492..3c47cb879 100644
--- a/libc/misc/time/time.c
+++ b/libc/misc/time/time.c
@@ -184,6 +184,11 @@
extern struct tm __time_tm;
+extern struct tm *__localtime_r (__const time_t *__restrict __timer,
+ struct tm *__restrict __tp) attribute_hidden;
+
+extern struct tm *__localtime (__const time_t *__timer) attribute_hidden;
+
typedef struct {
long gmt_offset;
long dst_offset;
@@ -386,6 +391,8 @@ strong_alias(__asctime_r,asctime_r)
/**********************************************************************/
#ifdef L_clock
+#define times __times
+
#include <sys/times.h>
#ifndef __BCC__
@@ -452,12 +459,12 @@ clock_t clock(void)
/**********************************************************************/
#ifdef L_ctime
-char *ctime(const time_t *clock)
+char attribute_hidden *__ctime(const time_t *clock)
{
/* ANSI/ISO/SUSv3 say that ctime is equivalent to the following. */
- return __asctime(localtime(clock));
+ return __asctime(__localtime(clock));
}
-
+strong_alias(__ctime,ctime)
#endif
/**********************************************************************/
#ifdef L_ctime_r
@@ -466,7 +473,7 @@ char *ctime_r(const time_t *clock, char *buf)
{
struct tm xtm;
- return __asctime_r(localtime_r(clock, &xtm), buf);
+ return __asctime_r(__localtime_r(clock, &xtm), buf);
}
#endif
@@ -534,22 +541,23 @@ struct tm *gmtime_r(const time_t *__restrict timer,
/**********************************************************************/
#ifdef L_localtime
-struct tm *localtime(const time_t *timer)
+struct tm attribute_hidden *__localtime(const time_t *timer)
{
register struct tm *ptm = &__time_tm;
/* In this implementation, tzset() is called by localtime_r(). */
- localtime_r(timer, ptm); /* Can return NULL... */
+ __localtime_r(timer, ptm); /* Can return NULL... */
return ptm;
}
+strong_alias(__localtime,localtime)
#endif
/**********************************************************************/
#ifdef L_localtime_r
-struct tm *localtime_r(register const time_t *__restrict timer,
+struct tm attribute_hidden *__localtime_r(register const time_t *__restrict timer,
register struct tm *__restrict result)
{
TZLOCK;
@@ -562,6 +570,7 @@ struct tm *localtime_r(register const time_t *__restrict timer,
return result;
}
+strong_alias(__localtime_r,localtime_r)
#endif
/**********************************************************************/
@@ -1542,7 +1551,7 @@ char *__XL(strptime)(const char *__restrict buf, const char *__restrict format,
buf = o;
if (!code) { /* s */
- localtime_r(&t, tm); /* TODO: check for failure? */
+ __localtime_r(&t, tm); /* TODO: check for failure? */
i = 0;
do { /* Now copy values from tm to fields. */
fields[i] = ((int *) tm)[i];
@@ -1806,7 +1815,7 @@ void tzset(void)
TZLOCK;
- e = getenv(TZ); /* TZ env var always takes precedence. */
+ e = __getenv(TZ); /* TZ env var always takes precedence. */
#if defined(__UCLIBC_HAS_TZ_FILE__) && !defined(__UCLIBC_HAS_TZ_FILE_READ_MANY__)
/* Put this inside the lock to prevent the possiblity of two different