Closed Bug 1024097 Opened 12 years ago Closed 12 years ago

jemalloc assumes that having inttypes implies something about the existence of _Bool

Categories

(Core :: Memory Allocator, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: jrmuizel, Assigned: glandium)

References

Details

Attachments

(1 file)

clang-cl will build without having inttypes but does have _Bool
Blocks: winclang
I guess it has _Bool but doesn't define true, false and __bool_true_false_are_defined?
The issue is that it supports _Bool as a built-in type, so the following won't compile: typedef BOOL _Bool;
Note that was not what i was asking.
Let's put it another way: does the following work? diff --git a/memory/jemalloc/src/include/msvc_compat/C99/stdbool.h b/memory/jemalloc/src/include/msvc_compat/C99/stdbool.h --- a/memory/jemalloc/src/include/msvc_compat/C99/stdbool.h +++ b/memory/jemalloc/src/include/msvc_compat/C99/stdbool.h @@ -1,16 +1,18 @@ #ifndef stdbool_h #define stdbool_h #include <wtypes.h> /* MSVC doesn't define _Bool or bool in C, but does have BOOL */ /* Note this doesn't pass autoconf's test because (bool) 0.5 != true */ +#ifndef __clang__ typedef BOOL _Bool; +#endif #define bool _Bool #define true 1 #define false 0 #define __bool_true_false_are_defined 1 #endif /* stdbool_h */
(In reply to Mike Hommey [:glandium] from comment #4) It does.
Attachment #8439100 - Flags: review?(n.nethercote)
Assignee: nobody → mh+mozilla
Status: NEW → ASSIGNED
Attachment #8439100 - Flags: review?(n.nethercote) → review+
Note, this issue makes me think there might be other problems lingering with clang-cl because of the discrepancy between the MSVC version it advertizes, and the MSVC headers version being different, in more than Mozilla code.
(In reply to comment #8) > Note, this issue makes me think there might be other problems lingering with > clang-cl because of the discrepancy between the MSVC version it advertizes, and > the MSVC headers version being different, in more than Mozilla code. Yeah, agreed.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: