Home | History | Annotate | Line # | Download | only in include
cdefs.h revision 1.6
      1  1.6   thorpej /*	$NetBSD: cdefs.h,v 1.6 1997/10/22 05:21:10 thorpej Exp $	*/
      2  1.1       jtc 
      3  1.1       jtc /*
      4  1.3    mellon  * Copyright (c) 1995 Carnegie-Mellon University.
      5  1.3    mellon  * All rights reserved.
      6  1.3    mellon  *
      7  1.3    mellon  * Author: Chris G. Demetriou
      8  1.3    mellon  *
      9  1.3    mellon  * Permission to use, copy, modify and distribute this software and
     10  1.3    mellon  * its documentation is hereby granted, provided that both the copyright
     11  1.3    mellon  * notice and this permission notice appear in all copies of the
     12  1.3    mellon  * software, derivative works or modified versions, and any portions
     13  1.3    mellon  * thereof, and that both notices appear in supporting documentation.
     14  1.3    mellon  *
     15  1.3    mellon  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
     16  1.3    mellon  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
     17  1.3    mellon  * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
     18  1.3    mellon  *
     19  1.3    mellon  * Carnegie Mellon requests users of this software to return to
     20  1.3    mellon  *
     21  1.3    mellon  *  Software Distribution Coordinator  or  Software.Distribution (at) CS.CMU.EDU
     22  1.3    mellon  *  School of Computer Science
     23  1.3    mellon  *  Carnegie Mellon University
     24  1.3    mellon  *  Pittsburgh PA 15213-3890
     25  1.3    mellon  *
     26  1.3    mellon  * any improvements or extensions that they make and grant Carnegie the
     27  1.3    mellon  * rights to redistribute these changes.
     28  1.1       jtc  */
     29  1.1       jtc 
     30  1.3    mellon #ifndef _MACHINE_CDEFS_H_
     31  1.1       jtc #define	_MACHINE_CDEFS_H_
     32  1.1       jtc 
     33  1.3    mellon #define	_C_LABEL(x)	_STRING(x)
     34  1.6   thorpej 
     35  1.6   thorpej #ifdef __GNUC__
     36  1.6   thorpej #define	__RENAME(x)	__asm__(x)
     37  1.6   thorpej #endif
     38  1.1       jtc 
     39  1.3    mellon #define	__indr_references(sym,msg)	/* nothing */
     40  1.4  jonathan 
     41  1.4  jonathan #if defined __GNUC__ && defined __STDC__
     42  1.4  jonathan #define __warn_references(sym, msg)                  \
     43  1.4  jonathan   static const char __evoke_link_warning_##sym[]     \
     44  1.4  jonathan     __attribute__ ((section (".gnu.warning." #sym))) = msg;
     45  1.4  jonathan #else
     46  1.3    mellon #define	__warn_references(sym,msg)	/* nothing */
     47  1.4  jonathan #endif
     48  1.5  jonathan 
     49  1.5  jonathan /* Kernel-only .sections for kernel copyright */
     50  1.5  jonathan #ifdef _KERNEL
     51  1.5  jonathan 
     52  1.5  jonathan #ifdef __STDC__
     53  1.5  jonathan #define	__KERNEL_SECTIONSTRING(_sec, _str)				\
     54  1.5  jonathan 	__asm__(".section " #_sec " ; .asciz \"" _str "\" ; .text")
     55  1.5  jonathan #else
     56  1.5  jonathan #define	__KERNEL_SECTIONSTRING(_sec, _str)				\
     57  1.5  jonathan 	__asm__(".section _sec ; .asciz _str ; .text")
     58  1.5  jonathan #endif
     59  1.5  jonathan 
     60  1.5  jonathan #define	__KERNEL_RCSID(_n, _s)		__KERNEL_SECTIONSTRING(.ident, _s)
     61  1.5  jonathan #define	__KERNEL_COPYRIGHT(_n, _s)	__KERNEL_SECTIONSTRING(.copyright, _s)
     62  1.5  jonathan 
     63  1.5  jonathan #ifdef NO_KERNEL_RCSIDS
     64  1.5  jonathan #undef __KERNEL_RCSID
     65  1.5  jonathan #define	__KERNEL_RCSID(_n, _s)		/* nothing */
     66  1.5  jonathan #endif
     67  1.5  jonathan 
     68  1.5  jonathan #endif /* _KERNEL */
     69  1.1       jtc 
     70  1.1       jtc #endif /* !_MACHINE_CDEFS_H_ */
     71