From 017ce82cf56feb298f159ff17d12f2d7acd955d5 Mon Sep 17 00:00:00 2001 From: Philip Guenther Date: Sat, 12 Sep 2015 13:13:35 +0000 Subject: Make these timer_* stubs weak symbols Provide declarations to reduce noise when using -Wmissing-prototypes --- lib/libc/sys/timer_create.c | 6 ++++-- lib/libc/sys/timer_delete.c | 7 ++++--- lib/libc/sys/timer_getoverrun.c | 7 ++++--- lib/libc/sys/timer_gettime.c | 7 +++---- lib/libc/sys/timer_settime.c | 8 ++++---- 5 files changed, 19 insertions(+), 16 deletions(-) diff --git a/lib/libc/sys/timer_create.c b/lib/libc/sys/timer_create.c index e7abf4196e4..5add616918e 100644 --- a/lib/libc/sys/timer_create.c +++ b/lib/libc/sys/timer_create.c @@ -1,4 +1,4 @@ -/* $OpenBSD: timer_create.c,v 1.6 2005/08/08 08:05:37 espie Exp $ */ +/* $OpenBSD: timer_create.c,v 1.7 2015/09/12 13:13:34 guenther Exp $ */ #include #include @@ -6,7 +6,9 @@ struct sigevent; -/* ARGSUSED */ +int timer_create(clockid_t, struct sigevent *, timer_t *); +PROTO_DEPRECATED(timer_create); + int timer_create(clockid_t clock_id, struct sigevent *evp, timer_t *timerid) { diff --git a/lib/libc/sys/timer_delete.c b/lib/libc/sys/timer_delete.c index d108d4584d7..c4d3f79ec2a 100644 --- a/lib/libc/sys/timer_delete.c +++ b/lib/libc/sys/timer_delete.c @@ -1,10 +1,11 @@ -/* $OpenBSD: timer_delete.c,v 1.5 2005/08/08 08:05:37 espie Exp $ */ +/* $OpenBSD: timer_delete.c,v 1.6 2015/09/12 13:13:34 guenther Exp $ */ -#include #include #include -/* ARGSUSED */ +int timer_delete(timer_t); +PROTO_DEPRECATED(timer_delete); + int timer_delete(timer_t timerid) { diff --git a/lib/libc/sys/timer_getoverrun.c b/lib/libc/sys/timer_getoverrun.c index 0f981c25802..61d9fbe1d42 100644 --- a/lib/libc/sys/timer_getoverrun.c +++ b/lib/libc/sys/timer_getoverrun.c @@ -1,10 +1,11 @@ -/* $OpenBSD: timer_getoverrun.c,v 1.5 2005/08/08 08:05:37 espie Exp $ */ +/* $OpenBSD: timer_getoverrun.c,v 1.6 2015/09/12 13:13:34 guenther Exp $ */ -#include #include #include -/* ARGSUSED */ +int timer_getoverrun(timer_t); +PROTO_DEPRECATED(timer_getoverrun); + int timer_getoverrun(timer_t timerid) { diff --git a/lib/libc/sys/timer_gettime.c b/lib/libc/sys/timer_gettime.c index 41391bf6b51..44c73706c7d 100644 --- a/lib/libc/sys/timer_gettime.c +++ b/lib/libc/sys/timer_gettime.c @@ -1,12 +1,11 @@ -/* $OpenBSD: timer_gettime.c,v 1.6 2005/08/08 08:05:37 espie Exp $ */ +/* $OpenBSD: timer_gettime.c,v 1.7 2015/09/12 13:13:34 guenther Exp $ */ -#include #include #include -struct itimerspec; +int timer_gettime(timer_t, struct itimerspec *); +PROTO_DEPRECATED(timer_gettime); -/* ARGSUSED */ int timer_gettime(timer_t timerid, struct itimerspec *value) { diff --git a/lib/libc/sys/timer_settime.c b/lib/libc/sys/timer_settime.c index f54a642dd6f..7a598fe9655 100644 --- a/lib/libc/sys/timer_settime.c +++ b/lib/libc/sys/timer_settime.c @@ -1,12 +1,12 @@ -/* $OpenBSD: timer_settime.c,v 1.6 2005/08/08 08:05:38 espie Exp $ */ +/* $OpenBSD: timer_settime.c,v 1.7 2015/09/12 13:13:34 guenther Exp $ */ -#include #include #include -struct itimerspec; +int timer_settime(timer_t, int, const struct itimerspec *, + struct itimerspec *); +PROTO_DEPRECATED(timer_settime); -/* ARGSUSED */ int timer_settime(timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue) -- cgit v1.2.3