From: hjl Date: Wed, 14 Nov 2012 13:45:56 +0000 (+0000) Subject: Check __x86_64__ instead of __WORDSIZE X-Git-Tag: upstream/4.9.2~9200 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=231094d4f61b176c95c8d118c7ab449d7e527582;p=platform%2Fupstream%2Flinaro-gcc.git Check __x86_64__ instead of __WORDSIZE PR other/55292 Backport from upstream revision 167883 * sanitizer_common/sanitizer_linux.cc (internal_mmap): Check __x86_64__ instead of __WORDSIZE. (internal_filesize): Likwise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193500 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/libsanitizer/ChangeLog b/libsanitizer/ChangeLog index c67c7f1..725e85c 100644 --- a/libsanitizer/ChangeLog +++ b/libsanitizer/ChangeLog @@ -1,5 +1,13 @@ 2012-11-14 H.J. Lu + PR other/55292 + Backport from upstream revision 167883 + * sanitizer_common/sanitizer_linux.cc (internal_mmap): Check + __x86_64__ instead of __WORDSIZE. + (internal_filesize): Likwise. + +2012-11-14 H.J. Lu + * configure.ac (AC_CONFIG_AUX_DIR): Removed. * Makefile.in: Regenerated. * configure: Likewise. diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.cc b/libsanitizer/sanitizer_common/sanitizer_linux.cc index ab6c5a4..e90a68c 100644 --- a/libsanitizer/sanitizer_common/sanitizer_linux.cc +++ b/libsanitizer/sanitizer_common/sanitizer_linux.cc @@ -34,7 +34,7 @@ namespace __sanitizer { // --------------- sanitizer_libc.h void *internal_mmap(void *addr, uptr length, int prot, int flags, int fd, u64 offset) { -#if __WORDSIZE == 64 +#if defined __x86_64__ return (void *)syscall(__NR_mmap, addr, length, prot, flags, fd, offset); #else return (void *)syscall(__NR_mmap2, addr, length, prot, flags, fd, offset); @@ -67,7 +67,7 @@ uptr internal_write(fd_t fd, const void *buf, uptr count) { } uptr internal_filesize(fd_t fd) { -#if __WORDSIZE == 64 +#if defined __x86_64__ struct stat st; if (syscall(__NR_fstat, fd, &st)) return -1;