Remove unused stuff

main
Luis Díaz Más 3 years ago
parent 867132f7c7
commit 3f3b651c04

@ -39,13 +39,6 @@
#include <iostream>
#include <regex>
// stdin handler includes
#ifndef _MSC_VER
#include <cstdlib>
#include <stdio.h>
#include <sys/select.h>
#endif
// *****************************************************************************
// class definitions

@ -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 <winsock2.h>
#endif
#include "config.h"
#include "datasets.hpp"
#include "http.hpp"
#include "futils.hpp"
#include <sys/types.h>
#include <stdio.h>
#include <array>
#include <cstdlib>
#include <time.h>
#include <sys/stat.h>
#include <string.h>
#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 <string.h>
#include <io.h>
#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<const char*, 2> 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)
{

@ -51,9 +51,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#ifdef EXV_HAVE_UNISTD_H
# include <unistd.h> // stat
#endif
// *****************************************************************************
namespace {

@ -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 <stdio.h>
#include <ctype.h>
#include <string.h>

@ -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 <unistd.h>
#include <sys/types.h>
#include <pwd.h>
#else
#include <windows.h>
#include <direct.h> // _getcwd
#include <shlobj.h>
# ifndef CSIDL_PROFILE
# define CSIDL_PROFILE 40

@ -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

@ -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

Loading…
Cancel
Save