[PATCH] A fix for platform-dependent types in sanitizers' profiling support lib on x64 FreeBSD in 32-bit mode
Joerg Sonnenberger
joerg at NetBSD.org
Mon Feb 24 06:25:47 PST 2014
================
Comment at: lib/profile/GCDAProfiling.c:38
@@ +37,3 @@
+// System headers define 'size_t' incorrectly on x64 FreeBSD (prior to
+// FreeBSD 10, r232261) when compiled in 32-bit mode.
+typedef unsigned char uint8_t;
----------------
__LP64__ also matches SPARC64. I think this should include sys/param.h in the FreeBSD branch and use a proper version check. Alternatively, use the __INT64_TYPE__ predefine.
================
Comment at: lib/profile/GCDAProfiling.c:42
@@ +41,3 @@
+typedef unsigned long long uint64_t;
+int mkdir(const char*, unsigned short);
+#else
----------------
Include unistd.h?
================
Comment at: lib/profile/PGOProfiling.c:19
@@ +18,3 @@
+// System headers define 'size_t' incorrectly on x64 FreeBSD (prior to
+// FreeBSD 10, r232261) when compiled in 32-bit mode.
+#define PRIu64 "llu"
----------------
See comment for GCDAProfiling.c.
http://llvm-reviews.chandlerc.com/D2866
More information about the llvm-commits
mailing list