4730a8cbec
- fix _C_LABEL so that it actually works. - make __RENAME use _C_LABEL. - fix __RENAME so that it expects an unquoted argument. - fix __indr_reference and __warn_references so that they supply their own final semicolon. - define __warn_references to nothing if not GNU C (required by the way it's used). The __warn_references semicolon change has to be made so that __warn_references can be defined into nothing. (A ; all by itself isn't a great idea.) The __indr_reference change was made for consistency.
41 lines
925 B
C
41 lines
925 B
C
/* $NetBSD: cdefs.h,v 1.3 1997/11/04 23:09:37 thorpej Exp $ */
|
|
|
|
#ifndef _MACHINE_CDEFS_H_
|
|
#define _MACHINE_CDEFS_H_
|
|
|
|
#define _C_LABEL(x) x
|
|
|
|
#ifdef __GNUC__
|
|
#define __RENAME(x) __asm__(___STRING(_C_LABEL(x)))
|
|
#endif
|
|
|
|
#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 */
|
|
#endif
|
|
|
|
#ifdef __STDC__
|
|
|
|
#ifndef __DO_NOT_DO_WEAK__
|
|
#define __weak_alias(alias, sym) \
|
|
__asm__(".weak " #alias " ; " #alias " = " #sym);
|
|
#endif
|
|
|
|
#define __warn_references(sym, msg) \
|
|
__asm__(".section .gnu.warning." #sym " ; .ascii \"" msg "\" ; .text");
|
|
|
|
#else /* ! __STDC__ */
|
|
|
|
#ifndef __DO_NOT_DO_WEAK__
|
|
#define __weak_alias(alias, sym) \
|
|
__asm__(".weak alias ; alias = sym");
|
|
#endif
|
|
|
|
#define __warn_references(sym, msg) \
|
|
__asm__(".section .gnu.warning.sym ; .ascii msg ; .text");
|
|
|
|
#endif /* __STDC__ */
|
|
|
|
#endif /* !_MACHINE_CDEFS_H_ */
|