Expand PMF_FN_* macros.
[netbsd-mini2440.git] / usr.sbin / sup / source / c.h
blob5d5d101cb6625c56550174608aaf1ebb4e3a61a2
1 /* $NetBSD: c.h,v 1.6 2009/06/19 23:36:41 dyoung Exp $ */
3 /*
4 * Copyright (c) 1991 Carnegie Mellon University
5 * All Rights Reserved.
6 *
7 * Permission to use, copy, modify and distribute this software and its
8 * documentation is hereby granted, provided that both the copyright
9 * notice and this permission notice appear in all copies of the
10 * software, derivative works or modified versions, and any portions
11 * thereof, and that both notices appear in supporting documentation.
13 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
14 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
15 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
17 * Carnegie Mellon requests users of this software to return to
19 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
20 * School of Computer Science
21 * Carnegie Mellon University
22 * Pittsburgh PA 15213-3890
24 * any improvements or extensions that they make and grant Carnegie the rights
25 * to redistribute these changes.
28 * Standard C macros
30 **********************************************************************
31 * HISTORY
32 * 02-Feb-86 Glenn Marcy (gm0w) at Carnegie-Mellon University
33 * Added check to allow multiple or recursive inclusion of this
34 * file. Added bool enum from machine/types.h for regular users
35 * that want a real boolean type.
37 * 29-Dec-85 Glenn Marcy (gm0w) at Carnegie-Mellon University
38 * Also change spacing of MAX and MIN to coincide with that of
39 * sys/param.h.
41 * 19-Nov-85 Glenn Marcy (gm0w) at Carnegie-Mellon University
42 * Changed the number of tabs between TRUE, FALSE and their
43 * respective values to match those in sys/types.h.
45 * 17-Dec-84 Glenn Marcy (gm0w) at Carnegie-Mellon University
46 * Only define TRUE and FALSE if not defined. Added caseE macro
47 * for using enumerated types in switch statements.
49 * 23-Apr-81 Mike Accetta (mja) at Carnegie-Mellon University
50 * Added "sizeofS" and "sizeofA" macros which expand to the size
51 * of a string constant and array respectively.
53 **********************************************************************
56 #ifndef _C_INCLUDE_
57 #define _C_INCLUDE_
59 #include <sys/cdefs.h>
60 #include <sys/param.h>
62 #ifndef FALSE
63 #define FALSE 0
64 #endif /* FALSE */
66 #ifndef TRUE
67 #define TRUE 1
68 #endif /* TRUE */
70 #ifndef MAX
71 #define MAX(a,b) ((a)>(b)?(a):(b))
72 #endif
74 #ifdef __arraycount
75 #define sizeofA(array) __arraycount(array)
76 #else
77 #define sizeofA(array) (sizeof(array)/sizeof(array[0]))
78 #endif
80 #ifndef __unused
81 #ifndef __GNUC__
82 #define __unused
83 #else
84 #define __unused __attribute__((__unused__))
85 #endif
86 #endif
88 #endif /* _C_INCLUDE_ */