From 8bf9ca8e6d985dad861fdd63c3845b476a75d3c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20D=C3=ADaz=20M=C3=A1s?= Date: Sun, 11 Nov 2018 10:31:17 +0100 Subject: [PATCH] MSVC: Delete deprecated stuff related to MSVC < 2008 --- include/exiv2/config.h | 9 +-------- src/http.cpp | 17 ----------------- src/image_int.cpp | 5 ----- 3 files changed, 1 insertion(+), 30 deletions(-) diff --git a/include/exiv2/config.h b/include/exiv2/config.h index eb3a8d3a..d359c9d0 100644 --- a/include/exiv2/config.h +++ b/include/exiv2/config.h @@ -8,13 +8,6 @@ #define _MSC_VER_2010 1600 #define _MSC_VER_2008 1500 -#define _MSC_VER_2005 1400 - -#if _MSC_VER >= _MSC_VER_2005 -#define MSDEV_2005 1 -#else -#define MSDEV_2003 1 -#endif // Constants required by Microsoft SDKs to define SHGetFolderPathA and others @@ -31,7 +24,7 @@ #define HAVE_NTOHLL 1 #endif -#if _MSC_VER >= _MSC_VER_2005 +#if _MSC_VER >= _MSC_VER_2008 #pragma warning(disable : 4996) // Disable warnings about 'deprecated' standard functions #pragma warning(disable : 4251) // Disable warnings from std templates about exporting interfaces #endif diff --git a/src/http.cpp b/src/http.cpp index e4db519a..9c4b7294 100644 --- a/src/http.cpp +++ b/src/http.cpp @@ -149,11 +149,7 @@ static int error(std::string& errors, const char* msg, const char* x, const char static const size_t buffer_size = 512; char buffer[buffer_size]; memset(buffer, 0, buffer_size); -#ifdef MSDEV_2003 - sprintf(buffer,msg,x,y,z); -#else snprintf(buffer, buffer_size, msg, x, y, z) ; -#endif if ( errno ) { perror(buffer) ; } else { @@ -300,11 +296,7 @@ int Exiv2::http(Exiv2::Dictionary& request,Exiv2::Dictionary& response,std::stri //////////////////////////////////// // format the request -#ifdef MSDEV_2003 - int n = sprintf(buffer,httpTemplate,verb,page,version,servername,header) ; -#else int n = snprintf(buffer,buff_l,httpTemplate,verb,page,version,servername,header) ; -#endif buffer[n] = 0 ; response["requestheaders"]=std::string(buffer,n); @@ -386,21 +378,12 @@ int Exiv2::http(Exiv2::Dictionary& request,Exiv2::Dictionary& response,std::stri } if ( n != FINISH || !OK(status) ) { -#ifdef MSDEV_2003 - sprintf(buffer,"wsa_error = %d,n = %d,sleep_ = %d status = %d" - , WSAGetLastError() - , n - , sleep_ - , status - ) ; -#else snprintf(buffer,sizeof buffer,"wsa_error = %d,n = %d,sleep_ = %d status = %d" , WSAGetLastError() , n , sleep_ , status ) ; -#endif error(errors,buffer,NULL,NULL,0) ; } else if ( bSearching && OK(status) ) { if ( end ) { diff --git a/src/image_int.cpp b/src/image_int.cpp index 6dcdaf33..109639f1 100644 --- a/src/image_int.cpp +++ b/src/image_int.cpp @@ -28,11 +28,6 @@ namespace Exiv2 { namespace Internal { -#ifdef MSDEV_2003 -#undef vsnprintf -#define vsnprintf _vsnprintf -#endif - std::string stringFormat(const char* format, ...) { std::string result;