1 // config.h 2 3 #pragma once 4 #ifndef _CONFIG_H_ 5 #define _CONFIG_H_ 6 7 ///// Start of Visual Studio Support ///// 8 #ifdef _MSC_VER 9 10 #define _MSC_VER_2015 1900 11 #define _MSC_VER_2013 1800 12 #define _MSC_VER_2012 1700 13 #define _MSC_VER_2010 1600 14 #define _MSC_VER_2008 1500 15 #define _MSC_VER_2005 1400 16 #define _MSC_VER_2003 1300 17 18 #if _MSC_VER >= _MSC_VER_2015 19 #define MSDEV_2015 1 20 #elif _MSC_VER >= _MSC_VER_2013 21 #define MSDEV_2013 1 22 #elif _MSC_VER >= _MSC_VER_2012 23 #define MSDEV_2012 1 24 #elif _MSC_VER >= _MSC_VER_2010 25 #define MSDEV_2010 1 26 #elif _MSC_VER >= _MSC_VER_2008 27 #define MSDEV_2008 1 28 #elif _MSC_VER >= _MSC_VER_2005 29 #define MSDEV_2005 1 30 #else 31 #define MSDEV_2003 1 32 #endif 33 34 // Constants required by Microsoft SDKs to define SHGetFolderPathA and others 35 36 #ifndef _WIN32_WINNT 37 // Visual Studio 2012 and earlier 38 # if _MSC_VER < 1800 39 # define _WIN32_WINNT 0x0501 40 # else 41 # define _WIN32_WINNT 0x0600 42 # endif 43 #endif 44 45 #if _MSC_VER >= _MSC_VER_2010 46 # define EXV_HAVE_STDINT_H 1 47 #else 48 # ifdef EXV_HAVE_STDINT_H 49 # undef EXV_HAVE_STDINT_H 50 # endif 51 #endif 52 53 #if _MSC_VER_ == _MSC_VER_2012 54 #define HAVE_NTOHLL 1 55 #endif 56 57 /* Disable warning 4251 from std templates about exporting interfaces */ 58 #ifdef EXV_HAVE_DLL 59 #pragma warning( disable : 4251 ) 60 #endif 61 62 /* Disable warnings about 'deprecated' standard functions */ 63 #if _MSC_VER >= _MSC_VER_2005 64 # pragma warning(disable : 4996) 65 #endif 66 67 /* On Microsoft compilers pid_t has to be set to int. */ 68 #ifndef HAVE_PID_T 69 typedef int pid_t; 70 #endif 71 72 /* Help out our buddy curl */ 73 #if !defined(EXV_HAVE_DLL) 74 # define CURL_STATICLIB 75 #endif 76 77 #endif // _MSC_VER 78 ///// End of Visual Studio Support ///// 79 80 ///// Include exv_platform.h file ///// 81 #ifdef _MSC_VER 82 # ifdef EXV_MSVC_CONFIGURE 83 # include "exv_msvc_configure.h" 84 # else 85 # include "exv_msvc.h" 86 # endif 87 #else 88 # include "include/exiv2/exv_conf.h" 89 #endif 90 //////////////////////////////////////// 91 92 ///// End symbol visibility ///////// 93 #if defined(__CYGWIN32__) && !defined(__CYGWIN__) 94 /* For backwards compatibility with Cygwin b19 and 95 earlier, we define __CYGWIN__ here, so that 96 we can rely on checking just for that macro. */ 97 # define __CYGWIN__ __CYGWIN32__ 98 # define EXV_HAVE_GXXCLASSVISIBILITY 99 #endif 100 #ifdef WIN32 101 # define EXV_IMPORT __declspec(dllimport) 102 # define EXV_EXPORT __declspec(dllexport) 103 # define EXV_DLLLOCAL 104 # define EXV_DLLPUBLIC 105 #else 106 # ifdef EXV_WANT_VISIBILITY_SUPPORT 107 # if defined(__GNUC__) && (__GNUC__ >= 4) 108 # define EXV_IMPORT __attribute__ ((visibility("default"))) 109 # define EXV_EXPORT __attribute__ ((visibility("default"))) 110 # define EXV_DLLLOCAL __attribute__ ((visibility("hidden"))) 111 # define EXV_DLLPUBLIC __attribute__ ((visibility("default"))) 112 # elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) 113 # define EXV_IMPORT __global 114 # define EXV_EXPORT __global 115 # define EXV_DLLLOCAL __hidden 116 # define EXV_DLLPUBLIC __global 117 # else 118 # define EXV_IMPORT 119 # define EXV_EXPORT 120 # define EXV_DLLLOCAL 121 # define EXV_DLLPUBLIC 122 # endif 123 # else /* ! EXV_WANT_VISIBILITY_SUPPORT */ 124 # define EXV_IMPORT 125 # define EXV_EXPORT 126 # define EXV_DLLLOCAL 127 # define EXV_DLLPUBLIC 128 # endif /* ! EXV_WANT_VISIBILITY_SUPPORT */ 129 #endif /* ! WIN32 */ 130 131 /* Define EXIV2API for DLL builds */ 132 #ifdef EXV_HAVE_DLL 133 # ifdef EXV_BUILDING_LIB 134 # define EXIV2API EXV_EXPORT 135 # else 136 # define EXIV2API EXV_IMPORT 137 # endif /* ! EXV_BUILDING_LIB */ 138 #else 139 # define EXIV2API 140 #endif /* ! EXV_HAVE_DLL */ 141 142 ///// End symbol visibility ///////// 143 144 ///// Start of platform marcos ///////// 145 // Linux GCC 4.8 appears to be confused about strerror_r 146 #if !defined(EXV_STRERROR_R_CHAR_P) && defined( __gnu_linux__) && defined(__GLIBC__) 147 #define EXV_STRERROR_R_CHAR_P 148 #endif 149 150 #if defined(__MINGW32__) || defined(__MINGW64__) 151 # ifndef __MING__ 152 # define __MING__ 1 153 # endif 154 # ifndef __MINGW__ 155 # define __MINGW__ 1 156 # endif 157 // Don't know why MinGW refuses to link libregex 158 # ifdef EXV_HAVE_REGEX 159 # undef EXV_HAVE_REGEX 160 # endif 161 #ifdef EXV_UNICODE_PATH 162 #error EXV_UNICODE_PATH is not supported for MinGW builds 163 #endif 164 #endif 165 166 #ifndef __CYGWIN__ 167 # if defined(__CYGWIN32__) || defined(__CYGWIN64__) 168 # define __CYGWIN__ 1 169 # endif 170 #endif 171 172 #ifndef __LITTLE_ENDIAN__ 173 # if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) 174 # if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ 175 # define __LITTLE_ENDIAN__ 1 176 # endif 177 # endif 178 #endif 179 180 #ifndef __LITTLE_ENDIAN__ 181 # if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW__) 182 # define __LITTLE_ENDIAN__ 1 183 # endif 184 #endif 185 186 /* 187 If you're using Solaris and the Solaris Studio compiler 188 you must -library=stdcxx4 along with these inclusions below 189 */ 190 #if defined(OS_SOLARIS) 191 # include <string.h> 192 # include <strings.h> 193 # include <math.h> 194 # if defined(__cplusplus) 195 # include <ios> 196 # include <fstream> 197 # endif 198 #endif 199 ///// End of platform marcos ///////// 200 201 ///// Path separator marcos ///// 202 #ifndef EXV_SEPARATOR_STR 203 # if defined(WIN32) && !defined(__CYGWIN__) 204 # define EXV_SEPARATOR_STR "\\" 205 # define EXV_SEPARATOR_CHR '\\' 206 # else 207 # define EXV_SEPARATOR_STR "/" 208 # define EXV_SEPARATOR_CHR '/' 209 # endif 210 #endif 211 ////////////////////////////////////// 212 213 214 # include <stdio.h> 215 #ifdef EXV_HAVE_UNISTD_H 216 #include <unistd.h> 217 #endif 218 #ifdef __cplusplus 219 #include <string> 220 #include <iostream> 221 #endif 222 223 // 224 // That's all Folks! 225 #endif // _CONFIG_H_ 226