[PATCH] include/*: only use long types for cross-compilation

Eric Pouech eric.pouech at gmail.com
Tue Feb 22 02:44:49 CST 2022


Signed-off-by: Eric Pouech <eric.pouech at gmail.com>

---
 dlls/bcrypt/gnutls.c |    4 ++--
 include/ntdef.h      |    2 +-
 include/windef.h     |    4 ++--
 include/winerror.h   |    2 +-
 include/winnt.h      |    2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/dlls/bcrypt/gnutls.c b/dlls/bcrypt/gnutls.c
index e1b32be32a4..51ab8bb7d7d 100644
--- a/dlls/bcrypt/gnutls.c
+++ b/dlls/bcrypt/gnutls.c
@@ -688,7 +688,7 @@ static NTSTATUS export_gnutls_pubkey_ecc( gnutls_privkey_t gnutls_key, enum alg_
 
     if (*pubkey_len < sizeof(*ecc_blob) + size * 2)
     {
-        FIXME( "wrong pubkey len %u / %lu\n", *pubkey_len, sizeof(*ecc_blob) + size * 2 );
+        FIXME( "wrong pubkey len %u / %zu\n", *pubkey_len, sizeof(*ecc_blob) + size * 2 );
         pgnutls_perror( ret );
         free( x.data ); free( y.data );
         return STATUS_BUFFER_TOO_SMALL;
@@ -730,7 +730,7 @@ static NTSTATUS export_gnutls_pubkey_dsa( gnutls_privkey_t gnutls_key, ULONG bit
 
     if (*pubkey_len < sizeof(*dsa_blob) + bitlen / 8 * 3)
     {
-        FIXME( "wrong pubkey len %u / %lu\n", *pubkey_len, sizeof(*dsa_blob) + bitlen / 8 * 3 );
+        FIXME( "wrong pubkey len %u / %zu\n", *pubkey_len, sizeof(*dsa_blob) + bitlen / 8 * 3 );
         pgnutls_perror( ret );
         free( p.data ); free( q.data ); free( g.data ); free( y.data );
         return STATUS_NO_MEMORY;
diff --git a/include/ntdef.h b/include/ntdef.h
index 92366c3f3bb..3f4f5fbd026 100644
--- a/include/ntdef.h
+++ b/include/ntdef.h
@@ -55,7 +55,7 @@ typedef enum _WAIT_TYPE {
 #define BASETYPES
 typedef unsigned char UCHAR, *PUCHAR;
 typedef unsigned short USHORT, *PUSHORT;
-#if !defined(__LP64__) && !defined(WINE_NO_LONG_TYPES)
+#if !defined(__LP64__) && !defined(WINE_NO_LONG_TYPES) && defined(__WINE_PE_BUILD)
 typedef unsigned long ULONG, *PULONG;
 #else
 typedef unsigned int ULONG, *PULONG;
diff --git a/include/windef.h b/include/windef.h
index cb7eb1179c8..b929774ed89 100644
--- a/include/windef.h
+++ b/include/windef.h
@@ -237,7 +237,7 @@ extern "C" {
 #define BASETYPES
 typedef unsigned char UCHAR, *PUCHAR;
 typedef unsigned short USHORT, *PUSHORT;
-#if !defined(__LP64__) && !defined(WINE_NO_LONG_TYPES)
+#if !defined(__LP64__) && !defined(WINE_NO_LONG_TYPES) && defined(__WINE_PE_BUILD)
 typedef unsigned long ULONG, *PULONG;
 #else
 typedef unsigned int ULONG, *PULONG;
@@ -253,7 +253,7 @@ typedef int             INT,        *PINT,     *LPINT;
 typedef unsigned int    UINT,       *PUINT;
 typedef float           FLOAT,      *PFLOAT;
 typedef char                        *PSZ;
-#if !defined(__LP64__) && !defined(WINE_NO_LONG_TYPES)
+#if !defined(__LP64__) && !defined(WINE_NO_LONG_TYPES) && defined(__WINE_PE_BUILD)
 typedef long                                   *LPLONG;
 typedef unsigned long   DWORD,      *PDWORD,   *LPDWORD;
 #else
diff --git a/include/winerror.h b/include/winerror.h
index b63b74a5b18..07ecb403ad3 100644
--- a/include/winerror.h
+++ b/include/winerror.h
@@ -89,7 +89,7 @@
 #define __HRESULT_FROM_WIN32(x)   ((HRESULT)(x) > 0 ? ((HRESULT) (((x) & 0x0000FFFF) | (FACILITY_WIN32 << 16) | 0x80000000)) : (HRESULT)(x) )
 #ifndef _HRESULT_DEFINED
 #define _HRESULT_DEFINED
-#if !defined(__LP64__) && !defined(WINE_NO_LONG_TYPES)
+#if !defined(__LP64__) && !defined(WINE_NO_LONG_TYPES) && defined(__WINE_PE_BUILD)
 typedef long HRESULT;
 #else
 typedef int HRESULT;
diff --git a/include/winnt.h b/include/winnt.h
index bd64b092369..4b2f1bbff31 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -467,7 +467,7 @@ typedef VOID           *PVOID64;
 typedef BYTE            BOOLEAN,    *PBOOLEAN;
 typedef char            CHAR,       *PCHAR;
 typedef short           SHORT,      *PSHORT;
-#if !defined(__LP64__) && !defined(WINE_NO_LONG_TYPES)
+#if !defined(__LP64__) && !defined(WINE_NO_LONG_TYPES) && defined(__WINE_PE_BUILD)
 typedef long            LONG,       *PLONG;
 #else
 typedef int             LONG,       *PLONG;




More information about the wine-devel mailing list