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:
parent
c01202b00e
commit
dd0bdbe44e
|
@ -60,6 +60,7 @@
|
||||||
#ifdef HAVE_LIBJPEG
|
#ifdef HAVE_LIBJPEG
|
||||||
/* This is a hack, so jpeglib.h does not redefine INT32 and the like*/
|
/* This is a hack, so jpeglib.h does not redefine INT32 and the like*/
|
||||||
#define XMD_H
|
#define XMD_H
|
||||||
|
#define UINT8 JPEG_UINT8
|
||||||
#define UINT16 JPEG_UINT16
|
#define UINT16 JPEG_UINT16
|
||||||
#ifdef HAVE_JPEGLIB_H
|
#ifdef HAVE_JPEGLIB_H
|
||||||
# include <jpeglib.h>
|
# include <jpeglib.h>
|
||||||
|
|
|
@ -55,8 +55,9 @@
|
||||||
#define FRAG_COUNT 10
|
#define FRAG_COUNT 10
|
||||||
|
|
||||||
/* avoid type conflicts */
|
/* avoid type conflicts */
|
||||||
#define INT32 X_INT32
|
#define INT8 X_INT8
|
||||||
#define INT16 X_INT16
|
#define INT16 X_INT16
|
||||||
|
#define INT32 X_INT32
|
||||||
#define BOOL X_BOOL
|
#define BOOL X_BOOL
|
||||||
#define BYTE X_BYTE
|
#define BYTE X_BYTE
|
||||||
#ifdef HAVE_AUDIO_AUDIOLIB_H
|
#ifdef HAVE_AUDIO_AUDIOLIB_H
|
||||||
|
@ -65,8 +66,9 @@
|
||||||
#ifdef HAVE_AUDIO_SOUNDLIB_H
|
#ifdef HAVE_AUDIO_SOUNDLIB_H
|
||||||
#include <audio/soundlib.h>
|
#include <audio/soundlib.h>
|
||||||
#endif
|
#endif
|
||||||
#undef INT32
|
#undef INT8
|
||||||
#undef INT16
|
#undef INT16
|
||||||
|
#undef INT32
|
||||||
#undef BOOL
|
#undef BOOL
|
||||||
#undef BYTE
|
#undef BYTE
|
||||||
|
|
||||||
|
|
|
@ -41,119 +41,67 @@ extern "C" {
|
||||||
/* Type model indepent typedefs */
|
/* Type model indepent typedefs */
|
||||||
|
|
||||||
#ifndef _MSC_VER
|
#ifndef _MSC_VER
|
||||||
typedef char __int8;
|
#define __int8 char
|
||||||
typedef short __int16;
|
#define __int16 short
|
||||||
typedef int __int32;
|
#define __int32 int
|
||||||
#ifndef __MINGW__
|
|
||||||
typedef long long __int64;
|
|
||||||
#else
|
|
||||||
/* Using a typedef can tweak bugs in the C++ parser under Mingw32 */
|
|
||||||
#define __int64 long long
|
#define __int64 long long
|
||||||
#endif /* !defined(__MINGW__) */
|
|
||||||
#endif /* !defined(_MSC_VER) */
|
#endif /* !defined(_MSC_VER) */
|
||||||
|
|
||||||
typedef unsigned char __uint8;
|
typedef signed __int8 INT8, *PINT8;
|
||||||
typedef unsigned short __uint16;
|
typedef signed __int16 INT16, *PINT16;
|
||||||
typedef unsigned int __uint32;
|
typedef signed __int32 INT32, *PINT32;
|
||||||
|
typedef signed __int64 INT64, *PINT64;
|
||||||
#ifndef _MSC_VER
|
typedef unsigned __int8 UINT8, *PUINT8;
|
||||||
typedef unsigned long long __uint64;
|
typedef unsigned __int16 UINT16, *PUINT16;
|
||||||
#else
|
typedef unsigned __int32 UINT32, *PUINT32;
|
||||||
typedef unsigned __int64 __uint64;
|
typedef unsigned __int64 UINT64, *PUINT64;
|
||||||
#endif /* !defined(_MSC_VER) */
|
typedef signed __int32 LONG32, *PLONG32;
|
||||||
|
typedef unsigned __int32 ULONG32, *PULONG32;
|
||||||
#if defined(_WIN64)
|
typedef unsigned __int32 DWORD32, *PDWORD32;
|
||||||
|
typedef signed __int64 LONG64, *PLONG64;
|
||||||
typedef __uint32 __ptr32;
|
typedef unsigned __int64 ULONG64, *PULONG64;
|
||||||
typedef void *__ptr64;
|
typedef unsigned __int64 DWORD64, *PDWORD64;
|
||||||
|
|
||||||
#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;
|
|
||||||
|
|
||||||
/* Win32 or Win64 dependent typedef/defines. */
|
/* Win32 or Win64 dependent typedef/defines. */
|
||||||
|
|
||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
|
|
||||||
typedef __int64 INT_PTR, *PINT_PTR;
|
typedef signed __int64 INT_PTR, *PINT_PTR;
|
||||||
typedef __uint64 UINT_PTR, *PUINT_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 MAXINT_PTR 0x7fffffffffffffff
|
||||||
#define MININT_PTR 0x8000000000000000
|
#define MININT_PTR 0x8000000000000000
|
||||||
#define MAXUINT_PTR 0xffffffffffffffff
|
#define MAXUINT_PTR 0xffffffffffffffff
|
||||||
|
|
||||||
typedef __int32 HALF_PTR, *PHALF_PTR;
|
typedef signed __int32 HALF_PTR, *PHALF_PTR;
|
||||||
typedef __int32 UHALF_PTR, *PUHALF_PTR;
|
typedef unsigned __int32 UHALF_PTR, *PUHALF_PTR;
|
||||||
|
|
||||||
#define MAXHALF_PTR 0x7fffffff
|
#define MAXHALF_PTR 0x7fffffff
|
||||||
#define MINHALF_PTR 0x80000000
|
#define MINHALF_PTR 0x80000000
|
||||||
#define MAXUHALF_PTR 0xffffffff
|
#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) */
|
#else /* FIXME: defined(_WIN32) */
|
||||||
|
|
||||||
typedef __int32 INT_PTR, *PINT_PTR;
|
typedef signed __int32 INT_PTR, *PINT_PTR;
|
||||||
typedef __uint32 UINT_PTR, *PUINT_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 MAXINT_PTR 0x7fffffff
|
||||||
#define MININT_PTR 0x80000000
|
#define MININT_PTR 0x80000000
|
||||||
#define MAXUINT_PTR 0xffffffff
|
#define MAXUINT_PTR 0xffffffff
|
||||||
|
|
||||||
typedef __int16 HALF_PTR, *PHALF_PTR;
|
typedef signed __int16 HALF_PTR, *PHALF_PTR;
|
||||||
typedef __uint16 UHALF_PTR, *PUHALF_PTR;
|
typedef unsigned __int16 UHALF_PTR, *PUHALF_PTR;
|
||||||
|
|
||||||
#define MAXUHALF_PTR 0xffff
|
#define MAXUHALF_PTR 0xffff
|
||||||
#define MAXHALF_PTR 0x7fff
|
#define MAXHALF_PTR 0x7fff
|
||||||
#define MINHALF_PTR 0x8000
|
#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) */
|
#endif /* defined(_WIN64) || defined(_WIN32) */
|
||||||
|
|
||||||
typedef INT_PTR SSIZE_T, *PSSIZE_T;
|
typedef INT_PTR SSIZE_T, *PSSIZE_T;
|
||||||
|
|
|
@ -28,8 +28,8 @@
|
||||||
#define TARGET_IS_NT351_OR_WIN95_OR_LATER 1
|
#define TARGET_IS_NT351_OR_WIN95_OR_LATER 1
|
||||||
|
|
||||||
typedef unsigned char byte;
|
typedef unsigned char byte;
|
||||||
typedef __int64 hyper;
|
#define hyper __int64
|
||||||
typedef __uint64 MIDL_uhyper;
|
#define MIDL_uhyper unsigned __int64
|
||||||
/* 'boolean' tend to conflict, let's call it _wine_boolean */
|
/* 'boolean' tend to conflict, let's call it _wine_boolean */
|
||||||
typedef unsigned char _wine_boolean;
|
typedef unsigned char _wine_boolean;
|
||||||
/* typedef _wine_boolean boolean; */
|
/* typedef _wine_boolean boolean; */
|
||||||
|
|
|
@ -27,8 +27,6 @@
|
||||||
|
|
||||||
/* Standard data types */
|
/* Standard data types */
|
||||||
|
|
||||||
typedef short INT16;
|
|
||||||
typedef unsigned short UINT16;
|
|
||||||
typedef unsigned short BOOL16;
|
typedef unsigned short BOOL16;
|
||||||
typedef DWORD SEGPTR;
|
typedef DWORD SEGPTR;
|
||||||
|
|
||||||
|
|
|
@ -381,8 +381,8 @@ typedef unsigned short WCHAR, *PWCHAR;
|
||||||
/* 'Extended/Wide' numerical types */
|
/* 'Extended/Wide' numerical types */
|
||||||
#ifndef _ULONGLONG_
|
#ifndef _ULONGLONG_
|
||||||
#define _ULONGLONG_
|
#define _ULONGLONG_
|
||||||
typedef __int64 LONGLONG, *PLONGLONG;
|
typedef signed __int64 LONGLONG, *PLONGLONG;
|
||||||
typedef __uint64 ULONGLONG, *PULONGLONG;
|
typedef unsigned __int64 ULONGLONG, *PULONGLONG;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _DWORDLONG_
|
#ifndef _DWORDLONG_
|
||||||
|
|
|
@ -49,13 +49,13 @@ typedef BSTR *LPBSTR;
|
||||||
|
|
||||||
#ifndef _DWORDLONG_
|
#ifndef _DWORDLONG_
|
||||||
#define _DWORDLONG_
|
#define _DWORDLONG_
|
||||||
typedef __uint64 DWORDLONG, *PDWORDLONG;
|
typedef unsigned __int64 DWORDLONG, *PDWORDLONG;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _ULONGLONG_
|
#ifndef _ULONGLONG_
|
||||||
#define _ULONGLONG_
|
#define _ULONGLONG_
|
||||||
typedef __int64 LONGLONG, *PLONGLONG;
|
typedef signed __int64 LONGLONG, *PLONGLONG;
|
||||||
typedef __uint64 ULONGLONG, *PULONGLONG;
|
typedef unsigned __int64 ULONGLONG, *PULONGLONG;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef enum tagDVASPECT
|
typedef enum tagDVASPECT
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
int WCMD_dir_sort (const void *a, const void *b);
|
int WCMD_dir_sort (const void *a, const void *b);
|
||||||
void WCMD_list_directory (char *path, int level);
|
void WCMD_list_directory (char *path, int level);
|
||||||
char * WCMD_filesize64 (__uint64 free);
|
char * WCMD_filesize64 (ULONGLONG free);
|
||||||
char * WCMD_strrev (char *buff);
|
char * WCMD_strrev (char *buff);
|
||||||
|
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ extern DWORD errorlevel;
|
||||||
|
|
||||||
int file_total, dir_total, line_count, page_mode, recurse, wide, bare,
|
int file_total, dir_total, line_count, page_mode, recurse, wide, bare,
|
||||||
max_width;
|
max_width;
|
||||||
__uint64 byte_total;
|
ULONGLONG byte_total;
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* WCMD_directory
|
* WCMD_directory
|
||||||
|
@ -363,9 +363,9 @@ ULARGE_INTEGER byte_count, file_size;
|
||||||
* FIXME: There must be a better algorithm!
|
* FIXME: There must be a better algorithm!
|
||||||
*/
|
*/
|
||||||
|
|
||||||
char * WCMD_filesize64 (__uint64 n) {
|
char * WCMD_filesize64 (ULONGLONG n) {
|
||||||
|
|
||||||
__uint64 q;
|
ULONGLONG q;
|
||||||
uint r, i;
|
uint r, i;
|
||||||
char *p;
|
char *p;
|
||||||
static char buff[32];
|
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,
|
return (lstrcmpi(((WIN32_FIND_DATA *)a)->cFileName,
|
||||||
((WIN32_FIND_DATA *)b)->cFileName));
|
((WIN32_FIND_DATA *)b)->cFileName));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1722,9 +1722,6 @@ static void draw_item(Pane* pane, LPDRAWITEMSTRUCT dis, Entry* entry, int calcWi
|
||||||
RECT focusRect = dis->rcItem;
|
RECT focusRect = dis->rcItem;
|
||||||
HBRUSH hbrush;
|
HBRUSH hbrush;
|
||||||
enum IMAGE img;
|
enum IMAGE img;
|
||||||
#ifndef _NO_EXTENSIONS
|
|
||||||
QWORD index;
|
|
||||||
#endif
|
|
||||||
int img_pos, cx;
|
int img_pos, cx;
|
||||||
int col = 0;
|
int col = 0;
|
||||||
|
|
||||||
|
@ -1922,10 +1919,9 @@ static void draw_item(Pane* pane, LPDRAWITEMSTRUCT dis, Entry* entry, int calcWi
|
||||||
if (!(attrs&FILE_ATTRIBUTE_DIRECTORY))
|
if (!(attrs&FILE_ATTRIBUTE_DIRECTORY))
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
QWORD size;
|
ULONGLONG size;
|
||||||
|
|
||||||
*(DWORD*)(&size) = entry->data.nFileSizeLow; /*TODO: platform spefific */
|
size = ((ULONGLONG)entry->data.nFileSizeHigh << 32) | entry->data.nFileSizeLow;
|
||||||
*(((DWORD*)&size)+1) = entry->data.nFileSizeHigh;
|
|
||||||
|
|
||||||
_stprintf(buffer, _T("%") LONGLONGARG _T("d"), size);
|
_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
|
#ifndef _NO_EXTENSIONS
|
||||||
if (entry->bhfi_valid) {
|
if (entry->bhfi_valid) {
|
||||||
((DWORD*)&index)[0] = entry->bhfi.nFileIndexLow; /*TODO: platform spefific */
|
ULONGLONG index = ((ULONGLONG)entry->bhfi.nFileIndexHigh << 32) | entry->bhfi.nFileIndexLow;
|
||||||
((DWORD*)&index)[1] = entry->bhfi.nFileIndexHigh;
|
|
||||||
|
|
||||||
if (visible_cols & COL_INDEX) {
|
if (visible_cols & COL_INDEX) {
|
||||||
_stprintf(buffer, _T("%") LONGLONGARG _T("X"), index);
|
_stprintf(buffer, _T("%") LONGLONGARG _T("X"), index);
|
||||||
|
|
|
@ -56,7 +56,6 @@
|
||||||
#define ASSERT(x) /* nothing */
|
#define ASSERT(x) /* nothing */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef __uint64 QWORD;
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#define LONGLONGARG _T("I64")
|
#define LONGLONGARG _T("I64")
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -676,15 +676,15 @@ static char *get_type_string (const char c, const int constraints)
|
||||||
switch (c)
|
switch (c)
|
||||||
{
|
{
|
||||||
case 'D': type_string = "__int8"; break;
|
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 '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 '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 '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 '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 'N': type_string = "int"; break; /* bool */
|
||||||
case 'W': type_string = "WCHAR"; break; /* wchar_t */
|
case 'W': type_string = "WCHAR"; break; /* wchar_t */
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -41,7 +41,6 @@ static const char *swap_after[] =
|
||||||
"wchar_t", "WCHAR", /* Help with Unicode compliles */
|
"wchar_t", "WCHAR", /* Help with Unicode compliles */
|
||||||
"wctype_t", "WCHAR",
|
"wctype_t", "WCHAR",
|
||||||
"wint_t", "WCHAR",
|
"wint_t", "WCHAR",
|
||||||
"unsigned __int64", "__uint64", /* Wine doesn't cope with unsigned i64's */
|
|
||||||
NULL, NULL
|
NULL, NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue