1.1 --- a/epoc32/include/stdapis/machine/_stdint.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/stdapis/machine/_stdint.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,167 @@
1.4 -_stdint.h
1.5 +/*-
1.6 + * Copyright (c) 2001, 2002 Mike Barcroft <mike@FreeBSD.org>
1.7 + * Copyright (c) 2001 The NetBSD Foundation, Inc.
1.8 + * All rights reserved.
1.9 + *
1.10 + * This code is derived from software contributed to The NetBSD Foundation
1.11 + * by Klaus Klein.
1.12 + *
1.13 + * Redistribution and use in source and binary forms, with or without
1.14 + * modification, are permitted provided that the following conditions
1.15 + * are met:
1.16 + * 1. Redistributions of source code must retain the above copyright
1.17 + * notice, this list of conditions and the following disclaimer.
1.18 + * 2. Redistributions in binary form must reproduce the above copyright
1.19 + * notice, this list of conditions and the following disclaimer in the
1.20 + * documentation and/or other materials provided with the distribution.
1.21 + * 4. Neither the name of The NetBSD Foundation nor the names of its
1.22 + * contributors may be used to endorse or promote products derived
1.23 + * from this software without specific prior written permission.
1.24 + *
1.25 + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
1.26 + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
1.27 + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
1.28 + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
1.29 + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
1.30 + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
1.31 + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
1.32 + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
1.33 + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
1.34 + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
1.35 + * POSSIBILITY OF SUCH DAMAGE.
1.36 + *
1.37 + * $FreeBSD: src/sys/i386/include/_stdint.h,v 1.2 2004/05/18 16:04:57 stefanf Exp $
1.38 + */
1.39 +
1.40 +#ifndef _MACHINE__STDINT_H_
1.41 +#define _MACHINE__STDINT_H_
1.42 +
1.43 +#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS)
1.44 +
1.45 +#define INT8_C(c) (c)
1.46 +#define INT16_C(c) (c)
1.47 +#define INT32_C(c) (c)
1.48 +#define INT64_C(c) (c ## LL)
1.49 +
1.50 +#define UINT8_C(c) (c)
1.51 +#define UINT16_C(c) (c)
1.52 +#define UINT32_C(c) (c ## U)
1.53 +#define UINT64_C(c) (c ## ULL)
1.54 +
1.55 +#define INTMAX_C(c) (c ## LL)
1.56 +#define UINTMAX_C(c) (c ## ULL)
1.57 +
1.58 +#endif /* !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) */
1.59 +
1.60 +#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
1.61 +
1.62 +/*
1.63 + * ISO/IEC 9899:1999
1.64 + * 7.18.2.1 Limits of exact-width integer types
1.65 + */
1.66 +/* Minimum values of exact-width signed integer types. */
1.67 +#define INT8_MIN (-0x7f-1)
1.68 +#define INT16_MIN (-0x7fff-1)
1.69 +#define INT32_MIN (-0x7fffffff-1)
1.70 +#define INT64_MIN (-0x7fffffffffffffffLL-1)
1.71 +
1.72 +/* Maximum values of exact-width signed integer types. */
1.73 +#define INT8_MAX 0x7f
1.74 +#define INT16_MAX 0x7fff
1.75 +#define INT32_MAX 0x7fffffff
1.76 +#define INT64_MAX 0x7fffffffffffffffLL
1.77 +
1.78 +/* Maximum values of exact-width unsigned integer types. */
1.79 +#define UINT8_MAX 0xff
1.80 +#define UINT16_MAX 0xffff
1.81 +#define UINT32_MAX 0xffffffffU
1.82 +#define UINT64_MAX 0xffffffffffffffffULL
1.83 +
1.84 +/*
1.85 + * ISO/IEC 9899:1999
1.86 + * 7.18.2.2 Limits of minimum-width integer types
1.87 + */
1.88 +/* Minimum values of minimum-width signed integer types. */
1.89 +#define INT_LEAST8_MIN INT8_MIN
1.90 +#define INT_LEAST16_MIN INT16_MIN
1.91 +#define INT_LEAST32_MIN INT32_MIN
1.92 +#define INT_LEAST64_MIN INT64_MIN
1.93 +
1.94 +/* Maximum values of minimum-width signed integer types. */
1.95 +#define INT_LEAST8_MAX INT8_MAX
1.96 +#define INT_LEAST16_MAX INT16_MAX
1.97 +#define INT_LEAST32_MAX INT32_MAX
1.98 +#define INT_LEAST64_MAX INT64_MAX
1.99 +
1.100 +/* Maximum values of minimum-width unsigned integer types. */
1.101 +#define UINT_LEAST8_MAX UINT8_MAX
1.102 +#define UINT_LEAST16_MAX UINT16_MAX
1.103 +#define UINT_LEAST32_MAX UINT32_MAX
1.104 +#define UINT_LEAST64_MAX UINT64_MAX
1.105 +
1.106 +/*
1.107 + * ISO/IEC 9899:1999
1.108 + * 7.18.2.3 Limits of fastest minimum-width integer types
1.109 + */
1.110 +/* Minimum values of fastest minimum-width signed integer types. */
1.111 +#define INT_FAST8_MIN INT32_MIN
1.112 +#define INT_FAST16_MIN INT32_MIN
1.113 +#define INT_FAST32_MIN INT32_MIN
1.114 +#define INT_FAST64_MIN INT64_MIN
1.115 +
1.116 +/* Maximum values of fastest minimum-width signed integer types. */
1.117 +#define INT_FAST8_MAX INT32_MAX
1.118 +#define INT_FAST16_MAX INT32_MAX
1.119 +#define INT_FAST32_MAX INT32_MAX
1.120 +#define INT_FAST64_MAX INT64_MAX
1.121 +
1.122 +/* Maximum values of fastest minimum-width unsigned integer types. */
1.123 +#define UINT_FAST8_MAX UINT32_MAX
1.124 +#define UINT_FAST16_MAX UINT32_MAX
1.125 +#define UINT_FAST32_MAX UINT32_MAX
1.126 +#define UINT_FAST64_MAX UINT64_MAX
1.127 +
1.128 +/*
1.129 + * ISO/IEC 9899:1999
1.130 + * 7.18.2.4 Limits of integer types capable of holding object pointers
1.131 + */
1.132 +#define INTPTR_MIN INT32_MIN
1.133 +#define INTPTR_MAX INT32_MAX
1.134 +#define UINTPTR_MAX UINT32_MAX
1.135 +
1.136 +/*
1.137 + * ISO/IEC 9899:1999
1.138 + * 7.18.2.5 Limits of greatest-width integer types
1.139 + */
1.140 +#define INTMAX_MIN INT64_MIN
1.141 +#define INTMAX_MAX INT64_MAX
1.142 +#define UINTMAX_MAX UINT64_MAX
1.143 +
1.144 +/*
1.145 + * ISO/IEC 9899:1999
1.146 + * 7.18.3 Limits of other integer types
1.147 + */
1.148 +/* Limits of ptrdiff_t. */
1.149 +#define PTRDIFF_MIN INT32_MIN
1.150 +#define PTRDIFF_MAX INT32_MAX
1.151 +
1.152 +/* Limits of sig_atomic_t. */
1.153 +#define SIG_ATOMIC_MIN INT32_MIN
1.154 +#define SIG_ATOMIC_MAX INT32_MAX
1.155 +
1.156 +/* Limit of size_t. */
1.157 +#define SIZE_MAX UINT32_MAX
1.158 +
1.159 +#ifndef WCHAR_MIN /* Also possibly defined in <wchar.h> */
1.160 +/* Limits of wchar_t. */
1.161 +#define WCHAR_MIN INT32_MIN
1.162 +#define WCHAR_MAX INT32_MAX
1.163 +#endif
1.164 +
1.165 +/* Limits of wint_t. */
1.166 +#define WINT_MIN INT32_MIN
1.167 +#define WINT_MAX INT32_MAX
1.168 +
1.169 +#endif /* !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) */
1.170 +
1.171 +#endif /* !_MACHINE__STDINT_H_ */