diff options
author | Michi Henning <michi@zeroc.com> | 2005-11-18 22:59:46 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2005-11-18 22:59:46 +0000 |
commit | 1995b4af86f8edbb2f12405d05bce2b6e47459b1 (patch) | |
tree | fa5813ff5b05ea5f8d316515b394ee520aacd288 /cpp/src | |
parent | Added note about iceboxd (diff) | |
download | ice-1995b4af86f8edbb2f12405d05bce2b6e47459b1.tar.bz2 ice-1995b4af86f8edbb2f12405d05bce2b6e47459b1.tar.xz ice-1995b4af86f8edbb2f12405d05bce2b6e47459b1.zip |
Moved VS 8 warning suppression into IceUtil/DisableWarnings.h
Diffstat (limited to 'cpp/src')
26 files changed, 50 insertions, 59 deletions
diff --git a/cpp/src/FreezeScript/Data.cpp b/cpp/src/FreezeScript/Data.cpp index e48e8cd7c72..81dad802b9e 100644 --- a/cpp/src/FreezeScript/Data.cpp +++ b/cpp/src/FreezeScript/Data.cpp @@ -7,6 +7,7 @@ // // ********************************************************************** +#include <IceUtil/DisableWarnings.h> #include <FreezeScript/Data.h> #include <FreezeScript/Util.h> #include <FreezeScript/Exception.h> diff --git a/cpp/src/Glacier2/Glacier2Router.cpp b/cpp/src/Glacier2/Glacier2Router.cpp index 4877c8cfa4b..831dc9f0d22 100644 --- a/cpp/src/Glacier2/Glacier2Router.cpp +++ b/cpp/src/Glacier2/Glacier2Router.cpp @@ -7,6 +7,7 @@ // // ********************************************************************** +#include <IceUtil/DisableWarnings.h> #include <IceUtil/UUID.h> #include <IceUtil/Options.h> #include <Ice/Service.h> diff --git a/cpp/src/Ice/BasicStream.cpp b/cpp/src/Ice/BasicStream.cpp index 5267f96d7fe..9b3bd735605 100644 --- a/cpp/src/Ice/BasicStream.cpp +++ b/cpp/src/Ice/BasicStream.cpp @@ -7,6 +7,7 @@ // // ********************************************************************** +#include <IceUtil/DisableWarnings.h> #include <Ice/BasicStream.h> #include <Ice/Instance.h> #include <Ice/Object.h> @@ -733,17 +734,6 @@ IceInternal::BasicStream::read(vector<Byte>& v) } } -template<class InputIterator, class OutputIterator> -OutputIterator -copyP(InputIterator first, InputIterator last, OutputIterator dest) -{ -#if _WIN32 && _MSC_VER == 1400 - return ::stdext::unchecked_copy(first, last, dest); -#else - return ::std::copy(first, last, dest); -#endif -} - void IceInternal::BasicStream::write(const vector<bool>& v) { @@ -753,7 +743,7 @@ IceInternal::BasicStream::write(const vector<bool>& v) { Container::size_type pos = b.size(); resize(pos + sz); - copyP(v.begin(), v.end(), b.begin() + pos); + copy(v.begin(), v.end(), b.begin() + pos); } } @@ -857,7 +847,7 @@ IceInternal::BasicStream::read(vector<Short>& v) dest += 2 * sizeof(Short); } #else - copyP(begin, i, reinterpret_cast<Byte*>(&v[0])); + copy(begin, i, reinterpret_cast<Byte*>(&v[0])); #endif } else @@ -960,7 +950,7 @@ IceInternal::BasicStream::read(vector<Int>& v) dest += 2 * sizeof(Int); } #else - copyP(begin, i, reinterpret_cast<Byte*>(&v[0])); + copy(begin, i, reinterpret_cast<Byte*>(&v[0])); #endif } else @@ -1087,7 +1077,7 @@ IceInternal::BasicStream::read(vector<Long>& v) dest += 2 * sizeof(Long); } #else - copyP(begin, i, reinterpret_cast<Byte*>(&v[0])); + copy(begin, i, reinterpret_cast<Byte*>(&v[0])); #endif } else @@ -1190,7 +1180,7 @@ IceInternal::BasicStream::read(vector<Float>& v) dest += 2 * sizeof(Float); } #else - copyP(begin, i, reinterpret_cast<Byte*>(&v[0])); + copy(begin, i, reinterpret_cast<Byte*>(&v[0])); #endif } else @@ -1317,7 +1307,7 @@ IceInternal::BasicStream::read(vector<Double>& v) dest += 2 * sizeof(Double); } #else - copyP(begin, i, reinterpret_cast<Byte*>(&v[0])); + copy(begin, i, reinterpret_cast<Byte*>(&v[0])); #endif } else diff --git a/cpp/src/Ice/ConnectionI.cpp b/cpp/src/Ice/ConnectionI.cpp index 98863f20a16..86da0b44186 100644 --- a/cpp/src/Ice/ConnectionI.cpp +++ b/cpp/src/Ice/ConnectionI.cpp @@ -7,6 +7,7 @@ // // ********************************************************************** +#include <IceUtil/DisableWarnings.h> #include <Ice/ConnectionI.h> #include <Ice/Instance.h> #include <Ice/LoggerUtil.h> diff --git a/cpp/src/Ice/GC.cpp b/cpp/src/Ice/GC.cpp index 1bce890035f..b9b8bf76bfd 100755 --- a/cpp/src/Ice/GC.cpp +++ b/cpp/src/Ice/GC.cpp @@ -35,7 +35,7 @@ recursivelyReachable(GCShared* p, GCObjectSet& o) } -using namespace std;
+using namespace std; using namespace IceUtil; int IceInternal::GC::_numCollectors = 0; diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp index 45129677459..b1b276fd985 100644 --- a/cpp/src/Ice/Instance.cpp +++ b/cpp/src/Ice/Instance.cpp @@ -7,6 +7,7 @@ // // ********************************************************************** +#include <IceUtil/DisableWarnings.h> #include <Ice/Instance.h> #include <Ice/TraceLevels.h> #include <Ice/DefaultsAndOverrides.h> @@ -413,34 +414,6 @@ IceInternal::Instance::getDefaultContext() const return _defaultContext; } -static FILE* -freopenP(const char* path, const char* mode, FILE* stream) -{ - FILE* file; - -#if _WIN32 && _MSC_VER >= 1400 - ::freopen_s(&file, path, mode, stream); - if(file == 0) - { - FileException ex(__FILE__, __LINE__); - ex.path = path; - char buf[1024]; - ex.error = _strerror_s(buf, sizeof(buf), "freopen_s failed"); - throw ex; - } -#else - file = ::freopen(path, mode, stream); - if(file == 0) - { - FileException ex(__FILE__, __LINE__); - ex.path = path; - ex.error = getSystemErrno(); - throw ex; - } -#endif - - return file; -} IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const PropertiesPtr& properties, const LoggerPtr& logger) : @@ -470,12 +443,26 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Prope if(stdOutFilename != "") { - freopenP(stdOutFilename.c_str(), "a", stdout); + FILE* file = freopen(stdOutFilename.c_str(), "a", stdout); + if(file == 0) + { + FileException ex(__FILE__, __LINE__); + ex.path = stdOutFilename; + ex.error = getSystemErrno(); + throw ex; + } } if(stdErrFilename != "") { - freopenP(stdErrFilename.c_str(), "a", stderr); + FILE* file = freopen(stdErrFilename.c_str(), "a", stderr); + if(file == 0) + { + FileException ex(__FILE__, __LINE__); + ex.path = stdErrFilename; + ex.error = getSystemErrno(); + throw ex; + } } unsigned int seed = static_cast<unsigned int>(IceUtil::Time::now().toMicroSeconds()); diff --git a/cpp/src/Ice/PropertiesI.cpp b/cpp/src/Ice/PropertiesI.cpp index 5f3a01970fc..0cf36984de4 100644 --- a/cpp/src/Ice/PropertiesI.cpp +++ b/cpp/src/Ice/PropertiesI.cpp @@ -7,6 +7,7 @@ // // ********************************************************************** +#include <IceUtil/DisableWarnings.h> #include <IceUtil/StringUtil.h> #include <Ice/PropertiesI.h> #include <Ice/Initialize.h> diff --git a/cpp/src/Ice/Service.cpp b/cpp/src/Ice/Service.cpp index ac8b2bb17e4..1b5ec82669d 100755 --- a/cpp/src/Ice/Service.cpp +++ b/cpp/src/Ice/Service.cpp @@ -7,6 +7,7 @@ // // ********************************************************************** +#include <IceUtil/DisableWarnings.h> #include <IceUtil/CtrlCHandler.h> #include <IceUtil/Thread.h> #include <IceUtil/Monitor.h> @@ -18,7 +19,7 @@ #include <Ice/Properties.h> #ifdef _WIN32 -# include <winsock2.h>
+# include <winsock2.h> # include <Ice/EventLoggerI.h> #else # include <Ice/Logger.h> diff --git a/cpp/src/Ice/ThreadPool.cpp b/cpp/src/Ice/ThreadPool.cpp index 670411f142e..40e132ae4d8 100644 --- a/cpp/src/Ice/ThreadPool.cpp +++ b/cpp/src/Ice/ThreadPool.cpp @@ -7,6 +7,7 @@ // // ********************************************************************** +#include <IceUtil/DisableWarnings.h> #include <Ice/ThreadPool.h> #include <Ice/EventHandler.h> #include <Ice/Network.h> diff --git a/cpp/src/IceGrid/Activator.cpp b/cpp/src/IceGrid/Activator.cpp index c9317f40a6f..36263460338 100644 --- a/cpp/src/IceGrid/Activator.cpp +++ b/cpp/src/IceGrid/Activator.cpp @@ -7,6 +7,7 @@ // // ********************************************************************** +#include <IceUtil/DisableWarnings.h> #include <Ice/Ice.h> #include <IceGrid/Activator.h> #include <IceGrid/Admin.h> diff --git a/cpp/src/IceGrid/Client.cpp b/cpp/src/IceGrid/Client.cpp index 693b87f9164..d3646159b18 100644 --- a/cpp/src/IceGrid/Client.cpp +++ b/cpp/src/IceGrid/Client.cpp @@ -7,6 +7,7 @@ // // ********************************************************************** +#include <IceUtil/DisableWarnings.h> #include <IceUtil/Options.h> #include <Ice/Application.h> #include <Ice/SliceChecksums.h> diff --git a/cpp/src/IceGrid/Parser.cpp b/cpp/src/IceGrid/Parser.cpp index dd827ab318d..ff6c5c5e347 100644 --- a/cpp/src/IceGrid/Parser.cpp +++ b/cpp/src/IceGrid/Parser.cpp @@ -7,6 +7,7 @@ // // ********************************************************************** +#include <IceUtil/DisableWarnings.h> #include <IceUtil/OutputUtil.h> #include <IceUtil/Options.h> #include <Ice/Ice.h> diff --git a/cpp/src/IcePatch2/FileServerI.cpp b/cpp/src/IcePatch2/FileServerI.cpp index 38e90002910..bb7ef6d203f 100644 --- a/cpp/src/IcePatch2/FileServerI.cpp +++ b/cpp/src/IcePatch2/FileServerI.cpp @@ -7,6 +7,7 @@ // // ********************************************************************** +#include <IceUtil/DisableWarnings.h> #include <IcePatch2/FileServerI.h> #include <sys/types.h> #include <sys/stat.h> diff --git a/cpp/src/IcePatch2/Util.cpp b/cpp/src/IcePatch2/Util.cpp index d3e237eb250..ed7a287b555 100644 --- a/cpp/src/IcePatch2/Util.cpp +++ b/cpp/src/IcePatch2/Util.cpp @@ -7,6 +7,7 @@ // // ********************************************************************** +#include <IceUtil/DisableWarnings.h> #include <IceUtil/IceUtil.h> #include <IcePatch2/Util.h> #include <openssl/sha.h> diff --git a/cpp/src/IceSSL/Convert.cpp b/cpp/src/IceSSL/Convert.cpp index fe7aa7806bb..830e9d1bdfd 100644 --- a/cpp/src/IceSSL/Convert.cpp +++ b/cpp/src/IceSSL/Convert.cpp @@ -7,6 +7,7 @@ // // ********************************************************************** +#include <IceUtil/DisableWarnings.h> #include <IceUtil/Config.h> #include <IceSSL/Convert.h> #include <iterator> diff --git a/cpp/src/IceSSL/OpenSSLPluginI.cpp b/cpp/src/IceSSL/OpenSSLPluginI.cpp index 8a440184c58..69c1a44c333 100644 --- a/cpp/src/IceSSL/OpenSSLPluginI.cpp +++ b/cpp/src/IceSSL/OpenSSLPluginI.cpp @@ -7,6 +7,8 @@ // // ********************************************************************** +#include <IceUtil/DisableWarnings.h> + #include <IceSSL/OpenSSLPluginI.h> #include <Ice/LoggerUtil.h> diff --git a/cpp/src/IceSSL/OpenSSLUtils.cpp b/cpp/src/IceSSL/OpenSSLUtils.cpp index 16e5e11bdca..09c34dfd3c4 100644 --- a/cpp/src/IceSSL/OpenSSLUtils.cpp +++ b/cpp/src/IceSSL/OpenSSLUtils.cpp @@ -7,6 +7,7 @@ // // ********************************************************************** +#include <IceUtil/DisableWarnings.h> #include <IceUtil/StaticMutex.h> #include <IceSSL/OpenSSLPluginI.h> #include <IceSSL/OpenSSLUtils.h> diff --git a/cpp/src/IceStorm/Admin.cpp b/cpp/src/IceStorm/Admin.cpp index 796714d5fdb..97669039edb 100644 --- a/cpp/src/IceStorm/Admin.cpp +++ b/cpp/src/IceStorm/Admin.cpp @@ -7,6 +7,7 @@ // // ********************************************************************** +#include <IceUtil/DisableWarnings.h> #include <IceUtil/Options.h> #include <Ice/Application.h> #include <Ice/SliceChecksums.h> diff --git a/cpp/src/IceStorm/Parser.cpp b/cpp/src/IceStorm/Parser.cpp index 3d166dab28b..145134b7727 100644 --- a/cpp/src/IceStorm/Parser.cpp +++ b/cpp/src/IceStorm/Parser.cpp @@ -7,6 +7,7 @@ // // ********************************************************************** +#include <IceUtil/DisableWarnings.h> #include <Ice/Ice.h> #include <IceStorm/Parser.h> #include <IceStorm/WeightedGraph.h> diff --git a/cpp/src/IceUtil/Time.cpp b/cpp/src/IceUtil/Time.cpp index b6ba14ca2e1..aa0f5a3fa85 100644 --- a/cpp/src/IceUtil/Time.cpp +++ b/cpp/src/IceUtil/Time.cpp @@ -7,6 +7,7 @@ // // ********************************************************************** +#include <IceUtil/DisableWarnings.h> #include <IceUtil/Time.h> #ifdef _WIN32 @@ -28,11 +29,7 @@ IceUtil::Time::now() { #ifdef _WIN32 struct _timeb tb; -# if _MSC_VER >= 1400 - _ftime_s(&tb); -# else _ftime(&tb); -# endif return Time(static_cast<Int64>(tb.time) * ICE_INT64(1000000) + tb.millitm * 1000); #else @@ -113,13 +110,7 @@ IceUtil::Time::toString() const struct tm* t; #ifdef _WIN32 -# if _MSC_VER >= 1400 - struct tm tms; - t = &tms; - localtime_s(t, &time); -# else t = localtime(&time); -# endif #else struct tm tr; localtime_r(&time, &tr); diff --git a/cpp/src/slice2cs/Gen.cpp b/cpp/src/slice2cs/Gen.cpp index 7a4c9edd9fd..c41c945421e 100755 --- a/cpp/src/slice2cs/Gen.cpp +++ b/cpp/src/slice2cs/Gen.cpp @@ -7,6 +7,7 @@ // // ********************************************************************** +#include <IceUtil/DisableWarnings.h> #include <IceUtil/Functional.h> #include <Gen.h> #include <limits> diff --git a/cpp/src/slice2docbook/Gen.cpp b/cpp/src/slice2docbook/Gen.cpp index 2d3103b28b8..b0719df9abc 100644 --- a/cpp/src/slice2docbook/Gen.cpp +++ b/cpp/src/slice2docbook/Gen.cpp @@ -7,6 +7,7 @@ // // ********************************************************************** +#include <IceUtil/DisableWarnings.h> #include <IceUtil/Functional.h> #include <Gen.h> diff --git a/cpp/src/slice2freeze/Main.cpp b/cpp/src/slice2freeze/Main.cpp index 650d4636e9b..627569d34cd 100644 --- a/cpp/src/slice2freeze/Main.cpp +++ b/cpp/src/slice2freeze/Main.cpp @@ -7,6 +7,7 @@ // // ********************************************************************** +#include <IceUtil/DisableWarnings.h> #include <IceUtil/Options.h> #include <Slice/Preprocessor.h> #include <Slice/CPlusPlusUtil.h> diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp index 8aff75f3b49..593282cf4b7 100644 --- a/cpp/src/slice2java/Gen.cpp +++ b/cpp/src/slice2java/Gen.cpp @@ -7,6 +7,7 @@ // // ********************************************************************** +#include <IceUtil/DisableWarnings.h> #include <Gen.h> #include <Slice/Checksum.h> #include <IceUtil/Functional.h> diff --git a/cpp/src/slice2py/Main.cpp b/cpp/src/slice2py/Main.cpp index 43d64d0ec06..3be82046208 100644 --- a/cpp/src/slice2py/Main.cpp +++ b/cpp/src/slice2py/Main.cpp @@ -7,6 +7,7 @@ // // ********************************************************************** +#include <IceUtil/DisableWarnings.h> #include <IceUtil/Options.h> #include <Slice/Preprocessor.h> #include <Slice/PythonUtil.h> diff --git a/cpp/src/slice2vb/Gen.cpp b/cpp/src/slice2vb/Gen.cpp index 64b2558feea..735c147a328 100755 --- a/cpp/src/slice2vb/Gen.cpp +++ b/cpp/src/slice2vb/Gen.cpp @@ -7,6 +7,7 @@ // // ********************************************************************** +#include <IceUtil/DisableWarnings.h> #include <IceUtil/Functional.h> #include <Gen.h> #include <limits> |