glib: Allow cross-building with native glib 2.24.
[minipack.git] / patches / gd / 0003-Avoid-conflit-between-libjpeg-and-windows-headers.patch
blob2283db9db13effd9cb2cff84e3d843c84594b6bb
1 From 600059ab3efa924b0a8f3753dce3da2ed0ab89b1 Mon Sep 17 00:00:00 2001
2 From: Cesar Strauss <cestrauss@gmail.com>
3 Date: Fri, 24 Oct 2008 20:12:22 -0200
4 Subject: [PATCH] Avoid conflit between libjpeg and windows headers.
6 ---
7 gdhelpers.h | 4 ++++
8 1 files changed, 4 insertions(+), 0 deletions(-)
10 diff --git a/gdhelpers.h b/gdhelpers.h
11 index 0c45ad3..6c4b52f 100644
12 --- a/gdhelpers.h
13 +++ b/gdhelpers.h
14 @@ -31,12 +31,16 @@ int overflow2(int a, int b);
16 #ifdef WIN32
17 /* 2.0.18: must include windows.h to get CRITICAL_SECTION. */
18 +#define INT32 INT32_W32
19 +#define boolean boolean_W32
20 #include <windows.h>
21 #define gdMutexDeclare(x) CRITICAL_SECTION x
22 #define gdMutexSetup(x) InitializeCriticalSection(&x)
23 #define gdMutexShutdown(x) DeleteCriticalSection(&x)
24 #define gdMutexLock(x) EnterCriticalSection(&x)
25 #define gdMutexUnlock(x) LeaveCriticalSection(&x)
26 +#undef INT32
27 +#undef boolean
28 #else
29 #ifdef HAVE_PTHREAD
30 #include <pthread.h>
31 --
32 1.5.4.3