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