summaryrefslogtreecommitdiff
path: root/sys/arch/pmax/include/cdefs.h
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1995-12-15 15:41:46 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1995-12-15 15:41:46 +0000
commit9fe93d4ccc38c1c266bc11cf1858eff1e1213d45 (patch)
tree634375adb7de21da77701a3420ba04b065f60af0 /sys/arch/pmax/include/cdefs.h
parent5a642facc913b85915ff39908ce690b11eb7fa8d (diff)
from netbsd:
Change mips __warn_references() macro to use the ELF warning features in binutils 2.6 and (patched) gcc 2.7.2. Only works with gcc in ANSI C mode, for now.
Diffstat (limited to 'sys/arch/pmax/include/cdefs.h')
-rw-r--r--sys/arch/pmax/include/cdefs.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/arch/pmax/include/cdefs.h b/sys/arch/pmax/include/cdefs.h
index 1b4a6cc51ee..47499b695ea 100644
--- a/sys/arch/pmax/include/cdefs.h
+++ b/sys/arch/pmax/include/cdefs.h
@@ -1,4 +1,4 @@
-/* $NetBSD: cdefs.h,v 1.3 1995/05/03 06:04:54 mellon Exp $ */
+/* $NetBSD: cdefs.h,v 1.4 1995/12/15 01:17:04 jonathan Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
@@ -33,6 +33,13 @@
#define _C_LABEL(x) _STRING(x)
#define __indr_references(sym,msg) /* nothing */
+
+#if defined __GNUC__ && defined __STDC__
+#define __warn_references(sym, msg) \
+ static const char __evoke_link_warning_##sym[] \
+ __attribute__ ((section (".gnu.warning." #sym))) = msg;
+#else
#define __warn_references(sym,msg) /* nothing */
+#endif
#endif /* !_MACHINE_CDEFS_H_ */