Merge branch 'vendor/NCURSES'
[dragonfly.git] / sys / dev / disk / mpt / mpilib / mpi_type.h
1 /* $FreeBSD: src/sys/dev/mpt/mpilib/mpi_type.h,v 1.10 2006/02/26 22:50:14 mjacob Exp $ */
2 /*
3  * Copyright (c) 2000-2005, LSI Logic Corporation and its contributors.
4  * All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions are
8  * met:
9  * 1. Redistributions of source code must retain the above copyright
10  *    notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
12  *    substantially similar to the "NO WARRANTY" disclaimer below
13  *    ("Disclaimer") and any redistribution must be conditioned upon including
14  *    a substantially similar Disclaimer requirement for further binary
15  *    redistribution.
16  * 3. Neither the name of the LSI Logic Corporation nor the names of its
17  *    contributors may be used to endorse or promote products derived from
18  *    this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
24  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF THE COPYRIGHT
30  * OWNER OR CONTRIBUTOR IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  *
32  *
33  *           Name:  mpi_type.h
34  *          Title:  MPI Basic type definitions
35  *  Creation Date:  June 6, 2000
36  *
37  *    mpi_type.h Version:  01.05.02
38  *
39  *  Version History
40  *  ---------------
41  *
42  *  Date      Version   Description
43  *  --------  --------  ------------------------------------------------------
44  *  05-08-00  00.10.01  Original release for 0.10 spec dated 4/26/2000.
45  *  06-06-00  01.00.01  Update version number for 1.0 release.
46  *  11-02-00  01.01.01  Original release for post 1.0 work
47  *  02-20-01  01.01.02  Added define and ifdef for MPI_POINTER.
48  *  08-08-01  01.02.01  Original release for v1.2 work.
49  *  05-11-04  01.03.01  Original release for MPI v1.3.
50  *  08-19-04  01.05.01  Original release for MPI v1.5.
51  *  08-30-05  01.05.02  Added PowerPC option to #ifdef's.
52  *  --------------------------------------------------------------------------
53  */
54
55 #ifndef MPI_TYPE_H
56 #define MPI_TYPE_H
57
58
59 /*******************************************************************************
60  * Define MPI_POINTER if it hasn't already been defined. By default MPI_POINTER
61  * is defined to be a near pointer. MPI_POINTER can be defined as a far pointer
62  * by defining MPI_POINTER as "far *" before this header file is included.
63  */
64 #ifndef MPI_POINTER
65 #define MPI_POINTER     *
66 #endif
67
68
69 /*****************************************************************************
70 *
71 *               B a s i c    T y p e s
72 *
73 *****************************************************************************/
74
75 typedef signed   char   S8;
76 typedef unsigned char   U8;
77 typedef signed   short  S16;
78 typedef unsigned short  U16;
79
80 #if defined(__FreeBSD__) || defined(__DragonFly__)
81
82 typedef int32_t  S32;
83 typedef uint32_t U32;
84
85 #else
86
87 #if defined(unix) || defined(__arm) || defined(ALPHA) || defined(__PPC__) || defined(__ppc)
88
89     typedef signed   int   S32;
90     typedef unsigned int   U32;
91
92 #else
93
94     typedef signed   long  S32;
95     typedef unsigned long  U32;
96
97 #endif
98 #endif
99
100
101 typedef struct _S64
102 {
103     U32          Low;
104     S32          High;
105 } S64;
106
107 typedef struct _U64
108 {
109     U32          Low;
110     U32          High;
111 } U64;
112
113
114 /****************************************************************************/
115 /*  Pointers                                                                */
116 /****************************************************************************/
117
118 typedef S8      *PS8;
119 typedef U8      *PU8;
120 typedef S16     *PS16;
121 typedef U16     *PU16;
122 typedef S32     *PS32;
123 typedef U32     *PU32;
124 typedef S64     *PS64;
125 typedef U64     *PU64;
126
127
128 #endif
129