cdefs.h revision 1.5 1 1.5 jonathan /* $NetBSD: cdefs.h,v 1.5 1997/05/15 08:47:05 jonathan 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.1 jtc
35 1.3 mellon #define __indr_references(sym,msg) /* nothing */
36 1.4 jonathan
37 1.4 jonathan #if defined __GNUC__ && defined __STDC__
38 1.4 jonathan #define __warn_references(sym, msg) \
39 1.4 jonathan static const char __evoke_link_warning_##sym[] \
40 1.4 jonathan __attribute__ ((section (".gnu.warning." #sym))) = msg;
41 1.4 jonathan #else
42 1.3 mellon #define __warn_references(sym,msg) /* nothing */
43 1.4 jonathan #endif
44 1.5 jonathan
45 1.5 jonathan /* Kernel-only .sections for kernel copyright */
46 1.5 jonathan #ifdef _KERNEL
47 1.5 jonathan
48 1.5 jonathan #ifdef __STDC__
49 1.5 jonathan #define __KERNEL_SECTIONSTRING(_sec, _str) \
50 1.5 jonathan __asm__(".section " #_sec " ; .asciz \"" _str "\" ; .text")
51 1.5 jonathan #else
52 1.5 jonathan #define __KERNEL_SECTIONSTRING(_sec, _str) \
53 1.5 jonathan __asm__(".section _sec ; .asciz _str ; .text")
54 1.5 jonathan #endif
55 1.5 jonathan
56 1.5 jonathan #define __KERNEL_RCSID(_n, _s) __KERNEL_SECTIONSTRING(.ident, _s)
57 1.5 jonathan #define __KERNEL_COPYRIGHT(_n, _s) __KERNEL_SECTIONSTRING(.copyright, _s)
58 1.5 jonathan
59 1.5 jonathan #ifdef NO_KERNEL_RCSIDS
60 1.5 jonathan #undef __KERNEL_RCSID
61 1.5 jonathan #define __KERNEL_RCSID(_n, _s) /* nothing */
62 1.5 jonathan #endif
63 1.5 jonathan
64 1.5 jonathan #endif /* _KERNEL */
65 1.1 jtc
66 1.1 jtc #endif /* !_MACHINE_CDEFS_H_ */
67