+2013-06-11 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ * include/time.h (__clock_gettime): Add libc_hidden_proto.
+ * rt/clock_getcpuclockid.c (clock_getcpuclockid): Rename to
+ __clock_getcpuclockid. Add weak_alias and libc_hidden_def.
+ * sysdeps/unix/sysv/linux/clock_getcpuclockid.c
+ (clock_getcpuclockid): Likewise.
+ * rt/clock_getres.c (clock_getres): Rename to __clock_getres.
+ Add weak_alias and libc_hidden_def.
+ * sysdeps/posix/clock_getres.c (clock_getres): Likewise.
+ * rt/clock_gettime.c (clock_gettime): Rename to
+ __clock_gettime. Add weak_alias and libc_hidden_def.
+ * sysdeps/unix/clock_gettime.c (clock_gettime): Likewise.
+ * rt/clock_nanosleep.c (clock_nanosleep): Rename to
+ __clock_nanosleep. Add weak_alias and libc_hidden_def.
+ * sysdeps/unix/clock_nanosleep.c (clock_nanosleep): Likewise.
+ * sysdeps/unix/sysv/linux/clock_nanosleep.c (clock_nanosleep):
+ Likewise.
+ * rt/clock_settime.c (clock_settime): Rename to
+ __clock_settime. Add weak_alias and libc_hidden_def.
+ * sysdeps/unix/clock_settime.c (clock_settime): Likewise.
+
2013-06-10 Joseph Myers <joseph@codesourcery.com>
* mach/err_boot.sub: Remove trailing whitespace.
extern __typeof (clock_getres) __clock_getres;
extern __typeof (clock_gettime) __clock_gettime;
+libc_hidden_proto (__clock_gettime)
extern __typeof (clock_settime) __clock_settime;
extern __typeof (clock_nanosleep) __clock_nanosleep;
extern __typeof (clock_getcpuclockid) __clock_getcpuclockid;
#include <unistd.h>
int
-clock_getcpuclockid (pid_t pid, clockid_t *clock_id)
+__clock_getcpuclockid (pid_t pid, clockid_t *clock_id)
{
/* We don't allow any process ID but our own. */
if (pid != 0 && pid != getpid ())
return ENOENT;
#endif
}
-strong_alias (clock_getcpuclockid, __clock_getcpuclockid)
+weak_alias (__clock_getcpuclockid, clock_getcpuclockid)
/* Get resolution of clock. */
int
-clock_getres (clockid_t clock_id, struct timespec *res)
+__clock_getres (clockid_t clock_id, struct timespec *res)
{
__set_errno (ENOSYS);
return -1;
}
-strong_alias (clock_getres, __clock_getres)
+weak_alias (__clock_getres, clock_getres)
stub_warning (clock_getres)
/* Get current value of CLOCK and store it in TP. */
int
-clock_gettime (clockid_t clock_id, struct timespec *tp)
+__clock_gettime (clockid_t clock_id, struct timespec *tp)
{
__set_errno (ENOSYS);
return -1;
}
-strong_alias (clock_gettime, __clock_gettime)
+weak_alias (__clock_gettime, clock_gettime)
+libc_hidden_def (__clock_gettime)
stub_warning (clock_gettime)
#include <time.h>
int
-clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req,
- struct timespec *rem)
+__clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req,
+ struct timespec *rem)
{
if (__builtin_expect (req->tv_nsec, 0) < 0
|| __builtin_expect (req->tv_nsec, 0) >= 1000000000)
/* Not implemented. */
return ENOSYS;
}
-strong_alias (clock_nanosleep, __clock_nanosleep)
+weak_alias (__clock_nanosleep, clock_nanosleep)
stub_warning (clock_nanosleep)
/* Set CLOCK to value TP. */
int
-clock_settime (clockid_t clock_id, const struct timespec *tp)
+__clock_settime (clockid_t clock_id, const struct timespec *tp)
{
__set_errno (ENOSYS);
return -1;
}
-strong_alias (clock_settime, __clock_settime)
+weak_alias (__clock_settime, clock_settime)
stub_warning (clock_settime)
/* Get resolution of clock. */
int
-clock_getres (clockid_t clock_id, struct timespec *res)
+__clock_getres (clockid_t clock_id, struct timespec *res)
{
int retval = -1;
return retval;
}
-strong_alias (clock_getres, __clock_getres)
+weak_alias (__clock_getres, clock_getres)
/* Get current value of CLOCK and store it in TP. */
int
-clock_gettime (clockid_t clock_id, struct timespec *tp)
+__clock_gettime (clockid_t clock_id, struct timespec *tp)
{
int retval = -1;
return retval;
}
-strong_alias (clock_gettime, __clock_gettime)
+weak_alias (__clock_gettime, clock_gettime)
+libc_hidden_def (__clock_gettime)
/* This implementation assumes that these is only a `nanosleep' system
call. So we have to remap all other activities. */
int
-clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req,
- struct timespec *rem)
+__clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req,
+ struct timespec *rem)
{
struct timespec now;
return __builtin_expect (nanosleep (req, rem), 0) ? errno : 0;
}
-strong_alias (clock_nanosleep, __clock_nanosleep)
+weak_alias (__clock_nanosleep, clock_nanosleep)
/* Set CLOCK to value TP. */
int
-clock_settime (clockid_t clock_id, const struct timespec *tp)
+__clock_settime (clockid_t clock_id, const struct timespec *tp)
{
int retval;
return retval;
}
-strong_alias (clock_settime, __clock_settime)
+weak_alias (__clock_settime, clock_settime)
#include "kernel-posix-cpu-timers.h"
int
-clock_getcpuclockid (pid_t pid, clockid_t *clock_id)
+__clock_getcpuclockid (pid_t pid, clockid_t *clock_id)
{
/* The clockid_t value is a simple computation from the PID.
But we do a clock_getres call to validate it. */
else
return INTERNAL_SYSCALL_ERRNO (r, err);
}
-strong_alias (clock_getcpuclockid, __clock_getcpuclockid)
+weak_alias (__clock_getcpuclockid, clock_getcpuclockid)
/* We can simply use the syscall. The CPU clocks are not supported
with this function. */
int
-clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req,
- struct timespec *rem)
+__clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req,
+ struct timespec *rem)
{
INTERNAL_SYSCALL_DECL (err);
int r;
return (INTERNAL_SYSCALL_ERROR_P (r, err)
? INTERNAL_SYSCALL_ERRNO (r, err) : 0);
}
-strong_alias (clock_nanosleep, __clock_nanosleep)
+weak_alias (__clock_nanosleep, clock_nanosleep)