4 * Open Hack'Ware BIOS: arch dependent basic types
6 * Copyright (c) 2004-2005 Jocelyn Mayer
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License V2
10 * as published by the Free Software Foundation
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #if !defined (__OHW_STDINT_H__)
23 #define __OHW_STDINT_H__
25 #if defined (__i386__)
27 typedef unsigned char uint8_t;
28 typedef signed char int8_t;
29 typedef unsigned short uint16_t;
30 typedef signed short int16_t;
31 typedef unsigned int uint32_t;
32 typedef signed int int32_t;
33 typedef unsigned long long uint64_t;
34 typedef signed long long int64_t;
36 #elif defined (__x86_64__)
38 typedef unsigned char uint8_t;
39 typedef signed char int8_t;
40 typedef unsigned short uint16_t;
41 typedef signed short int16_t;
42 typedef unsigned int uint32_t;
43 typedef signed int int32_t;
44 typedef unsigned long uint64_t;
45 typedef signed long int64_t;
47 #elif defined (__powerpc__) || defined (_ARCH_PPC)
49 typedef unsigned char uint8_t;
50 typedef signed char int8_t;
51 typedef unsigned short uint16_t;
52 typedef signed short int16_t;
53 typedef unsigned int uint32_t;
54 typedef signed int int32_t;
55 typedef unsigned long long uint64_t;
56 typedef signed long long int64_t;
58 #elif defined (__powerpc64__) || defined (_ARCH_PPC64)
60 typedef unsigned char uint8_t;
61 typedef signed char int8_t;
62 typedef unsigned short uint16_t;
63 typedef signed short int16_t;
64 typedef unsigned int uint32_t;
65 typedef signed int int32_t;
66 typedef unsigned long uint64_t;
67 typedef signed long int64_t;
70 #error "unsupported CPU architecture"
74 #endif /* !defined (__OHW_STDINT_H__) */