Removed the __uint* types from basetsd.h since they don't exist under

Windows. Fixed a few other issues with type definitions.
This commit is contained in:
Alexandre Julliard 2002-09-12 17:29:12 +00:00
parent c01202b00e
commit dd0bdbe44e
12 changed files with 55 additions and 114 deletions

View File

@ -60,6 +60,7 @@
#ifdef HAVE_LIBJPEG
/* This is a hack, so jpeglib.h does not redefine INT32 and the like*/
#define XMD_H
#define UINT8 JPEG_UINT8
#define UINT16 JPEG_UINT16
#ifdef HAVE_JPEGLIB_H
# include <jpeglib.h>

View File

@ -55,8 +55,9 @@
#define FRAG_COUNT 10
/* avoid type conflicts */
#define INT32 X_INT32
#define INT8 X_INT8
#define INT16 X_INT16
#define INT32 X_INT32
#define BOOL X_BOOL
#define BYTE X_BYTE
#ifdef HAVE_AUDIO_AUDIOLIB_H
@ -65,8 +66,9 @@
#ifdef HAVE_AUDIO_SOUNDLIB_H
#include <audio/soundlib.h>
#endif
#undef INT32
#undef INT8
#undef INT16
#undef INT32
#undef BOOL
#undef BYTE

View File

@ -41,119 +41,67 @@ extern "C" {
/* Type model indepent typedefs */
#ifndef _MSC_VER
typedef char __int8;
typedef short __int16;
typedef int __int32;
#ifndef __MINGW__
typedef long long __int64;
#else
/* Using a typedef can tweak bugs in the C++ parser under Mingw32 */
#define __int8 char
#define __int16 short
#define __int32 int
#define __int64 long long
#endif /* !defined(__MINGW__) */
#endif /* !defined(_MSC_VER) */
typedef unsigned char __uint8;
typedef unsigned short __uint16;
typedef unsigned int __uint32;
#ifndef _MSC_VER
typedef unsigned long long __uint64;
#else
typedef unsigned __int64 __uint64;
#endif /* !defined(_MSC_VER) */
#if defined(_WIN64)
typedef __uint32 __ptr32;
typedef void *__ptr64;
#else /* FIXME: defined(_WIN32) */
typedef void *__ptr32;
#ifndef _MSC_VER
typedef __uint64 __ptr64;
#endif /* !defined(_MSC_VER) */
#endif
/* Always signed and 32 bit wide */
typedef __int32 LONG32;
typedef __int32 INT32;
typedef LONG32 *PLONG32;
typedef INT32 *PINT32;
/* Always unsigned and 32 bit wide */
typedef __uint32 ULONG32;
typedef __uint32 DWORD32;
typedef __uint32 UINT32;
typedef ULONG32 *PULONG32;
typedef DWORD32 *PDWORD32;
typedef UINT32 *PUINT32;
/* Always signed and 64 bit wide */
typedef __int64 LONG64;
typedef __int64 INT64;
typedef LONG64 *PLONG64;
typedef INT64 *PINT64;
/* Always unsigned and 64 bit wide */
typedef __uint64 ULONG64;
typedef __uint64 DWORD64;
typedef __uint64 UINT64;
typedef ULONG64 *PULONG64;
typedef DWORD64 *PDWORD64;
typedef UINT64 *PUINT64;
typedef signed __int8 INT8, *PINT8;
typedef signed __int16 INT16, *PINT16;
typedef signed __int32 INT32, *PINT32;
typedef signed __int64 INT64, *PINT64;
typedef unsigned __int8 UINT8, *PUINT8;
typedef unsigned __int16 UINT16, *PUINT16;
typedef unsigned __int32 UINT32, *PUINT32;
typedef unsigned __int64 UINT64, *PUINT64;
typedef signed __int32 LONG32, *PLONG32;
typedef unsigned __int32 ULONG32, *PULONG32;
typedef unsigned __int32 DWORD32, *PDWORD32;
typedef signed __int64 LONG64, *PLONG64;
typedef unsigned __int64 ULONG64, *PULONG64;
typedef unsigned __int64 DWORD64, *PDWORD64;
/* Win32 or Win64 dependent typedef/defines. */
#ifdef _WIN64
typedef __int64 INT_PTR, *PINT_PTR;
typedef __uint64 UINT_PTR, *PUINT_PTR;
typedef signed __int64 INT_PTR, *PINT_PTR;
typedef signed __int64 LONG_PTR, *PLONG_PTR;
typedef unsigned __int64 UINT_PTR, *PUINT_PTR;
typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
typedef unsigned __int64 DWORD_PTR, *PDWORD_PTR;
#define MAXINT_PTR 0x7fffffffffffffff
#define MININT_PTR 0x8000000000000000
#define MAXUINT_PTR 0xffffffffffffffff
typedef __int32 HALF_PTR, *PHALF_PTR;
typedef __int32 UHALF_PTR, *PUHALF_PTR;
typedef signed __int32 HALF_PTR, *PHALF_PTR;
typedef unsigned __int32 UHALF_PTR, *PUHALF_PTR;
#define MAXHALF_PTR 0x7fffffff
#define MINHALF_PTR 0x80000000
#define MAXUHALF_PTR 0xffffffff
typedef __int64 LONG_PTR, *PLONG_PTR;
typedef __uint64 ULONG_PTR, *PULONG_PTR;
typedef __uint64 DWORD_PTR, *PDWORD_PTR;
#else /* FIXME: defined(_WIN32) */
typedef __int32 INT_PTR, *PINT_PTR;
typedef __uint32 UINT_PTR, *PUINT_PTR;
typedef signed __int32 INT_PTR, *PINT_PTR;
typedef signed __int32 LONG_PTR, *PLONG_PTR;
typedef unsigned __int32 UINT_PTR, *PUINT_PTR;
typedef unsigned __int32 ULONG_PTR, *PULONG_PTR;
typedef unsigned __int32 DWORD_PTR, *PDWORD_PTR;
#define MAXINT_PTR 0x7fffffff
#define MININT_PTR 0x80000000
#define MAXUINT_PTR 0xffffffff
typedef __int16 HALF_PTR, *PHALF_PTR;
typedef __uint16 UHALF_PTR, *PUHALF_PTR;
typedef signed __int16 HALF_PTR, *PHALF_PTR;
typedef unsigned __int16 UHALF_PTR, *PUHALF_PTR;
#define MAXUHALF_PTR 0xffff
#define MAXHALF_PTR 0x7fff
#define MINHALF_PTR 0x8000
typedef __int32 LONG_PTR, *PLONG_PTR;
typedef __uint32 ULONG_PTR, *PULONG_PTR;
typedef __uint32 DWORD_PTR, *PDWORD_PTR;
#endif /* defined(_WIN64) || defined(_WIN32) */
typedef INT_PTR SSIZE_T, *PSSIZE_T;

View File

@ -28,8 +28,8 @@
#define TARGET_IS_NT351_OR_WIN95_OR_LATER 1
typedef unsigned char byte;
typedef __int64 hyper;
typedef __uint64 MIDL_uhyper;
#define hyper __int64
#define MIDL_uhyper unsigned __int64
/* 'boolean' tend to conflict, let's call it _wine_boolean */
typedef unsigned char _wine_boolean;
/* typedef _wine_boolean boolean; */

View File

@ -27,8 +27,6 @@
/* Standard data types */
typedef short INT16;
typedef unsigned short UINT16;
typedef unsigned short BOOL16;
typedef DWORD SEGPTR;

View File

@ -381,8 +381,8 @@ typedef unsigned short WCHAR, *PWCHAR;
/* 'Extended/Wide' numerical types */
#ifndef _ULONGLONG_
#define _ULONGLONG_
typedef __int64 LONGLONG, *PLONGLONG;
typedef __uint64 ULONGLONG, *PULONGLONG;
typedef signed __int64 LONGLONG, *PLONGLONG;
typedef unsigned __int64 ULONGLONG, *PULONGLONG;
#endif
#ifndef _DWORDLONG_

View File

@ -49,13 +49,13 @@ typedef BSTR *LPBSTR;
#ifndef _DWORDLONG_
#define _DWORDLONG_
typedef __uint64 DWORDLONG, *PDWORDLONG;
typedef unsigned __int64 DWORDLONG, *PDWORDLONG;
#endif
#ifndef _ULONGLONG_
#define _ULONGLONG_
typedef __int64 LONGLONG, *PLONGLONG;
typedef __uint64 ULONGLONG, *PULONGLONG;
typedef signed __int64 LONGLONG, *PLONGLONG;
typedef unsigned __int64 ULONGLONG, *PULONGLONG;
#endif
typedef enum tagDVASPECT

View File

@ -29,7 +29,7 @@
int WCMD_dir_sort (const void *a, const void *b);
void WCMD_list_directory (char *path, int level);
char * WCMD_filesize64 (__uint64 free);
char * WCMD_filesize64 (ULONGLONG free);
char * WCMD_strrev (char *buff);
@ -43,7 +43,7 @@ extern DWORD errorlevel;
int file_total, dir_total, line_count, page_mode, recurse, wide, bare,
max_width;
__uint64 byte_total;
ULONGLONG byte_total;
/*****************************************************************************
* WCMD_directory
@ -363,9 +363,9 @@ ULARGE_INTEGER byte_count, file_size;
* FIXME: There must be a better algorithm!
*/
char * WCMD_filesize64 (__uint64 n) {
char * WCMD_filesize64 (ULONGLONG n) {
__uint64 q;
ULONGLONG q;
uint r, i;
char *p;
static char buff[32];
@ -410,4 +410,3 @@ int WCMD_dir_sort (const void *a, const void *b) {
return (lstrcmpi(((WIN32_FIND_DATA *)a)->cFileName,
((WIN32_FIND_DATA *)b)->cFileName));
}

View File

@ -1722,9 +1722,6 @@ static void draw_item(Pane* pane, LPDRAWITEMSTRUCT dis, Entry* entry, int calcWi
RECT focusRect = dis->rcItem;
HBRUSH hbrush;
enum IMAGE img;
#ifndef _NO_EXTENSIONS
QWORD index;
#endif
int img_pos, cx;
int col = 0;
@ -1922,10 +1919,9 @@ static void draw_item(Pane* pane, LPDRAWITEMSTRUCT dis, Entry* entry, int calcWi
if (!(attrs&FILE_ATTRIBUTE_DIRECTORY))
#endif
{
QWORD size;
ULONGLONG size;
*(DWORD*)(&size) = entry->data.nFileSizeLow; /*TODO: platform spefific */
*(((DWORD*)&size)+1) = entry->data.nFileSizeHigh;
size = ((ULONGLONG)entry->data.nFileSizeHigh << 32) | entry->data.nFileSizeLow;
_stprintf(buffer, _T("%") LONGLONGARG _T("d"), size);
@ -1966,8 +1962,7 @@ static void draw_item(Pane* pane, LPDRAWITEMSTRUCT dis, Entry* entry, int calcWi
#ifndef _NO_EXTENSIONS
if (entry->bhfi_valid) {
((DWORD*)&index)[0] = entry->bhfi.nFileIndexLow; /*TODO: platform spefific */
((DWORD*)&index)[1] = entry->bhfi.nFileIndexHigh;
ULONGLONG index = ((ULONGLONG)entry->bhfi.nFileIndexHigh << 32) | entry->bhfi.nFileIndexLow;
if (visible_cols & COL_INDEX) {
_stprintf(buffer, _T("%") LONGLONGARG _T("X"), index);

View File

@ -56,7 +56,6 @@
#define ASSERT(x) /* nothing */
#endif
typedef __uint64 QWORD;
#ifdef _MSC_VER
#define LONGLONGARG _T("I64")
#else

View File

@ -676,15 +676,15 @@ static char *get_type_string (const char c, const int constraints)
switch (c)
{
case 'D': type_string = "__int8"; break;
case 'E': type_string = "__uint8"; break;
case 'E': type_string = "unsigned __int8"; break;
case 'F': type_string = "__int16"; break;
case 'G': type_string = "__uint16"; break;
case 'G': type_string = "unsigned __int16"; break;
case 'H': type_string = "__int32"; break;
case 'I': type_string = "__uint32"; break;
case 'I': type_string = "unsigned __int32"; break;
case 'J': type_string = "__int64"; break;
case 'K': type_string = "__uint64"; break;
case 'K': type_string = "unsigned __int64"; break;
case 'L': type_string = "__int128"; break;
case 'M': type_string = "__uint128"; break;
case 'M': type_string = "unsigned __int128"; break;
case 'N': type_string = "int"; break; /* bool */
case 'W': type_string = "WCHAR"; break; /* wchar_t */
default:

View File

@ -41,7 +41,6 @@ static const char *swap_after[] =
"wchar_t", "WCHAR", /* Help with Unicode compliles */
"wctype_t", "WCHAR",
"wint_t", "WCHAR",
"unsigned __int64", "__uint64", /* Wine doesn't cope with unsigned i64's */
NULL, NULL
};