[compiler-rt] r199090 - [asan] fix the ppc32 build (by Jakub Jelinek). Note that the LLVM build still builds only for 64-bit PowerPC, and not for 32-bit
Kostya Serebryany
kcc at google.com
Mon Jan 13 02:19:12 PST 2014
Author: kcc
Date: Mon Jan 13 04:19:12 2014
New Revision: 199090
URL: http://llvm.org/viewvc/llvm-project?rev=199090&view=rev
Log:
[asan] fix the ppc32 build (by Jakub Jelinek). Note that the LLVM build still builds only for 64-bit PowerPC, and not for 32-bit
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h?rev=199090&r1=199089&r2=199090&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h Mon Jan 13 04:19:12 2014
@@ -142,23 +142,32 @@ namespace __sanitizer {
int gid;
int cuid;
int cgid;
-#ifdef __powerpc64__
+#ifdef __powerpc__
unsigned mode;
unsigned __seq;
+ u64 __unused1;
+ u64 __unused2;
#else
unsigned short mode;
unsigned short __pad1;
unsigned short __seq;
unsigned short __pad2;
+#if defined(__x86_64__) && !defined(_LP64)
+ u64 __unused1;
+ u64 __unused2;
+#else
+ unsigned long __unused1;
+ unsigned long __unused2;
+#endif
#endif
- uptr __unused1;
- uptr __unused2;
};
struct __sanitizer_shmid_ds {
__sanitizer_ipc_perm shm_perm;
#ifndef __powerpc__
uptr shm_segsz;
+ #elif !defined(__powerpc64__)
+ uptr __unused0;
#endif
uptr shm_atime;
#ifndef _LP64
@@ -290,17 +299,20 @@ namespace __sanitizer {
typedef long __sanitizer_clock_t;
#if SANITIZER_LINUX
-#if defined(_LP64) || defined(__x86_64__)
+#if defined(_LP64) || defined(__x86_64__) || defined(__powerpc__)
typedef unsigned __sanitizer___kernel_uid_t;
typedef unsigned __sanitizer___kernel_gid_t;
- typedef long long __sanitizer___kernel_off_t;
#else
typedef unsigned short __sanitizer___kernel_uid_t;
typedef unsigned short __sanitizer___kernel_gid_t;
+#endif
+#if defined(__x86_64__) && !defined(_LP64)
+ typedef long long __sanitizer___kernel_off_t;
+#else
typedef long __sanitizer___kernel_off_t;
#endif
-#if defined(__powerpc64__)
+#if defined(__powerpc__)
typedef unsigned int __sanitizer___kernel_old_uid_t;
typedef unsigned int __sanitizer___kernel_old_gid_t;
#else
More information about the llvm-commits
mailing list