From 1c56562cc72171a6cf256792c2cefdca91d5fffb Mon Sep 17 00:00:00 2001 From: Davide Beatrici Date: Sat, 15 Aug 2020 09:18:21 +0200 Subject: [PATCH] Remove "UINT_PTR" and "LONG_PTR", use original type everywhere --- src/Cedar/WinUi.h | 10 +++++++--- src/Mayaqua/MayaType.h | 10 +++++----- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/Cedar/WinUi.h b/src/Cedar/WinUi.h index e7d2f235..801eb6b0 100644 --- a/src/Cedar/WinUi.h +++ b/src/Cedar/WinUi.h @@ -19,15 +19,19 @@ // Make available the types for Windows even if windows.h is not included #ifndef _WINDEF_ - typedef void *HWND; typedef void *HFONT; typedef void *HICON; typedef void *HMENU; -typedef UINT_PTR WPARAM; -typedef LONG_PTR LPARAM; typedef void *HINSTANCE; +#ifdef CPU_64 +typedef unsigned __int64 *WPARAM; +typedef __int64 *LPARAM; +#else +typedef unsigned int *WPARAM; +typedef long *LPARAM; +#endif // CPU_64 #endif // _WINDEF_ diff --git a/src/Mayaqua/MayaType.h b/src/Mayaqua/MayaType.h index 9083982a..e32edc00 100644 --- a/src/Mayaqua/MayaType.h +++ b/src/Mayaqua/MayaType.h @@ -191,10 +191,6 @@ typedef unsigned int UINT; typedef unsigned int UINT32; typedef unsigned int DWORD; typedef signed int INT; - -typedef int UINT_PTR; -typedef long LONG_PTR; - #endif // 16bit integer type @@ -224,7 +220,11 @@ typedef signed long long time_64t; typedef int SOCKET; #else // OS_UNIX #ifndef _WINSOCK2API_ -typedef UINT_PTR SOCKET; +#ifdef CPU_64 +typedef unsigned __int64 SOCKET; +#else +typedef unsigned int SOCKET; +#endif // CPU_64 #endif // _WINSOCK2API_ #endif // OS_UNIX