From 98ffc909aeff56ba73f2475ab9a6f40c665bdc95 Mon Sep 17 00:00:00 2001 From: Sebastien Pouliot Date: Thu, 21 Jun 2007 13:03:59 +0000 Subject: [PATCH] 2007-06-21 Sebastien Pouliot * codecs.h, GdiPlusFlat.h, image.h, dstream.c: Fix #81845 to allow using with C++ compilers and -Werror. Patch by Yves Bastide. svn path=/trunk/libgdiplus/; revision=80461 --- src/ChangeLog | 5 +++++ src/GdiPlusFlat.h | 16 ++++++++++++++++ src/codecs.h | 2 +- src/dstream.c | 2 +- src/image.h | 1 - 5 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 779f23e78..84a8aceee 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2007-06-21 Sebastien Pouliot + + * codecs.h, GdiPlusFlat.h, image.h, dstream.c: Fix #81845 to allow + using with C++ compilers and -Werror. Patch by Yves Bastide. + 2007-06-21 Sebastien Pouliot * graphics.h: Add missing GdipGetClip prototype. Fix #81844. Patch by diff --git a/src/GdiPlusFlat.h b/src/GdiPlusFlat.h index 0fe6c4553..770bb377f 100644 --- a/src/GdiPlusFlat.h +++ b/src/GdiPlusFlat.h @@ -28,6 +28,11 @@ #ifndef _FLATAPI_H #define _FLATAPI_H +#ifdef __cplusplus +extern "C" +{ +#endif + /* * If you ever need a workaround specific to libgdiplus then use the following define */ @@ -74,11 +79,17 @@ typedef struct { UINT Width; UINT Height; INT Stride; + /* C++ compilers should need '::' (and GCC does) */ +#ifdef __cplusplus + ::PixelFormat PixelFormat; +#else PixelFormat PixelFormat; +#endif VOID *Scan0; UINT *Reserved; } BitmapData; +#include "general.h" #include "adjustablearrowcap.h" #include "bitmap.h" #include "brush.h" @@ -89,6 +100,7 @@ typedef struct { #include "graphics.h" #include "graphics-path.h" #include "hatchbrush.h" +#include "image.h" #include "imageattributes.h" #include "pen.h" #include "matrix.h" @@ -97,4 +109,8 @@ typedef struct { #include "stringformat.h" #include "text.h" +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/codecs.h b/src/codecs.h index baa07d1db..c1b451c41 100644 --- a/src/codecs.h +++ b/src/codecs.h @@ -33,8 +33,8 @@ #ifndef __CODECS_H__ #define __CODECS_H__ -#include "gdipenums.h" #include "win32structs.h" +#include "gdipenums.h" typedef struct { GUID Guid; diff --git a/src/dstream.c b/src/dstream.c index 09359af99..c17a0c476 100644 --- a/src/dstream.c +++ b/src/dstream.c @@ -18,8 +18,8 @@ * */ -#include "dstream.h" #include "gdiplus-private.h" +#include "dstream.h" struct _dstream_pvt { GetBytesDelegate read; diff --git a/src/image.h b/src/image.h index 87f9492b6..1ff136c7d 100644 --- a/src/image.h +++ b/src/image.h @@ -31,7 +31,6 @@ #ifndef __IMAGE_H__ #define __IMAGE_H__ -#include "gdiplus-private.h" #include "codecs.h" /*