Author: al
Date: 2010-04-10 12:07:12 +0200 (Sat, 10 Apr 2010)
New Revision: 216
Modified:
RawSpeed/Camera.cpp
RawSpeed/CameraMetadataException.cpp
RawSpeed/Common.h
RawSpeed/FileIOException.cpp
RawSpeed/FileReader.cpp
RawSpeed/IOException.cpp
RawSpeed/RawDecoderException.cpp
RawSpeed/StdAfx.h
RawSpeed/TiffParserException.cpp
Log:
MinGW define fixes.
Modified: RawSpeed/Camera.cpp
===================================================================
--- RawSpeed/Camera.cpp 2010-04-09 18:28:50 UTC (rev 215)
+++ RawSpeed/Camera.cpp 2010-04-10 10:07:12 UTC (rev 216)
@@ -218,7 +218,7 @@
int Camera::StringToInt(const xmlChar *in, const xmlChar *tag, const char*
attribute) {
int i;
-#ifdef __unix__
+#if defined(__unix__) || defined(__MINGW32__)
if (EOF == sscanf((const char*)in, "%d", &i))
#else
if (EOF == sscanf_s((const char*)in, "%d", &i))
Modified: RawSpeed/CameraMetadataException.cpp
===================================================================
--- RawSpeed/CameraMetadataException.cpp 2010-04-09 18:28:50 UTC (rev
215)
+++ RawSpeed/CameraMetadataException.cpp 2010-04-10 10:07:12 UTC (rev
216)
@@ -28,7 +28,7 @@
va_list val;
va_start(val, fmt);
char buf[8192];
-#ifdef __unix__
+#if defined(__unix__) || defined(__MINGW32__)
vsnprintf(buf, 8192, fmt, val);
#else
vsprintf_s(buf, 8192, fmt, val);
Modified: RawSpeed/Common.h
===================================================================
--- RawSpeed/Common.h 2010-04-09 18:28:50 UTC (rev 215)
+++ RawSpeed/Common.h 2010-04-10 10:07:12 UTC (rev 216)
@@ -21,7 +21,7 @@
*/
#pragma once
-#ifndef __unix__
+#if !defined(__unix__) && !defined(__MINGW32__)
#include <intrin.h>
#pragma intrinsic(_ReturnAddress)
#define MIN(a,b) min(a,b)
@@ -49,7 +49,9 @@
#ifndef MAX
#define MAX(a, b) lmin(a,b)
#endif
+#ifndef __MINGW32__
typedef char* LPCWSTR;
+#endif
#endif // __unix__
namespace RawSpeed {
@@ -79,7 +81,7 @@
/* -------------------------------------------------------------------- */
-#ifndef __unix__
+#if !defined(__unix__) && !defined(__MINGW32__)
typedef bool gboolean;
typedef void* gpointer;
Modified: RawSpeed/FileIOException.cpp
===================================================================
--- RawSpeed/FileIOException.cpp 2010-04-09 18:28:50 UTC (rev 215)
+++ RawSpeed/FileIOException.cpp 2010-04-10 10:07:12 UTC (rev 216)
@@ -1,6 +1,6 @@
#include "StdAfx.h"
#include "FileIOException.h"
-#ifndef WIN32
+#if !defined(WIN32) || defined(__MINGW32__)
#include <stdarg.h>
#define vsprintf_s(...) vsnprintf(__VA_ARGS__)
#endif
Modified: RawSpeed/FileReader.cpp
===================================================================
--- RawSpeed/FileReader.cpp 2010-04-09 18:28:50 UTC (rev 215)
+++ RawSpeed/FileReader.cpp 2010-04-10 10:07:12 UTC (rev 216)
@@ -1,3 +1,7 @@
+#ifdef __MINGW32__
+#define UNICODE
+#define _WIN32_WINNT 0x0501
+#endif
#include "StdAfx.h"
#include "FileReader.h"
#ifdef __unix__
Modified: RawSpeed/IOException.cpp
===================================================================
--- RawSpeed/IOException.cpp 2010-04-09 18:28:50 UTC (rev 215)
+++ RawSpeed/IOException.cpp 2010-04-10 10:07:12 UTC (rev 216)
@@ -1,6 +1,6 @@
#include "StdAfx.h"
#include "IOException.h"
-#ifndef WIN32
+#if !defined(WIN32) || defined(__MINGW32__)
#include <stdarg.h>
#define vsprintf_s(...) vsnprintf(__VA_ARGS__)
#endif
Modified: RawSpeed/RawDecoderException.cpp
===================================================================
--- RawSpeed/RawDecoderException.cpp 2010-04-09 18:28:50 UTC (rev 215)
+++ RawSpeed/RawDecoderException.cpp 2010-04-10 10:07:12 UTC (rev 216)
@@ -1,6 +1,6 @@
#include "StdAfx.h"
#include "RawDecoderException.h"
-#ifndef WIN32
+#if !defined(WIN32) || defined(__MINGW32__)
#include <stdarg.h>
#define vsprintf_s(...) vsnprintf(__VA_ARGS__)
#endif
Modified: RawSpeed/StdAfx.h
===================================================================
--- RawSpeed/StdAfx.h 2010-04-09 18:28:50 UTC (rev 215)
+++ RawSpeed/StdAfx.h 2010-04-10 10:07:12 UTC (rev 216)
@@ -30,7 +30,9 @@
#include <tchar.h>
#include <io.h>
#include <Windows.h>
+#ifndef __MINGW32__
#include <crtdbg.h>
+#endif
#endif // __unix__
#include <malloc.h>
#include <math.h>
Modified: RawSpeed/TiffParserException.cpp
===================================================================
--- RawSpeed/TiffParserException.cpp 2010-04-09 18:28:50 UTC (rev 215)
+++ RawSpeed/TiffParserException.cpp 2010-04-10 10:07:12 UTC (rev 216)
@@ -1,6 +1,6 @@
#include "StdAfx.h"
#include "TiffParserException.h"
-#ifndef WIN32
+#if !defined(WIN32) || defined(__MINGW32__)
#include <stdarg.h>
#define vsprintf_s(...) vsnprintf(__VA_ARGS__)
#endif
_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit