diff options
author | Bernard Normier <bernard@zeroc.com> | 2004-05-08 02:34:35 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2004-05-08 02:34:35 +0000 |
commit | ee27d4af271751ffbbd4117a6822077b4367a4ba (patch) | |
tree | 971147e38bd5e6fc2dcdc46742019f70e36fadea /cpp/src/slice2cpp/Gen.cpp | |
parent | GCC 3.4 port (diff) | |
download | ice-ee27d4af271751ffbbd4117a6822077b4367a4ba.tar.bz2 ice-ee27d4af271751ffbbd4117a6822077b4367a4ba.tar.xz ice-ee27d4af271751ffbbd4117a6822077b4367a4ba.zip |
Fixed Sun C++ build problems
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 9f4b68840df..fbd8390044e 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -2182,9 +2182,9 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p) C << nl << "static " << factoryName << "__Init " << factoryName << "__i;"; C << sp << nl << "#ifdef __APPLE__"; std::string initfuncname = "__F"; - for(std::string::const_iterator p = scope.begin(); p != scope.end(); ++p) + for(std::string::const_iterator q = scope.begin(); q != scope.end(); ++q) { - initfuncname += ((*p) == ':') ? '_' : *p; + initfuncname += ((*q) == ':') ? '_' : *q; } initfuncname += name + "__initializer"; C << nl << "extern \"C\" { void " << initfuncname << "() {} }"; @@ -2398,7 +2398,12 @@ Slice::Gen::ObjectVisitor::visitOperation(const OperationPtr& p) // handler, causing compiler warnings and resulting in the base exception // being marshaled instead of the derived exception. // + +#if defined(__SUNPRO_CC) + throws.sort(derivedToBaseCompare); +#else throws.sort(Slice::DerivedToBaseCompare()); +#endif if(!inParams.empty()) { @@ -3498,7 +3503,11 @@ Slice::Gen::AsyncImplVisitor::visitOperation(const OperationPtr& p) // handler, causing compiler warnings and resulting in the base exception // being marshaled instead of the derived exception. // +#if defined(__SUNPRO_CC) + throws.sort(derivedToBaseCompare); +#else throws.sort(Slice::DerivedToBaseCompare()); +#endif TypePtr ret = p->returnType(); string retS = inputTypeToString(ret); |