diff options
author | Kamil Rytarowski <n54@gmx.com> | 2018-12-15 15:05:28 +0000 |
---|---|---|
committer | Kamil Rytarowski <n54@gmx.com> | 2018-12-15 15:05:28 +0000 |
commit | d1838643c129e8d5a34fd4b2482b84e28e5204b6 (patch) | |
tree | e9ebfbb0251b2d0b71759a92db2a5dd6e395529f | |
parent | 8a788e323b39d2768b9f107b081eb57293863524 (diff) |
[test-suite] Fix NetBSD build
No functional change intended for other OSes.
git-svn-id: https://llvm.org/svn/llvm-project/test-suite/trunk@349273 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | MultiSource/Applications/JM/ldecod/image.c | 2 | ||||
-rw-r--r-- | MultiSource/Applications/JM/lencod/image.c | 4 | ||||
-rw-r--r-- | MultiSource/Applications/hexxagon/hexxagonmove.cpp | 8 | ||||
-rw-r--r-- | MultiSource/Applications/minisat/Main.cpp | 2 | ||||
-rw-r--r-- | MultiSource/Benchmarks/DOE-ProxyApps-C++/CLAMR/fmemopen.c | 3 | ||||
-rw-r--r-- | MultiSource/Benchmarks/MiBench/office-ispell/term.c | 2 | ||||
-rw-r--r-- | MultiSource/Benchmarks/Olden/voronoi/newvor.c | 2 | ||||
-rw-r--r-- | SingleSource/Benchmarks/Misc/oourafft.c | 7 | ||||
-rw-r--r-- | SingleSource/UnitTests/2005-05-11-Popcount-ffs-fls.c | 8 | ||||
-rw-r--r-- | SingleSource/UnitTests/2007-04-25-weak.c | 2 |
10 files changed, 19 insertions, 21 deletions
diff --git a/MultiSource/Applications/JM/ldecod/image.c b/MultiSource/Applications/JM/ldecod/image.c index 16ab09b5..dac7c449 100644 --- a/MultiSource/Applications/JM/ldecod/image.c +++ b/MultiSource/Applications/JM/ldecod/image.c @@ -63,7 +63,7 @@ #include "vlc.h" -#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__) +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__) #include <sys/time.h> int ftime(struct timeb *tp) { diff --git a/MultiSource/Applications/JM/lencod/image.c b/MultiSource/Applications/JM/lencod/image.c index 2f7ba568..a9892afe 100644 --- a/MultiSource/Applications/JM/lencod/image.c +++ b/MultiSource/Applications/JM/lencod/image.c @@ -51,7 +51,7 @@ #include "output.h" #include "cabac.h" -#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__) +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__) #include <sys/time.h> int ftime(struct timeb *tp) { @@ -2885,5 +2885,3 @@ void read_SP_coefficients() } fclose(SP_coeff_file); } - - diff --git a/MultiSource/Applications/hexxagon/hexxagonmove.cpp b/MultiSource/Applications/hexxagon/hexxagonmove.cpp index 78360ece..4b5058ba 100644 --- a/MultiSource/Applications/hexxagon/hexxagonmove.cpp +++ b/MultiSource/Applications/hexxagon/hexxagonmove.cpp @@ -25,7 +25,7 @@ #include <iostream> #include <stdlib.h> -#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__) +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__) #include <sys/time.h> #else #include <sys/timeb.h> @@ -91,7 +91,7 @@ void HexxagonMoveList::sortList() int getTime() { -#if defined(__FreeBSD__) || defined(__OpenBSD__ )|| defined(__APPLE__) +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__ ) || defined(__APPLE__) struct timeval tv; gettimeofday(&tv, NULL); @@ -200,7 +200,3 @@ HexxagonMove *HexxagonMoveList::getBestMove() return NULL; } - - - - diff --git a/MultiSource/Applications/minisat/Main.cpp b/MultiSource/Applications/minisat/Main.cpp index dd936263..135e6fb4 100644 --- a/MultiSource/Applications/minisat/Main.cpp +++ b/MultiSource/Applications/minisat/Main.cpp @@ -65,7 +65,7 @@ static inline int memReadStat(int field) static inline uint64_t memUsed() { return (uint64_t)memReadStat(0) * (uint64_t)getpagesize(); } -#elif defined(__FreeBSD__) +#elif defined(__FreeBSD__) || defined(__NetBSD__) static inline uint64_t memUsed(void) { struct rusage ru; getrusage(RUSAGE_SELF, &ru); diff --git a/MultiSource/Benchmarks/DOE-ProxyApps-C++/CLAMR/fmemopen.c b/MultiSource/Benchmarks/DOE-ProxyApps-C++/CLAMR/fmemopen.c index f61eebac..256a842c 100644 --- a/MultiSource/Benchmarks/DOE-ProxyApps-C++/CLAMR/fmemopen.c +++ b/MultiSource/Benchmarks/DOE-ProxyApps-C++/CLAMR/fmemopen.c @@ -15,7 +15,7 @@ // limitations under the License. // -#ifndef __linux__ +#if !defined(__linux__) && !defined(__NetBSD__) #include <stdio.h> #include <stdlib.h> @@ -111,4 +111,3 @@ FILE *fmemopen(void *buf, size_t size, const char *mode) { } #endif // __linux__ - diff --git a/MultiSource/Benchmarks/MiBench/office-ispell/term.c b/MultiSource/Benchmarks/MiBench/office-ispell/term.c index 3272df0e..b5ca986b 100644 --- a/MultiSource/Benchmarks/MiBench/office-ispell/term.c +++ b/MultiSource/Benchmarks/MiBench/office-ispell/term.c @@ -72,7 +72,7 @@ static char Rcs_Id[] = #include "msgs.h" #include <signal.h> -#if defined(__GLIBC__) || defined(__FreeBSD__) || defined(__APPLE__) +#if defined(__GLIBC__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__) /* Use termios under at least glibc */ #include <termios.h> #define USE_TERMIOS diff --git a/MultiSource/Benchmarks/Olden/voronoi/newvor.c b/MultiSource/Benchmarks/Olden/voronoi/newvor.c index 42da1398..2da010e6 100644 --- a/MultiSource/Benchmarks/Olden/voronoi/newvor.c +++ b/MultiSource/Benchmarks/Olden/voronoi/newvor.c @@ -165,7 +165,7 @@ QUAD_EDGE next_edge, avail_edge; void delete_all_edges() { next_edge= 0; avail_edge = NYL;} -#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__MINGW32__) +#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__MINGW32__) #define MEMALIGN_IS_NOT_AVAILABLE #endif diff --git a/SingleSource/Benchmarks/Misc/oourafft.c b/SingleSource/Benchmarks/Misc/oourafft.c index 75c238fc..b412071c 100644 --- a/SingleSource/Benchmarks/Misc/oourafft.c +++ b/SingleSource/Benchmarks/Misc/oourafft.c @@ -2,7 +2,7 @@ #include <memory.h> #include <stdio.h> #include <stdlib.h> -#if !defined(__APPLE__) && !defined(__FreeBSD__) // memalign +#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__NetBSD__) // memalign #include <malloc.h> #endif @@ -37,7 +37,7 @@ int main() t_overhead = t_end - t_start; /* Prepare aux data */ -#if !defined(__APPLE__) && !defined(__FreeBSD__) /* Darwin always 16-byte aligns malloc data */ +#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__NetBSD__) /* Darwin always 16-byte aligns malloc data */ ip = memalign(16, sqrt(N)*sizeof(int)); w = memalign(16, 2*N*5/4*sizeof(double)); #else @@ -47,7 +47,7 @@ int main() makewt(N >> 1, ip, w); /* Allocate buffers */ -#if !defined(__APPLE__) && !defined(__FreeBSD__) /* Darwin always 16-byte aligns malloc data */ +#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__NetBSD__) /* Darwin always 16-byte aligns malloc data */ ref = memalign(16, 2*N*sizeof(double)); cmp = memalign(16, 2*N*sizeof(double)); src = memalign(16, 2*N*sizeof(double)); @@ -757,4 +757,3 @@ void cftmdl(int n, int l, double *a, double *w) } } } - diff --git a/SingleSource/UnitTests/2005-05-11-Popcount-ffs-fls.c b/SingleSource/UnitTests/2005-05-11-Popcount-ffs-fls.c index ef5d8410..b0e9877c 100644 --- a/SingleSource/UnitTests/2005-05-11-Popcount-ffs-fls.c +++ b/SingleSource/UnitTests/2005-05-11-Popcount-ffs-fls.c @@ -2,6 +2,9 @@ * http://www.hackersdelight.org/HDcode/nlz.cc and * http://www.hackersdelight.org/HDcode/ntz.cc */ +#if defined(__NetBSD__) +#include <sys/bitops.h> +#endif #include <stdio.h> #include <string.h> #include <strings.h> @@ -72,6 +75,10 @@ int ntz8(unsigned x) { #define ffsl ffs #endif +#if defined(__NetBSD__) +#define ffsl ffs64 +#endif + int i; int main(void) { long long l; @@ -107,4 +114,3 @@ int main(void) { return(0); } - diff --git a/SingleSource/UnitTests/2007-04-25-weak.c b/SingleSource/UnitTests/2007-04-25-weak.c index e5358367..2cf14691 100644 --- a/SingleSource/UnitTests/2007-04-25-weak.c +++ b/SingleSource/UnitTests/2007-04-25-weak.c @@ -1,5 +1,5 @@ -#if !defined(__linux__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) +#if !defined(__linux__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) extern int test_weak () __attribute__ ((weak_import)); #else extern int test_weak () __attribute__ ((weak)); |