source: trunk/src/emx/include/386/_stdint.h@ 345

Last change on this file since 345 was 342, checked in by bird, 22 years ago

#427: header updates.

  • Property cvs2svn:cvs-rev set to 1.2
  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 5.5 KB
Line 
1/*-
2 * Copyright (c) 2001, 2002 Mike Barcroft <[email protected]>
3 * Copyright (c) 2001 The NetBSD Foundation, Inc.
4 * All rights reserved.
5 *
6 * This code is derived from software contributed to The NetBSD Foundation
7 * by Klaus Klein.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
11 * are met:
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 * 3. All advertising materials mentioning features or use of this software
18 * must display the following acknowledgement:
19 * This product includes software developed by the NetBSD
20 * Foundation, Inc. and its contributors.
21 * 4. Neither the name of The NetBSD Foundation nor the names of its
22 * contributors may be used to endorse or promote products derived
23 * from this software without specific prior written permission.
24 *
25 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
26 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
27 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
29 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 * POSSIBILITY OF SUCH DAMAGE.
36 *
37 * $FreeBSD: src/sys/i386/include/_stdint.h,v 1.1 2002/07/29 17:41:07 mike Exp $
38 *
39 * @@level FreeBSD 5.1
40 */
41
42#ifndef _MACHINE__STDINT_H_
43#define _MACHINE__STDINT_H_
44
45#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS)
46
47#define INT8_C(c) (c)
48#define INT16_C(c) (c)
49#define INT32_C(c) (c)
50#define INT64_C(c) (c ## LL)
51
52#define UINT8_C(c) (c)
53#define UINT16_C(c) (c)
54#define UINT32_C(c) (c ## U)
55#define UINT64_C(c) (c ## ULL)
56
57#define INTMAX_C(c) (c ## LL)
58#define UINTMAX_C(c) (c ## ULL)
59
60#endif /* !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) */
61
62#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
63
64/*
65 * ISO/IEC 9899:1999
66 * 7.18.2.1 Limits of exact-width integer types
67 */
68/* Minimum values of exact-width signed integer types. */
69#define INT8_MIN (-0x7f-1)
70#define INT16_MIN (-0x7fff-1)
71#define INT32_MIN (-0x7fffffff-1)
72#define INT64_MIN (-0x7fffffffffffffffLL-1)
73
74/* Maximum values of exact-width signed integer types. */
75#define INT8_MAX 0x7f
76#define INT16_MAX 0x7fff
77#define INT32_MAX 0x7fffffff
78#define INT64_MAX 0x7fffffffffffffffLL
79
80/* Maximum values of exact-width unsigned integer types. */
81#define UINT8_MAX 0xff
82#define UINT16_MAX 0xffff
83#define UINT32_MAX 0xffffffffU
84#define UINT64_MAX 0xffffffffffffffffULL
85
86/*
87 * ISO/IEC 9899:1999
88 * 7.18.2.2 Limits of minimum-width integer types
89 */
90/* Minimum values of minimum-width signed integer types. */
91#define INT_LEAST8_MIN INT8_MIN
92#define INT_LEAST16_MIN INT16_MIN
93#define INT_LEAST32_MIN INT32_MIN
94#define INT_LEAST64_MIN INT64_MIN
95
96/* Maximum values of minimum-width signed integer types. */
97#define INT_LEAST8_MAX INT8_MAX
98#define INT_LEAST16_MAX INT16_MAX
99#define INT_LEAST32_MAX INT32_MAX
100#define INT_LEAST64_MAX INT64_MAX
101
102/* Maximum values of minimum-width unsigned integer types. */
103#define UINT_LEAST8_MAX UINT8_MAX
104#define UINT_LEAST16_MAX UINT16_MAX
105#define UINT_LEAST32_MAX UINT32_MAX
106#define UINT_LEAST64_MAX UINT64_MAX
107
108/*
109 * ISO/IEC 9899:1999
110 * 7.18.2.3 Limits of fastest minimum-width integer types
111 */
112/* Minimum values of fastest minimum-width signed integer types. */
113#define INT_FAST8_MIN INT32_MIN
114#define INT_FAST16_MIN INT32_MIN
115#define INT_FAST32_MIN INT32_MIN
116#define INT_FAST64_MIN INT64_MIN
117
118/* Maximum values of fastest minimum-width signed integer types. */
119#define INT_FAST8_MAX INT32_MAX
120#define INT_FAST16_MAX INT32_MAX
121#define INT_FAST32_MAX INT32_MAX
122#define INT_FAST64_MAX INT64_MAX
123
124/* Maximum values of fastest minimum-width unsigned integer types. */
125#define UINT_FAST8_MAX UINT32_MAX
126#define UINT_FAST16_MAX UINT32_MAX
127#define UINT_FAST32_MAX UINT32_MAX
128#define UINT_FAST64_MAX UINT64_MAX
129
130/*
131 * ISO/IEC 9899:1999
132 * 7.18.2.4 Limits of integer types capable of holding object pointers
133 */
134#define INTPTR_MIN INT32_MIN
135#define INTPTR_MAX INT32_MAX
136#define UINTPTR_MAX UINT32_MAX
137
138/*
139 * ISO/IEC 9899:1999
140 * 7.18.2.5 Limits of greatest-width integer types
141 */
142#define INTMAX_MIN INT64_MIN
143#define INTMAX_MAX INT64_MAX
144#define UINTMAX_MAX UINT64_MAX
145
146/*
147 * ISO/IEC 9899:1999
148 * 7.18.3 Limits of other integer types
149 */
150/* Limits of ptrdiff_t. */
151#define PTRDIFF_MIN INT32_MIN
152#define PTRDIFF_MAX INT32_MAX
153
154/* Limits of sig_atomic_t. */
155#define SIG_ATOMIC_MIN INT32_MIN
156#define SIG_ATOMIC_MAX INT32_MAX
157
158/* Limit of size_t. */
159#define SIZE_MAX UINT32_MAX
160
161#ifndef WCHAR_MIN /* Also possibly defined in <wchar.h> */
162/* Limits of wchar_t. */
163#define WCHAR_MIN INT32_MIN
164#define WCHAR_MAX INT32_MAX
165
166/* Limits of wint_t. */
167#define WINT_MIN INT32_MIN
168#define WINT_MAX INT32_MAX
169#endif
170
171#endif /* !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) */
172
173#endif /* !_MACHINE__STDINT_H_ */
Note: See TracBrowser for help on using the repository browser.