more portability fixes.

This commit is contained in:
christos 2014-10-22 21:19:59 +00:00
parent 152b237a9f
commit f4169a524f
3 changed files with 12 additions and 3 deletions

View File

@ -21,7 +21,12 @@
# Filter out unsupported systems.
case "${target}" in
*-netbsd*)
# XXX: No TSAN support yet
# There is only glue for amd64
case "${target}" in
x86_64-*)
TSAN_SUPPORTED=yes
;;
esac
;;
x86_64-*-linux* | i?86-*-linux*)
if test x$ac_cv_sizeof_void_p = x8; then

View File

@ -116,7 +116,11 @@ using namespace __sanitizer; // NOLINT
# define USED
# define PREFETCH(x) /* _mm_prefetch(x, _MM_HINT_NTA) */
#else // _MSC_VER
# define ALWAYS_INLINE __attribute__((always_inline))
# ifdef __NetBSD__
# define ALWAYS_INLINE // __attribute__((always_inline))
# else
# define ALWAYS_INLINE __attribute__((always_inline))
# endif
# define ALIAS(x) __attribute__((alias(x)))
# define ALIGNED(x) __attribute__((aligned(x)))
# define FORMAT(f, a) __attribute__((format(printf, f, a)))

View File

@ -20,7 +20,7 @@
#include <stdio.h>
#include <errno.h>
#include <link.h>
#include <linux/limits.h>
#include <limits.h>
#include <sys/types.h>
namespace __tsan {