cdefs.h revision 11cd02dfb91661c65134cac258cf5924270e9d2
111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* $OpenBSD: cdefs.h,v 1.2 2005/11/24 20:46:44 deraadt Exp $ */ 211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#ifndef _MACHINE_CDEFS_H_ 411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define _MACHINE_CDEFS_H_ 511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#if defined(lint) 711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define __indr_reference(sym,alias) __lint_equal__(sym,alias) 811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define __warn_references(sym,msg) 911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define __weak_alias(alias,sym) __lint_equal__(sym,alias) 1011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#elif defined(__GNUC__) && defined(__STDC__) 1111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define __weak_alias(alias,sym) \ 1211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert __asm__(".weak " __STRING(alias) " ; " __STRING(alias) \ 1311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert " = " __STRING(sym)); 1411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define __warn_references(sym,msg) \ 1511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert __asm__(".section .gnu.warning." __STRING(sym) \ 1611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert " ; .ascii \"" msg "\" ; .text"); 1711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif 1811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 1911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif /* !_MACHINE_CDEFS_H_ */ 20