]> git.saurik.com Git - apple/xnu.git/blob - osfmk/i386/machlimits.h
dbbd9672350da9c7f22bfa60e09dd5725cbc47a3
[apple/xnu.git] / osfmk / i386 / machlimits.h
1 /*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23 /*
24 * @OSF_COPYRIGHT@
25 */
26 /*
27 * Copyright (c) 1988 The Regents of the University of California.
28 * All rights reserved.
29 *
30 * Redistribution and use in source and binary forms are permitted
31 * provided that the above copyright notice and this paragraph are
32 * duplicated in all such forms and that any documentation,
33 * advertising materials, and other materials related to such
34 * distribution and use acknowledge that the software was developed
35 * by the University of California, Berkeley. The name of the
36 * University may not be used to endorse or promote products derived
37 * from this software without specific prior written permission.
38 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
39 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
40 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
41 *
42 * @(#)machlimits.h 7.1 (Berkeley) 2/15/89
43 */
44 #ifndef _MACH_MACHLIMITS_H_
45 #define _MACH_MACHLIMITS_H_
46
47 #define CHAR_BIT 8 /* number of bits in a char */
48
49 #define SCHAR_MAX 127 /* max value for a signed char */
50 #define SCHAR_MIN (-128) /* min value for a signed char */
51
52 #define UCHAR_MAX 255U /* max value for an unsigned char */
53 #define CHAR_MAX 127 /* max value for a char */
54 #define CHAR_MIN (-128) /* min value for a char */
55
56 #define USHRT_MAX 65535U /* max value for an unsigned short */
57 #define SHRT_MAX 32767 /* max value for a short */
58 #define SHRT_MIN (-32768) /* min value for a short */
59
60 #define UINT_MAX 0xFFFFFFFFU /* max value for an unsigned int */
61 #define INT_MAX 2147483647 /* max value for an int */
62 #define INT_MIN (-2147483647-1) /* min value for an int */
63
64 #define ULONG_MAX UINT_MAX /* max value for an unsigned long */
65 #define LONG_MAX INT_MAX /* max value for a long */
66 #define LONG_MIN INT_MIN /* min value for a long */
67
68 /* Must be at least two, for internationalization (NLS/KJI) */
69 #define MB_LEN_MAX 4 /* multibyte characters */
70
71 #endif /* _MACH_MACHLIMITS_H_ */
72