forked from OSchip/llvm-project
lib/asan: Attempt to ensure __WORDSIZE gets defined, it is not always set by
Darwin's stdint.h for example. llvm-svn: 145663
This commit is contained in:
parent
eb0a6c0a85
commit
9c665e36d4
|
@ -22,6 +22,16 @@
|
||||||
#include <stdlib.h> // for size_t
|
#include <stdlib.h> // for size_t
|
||||||
#include <unistd.h> // for _exit
|
#include <unistd.h> // for _exit
|
||||||
|
|
||||||
|
// If __WORDSIZE was undefined by the platform, define it in terms of the
|
||||||
|
// compiler built-in __LP64__.
|
||||||
|
#ifndef __WORDSIZE
|
||||||
|
#if __LP64__
|
||||||
|
#define __WORDSIZE 64
|
||||||
|
#else
|
||||||
|
#define __WORDSIZE 32
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
#include <sys/atomics.h>
|
#include <sys/atomics.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue