1997-11-05 02:09:23 +03:00
|
|
|
/* $NetBSD: cdefs.h,v 1.4 1997/11/04 23:10:11 thorpej Exp $ */
|
1996-09-30 20:34:14 +04:00
|
|
|
|
|
|
|
#ifndef _MACHINE_CDEFS_H_
|
|
|
|
#define _MACHINE_CDEFS_H_
|
|
|
|
|
1997-11-05 02:09:23 +03:00
|
|
|
#define _C_LABEL(x) x
|
1997-04-17 02:52:50 +04:00
|
|
|
|
1997-10-22 09:20:32 +04:00
|
|
|
#ifdef __GNUC__
|
1997-11-05 02:09:23 +03:00
|
|
|
#define __RENAME(x) __asm__(___STRING(_C_LABEL(x)))
|
1997-10-22 09:20:32 +04:00
|
|
|
#endif
|
|
|
|
|
1997-04-17 02:52:50 +04:00
|
|
|
#define __DO_NOT_DO_WEAK__ /* NO WEAK SYMS IN LIBC YET */
|
|
|
|
|
|
|
|
#ifndef __DO_NOT_DO_WEAK__
|
|
|
|
#define __indr_reference(sym, alias) /* use weak symbols instead */
|
1996-09-30 20:34:14 +04:00
|
|
|
#endif
|
|
|
|
|
1997-04-17 02:52:50 +04:00
|
|
|
#ifdef __STDC__
|
|
|
|
|
|
|
|
#ifndef __DO_NOT_DO_WEAK__
|
|
|
|
#define __weak_alias(alias, sym) \
|
1997-11-05 02:09:23 +03:00
|
|
|
__asm__(".weak " #alias " ; " #alias " = " #sym);
|
1996-09-30 20:34:14 +04:00
|
|
|
#endif
|
1997-04-17 02:52:50 +04:00
|
|
|
|
|
|
|
#define __warn_references(sym, msg) \
|
1997-11-05 02:09:23 +03:00
|
|
|
__asm__(".section .gnu.warning." #sym " ; .ascii \"" msg "\" ; .text");
|
1997-04-17 02:52:50 +04:00
|
|
|
|
|
|
|
#else /* ! __STDC__ */
|
|
|
|
|
|
|
|
#ifndef __DO_NOT_DO_WEAK__
|
|
|
|
#define __weak_alias(alias, sym) \
|
1997-11-05 02:09:23 +03:00
|
|
|
__asm__(".weak alias ; alias = sym");
|
1996-09-30 20:34:14 +04:00
|
|
|
#endif
|
|
|
|
|
1997-04-17 02:52:50 +04:00
|
|
|
#define __warn_references(sym, msg) \
|
1997-11-05 02:09:23 +03:00
|
|
|
__asm__(".section .gnu.warning.sym ; .ascii msg ; .text");
|
1997-04-17 02:52:50 +04:00
|
|
|
|
|
|
|
#endif /* __STDC__ */
|
|
|
|
|
1996-09-30 20:34:14 +04:00
|
|
|
#endif /* !_MACHINE_CDEFS_H_ */
|