diff --git a/MicroBenchmarks/ImageProcessing/Dither/main.cpp b/MicroBenchmarks/ImageProcessing/Dither/main.cpp --- a/MicroBenchmarks/ImageProcessing/Dither/main.cpp +++ b/MicroBenchmarks/ImageProcessing/Dither/main.cpp @@ -69,7 +69,7 @@ int height = state.range(0); int width = state.range(0); int m = state.range(1); - int n = pow(m, 2); + int n = pow((double)m, 2); int *outputImage = (int *)malloc(sizeof(int) * height * width); int *temp = (int *)malloc(sizeof(int) * height * width); diff --git a/MicroBenchmarks/libs/benchmark/test/benchmark_setup_teardown_test.cc b/MicroBenchmarks/libs/benchmark/test/benchmark_setup_teardown_test.cc --- a/MicroBenchmarks/libs/benchmark/test/benchmark_setup_teardown_test.cc +++ b/MicroBenchmarks/libs/benchmark/test/benchmark_setup_teardown_test.cc @@ -10,19 +10,19 @@ // Test that Setup() and Teardown() are called exactly once // for each benchmark run (single-threaded). -namespace single { +namespace singlethreaded { static int setup_call = 0; static int teardown_call = 0; -} // namespace single +} // namespace singlethreaded static void DoSetup1(const benchmark::State& state) { - ++single::setup_call; + ++singlethreaded::setup_call; // Setup/Teardown should never be called with any thread_idx != 0. assert(state.thread_index() == 0); } static void DoTeardown1(const benchmark::State& state) { - ++single::teardown_call; + ++singlethreaded::teardown_call; assert(state.thread_index() == 0); } @@ -134,8 +134,8 @@ assert(ret > 0); // Setup/Teardown is called once for each arg group (1,3,5,7). - assert(single::setup_call == 4); - assert(single::teardown_call == 4); + assert(singlethreaded::setup_call == 4); + assert(singlethreaded::teardown_call == 4); // 3 group of threads calling this function (3,5,10). assert(concurrent::setup_call.load(std::memory_order_relaxed) == 3); diff --git a/MultiSource/Applications/ClamAV/libclamav_readdb.c b/MultiSource/Applications/ClamAV/libclamav_readdb.c --- a/MultiSource/Applications/ClamAV/libclamav_readdb.c +++ b/MultiSource/Applications/ClamAV/libclamav_readdb.c @@ -1069,7 +1069,7 @@ int ret = strcmp(a->d_name, b->d_name); if (ret != 0) return ret; -#ifdef _AIX +#if defined(_AIX) || (defined(__sun__) && defined(__svr4__)) struct stat a_stat; struct stat b_stat; stat(a->d_name, &a_stat); diff --git a/MultiSource/Applications/oggenc/oggenc.c b/MultiSource/Applications/oggenc/oggenc.c --- a/MultiSource/Applications/oggenc/oggenc.c +++ b/MultiSource/Applications/oggenc/oggenc.c @@ -8,6 +8,7 @@ * Portions from Vorbize, (c) Kenneth Arnold * and libvorbis examples, (c) Monty */ +#include #include #include #include @@ -23,8 +24,8 @@ #include #include #include +#include #ifdef __XS1B__ -#include #include "xcoretestsuite.h" #endif @@ -129,9 +130,9 @@ /* these are filled in by configure */ typedef int16_t ogg_int16_t; -typedef u_int16_t ogg_uint16_t; +typedef uint16_t ogg_uint16_t; typedef int32_t ogg_int32_t; -typedef u_int32_t ogg_uint32_t; +typedef uint32_t ogg_uint32_t; typedef int64_t ogg_int64_t; typedef struct { diff --git a/MultiSource/Applications/viterbi/read_dmatrix.c b/MultiSource/Applications/viterbi/read_dmatrix.c --- a/MultiSource/Applications/viterbi/read_dmatrix.c +++ b/MultiSource/Applications/viterbi/read_dmatrix.c @@ -1,4 +1,5 @@ #include +#include #include #include "common.h" diff --git a/MultiSource/Benchmarks/DOE-ProxyApps-C++/CLAMR/fmemopen.c b/MultiSource/Benchmarks/DOE-ProxyApps-C++/CLAMR/fmemopen.c --- 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. // -#if !defined(__linux__) && !defined(__NetBSD__) +#if !defined(__linux__) && !defined(__NetBSD__) && !(defined(__sun__) && defined(__svr4__)) #include #include diff --git a/MultiSource/Benchmarks/McCat/05-eks/main.c b/MultiSource/Benchmarks/McCat/05-eks/main.c --- a/MultiSource/Benchmarks/McCat/05-eks/main.c +++ b/MultiSource/Benchmarks/McCat/05-eks/main.c @@ -32,12 +32,12 @@ /* contains the eigenvalues for each of the matrixes. */ /* */ /************************************************************************/ +#include +#include #include "main.h" #include "QRfact.h" #include "Triang.h" #include "Jacobi.h" -#include -#include Matrix A,Q,U; int comp(const double *a,const double *b) diff --git a/MultiSource/Benchmarks/MiBench/consumer-lame/rtp.c b/MultiSource/Benchmarks/MiBench/consumer-lame/rtp.c --- a/MultiSource/Benchmarks/MiBench/consumer-lame/rtp.c +++ b/MultiSource/Benchmarks/MiBench/consumer-lame/rtp.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include diff --git a/MultiSource/Benchmarks/MiBench/office-ispell/term.c b/MultiSource/Benchmarks/MiBench/office-ispell/term.c --- a/MultiSource/Benchmarks/MiBench/office-ispell/term.c +++ b/MultiSource/Benchmarks/MiBench/office-ispell/term.c @@ -72,7 +72,7 @@ #include "msgs.h" #include -#if defined(__GLIBC__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__) +#if defined(__GLIBC__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__) || (defined(__sun__) && defined(__svr4__)) /* Use termios under at least glibc */ #include #define USE_TERMIOS diff --git a/SingleSource/Regression/C/gcc-c-torture/execute/CMakeLists.txt b/SingleSource/Regression/C/gcc-c-torture/execute/CMakeLists.txt --- a/SingleSource/Regression/C/gcc-c-torture/execute/CMakeLists.txt +++ b/SingleSource/Regression/C/gcc-c-torture/execute/CMakeLists.txt @@ -193,12 +193,6 @@ complex-5.c # -lm needed on FreeBSD ) -# Tests that require newnlib Nano IO (--undefined=_printf_float ldflag) -file(GLOB TestRequiresNanoIO CONFIGURE_DEPENDS - 920501-8.c - 930513-1.c -) - ## ## Architecture-specific Test Blacklists ## @@ -369,10 +363,6 @@ list(APPEND MaybeCFlags "-fwrapv") endif() - if(${File} IN_LIST TestRequiresNanoIO) - list(APPEND MaybeLDFlags "-Wl,-u,_printf_float") - endif() - # Add Test Target gcc_torture_execute_test(${File} PREFIX "GCC-C-execute" diff --git a/litsupport/modules/hash.py b/litsupport/modules/hash.py --- a/litsupport/modules/hash.py +++ b/litsupport/modules/hash.py @@ -10,8 +10,8 @@ return executable = context.executable try: - # Darwin's "strip" doesn't support these arguments. - if platform.system() != 'Darwin': + # Darwin's and Solaris' "strip" don't support these arguments. + if platform.system() != 'Darwin' and platfor.system() != 'SunOS': stripped_executable = executable + '.stripped' testplan.check_call([context.config.strip_tool, '--remove-section=.comment', diff --git a/tools/timeit.c b/tools/timeit.c --- a/tools/timeit.c +++ b/tools/timeit.c @@ -333,7 +333,7 @@ if (g_target_data_size_limit != ~(rlim_t) 0) { set_resource_limit(RLIMIT_DATA, g_target_data_size_limit); } -#if !defined(__APPLE__) +#if defined(RLIMIT_RSS) && !defined(__APPLE__) // On Apple platforms, RLIMIT_RSS is mapped to RLIMIT_AS and setting RLIMIT_AS // to a value smaller than the current virtual memory size will fail, This is // incompatible with the current usage in timeit and can cause issues on @@ -352,9 +352,11 @@ if (g_target_file_count_limit != ~(rlim_t) 0) { set_resource_limit(RLIMIT_NOFILE, g_target_file_count_limit); } +#ifdef RLIMIT_NPROC if (g_target_subprocess_count_limit != ~(rlim_t) 0) { set_resource_limit(RLIMIT_NPROC, g_target_subprocess_count_limit); } +#endif /* Honor the desired target execute directory. */ if (g_target_exec_directory) {