From 8947e46af922553d65c2a6389451dd48ad82e455 Mon Sep 17 00:00:00 2001 From: ryanking13 Date: Fri, 12 Jan 2024 00:52:57 +0900 Subject: [PATCH 2/9] Fix LONG_BIT constant to be always 32bit Starting from Emscripten 3.1.50, there is an issue where LONG_BIT is calculated to 64 for some reason. This is very strange because LONG_MAX becomes 2^64-1 when calculating LONG_BIT (in limits.h), but it then becomes 2^32-1 when it is accessed in other places. I wasn't able to make a minimal code to reproduce a bug. Probably something is messed up while importing pyconfig.h, etc. Related: https://github.com/emscripten-core/emscripten/pull/20752 --- Include/pyport.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Include/pyport.h b/Include/pyport.h index 2c8567f2554..63624a26b44 100644 --- a/Include/pyport.h +++ b/Include/pyport.h @@ -416,6 +416,7 @@ extern "C" { #define LONG_MIN (-LONG_MAX-1) #endif +#undef LONG_BIT #ifndef LONG_BIT #define LONG_BIT (8 * SIZEOF_LONG) #endif -- 2.43.0