xref: /xnu-8020.121.3/osfmk/arm/machlimits.h (revision fdd8201d7b966f0c3ea610489d29bd841d358941)
1*fdd8201dSApple OSS Distributions /*
2*fdd8201dSApple OSS Distributions  * Copyright (c) 2007 Apple Inc. All rights reserved.
3*fdd8201dSApple OSS Distributions  *
4*fdd8201dSApple OSS Distributions  * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5*fdd8201dSApple OSS Distributions  *
6*fdd8201dSApple OSS Distributions  * This file contains Original Code and/or Modifications of Original Code
7*fdd8201dSApple OSS Distributions  * as defined in and that are subject to the Apple Public Source License
8*fdd8201dSApple OSS Distributions  * Version 2.0 (the 'License'). You may not use this file except in
9*fdd8201dSApple OSS Distributions  * compliance with the License. The rights granted to you under the License
10*fdd8201dSApple OSS Distributions  * may not be used to create, or enable the creation or redistribution of,
11*fdd8201dSApple OSS Distributions  * unlawful or unlicensed copies of an Apple operating system, or to
12*fdd8201dSApple OSS Distributions  * circumvent, violate, or enable the circumvention or violation of, any
13*fdd8201dSApple OSS Distributions  * terms of an Apple operating system software license agreement.
14*fdd8201dSApple OSS Distributions  *
15*fdd8201dSApple OSS Distributions  * Please obtain a copy of the License at
16*fdd8201dSApple OSS Distributions  * http://www.opensource.apple.com/apsl/ and read it before using this file.
17*fdd8201dSApple OSS Distributions  *
18*fdd8201dSApple OSS Distributions  * The Original Code and all software distributed under the License are
19*fdd8201dSApple OSS Distributions  * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20*fdd8201dSApple OSS Distributions  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21*fdd8201dSApple OSS Distributions  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22*fdd8201dSApple OSS Distributions  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23*fdd8201dSApple OSS Distributions  * Please see the License for the specific language governing rights and
24*fdd8201dSApple OSS Distributions  * limitations under the License.
25*fdd8201dSApple OSS Distributions  *
26*fdd8201dSApple OSS Distributions  * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27*fdd8201dSApple OSS Distributions  */
28*fdd8201dSApple OSS Distributions /*
29*fdd8201dSApple OSS Distributions  * @OSF_COPYRIGHT@
30*fdd8201dSApple OSS Distributions  */
31*fdd8201dSApple OSS Distributions /*
32*fdd8201dSApple OSS Distributions  * HISTORY
33*fdd8201dSApple OSS Distributions  *
34*fdd8201dSApple OSS Distributions  * Revision 1.1.1.1  1998/09/22 21:05:41  wsanchez
35*fdd8201dSApple OSS Distributions  * Import of Mac OS X kernel (~semeria)
36*fdd8201dSApple OSS Distributions  *
37*fdd8201dSApple OSS Distributions  * Revision 1.1.1.1  1998/03/07 02:26:02  wsanchez
38*fdd8201dSApple OSS Distributions  * Import of OSF Mach kernel (~mburg)
39*fdd8201dSApple OSS Distributions  *
40*fdd8201dSApple OSS Distributions  * Revision 1.1.2.1  1996/12/09  16:55:05  stephen
41*fdd8201dSApple OSS Distributions  *      nmklinux_1.0b3_shared into pmk1.1
42*fdd8201dSApple OSS Distributions  *      New file based on hp_pa
43*fdd8201dSApple OSS Distributions  *      [1996/12/09  11:09:22  stephen]
44*fdd8201dSApple OSS Distributions  *
45*fdd8201dSApple OSS Distributions  * $EndLog$
46*fdd8201dSApple OSS Distributions  */
47*fdd8201dSApple OSS Distributions /*
48*fdd8201dSApple OSS Distributions  * Copyright (c) 1988 The Regents of the University of California.
49*fdd8201dSApple OSS Distributions  * All rights reserved.
50*fdd8201dSApple OSS Distributions  *
51*fdd8201dSApple OSS Distributions  * Redistribution and use in source and binary forms are permitted
52*fdd8201dSApple OSS Distributions  * provided that the above copyright notice and this paragraph are
53*fdd8201dSApple OSS Distributions  * duplicated in all such forms and that any documentation,
54*fdd8201dSApple OSS Distributions  * advertising materials, and other materials related to such
55*fdd8201dSApple OSS Distributions  * distribution and use acknowledge that the software was developed
56*fdd8201dSApple OSS Distributions  * by the University of California, Berkeley.  The name of the
57*fdd8201dSApple OSS Distributions  * University may not be used to endorse or promote products derived
58*fdd8201dSApple OSS Distributions  * from this software without specific prior written permission.
59*fdd8201dSApple OSS Distributions  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
60*fdd8201dSApple OSS Distributions  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
61*fdd8201dSApple OSS Distributions  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
62*fdd8201dSApple OSS Distributions  *
63*fdd8201dSApple OSS Distributions  *	@(#)machlimits.h	7.1 (Berkeley) 2/15/89
64*fdd8201dSApple OSS Distributions  */
65*fdd8201dSApple OSS Distributions #ifndef _MACH_MACHLIMITS_H_
66*fdd8201dSApple OSS Distributions #define _MACH_MACHLIMITS_H_
67*fdd8201dSApple OSS Distributions 
68*fdd8201dSApple OSS Distributions #define CHAR_BIT        8               /* number of bits in a char */
69*fdd8201dSApple OSS Distributions 
70*fdd8201dSApple OSS Distributions #define SCHAR_MAX       127             /* max value for a signed char */
71*fdd8201dSApple OSS Distributions #define SCHAR_MIN       (-128)          /* min value for a signed char */
72*fdd8201dSApple OSS Distributions 
73*fdd8201dSApple OSS Distributions #define UCHAR_MAX       255U            /* max value for an unsigned char */
74*fdd8201dSApple OSS Distributions #define CHAR_MAX        127             /* max value for a char */
75*fdd8201dSApple OSS Distributions #define CHAR_MIN        (-128)          /* min value for a char */
76*fdd8201dSApple OSS Distributions 
77*fdd8201dSApple OSS Distributions #define USHRT_MAX       65535U          /* max value for an unsigned short */
78*fdd8201dSApple OSS Distributions #define SHRT_MAX        32767           /* max value for a short */
79*fdd8201dSApple OSS Distributions #define SHRT_MIN        (-32768)        /* min value for a short */
80*fdd8201dSApple OSS Distributions 
81*fdd8201dSApple OSS Distributions #define UINT_MAX        0xFFFFFFFFU     /* max value for an unsigned int */
82*fdd8201dSApple OSS Distributions #define INT_MAX         2147483647      /* max value for an int */
83*fdd8201dSApple OSS Distributions #define INT_MIN         (-2147483647-1) /* min value for an int */
84*fdd8201dSApple OSS Distributions 
85*fdd8201dSApple OSS Distributions #ifdef __LP64__
86*fdd8201dSApple OSS Distributions #define ULONG_MAX       0xffffffffffffffffUL    /* max unsigned long */
87*fdd8201dSApple OSS Distributions #define LONG_MAX        0x7fffffffffffffffL     /* max signed long */
88*fdd8201dSApple OSS Distributions #define LONG_MIN        (-0x7fffffffffffffffL-1)/* min signed long */
89*fdd8201dSApple OSS Distributions #else /* !__LP64__ */
90*fdd8201dSApple OSS Distributions #define ULONG_MAX       0xffffffffUL            /* max value for an unsigned long */
91*fdd8201dSApple OSS Distributions #define LONG_MAX        2147483647L             /* max value for a long */
92*fdd8201dSApple OSS Distributions #define LONG_MIN        (-2147483647L-1)        /* min value for a long */
93*fdd8201dSApple OSS Distributions #endif /* __LP64__ */
94*fdd8201dSApple OSS Distributions 
95*fdd8201dSApple OSS Distributions /* Must be at least two, for internationalization (NLS/KJI) */
96*fdd8201dSApple OSS Distributions #define MB_LEN_MAX      4               /* multibyte characters */
97*fdd8201dSApple OSS Distributions 
98*fdd8201dSApple OSS Distributions #endif /* _MACH_MACHLIMITS_H_ */
99