Update to 3.4-final.
[linux-flexiantxendom0-3.2.10.git] / drivers / xen / sfc_netback / ci / compat / primitive.h
1 /****************************************************************************
2  * Copyright 2002-2005: Level 5 Networks Inc.
3  * Copyright 2005-2008: Solarflare Communications Inc,
4  *                      9501 Jeronimo Road, Suite 250,
5  *                      Irvine, CA 92618, USA
6  *
7  * Maintained by Solarflare Communications
8  *  <linux-xen-drivers@solarflare.com>
9  *  <onload-dev@solarflare.com>
10  *
11  * This program is free software; you can redistribute it and/or modify it
12  * under the terms of the GNU General Public License version 2 as published
13  * by the Free Software Foundation, incorporated herein by reference.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
23  ****************************************************************************
24  */
25 /*! \cidoxg_include_ci_compat  */
26
27 #ifndef __CI_COMPAT_PRIMITIVE_H__
28 #define __CI_COMPAT_PRIMITIVE_H__
29
30
31 /**********************************************************************
32  * Primitive types.
33  */
34
35 typedef unsigned char                   ci_uint8;
36 typedef char                            ci_int8;
37
38 typedef unsigned short                  ci_uint16;
39 typedef short                           ci_int16;
40
41 typedef unsigned int                    ci_uint32;
42 typedef int                             ci_int32;
43
44 /* 64-bit support is platform dependent. */
45
46
47 /**********************************************************************
48  * Other fancy types.
49  */
50
51 typedef ci_uint8                        ci_octet;
52
53 typedef enum {
54   CI_FALSE = 0,
55   CI_TRUE
56 } ci_boolean_t;
57
58
59 /**********************************************************************
60  * Some nice types you'd always assumed were standards.
61  * (Really, they are SYSV "standards".)
62  */
63
64 #ifdef _WIN32
65 typedef unsigned long                   ulong;              
66 typedef unsigned int                    uint;
67 typedef char*                           caddr_t;
68 #elif defined(__linux__) && defined(__KERNEL__)
69 #include <linux/types.h>
70 #elif defined(__linux__)
71 #include <sys/types.h>
72 #endif
73
74
75 #endif  /* __CI_COMPAT_PRIMITIVE_H__ */
76
77 /*! \cidoxg_end */