diff options
author | Bernard Normier <bernard@zeroc.com> | 2003-05-21 03:42:45 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2003-05-21 03:42:45 +0000 |
commit | 9fc55c12633774c3cbf3130e332d51af53e67d96 (patch) | |
tree | f6fdfe07865b4062503aedf7216bfa6268693cc1 /cpp/src | |
parent | bug fixes, minor edits (diff) | |
download | ice-9fc55c12633774c3cbf3130e332d51af53e67d96.tar.bz2 ice-9fc55c12633774c3cbf3130e332d51af53e67d96.tar.xz ice-9fc55c12633774c3cbf3130e332d51af53e67d96.zip |
Sun C++ 5.5 port
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Freeze/Makefile | 2 | ||||
-rw-r--r-- | cpp/src/Glacier/Makefile | 2 | ||||
-rw-r--r-- | cpp/src/Ice/Makefile | 2 | ||||
-rw-r--r-- | cpp/src/IceBox/Makefile | 4 | ||||
-rw-r--r-- | cpp/src/IcePack/Makefile | 2 | ||||
-rw-r--r-- | cpp/src/IcePatch/Makefile | 2 | ||||
-rw-r--r-- | cpp/src/IceSSL/Makefile | 2 | ||||
-rw-r--r-- | cpp/src/IceStorm/Makefile | 4 | ||||
-rw-r--r-- | cpp/src/IceStorm/Service.cpp | 6 | ||||
-rw-r--r-- | cpp/src/IceUtil/Makefile | 2 | ||||
-rw-r--r-- | cpp/src/IceXML/Makefile | 2 | ||||
-rw-r--r-- | cpp/src/Slice/Makefile | 2 | ||||
-rw-r--r-- | cpp/src/XMLTransform/Makefile | 2 | ||||
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 90 |
14 files changed, 46 insertions, 78 deletions
diff --git a/cpp/src/Freeze/Makefile b/cpp/src/Freeze/Makefile index 0b4cd42130f..c6d745f94a7 100644 --- a/cpp/src/Freeze/Makefile +++ b/cpp/src/Freeze/Makefile @@ -50,7 +50,7 @@ SLICE2FREEZECMD = $(SLICE2FREEZE) --ice --include-dir Freeze $(ICECPPFLAGS) include $(top_srcdir)/config/Make.rules -CPPFLAGS := -I.. $(DB_FLAGS) $(CPPFLAGS) +CPPFLAGS := -I.. $(CPPFLAGS) -DFREEZE_API_EXPORTS $(DB_FLAGS) SLICE2CPPFLAGS := --ice --include-dir Freeze --dll-export FREEZE_API $(SLICE2CPPFLAGS) $(libdir)/$(LIBFILENAME): $(OBJS) diff --git a/cpp/src/Glacier/Makefile b/cpp/src/Glacier/Makefile index 43b1d734ebc..80d5e98f285 100644 --- a/cpp/src/Glacier/Makefile +++ b/cpp/src/Glacier/Makefile @@ -55,7 +55,7 @@ SDIR = $(slicedir)/Glacier include $(top_srcdir)/config/Make.rules -CPPFLAGS := -I.. $(OPENSSL_FLAGS) $(CPPFLAGS) +CPPFLAGS := -I.. $(CPPFLAGS) -DGLACIER_API_EXPORTS $(OPENSSL_FLAGS) SLICE2CPPFLAGS := --include-dir Glacier --dll-export GLACIER_API $(SLICE2CPPFLAGS) $(libdir)/$(LIBFILENAME): $(OBJS) diff --git a/cpp/src/Ice/Makefile b/cpp/src/Ice/Makefile index 610297ac3f0..2f7d554d737 100644 --- a/cpp/src/Ice/Makefile +++ b/cpp/src/Ice/Makefile @@ -129,7 +129,7 @@ SDIR = $(slicedir)/Ice include $(top_srcdir)/config/Make.rules -CPPFLAGS := -I.. $(CPPFLAGS) $(BZIP2_FLAGS) +CPPFLAGS := -I.. $(CPPFLAGS) -DICE_API_EXPORTS -DICE_PROTOCOL_API_EXPORTS $(BZIP2_FLAGS) SLICE2CPPFLAGS := --ice --include-dir Ice --dll-export ICE_API $(SLICE2CPPFLAGS) LINKWITH := $(BZIP2_LIBS) $(ICE_OS_LIBS) diff --git a/cpp/src/IceBox/Makefile b/cpp/src/IceBox/Makefile index c3bf7f7bacb..0a9b14188d6 100644 --- a/cpp/src/IceBox/Makefile +++ b/cpp/src/IceBox/Makefile @@ -44,8 +44,8 @@ SDIR = $(slicedir)/IceBox include $(top_srcdir)/config/Make.rules -CPPFLAGS := -I.. $(DB_FLAGS) $(CPPFLAGS) -SLICE2CPPFLAGS := --ice --include-dir IceBox $(SLICE2CPPFLAGS) +CPPFLAGS := -I.. $(CPPFLAGS) -DICE_BOX_API_EXPORTS $(DB_FLAGS) +SLICE2CPPFLAGS := --ice --dll-export ICE_BOX_API --include-dir IceBox $(SLICE2CPPFLAGS) $(libdir)/$(LIBFILENAME): $(OBJS) rm -f $@ diff --git a/cpp/src/IcePack/Makefile b/cpp/src/IcePack/Makefile index 38e6f75dedb..873650afdea 100644 --- a/cpp/src/IcePack/Makefile +++ b/cpp/src/IcePack/Makefile @@ -99,7 +99,7 @@ SLICE2FREEZECMD = $(SLICE2FREEZE) --ice --include-dir IcePack $(ICECPPFLAGS) include $(top_srcdir)/config/Make.rules -CPPFLAGS := -I.. $(CPPFLAGS) $(READLINE_FLAGS) $(XERCESC_FLAGS) +CPPFLAGS := -I.. $(CPPFLAGS) -DICE_PACK_API_EXPORTS $(READLINE_FLAGS) $(XERCESC_FLAGS) ICECPPFLAGS := -I.. $(ICECPPFLAGS) SLICE2CPPFLAGS := --ice --include-dir IcePack --dll-export ICE_PACK_API $(SLICE2CPPFLAGS) diff --git a/cpp/src/IcePatch/Makefile b/cpp/src/IcePatch/Makefile index 1c45f9ddcb0..dddaefb2242 100644 --- a/cpp/src/IcePatch/Makefile +++ b/cpp/src/IcePatch/Makefile @@ -46,7 +46,7 @@ SDIR = $(slicedir)/IcePatch include $(top_srcdir)/config/Make.rules -CPPFLAGS := -I.. $(OPENSSL_FLAGS) $(BZIP2_FLAGS) $(CPPFLAGS) +CPPFLAGS := -I.. $(CPPFLAGS) -DICE_PATCH_API_EXPORTS $(OPENSSL_FLAGS) $(BZIP2_FLAGS) SLICE2CPPFLAGS := --ice --include-dir IcePatch --dll-export ICE_PATCH_API $(SLICE2CPPFLAGS) LINKWITH := $(BZIP2_LIBS) diff --git a/cpp/src/IceSSL/Makefile b/cpp/src/IceSSL/Makefile index e9f65ee4e3d..8feea5074ef 100644 --- a/cpp/src/IceSSL/Makefile +++ b/cpp/src/IceSSL/Makefile @@ -67,7 +67,7 @@ SDIR = $(slicedir)/IceSSL include $(top_srcdir)/config/Make.rules -CPPFLAGS := -I.. $(OPENSSL_FLAGS) $(XERCESC_FLAGS) $(CPPFLAGS) +CPPFLAGS := -I.. $(CPPFLAGS) -DICE_SSL_API_EXPORTS $(OPENSSL_FLAGS) $(XERCESC_FLAGS) SLICE2CPPFLAGS := --ice --include-dir IceSSL --dll-export ICE_SSL_API $(SLICE2CPPFLAGS) LINKWITH := $(OPENSSL_LIBS) $(XERCESC_LIBS) diff --git a/cpp/src/IceStorm/Makefile b/cpp/src/IceStorm/Makefile index fe12847f9e6..4150b2e9c17 100644 --- a/cpp/src/IceStorm/Makefile +++ b/cpp/src/IceStorm/Makefile @@ -71,9 +71,9 @@ SLICE2FREEZECMD = $(SLICE2FREEZE) --ice --include-dir IceStorm $(ICECPPFLAGS) include $(top_srcdir)/config/Make.rules -CPPFLAGS := -I.. $(XERCESC_FLAGS) $(READLINE_FLAGS) $(CPPFLAGS) +CPPFLAGS := -I.. $(CPPFLAGS) -DICE_STORM_API_EXPORTS $(XERCESC_FLAGS) $(READLINE_FLAGS) ICECPPFLAGS := -I.. $(ICECPPFLAGS) -SLICE2CPPFLAGS := --ice --include-dir IceStorm $(SLICE2CPPFLAGS) +SLICE2CPPFLAGS := --ice --dll-export ICE_STORM_API --include-dir IceStorm $(SLICE2CPPFLAGS) $(libdir)/$(LIBFILENAME): $(OBJS) rm -f $@ diff --git a/cpp/src/IceStorm/Service.cpp b/cpp/src/IceStorm/Service.cpp index 5ba34caa7f6..81e67f906d7 100644 --- a/cpp/src/IceStorm/Service.cpp +++ b/cpp/src/IceStorm/Service.cpp @@ -16,10 +16,8 @@ #include <IceStorm/TraceLevels.h> #include <IceBox/IceBox.h> -#if defined(_WIN32) -# define ICESTORM_SERVICE_API __declspec(dllexport) -#else -# define ICESTORM_SERVICE_API /**/ +#ifndef ICESTORM_SERVICE_API +# define ICESTORM_SERVICE_API ICE_DECLSPEC_EXPORT #endif using namespace std; diff --git a/cpp/src/IceUtil/Makefile b/cpp/src/IceUtil/Makefile index 15761a6f005..409d43d85fe 100644 --- a/cpp/src/IceUtil/Makefile +++ b/cpp/src/IceUtil/Makefile @@ -38,6 +38,8 @@ SRCS = $(OBJS:.o=.cpp) include $(top_srcdir)/config/Make.rules +CPPFLAGS := $(CPPFLAGS) -DICE_UTIL_API_EXPORTS + LINKWITH := $(STLPORT_LIBS) $(ICEUTIL_OS_LIBS) $(libdir)/$(LIBFILENAME): $(OBJS) diff --git a/cpp/src/IceXML/Makefile b/cpp/src/IceXML/Makefile index 45d9b4eb5d7..6c216ed8688 100644 --- a/cpp/src/IceXML/Makefile +++ b/cpp/src/IceXML/Makefile @@ -26,7 +26,7 @@ SRCS = $(OBJS:.o=.cpp) include $(top_srcdir)/config/Make.rules -CPPFLAGS := -I.. $(CPPFLAGS) $(XERCESC_FLAGS) +CPPFLAGS := -I.. $(CPPFLAGS) -DICE_XML_API_EXPORTS $(XERCESC_FLAGS) LINKWITH := $(XERCESC_LIBS) diff --git a/cpp/src/Slice/Makefile b/cpp/src/Slice/Makefile index 918bb3a7e85..2ccb6200575 100644 --- a/cpp/src/Slice/Makefile +++ b/cpp/src/Slice/Makefile @@ -32,7 +32,7 @@ SRCS = $(OBJS:.o=.cpp) include $(top_srcdir)/config/Make.rules -CPPFLAGS := -I.. $(CPPFLAGS) +CPPFLAGS := -I.. $(CPPFLAGS) -DSLICE_API_EXPORTS $(libdir)/$(LIBFILENAME): $(OBJS) rm -f $@ diff --git a/cpp/src/XMLTransform/Makefile b/cpp/src/XMLTransform/Makefile index 48d73a0e518..419a503f619 100644 --- a/cpp/src/XMLTransform/Makefile +++ b/cpp/src/XMLTransform/Makefile @@ -35,7 +35,7 @@ SDIR = $(slicedir)/XMLTransform include $(top_srcdir)/config/Make.rules -CPPFLAGS := -I.. $(CPPFLAGS) $(XERCESC_FLAGS) +CPPFLAGS := -I.. $(CPPFLAGS) -DXML_TRANSFORM_API_EXPORTS $(XERCESC_FLAGS) $(libdir)/$(LIBFILENAME): $(OBJS) rm -f $@ diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index e95f8d33beb..f68bf9d8ae5 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -328,7 +328,7 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p) string scoped = fixKwd(p->scoped()); ExceptionPtr base = p->base(); - H << sp << nl << "class " << name << " : "; + H << sp << nl << "class " << _dllExport << name << " : "; H.useCurrentPosAsIndent(); if(!base) { @@ -355,7 +355,7 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p) H << sp; if(p->isLocal()) { - H << nl << _dllExport << name << "(const char*, int);"; + H << nl << name << "(const char*, int);"; C << sp << nl << scoped.substr(2) << "::" << name << "(const char* file, int line) : "; C.inc(); if(!base) @@ -371,7 +371,7 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p) C << eb; } - H << nl << _dllExport << "virtual ::std::string ice_name() const;"; + H << nl << "virtual ::std::string ice_name() const;"; C << sp << nl << "::std::string" << nl << scoped.substr(2) << "::ice_name() const"; C << sb; C << nl << "return \"" << p->scoped().substr(2) << "\";"; @@ -379,16 +379,16 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p) if(p->isLocal()) { - H << nl << _dllExport << "virtual void ice_print(::std::ostream&) const;"; + H << nl << "virtual void ice_print(::std::ostream&) const;"; } - H << nl << _dllExport << "virtual ::Ice::Exception* ice_clone() const;"; + H << nl << "virtual ::Ice::Exception* ice_clone() const;"; C << sp << nl << "::Ice::Exception*" << nl << scoped.substr(2) << "::ice_clone() const"; C << sb; C << nl << "return new " << name << "(*this);"; C << eb; - H << nl << _dllExport << "virtual void ice_throw() const;"; + H << nl << "virtual void ice_throw() const;"; C << sp << nl << "void" << nl << scoped.substr(2) << "::ice_throw() const"; C << sb; C << nl << "throw *this;"; @@ -429,12 +429,12 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) string scoped = fixKwd(p->scoped()); ExceptionPtr base = p->base(); - H << sp << nl << _dllExport << "virtual void __write(::IceInternal::BasicStream*) const;"; - H << nl << _dllExport << "virtual void __read(::IceInternal::BasicStream*, bool = true);"; + H << sp << nl << "virtual void __write(::IceInternal::BasicStream*) const;"; + H << nl << "virtual void __read(::IceInternal::BasicStream*, bool = true);"; - H << sp << nl << _dllExport << "virtual void __marshal(const ::Ice::StreamPtr&) const;"; - H << nl << _dllExport << "virtual void __unmarshal(const ::Ice::StreamPtr&);"; - H << nl << _dllExport << "void ice_unmarshal(const ::std::string&, const ::Ice::StreamPtr&);"; + H << sp << nl << "virtual void __marshal(const ::Ice::StreamPtr&) const;"; + H << nl << "virtual void __unmarshal(const ::Ice::StreamPtr&);"; + H << nl << "void ice_unmarshal(const ::std::string&, const ::Ice::StreamPtr&);"; TypeStringList memberList; for(q = dataMembers.begin(); q != dataMembers.end(); ++q) @@ -2092,23 +2092,9 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p) string name = fixKwd(p->name()); string scoped = fixKwd(p->scoped()); ClassList bases = p->bases(); - - string exp1; - string exp2; - if(_dllExport.size()) - { - if(p->hasDataMembers()) - { - exp2 = _dllExport; - } - else - { - exp1 = _dllExport; - } - } H << sp; - H << nl << "class " << exp1 << name << " : "; + H << nl << "class " << _dllExport << name << " : "; H.useCurrentPosAsIndent(); if(bases.empty()) { @@ -2158,24 +2144,24 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p) StringList::const_iterator q; H << sp; - H << nl << exp2 << "static const ::std::string __ids[" << ids.size() << "];"; - H << nl << exp2 << "virtual bool ice_isA" + H << nl << "static const ::std::string __ids[" << ids.size() << "];"; + H << nl << "virtual bool ice_isA" << "(const ::std::string&, const ::Ice::Current& = ::Ice::Current()) const;"; - H << nl << exp2 << "virtual ::std::vector< ::std::string> ice_ids" + H << nl << "virtual ::std::vector< ::std::string> ice_ids" << "(const ::Ice::Current& = ::Ice::Current()) const;"; - H << nl << exp2 << "virtual const ::std::string& ice_id(const ::Ice::Current& = ::Ice::Current()) const;"; - H << nl << exp2 << "static const ::std::string& ice_staticId();"; + H << nl << "virtual const ::std::string& ice_id(const ::Ice::Current& = ::Ice::Current()) const;"; + H << nl << "static const ::std::string& ice_staticId();"; if(!p->isAbstract()) { H.dec(); H << sp << nl << "private:"; H.inc(); - H << sp << nl << exp2 << "static ::Ice::ObjectFactoryPtr _factory;"; + H << sp << nl << "static ::Ice::ObjectFactoryPtr _factory;"; H.dec(); H << sp << nl << "public:"; H.inc(); - H << sp << nl << exp2 << "static const ::Ice::ObjectFactoryPtr& ice_factory();"; + H << sp << nl << "static const ::Ice::ObjectFactoryPtr& ice_factory();"; } C << sp; C << nl << "const ::std::string " << scoped.substr(2) << "::__ids[" << ids.size() << "] ="; @@ -2228,15 +2214,6 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p) if(!p->isLocal()) { - string exp2; - if(_dllExport.size()) - { - if(p->hasDataMembers()) - { - exp2 = _dllExport; - } - } - ClassList bases = p->bases(); ClassDefPtr base; if(!bases.empty() && !bases.front()->isInterface()) @@ -2261,8 +2238,8 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p) StringList::const_iterator q; H << sp; - H << nl << exp2 << "static ::std::string __all[" << allOpNames.size() << "];"; - H << nl << exp2 + H << nl << "static ::std::string __all[" << allOpNames.size() << "];"; + H << nl << "virtual ::IceInternal::DispatchStatus __dispatch(::IceInternal::Incoming&, const ::Ice::Current&);"; C << sp; C << nl << "::std::string " << scoped.substr(2) << "::__all[] ="; @@ -2309,15 +2286,15 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p) } H << sp; - H << nl << exp2 << "virtual void __write(::IceInternal::BasicStream*) const;"; - H << nl << exp2 << "virtual void __read(::IceInternal::BasicStream*, bool = true);"; + H << nl << "virtual void __write(::IceInternal::BasicStream*) const;"; + H << nl << "virtual void __read(::IceInternal::BasicStream*, bool = true);"; H << sp; - H << nl << exp2 << "virtual void __marshal(const ::Ice::StreamPtr&) const;"; - H << nl << exp2 << "virtual void __unmarshal(const ::Ice::StreamPtr&);"; + H << nl << "virtual void __marshal(const ::Ice::StreamPtr&) const;"; + H << nl << "virtual void __unmarshal(const ::Ice::StreamPtr&);"; H << sp; - H << nl << exp2 << "static void ice_unmarshal(const ::std::string&, const ::Ice::StreamPtr&, " + H << nl << "static void ice_unmarshal(const ::std::string&, const ::Ice::StreamPtr&, " << scoped << "Ptr&);"; TypeStringList memberList; @@ -2599,33 +2576,24 @@ Slice::Gen::ObjectVisitor::visitOperation(const OperationPtr& p) paramsDeclAMD += "const ::Ice::Current& __current)"; argsAMD += "__current)"; - string exp2; - if(_dllExport.size()) - { - if(cl->hasDataMembers()) - { - exp2 = _dllExport; - } - } - bool nonmutating = p->mode() == Operation::Nonmutating; bool amd = !cl->isLocal() && (cl->hasMetaData("amd") || p->hasMetaData("amd")); H << sp; if(!amd) { - H << nl << exp2 << "virtual " << retS << ' ' << name << params + H << nl << "virtual " << retS << ' ' << name << params << (nonmutating ? " const" : "") << " = 0;"; } else { - H << nl << exp2 << "virtual void " << name << "_async" << paramsAMD + H << nl << "virtual void " << name << "_async" << paramsAMD << (nonmutating ? " const" : "") << " = 0;"; } if(!cl->isLocal()) { - H << nl << exp2 << "::IceInternal::DispatchStatus ___" << name + H << nl << "::IceInternal::DispatchStatus ___" << name << "(::IceInternal::Incoming&, const ::Ice::Current&)" << (nonmutating ? " const" : "") << ";"; C << sp; |