summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ace/IOStream.h23
-rw-r--r--ace/OS.i10
-rw-r--r--ace/config-chorus.h5
-rw-r--r--examples/Service_Configurator/Misc/Timer_Service.cpp1
-rw-r--r--include/makeinclude/platform_chorus.GNU34
-rw-r--r--include/makeinclude/rules.bin.GNU11
-rw-r--r--netsvcs/clients/Tokens/collection/rw_locks.cpp2
-rw-r--r--tests/IOStream_Test.cpp8
-rwxr-xr-xtests/run_tests.sh2
9 files changed, 81 insertions, 15 deletions
diff --git a/ace/IOStream.h b/ace/IOStream.h
index 28cbc6a42a6..d9aba01c61a 100644
--- a/ace/IOStream.h
+++ b/ace/IOStream.h
@@ -372,6 +372,22 @@ typedef ostream& (*__omanip_)(ostream&);
// These are necessary in case somebody wants to derive from us and
// override one of these with a custom approach.
+#ifdef CHORUS
+#define GET_FUNC_SET0(MT,CODE,CODE2) \
+ GET_PROT(MT,short &,CODE) \
+ GET_PROT(MT,u_short &,CODE) \
+ GET_PROT(MT,int &,CODE) \
+ GET_PROT(MT,u_int &,CODE) \
+ GET_PROT(MT,long &,CODE) \
+ GET_PROT(MT,u_long &,CODE) \
+ GET_PROT(MT,float &,CODE) \
+ GET_PROT(MT,double &,CODE) \
+ GET_PROT(MT,char &,CODE) \
+ GET_PROT(MT,u_char &,CODE) \
+ GET_PROT(MT,char *,CODE) \
+ inline virtual MT& operator>>(__omanip_ func) CODE2 \
+ inline virtual MT& operator>>(__manip_ func) CODE2
+#else
#define GET_FUNC_SET0(MT,CODE,CODE2) \
GET_PROT(MT,short &,CODE) \
GET_PROT(MT,u_short &,CODE) \
@@ -387,6 +403,7 @@ typedef ostream& (*__omanip_)(ostream&);
GET_PROT(MT,u_char *,CODE) \
inline virtual MT& operator>>(__omanip_ func) CODE2 \
inline virtual MT& operator>>(__manip_ func) CODE2
+#endif
#define PUT_FUNC_SET0(MT,CODE,CODE2) \
PUT_PROT(MT,short,CODE) \
@@ -409,10 +426,16 @@ typedef ostream& (*__omanip_)(ostream&);
#define GET_FUNC_SET1(MT,CODE,CODE2) GET_FUNC_SET0(MT,CODE,CODE2)
#define PUT_FUNC_SET1(MT,CODE,CODE2) PUT_FUNC_SET0(MT,CODE,CODE2)
#else
+#ifdef CHORUS
+ #define GET_FUNC_SET1(MT,CODE,CODE2) \
+ GET_PROT(MT,signed char &,CODE) \
+ GET_FUNC_SET0(MT,CODE,CODE2)
+#else
#define GET_FUNC_SET1(MT,CODE,CODE2) \
GET_PROT(MT,signed char &,CODE) \
GET_PROT(MT,signed char *,CODE) \
GET_FUNC_SET0(MT,CODE,CODE2)
+#endif
#define PUT_FUNC_SET1(MT,CODE,CODE2) \
PUT_FUNC(MT,signed char) \
diff --git a/ace/OS.i b/ace/OS.i
index 911287fd080..a201d3252a7 100644
--- a/ace/OS.i
+++ b/ace/OS.i
@@ -564,7 +564,7 @@ ACE_INLINE gid_t
ACE_OS::getgid (void)
{
// ACE_TRACE ("ACE_OS::getgid");
-# if defined (VXWORKS)
+# if defined (VXWORKS) || defined(CHORUS)
// getgid() is not supported: just one group anyways
return 0;
# else
@@ -594,7 +594,7 @@ ACE_INLINE uid_t
ACE_OS::getuid (void)
{
// ACE_TRACE ("ACE_OS::getuid");
-# if defined (VXWORKS)
+# if defined (VXWORKS) || defined(CHORUS)
// getuid() is not supported: just one user anyways
return 0;
# else
@@ -5041,7 +5041,7 @@ ACE_OS::signal (int signum, ACE_SignalHandler func)
if (signum == 0)
return 0;
else
-#if !defined (ACE_HAS_WINCE)
+#if !defined (ACE_HAS_WINCE) && !defined (ACE_LACKS_UNIX_SIGNALS)
# if !defined (ACE_HAS_TANDEM_SIGNALS) && !defined (ACE_HAS_LYNXOS_SIGNALS)
return ::signal (signum, func);
# else
@@ -8650,7 +8650,7 @@ ACE_INLINE pid_t
ACE_OS::wait (int *stat_loc)
{
// ACE_TRACE ("ACE_OS::wait");
-#if defined (ACE_WIN32) || defined (VXWORKS)
+#if defined (ACE_WIN32) || defined (VXWORKS) || defined(CHORUS)
ACE_UNUSED_ARG (stat_loc);
ACE_NOTSUP_RETURN (0);
@@ -8671,7 +8671,7 @@ ACE_INLINE pid_t
ACE_OS::waitpid (pid_t pid, int *stat_loc, int options)
{
// ACE_TRACE ("ACE_OS::waitpid");
-#if defined (ACE_WIN32) || defined (VXWORKS)
+#if defined (ACE_WIN32) || defined (VXWORKS) || defined(CHORUS)
ACE_UNUSED_ARG (pid);
ACE_UNUSED_ARG (stat_loc);
ACE_UNUSED_ARG (options);
diff --git a/ace/config-chorus.h b/ace/config-chorus.h
index 42f4bd04ee1..f9bc97bde86 100644
--- a/ace/config-chorus.h
+++ b/ace/config-chorus.h
@@ -24,6 +24,7 @@
#if defined (__GNUG__)
# include "ace/config-g++-common.h"
+#undef ACE_HAS_ANSI_CASTS
#elif defined (ghs)
# define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
# define ACE_HAS_TANDEM_SIGNALS
@@ -55,7 +56,7 @@
#define ACE_LACKS_GETSERVBYNAME
#define ACE_LACKS_GETPGID
#define ACE_LACKS_LONGLONG_T
-#define ACE_LACKS_SYSV_SHMEM
+//#define ACE_LACKS_SYSV_SHMEM
#define ACE_LACKS_SYSV_MSG_H
#define ACE_LACKS_KEY_T
#define ACE_LACKS_EXEC
@@ -73,7 +74,7 @@
#define ACE_HAS_LONG_MAP_FAILED
// Platforms lacks UNIX domain sockets.
-#define ACE_LACKS_UNIX_DOMAIN_SOCKETS
+//#define ACE_LACKS_UNIX_DOMAIN_SOCKETS
#define ACE_LACKS_UTSNAME_T
//#define ACE_LACKS_SETSCHED
diff --git a/examples/Service_Configurator/Misc/Timer_Service.cpp b/examples/Service_Configurator/Misc/Timer_Service.cpp
index 82c5e9f5dfc..01c649359ce 100644
--- a/examples/Service_Configurator/Misc/Timer_Service.cpp
+++ b/examples/Service_Configurator/Misc/Timer_Service.cpp
@@ -103,4 +103,5 @@ ACE_STATIC_SVC_DEFINE (Timer_Service_1,
// svc.conf file to dynamically initialize the state of the Timer
// Services.
ACE_SVC_FACTORY_DEFINE (Timer_Service_1)
+ACE_SVC_FACTORY_DEFINE (Timer_Service_1)
ACE_SVC_FACTORY_DEFINE (Timer_Service_2)
diff --git a/include/makeinclude/platform_chorus.GNU b/include/makeinclude/platform_chorus.GNU
index 587da8bb457..440b590366b 100644
--- a/include/makeinclude/platform_chorus.GNU
+++ b/include/makeinclude/platform_chorus.GNU
@@ -14,6 +14,7 @@ static_libs = 1
# The following file includes definitions such as $(CC), $(XDIR), etc.
#
include $(MERGEDIR)/dtool/htgt-cf.rf
+CLASSIXDIR=$(MERGEDIR)
#
# Tool PATH
#
@@ -27,22 +28,43 @@ CXX = $(CC)
CFLAGS += -w
CCFLAGS += $(CFLAGS) -fno-implicit-templates \
-fno-strict-prototypes \
+ -Usun \
+ -fno-builtin \
+ -fconserve-space \
+ -fcheck-new \
-nostdinc \
+ -pipe \
+ -fno-rtti \
+ -fno-exceptions \
-D_POSIX_THREADS \
-D_POSIX_THREAD_SAFE_FUNCTIONS
-DCFLAGS += -gstabs+
+#DCFLAGS += -gstabs+
INCLDIRS += -I$(INC_DIR)/posix \
-I$(INC_DIR)/stdc \
-I$(INC_DIR)/chorus/ \
-I$(INC_DIR)/chorus/iom \
-I$(INC_DIR)/CC
DLD =
-LD = $(CXX)
-LDFLAGS += -r -Ur -nostdlib \
- -L$(LIB_DIR)/CC \
- -L$(LIB_DIR)/classix
+LD = $(XDIR)/bin/ld
+LDFLAGS += -r $(CLASSIXDIR)/lib/CC/libC.a $(CLASSIXDIR)/lib/classix/libcx.u.a
+MATHLIB = -L$(CLASSIXDIR)/lib/libm -lm
-OCFLAGS += -O2
+LINK.cc.override = $(LD) -u _main -u _premain
+LINK.cc=override
+
+CHORUSLINK=true
+
+# $(CLASSIXDIR)/dtool/mkctors helloCxx_u.xp.o > helloCxx_u.ct.s
+# $(CXX) -c helloCxx_u.ct.s
+# $(RM) helloCxx_u.ct.s
+# $(LD) $(LDOPTIONS) -e _start -o helloCxx_u \
+# $(CLASSIXDIR)/lib/crt/crth.u.o $(CLASSIXDIR)/lib/crt/crt0.o $(CLASSIXDIR)/lib/crt/crti.o helloCxx_u.xp.o helloCxx_u.ct.o $(CLASSIXDIR)/lib/crt/crtn.o \
+# -dn -T $(CLASSIXDIR)/src/act/slots/act_u.ld
+# $(RM) helloCxx_u.xp.o
+# $(RM) helloCxx_u.ct.o
+
+
+OCFLAGS += -O
PIC = -fPIC
AR = $(TOOLDIR)ar
diff --git a/include/makeinclude/rules.bin.GNU b/include/makeinclude/rules.bin.GNU
index c91dad7a3e6..250b4106fc2 100644
--- a/include/makeinclude/rules.bin.GNU
+++ b/include/makeinclude/rules.bin.GNU
@@ -14,5 +14,16 @@ endif
VOBJS = $(subst .cpp,.$(OBJEXT),$(foreach file,$(SRC),$(VDIR)$(notdir $(file))))
+ifeq ($(CHORUSLINK),true)
+$(BIN): %: $(VDIR)%.o $(VOBJS)
+ $(LINK.cc) -o $@.xp.o $^ -u _main -u _premain $(VLDLIBS) $(LDFLAGS)$(POSTLINK)
+ $(MERGEDIR)/dtool/mkctors $@.xp.o > $@.ct.s
+ $(CXX) -c $@.ct.s
+ $(RM) $@.ct.s
+ $(LD) $(LDOPTIONS) -e _start -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 -dn -T $(MERGEDIR)/src/act/slots/act_u.ld
+ $(RM) $@.xp.o
+ $(RM) $@.ct.o
+else
$(BIN): %: $(VDIR)%.o $(VOBJS)
$(LINK.cc) -o $@ $^ $(LDFLAGS) $(VLDLIBS) $(POSTLINK)
+endif
diff --git a/netsvcs/clients/Tokens/collection/rw_locks.cpp b/netsvcs/clients/Tokens/collection/rw_locks.cpp
index c3b0896da3d..dd35de3d9c2 100644
--- a/netsvcs/clients/Tokens/collection/rw_locks.cpp
+++ b/netsvcs/clients/Tokens/collection/rw_locks.cpp
@@ -152,7 +152,7 @@ main (int argc, char* argv[])
ACE_Thread_Manager mgr;
if (mgr.spawn_n (threads, ACE_THR_FUNC (run_thread),
- (void *) &0,
+ (void *) 0,
THR_BOUND | THR_SUSPENDED) == -1)
ACE_ERROR_RETURN ((LM_DEBUG, "%p\n", "spawn failed"), -1);
diff --git a/tests/IOStream_Test.cpp b/tests/IOStream_Test.cpp
index a6d9c5bacdf..45ff4c83ace 100644
--- a/tests/IOStream_Test.cpp
+++ b/tests/IOStream_Test.cpp
@@ -112,11 +112,19 @@ operator>> (ACE_SOCK_IOStream & stream, qchar *buf)
// if we don't have a quote, append until we see space
if (c != '"')
for (*buf++ = c;
+#ifdef CHORUS
+ stream.get(c) && !isspace(c);
+#else
(void *) stream.get(c) && !isspace(c);
+#endif
*buf++ = c)
continue;
else
+#ifdef CHORUS
+ for (; stream.get(c) && c != '"'; *buf++ = c)
+#else
for (; (void *) stream.get(c) && c != '"'; *buf++ = c)
+#endif
if (c == '\\')
{
stream.get(c);
diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index 67fd2a1c7ed..a35e65cc66b 100755
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -25,7 +25,7 @@ run_command=
chorus=
if [ $# -eq 1 ]; then
target=$1
- if rsh $target help | head -1 | egrep CHORUS/ClassiX > /dev/null; then
+ if rsh $target help | head -1 | egrep Chorus > /dev/null; then
run_command=arun
chorus=1
else