diff --git a/dlls/oleaut32/olepicture.c b/dlls/oleaut32/olepicture.c index 117f160539cd8df2bc2d8df6d35d48d15c530329..749af7193ad424aa32f166cb5e2ef984f6c43e0c 100644 --- a/dlls/oleaut32/olepicture.c +++ b/dlls/oleaut32/olepicture.c @@ -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> diff --git a/dlls/winmm/winenas/audio.c b/dlls/winmm/winenas/audio.c index 8d90a09a8464b6990b185f12119269ef2df1752f..526e0fa19458ef3989622e6a7cb6b987be47dacc 100644 --- a/dlls/winmm/winenas/audio.c +++ b/dlls/winmm/winenas/audio.c @@ -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 diff --git a/include/basetsd.h b/include/basetsd.h index 559387bc944441c18a42769c56c820b08549e357..2ac39102695f2a51d7eaebaa49f41237b3048967 100644 --- a/include/basetsd.h +++ b/include/basetsd.h @@ -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; diff --git a/include/rpcndr.h b/include/rpcndr.h index 1358f824e75717b20e18f91c9572b219e353e390..ebf632b9f5479234302efd84687c500e7b13132a 100644 --- a/include/rpcndr.h +++ b/include/rpcndr.h @@ -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; */ diff --git a/include/wine/windef16.h b/include/wine/windef16.h index ff36f3a7dc17aaf7753555cb5b21e62eb52ed914..610a8c9178b99cf5a0819e874641f9341dc2a5d5 100644 --- a/include/wine/windef16.h +++ b/include/wine/windef16.h @@ -27,8 +27,6 @@ /* Standard data types */ -typedef short INT16; -typedef unsigned short UINT16; typedef unsigned short BOOL16; typedef DWORD SEGPTR; diff --git a/include/winnt.h b/include/winnt.h index 301edae923f0cab2ace29a97b1d82051de8b12a4..4320bdc71dbea5420ef898ce510281516469e51c 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -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_ diff --git a/include/wtypes.h b/include/wtypes.h index c9ab1c08d265f83a16f5d34a3b1e567aa9edfdd9..7e57fccd18c57dabfd6823b3cc0ead2e9416e038 100644 --- a/include/wtypes.h +++ b/include/wtypes.h @@ -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 diff --git a/programs/wcmd/directory.c b/programs/wcmd/directory.c index d846f001749fec73016f86f04626b5b611013c61..ce0127e53eee5c6a07317eb1cf7968f84fba12d7 100644 --- a/programs/wcmd/directory.c +++ b/programs/wcmd/directory.c @@ -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)); } - diff --git a/programs/winefile/winefile.c b/programs/winefile/winefile.c index 50131cd6977a8adbbed87fb40b9eedc1fddb66e8..e7c1c172e204790d42a193ad91e11dc665bccabd 100644 --- a/programs/winefile/winefile.c +++ b/programs/winefile/winefile.c @@ -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); diff --git a/programs/winefile/winefile.h b/programs/winefile/winefile.h index e865528ae2429f3d65500f66e0bfc723fe53b6f5..5b8fd4ead3c28681a156aca1f239574da4e6c703 100644 --- a/programs/winefile/winefile.h +++ b/programs/winefile/winefile.h @@ -56,7 +56,6 @@ #define ASSERT(x) /* nothing */ #endif -typedef __uint64 QWORD; #ifdef _MSC_VER #define LONGLONGARG _T("I64") #else diff --git a/tools/winedump/msmangle.c b/tools/winedump/msmangle.c index 8e314c5d489c24271ebf013994b8d41e008372f0..7893bcf71145865d4bac00d3a9f90c77497aaca4 100644 --- a/tools/winedump/msmangle.c +++ b/tools/winedump/msmangle.c @@ -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: diff --git a/tools/winedump/symbol.c b/tools/winedump/symbol.c index 0617003e7fe3ef0c8cce123f48c6d0c5c9b34ad4..2a3280c2f18ff681def0f1cd95619787b4907c2a 100644 --- a/tools/winedump/symbol.c +++ b/tools/winedump/symbol.c @@ -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 };