From 3f740cc93e6278e4f364725012c1ec20d146e297 Mon Sep 17 00:00:00 2001 From: Stas Sergeev Date: Fri, 16 Aug 2024 23:56:03 +0300 Subject: [PATCH] define [U]LONG32 as int [#7] --- include/coff.h | 5 ++--- include/sys/cdefs.h | 5 ++--- include/sys/dxe.h | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/include/coff.h b/include/coff.h index 360ae7aeb..ac33cd7a3 100644 --- a/include/coff.h +++ b/include/coff.h @@ -8,12 +8,11 @@ /* the following are needed when cross compiling hostbin exes */ #ifndef _DJ_DEFINED_NATIVE_TYPES #define _DJ_DEFINED_NATIVE_TYPES -#ifdef _LP64 /* Note: win64 is LLP64 */ +#ifndef _ILP64 /* Note: win64 is LLP64 */ # define LONG32 int # define ULONG32 unsigned int #else -# define LONG32 long -# define ULONG32 unsigned long +# error ILP64 not supported #endif /* make sure it is 32 bits */ typedef int _DJCHK_LONG32[(sizeof(LONG32) == 4)*3 - 1]; diff --git a/include/sys/cdefs.h b/include/sys/cdefs.h index 1ccbbc8f7..5cae98f83 100644 --- a/include/sys/cdefs.h +++ b/include/sys/cdefs.h @@ -14,12 +14,11 @@ #endif #endif -#ifdef _LP64 /* Note: win64 is LLP64 */ +#ifndef _ILP64 /* Note: win64 is LLP64 */ # define LONG32 int # define ULONG32 unsigned int #else -# define LONG32 long -# define ULONG32 unsigned long +# error ILP64 not supported #endif #undef __P diff --git a/include/sys/dxe.h b/include/sys/dxe.h index a4628b804..0097caa40 100644 --- a/include/sys/dxe.h +++ b/include/sys/dxe.h @@ -16,12 +16,11 @@ /* the following are needed when cross compiling hostbin exes */ #ifndef _DJ_DEFINED_NATIVE_TYPES #define _DJ_DEFINED_NATIVE_TYPES -#ifdef _LP64 /* Note: win64 is LLP64 */ +#ifndef _ILP64 /* Note: win64 is LLP64 */ # define LONG32 int # define ULONG32 unsigned int #else -# define LONG32 long -# define ULONG32 unsigned long +# error ILP64 not supported #endif /* make sure it is 32 bits */ typedef int _DJCHK_LONG32[(sizeof(LONG32) == 4)*3 - 1];