#1041 Reorganized and simplified config header files.

This commit is contained in:
Robin Mills 2016-06-23 18:30:29 +00:00
parent 1a8f8f6259
commit fc24b8c541
4 changed files with 171 additions and 386 deletions

View File

@ -1,41 +1,9 @@
/**/
/* Generated by cmake from config.h.cmake. */
/* Generated by cmake from config/config.h.cmake. */
#ifndef _EXV_MSVC_H_
#define _EXV_MSVC_H_
#ifdef _MSC_VER
#define _MSC_VER_2015 1900
#define _MSC_VER_2013 1800
#define _MSC_VER_2012 1700
#define _MSC_VER_2010 1600
#define _MSC_VER_2008 1500
#define _MSC_VER_2005 1400
#define _MSC_VER_2003 1300
#if _MSC_VER >= _MSC_VER_2015
#define MSDEV_2015 1
#elif _MSC_VER >= _MSC_VER_2013
#define MSDEV_2013 1
#elif _MSC_VER >= _MSC_VER_2012
#define MSDEV_2012 1
#elif _MSC_VER >= _MSC_VER_2010
#define MSDEV_2010 1
#elif _MSC_VER >= _MSC_VER_2008
#define MSDEV_2008 1
#elif _MSC_VER >= _MSC_VER_2005
#define MSDEV_2005 1
#else
#define MSDEV_2003 1
#endif
#endif /* _EXV_MSVC_H_ */
#endif /* _MSC_VER */
// Visual Studio 2012 supports ntohll
#if defined(_MSC_VER) && _MSC_VER_ == _MSC_VER_2012
#define HAVE_NTOHLL 1
#endif
#pragma once
#ifndef _EXV_CONF_H_
#define _EXV_CONF_H_
/* Define to 1 if you want to use `libssh' for SshIO. */
#cmakedefine EXV_USE_SSH 1
@ -238,119 +206,10 @@
/* Define to `int' if <sys/types.h> does not define. */
#cmakedefine HAVE_PID_T 1
/* On Microsoft compilers pid_t has to be set to int. */
#ifndef HAVE_PID_T
typedef int pid_t;
#endif
/* Define to rpl_realloc if the replacement function should be used. */
#cmakedefine realloc
/* Define to `unsigned' if <sys/types.h> does not define. */
#cmakedefine size_t
#if defined(__CYGWIN32__) && !defined(__CYGWIN__)
/* For backwards compatibility with Cygwin b19 and
earlier, we define __CYGWIN__ here, so that
we can rely on checking just for that macro. */
#define __CYGWIN__ __CYGWIN32__
#define EXV_HAVE_GXXCLASSVISIBILITY
#endif
/* Help out our buddy curl */
#if defined(_MSC_VER) && !defined(EXV_HAVE_DLL)
#define CURL_STATICLIB
#endif
#if defined(_MSC_VER)
#pragma comment(lib, "ws2_32.lib")
#pragma comment(lib, "wldap32.lib")
#endif
/* File path separator */
#ifndef EXV_SEPARATOR_STR
#if defined(WIN32) && !defined(__CYGWIN__)
#define EXV_SEPARATOR_STR "\\"
#define EXV_SEPARATOR_CHR '\\'
#else
#define EXV_SEPARATOR_STR "/"
#define EXV_SEPARATOR_CHR '/'
#endif
#endif
/* Shared library support, see http://gcc.gnu.org/wiki/Visibility */
#if defined(WIN32) && !defined(__CYGWIN__) && EXV_HAVE_DLL
# define EXV_IMPORT __declspec(dllimport)
# define EXV_EXPORT __declspec(dllexport)
# define EXV_DLLLOCAL
# define EXV_DLLPUBLIC
#else
# ifdef EXV_HAVE_GXXCLASSVISIBILITY
# define EXV_IMPORT __attribute__ ((visibility("default")))
# define EXV_EXPORT __attribute__ ((visibility("default")))
# define EXV_DLLLOCAL __attribute__ ((visibility("hidden")))
# define EXV_DLLPUBLIC __attribute__ ((visibility("default")))
# else
# define EXV_IMPORT
# define EXV_EXPORT
# define EXV_DLLLOCAL
# define EXV_DLLPUBLIC
# endif /* ! EXV_HAVE_GXXCLASSVISIBILITY */
#endif /* ! WIN32 */
/* Define EXIV2API for DLL builds */
#ifdef EXV_HAVE_DLL
# ifdef EXV_BUILDING_LIB
# define EXIV2API EXV_EXPORT
# else
# define EXIV2API EXV_IMPORT
# endif /* ! EXV_BUILDING_LIB */
#else
# define EXIV2API
#endif /* ! EXV_HAVE_DLL */
/*
Disable warning 4251. This is warning from std templates about exporting interfaces
*/
#ifdef EXV_HAVE_DLL
#pragma warning( disable : 4251 )
#endif
/*
Visual Studio C++ 2005 (8.0)
Disable warnings about 'deprecated' standard functions
See, eg. http://www.informit.com/guides/content.asp?g=cplusplus&seqNum=259
*/
#if defined(_MSC_VER) && (_MSC_VER >= 1400)
# pragma warning(disable : 4996)
#endif
// Constants required by Microsoft SDKs to define SHGetFolderPathA and others
#ifdef _MSC_VER
# ifndef _WIN32_WINNT
// Visual Studio 2012 and earlier
# if _MSC_VER < 1800
# define _WIN32_WINNT 0x0501
# else
# define _WIN32_WINNT 0x0600
# endif
# endif
# include <windows.h>
# include <shlobj.h>
#endif
/*
If you're using Solaris and the Solaris Studio compiler
you must -library=stdcxx4 along with these inclusions below
*/
#if defined(OS_SOLARIS)
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include <stdlib.h>
#include <math.h>
#if defined(__cplusplus)
#include <ios>
#include <fstream>
#endif
#endif
#endif // _EXV_CONF_H_

View File

@ -1,21 +1,125 @@
// config.h
// #VSslnCompat - get rid of exv_msvc*.h files
#pragma once
#ifndef _CONFIG_H_
#define _CONFIG_H_
///// Start of Visual Studio Support /////
#ifdef _MSC_VER
#define _MSC_VER_2015 1900
#define _MSC_VER_2013 1800
#define _MSC_VER_2012 1700
#define _MSC_VER_2010 1600
#define _MSC_VER_2008 1500
#define _MSC_VER_2005 1400
#define _MSC_VER_2003 1300
#if _MSC_VER >= _MSC_VER_2015
#define MSDEV_2015 1
#elif _MSC_VER >= _MSC_VER_2013
#define MSDEV_2013 1
#elif _MSC_VER >= _MSC_VER_2012
#define MSDEV_2012 1
#elif _MSC_VER >= _MSC_VER_2010
#define MSDEV_2010 1
#elif _MSC_VER >= _MSC_VER_2008
#define MSDEV_2008 1
#elif _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
#ifndef _WIN32_WINNT
// Visual Studio 2012 and earlier
# if _MSC_VER < 1800
# define _WIN32_WINNT 0x0501
# else
# define _WIN32_WINNT 0x0600
# endif
#endif
#include <windows.h>
#include <shlobj.h>
#pragma comment(lib, "ws2_32.lib")
#pragma comment(lib, "wldap32.lib")
#if _MSC_VER >= _MSC_VER_2010
# define EXV_HAVE_STDINT_H 1
#else
# ifdef EXV_HAVE_STDINT_H
# undef EXV_HAVE_STDINT_H
# endif
#endif
#if _MSC_VER_ == _MSC_VER_2012
#define HAVE_NTOHLL 1
#endif
/* Disable warning 4251 from std templates about exporting interfaces */
#ifdef EXV_HAVE_DLL
#pragma warning( disable : 4251 )
#endif
/* Disable warnings about 'deprecated' standard functions */
#if _MSC_VER >= _MSC_VER_2005
# pragma warning(disable : 4996)
#endif
/* On Microsoft compilers pid_t has to be set to int. */
#ifndef HAVE_PID_T
typedef int pid_t;
#endif
/* Shared library support */
#ifdef EXV_HAVE_DLL
#define EXV_IMPORT __declspec(dllimport)
#define EXV_EXPORT __declspec(dllexport)
#define EXV_DLLLOCAL
#define EXV_DLLPUBLIC
#else
#define EXV_IMPORT
#define EXV_EXPORT
#define EXV_DLLLOCAL
#define EXV_DLLPUBLIC
#define EXIV2API
#endif
/* Define EXIV2API for DLL builds */
#ifdef EXV_HAVE_DLL
# ifdef EXV_BUILDING_LIB
# define EXIV2API EXV_EXPORT
# else
# define EXIV2API EXV_IMPORT
# endif /* ! EXV_BUILDING_LIB */
#else
# define EXIV2API
#endif /* ! EXV_HAVE_DLL */
/* Help out our buddy curl */
#if !defined(EXV_HAVE_DLL)
# define CURL_STATICLIB
#endif
#endif // _MSC_VER
///// End of Visual Studio Support /////
///// Include exv_platform.h file /////
#ifdef _MSC_VER
# ifdef EXV_MSVC_CONFIGURE
# include "exv_msvc_configure.h"
# else
# include "exv_msvc.h"
# endif
# if _MSC_VER < _MSC_VER_2010
# ifdef EXV_HAVE_STDINT_H
# undef EXV_HAVE_STDINT_H
# endif
# endif
#else
# include "exv_conf.h"
#endif
////////////////////////////////////////
///// Start of platform marcos /////////
// Linux GCC 4.8 appears to be confused about strerror_r
#ifndef EXV_STRERROR_R_CHAR_P
#ifdef __gnu_linux__
@ -24,34 +128,72 @@
#endif
#if defined(__MINGW32__) || defined(__MINGW64__)
#ifndef __MING__
#define __MING__ 1
#endif
# ifndef __MING__
# define __MING__ 1
# endif
// Don't know why MinGW refuses to link libregex
#ifdef EXV_HAVE_REGEX
#undef EXV_HAVE_REGEX
#endif
# ifdef EXV_HAVE_REGEX
# undef EXV_HAVE_REGEX
# endif
#endif
#ifndef __CYGWIN__
#if defined(__CYGWIN32__) || defined(__CYGWIN64__)
#define __CYGWIN__ 1
#endif
# if defined(__CYGWIN32__) || defined(__CYGWIN64__)
# define __CYGWIN__ 1
# endif
#endif
#ifndef __LITTLE_ENDIAN__
#if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__)
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
#define __LITTLE_ENDIAN__ 1
#endif
#endif
# if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__)
# if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
# define __LITTLE_ENDIAN__ 1
# endif
# endif
#endif
#ifndef __LITTLE_ENDIAN__
#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW__)
#define __LITTLE_ENDIAN__ 1
#endif
# if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW__)
# define __LITTLE_ENDIAN__ 1
# endif
#endif
// That's all Folks!
#if defined(__CYGWIN32__) && !defined(__CYGWIN__)
/* For backwards compatibility with Cygwin b19 and
earlier, we define __CYGWIN__ here, so that
we can rely on checking just for that macro. */
# define __CYGWIN__ __CYGWIN32__
# define EXV_HAVE_GXXCLASSVISIBILITY
#endif
/*
If you're using Solaris and the Solaris Studio compiler
you must -library=stdcxx4 along with these inclusions below
*/
#if defined(OS_SOLARIS)
# include <stdio.h>
# include <string.h>
# include <strings.h>
# include <stdlib.h>
# include <math.h>
# if defined(__cplusplus)
# include <ios>
# include <fstream>
# endif
#endif
///// End of platform marcos /////////
///// Path separator marcos /////
#ifndef EXV_SEPARATOR_STR
# if defined(WIN32) && !defined(__CYGWIN__)
# define EXV_SEPARATOR_STR "\\"
# define EXV_SEPARATOR_CHR '\\'
# else
# define EXV_SEPARATOR_STR "/"
# define EXV_SEPARATOR_CHR '/'
# endif
#endif
//////////////////////////////////////
//
// That's all Folks!
#endif // _CONFIG_H_

View File

@ -12,38 +12,6 @@
#ifndef _EXV_MSVC_H_
#define _EXV_MSVC_H_
#define _MSC_VER_2015 1900
#define _MSC_VER_2013 1800
#define _MSC_VER_2012 1700
#define _MSC_VER_2010 1600
#define _MSC_VER_2008 1500
#define _MSC_VER_2005 1400
#define _MSC_VER_2003 1300
#if _MSC_VER >= _MSC_VER_2015
#define MSDEV_2015 1
#elif _MSC_VER >= _MSC_VER_2013
#define MSDEV_2013 1
#elif _MSC_VER >= _MSC_VER_2012
#define MSDEV_2012 1
#elif _MSC_VER >= _MSC_VER_2010
#define MSDEV_2010 1
#elif _MSC_VER >= _MSC_VER_2008
#define MSDEV_2008 1
#elif _MSC_VER >= _MSC_VER_2005
#define MSDEV_2005 1
#else
#define MSDEV_2003 1
#endif
#if _MSC_VER >= _MSC_VER_2010
#define EXV_HAVE_STDINT_H 1
#endif
#if _MSC_VER_ == _MSC_VER_2012
#define HAVE_NTOHLL 1
#endif
/* Define to 1 if you have the <regex.h> header file. */
// #define EXV_HAVE_REGEX 1
@ -123,13 +91,6 @@ typedef int pid_t;
#define CURL_STATICLIB
#endif
#pragma comment(lib, "ws2_32.lib")
#pragma comment(lib, "wldap32.lib")
/* File path separator */
#define EXV_SEPARATOR_STR "\\"
#define EXV_SEPARATOR_CHR '\\'
/* Windows unicode path support */
// #define EXV_UNICODE_PATH
@ -139,46 +100,6 @@ typedef int pid_t;
/* Define to 1 if you have the `munmap' function. */
/* #undef EXV_HAVE_MUNMAP */
/* Shared library support */
#ifdef EXV_HAVE_DLL
#define EXV_IMPORT __declspec(dllimport)
#define EXV_EXPORT __declspec(dllexport)
#define EXV_DLLLOCAL
#define EXV_DLLPUBLIC
#else
#define EXV_IMPORT
#define EXV_EXPORT
#define EXV_DLLLOCAL
#define EXV_DLLPUBLIC
#define EXIV2API
#endif
/* Define EXIV2API for DLL builds */
#ifdef EXV_HAVE_DLL
# ifdef EXV_BUILDING_LIB
# define EXIV2API EXV_EXPORT
# else
# define EXIV2API EXV_IMPORT
# endif /* ! EXV_BUILDING_LIB */
#else
# define EXIV2API
#endif /* ! EXV_HAVE_DLL */
/*
Disable warning 4251. This is warning from std templates about exporting interfaces
*/
#ifdef EXV_HAVE_DLL
#pragma warning( disable : 4251 )
#endif
/*
Visual Studio C++ 2005 (8.0)
Disable warnings about 'deprecated' standard functions
See, eg. http://www.informit.com/guides/content.asp?g=cplusplus&seqNum=259
*/
#if _MSC_VER >= 1400
# pragma warning(disable : 4996)
#endif
#endif /* _EXV_MSVC_H_ */
#endif /* _MSC_VER */

View File

@ -4,40 +4,6 @@
#ifndef _EXV_MSVC_H_
#define _EXV_MSVC_H_
#ifdef _MSC_VER
#define _MSC_VER_2015 1900
#define _MSC_VER_2013 1800
#define _MSC_VER_2012 1700
#define _MSC_VER_2010 1600
#define _MSC_VER_2008 1500
#define _MSC_VER_2005 1400
#define _MSC_VER_2003 1300
#if _MSC_VER >= _MSC_VER_2015
#define MSDEV_2015 1
#elif _MSC_VER >= _MSC_VER_2013
#define MSDEV_2013 1
#elif _MSC_VER >= _MSC_VER_2012
#define MSDEV_2012 1
#elif _MSC_VER >= _MSC_VER_2010
#define MSDEV_2010 1
#elif _MSC_VER >= _MSC_VER_2008
#define MSDEV_2008 1
#elif _MSC_VER >= _MSC_VER_2005
#define MSDEV_2005 1
#else
#define MSDEV_2003 1
#endif
#endif /* _EXV_MSVC_H_ */
#endif /* _MSC_VER */
// Visual Studio 2012 supports ntohll
#if defined(_MSC_VER) && _MSC_VER_ == _MSC_VER_2012
#define HAVE_NTOHLL 1
#endif
/* Define to 1 if you want to use `libssh' for SshIO. */
/* #undef EXV_USE_SSH */
@ -249,108 +215,5 @@ typedef int pid_t;
/* Define to `unsigned' if <sys/types.h> does not define. */
/* #undef size_t */
#if defined(__CYGWIN32__) && !defined(__CYGWIN__)
/* For backwards compatibility with Cygwin b19 and
earlier, we define __CYGWIN__ here, so that
we can rely on checking just for that macro. */
#define __CYGWIN__ __CYGWIN32__
#define EXV_HAVE_GXXCLASSVISIBILITY
#endif
/* Help out our buddy curl */
#if defined(_MSC_VER) && !defined(EXV_HAVE_DLL)
#define CURL_STATICLIB
#endif
#if defined(_MSC_VER)
#pragma comment(lib, "ws2_32.lib")
#pragma comment(lib, "wldap32.lib")
#endif
/* File path separator */
#ifndef EXV_SEPARATOR_STR
#if defined(WIN32) && !defined(__CYGWIN__)
#define EXV_SEPARATOR_STR "\\"
#define EXV_SEPARATOR_CHR '\\'
#else
#define EXV_SEPARATOR_STR "/"
#define EXV_SEPARATOR_CHR '/'
#endif
#endif
/* Shared library support, see http://gcc.gnu.org/wiki/Visibility */
#if defined(WIN32) && !defined(__CYGWIN__) && EXV_HAVE_DLL
# define EXV_IMPORT __declspec(dllimport)
# define EXV_EXPORT __declspec(dllexport)
# define EXV_DLLLOCAL
# define EXV_DLLPUBLIC
#else
# ifdef EXV_HAVE_GXXCLASSVISIBILITY
# define EXV_IMPORT __attribute__ ((visibility("default")))
# define EXV_EXPORT __attribute__ ((visibility("default")))
# define EXV_DLLLOCAL __attribute__ ((visibility("hidden")))
# define EXV_DLLPUBLIC __attribute__ ((visibility("default")))
# else
# define EXV_IMPORT
# define EXV_EXPORT
# define EXV_DLLLOCAL
# define EXV_DLLPUBLIC
# endif /* ! EXV_HAVE_GXXCLASSVISIBILITY */
#endif /* ! WIN32 */
/* Define EXIV2API for DLL builds */
#ifdef EXV_HAVE_DLL
# ifdef EXV_BUILDING_LIB
# define EXIV2API EXV_EXPORT
# else
# define EXIV2API EXV_IMPORT
# endif /* ! EXV_BUILDING_LIB */
#else
# define EXIV2API
#endif /* ! EXV_HAVE_DLL */
/*
Disable warning 4251. This is warning from std templates about exporting interfaces
*/
#ifdef EXV_HAVE_DLL
#pragma warning( disable : 4251 )
#endif
/*
Visual Studio C++ 2005 (8.0)
Disable warnings about 'deprecated' standard functions
See, eg. http://www.informit.com/guides/content.asp?g=cplusplus&seqNum=259
*/
#if defined(_MSC_VER) && (_MSC_VER >= 1400)
# pragma warning(disable : 4996)
#endif
// Constants required by Microsoft SDKs to define SHGetFolderPathA and others
#ifdef _MSC_VER
# ifndef _WIN32_WINNT
// Visual Studio 2012 and earlier
# if _MSC_VER < 1800
# define _WIN32_WINNT 0x0501
# else
# define _WIN32_WINNT 0x0600
# endif
# endif
# include <windows.h>
# include <shlobj.h>
#endif
/*
If you're using Solaris and the Solaris Studio compiler
you must -library=stdcxx4 along with these inclusions below
*/
#if defined(OS_SOLARIS)
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include <stdlib.h>
#include <math.h>
#if defined(__cplusplus)
#include <ios>
#include <fstream>
#endif
#endif