#1126 Fixes submitted for msvc2003

v0.27.3
Robin Mills 9 years ago
parent 77f5549408
commit b46cac7790

@ -1,6 +1,7 @@
/**/ /**/
/* exv_msvc.h */ /* exv_msvc.h */
#pragma once
#ifndef _EXV_MSVC_H_ #ifndef _EXV_MSVC_H_
#define _EXV_MSVC_H_ #define _EXV_MSVC_H_
@ -50,7 +51,8 @@
#endif /* !EXV_COMMERCIAL_VERSION */ #endif /* !EXV_COMMERCIAL_VERSION */
/* Define Windows unicode path support. */ /* Define Windows unicode path support. */
/* #define EXV_UNICODE_PATH 1 */ /* #undef EXV_UNICODE_PATH */
/* Define to `const' or to empty, depending on the second argument of `iconv'. */ /* Define to `const' or to empty, depending on the second argument of `iconv'. */
/* #undef ICONV_ACCEPTS_CONST_INPUT */ /* #undef ICONV_ACCEPTS_CONST_INPUT */
@ -141,7 +143,7 @@
#define EXV_HAVE_LIBZ 1 #define EXV_HAVE_LIBZ 1
#if defined(_MSC_VER) && HAVE_LIBZ #if defined(_MSC_VER) && HAVE_LIBZ
#if (_MSC_VER < 1400) && !defined(vsnprintf) #if (_MSC_VER < 1400)// && !defined(vsnprintf)
#define vsnprintf _vsnprintf #define vsnprintf _vsnprintf
#endif #endif
#endif #endif
@ -201,9 +203,6 @@
/* Define to rpl_malloc if the replacement function should be used. */ /* Define to rpl_malloc if the replacement function should be used. */
/* #undef malloc */ /* #undef malloc */
/* Define to `int' if <sys/types.h> does not define. */
/* #undef HAVE_PID_T */
/* On Microsoft compilers pid_t has to be set to int. */ /* On Microsoft compilers pid_t has to be set to int. */
#ifndef HAVE_PID_T #ifndef HAVE_PID_T
typedef int pid_t; typedef int pid_t;
@ -215,5 +214,4 @@ typedef int pid_t;
/* Define to `unsigned' if <sys/types.h> does not define. */ /* Define to `unsigned' if <sys/types.h> does not define. */
/* #undef size_t */ /* #undef size_t */
#endif // _EXV_CONF_H_
#endif

@ -117,7 +117,12 @@ namespace Exiv2 {
bool tryenter() bool tryenter()
{ {
#ifdef MSDEV_2003
EnterCriticalSection(&lock_);
return true;
#else
return 0 != TryEnterCriticalSection(&lock_); return 0 != TryEnterCriticalSection(&lock_);
#endif
} }
private: private:

File diff suppressed because one or more lines are too long

@ -291,6 +291,9 @@ copy/y ..\..\..\zlib-1.2.3\projects\visualc6\Win32_DLL_Release\zlib1.dll $(OutDi
<File <File
RelativePath="..\..\src\image.cpp"> RelativePath="..\..\src\image.cpp">
</File> </File>
<File
RelativePath="..\..\src\ini.cpp">
</File>
<File <File
RelativePath="..\..\src\iptc.cpp"> RelativePath="..\..\src\iptc.cpp">
</File> </File>
@ -402,6 +405,9 @@ copy/y ..\..\..\zlib-1.2.3\projects\visualc6\Win32_DLL_Release\zlib1.dll $(OutDi
<File <File
RelativePath="..\..\src\version.cpp"> RelativePath="..\..\src\version.cpp">
</File> </File>
<File
RelativePath="..\..\src\webpimage.cpp">
</File>
<File <File
RelativePath="..\..\src\xmp.cpp"> RelativePath="..\..\src\xmp.cpp">
</File> </File>
@ -458,6 +464,9 @@ copy/y ..\..\..\zlib-1.2.3\projects\visualc6\Win32_DLL_Release\zlib1.dll $(OutDi
<File <File
RelativePath="..\..\include\exiv2\image.hpp"> RelativePath="..\..\include\exiv2\image.hpp">
</File> </File>
<File
RelativePath="..\..\src\ini_int.hpp">
</File>
<File <File
RelativePath="..\..\include\exiv2\iptc.hpp"> RelativePath="..\..\include\exiv2\iptc.hpp">
</File> </File>

@ -1151,7 +1151,7 @@ namespace {
} }
int num = 0; int num = 0;
std::string line; std::string line;
while (std::getline(bStdin? std::cin : file, line)) { while (bStdin?std::getline(std::cin, line):std::getline(file, line)) {
ModifyCmd modifyCmd; ModifyCmd modifyCmd;
if (parseLine(modifyCmd, line, ++num)) { if (parseLine(modifyCmd, line, ++num)) {
modifyCmds.push_back(modifyCmd); modifyCmds.push_back(modifyCmd);

@ -599,6 +599,11 @@ namespace Exiv2 {
namespace Exiv2 { namespace Exiv2 {
namespace Internal { namespace Internal {
#ifdef MSDEV_2003
#undef vsnprintf
#define vsnprintf _vsnprintf
#endif
std::string stringFormat(const char* format, ...) std::string stringFormat(const char* format, ...)
{ {
std::string result; std::string result;

Loading…
Cancel
Save