From 6ed5ccfb8ff780ada625c4ebc1c40ad5d6395e84 Mon Sep 17 00:00:00 2001 From: bde Date: Sat, 14 Sep 1996 03:00:32 +0000 Subject: Don't use __dead or __pure in user code. They were obfuscations for gcc >= 2.5 and no-ops for gcc >= 2.6. Converted to use __dead2 or __pure2 where it wasn't already done, except in math.h where use of __pure was mostly wrong. --- lib/libc/gen/err.c | 8 ++++---- lib/libc/locale/collate.c | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'lib/libc') diff --git a/lib/libc/gen/err.c b/lib/libc/gen/err.c index 63ef8a4..bf7d347 100644 --- a/lib/libc/gen/err.c +++ b/lib/libc/gen/err.c @@ -67,7 +67,7 @@ err_set_exit(void (*ef)(int)) err_exit = ef; } -__dead void +void #ifdef __STDC__ err(int eval, const char *fmt, ...) #else @@ -87,7 +87,7 @@ err(eval, fmt, va_alist) va_end(ap); } -__dead void +void verr(eval, fmt, ap) int eval; const char *fmt; @@ -109,7 +109,7 @@ verr(eval, fmt, ap) exit(eval); } -__dead void +void #if __STDC__ errx(int eval, const char *fmt, ...) #else @@ -129,7 +129,7 @@ errx(eval, fmt, va_alist) va_end(ap); } -__dead void +void verrx(eval, fmt, ap) int eval; const char *fmt; diff --git a/lib/libc/locale/collate.c b/lib/libc/locale/collate.c index ef73cef..20adda3 100644 --- a/lib/libc/locale/collate.c +++ b/lib/libc/locale/collate.c @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: collate.c,v 1.4 1995/05/30 05:40:40 rgrimes Exp $ + * $Id: collate.c,v 1.5 1995/10/23 20:08:24 ache Exp $ */ #include @@ -52,7 +52,7 @@ struct __collate_st_chain_pri __collate_chain_pri_table[TABLE_SIZE]; } \ } while(0) -__dead void __collate_err(int ex, const char *f) __dead2; +void __collate_err(int ex, const char *f) __dead2; int __collate_load_tables(encoding) @@ -163,7 +163,8 @@ __collate_strdup(s) return t; } -__dead void __collate_err(int ex, const char *f) +void +__collate_err(int ex, const char *f) { extern char *__progname; /* Program name, from crt0. */ const char *s; -- cgit v1.1