source: trunk/sys/dietlibc/include/stdint.h @ 276

Last change on this file since 276 was 1, checked in by alain, 8 years ago

First import

File size: 2.1 KB
RevLine 
[1]1/*
2   This file is part of MutekP.
3 
4   MutekP is free software; you can redistribute it and/or modify it
5   under the terms of the GNU General Public License as published by
6   the Free Software Foundation; either version 2 of the License, or
7   (at your option) any later version.
8 
9   MutekP is distributed in the hope that it will be useful, but
10   WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12   General Public License for more details.
13 
14   You should have received a copy of the GNU General Public License
15   along with MutekP; if not, write to the Free Software Foundation,
16   Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 
18   UPMC / LIP6 / SOC (c) 2009
19   Copyright Ghassan Almaless <ghassan.almaless@gmail.com>
20*/
21
22#ifndef _STDINT_H_
23#define _STDINT_H_
24
25/* Exact-width integer types */
26typedef signed char int8_t;
27typedef unsigned char uint8_t;
28
29typedef signed short int int16_t;
30typedef unsigned short int uint16_t;
31
32typedef signed int int32_t;
33typedef unsigned int uint32_t;
34
35typedef signed long long int int64_t;
36typedef unsigned long long int uint64_t;
37
38/* Integer type capable of holding object pointers */
39typedef uint32_t uintptr_t;
40typedef int32_t  intptr_t;
41
42/* Fastest integer types for 32-bits architecture*/
43typedef int32_t int_fast8_t;
44typedef uint32_t uint_fast8_t;
45
46typedef int32_t int_fast16_t;
47typedef uint32_t uint_fast16_t;
48
49typedef int32_t int_fast32_t;
50typedef uint32_t uint_fast32_t;
51
52typedef int64_t int_fast64_t;
53typedef uint64_t uint_fast64_t ;
54
55/* Integer type capable of holding object sizes */
56typedef uint32_t size_t;
57typedef int32_t ssize_t;
58
59/* Minimum of signed integer types */
60#define INT8_MIN       (-128)
61#define INT16_MIN      (-32767-1)
62#define INT32_MIN      (-2147483647-1)
63
64/* Maximum of signed integral types.  */
65#define INT8_MAX       (127)
66#define INT16_MAX      (32767)
67#define INT32_MAX      (2147483647)
68
69/* Maximum of unsigned integral types.  */
70#define UINT8_MAX      (255)
71#define UINT16_MAX     (65535)
72#define UINT32_MAX     (4294967295U)
73
74#endif
Note: See TracBrowser for help on using the repository browser.