Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

basetsd.h

00001 /*
00002  * Compilers that uses ILP32, LP64 or P64 type models
00003  * for both Win32 and Win64 are supported by this file.
00004  */
00005 
00006 /*
00007  * Modified for use with MPlayer, detailed CVS changelog at
00008  * http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
00009  * $Id: basetsd.h 11593 2005-06-28 18:02:01Z courmisch $
00010  */
00011 
00012 #ifndef __WINE_BASETSD_H
00013 #define __WINE_BASETSD_H
00014 
00015 #ifdef __WINE__
00016 #include "config.h"
00017 #endif /* defined(__WINE__) */
00018 
00019 #ifdef __cplusplus
00020 extern "C" {
00021 #endif /* defined(__cplusplus) */
00022 
00023 /*
00024  * Win32 was easy to implement under Unix since most (all?) 32-bit
00025  * Unices uses the same type model (ILP32) as Win32, where int, long
00026  * and pointer are 32-bit.
00027  *
00028  * Win64, however, will cause some problems when implemented under Unix.
00029  * Linux/{Alpha, Sparc64} and most (all?) other 64-bit Unices uses
00030  * the LP64 type model where int is 32-bit and long and pointer are
00031  * 64-bit. Win64 on the other hand uses the P64 (sometimes called LLP64)
00032  * type model where int and long are 32 bit and pointer is 64-bit.
00033  */
00034 
00035 /* Type model indepent typedefs */
00036 
00037 #ifndef __INTEL_COMPILER
00038 
00039 #ifndef __int8
00040 typedef char          __int8;
00041 #endif
00042 #ifndef __uint8
00043 typedef unsigned char __uint8;
00044 #endif
00045 
00046 #ifndef __int16
00047 typedef short          __int16;
00048 #endif
00049 #ifndef __uint16
00050 typedef unsigned short __uint16;
00051 #endif
00052 
00053 #ifndef __int32
00054 typedef int          __int32;
00055 #endif
00056 #ifndef __uint32
00057 typedef unsigned int __uint32;
00058 #endif
00059 
00060 #ifndef __int64
00061 typedef long long          __int64;
00062 #endif
00063 #ifndef __uint64
00064 typedef unsigned long long __uint64;
00065 #endif
00066 
00067 #else
00068 
00069 typedef unsigned __int8  __uint8;
00070 typedef unsigned __int16 __uint16;
00071 typedef unsigned __int32 __uint32;
00072 typedef unsigned __int64 __uint64;
00073 
00074 #endif /* __INTEL_COMPILER */
00075 
00076 #if defined(_WIN64)
00077 
00078 typedef __uint32 __ptr32;
00079 typedef void    *__ptr64;
00080 
00081 #else /* FIXME: defined(_WIN32) */
00082 
00083 typedef void    *__ptr32;
00084 typedef __uint64 __ptr64;
00085 
00086 #endif
00087 
00088 /* Always signed and 32 bit wide */
00089 
00090 typedef __int32 LONG32;
00091 //typedef __int32 INT32;
00092 
00093 typedef LONG32 *PLONG32;
00094 //typedef INT32  *PINT32;
00095 
00096 /* Always unsigned and 32 bit wide */
00097 
00098 typedef __uint32 ULONG32;
00099 typedef __uint32 DWORD32;
00100 typedef __uint32 UINT32;
00101 
00102 typedef ULONG32 *PULONG32;
00103 typedef DWORD32 *PDWORD32;
00104 typedef UINT32  *PUINT32;
00105 
00106 /* Always signed and 64 bit wide */
00107 
00108 typedef __int64 LONG64;
00109 typedef __int64 INT64;
00110 
00111 typedef LONG64 *PLONG64;
00112 typedef INT64  *PINT64;
00113 
00114 /* Always unsigned and 64 bit wide */
00115 
00116 typedef __uint64 ULONG64;
00117 typedef __uint64 DWORD64;
00118 typedef __uint64 UINT64;
00119 
00120 typedef ULONG64 *PULONG64;
00121 typedef DWORD64 *PDWORD64;
00122 typedef UINT64  *PUINT64;
00123 
00124 /* Win32 or Win64 dependent typedef/defines. */
00125 
00126 #ifdef _WIN64
00127 
00128 typedef __int64 INT_PTR, *PINT_PTR;
00129 typedef __uint64 UINT_PTR, *PUINT_PTR;
00130 
00131 #define MAXINT_PTR 0x7fffffffffffffff
00132 #define MININT_PTR 0x8000000000000000
00133 #define MAXUINT_PTR 0xffffffffffffffff
00134 
00135 typedef __int32 HALF_PTR, *PHALF_PTR;
00136 typedef __int32 UHALF_PTR, *PUHALF_PTR;
00137 
00138 #define MAXHALF_PTR 0x7fffffff
00139 #define MINHALF_PTR 0x80000000
00140 #define MAXUHALF_PTR 0xffffffff
00141 
00142 typedef __int64 LONG_PTR, *PLONG_PTR;
00143 typedef __uint64 ULONG_PTR, *PULONG_PTR;
00144 typedef __uint64 DWORD_PTR, *PDWORD_PTR;
00145 
00146 #else /* FIXME: defined(_WIN32) */
00147 
00148 typedef __int32 INT_PTR, *PINT_PTR;
00149 typedef __uint32 UINT_PTR, *PUINT_PTR;
00150 
00151 #define MAXINT_PTR 0x7fffffff
00152 #define MININT_PTR 0x80000000
00153 #define MAXUINT_PTR 0xffffffff
00154 
00155 typedef __int16 HALF_PTR, *PHALF_PTR;
00156 typedef __uint16 UHALF_PTR, *PUHALF_PTR;
00157 
00158 #define MAXUHALF_PTR 0xffff
00159 #define MAXHALF_PTR 0x7fff
00160 #define MINHALF_PTR 0x8000
00161 
00162 typedef __int32 LONG_PTR, *PLONG_PTR;
00163 typedef __uint32 ULONG_PTR, *PULONG_PTR;
00164 typedef __uint32 DWORD_PTR, *PDWORD_PTR;
00165 
00166 #endif /* defined(_WIN64) || defined(_WIN32) */
00167 
00168 typedef INT_PTR SSIZE_T, *PSSIZE_T;
00169 typedef UINT_PTR SIZE_T, *PSIZE_T;
00170 
00171 #ifdef __cplusplus
00172 } /* extern "C" */
00173 #endif /* defined(__cplusplus) */
00174 
00175 #endif /* !defined(__WINE_BASETSD_H) */
00176 
00177 
00178 

Generated on Tue Dec 20 10:14:22 2005 for vlc-0.8.4a by  doxygen 1.4.2