diff --git a/app/exiv2app.hpp b/app/exiv2app.hpp index fa34b601..638f8004 100644 --- a/app/exiv2app.hpp +++ b/app/exiv2app.hpp @@ -39,13 +39,6 @@ #include #include -// stdin handler includes -#ifndef _MSC_VER -#include -#include -#include -#endif - // ***************************************************************************** // class definitions diff --git a/src/http.cpp b/src/http.cpp index 9eecfcac..deb221f3 100644 --- a/src/http.cpp +++ b/src/http.cpp @@ -1,44 +1,23 @@ // SPDX-License-Identifier: GPL-2.0-or-later -#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW__) || defined(__MINGW64__) || defined(__MINGW32__) +#include "config.h" + +#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW__) #define __USE_W32_SOCKETS #include #endif -#include "config.h" -#include "datasets.hpp" #include "http.hpp" #include "futils.hpp" -#include #include #include -#include -#include #include -#include - -#define SLEEP 1000 -#define SNOOZE 0 - -#ifdef __MINGW__ -#define fopen_S(f,n,a) f=fopen(n,a) -#endif //////////////////////////////////////// // platform specific code #if defined(WIN32) || defined(_MSC_VER) || defined(__MINGW__) -#include -#include -#if !defined(__MINGW__) && !defined(__CYGWIN__) -#define write _write -#define read _read -#define close _close -#define strdup _strdup -#define stat _stat -#define fopen_S(f,n,a) fopen_s(&f,n,a) -#endif #else //////////////////////////////////////// // Unix or Mac @@ -98,8 +77,8 @@ static constexpr std::array blankLines{ "\n\n", // this is commonly sent by CGI scripts }; -static constexpr int snooze = SNOOZE; -static int sleep_ = SLEEP; +static constexpr int snooze = 0; +static int sleep_ = 1000; static int forgive(int n,int& err) { diff --git a/src/image.cpp b/src/image.cpp index 97521ac3..b7b3124a 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -51,9 +51,6 @@ #include #include -#ifdef EXV_HAVE_UNISTD_H -# include // stat -#endif // ***************************************************************************** namespace { diff --git a/src/ini.cpp b/src/ini.cpp index 1e005e47..17100f17 100755 --- a/src/ini.cpp +++ b/src/ini.cpp @@ -17,10 +17,6 @@ using std::string; using namespace Exiv2; -#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) -#define _CRT_SECURE_NO_WARNINGS -#endif - #include #include #include diff --git a/src/makernote_int.cpp b/src/makernote_int.cpp index cd638cfa..0ec0cd8d 100644 --- a/src/makernote_int.cpp +++ b/src/makernote_int.cpp @@ -23,19 +23,11 @@ namespace fs = std::filesystem; -#if defined(__MINGW32__) || defined(__MINGW64__) -#ifndef __MINGW__ -#define __MINGW__ 1 -#endif -#endif - #if !defined(_MSC_VER) && !defined(__MINGW__) #include #include #include #else -#include -#include // _getcwd #include # ifndef CSIDL_PROFILE # define CSIDL_PROFILE 40 diff --git a/src/minoltamn_int.cpp b/src/minoltamn_int.cpp index 5841786f..f2837f84 100644 --- a/src/minoltamn_int.cpp +++ b/src/minoltamn_int.cpp @@ -2186,7 +2186,7 @@ namespace Exiv2::Internal { uint32_t id_; //!< Lens id PrintFct fct_; //!< Pretty-print function //! Comparison operator for find template - bool operator==(long id) const { return id_ == id; } + bool operator==(uint32_t id) const { return id_ == id; } }; //! List of lens ids which require special treatment from printMinoltaSonyLensID diff --git a/src/safe_op.hpp b/src/safe_op.hpp index de042481..1dc2539c 100644 --- a/src/safe_op.hpp +++ b/src/safe_op.hpp @@ -212,38 +212,7 @@ namespace Safe #undef SPECIALIZE_builtin_add_overflow #endif // __GNUC__ >= 5 || __clang_major >= 3 -#elif defined(_MSC_VER) -// intrinsics are not in available in MSVC 2005 and earlier -#if _MSC_VER >= 1400 - -/*! - * This macro pastes a specialization of builtin_add_overflow using MSVC's - * U(Int/Long/LongLong)Add. - * - * The add function is implemented by forwarding the parameters to the - * intrinsic. As MSVC's intrinsics return S_OK on success, this specialization - * returns whether the intrinsics return value does not equal S_OK. This ensures - * a uniform interface of the add function (false is returned when no overflow - * occurs, true on overflow). - * - * The intrinsics are documented here: - * https://msdn.microsoft.com/en-us/library/windows/desktop/ff516460(v=vs.85).aspx - */ -#define SPECIALIZE_builtin_add_overflow_WIN(type, builtin_name) \ - template <> \ - inline bool builtin_add_overflow(type summand_1, type summand_2, type& result) \ - { \ - return builtin_name(summand_1, summand_2, &result) != S_OK; \ - } - - SPECIALIZE_builtin_add_overflow_WIN(unsigned int, UIntAdd); - SPECIALIZE_builtin_add_overflow_WIN(unsigned long, ULongAdd); - SPECIALIZE_builtin_add_overflow_WIN(unsigned long long, ULongLongAdd); - -#undef SPECIALIZE_builtin_add_overflow_WIN - -#endif // _MSC_VER >= 1400 -#endif // defined(_MSC_VER) +#endif } // namespace Internal