diff --git a/src/types.hpp b/src/types.hpp index c3dca54a..529c9763 100644 --- a/src/types.hpp +++ b/src/types.hpp @@ -39,6 +39,12 @@ # include "exv_conf.h" #endif +#if defined(__MINGW32__) || defined(__MINGW64__) +# ifndef __MINGW__ +# define __MINGW__ +# endif +#endif + #include "version.hpp" // + standard includes @@ -68,6 +74,13 @@ typedef __int64 int64_t; # define EXV_WIDEN(t) L ## t #endif +#ifdef __MINGW__ +typedef unsigned char u_int8_t; +typedef unsigned short u_int16_t; +typedef unsigned int u_int32_t; +typedef unsigned long long u_int64_t; +#endif + /*! @brief Macro to make calls to member functions through a pointer more readable. See the C++ FAQ LITE, item diff --git a/src/version.cpp b/src/version.cpp index e820108f..a24f051f 100644 --- a/src/version.cpp +++ b/src/version.cpp @@ -37,12 +37,6 @@ EXIV2_RCSID("@(#) $Id$") # include "exv_conf.h" #endif -#if defined(__MINGW32__) || defined(__MINGW64__) -# ifndef __MINGW__ -# define __MINGW__ -# endif -#endif - #if defined(__CYGWIN__) || defined(__MINGW__) #include #endif @@ -240,7 +234,7 @@ EXIV2API void dumpLibraryInfo(std::ostream& os) struct lmap* pl; void* ph = dlopen(NULL, RTLD_NOW); struct something* p = (struct something*) ph; - + p = p->ptr; pl = (struct lmap*)p->ptr; @@ -267,7 +261,7 @@ EXIV2API void dumpLibraryInfo(std::ostream& os) for ( string_i lib = libs.begin()+1 ; lib != libs.end() ; lib++ ) os << "library=" << *lib << endl; } - + #if defined(__linux__) dlclose(ph); ph=NULL;