1 
2 /***************************************************************************
3  *                    __            __ _ ___________                       *
4  *                    \ \          / /| |____   ____|                      *
5  *                     \ \        / / | |    | |                           *
6  *                      \ \  /\  / /  | |    | |                           *
7  *                       \ \/  \/ /   | |    | |                           *
8  *                        \  /\  /    | |    | |                           *
9  *                         \/  \/     |_|    |_|                           *
10  *                                                                         *
11  *                           Wiimms ISO Tools                              *
12  *                         http://wit.wiimm.de/                            *
13  *                                                                         *
14  ***************************************************************************
15  *                                                                         *
16  *   This file is part of the WIT project.                                 *
17  *   Visit http://wit.wiimm.de/ for project details and sources.           *
18  *                                                                         *
19  *   Copyright (c) 2009-2013 by Dirk Clemens <wiimm@wiimm.de>              *
20  *                                                                         *
21  ***************************************************************************
22  *                                                                         *
23  *   This program is free software; you can redistribute it and/or modify  *
24  *   it under the terms of the GNU General Public License as published by  *
25  *   the Free Software Foundation; either version 2 of the License, or     *
26  *   (at your option) any later version.                                   *
27  *                                                                         *
28  *   This program is distributed in the hope that it will be useful,       *
29  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
30  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
31  *   GNU General Public License for more details.                          *
32  *                                                                         *
33  *   See file gpl-2.0.txt or http://www.gnu.org/licenses/gpl-2.0.txt       *
34  *                                                                         *
35  ***************************************************************************/
36 
37 #ifndef WIT_TYPES_H
38 #define WIT_TYPES_H 1
39 
40 #define _GNU_SOURCE 1
41 
42 #include <sys/types.h>
43 #include <stdint.h>
44 #include <limits.h>
45 
46 ///////////////////////////////////////////////////////////////////////////////
47 
48 typedef uint8_t		u8;
49 typedef uint16_t	u16;
50 typedef uint32_t	u32;
51 //typedef uint64_t	u64;	// is 'long unsigned' in 64 bit linux
52 typedef long long unsigned u64;
53 
54 typedef int8_t		s8;
55 typedef int16_t		s16;
56 typedef int32_t		s32;
57 //typedef int64_t	s64;	// is 'long int' in 64 bit linux
58 typedef long long int	s64;
59 
60 typedef u16		be16_t;
61 typedef u32		be32_t;
62 typedef u64		be64_t;
63 
64 #ifndef  __cplusplus
65   typedef enum bool { false, true } __attribute__ ((packed)) bool;
66 #endif
67 
68 ///////////////////////////////////////////////////////////////////////////////
69 
70 
71 #ifndef WIIMM_BASIC_TYPES
72   #define WIIMM_BASIC_TYPES 1
73   typedef const char *  ccp;
74   typedef unsigned char uchar;
75   typedef unsigned int  uint;
76   typedef unsigned long ulong;
77 #endif
78 
79 typedef char		id6_t[7];
80 typedef u8		sha1_hash_t[20];
81 
82 ///////////////////////////////////////////////////////////////////////////////
83 
84 #endif // WIT_TYPES_H
85 
86