Fix the build on 32 bit hosts.

- Add memcpy and memcmp to the stub headers.
- __uint128_t is not available on 32 bit platforms. It's also unused so just
  comment it out for now.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@153779 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/SDKs/darwin/usr/include/string.h b/SDKs/darwin/usr/include/string.h
index 5e91109..bee9d46 100644
--- a/SDKs/darwin/usr/include/string.h
+++ b/SDKs/darwin/usr/include/string.h
@@ -19,6 +19,8 @@
 
 typedef __SIZE_TYPE__ size_t;
 
+int memcmp(const void *, const void *, size_t);
+void *memcpy(void *, const void *, size_t);
 char *strcat(char *, const char *);
 char *strcpy(char *, const char *);
 char *strdup(const char *);
diff --git a/SDKs/linux/usr/include/string.h b/SDKs/linux/usr/include/string.h
index 5e91109..bee9d46 100644
--- a/SDKs/linux/usr/include/string.h
+++ b/SDKs/linux/usr/include/string.h
@@ -19,6 +19,8 @@
 
 typedef __SIZE_TYPE__ size_t;
 
+int memcmp(const void *, const void *, size_t);
+void *memcpy(void *, const void *, size_t);
 char *strcat(char *, const char *);
 char *strcpy(char *, const char *);
 char *strdup(const char *);
diff --git a/lib/atomic.c b/lib/atomic.c
index c5841e4..13dfff4 100644
--- a/lib/atomic.c
+++ b/lib/atomic.c
@@ -134,7 +134,8 @@
       }\
     case 16:\
       if (IS_LOCK_FREE_16) {\
-        LOCK_FREE_ACTION(__uint128_t);\
+        /* FIXME: __uint128_t isn't available on 32 bit platforms.
+        LOCK_FREE_ACTION(__uint128_t);*/\
       }\
   }\
   } while (0)
@@ -217,7 +218,8 @@
   OPTIMISED_CASE(2, IS_LOCK_FREE_2, uint16_t)\
   OPTIMISED_CASE(4, IS_LOCK_FREE_4, uint32_t)\
   OPTIMISED_CASE(8, IS_LOCK_FREE_8, uint64_t)\
-  OPTIMISED_CASE(16, IS_LOCK_FREE_16, __uint128_t)\
+  /* FIXME: __uint128_t isn't available on 32 bit platforms.
+  OPTIMISED_CASE(16, IS_LOCK_FREE_16, __uint128_t)*/\
 
 #define OPTIMISED_CASE(n, lockfree, type)\
 type __atomic_load_##n(type *src, int model) {\