Pacification of native compiler on OpenIndiana

* constness in ternary expressions
* removal of OS_MAX_INTEGER
* inclusion of dds/ddsrt/attributes.h everywhere DDS_EXPORT inline
  occurs
* _POSIX_PTHREAD_SEMANTICS in ddsperf

Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
Erik Boasson 2019-07-07 11:33:11 +02:00 committed by eboasson
parent c9f04ee5bd
commit 7190bb3d3e
6 changed files with 26 additions and 31 deletions

View file

@ -36,8 +36,13 @@ CU_Test(ddsrt_select, duration_to_timeval)
{
struct timeval tv, *tvptr;
dds_duration_t nsecs_max;
dds_duration_t secs_max = DDSRT_MAX_INTEGER(ddsrt_tv_sec_t);
dds_duration_t usecs_max = 999999;
dds_duration_t secs_max;
DDSRT_STATIC_ASSERT (CHAR_BIT * sizeof (ddsrt_tv_sec_t) == 32 || CHAR_BIT * sizeof (ddsrt_tv_sec_t) == 64);
if (CHAR_BIT * sizeof (ddsrt_tv_sec_t) == 32)
secs_max = INT32_MAX;
else
secs_max = INT64_MAX;
if (DDS_INFINITY > secs_max) {
CU_ASSERT_EQUAL_FATAL(secs_max, INT32_MAX);

View file

@ -27,9 +27,9 @@ char str_xllmin[99], str_xllmax[99];
/* Really test with the maximum values supported on a platform, not some
made up number. */
long long llmin = DDSRT_MIN_INTEGER(long long);
long long llmax = DDSRT_MAX_INTEGER(long long);
unsigned long long ullmax = DDSRT_MAX_INTEGER(unsigned long long);
long long llmin = INT64_MIN;
long long llmax = INT64_MAX;
unsigned long long ullmax = UINT64_MAX;
CU_Init(ddsrt_strtoll)
{