From 9a24fbe4746497c8ba6b7fbd5ed7841a8fc9c9f9 Mon Sep 17 00:00:00 2001 From: Erik van Pienbroek Date: Fri, 3 Jun 2011 20:57:30 +0200 Subject: [PATCH] Fix a conflict between w32api's basetsd.h and jmorecfg.h There's a conflict between basetsd.h (w32api) and jmorecfg.h Both contain a definition for the data type INT32, but they're different from each other (signed int vs. long). Added a patch which makes the library use the data type signed int for INT32 --- libjpeg-turbo-dont-conflict-with-basetsd-h.diff | 16 ++++++++++++++++ mingw-libjpeg-turbo.spec | 13 ++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 libjpeg-turbo-dont-conflict-with-basetsd-h.diff diff --git a/libjpeg-turbo-dont-conflict-with-basetsd-h.diff b/libjpeg-turbo-dont-conflict-with-basetsd-h.diff new file mode 100644 index 0000000..4b84f77 --- /dev/null +++ b/libjpeg-turbo-dont-conflict-with-basetsd-h.diff @@ -0,0 +1,16 @@ +--- win/jconfig.h.in.orig 2011-06-03 20:17:01.918582804 +0200 ++++ win/jconfig.h.in 2011-06-03 20:19:23.622100937 +0200 +@@ -25,7 +25,14 @@ + #endif + #define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ + ++/* Define "INT32" as int, not long, per Windows custom */ ++#ifndef _BASETSD_H_ /* don't conflict if basetsd.h already read */ ++typedef short INT16; ++typedef signed int INT32; ++#endif ++#define XMD_H /* prevent jmorecfg.h from redefining it */ ++ + #define inline __inline + + #ifdef JPEG_INTERNALS diff --git a/mingw-libjpeg-turbo.spec b/mingw-libjpeg-turbo.spec index 8aa2d49..fa6147f 100644 --- a/mingw-libjpeg-turbo.spec +++ b/mingw-libjpeg-turbo.spec @@ -8,7 +8,7 @@ Name: mingw-libjpeg-turbo Version: 1.1.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: MinGW Windows Libjpeg-turbo library License: wxWidgets @@ -16,6 +16,12 @@ URL: http://libjpeg-turbo.virtualgl.org/ Group: Development/Libraries Source0: http://downloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-%{version}.tar.gz +# There's a conflict between basetsd.h (w32api) and jmorecfg.h +# Both contain a definition for the data type INT32, but they're +# different from each other (signed int vs. long) +# This patch makes the library use the data type signed int for INT32 +Patch0: libjpeg-turbo-dont-conflict-with-basetsd-h.diff + BuildArch: noarch BuildRequires: mingw32-filesystem >= 68 @@ -55,6 +61,7 @@ Static version of the MinGW Windows cross compiled Libjpeg-turbo library. %prep %setup -q -n libjpeg-turbo-%{version} +%patch0 -p0 %build @@ -101,6 +108,10 @@ chmod -x README-turbo.txt %changelog +* Fri Jun 3 2011 Erik van Pienbroek - 1.1.1-4 +- Fix a conflict between w32api's basetsd.h and jmorecfg.h (conflicting + declarations for INT32) + * Thu Jun 2 2011 Erik van Pienbroek - 1.1.1-3 - Moved the obsoletes/provides to the right location - Bundle the licence and other %%doc's