summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoeh <joeh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-07-10 15:14:22 +0000
committerjoeh <joeh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-07-10 15:14:22 +0000
commit5d536a17210fc1425b236988ce14006d9bda9831 (patch)
tree08217ab5e327d0ba987a3e703694450ad20313aa
parentf6699de010f0893be76e4d7b90d94a005a02b62b (diff)
downloadATCD-5d536a17210fc1425b236988ce14006d9bda9831.tar.gz
Mon Jul 10 08:50:37 2000 Joe Hoffert <joeh@cs.wustl.edu>
-rw-r--r--PACE/ChangeLog104
-rw-r--r--PACE/include/makeinclude/rules.common.GNU73
-rw-r--r--PACE/pace/Makefile54
-rw-r--r--PACE/pace/config/config.h6
-rw-r--r--PACE/pace/config/defines.h2
-rw-r--r--PACE/pace/posix/aio.inl28
-rw-r--r--PACE/pace/posix/pthread.inl50
-rw-r--r--PACE/pace/posix/time.inl12
-rw-r--r--PACE/tests/Makefile54
-rw-r--r--PACE/tests/Posix_SP_Test.c17
10 files changed, 186 insertions, 214 deletions
diff --git a/PACE/ChangeLog b/PACE/ChangeLog
index 8e60699aee6..469c91f6f21 100644
--- a/PACE/ChangeLog
+++ b/PACE/ChangeLog
@@ -1,3 +1,35 @@
+Mon Jul 10 08:50:37 2000 Joe Hoffert <joeh@cs.wustl.edu>
+
+ * pace/posix/time.inl:
+ * pace/posix/pthread.inl:
+ * pace/posix/aio.inl:
+ Changed code to use PACE_NONCONST_ARG_CAST rather than
+ #idef'ing for LynxOS and doing the cast.
+
+ * pace/config/defines.h:
+ Changed order of include so that platform.h (and
+ POSIX_HAS_* #defines) will be first.
+
+ * pace/config/config.h:
+ Added PACE_NONCONST_ARG_CAST macro. Needed for LynxOS
+ when it doesn't use const args for POSIX functions
+ taking const args.
+
+ * tests/Makefile:
+ * pace/Makefile:
+ Took out common rules and included
+ include/makeinclude/rules.common.GNU instead.
+
+ * include/makeinclude/rules.common.GNU:
+ Added this file to take out common rules from the
+ different Makefiles.
+
+ * tests/Posix_SP_Test.c:
+ Made test more robust (e.g., check for all specified POSIX
+ names for sysconf and for NULL and non-NULL arg to time)
+ Also, ifdefed out some sysconf names for LynxOS since those
+ names are supported. Sent email to LynuxWorks about this.
+
Fri Jul 7 19:11:38 2000 John Heitmann <jwh1@cs.wustl.edu>
* pace/sys/mman.h
@@ -41,42 +73,42 @@ Fri Jul 7 17:24:33 2000 Luther J Baker <luther@cs.wustl.edu>
Fri Jul 7 17:22:56 2000 Luther J Baker <luther@cs.wustl.edu>
- * pace/aio.h:
- * pace/posix/aio.h:
- * pace/assert.h:
- * pace/posix/assert.h:
- * pace/ctype.h:
- * pace/posix/ctype.h:
- * pace/dirent.h:
- * pace/posix/dirent.h:
- * pace/fcntl.h:
- * pace/posix/fcntl.h:
- * pace/grp.h:
- * pace/posix/grp.h:
- * pace/math.h:
- * pace/posix/math.h:
- * pace/mqueue.h:
- * pace/posix/mqueue.h:
- * pace/pthread.h:
- * pace/posix/pthread.h:
- * pace/pwd.h:
- * pace/posix/pwd.h:
- * pace/sched.h:
- * pace/posix/sched.h:
- * pace/semaphore.h:
- * pace/posix/semaphore.h:
- * pace/setjmp.h:
- * pace/posix/setjmp.h:
- * pace/signal.h:
- * pace/posix/signal.h:
-
- Changed the protection includes. Eg:
- ROOT directory PACE_ASSERT_H
- POSIX directory PACE_ASSERT_H_POSIX.
-
- Changed the #if defined (PACE_HAS_POSIX) to #if PACE_HAS_POSIX
- per our recent conversation regarding all macros being assigned a
- value.
+ * pace/aio.h:
+ * pace/posix/aio.h:
+ * pace/assert.h:
+ * pace/posix/assert.h:
+ * pace/ctype.h:
+ * pace/posix/ctype.h:
+ * pace/dirent.h:
+ * pace/posix/dirent.h:
+ * pace/fcntl.h:
+ * pace/posix/fcntl.h:
+ * pace/grp.h:
+ * pace/posix/grp.h:
+ * pace/math.h:
+ * pace/posix/math.h:
+ * pace/mqueue.h:
+ * pace/posix/mqueue.h:
+ * pace/pthread.h:
+ * pace/posix/pthread.h:
+ * pace/pwd.h:
+ * pace/posix/pwd.h:
+ * pace/sched.h:
+ * pace/posix/sched.h:
+ * pace/semaphore.h:
+ * pace/posix/semaphore.h:
+ * pace/setjmp.h:
+ * pace/posix/setjmp.h:
+ * pace/signal.h:
+ * pace/posix/signal.h:
+
+ Changed the protection includes. Eg:
+ ROOT directory PACE_ASSERT_H
+ POSIX directory PACE_ASSERT_H_POSIX.
+
+ Changed the #if defined (PACE_HAS_POSIX) to #if PACE_HAS_POSIX
+ per our recent conversation regarding all macros being assigned a
+ value.
Moved the prototype function signatures to the root directory *.h file.
diff --git a/PACE/include/makeinclude/rules.common.GNU b/PACE/include/makeinclude/rules.common.GNU
new file mode 100644
index 00000000000..f1c2f38aa2e
--- /dev/null
+++ b/PACE/include/makeinclude/rules.common.GNU
@@ -0,0 +1,73 @@
+#----------------------------------------------------------------------------
+# $Id$
+#
+# Common rules for building PACE targets
+#----------------------------------------------------------------------------
+
+ifndef PACE_ROOT
+ PACE_ROOT = $(ACE_ROOT)/PACE
+endif # ! PACE_ROOT
+
+VPATH:=common:arpa:config:netinet:sys
+
+ifeq ($(PACE_SYSNAME),)
+ PACE_SYSNAME = $(shell uname -s)
+endif # ! PACE_SYSNAME
+
+ifeq ($(PACE_SYSVER),)
+ PACE_SYSVER = $(shell uname -r)
+endif # ! PACE_SYSVER
+
+PACE_SYSVER := $(shell echo $(PACE_SYSVER) | sed 's/\.//g')
+
+# List of platforms and uname -s values
+# =====================================
+# Solaris SunOS
+# NT "NT" (uname not supported)
+# LynxOS LynxOS
+# VxWorks "VxWorks" (strictly cross-compiled)
+# Linux Linux
+# pSOS "pSOS" (strictly cross-compiled)
+# Chorus "Chorus" (strictly cross-compiled)
+# QNX Neutrino "Neutrino" (strictly cross-compiled)
+# OSF/1 OSF1
+# IRIX (64 bit) IRIX64
+# IRIX (32 bit) IRIX (unconfirmed)
+# HPUX HP-UX
+
+# Solaris is POSIX - change this when the platform directories get
+# squared away
+#ifeq ($(PACE_SYSNAME),SunOS || $(PACE_SYSNAME),Linux)
+
+ifeq ($(PACE_SYSNAME),SunOS)
+# Hard code special cases for SunOS 5.6 and 5.7 since we
+# need a 3 digit version number for comparison purposes.
+ ifeq ($(PACE_SYSVER),57)
+ PACE_SYSVER := $(PACE_SYSVER)0
+ endif # PACE_SYSVER
+ ifeq ($(PACE_SYSVER),56)
+ PACE_SYSVER := $(PACE_SYSVER)0
+ endif # PACE_SYSVER
+VPATH :=.:posix:$(VPATH)
+CFLAGS += -DPACE_SUNOS=$(PACE_SYSVER)
+endif
+
+ifeq ($(PACE_SYSNAME),NT)
+VPATH :=.:win32:$(VPATH)
+CFLAGS += -DPACE_WIN32=$(PACE_SYSVER)
+endif
+
+ifeq ($(PACE_SYSNAME),LynxOS)
+VPATH :=.:posix:$(VPATH)
+CFLAGS += -DPACE_LYNXOS=$(PACE_SYSVER)
+endif
+
+ifeq ($(PACE_SYSNAME),VxWorks)
+VPATH :=.:vxworks:$(VPATH)
+CFLAGS += -DPACE_VXWORKS=$(PACE_SYSVER)
+endif
+
+ifeq ($(PACE_SYSNAME),Linux)
+VPATH :=.:posix:$(VPATH)
+CFLAGS += -DPACE_LINUX=$(PACE_SYSVER)
+endif
diff --git a/PACE/pace/Makefile b/PACE/pace/Makefile
index 5e2b346aaff..7a54f2dfd05 100644
--- a/PACE/pace/Makefile
+++ b/PACE/pace/Makefile
@@ -4,10 +4,6 @@
# Makefile for the PACE/pace C library release
#----------------------------------------------------------------------------
-ifndef PACE_ROOT
- PACE_ROOT = $(ACE_ROOT)/PACE
-endif # ! PACE_ROOT
-
ifndef static_libs_only
ifndef shared_libs_only
static_libs_only = 1
@@ -28,8 +24,6 @@ MAKEFILE = Makefile
LIB = libPACE.a
SHLIB = libPACE.$(SOEXT)
-VPATH:=common:arpa:config:netinet:sys
-
PACE_FILES = \
aio \
assert \
@@ -413,53 +407,7 @@ include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU
INSTALL =
include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
-ifeq ($(PACE_SYSNAME),)
- PACE_SYSNAME = $(shell uname -s)
-endif # ! PACE_SYSNAME
-
-# List of platforms and uname -s values
-# =====================================
-# Solaris SunOS
-# NT "NT" (uname not supported)
-# LynxOS LynxOS
-# VxWorks "VxWorks" (strictly cross-compiled)
-# Linux Linux
-# pSOS "pSOS" (strictly cross-compiled)
-# Chorus "Chorus" (strictly cross-compiled)
-# QNX Neutrino "Neutrino" (strictly cross-compiled)
-# OSF/1 OSF1
-# IRIX (64 bit) IRIX64
-# IRIX (32 bit) IRIX (unconfirmed)
-# HPUX HP-UX
-
-# Solaris is POSIX - change this when the platform directories get
-# squared away
-#ifeq ($(PACE_SYSNAME),SunOS || $(PACE_SYSNAME),Linux)
-
-ifeq ($(PACE_SYSNAME),SunOS)
-VPATH :=.:posix:$(VPATH)
-CFLAGS += -DPACE_SUNOS
-endif
-
-ifeq ($(PACE_SYSNAME),NT)
-VPATH :=.:win32:$(VPATH)
-CFLAGS += -DPACE_WIN32
-endif
-
-ifeq ($(PACE_SYSNAME),LynxOS)
-VPATH :=.:posix:$(VPATH)
-CFLAGS += -DPACE_LYNXOS
-endif
-
-ifeq ($(PACE_SYSNAME),VxWorks)
-VPATH :=.:vxworks:$(VPATH)
-CFLAGS += -DPACE_VXWORKS
-endif
-
-ifeq ($(PACE_SYSNAME),Linux)
-VPATH :=.:posix:$(VPATH)
-CFLAGS += -DPACE_LINUX
-endif
+include $(ACE_ROOT)/PACE/include/makeinclude/rules.common.GNU
#----------------------------------------------------------------------------
# Local targets
diff --git a/PACE/pace/config/config.h b/PACE/pace/config/config.h
index 034251128b9..528d1d4064d 100644
--- a/PACE/pace/config/config.h
+++ b/PACE/pace/config/config.h
@@ -53,4 +53,10 @@
# endif /* _POSIX_PTHREAD_SEMANTICS */
#endif /* ! PACE_HAS_POSIX_PTHREAD_SEMANTICS */
+#if PACE_HAS_POSIX == PACE_LYNXOS
+# define PACE_NONCONST_ARG_CAST(TYPE) (TYPE)
+#else /* ! PACE_LYNXOS */
+# define PACE_NONCONST_ARG_CAST(TYPE)
+#endif /* ! PACE_LYNXOS */
+
#endif /* PACE_CONFIG_CONFIG_H */
diff --git a/PACE/pace/config/defines.h b/PACE/pace/config/defines.h
index 494dacca4e3..a6b50734b77 100644
--- a/PACE/pace/config/defines.h
+++ b/PACE/pace/config/defines.h
@@ -16,8 +16,8 @@
#ifndef PACE_CONFIG_DEFINES_H
#define PACE_CONFIG_DEFINES_H
-#include "pace/config/config.h"
#include "pace/config/platform.h"
+#include "pace/config/config.h"
#include "pace/config/compiler.h"
#include "pace/config/constants.h"
#include "pace/config/defaults.h"
diff --git a/PACE/pace/posix/aio.inl b/PACE/pace/posix/aio.inl
index 0b125ac5664..6a6ace6986a 100644
--- a/PACE/pace/posix/aio.inl
+++ b/PACE/pace/posix/aio.inl
@@ -24,12 +24,7 @@ PACE_INLINE
int
pace_aio_error (const pace_aiocb * aiocbp)
{
-#if PACE_HAS_POSIX == PACE_LYNXOS
- /* Cast away const since LynxOS' prototypes aren't const */
- return aio_error ((struct aiocb *) aiocbp);
-#else
- return aio_error (aiocbp);
-#endif /* ! PACE_HAS_POSIX == PACE_LYNXOS */
+ return aio_error (PACE_NONCONST_ARG_CAST (struct aiocb *) aiocbp);
}
PACE_INLINE
@@ -56,17 +51,12 @@ pace_aio_return (pace_aiocb * aiocbp)
PACE_INLINE
int
pace_aio_suspend (const pace_aiocb * const list[],
- int nent,
- const pace_timespec * timeout)
+ int nent,
+ const pace_timespec * timeout)
{
-#if PACE_HAS_POSIX == PACE_LYNXOS
- /* Cast away const since LynxOS' prototypes aren't const */
- return aio_suspend ((struct aiocb **) list,
+ return aio_suspend (PACE_NONCONST_ARG_CAST (struct aiocb **) list,
nent,
- (struct timespec *) timeout);
-#else
- return aio_suspend (list, nent, timeout);
-#endif /* ! PACE_HAS_POSIX == PACE_LYNXOS */
+ PACE_NONCONST_ARG_CAST (struct timespec *) timeout);
}
PACE_INLINE
@@ -83,10 +73,6 @@ pace_lio_listio (int mode,
int nent,
pace_sigevent * sig)
{
-#if PACE_HAS_POSIX == PACE_LYNXOS
- /* Cast away const since LynxOS' prototypes aren't const */
- return lio_listio (mode, (struct aiocb **) list, nent, sig);
-#else
- return lio_listio (mode, list, nent, sig);
-#endif /* ! PACE_HAS_POSIX == PACE_LYNXOS */
+ return lio_listio (mode, PACE_NONCONST_ARG_CAST (struct aiocb **) list,
+ nent, sig);
}
diff --git a/PACE/pace/posix/pthread.inl b/PACE/pace/posix/pthread.inl
index 8b40a634c27..5d1e50bb5c2 100644
--- a/PACE/pace/posix/pthread.inl
+++ b/PACE/pace/posix/pthread.inl
@@ -44,13 +44,8 @@ int
pace_pthread_attr_getinheritsched (const pace_pthread_attr_t * attr,
int * inheritsched)
{
-#if PACE_HAS_POSIX == PACE_LYNXOS
- /* Cast away const since LynxOS' prototypes aren't const */
- return pthread_attr_getinheritsched ((pace_pthread_attr_t *) attr,
+ return pthread_attr_getinheritsched (PACE_NONCONST_ARG_CAST (pace_pthread_attr_t *) attr,
inheritsched);
-#else
- return pthread_attr_getinheritsched (attr, inheritsched);
-#endif /* ! PACE_HAS_POSIX == PACE_LYNXOS */
}
PACE_INLINE
@@ -90,12 +85,8 @@ int
pace_pthread_attr_getstacksize (const pace_pthread_attr_t * attr,
size_t * stacksize)
{
-#if PACE_HAS_POSIX == PACE_LYNXOS
- /* Cast away const since LynxOS' prototypes aren't const */
- return pthread_attr_getstacksize ((pace_pthread_attr_t *) attr, stacksize);
-#else
- return pthread_attr_getstacksize (attr, stacksize);
-#endif /* ! PACE_HAS_POSIX == PACE_LYNXOS */
+ return pthread_attr_getstacksize (PACE_NONCONST_ARG_CAST (pace_pthread_attr_t *) attr,
+ stacksize);
}
PACE_INLINE
@@ -203,12 +194,7 @@ pace_pthread_cond_timedwait (pthread_cond_t * cond,
pace_pthread_mutex_t * mutex,
const pace_timespec * abstime)
{
-#if PACE_HAS_POSIX == PACE_LYNXOS
- /* Cast away const since LynxOS' prototypes aren't const */
- return pthread_cond_timedwait (cond, mutex, (struct timespec *) abstime);
-#else
- return pthread_cond_timedwait (cond, mutex, abstime);
-#endif /* ! PACE_HAS_POSIX == PACE_LYNXOS */
+ return pthread_cond_timedwait (cond, mutex, PACE_NONCONST_ARG_CAST (struct timespec *) abstime);
}
PACE_INLINE
@@ -231,13 +217,8 @@ int
pace_pthread_condattr_getpshared (const pace_pthread_condattr_t * attr,
int * pshared)
{
-#if PACE_HAS_POSIX == PACE_LYNXOS
- /* Cast away const since LynxOS' prototypes aren't const */
- return pthread_condattr_getpshared ((pace_pthread_condattr_t *) attr,
+ return pthread_condattr_getpshared (PACE_NONCONST_ARG_CAST (pace_pthread_condattr_t *) attr,
pshared);
-#else
- return pthread_condattr_getpshared (attr, pshared);
-#endif /* ! PACE_HAS_POSIX == PACE_LYNXOS */
}
PACE_INLINE
@@ -413,13 +394,8 @@ int
pace_pthread_mutexattr_getprotocol (const pace_pthread_mutexattr_t * attr,
int * protocol)
{
-#if PACE_HAS_POSIX == PACE_LYNXOS
- /* Cast away const since LynxOS' prototypes aren't const */
- return pthread_mutexattr_getprotocol ((pace_pthread_mutexattr_t *) attr,
+ return pthread_mutexattr_getprotocol (PACE_NONCONST_ARG_CAST (pace_pthread_mutexattr_t *) attr,
protocol);
-#else
- return pthread_mutexattr_getprotocol (attr, protocol);
-#endif /* ! PACE_HAS_POSIX == PACE_LYNXOS */
}
PACE_INLINE
@@ -443,13 +419,8 @@ int
pace_pthread_mutexattr_getpshared (const pace_pthread_mutexattr_t * attr,
int * pshared)
{
-#if PACE_HAS_POSIX == PACE_LYNXOS
- /* Cast away const since LynxOS' prototypes aren't const */
- return pthread_mutexattr_getpshared ((pace_pthread_mutexattr_t *) attr,
+ return pthread_mutexattr_getpshared (PACE_NONCONST_ARG_CAST (pace_pthread_mutexattr_t *) attr,
pshared);
-#else
- return pthread_mutexattr_getpshared (attr, pshared);
-#endif /* ! PACE_HAS_POSIX == PACE_LYNXOS */
}
PACE_INLINE
@@ -510,12 +481,7 @@ PACE_INLINE
int
pace_pthread_setspecific (pace_pthread_key_t key, const void * value)
{
-#if PACE_HAS_POSIX == PACE_LYNXOS
- /* Cast away const since LynxOS' prototypes aren't const */
- return pthread_setspecific (key, (void *) value);
-#else
- return pthread_setspecific (key, value);
-#endif /* ! PACE_HAS_POSIX == PACE_LYNXOS */
+ return pthread_setspecific (key, PACE_NONCONST_ARG_CAST (void *) value);
}
PACE_INLINE
diff --git a/PACE/pace/posix/time.inl b/PACE/pace/posix/time.inl
index f0b920e056e..1ab0547cc7c 100644
--- a/PACE/pace/posix/time.inl
+++ b/PACE/pace/posix/time.inl
@@ -73,12 +73,7 @@ int
pace_clock_settime (clockid_t clock_id,
const pace_timespec * tp)
{
-#if PACE_HAS_POSIX == PACE_LYNXOS
- /* Cast away const for Lynx prototype compatability. */
- return clock_settime (clock_id, (struct timespec *) tp);
-#else
- return clock_settime (clock_id, tp);
-#endif /* PACE_LYNXOS */
+ return clock_settime (clock_id, PACE_NONCONST_ARG_CAST (struct timespec *) tp);
}
PACE_INLINE
@@ -156,7 +151,7 @@ int
pace_nanosleep (const pace_timespec * rqtp,
pace_timespec * rmtp)
{
- return nanosleep (rqtp, rmtp);
+ return nanosleep (PACE_NONCONST_ARG_CAST (struct timespec *) rqtp, rmtp);
}
PACE_INLINE
@@ -213,7 +208,8 @@ pace_timer_settime (timer_t timerid,
const pace_itimerspec * value,
pace_itimerspec * ovalue)
{
- return timer_settime (timerid, flags, value, ovalue);
+ return timer_settime (timerid, flags, PACE_NONCONST_ARG_CAST (struct itimerspec *) value,
+ ovalue);
}
PACE_INLINE
diff --git a/PACE/tests/Makefile b/PACE/tests/Makefile
index be69d909be3..0c5ba844507 100644
--- a/PACE/tests/Makefile
+++ b/PACE/tests/Makefile
@@ -5,10 +5,6 @@
# Makefile for all the PACE tests
#----------------------------------------------------------------------------
-ifndef PACE_ROOT
- PACE_ROOT = $(ACE_ROOT)/PACE
-endif # ! PACE_ROOT
-
ifndef static_libs_only
ifndef shared_libs_only
static_libs_only = 1
@@ -28,8 +24,6 @@ else
endif # inline
endif # ! inline
-VPATH:=common:arpa:config:netinet:sys
-
#----------------------------------------------------------------------------
# Local macros
#----------------------------------------------------------------------------
@@ -61,53 +55,7 @@ endif
include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
-ifeq ($(PACE_SYSNAME),)
- PACE_SYSNAME = $(shell uname -s)
-endif # ! PACE_SYSNAME
-
-# List of platforms and uname -s values
-# =====================================
-# Solaris SunOS
-# NT "NT" (uname not supported)
-# LynxOS LynxOS
-# VxWorks "VxWorks" (strictly cross-compiled)
-# Linux Linux
-# pSOS "pSOS" (strictly cross-compiled)
-# Chorus "Chorus" (strictly cross-compiled)
-# QNX Neutrino "Neutrino" (strictly cross-compiled)
-# OSF/1 OSF1
-# IRIX (64 bit) IRIX64
-# IRIX (32 bit) IRIX (unconfirmed)
-# HPUX HP-UX
-# AIX AIX
-
-# Based on the platform (or target platform for cross-compiling),
-# include the appropriate subdirectories.
-
-ifeq ($(PACE_SYSNAME),SunOS)
-VPATH :=.:posix:$(VPATH)
-CFLAGS += -DPACE_SUNOS
-endif
-
-ifeq ($(PACE_SYSNAME),NT)
-VPATH :=.:win32:$(VPATH)
-CFLAGS += -DPACE_WIN32
-endif
-
-ifeq ($(PACE_SYSNAME),LynxOS)
-VPATH :=.:posix:$(VPATH)
-CFLAGS += -DPACE_LYNXOS
-endif
-
-ifeq ($(PACE_SYSNAME),VxWorks)
-VPATH :=.:vxworks:$(VPATH)
-CFLAGS += -DPACE_VXWORKS
-endif
-
-ifeq ($(PACE_SYSNAME),Linux)
-VPATH :=.:posix:$(VPATH)
-CFLAGS += -DPACE_LINUX
-endif
+include $(ACE_ROOT)/PACE/include/makeinclude/rules.common.GNU
# To build multiple executables in the same directory on AIX, it works
# best to wipe out any previously-created tempinc directory.
diff --git a/PACE/tests/Posix_SP_Test.c b/PACE/tests/Posix_SP_Test.c
index 09a2bb0a3cc..12d8ff5b89a 100644
--- a/PACE/tests/Posix_SP_Test.c
+++ b/PACE/tests/Posix_SP_Test.c
@@ -31,7 +31,12 @@ check_sysconf ()
{
long retval;
int index;
+#if PACE_HAS_POSIX == PACE_LYNXOS
+ const int confnamessize = 30;
+#else
const int confnamessize = 38;
+#endif /* PACE_HAS_POSIX != PACE_LYNXOS */
+
int confnames[] = {_SC_AIO_LISTIO_MAX,
_SC_AIO_MAX,
_SC_AIO_PRIO_DELTA_MAX,
@@ -39,9 +44,11 @@ check_sysconf ()
_SC_CHILD_MAX,
_SC_CLK_TCK,
_SC_DELAYTIMER_MAX,
+#if PACE_HAS_POSIX != PACE_LYNXOS
_SC_GETGR_R_SIZE_MAX,
_SC_GETPW_R_SIZE_MAX,
_SC_LOGIN_NAME_MAX,
+#endif /* PACE_HAS_POSIX != PACE_LYNXOS */
_SC_MQ_OPEN_MAX,
_SC_MQ_PRIO_MAX,
_SC_NGROUPS_MAX,
@@ -52,12 +59,16 @@ check_sysconf ()
_SC_SEM_VALUE_MAX,
_SC_SIGQUEUE_MAX,
_SC_STREAM_MAX,
+#if PACE_HAS_POSIX != PACE_LYNXOS
_SC_THREAD_DESTRUCTOR_ITERATIONS,
_SC_THREAD_KEYS_MAX,
_SC_THREAD_STACK_MIN,
_SC_THREAD_THREADS_MAX,
+#endif /* PACE_HAS_POSIX != PACE_LYNXOS */
_SC_TIMER_MAX,
+#if PACE_HAS_POSIX != PACE_LYNXOS
_SC_TTY_NAME_MAX,
+#endif /* PACE_HAS_POSIX != PACE_LYNXOS */
_SC_TZNAME_MAX,
_SC_ASYNCHRONOUS_IO,
_SC_FSYNC,
@@ -77,9 +88,11 @@ check_sysconf ()
"_SC_CHILD_MAX",
"_SC_CLK_TCK",
"_SC_DELAYTIMER_MAX",
+#if PACE_HAS_POSIX != PACE_LYNXOS
"_SC_GETGR_R_SIZE_MAX",
"_SC_GETPW_R_SIZE_MAX",
"_SC_LOGIN_NAME_MAX",
+#endif /* PACE_HAS_POSIX != PACE_LYNXOS */
"_SC_MQ_OPEN_MAX",
"_SC_MQ_PRIO_MAX",
"_SC_NGROUPS_MAX",
@@ -90,12 +103,16 @@ check_sysconf ()
"_SC_SEM_VALUE_MAX",
"_SC_SIGQUEUE_MAX",
"_SC_STREAM_MAX",
+#if PACE_HAS_POSIX != PACE_LYNXOS
"_SC_THREAD_DESTRUCTOR_ITERATIONS",
"_SC_THREAD_KEYS_MAX",
"_SC_THREAD_STACK_MIN",
"_SC_THREAD_THREADS_MAX",
+#endif /* PACE_HAS_POSIX != PACE_LYNXOS */
"_SC_TIMER_MAX",
+#if PACE_HAS_POSIX != PACE_LYNXOS
"_SC_TTY_NAME_MAX",
+#endif /* PACE_HAS_POSIX != PACE_LYNXOS */
"_SC_TZNAME_MAX",
"_SC_ASYNCHRONOUS_IO",
"_SC_FSYNC",