Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/pc532/include Add a WEAK_ALIAS macro.



details:   https://anonhg.NetBSD.org/src/rev/a71fbc7890d0
branches:  trunk
changeset: 556036:a71fbc7890d0
user:      simonb <simonb%NetBSD.org@localhost>
date:      Sat Dec 06 14:06:28 2003 +0000

description:
Add a WEAK_ALIAS macro.
While here, use #if instead of #ifdef for __STDC__ check.

diffstat:

 sys/arch/pc532/include/asm.h |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r c49814f34220 -r a71fbc7890d0 sys/arch/pc532/include/asm.h
--- a/sys/arch/pc532/include/asm.h      Sat Dec 06 14:04:33 2003 +0000
+++ b/sys/arch/pc532/include/asm.h      Sat Dec 06 14:06:28 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: asm.h,v 1.14 1998/12/02 21:16:46 thorpej Exp $ */
+/*     $NetBSD: asm.h,v 1.15 2003/12/06 14:06:28 simonb Exp $  */
 
 /* 
  * Mach Operating System
@@ -39,7 +39,7 @@
 #ifndef _MACHINE_ASM_H_ 
 #define _MACHINE_ASM_H_
 
-#ifdef __STDC__
+#if __STDC__
 #define CAT(a, b)      a ## b
 #else
 #define CAT(a, b)      a/**/b
@@ -215,6 +215,10 @@
 
 #endif
 
+#define        WEAK_ALIAS(alias,sym)                                           \
+       .weak _C_LABEL(alias);                                          \
+       _C_LABEL(alias) = _C_LABEL(sym)
+
 #ifdef __STDC__
 #define        __STRING(x)                     #x
 #define        WARN_REFERENCES(sym,msg)                                        \



Home | Main Index | Thread Index | Old Index