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)
Tracking
()
RESOLVED
FIXED
mozilla33
People
(Reporter: jrmuizel, Assigned: glandium)
References
Details
Attachments
(1 file)
|
2.56 KB,
patch
|
n.nethercote
:
review+
|
Details | Diff | Splinter Review |
clang-cl will build without having inttypes but does have _Bool
| Assignee | ||
Comment 1•12 years ago
|
||
I guess it has _Bool but doesn't define true, false and __bool_true_false_are_defined?
Comment 2•12 years ago
|
||
The issue is that it supports _Bool as a built-in type, so the following won't compile:
typedef BOOL _Bool;
| Assignee | ||
Comment 3•12 years ago
|
||
Note that was not what i was asking.
| Assignee | ||
Comment 4•12 years ago
|
||
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 */
| Reporter | ||
Comment 5•12 years ago
|
||
(In reply to Mike Hommey [:glandium] from comment #4)
It does.
| Assignee | ||
Comment 6•12 years ago
|
||
Attachment #8439100 -
Flags: review?(n.nethercote)
| Assignee | ||
Updated•12 years ago
|
Assignee: nobody → mh+mozilla
Status: NEW → ASSIGNED
Updated•12 years ago
|
Attachment #8439100 -
Flags: review?(n.nethercote) → review+
| Assignee | ||
Comment 7•12 years ago
|
||
| Assignee | ||
Comment 8•12 years ago
|
||
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.
| Assignee | ||
Comment 9•12 years ago
|
||
Comment 10•12 years ago
|
||
(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.
Description
•