#1041. Finally fixed stdint.h on all platforms. CMake builds exiv2 with VS 2005, 2008, 2010, 2012, 2013 and 2013 on both laptop and buildserver.

v0.27.3
Robin Mills 10 years ago
parent c5136b444b
commit d6dd463c57

@ -33,7 +33,6 @@
// included header files
#include "config.h"
#include "version.hpp"
// + standard includes
@ -45,18 +44,15 @@
#include <sstream>
#ifdef _MSC_VER
// Allow him to use Microsoft's stdint.h for 2015 and up
# if _MSC_VER >= 1900
// Don't assume the value of EXV_HAVE_STDINT_H in exv_msvc.h has been set correctly
# ifdef EXV_HAVE_STDINT_H
# undef EXV_HAVE_STDINT_H
# endif
# endif
#endif
#ifdef EXV_HAVE_STDINT_H
// Visual Studio 2010 and later has stdint.h
# if _MSC_VER >= _MSC_VER_2010
# include <stdint.h>
#elif defined(_MSC_VER)
// MSVC (before 2010) doesn't provide C99 types, but it has MS specific variants
# else
// Earlier compilers have MS C99 equivalents such as __int8
typedef unsigned __int8 uint8_t;
typedef unsigned __int16 uint16_t;
typedef unsigned __int32 uint32_t;
@ -66,6 +62,11 @@ typedef __int16 int16_t;
typedef __int32 int32_t;
typedef __int64 int64_t;
# endif
#endif
#ifdef EXV_HAVE_STDINT_H
# include <stdint.h>
#endif
// MSVC macro to convert a string to a wide string
#ifdef EXV_UNICODE_PATH

@ -26,16 +26,17 @@
#include <sys/types.h>
#ifdef _MSC_VER
// _MSC_VER 1600 == Visual Studio 2010
# if _MSC_VER < 1600
# ifdef EXV_HAVE_STDINT_H
# undef EXV_HAVE_STDINT_H
# endif
# endif
#endif
#ifdef EXV_HAVE_STDINT_H
# include <stdint.h>
#endif
#endif
/* MSVC doesn't provide C99 types, but it has MS specific variants */
#ifdef _MSC_VER

Loading…
Cancel
Save