From 90fe1b4402498f61208e9b72ce3206d4bcbffb7d Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sun, 11 Feb 2024 22:00:12 +0900 Subject: [PATCH] Win32: Use `TARGET_OS` for word-size It is derived from `_WIN64` pre-defined macro, at `-osname-` in win32/setup.mak. --- win32/Makefile.sub | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/win32/Makefile.sub b/win32/Makefile.sub index 7792d5d8e3..dba112259b 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -680,7 +680,7 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub #define _INTEGRAL_MAX_BITS 64 #endif #define SIZEOF_OFF_T 8 -!if "$(ARCH)" == "x64" +!if "$(TARGET_OS)" == "mswin64" #define SIZEOF_VOIDP 8 !else #define SIZEOF_VOIDP 4 @@ -702,7 +702,7 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub #define NUM2CLOCKID(v) NUM2INT(v) #define SIZEOF_CLOCK_T 4 #define SIZEOF_RLIM_T 0 -!if "$(ARCH)" == "x64" +!if "$(TARGET_OS)" == "mswin64" #define SIZEOF_SIZE_T 8 #define SIZEOF_PTRDIFF_T 8 #define SIZEOF_INTPTR_T 8 @@ -802,7 +802,7 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub #define HAVE_INTPTR_T 1 #define HAVE_UINTPTR_T 1 #define HAVE_SSIZE_T 1 -!if "$(ARCH)" == "x64" +!if "$(TARGET_OS)" == "mswin64" #define ssize_t __int64 #define PRI_PTR_PREFIX "I64" !else