summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ace/ACE.cpp4
-rw-r--r--ace/OS.h12
-rw-r--r--ace/config-chorus.h9
-rw-r--r--include/makeinclude/platform_chorus4.x_g++.GNU52
4 files changed, 73 insertions, 4 deletions
diff --git a/ace/ACE.cpp b/ace/ACE.cpp
index 4dddd632717..576634b20e1 100644
--- a/ace/ACE.cpp
+++ b/ace/ACE.cpp
@@ -184,7 +184,11 @@ ACE::terminate_process (pid_t pid)
KnCap cap_;
// Use the pid to find out the actor's capability, then kill it.
+# if defined(CHORUS_4)
+ if (::acap (pid, &cap_) == 0)
+# else
if (::acap (AM_MYSITE, pid, &cap_) == 0)
+# endif
return ::akill (&cap_);
else
return -1;
diff --git a/ace/OS.h b/ace/OS.h
index d74f47c9d05..61c4cad7252 100644
--- a/ace/OS.h
+++ b/ace/OS.h
@@ -3730,7 +3730,11 @@ extern "C"
# if defined (CHORUS)
# include /**/ <chorus.h>
-# include /**/ <cx/select.h>
+# if !defined(CHORUS_4)
+# include /**/ <cx/select.h>
+# else
+# include /**/ <stdio.h>
+# endif
# include /**/ <sys/uio.h>
# include /**/ <time.h>
# include /**/ <stdfileio.h>
@@ -3749,11 +3753,13 @@ extern_C int gethostname __((char*, size_t));
// This must come after limits.h is included
# define MAXPATHLEN _POSIX_PATH_MAX
+# if !defined(CHORUS_4)
typedef cx_fd_mask fd_mask;
+typedef void (*__sighandler_t)(int); // keep Signal compilation happy
+# endif
# ifndef howmany
# define howmany(x, y) (((x)+((y)-1))/(y))
# endif /* howmany */
-typedef void (*__sighandler_t)(int); // keep Signal compilation happy
# elif defined (CYGWIN32)
# include /**/ <sys/uio.h>
# include /**/ <sys/file.h>
@@ -5448,7 +5454,7 @@ class ACE_Export ACE_OS
ACE_CLASS_IS_NAMESPACE (ACE_OS);
public:
-# if defined (CHORUS)
+# if defined (CHORUS) && !defined (CHORUS_4)
// We must format this code as follows to avoid confusing OSE.
enum ACE_HRTimer_Op
{
diff --git a/ace/config-chorus.h b/ace/config-chorus.h
index c7fb293c8aa..03b0f0c01f0 100644
--- a/ace/config-chorus.h
+++ b/ace/config-chorus.h
@@ -44,6 +44,14 @@
// Used in OS.i to map an actor id into a KnCap.
#define ACE_CHORUS_MAX_ACTORS 64
+#if !defined(CHORUS_4)
+# define ACE_LACKS_KEY_T
+#else
+# define ACE_HAS_4_4BSD_SENDMSG_RECVMSG
+# define ACE_NLOGGING // Many ACE tests fail if logging is enabled
+ // I'm not quite sure why yet. elliott_c@ociweb.com
+#endif
+
#define ACE_HAS_BROKEN_READV
#define ACE_HAS_CLOCK_GETTIME
#define ACE_HAS_CPLUSPLUS_HEADERS
@@ -70,7 +78,6 @@
#define ACE_LACKS_SETREGID
#define ACE_LACKS_SETREUID
#define ACE_LACKS_GETSERVBYNAME
-#define ACE_LACKS_KEY_T
#define ACE_LACKS_LONGLONG_T
#define ACE_LACKS_MADVISE
#define ACE_LACKS_MALLOC_H
diff --git a/include/makeinclude/platform_chorus4.x_g++.GNU b/include/makeinclude/platform_chorus4.x_g++.GNU
new file mode 100644
index 00000000000..b0b06251dd3
--- /dev/null
+++ b/include/makeinclude/platform_chorus4.x_g++.GNU
@@ -0,0 +1,52 @@
+# $Id$
+#
+# Chorus 4.0 with egcs 1.1.2
+#
+# This version of plaform macros builds upon the previous version
+# of chorus. Many of the macros were the same so inclusion of
+# the previous macros file seemed the easiest way to go.
+#
+# You will probably need to set the following environment variables
+# or macros:
+#
+# CLX_CDSPATH <chorus install path>/4.0/chorus-powerpc/tools
+# CLX_CDSVERSION 5.00
+# MERGEDIR <chorus install path>/4.0/chorus-powerpc/kernel
+#
+
+include $(ACE_ROOT)/include/makeinclude/platform_chorus.GNU
+
+OS_DIR = $(CLASSIXDIR)/../os
+OS_INCLDIR = $(OS_DIR)/include
+
+#
+# Put the new include paths in the front to avoid including
+# the wrong version of some of the system header files.
+#
+INCLDIRS := -I$(INC_DIR) \
+ -I$(OS_INCLDIR) \
+ -I$(OS_INCLDIR)/chorus \
+ -I$(OS_INCLDIR)/CC \
+ $(INCLDIRS)
+
+DCFLAGS += -g
+CCFLAGS += -DCHORUS_4 -D_POSIX_THREAD_PROCESS_SHARED
+
+#
+# Special link process to get the right libraries and
+# build up the static constructors and destructors.
+#
+POSTLINK= -r $(OS_DIR)/lib/CC/libC.a $(OS_DIR)/lib/libbsd/libbsd.a \
+ $(OS_DIR)/lib/classix/libcx.a \
+ $(CLASSIXDIR)/lib/classix/libsys.u.a; \
+ mv $@ $@.xp.o; \
+ $(CLX_CDSPATH)/host/bin/mkctors $@.xp.o > $@.ct.s; \
+ $(CXX) -c $@.ct.s; \
+ $(RM) $@.ct.s; \
+ $(LD) $(LDOPTIONS) -e _start -r -dn -o $@ \
+ $(MERGEDIR)/lib/crt/crth.u.o $(MERGEDIR)/lib/crt/crt0.o \
+ $(MERGEDIR)/lib/crt/crti.o $@.xp.o $@.ct.o \
+ $(MERGEDIR)/lib/crt/crtn.o; \
+ $(RM) $@.xp.o; \
+ $(RM) $@.ct.o
+