summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/alpha/include/cdefs.h47
-rw-r--r--sys/arch/amd64/include/cdefs.h21
-rw-r--r--sys/arch/arm/include/cdefs.h20
-rw-r--r--sys/arch/cats/include/cdefs.h3
-rw-r--r--sys/arch/hp300/include/cdefs.h3
-rw-r--r--sys/arch/hppa/include/cdefs.h19
-rw-r--r--sys/arch/hppa64/include/cdefs.h19
-rw-r--r--sys/arch/i386/include/cdefs.h21
-rw-r--r--sys/arch/luna88k/include/cdefs.h3
-rw-r--r--sys/arch/m68k/include/cdefs.h34
-rw-r--r--sys/arch/m88k/include/cdefs.h28
-rw-r--r--sys/arch/mac68k/include/cdefs.h3
-rw-r--r--sys/arch/mips64/include/cdefs.h18
-rw-r--r--sys/arch/mvme88k/include/cdefs.h3
-rw-r--r--sys/arch/powerpc/include/cdefs.h23
-rw-r--r--sys/arch/sgi/include/cdefs.h7
-rw-r--r--sys/arch/solbourne/include/cdefs.h3
-rw-r--r--sys/arch/sparc/include/cdefs.h37
-rw-r--r--sys/arch/sparc64/include/cdefs.h20
-rw-r--r--sys/arch/vax/include/cdefs.h34
-rw-r--r--sys/arch/zaurus/include/cdefs.h3
21 files changed, 166 insertions, 203 deletions
diff --git a/sys/arch/alpha/include/cdefs.h b/sys/arch/alpha/include/cdefs.h
index 0e91fdedcbf..afa8b48db88 100644
--- a/sys/arch/alpha/include/cdefs.h
+++ b/sys/arch/alpha/include/cdefs.h
@@ -1,5 +1,4 @@
-/* $OpenBSD: cdefs.h,v 1.8 2001/01/16 00:08:53 art Exp $ */
-/* $NetBSD: cdefs.h,v 1.5 1996/10/12 18:08:12 cgd Exp $ */
+/* $OpenBSD: cdefs.h,v 1.9 2005/11/24 20:46:41 deraadt Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -33,37 +32,17 @@
#define _C_LABEL(x) _STRING(x)
-#ifdef __ELF__
-
-#ifdef __STDC__
-
-#define __weak_alias(alias,sym) \
- __asm__(".weak " __STRING(alias) " ; " __STRING(alias) " = " __STRING(sym))
-#define __warn_references(sym,msg) \
- __asm__(".section .gnu.warning." __STRING(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__ */
-
-/*
- * We don't support indirect references and don't do anything with warnings.
- */
-
-#ifdef __STDC__
-#define __weak_alias(alias,sym) __asm__(".weakext " __STRING(alias) ", " __STRING(sym))
-#else /* !__STDC__ */
-#define __weak_alias(alias,sym) __asm__(".weakext alias, sym")
-#endif /* !__STDC__ */
-#define __warn_references(sym,msg) /* nothing */
-
-#endif /* !__ELF__ */
+#if defined(lint)
+#define __indr_reference(sym,alias) __lint_equal__(sym,alias)
+#define __warn_references(sym,msg)
+#define __weak_alias(alias,sym) __lint_equal__(sym,alias)
+#elif defined(__STDC__)
+#define __weak_alias(alias,sym) \
+ __asm__(".weak " __STRING(alias) " ; " \
+ __STRING(alias) " = " __STRING(sym))
+#define __warn_references(sym,msg) \
+ __asm__(".section .gnu.warning." __STRING(sym) \
+ " ; .ascii \"" msg "\" ; .text")
+#endif
#endif /* !_MACHINE_CDEFS_H_ */
diff --git a/sys/arch/amd64/include/cdefs.h b/sys/arch/amd64/include/cdefs.h
index 26606d3e377..b7f57f8c946 100644
--- a/sys/arch/amd64/include/cdefs.h
+++ b/sys/arch/amd64/include/cdefs.h
@@ -1,5 +1,4 @@
-/* $OpenBSD: cdefs.h,v 1.1 2004/01/28 01:39:39 mickey Exp $ */
-/* $NetBSD: cdefs.h,v 1.2 1995/03/23 20:10:26 jtc Exp $ */
+/* $OpenBSD: cdefs.h,v 1.2 2005/11/24 20:46:44 deraadt Exp $ */
/*
* Written by J.T. Conklin <jtc@wimsey.com> 01/17/95.
@@ -9,15 +8,17 @@
#ifndef _MACHINE_CDEFS_H_
#define _MACHINE_CDEFS_H_
-#if defined(__GNUC__) && defined(__STDC__)
-#define __weak_alias(alias,sym) \
- __asm__(".weak " __STRING(alias) " ; " __STRING(alias) " = " __STRING(sym))
-#define __warn_references(sym,msg) \
- __asm__(".section .gnu.warning." __STRING(sym) " ; .ascii \"" msg "\" ; .text")
-#else
-#define __indr_reference(sym,alias)
+#if defined(lint)
+#define __indr_reference(sym,alias) __lint_equal__(sym,alias)
#define __warn_references(sym,msg)
-#define __weak_alias(alias,sym)
+#define __weak_alias(alias,sym) __lint_equal__(sym,alias)
+#elif defined(__GNUC__) && defined(__STDC__)
+#define __weak_alias(alias,sym) \
+ __asm__(".weak " __STRING(alias) " ; " __STRING(alias) \
+ " = " __STRING(sym))
+#define __warn_references(sym,msg) \
+ __asm__(".section .gnu.warning." __STRING(sym) \
+ " ; .ascii \"" msg "\" ; .text")
#endif
#endif /* !_MACHINE_CDEFS_H_ */
diff --git a/sys/arch/arm/include/cdefs.h b/sys/arch/arm/include/cdefs.h
index ddb29ed5939..324c07ef9c4 100644
--- a/sys/arch/arm/include/cdefs.h
+++ b/sys/arch/arm/include/cdefs.h
@@ -1,13 +1,19 @@
-/* $OpenBSD: cdefs.h,v 1.1 2004/02/01 05:09:49 drahn Exp $ */
-/* $NetBSD: cdefs.h,v 1.1 2001/01/10 19:02:05 bjh21 Exp $ */
+/* $OpenBSD: cdefs.h,v 1.2 2005/11/24 20:46:44 deraadt Exp $ */
#ifndef _MACHINE_CDEFS_H_
#define _MACHINE_CDEFS_H_
-#define __weak_alias(alias,sym) \
- __asm__(".weak " __STRING(alias) " ; " __STRING(alias) " = " __STRING(sym))
-#define __warn_references(sym,msg) \
- __asm__(".section .gnu.warning." __STRING(sym) " ; .ascii \"" msg "\" ; .text")
-
+#if defined(lint)
+#define __indr_reference(sym,alias) __lint_equal__(sym,alias)
+#define __warn_references(sym,msg)
+#define __weak_alias(alias,sym) __lint_equal__(sym,alias)
+#elif defined(__GNUC__) && defined(__STDC__)
+#define __weak_alias(alias,sym) \
+ __asm__(".weak " __STRING(alias) " ; " __STRING(alias) \
+ " = " __STRING(sym))
+#define __warn_references(sym,msg) \
+ __asm__(".section .gnu.warning." __STRING(sym) \
+ " ; .ascii \"" msg "\" ; .text")
+#endif
#endif /* !_MACHINE_CDEFS_H_ */
diff --git a/sys/arch/cats/include/cdefs.h b/sys/arch/cats/include/cdefs.h
index 254915b785e..ec0b6021cd7 100644
--- a/sys/arch/cats/include/cdefs.h
+++ b/sys/arch/cats/include/cdefs.h
@@ -1,4 +1,3 @@
-/* $OpenBSD: cdefs.h,v 1.1 2004/02/01 05:12:54 drahn Exp $ */
-/* $NetBSD: cdefs.h,v 1.3 2001/11/25 15:55:55 thorpej Exp $ */
+/* $OpenBSD: cdefs.h,v 1.2 2005/11/24 20:46:44 deraadt Exp $ */
#include <arm/cdefs.h>
diff --git a/sys/arch/hp300/include/cdefs.h b/sys/arch/hp300/include/cdefs.h
index ae4d3bb01f5..a06bff6b7c7 100644
--- a/sys/arch/hp300/include/cdefs.h
+++ b/sys/arch/hp300/include/cdefs.h
@@ -1,5 +1,4 @@
-/* $OpenBSD: cdefs.h,v 1.2 1997/01/12 15:13:32 downsj Exp $ */
-/* $NetBSD: cdefs.h,v 1.1 1995/01/19 01:41:56 jtc Exp $ */
+/* $OpenBSD: cdefs.h,v 1.3 2005/11/24 20:46:44 deraadt Exp $ */
#ifndef _MACHINE_CDEFS_H_
#define _MACHINE_CDEFS_H_
diff --git a/sys/arch/hppa/include/cdefs.h b/sys/arch/hppa/include/cdefs.h
index 9bf6736a910..ca8a9abe7f3 100644
--- a/sys/arch/hppa/include/cdefs.h
+++ b/sys/arch/hppa/include/cdefs.h
@@ -1,5 +1,4 @@
-/* $OpenBSD: cdefs.h,v 1.7 2002/08/29 01:15:21 mickey Exp $ */
-/* $NetBSD: cdefs.h,v 1.5 1996/10/12 18:08:12 cgd Exp $ */
+/* $OpenBSD: cdefs.h,v 1.8 2005/11/24 20:46:45 deraadt Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -31,9 +30,17 @@
#ifndef _MACHINE_CDEFS_H_
#define _MACHINE_CDEFS_H_
-#define __weak_alias(alias,sym) \
- __asm__(".export " __STRING(alias) ", entry\n\t.weak " __STRING(alias) "\n\t" __STRING(alias) " = " __STRING(sym))
-#define __warn_references(sym,msg) \
- __asm__(".section .gnu.warning." __STRING(sym) "\n\t.ascii \"" msg "\"\n\t.text")
+#if defined(lint)
+#define __indr_reference(sym,alias) __lint_equal__(sym,alias)
+#define __warn_references(sym,msg)
+#define __weak_alias(alias,sym) __lint_equal__(sym,alias)
+#elif defined(__GNUC__) && defined(__STDC__)
+#define __weak_alias(alias,sym) \
+ __asm__(".export " __STRING(alias) ", entry\n\t.weak " \
+ __STRING(alias) "\n\t" __STRING(alias) " = " __STRING(sym))
+#define __warn_references(sym,msg) \
+ __asm__(".section .gnu.warning." __STRING(sym) \
+ "\n\t.ascii \"" msg "\"\n\t.text")
+#endif
#endif /* !_MACHINE_CDEFS_H_ */
diff --git a/sys/arch/hppa64/include/cdefs.h b/sys/arch/hppa64/include/cdefs.h
index 8e7e74a501b..56eba5e4377 100644
--- a/sys/arch/hppa64/include/cdefs.h
+++ b/sys/arch/hppa64/include/cdefs.h
@@ -1,5 +1,4 @@
-/* $OpenBSD: cdefs.h,v 1.1 2005/04/01 10:40:48 mickey Exp $ */
-/* $NetBSD: cdefs.h,v 1.5 1996/10/12 18:08:12 cgd Exp $ */
+/* $OpenBSD: cdefs.h,v 1.2 2005/11/24 20:46:45 deraadt Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -31,9 +30,17 @@
#ifndef _MACHINE_CDEFS_H_
#define _MACHINE_CDEFS_H_
-#define __weak_alias(alias,sym) \
- __asm__(".export " __STRING(alias) ", entry\n\t.weak " __STRING(alias) "\n\t" __STRING(alias) " = " __STRING(sym))
-#define __warn_references(sym,msg) \
- __asm__(".section .gnu.warning." __STRING(sym) "\n\t.ascii \"" msg "\"\n\t.text")
+#if defined(lint)
+#define __indr_reference(sym,alias) __lint_equal__(sym,alias)
+#define __warn_references(sym,msg)
+#define __weak_alias(alias,sym) __lint_equal__(sym,alias)
+#elif defined(__GNUC__) && defined(__STDC__)
+#define __weak_alias(alias,sym) \
+ __asm__(".export " __STRING(alias) ", entry\n\t.weak " \
+ __STRING(alias) "\n\t" __STRING(alias) " = " __STRING(sym))
+#define __warn_references(sym,msg) \
+ __asm__(".section .gnu.warning." __STRING(sym) \
+ "\n\t.ascii \"" msg "\"\n\t.text")
+#endif
#endif /* !_MACHINE_CDEFS_H_ */
diff --git a/sys/arch/i386/include/cdefs.h b/sys/arch/i386/include/cdefs.h
index b2a8cb5b919..34b9f77ca6f 100644
--- a/sys/arch/i386/include/cdefs.h
+++ b/sys/arch/i386/include/cdefs.h
@@ -1,5 +1,4 @@
-/* $OpenBSD: cdefs.h,v 1.8 2003/04/17 03:42:14 drahn Exp $ */
-/* $NetBSD: cdefs.h,v 1.2 1995/03/23 20:10:26 jtc Exp $ */
+/* $OpenBSD: cdefs.h,v 1.9 2005/11/24 20:46:45 deraadt Exp $ */
/*
* Written by J.T. Conklin <jtc@wimsey.com> 01/17/95.
@@ -9,15 +8,17 @@
#ifndef _MACHINE_CDEFS_H_
#define _MACHINE_CDEFS_H_
-#if defined(__GNUC__) && defined(__STDC__)
-#define __weak_alias(alias,sym) \
- __asm__(".weak " __STRING(alias) " ; " __STRING(alias) " = " __STRING(sym))
-#define __warn_references(sym,msg) \
- __asm__(".section .gnu.warning." __STRING(sym) " ; .ascii \"" msg "\" ; .text")
-#else
-#define __indr_reference(sym,alias)
+#if defined(lint)
+#define __indr_reference(sym,alias) __lint_equal__(sym,alias)
#define __warn_references(sym,msg)
-#define __weak_alias(alias,sym)
+#define __weak_alias(alias,sym) __lint_equal__(sym,alias)
+#elif defined(__GNUC__) && defined(__STDC__)
+#define __weak_alias(alias,sym) \
+ __asm__(".weak " __STRING(alias) " ; " \
+ __STRING(alias) " = " __STRING(sym))
+#define __warn_references(sym,msg) \
+ __asm__(".section .gnu.warning." __STRING(sym) \
+ " ; .ascii \"" msg "\" ; .text")
#endif
#endif /* !_MACHINE_CDEFS_H_ */
diff --git a/sys/arch/luna88k/include/cdefs.h b/sys/arch/luna88k/include/cdefs.h
index 186642aa848..e94bfb0813c 100644
--- a/sys/arch/luna88k/include/cdefs.h
+++ b/sys/arch/luna88k/include/cdefs.h
@@ -1,3 +1,4 @@
-/* $OpenBSD: cdefs.h,v 1.3 2004/04/26 14:31:08 miod Exp $ */
+/* $OpenBSD: cdefs.h,v 1.4 2005/11/24 20:46:45 deraadt Exp $ */
/* public domain */
+
#include <m88k/cdefs.h>
diff --git a/sys/arch/m68k/include/cdefs.h b/sys/arch/m68k/include/cdefs.h
index bb108f0c3ce..52f09ebadce 100644
--- a/sys/arch/m68k/include/cdefs.h
+++ b/sys/arch/m68k/include/cdefs.h
@@ -1,5 +1,4 @@
-/* $OpenBSD: cdefs.h,v 1.7 2002/02/11 20:24:43 fgsch Exp $ */
-/* $NetBSD: cdefs.h,v 1.2 1995/03/23 20:10:33 jtc Exp $ */
+/* $OpenBSD: cdefs.h,v 1.8 2005/11/24 20:46:46 deraadt Exp $ */
/*
* Written by J.T. Conklin <jtc@wimsey.com> 01/17/95.
@@ -9,36 +8,21 @@
#ifndef _M68K_CDEFS_H_
#define _M68K_CDEFS_H_
-#ifdef __STDC__
#define _C_LABEL(x) _STRING(_ ## x)
-#else
-#define _C_LABEL(x) _STRING(_/**/x)
-#endif
-#ifdef __GNUC__
-#ifdef __STDC__
-#define __indr_reference(sym,alias) \
+#if defined(lint)
+#define __indr_reference(sym,alias) __lint_equal__(sym,alias)
+#define __warn_references(sym,msg)
+#define __weak_alias(alias,sym) __lint_equal__(sym,alias)
+#elif defined(__GNUC__) && defined(__STDC__)
+#define __indr_reference(sym,alias) \
__asm__(".stabs \"_" #alias "\",11,0,0,0"); \
__asm__(".stabs \"_" #sym "\",1,0,0,0")
-#define __warn_references(sym,msg) \
+#define __warn_references(sym,msg) \
__asm__(".stabs \"" msg "\",30,0,0,0"); \
__asm__(".stabs \"_" #sym "\",1,0,0,0")
-#define __weak_alias(alias,sym) \
+#define __weak_alias(alias,sym) \
__asm__(".weak _" #alias "; _" #alias "= _" __STRING(sym))
-#else
-#define __indr_reference(sym,alias) \
- __asm__(".stabs \"_/**/alias\",11,0,0,0"); \
- __asm__(".stabs \"_/**/sym\",1,0,0,0")
-#define __warn_references(sym,msg) \
- __asm__(".stabs msg,30,0,0,0"); \
- __asm__(".stabs \"_/**/sym\",1,0,0,0")
-#define __weak_alias(alias,sym) \
- __asm__(".weak _/**/alias; _/**/alias = _/**/sym")
-#endif
-#else
-#define __indr_reference(sym,alias)
-#define __warn_references(sym,msg)
-#define __weak_alias(alias,sym)
#endif
#endif /* !_M68K_CDEFS_H_ */
diff --git a/sys/arch/m88k/include/cdefs.h b/sys/arch/m88k/include/cdefs.h
index 174ff6cdbf7..0e378c17536 100644
--- a/sys/arch/m88k/include/cdefs.h
+++ b/sys/arch/m88k/include/cdefs.h
@@ -1,5 +1,4 @@
-/* $OpenBSD: cdefs.h,v 1.1 2004/04/26 12:34:05 miod Exp $ */
-/* $NetBSD: cdefs.h,v 1.2 1995/03/23 20:10:48 jtc Exp $ */
+/* $OpenBSD: cdefs.h,v 1.2 2005/11/24 20:46:46 deraadt Exp $ */
/*
* Written by J.T. Conklin <jtc@wimsey.com> 01/17/95.
@@ -9,32 +8,21 @@
#ifndef __MACHINE_CDEFS_H__
#define __MACHINE_CDEFS_H__
-#ifdef __STDC__
#define _C_LABEL(name) _ ## name
-#else
-#define _C_LABEL(name) _/**/name
-#endif
-#ifdef __GNUC__
-#ifdef __STDC__
-#define __indr_reference(sym,alias) \
+#if defined(lint)
+#define __indr_reference(sym,alias) __lint_equal__(sym,alias)
+#define __warn_references(sym,msg)
+#define __weak_alias(alias,sym) __lint_equal__(sym,alias)
+#elif defined(__GNUC__) && defined(__STDC__)
+#define __indr_reference(sym,alias) \
__asm__(".stabs \"_" #alias "\",11,0,0,0"); \
__asm__(".stabs \"_" #sym "\",1,0,0,0")
-#define __warn_references(sym,msg) \
+#define __warn_references(sym,msg) \
__asm__(".stabs \"" msg "\",30,0,0,0"); \
__asm__(".stabs \"_" #sym "\",1,0,0,0")
#define __weak_alias(alias,sym) \
__asm__(".weak _" #alias "; _" #alias "= _" __STRING(sym))
-#else
-#define __indr_reference(sym,alias) \
- __asm__(".stabs \"_/**/alias\",11,0,0,0"); \
- __asm__(".stabs \"_/**/sym\",1,0,0,0")
-#define __warn_references(sym,msg) \
- __asm__(".stabs msg,30,0,0,0"); \
- __asm__(".stabs \"_/**/sym\",1,0,0,0")
-#define __weak_alias(alias,sym) \
- __asm__(".weak _/**/alias; _/**/alias = _/**/sym")
-#endif
#endif
#endif /* __MACHINE_CDEFS_H__ */
diff --git a/sys/arch/mac68k/include/cdefs.h b/sys/arch/mac68k/include/cdefs.h
index 29baa64d01b..cbacbe37e0f 100644
--- a/sys/arch/mac68k/include/cdefs.h
+++ b/sys/arch/mac68k/include/cdefs.h
@@ -1,5 +1,4 @@
-/* $OpenBSD: cdefs.h,v 1.4 1997/11/30 06:12:23 gene Exp $ */
-/* $NetBSD: cdefs.h,v 1.2 1996/05/05 06:17:34 briggs Exp $ */
+/* $OpenBSD: cdefs.h,v 1.5 2005/11/24 20:46:46 deraadt Exp $ */
#ifndef _MAC68K_CDEFS_H_
#define _MAC68K_CDEFS_H_
diff --git a/sys/arch/mips64/include/cdefs.h b/sys/arch/mips64/include/cdefs.h
index f88f9e05c10..75bc3dbc6e9 100644
--- a/sys/arch/mips64/include/cdefs.h
+++ b/sys/arch/mips64/include/cdefs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cdefs.h,v 1.2 2004/08/10 21:10:56 pefo Exp $ */
+/* $OpenBSD: cdefs.h,v 1.3 2005/11/24 20:46:47 deraadt Exp $ */
/*
* Copyright (c) 2002-2003 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -32,10 +32,18 @@
#define _C_LABEL(x) _STRING(x)
-#define __weak_alias(alias,sym) \
- __asm__(".weak " __STRING(alias) " ; " __STRING(alias) " = " __STRING(sym))
-#define __warn_references(sym,msg) \
- __asm__(".section .gnu.warning." __STRING(sym) " ; .ascii \"" msg "\" ; .text")
+#if defined(lint)
+#define __indr_reference(sym,alias) __lint_equal__(sym,alias)
+#define __warn_references(sym,msg)
+#define __weak_alias(alias,sym) __lint_equal__(sym,alias)
+#elif defined(__GNUC__) && defined(__STDC__)
+#define __weak_alias(alias,sym) \
+ __asm__(".weak " __STRING(alias) " ; " \
+ __STRING(alias) " = " __STRING(sym))
+#define __warn_references(sym,msg) \
+ __asm__(".section .gnu.warning." __STRING(sym) \
+ " ; .ascii \"" msg "\" ; .text")
#define __indr_references(sym,msg) /* nothing */
+#endif
#endif /* !_MIPS_CDEFS_H_ */
diff --git a/sys/arch/mvme88k/include/cdefs.h b/sys/arch/mvme88k/include/cdefs.h
index 5de217b2b8a..56a6abacdae 100644
--- a/sys/arch/mvme88k/include/cdefs.h
+++ b/sys/arch/mvme88k/include/cdefs.h
@@ -1,3 +1,4 @@
-/* $OpenBSD: cdefs.h,v 1.12 2004/04/26 14:31:11 miod Exp $ */
+/* $OpenBSD: cdefs.h,v 1.13 2005/11/24 20:46:47 deraadt Exp $ */
/* public domain */
+
#include <m88k/cdefs.h>
diff --git a/sys/arch/powerpc/include/cdefs.h b/sys/arch/powerpc/include/cdefs.h
index 8e2efdb3eaf..373a5fac357 100644
--- a/sys/arch/powerpc/include/cdefs.h
+++ b/sys/arch/powerpc/include/cdefs.h
@@ -1,5 +1,4 @@
-/* $OpenBSD: cdefs.h,v 1.4 2002/02/19 03:17:45 drahn Exp $ */
-/* $NetBSD: cdefs.h,v 1.1 1996/09/30 16:34:21 ws Exp $ */
+/* $OpenBSD: cdefs.h,v 1.5 2005/11/24 20:46:47 deraadt Exp $ */
/*
* Written by J.T. Conklin <jtc@wimsey.com> 01/17/95.
@@ -9,15 +8,19 @@
#ifndef _POWERPC_CDEFS_H_
#define _POWERPC_CDEFS_H_
-#ifdef __STDC__
#define _C_LABEL(x) _STRING(_ ## x)
-#else
-#define _C_LABEL(x) _STRING(_/**/x)
-#endif
-#define __weak_alias(alias,sym) \
- __asm__(".weak " __STRING(alias) " ; " __STRING(alias) " = " __STRING(sym))
-#define __warn_references(sym,msg) \
- __asm__(".section .gnu.warning." __STRING(sym) " ; .ascii \"" msg "\" ; .text")
+#if defined(lint)
+#define __indr_reference(sym,alias) __lint_equal__(sym,alias)
+#define __warn_references(sym,msg)
+#define __weak_alias(alias,sym) __lint_equal__(sym,alias)
+#elif defined(__GNUC__) && defined(__STDC__)
+#define __weak_alias(alias,sym) \
+ __asm__(".weak " __STRING(alias) " ; " \
+ __STRING(alias) " = " __STRING(sym))
+#define __warn_references(sym,msg) \
+ __asm__(".section .gnu.warning." __STRING(sym) \
+ " ; .ascii \"" msg "\" ; .text")
+#endif
#endif /* !_POWERPC_CDEFS_H_ */
diff --git a/sys/arch/sgi/include/cdefs.h b/sys/arch/sgi/include/cdefs.h
index 476278fafec..482bc55fea0 100644
--- a/sys/arch/sgi/include/cdefs.h
+++ b/sys/arch/sgi/include/cdefs.h
@@ -1,5 +1,10 @@
-/* $OpenBSD: cdefs.h,v 1.1 2004/08/06 21:12:18 pefo Exp $ */
+/* $OpenBSD: cdefs.h,v 1.2 2005/11/24 20:46:48 deraadt Exp $ */
/* Use Mips generic include file */
#include <mips64/cdefs.h>
+
+#if defined(lint) && !defined(__MIPSEB__)
+#define __MIPSEB__
+#undef __MIPSEL__
+#endif
diff --git a/sys/arch/solbourne/include/cdefs.h b/sys/arch/solbourne/include/cdefs.h
index 35b4252fa22..7efefacd1ae 100644
--- a/sys/arch/solbourne/include/cdefs.h
+++ b/sys/arch/solbourne/include/cdefs.h
@@ -1,3 +1,4 @@
-/* $OpenBSD: cdefs.h,v 1.1 2005/04/19 21:30:17 miod Exp $ */
+/* $OpenBSD: cdefs.h,v 1.2 2005/11/24 20:46:48 deraadt Exp $ */
/* public domain */
+
#include <sparc/cdefs.h> \ No newline at end of file
diff --git a/sys/arch/sparc/include/cdefs.h b/sys/arch/sparc/include/cdefs.h
index 711af194ebc..fc3d0f6244d 100644
--- a/sys/arch/sparc/include/cdefs.h
+++ b/sys/arch/sparc/include/cdefs.h
@@ -1,5 +1,4 @@
-/* $OpenBSD: cdefs.h,v 1.8 2002/08/11 12:13:16 art Exp $ */
-/* $NetBSD: cdefs.h,v 1.3 1996/12/27 20:51:31 pk Exp $ */
+/* $OpenBSD: cdefs.h,v 1.9 2005/11/24 20:46:48 deraadt Exp $ */
/*
* Written by J.T. Conklin <jtc@wimsey.com> 01/17/95.
@@ -9,33 +8,19 @@
#ifndef _MACHINE_CDEFS_H_
#define _MACHINE_CDEFS_H_
-#ifdef __STDC__
#define _C_LABEL(x) _STRING(_ ## x)
-#else
-#define _C_LABEL(x) _STRING(_/**/x)
-#endif
-
-#if defined(__GNUC__) && defined(__STDC__)
-#ifdef __ELF__
-#define __weak_alias(alias,sym) \
- __asm__(".weak " __STRING(alias) " ; " __STRING(alias) " = " __STRING(sym))
-#define __warn_references(sym,msg) \
- __asm__(".section .gnu.warning." __STRING(sym) " ; .ascii \"" msg "\" ; .text")
-#else
-#define __indr_reference(sym,alias) \
- __asm__(".stabs \"_" #alias "\",11,0,0,0"); \
- __asm__(".stabs \"_" #sym "\",1,0,0,0")
-#define __warn_references(sym,msg) \
- __asm__(".stabs \"" msg "\",30,0,0,0"); \
- __asm__(".stabs \"_" #sym "\",1,0,0,0")
-#define __weak_alias(alias,sym) \
- __asm__(".weak _" #alias "; _" #alias "= _" __STRING(sym))
-#endif /* __ELF__ */
-#else
-#define __indr_reference(sym,alias)
+#if defined(lint)
+#define __indr_reference(sym,alias) __lint_equal__(sym,alias)
#define __warn_references(sym,msg)
-#define __weak_alias(alias,sym)
+#define __weak_alias(alias,sym) __lint_equal__(sym,alias)
+#elif defined(__GNUC__) && defined(__STDC__)
+#define __weak_alias(alias,sym) \
+ __asm__(".weak " __STRING(alias) " ; " \
+ __STRING(alias) " = " __STRING(sym))
+#define __warn_references(sym,msg) \
+ __asm__(".section .gnu.warning." __STRING(sym) \
+ " ; .ascii \"" msg "\" ; .text")
#endif
#endif /* !_MACHINE_CDEFS_H_ */
diff --git a/sys/arch/sparc64/include/cdefs.h b/sys/arch/sparc64/include/cdefs.h
index 5bc7bea1144..93df14543e5 100644
--- a/sys/arch/sparc64/include/cdefs.h
+++ b/sys/arch/sparc64/include/cdefs.h
@@ -1,13 +1,19 @@
-/* $OpenBSD: cdefs.h,v 1.2 2001/08/23 16:10:46 art Exp $ */
-/* $NetBSD: cdefs.h,v 1.3 1999/03/20 01:40:26 thorpej Exp $ */
+/* $OpenBSD: cdefs.h,v 1.3 2005/11/24 20:46:48 deraadt Exp $ */
#ifndef _MACHINE_CDEFS_H_
#define _MACHINE_CDEFS_H_
-#define __weak_alias(alias,sym) \
- __asm__(".weak " __STRING(alias) " ; " __STRING(alias) " = " __STRING(sym))
-#define __warn_references(sym,msg) \
- __asm__(".section .gnu.warning." __STRING(sym) " ; .ascii \"" msg "\" ; .text")
-
+#if defined(lint)
+#define __indr_reference(sym,alias) __lint_equal__(sym,alias)
+#define __warn_references(sym,msg)
+#define __weak_alias(alias,sym) __lint_equal__(sym,alias)
+#elif defined(__GNUC__) && defined(__STDC__)
+#define __weak_alias(alias,sym) \
+ __asm__(".weak " __STRING(alias) " ; " \
+ __STRING(alias) " = " __STRING(sym))
+#define __warn_references(sym,msg) \
+ __asm__(".section .gnu.warning." __STRING(sym) \
+ " ; .ascii \"" msg "\" ; .text")
+#endif
#endif /* !_MACHINE_CDEFS_H_ */
diff --git a/sys/arch/vax/include/cdefs.h b/sys/arch/vax/include/cdefs.h
index 8c2669baa39..011795aa57f 100644
--- a/sys/arch/vax/include/cdefs.h
+++ b/sys/arch/vax/include/cdefs.h
@@ -1,5 +1,4 @@
-/* $OpenBSD: cdefs.h,v 1.5 2002/02/11 20:31:44 fgsch Exp $ */
-/* $NetBSD: cdefs.h,v 1.2 1995/03/23 20:10:53 jtc Exp $ */
+/* $OpenBSD: cdefs.h,v 1.6 2005/11/24 20:46:48 deraadt Exp $ */
/*
* Written by J.T. Conklin <jtc@wimsey.com> 01/17/95.
@@ -9,36 +8,21 @@
#ifndef _MACHINE_CDEFS_H_
#define _MACHINE_CDEFS_H_
-#ifdef __STDC__
#define _C_LABEL(x) _STRING(_ ## x)
-#else
-#define _C_LABEL(x) _STRING(_/**/x)
-#endif
-#ifdef __GNUC__
-#ifdef __STDC__
-#define __indr_reference(sym,alias) \
+#if defined(lint)
+#define __indr_reference(sym,alias) __lint_equal__(sym,alias)
+#define __warn_references(sym,msg)
+#define __weak_alias(alias,sym) __lint_equal__(sym,alias)
+#elif defined(__GNUC__) && defined(__STDC__)
+#define __indr_reference(sym,alias) \
__asm__(".stabs \"_" #alias "\",11,0,0,0"); \
__asm__(".stabs \"_" #sym "\",1,0,0,0")
-#define __warn_references(sym,msg) \
+#define __warn_references(sym,msg) \
__asm__(".stabs \"" msg "\",30,0,0,0"); \
__asm__(".stabs \"_" #sym "\",1,0,0,0")
-#define __weak_alias(alias,sym) \
+#define __weak_alias(alias,sym) \
__asm__(".weak _" #alias "; _" #alias "= _" __STRING(sym))
-#else
-#define __indr_reference(sym,alias) \
- __asm__(".stabs \"_/**/alias\",11,0,0,0"); \
- __asm__(".stabs \"_/**/sym\",1,0,0,0")
-#define __warn_references(sym,msg) \
- __asm__(".stabs msg,30,0,0,0"); \
- __asm__(".stabs \"_/**/sym\",1,0,0,0")
-#define __weak_alias(alias,sym) \
- __asm__(".weak _/**/alias; _/**/alias = _/**/sym")
-#endif
-#else
-#define __indr_reference(sym,alias)
-#define __warn_references(sym,alias)
-#define __weak_alias(sym,alias)
#endif
#endif /* !_MACHINE_CDEFS_H_ */
diff --git a/sys/arch/zaurus/include/cdefs.h b/sys/arch/zaurus/include/cdefs.h
index 32afc645781..6b8c9457831 100644
--- a/sys/arch/zaurus/include/cdefs.h
+++ b/sys/arch/zaurus/include/cdefs.h
@@ -1,4 +1,3 @@
-/* $OpenBSD: cdefs.h,v 1.1 2004/12/31 00:04:35 drahn Exp $ */
-/* $NetBSD: cdefs.h,v 1.3 2001/11/25 15:55:55 thorpej Exp $ */
+/* $OpenBSD: cdefs.h,v 1.2 2005/11/24 20:46:49 deraadt Exp $ */
#include <arm/cdefs.h>