1 /* $NetBSD: cdefs.h,v 1.4 1997/11/04 23:10:11 thorpej Exp $ */ 2 3 #ifndef _MACHINE_CDEFS_H_ 4 #define _MACHINE_CDEFS_H_ 5 6 #define _C_LABEL(x) x 7 8 #ifdef __GNUC__ 9 #define __RENAME(x) __asm__(___STRING(_C_LABEL(x))) 10 #endif 11 12 #define __DO_NOT_DO_WEAK__ /* NO WEAK SYMS IN LIBC YET */ 13 14 #ifndef __DO_NOT_DO_WEAK__ 15 #define __indr_reference(sym, alias) /* use weak symbols instead */ 16 #endif 17 18 #ifdef __STDC__ 19 20 #ifndef __DO_NOT_DO_WEAK__ 21 #define __weak_alias(alias, sym) \ 22 __asm__(".weak " #alias " ; " #alias " = " #sym); 23 #endif 24 25 #define __warn_references(sym, msg) \ 26 __asm__(".section .gnu.warning." #sym " ; .ascii \"" msg "\" ; .text"); 27 28 #else /* ! __STDC__ */ 29 30 #ifndef __DO_NOT_DO_WEAK__ 31 #define __weak_alias(alias, sym) \ 32 __asm__(".weak alias ; alias = sym"); 33 #endif 34 35 #define __warn_references(sym, msg) \ 36 __asm__(".section .gnu.warning.sym ; .ascii msg ; .text"); 37 38 #endif /* __STDC__ */ 39 40 #endif /* !_MACHINE_CDEFS_H_ */ 41