[PATCH] test-suite: XCore target: fix handling of <string.h> and <memory.h>

robert lytton robert at xmos.com
Fri Jan 24 08:54:54 PST 2014


robertlytton added you to the CC list for the revision "test-suite: XCore target: fix handling of <string.h> and <memory.h>".

Xcore does not support <memory.h> or <strings.h>


http://llvm-reviews.chandlerc.com/D2619

Files:
  MultiSource/Applications/viterbi/dec_viterbi_F.c
  MultiSource/Applications/viterbi/init_viterbi.c
  MultiSource/Applications/viterbi/read_dmatrix.c
  MultiSource/Applications/viterbi/test.c
  MultiSource/Benchmarks/Bullet/include/BulletCollision/BroadphaseCollision/btDbvt.h
  MultiSource/Benchmarks/MallocBench/gs/memory_.h
  MultiSource/Benchmarks/MiBench/security-rijndael/aesxam.c
  MultiSource/Benchmarks/Prolangs-C/bison/symtab.c
  MultiSource/Benchmarks/nbench/nbench1.c
  SingleSource/Benchmarks/CoyoteBench/huffbench.c
  SingleSource/Benchmarks/Misc/oourafft.c

Index: MultiSource/Applications/viterbi/dec_viterbi_F.c
===================================================================
--- MultiSource/Applications/viterbi/dec_viterbi_F.c
+++ MultiSource/Applications/viterbi/dec_viterbi_F.c
@@ -1,4 +1,8 @@
+#ifdef __XS1B__
+#include <string.h>
+#else
 #include <memory.h>
+#endif
 #include <stdio.h>
 #include <assert.h>
 #include "common.h"
Index: MultiSource/Applications/viterbi/init_viterbi.c
===================================================================
--- MultiSource/Applications/viterbi/init_viterbi.c
+++ MultiSource/Applications/viterbi/init_viterbi.c
@@ -1,5 +1,9 @@
 #include <assert.h>
+#ifdef __XS1B__
+#include <string.h>
+#else
 #include <memory.h>
+#endif
 
 #include "common.h"
 
Index: MultiSource/Applications/viterbi/read_dmatrix.c
===================================================================
--- MultiSource/Applications/viterbi/read_dmatrix.c
+++ MultiSource/Applications/viterbi/read_dmatrix.c
@@ -1,5 +1,9 @@
 #include <stdio.h>
+#ifdef __XS1B__
+#include <string.h>
+#else
 #include <memory.h>
+#endif
 
 #include "common.h"
 
Index: MultiSource/Applications/viterbi/test.c
===================================================================
--- MultiSource/Applications/viterbi/test.c
+++ MultiSource/Applications/viterbi/test.c
@@ -1,5 +1,9 @@
 #include <stdio.h>
+#ifdef __XS1B__
+#include <string.h>
+#else
 #include <memory.h>
+#endif
 
 #include "common.h"
 
Index: MultiSource/Benchmarks/Bullet/include/BulletCollision/BroadphaseCollision/btDbvt.h
===================================================================
--- MultiSource/Benchmarks/Bullet/include/BulletCollision/BroadphaseCollision/btDbvt.h
+++ MultiSource/Benchmarks/Bullet/include/BulletCollision/BroadphaseCollision/btDbvt.h
@@ -92,7 +92,7 @@
 #endif
 
 #if DBVT_USE_MEMMOVE
-#ifndef __CELLOS_LV2__
+#if !defined(__CELLOS_LV2__) && !defined(__XS1B__)
 #include <memory.h>
 #endif
 #include <string.h>
Index: MultiSource/Benchmarks/MallocBench/gs/memory_.h
===================================================================
--- MultiSource/Benchmarks/MallocBench/gs/memory_.h
+++ MultiSource/Benchmarks/MallocBench/gs/memory_.h
@@ -54,7 +54,7 @@
 		   }
 	   }
 #    else				/* !BSD4_2 */
-#      ifdef _POSIX_SOURCE
+#      if defined(_POSIX_SOURCE) || defined(__XS1B__)
 #        include <string.h>
 #      else
 #        include <memory.h>
Index: MultiSource/Benchmarks/MiBench/security-rijndael/aesxam.c
===================================================================
--- MultiSource/Benchmarks/MiBench/security-rijndael/aesxam.c
+++ MultiSource/Benchmarks/MiBench/security-rijndael/aesxam.c
@@ -38,7 +38,9 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#ifndef __XS1B__
 #include <memory.h>
+#endif
 #include <ctype.h>
 
 #include "aes.h"
Index: MultiSource/Benchmarks/Prolangs-C/bison/symtab.c
===================================================================
--- MultiSource/Benchmarks/Prolangs-C/bison/symtab.c
+++ MultiSource/Benchmarks/Prolangs-C/bison/symtab.c
@@ -19,7 +19,7 @@
  what you give them.   Help stamp out software-hoarding!  */
 
 #include <stdio.h>
-#ifdef USG
+#if defined(USG) || defined(__XS1B__)
 #include <string.h>
 #else /* NOT USG */
 #include <strings.h>
Index: MultiSource/Benchmarks/nbench/nbench1.c
===================================================================
--- MultiSource/Benchmarks/nbench/nbench1.c
+++ MultiSource/Benchmarks/nbench/nbench1.c
@@ -58,7 +58,9 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#ifndef __XS1B__
 #include <strings.h>
+#endif
 #include <math.h>
 #include "nmglobal.h"
 #include "nbench1.h"
Index: SingleSource/Benchmarks/CoyoteBench/huffbench.c
===================================================================
--- SingleSource/Benchmarks/CoyoteBench/huffbench.c
+++ SingleSource/Benchmarks/CoyoteBench/huffbench.c
@@ -32,7 +32,9 @@
 #include <stdlib.h>
 #include <stddef.h>
 #include <stdbool.h>
+#ifndef __XS1B__
 #include <memory.h>
+#endif
 #include <math.h>
 
 // embedded random number generator; ala Park and Miller
Index: SingleSource/Benchmarks/Misc/oourafft.c
===================================================================
--- SingleSource/Benchmarks/Misc/oourafft.c
+++ SingleSource/Benchmarks/Misc/oourafft.c
@@ -1,5 +1,9 @@
 #include <math.h>
+#ifdef __XS1B__
+#include <string.h>
+#else
 #include <memory.h>
+#endif
 #include <stdio.h>
 #include <stdlib.h>
 #if !defined(__APPLE__) && !defined(__FreeBSD__) // memalign
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2619.1.patch
Type: text/x-patch
Size: 4492 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140124/d7d3f683/attachment.bin>


More information about the llvm-commits mailing list