Skip to content

Commit f0daa9c

Browse files
committed
[mono] Dont' use bareword bool in icall sig macros
It will expand to `_Bool` in C11 and mess things up. Use `boolean` instead Fixes dotnet#91779
1 parent 2b4cf8d commit f0daa9c

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

src/mono/mono/metadata/icall-signatures.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
// mono_icall_sig_void_int32
5858
// mono_icall_sig_void_object
5959
// mono_icall_sig_void_ptr
60-
// mono_icall_sig_bool_ptr_ptrref
60+
// mono_icall_sig_boolean_ptr_ptrref
6161
// mono_icall_sig_double_double_double
6262
// mono_icall_sig_float_float_float
6363
// mono_icall_sig_int_obj_ptr
@@ -94,7 +94,7 @@
9494
// mono_icall_sig_void_ptr_ptr
9595
// mono_icall_sig_void_ptr_ptrref
9696
// mono_icall_sig_void_uint32_ptrref
97-
// mono_icall_sig_bool_ptr_int32_ptrref
97+
// mono_icall_sig_boolean_ptr_int32_ptrref
9898
// mono_icall_sig_int32_int32_ptr_ptrref
9999
// mono_icall_sig_int32_ptr_int32_ptr
100100
// mono_icall_sig_int32_ptr_int32_ptrref
@@ -182,7 +182,7 @@ ICALL_SIG (2, (void, int)) \
182182
ICALL_SIG (2, (void, int32)) \
183183
ICALL_SIG (2, (void, object)) \
184184
ICALL_SIG (2, (void, ptr)) \
185-
ICALL_SIG (3, (bool, ptr, ptrref)) \
185+
ICALL_SIG (3, (boolean, ptr, ptrref)) \
186186
ICALL_SIG (3, (double, double, double)) \
187187
ICALL_SIG (3, (float, float, float)) \
188188
ICALL_SIG (3, (int, obj, ptr)) \
@@ -222,7 +222,7 @@ ICALL_SIG (3, (void, ptr, object)) \
222222
ICALL_SIG (3, (void, ptr, ptr)) \
223223
ICALL_SIG (3, (void, ptr, ptrref)) \
224224
ICALL_SIG (3, (void, uint32, ptrref)) \
225-
ICALL_SIG (4, (bool, ptr, int32, ptrref)) \
225+
ICALL_SIG (4, (boolean, ptr, int32, ptrref)) \
226226
ICALL_SIG (4, (int32, int32, ptr, ptrref)) \
227227
ICALL_SIG (4, (int32, ptr, int32, ptr)) \
228228
ICALL_SIG (4, (int32, ptr, int32, ptrref)) \

src/mono/mono/metadata/icall.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7186,8 +7186,7 @@ mono_lookup_icall_symbol (MonoMethod *m)
71867186
//
71877187
// mono_create_icall_signatures depends on this order. Handle with care.
71887188
typedef enum ICallSigType {
7189-
ICALL_SIG_TYPE_bool = 0x00,
7190-
ICALL_SIG_TYPE_boolean = ICALL_SIG_TYPE_bool,
7189+
ICALL_SIG_TYPE_boolean = 0x00,
71917190
ICALL_SIG_TYPE_double = 0x01,
71927191
ICALL_SIG_TYPE_float = 0x02,
71937192
ICALL_SIG_TYPE_int = 0x03,
@@ -7265,7 +7264,7 @@ mono_create_icall_signatures (void)
72657264
typedef gsize G_MAY_ALIAS gsize_a;
72667265

72677266
MonoType * const lookup [ ] = {
7268-
m_class_get_byval_arg (mono_defaults.boolean_class), // ICALL_SIG_TYPE_bool
7267+
m_class_get_byval_arg (mono_defaults.boolean_class), // ICALL_SIG_TYPE_boolean
72697268
m_class_get_byval_arg (mono_defaults.double_class), // ICALL_SIG_TYPE_double
72707269
m_class_get_byval_arg (mono_defaults.single_class), // ICALL_SIG_TYPE_float
72717270
m_class_get_byval_arg (mono_defaults.int32_class), // ICALL_SIG_TYPE_int

src/mono/mono/mini/aot-compiler.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14612,8 +14612,8 @@ add_preinit_got_slots (MonoAotCompile *acfg)
1461214612

1461314613
#ifndef MONO_ARCH_HAVE_INTERP_ENTRY_TRAMPOLINE
1461414614
static MonoMethodSignature * const * const interp_in_static_sigs [] = {
14615-
&mono_icall_sig_bool_ptr_int32_ptrref,
14616-
&mono_icall_sig_bool_ptr_ptrref,
14615+
&mono_icall_sig_boolean_ptr_int32_ptrref,
14616+
&mono_icall_sig_boolean_ptr_ptrref,
1461714617
&mono_icall_sig_int32_int32_ptrref,
1461814618
&mono_icall_sig_int32_int32_ptr_ptrref,
1461914619
&mono_icall_sig_int32_ptr_int32_ptr,

0 commit comments

Comments
 (0)