Deleted Added
full compact
osd_util.h (96554) osd_util.h (96614)
1/*
2 * Copyright (c) 1996-1999 Distributed Processing Technology Corporation
3 * All rights reserved.
4 *
5 * Redistribution and use in source form, with or without modification, are
6 * permitted provided that redistributions of source code must retain the
7 * above copyright notice, this list of conditions and the following disclaimer.
8 *

--- 4 unchanged lines hidden (view full) ---

13 * liable for any direct, indirect, incidental, special, exemplary or
14 * consequential damages (including, but not limited to, procurement of
15 * substitute goods or services; loss of use, data, or profits; or business
16 * interruptions) however caused and on any theory of liability, whether in
17 * contract, strict liability, or tort (including negligence or otherwise)
18 * arising in any way out of the use of this driver software, even if advised
19 * of the possibility of such damage.
20 *
1/*
2 * Copyright (c) 1996-1999 Distributed Processing Technology Corporation
3 * All rights reserved.
4 *
5 * Redistribution and use in source form, with or without modification, are
6 * permitted provided that redistributions of source code must retain the
7 * above copyright notice, this list of conditions and the following disclaimer.
8 *

--- 4 unchanged lines hidden (view full) ---

13 * liable for any direct, indirect, incidental, special, exemplary or
14 * consequential damages (including, but not limited to, procurement of
15 * substitute goods or services; loss of use, data, or profits; or business
16 * interruptions) however caused and on any theory of liability, whether in
17 * contract, strict liability, or tort (including negligence or otherwise)
18 * arising in any way out of the use of this driver software, even if advised
19 * of the possibility of such damage.
20 *
21 * $FreeBSD: head/sys/dev/asr/osd_util.h 96554 2002-05-14 01:09:03Z obrien $
21 * $FreeBSD: head/sys/dev/asr/osd_util.h 96614 2002-05-14 21:54:56Z obrien $
22 */
23
24#ifndef __OSD_UTIL_H
25#define __OSD_UTIL_H
26
27/*File - OSD_UTIL.H
28 ****************************************************************************
29 *

--- 73 unchanged lines hidden (view full) ---

103#ifndef DPT_RUNTIME_IMPORT
104 #define DPT_RUNTIME_IMPORT DPT_IMPORT
105#endif
106
107/*--------------------- */
108/* OS dependent defines */
109/*--------------------- */
110
22 */
23
24#ifndef __OSD_UTIL_H
25#define __OSD_UTIL_H
26
27/*File - OSD_UTIL.H
28 ****************************************************************************
29 *

--- 73 unchanged lines hidden (view full) ---

103#ifndef DPT_RUNTIME_IMPORT
104 #define DPT_RUNTIME_IMPORT DPT_IMPORT
105#endif
106
107/*--------------------- */
108/* OS dependent defines */
109/*--------------------- */
110
111#if defined (_DPT_MSDOS) || defined (_DPT_WIN_3X)
111#if defined(_DPT_MSDOS) || defined(_DPT_WIN_3X)
112 #define _DPT_16_BIT
113#else
114 #define _DPT_32_BIT
115#endif
116
112 #define _DPT_16_BIT
113#else
114 #define _DPT_32_BIT
115#endif
116
117#if defined (_DPT_SCO) || defined (_DPT_UNIXWARE) || defined (_DPT_SOLARIS) || defined (_DPT_AIX) || defined (SNI_MIPS) || defined (_DPT_BSDI) || defined (_DPT_FREE_BSD) || defined(_DPT_LINUX)
117#if defined(_DPT_SCO) || defined(_DPT_UNIXWARE) || defined(_DPT_SOLARIS) || defined(_DPT_AIX) || defined(SNI_MIPS) || defined(_DPT_BSDI) || defined(_DPT_FREE_BSD) || defined(_DPT_LINUX)
118 #define _DPT_UNIX
119#endif
120
118 #define _DPT_UNIX
119#endif
120
121#if defined (_DPT_WIN_3x) || defined (_DPT_WIN_4X) || defined (_DPT_WIN_NT) \
122 || defined (_DPT_OS2)
121#if defined(_DPT_WIN_3x) || defined(_DPT_WIN_4X) || defined(_DPT_WIN_NT) \
122 || defined(_DPT_OS2)
123 #define _DPT_DLL_SUPPORT
124#endif
125
123 #define _DPT_DLL_SUPPORT
124#endif
125
126#if !defined (_DPT_MSDOS) && !defined (_DPT_WIN_3X) && !defined (_DPT_NETWARE)
126#if !defined(_DPT_MSDOS) && !defined(_DPT_WIN_3X) && !defined(_DPT_NETWARE)
127 #define _DPT_PREEMPTIVE
128#endif
129
127 #define _DPT_PREEMPTIVE
128#endif
129
130#if !defined (_DPT_MSDOS) && !defined (_DPT_WIN_3X)
130#if !defined(_DPT_MSDOS) && !defined(_DPT_WIN_3X)
131 #define _DPT_MULTI_THREADED
132#endif
133
131 #define _DPT_MULTI_THREADED
132#endif
133
134#if !defined (_DPT_MSDOS)
134#if !defined(_DPT_MSDOS)
135 #define _DPT_MULTI_TASKING
136#endif
137
138 /* These exist for platforms that */
139 /* chunk when accessing mis-aligned */
140 /* data */
135 #define _DPT_MULTI_TASKING
136#endif
137
138 /* These exist for platforms that */
139 /* chunk when accessing mis-aligned */
140 /* data */
141#if defined (SNI_MIPS) || defined (_DPT_SOLARIS)
142 #if defined (_DPT_BIG_ENDIAN)
143 #if !defined (_DPT_STRICT_ALIGN)
141#if defined(SNI_MIPS) || defined(_DPT_SOLARIS)
142 #if defined(_DPT_BIG_ENDIAN)
143 #if !defined(_DPT_STRICT_ALIGN)
144 #define _DPT_STRICT_ALIGN
145 #endif
146 #endif
147#endif
148
149 /* Determine if in C or C++ mode */
150#ifdef __cplusplus
151 #define _DPT_CPP

--- 10 unchanged lines hidden (view full) ---

162/* By defining these ugly macros we can get around this and also */
163/* not have to copy and #ifdef large sections of code. I know that */
164/* these macros are *really* ugly, but they should help reduce */
165/* maintenance in the long run. */
166/* */
167/* In the meantime, just pray that we can all move to Win32 as soon */
168/* as possible... */
169/*-------------------------------------------------------------------*/
144 #define _DPT_STRICT_ALIGN
145 #endif
146 #endif
147#endif
148
149 /* Determine if in C or C++ mode */
150#ifdef __cplusplus
151 #define _DPT_CPP

--- 10 unchanged lines hidden (view full) ---

162/* By defining these ugly macros we can get around this and also */
163/* not have to copy and #ifdef large sections of code. I know that */
164/* these macros are *really* ugly, but they should help reduce */
165/* maintenance in the long run. */
166/* */
167/* In the meantime, just pray that we can all move to Win32 as soon */
168/* as possible... */
169/*-------------------------------------------------------------------*/
170#if !defined (DPTSQO)
171 #if defined (_DPT_SOLARIS)
170#if !defined(DPTSQO)
171 #if defined(_DPT_SOLARIS)
172 #define DPTSQO
173 #define DPTSQC
174 #else
175 #define DPTSQO {
176 #define DPTSQC }
177 #endif /* solaris */
178#endif /* DPTSQO */
179
180
181/*---------------------- */
182/* OS dependent typedefs */
183/*---------------------- */
184
172 #define DPTSQO
173 #define DPTSQC
174 #else
175 #define DPTSQO {
176 #define DPTSQC }
177 #endif /* solaris */
178#endif /* DPTSQO */
179
180
181/*---------------------- */
182/* OS dependent typedefs */
183/*---------------------- */
184
185#if defined (_DPT_MSDOS) || defined (_DPT_SCO)
185#if defined(_DPT_MSDOS) || defined(_DPT_SCO)
186 #define BYTE unsigned char
187 #define WORD unsigned short
188#endif
189
190#ifndef _DPT_TYPEDEFS
191 #define _DPT_TYPEDEFS
192 typedef unsigned char uCHAR;
193 typedef unsigned short uSHORT;
194 typedef unsigned int uINT;
195 typedef unsigned long uLONG;
196
197 typedef union {
198 uCHAR u8[4];
199 uSHORT u16[2];
200 uLONG u32;
201 } access_U;
202#endif
203
186 #define BYTE unsigned char
187 #define WORD unsigned short
188#endif
189
190#ifndef _DPT_TYPEDEFS
191 #define _DPT_TYPEDEFS
192 typedef unsigned char uCHAR;
193 typedef unsigned short uSHORT;
194 typedef unsigned int uINT;
195 typedef unsigned long uLONG;
196
197 typedef union {
198 uCHAR u8[4];
199 uSHORT u16[2];
200 uLONG u32;
201 } access_U;
202#endif
203
204#if !defined (NULL)
204#if !defined(NULL)
205 #define NULL 0
206#endif
207
208
209/*Prototypes - function ----------------------------------------------------- */
210
211#ifdef __cplusplus
212 extern "C" { /* Declare all these functions as "C" functions */

--- 49 unchanged lines hidden (view full) ---

262 * We will enclose all structure *
263 * portability modifications inside *
264 * #ifdefs. When we are ready, we *
265 * will #define DPT_PORTABLE to begin *
266 * using the modifications. *
267 *-------------------------------------*/
268uLONG netSwap4(uLONG val);
269
205 #define NULL 0
206#endif
207
208
209/*Prototypes - function ----------------------------------------------------- */
210
211#ifdef __cplusplus
212 extern "C" { /* Declare all these functions as "C" functions */

--- 49 unchanged lines hidden (view full) ---

262 * We will enclose all structure *
263 * portability modifications inside *
264 * #ifdefs. When we are ready, we *
265 * will #define DPT_PORTABLE to begin *
266 * using the modifications. *
267 *-------------------------------------*/
268uLONG netSwap4(uLONG val);
269
270#if defined (_DPT_BIG_ENDIAN)
270#if defined(_DPT_BIG_ENDIAN)
271
272/* for big-endian we need to swap */
273
274#ifndef NET_SWAP_2
275#define NET_SWAP_2(x) (((x) >> 8) | ((x) << 8))
276#endif /* NET_SWAP_2 */
277
278#ifndef NET_SWAP_4

--- 87 unchanged lines hidden ---
271
272/* for big-endian we need to swap */
273
274#ifndef NET_SWAP_2
275#define NET_SWAP_2(x) (((x) >> 8) | ((x) << 8))
276#endif /* NET_SWAP_2 */
277
278#ifndef NET_SWAP_4

--- 87 unchanged lines hidden ---