change nand flash pages from 65536 to 0x8000.
[jz_tools.git] / types.h
blobfff710bebd392626cdde589472cbd648fc75c9e8
1 /*
3 * Copyright (C) 2008 yajin <yajin@vm-kernel.org>
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 or
8 * (at your option) version 3 of the License.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
18 * MA 02111-1307 USA
21 #ifndef _TYPES_H_
22 #define _TYPES_H_
24 #include <stddef.h>
26 /*From qemu*/
27 #ifdef __OpenBSD__
28 #include <sys/types.h>
29 #else
30 typedef unsigned char uint8_t;
31 typedef unsigned short uint16_t;
32 typedef unsigned int uint32_t;
33 // Linux/Sparc64 defines uint64_t
34 #if !(defined (__sparc_v9__) && defined(__linux__)) && !(defined(__APPLE__) && defined(__x86_64__))
35 /* XXX may be done for all 64 bits targets ? */
36 #if defined (__x86_64__) || defined(__ia64) || defined(__s390x__) || defined(__alpha__) || defined(__powerpc64__)
37 typedef unsigned long uint64_t;
38 #else
39 typedef unsigned long long uint64_t;
40 #endif
41 #endif
43 /* if Solaris/__sun__, don't typedef int8_t, as it will be typedef'd
44 prior to this and will cause an error in compliation, conflicting
45 with /usr/include/sys/int_types.h, line 75 */
46 #ifndef __sun__
47 typedef signed char int8_t;
48 #endif
49 typedef signed short int16_t;
50 typedef signed int int32_t;
51 // Linux/Sparc64 defines int64_t
52 #if !(defined (__sparc_v9__) && defined(__linux__)) && !(defined(__APPLE__) && defined(__x86_64__))
53 #if defined (__x86_64__) || defined(__ia64) || defined(__s390x__) || defined(__alpha__) || defined(__powerpc64__)
54 typedef signed long int64_t;
55 #else
56 typedef signed long long int64_t;
57 #endif
58 #endif
59 #endif
62 #endif