diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-10-30 22:41:57 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-10-30 22:41:57 +0000 |
commit | 072b56c97e17e8e69ddab5a735b5297387a88a70 (patch) | |
tree | 22eaee09956502609c240ddff8a108d8733521f9 /sys/arch/alpha/include/cdefs.h | |
parent | b85b15782739220b5bf2563ccdc7ac9e256a31d2 (diff) |
Merge to NetBSD 961020. Retained our kernel APIs where NetBSD has changed.
-Wall -Wstrict-prototypes -Wmissing-prototypes too.
Diffstat (limited to 'sys/arch/alpha/include/cdefs.h')
-rw-r--r-- | sys/arch/alpha/include/cdefs.h | 36 |
1 files changed, 32 insertions, 4 deletions
diff --git a/sys/arch/alpha/include/cdefs.h b/sys/arch/alpha/include/cdefs.h index c39c2620736..05b289d79c4 100644 --- a/sys/arch/alpha/include/cdefs.h +++ b/sys/arch/alpha/include/cdefs.h @@ -1,8 +1,8 @@ -/* $OpenBSD: cdefs.h,v 1.4 1996/07/29 22:58:30 niklas Exp $ */ -/* $NetBSD: cdefs.h,v 1.2 1995/05/03 00:13:55 cgd Exp $ */ +/* $OpenBSD: cdefs.h,v 1.5 1996/10/30 22:38:56 niklas Exp $ */ +/* $NetBSD: cdefs.h,v 1.5 1996/10/12 18:08:12 cgd Exp $ */ /* - * Copyright (c) 1995 Carnegie-Mellon University. + * Copyright (c) 1995, 1996 Carnegie-Mellon University. * All rights reserved. * * Author: Chris G. Demetriou @@ -33,7 +33,35 @@ #define _C_LABEL(x) _STRING(x) -#define __indr_references(sym,msg) /* nothing */ +#ifdef __ELF__ + +#define __indr_reference(sym,alias) /* nada, since we do weak refs */ + +#ifdef __STDC__ + +#define __weak_alias(alias,sym) \ + __asm__(".weak " #alias " ; " #alias " = " #sym) +#define __warn_references(sym,msg) \ + __asm__(".section .gnu.warning." #sym " ; .ascii \"" msg "\" ; .text") + +#else /* !__STDC__ */ + +#define __weak_alias(alias,sym) \ + __asm__(".weak alias ; alias = sym") +#define __warn_references(sym,msg) \ + __asm__(".section .gnu.warning.sym ; .ascii msg ; .text") + +#endif /* !__STDC__ */ + +#else /* !__ELF__ */ + +/* + * Very little to do if not ELF: we support neither indirect or + * weak references, and don't do anything with warnings. + */ + #define __warn_references(sym,msg) /* nothing */ +#endif /* !__ELF__ */ + #endif /* !_MACHINE_CDEFS_H_ */ |