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,
28 #include <sys/types.h>
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;
39 typedef unsigned long long uint64_t;
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 */
47 typedef signed char int8_t;
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;
56 typedef signed long long int64_t;