diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Ice/BasicStream.cpp | 42 | ||||
-rw-r--r-- | cpp/src/Ice/Connection.cpp | 18 | ||||
-rw-r--r-- | cpp/src/IcePack/Makefile | 2 | ||||
-rw-r--r-- | cpp/src/IceSSL/ConfigParser.h | 4 | ||||
-rw-r--r-- | cpp/src/IceStorm/Makefile | 2 | ||||
-rw-r--r-- | cpp/src/IceUtil/Unicode.cpp | 7 | ||||
-rw-r--r-- | cpp/src/Slice/CPlusPlusUtil.cpp | 8 | ||||
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 7 |
8 files changed, 45 insertions, 45 deletions
diff --git a/cpp/src/Ice/BasicStream.cpp b/cpp/src/Ice/BasicStream.cpp index 8c3b7b72869..c9956a43bb1 100644 --- a/cpp/src/Ice/BasicStream.cpp +++ b/cpp/src/Ice/BasicStream.cpp @@ -137,7 +137,7 @@ IceInternal::BasicStream::endWriteEncaps() } Int sz = b.size() - start + sizeof(Int) + 2; // Size includes size and version const Byte* p = reinterpret_cast<const Byte*>(&sz); -#ifdef ICE_UTIL_BIGENDIAN +#ifdef ICE_BIG_ENDIAN reverse_copy(p, p + sizeof(Int), b.begin() + start - sizeof(Int) - 2); // - 2 for major and minor version byte #else ice_copy(p, p + sizeof(Int), b.begin() + start - sizeof(Int) - 2); // - 2 for major and minor version byte @@ -429,7 +429,7 @@ IceInternal::BasicStream::write(Short v) int pos = b.size(); inlineResize(this, pos + sizeof(Short)); const Byte* p = reinterpret_cast<const Byte*>(&v); -#ifdef ICE_UTIL_BIGENDIAN +#ifdef ICE_BIG_ENDIAN reverse_copy(p, p + sizeof(Short), b.begin() + pos); #else ice_copy(p, p + sizeof(Short), b.begin() + pos); @@ -446,7 +446,7 @@ IceInternal::BasicStream::write(const vector<Short>& v) int pos = b.size(); inlineResize(this, pos + sz * sizeof(Short)); const Byte* p = reinterpret_cast<const Byte*>(&v[0]); -#ifdef ICE_UTIL_BIGENDIAN +#ifdef ICE_BIG_ENDIAN for(int j = 0 ; j < sz ; ++j) { reverse_copy(p, p + sizeof(Short), b.begin() + pos); @@ -468,7 +468,7 @@ IceInternal::BasicStream::read(Short& v) } Container::iterator begin = i; i += sizeof(Short); -#ifdef ICE_UTIL_BIGENDIAN +#ifdef ICE_BIG_ENDIAN reverse_copy(begin, i, reinterpret_cast<Byte*>(&v)); #else ice_copy(begin, i, reinterpret_cast<Byte*>(&v)); @@ -490,7 +490,7 @@ IceInternal::BasicStream::read(vector<Short>& v) v.resize(sz); if(sz > 0) { -#ifdef ICE_UTIL_BIGENDIAN +#ifdef ICE_BIG_ENDIAN for(int j = 0 ; j < sz ; ++j) { reverse_copy(begin, begin + sizeof(Short), reinterpret_cast<Byte*>(&v[j])); @@ -508,7 +508,7 @@ IceInternal::BasicStream::write(Int v) int pos = b.size(); inlineResize(this, pos + sizeof(Int)); const Byte* p = reinterpret_cast<const Byte*>(&v); -#ifdef ICE_UTIL_BIGENDIAN +#ifdef ICE_BIG_ENDIAN reverse_copy(p, p + sizeof(Int), b.begin() + pos); #else ice_copy(p, p + sizeof(Int), b.begin() + pos); @@ -525,7 +525,7 @@ IceInternal::BasicStream::write(const vector<Int>& v) int pos = b.size(); inlineResize(this, pos + sz * sizeof(Int)); const Byte* p = reinterpret_cast<const Byte*>(&v[0]); -#ifdef ICE_UTIL_BIGENDIAN +#ifdef ICE_BIG_ENDIAN for(int j = 0 ; j < sz ; ++j) { reverse_copy(p, p + sizeof(Int), b.begin() + pos); @@ -547,7 +547,7 @@ IceInternal::BasicStream::read(Int& v) } Container::iterator begin = i; i += sizeof(Int); -#ifdef ICE_UTIL_BIGENDIAN +#ifdef ICE_BIG_ENDIAN reverse_copy(begin, i, reinterpret_cast<Byte*>(&v)); #else ice_copy(begin, i, reinterpret_cast<Byte*>(&v)); @@ -569,7 +569,7 @@ IceInternal::BasicStream::read(vector<Int>& v) v.resize(sz); if(sz > 0) { -#ifdef ICE_UTIL_BIGENDIAN +#ifdef ICE_BIG_ENDIAN for(int j = 0 ; j < sz ; ++j) { reverse_copy(begin, begin + sizeof(Int), reinterpret_cast<Byte*>(&v[j])); @@ -587,7 +587,7 @@ IceInternal::BasicStream::write(Long v) int pos = b.size(); inlineResize(this, pos + sizeof(Long)); const Byte* p = reinterpret_cast<const Byte*>(&v); -#ifdef ICE_UTIL_BIGENDIAN +#ifdef ICE_BIG_ENDIAN reverse_copy(p, p + sizeof(Long), b.begin() + pos); #else ice_copy(p, p + sizeof(Long), b.begin() + pos); @@ -604,7 +604,7 @@ IceInternal::BasicStream::write(const vector<Long>& v) int pos = b.size(); inlineResize(this, pos + sz * sizeof(Long)); const Byte* p = reinterpret_cast<const Byte*>(&v[0]); -#ifdef ICE_UTIL_BIGENDIAN +#ifdef ICE_BIG_ENDIAN for(int j = 0 ; j < sz ; ++j) { reverse_copy(p, p + sizeof(Long), b.begin() + pos); @@ -626,7 +626,7 @@ IceInternal::BasicStream::read(Long& v) } Container::iterator begin = i; i += sizeof(Long); -#ifdef ICE_UTIL_BIGENDIAN +#ifdef ICE_BIG_ENDIAN reverse_copy(begin, i, reinterpret_cast<Byte*>(&v)); #else ice_copy(begin, i, reinterpret_cast<Byte*>(&v)); @@ -648,7 +648,7 @@ IceInternal::BasicStream::read(vector<Long>& v) v.resize(sz); if(sz > 0) { -#ifdef ICE_UTIL_BIGENDIAN +#ifdef ICE_BIG_ENDIAN for(int j = 0 ; j < sz ; ++j) { reverse_copy(begin, begin + sizeof(Long), reinterpret_cast<Byte*>(&v[j])); @@ -666,7 +666,7 @@ IceInternal::BasicStream::write(Float v) int pos = b.size(); inlineResize(this, pos + sizeof(Float)); const Byte* p = reinterpret_cast<const Byte*>(&v); -#ifdef ICE_UTIL_BIGENDIAN +#ifdef ICE_BIG_ENDIAN reverse_copy(p, p + sizeof(Float), b.begin() + pos); #else ice_copy(p, p + sizeof(Float), b.begin() + pos); @@ -683,7 +683,7 @@ IceInternal::BasicStream::write(const vector<Float>& v) int pos = b.size(); inlineResize(this, pos + sz * sizeof(Float)); const Byte* p = reinterpret_cast<const Byte*>(&v[0]); -#ifdef ICE_UTIL_BIGENDIAN +#ifdef ICE_BIG_ENDIAN for(int j = 0 ; j < sz ; ++j) { reverse_copy(p, p + sizeof(Float), b.begin() + pos); @@ -705,7 +705,7 @@ IceInternal::BasicStream::read(Float& v) } Container::iterator begin = i; i += sizeof(Float); -#ifdef ICE_UTIL_BIGENDIAN +#ifdef ICE_BIG_ENDIAN reverse_copy(begin, i, reinterpret_cast<Byte*>(&v)); #else ice_copy(begin, i, reinterpret_cast<Byte*>(&v)); @@ -727,7 +727,7 @@ IceInternal::BasicStream::read(vector<Float>& v) v.resize(sz); if(sz > 0) { -#ifdef ICE_UTIL_BIGENDIAN +#ifdef ICE_BIG_ENDIAN for(int j = 0 ; j < sz ; ++j) { reverse_copy(begin, begin + sizeof(Float), reinterpret_cast<Byte*>(&v[j])); @@ -745,7 +745,7 @@ IceInternal::BasicStream::write(Double v) int pos = b.size(); inlineResize(this, pos + sizeof(Double)); const Byte* p = reinterpret_cast<const Byte*>(&v); -#ifdef ICE_UTIL_BIGENDIAN +#ifdef ICE_BIG_ENDIAN reverse_copy(p, p + sizeof(Double), b.begin() + pos); #else ice_copy(p, p + sizeof(Double), b.begin() + pos); @@ -762,7 +762,7 @@ IceInternal::BasicStream::write(const vector<Double>& v) int pos = b.size(); inlineResize(this, pos + sz * sizeof(Double)); const Byte* p = reinterpret_cast<const Byte*>(&v[0]); -#ifdef ICE_UTIL_BIGENDIAN +#ifdef ICE_BIG_ENDIAN for(int j = 0 ; j < sz ; ++j) { reverse_copy(p, p + sizeof(Double), b.begin() + pos); @@ -784,7 +784,7 @@ IceInternal::BasicStream::read(Double& v) } Container::iterator begin = i; i += sizeof(Double); -#ifdef ICE_UTIL_BIGENDIAN +#ifdef ICE_BIG_ENDIAN reverse_copy(begin, i, reinterpret_cast<Byte*>(&v)); #else ice_copy(begin, i, reinterpret_cast<Byte*>(&v)); @@ -806,7 +806,7 @@ IceInternal::BasicStream::read(vector<Double>& v) v.resize(sz); if(sz > 0) { -#ifdef ICE_UTIL_BIGENDIAN +#ifdef ICE_BIG_ENDIAN for(int j = 0 ; j < sz ; ++j) { reverse_copy(begin, begin + sizeof(Double), reinterpret_cast<Byte*>(&v[j])); diff --git a/cpp/src/Ice/Connection.cpp b/cpp/src/Ice/Connection.cpp index a4a0eb67ef8..e14ecf34294 100644 --- a/cpp/src/Ice/Connection.cpp +++ b/cpp/src/Ice/Connection.cpp @@ -391,7 +391,7 @@ IceInternal::Connection::sendRequest(Outgoing* out, bool oneway) } const Byte* p; p = reinterpret_cast<const Byte*>(&requestId); -#ifdef ICE_UTIL_BIGENDIAN +#ifdef ICE_BIG_ENDIAN reverse_copy(p, p + sizeof(Int), os->b.begin() + headerSize); #else copy(p, p + sizeof(Int), os->b.begin() + headerSize); @@ -437,7 +437,7 @@ IceInternal::Connection::sendRequest(Outgoing* out, bool oneway) const Byte* p; Int sz = os->b.size(); p = reinterpret_cast<const Byte*>(&sz); -#ifdef ICE_UTIL_BIGENDIAN +#ifdef ICE_BIG_ENDIAN reverse_copy(p, p + sizeof(Int), os->b.begin() + 10); #else copy(p, p + sizeof(Int), os->b.begin() + 10); @@ -501,7 +501,7 @@ IceInternal::Connection::sendAsyncRequest(const OutgoingAsyncPtr& out) const Byte* p; p = reinterpret_cast<const Byte*>(&requestId); -#ifdef ICE_UTIL_BIGENDIAN +#ifdef ICE_BIG_ENDIAN reverse_copy(p, p + sizeof(Int), os->b.begin() + headerSize); #else copy(p, p + sizeof(Int), os->b.begin() + headerSize); @@ -546,7 +546,7 @@ IceInternal::Connection::sendAsyncRequest(const OutgoingAsyncPtr& out) const Byte* p; Int sz = os->b.size(); p = reinterpret_cast<const Byte*>(&sz); -#ifdef ICE_UTIL_BIGENDIAN +#ifdef ICE_BIG_ENDIAN reverse_copy(p, p + sizeof(Int), os->b.begin() + 10); #else copy(p, p + sizeof(Int), os->b.begin() + 10); @@ -659,7 +659,7 @@ IceInternal::Connection::flushBatchRequest() const Byte* p; p = reinterpret_cast<const Byte*>(&_batchRequestNum); -#ifdef ICE_UTIL_BIGENDIAN +#ifdef ICE_BIG_ENDIAN reverse_copy(p, p + sizeof(Int), _batchStream.b.begin() + headerSize); #else copy(p, p + sizeof(Int), _batchStream.b.begin() + headerSize); @@ -705,7 +705,7 @@ IceInternal::Connection::flushBatchRequest() Int sz = _batchStream.b.size(); p = reinterpret_cast<const Byte*>(&sz); -#ifdef ICE_UTIL_BIGENDIAN +#ifdef ICE_BIG_ENDIAN reverse_copy(p, p + sizeof(Int), _batchStream.b.begin() + 10); #else copy(p, p + sizeof(Int), _batchStream.b.begin() + 10); @@ -797,7 +797,7 @@ IceInternal::Connection::sendResponse(BasicStream* os, Byte compressFlag) Int sz = os->b.size(); p = reinterpret_cast<const Byte*>(&sz); -#ifdef ICE_UTIL_BIGENDIAN +#ifdef ICE_BIG_ENDIAN reverse_copy(p, p + sizeof(Int), os->b.begin() + 10); #else copy(p, p + sizeof(Int), os->b.begin() + 10); @@ -1698,7 +1698,7 @@ IceInternal::Connection::doCompress(BasicStream& uncompressed, BasicStream& comp Int compressedSize = compressed.b.size(); p = reinterpret_cast<const Byte*>(&compressedSize); -#ifdef ICE_UTIL_BIGENDIAN +#ifdef ICE_BIG_ENDIAN reverse_copy(p, p + sizeof(Int), uncompressed.b.begin() + 10); #else copy(p, p + sizeof(Int), uncompressed.b.begin() + 10); @@ -1710,7 +1710,7 @@ IceInternal::Connection::doCompress(BasicStream& uncompressed, BasicStream& comp Int uncompressedSize = uncompressed.b.size(); p = reinterpret_cast<const Byte*>(&uncompressedSize); -#ifdef ICE_UTIL_BIGENDIAN +#ifdef ICE_BIG_ENDIAN reverse_copy(p, p + sizeof(Int), compressed.b.begin() + headerSize); #else copy(p, p + sizeof(Int), compressed.b.begin() + headerSize); diff --git a/cpp/src/IcePack/Makefile b/cpp/src/IcePack/Makefile index f7d4c33e9be..e089972fe57 100644 --- a/cpp/src/IcePack/Makefile +++ b/cpp/src/IcePack/Makefile @@ -96,7 +96,7 @@ SLICE2FREEZECMD = $(SLICE2FREEZE) --ice --include-dir IcePack $(ICECPPFLAGS) include $(top_srcdir)/config/Make.rules -CPPFLAGS := -I.. $(CPPFLAGS) $(XERCESC_FLAGS) +CPPFLAGS := -I.. $(CPPFLAGS) $(READLINE_FLAGS) $(XERCESC_FLAGS) ICECPPFLAGS := -I.. $(ICECPPFLAGS) SLICE2CPPFLAGS := --ice --include-dir IcePack --dll-export ICE_PACK_API $(SLICE2CPPFLAGS) diff --git a/cpp/src/IceSSL/ConfigParser.h b/cpp/src/IceSSL/ConfigParser.h index 86ee95f3bcc..e92e5596494 100644 --- a/cpp/src/IceSSL/ConfigParser.h +++ b/cpp/src/IceSSL/ConfigParser.h @@ -12,8 +12,8 @@ // // ********************************************************************** -#ifndef ICE_SSL_CONFIG_H -#define ICE_SSL_CONFIG_H +#ifndef ICE_SSL_CONFIG_PARSER_H +#define ICE_SSL_CONFIG_PARSER_H #include <Ice/LoggerF.h> #include <IceSSL/CertificateDesc.h> diff --git a/cpp/src/IceStorm/Makefile b/cpp/src/IceStorm/Makefile index 8a182ca4ec0..08b5c93c10f 100644 --- a/cpp/src/IceStorm/Makefile +++ b/cpp/src/IceStorm/Makefile @@ -64,7 +64,7 @@ SLICE2FREEZECMD = $(SLICE2FREEZE) --ice --include-dir IceStorm $(ICECPPFLAGS) include $(top_srcdir)/config/Make.rules -CPPFLAGS := -I.. $(XERCESC_FLAGS) $(CPPFLAGS) +CPPFLAGS := -I.. $(XERCESC_FLAGS) $(READLINE_FLAGS) $(CPPFLAGS) ICECPPFLAGS := -I.. $(ICECPPFLAGS) SLICE2CPPFLAGS := --ice --include-dir IceStorm $(SLICE2CPPFLAGS) diff --git a/cpp/src/IceUtil/Unicode.cpp b/cpp/src/IceUtil/Unicode.cpp index d02e394dc2a..4a7537a1308 100644 --- a/cpp/src/IceUtil/Unicode.cpp +++ b/cpp/src/IceUtil/Unicode.cpp @@ -15,6 +15,13 @@ #include <IceUtil/Unicode.h> #include <algorithm> +#if defined(_WIN32) +# define SIZEOF_WCHAR_T 2 +#elif (defined(__sun) && defined(__sparc)) || \ + ((defined(__linux) || defined(__FreeBSD__)) && defined (__i386)) +# define SIZEOF_WCHAR_T 4 +#endif + using namespace std; string diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp index 1baee9853e6..2b3834ac072 100644 --- a/cpp/src/Slice/CPlusPlusUtil.cpp +++ b/cpp/src/Slice/CPlusPlusUtil.cpp @@ -101,14 +101,12 @@ Slice::printDllExportStuff(Output& out, const string& dllExport) if(dllExport.size()) { out << sp; - out << "\n#ifdef _WIN32"; + out << "\n#ifndef " << dllExport; out << "\n# ifdef " << dllExport << "_EXPORTS"; - out << "\n# define " << dllExport << " __declspec(dllexport)"; + out << "\n# define " << dllExport << " ICE_DECLSPEC_EXPORT"; out << "\n# else"; - out << "\n# define " << dllExport << " __declspec(dllimport)"; + out << "\n# define " << dllExport << " ICE_DECLSPEC_IMPORT"; out << "\n# endif"; - out << "\n#else"; - out << "\n# define " << dllExport << " /**/"; out << "\n#endif"; } } diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 665ec5e59f5..023ae1ead0d 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -211,11 +211,6 @@ Slice::Gen::generate(const UnitPtr& unit) H << "\n#include <Ice/LocalObject.h>"; } - if(unit->usesConsts()) - { - H << "\n#include <Ice/Const.h>"; - } - StringList includes = unit->includeFiles(); for(StringList::const_iterator q = includes.begin(); q != includes.end(); ++q) { @@ -1002,7 +997,7 @@ Slice::Gen::TypesVisitor::visitConst(const ConstPtr& p) } else if(bp && bp->kind() == Builtin::KindLong) { - H << "ICE_INT64_LITERAL(" << p->value() << ")"; + H << "ICE_INT64(" << p->value() << ")"; } else { |