PATCH: olepicture without libgif/libjpeg
Marcus Meissner
meissner at suse.de
Sun Jul 3 09:56:03 CDT 2005
Hi,
some confused users compile WINE without libgif or libjpeg
support.
Make sure the testcase works without this compiled in.
Changelog:
Make testcase work even if WINE is compiled without
JPEG or GIF support.
Index: dlls/oleaut32/tests/olepicture.c
===================================================================
RCS file: /home/wine/wine/dlls/oleaut32/tests/olepicture.c,v
retrieving revision 1.3
diff -u -r1.3 olepicture.c
--- dlls/oleaut32/tests/olepicture.c 27 Jun 2005 09:57:28 -0000 1.3
+++ dlls/oleaut32/tests/olepicture.c 3 Jul 2005 14:53:31 -0000
@@ -165,6 +165,19 @@
handle = 0;
hres = IPicture_get_Handle (pic, &handle);
+
+ /* NOTE: handle case where the user compiled without GIF or JPEG support */
+ if (hres == E_NOTIMPL) {
+ if ((imgdata[0] == 'G') || (imgdata[1] == 'I')) {
+ trace("compiled without libgif support.\n");
+ return;
+ }
+ if ((imgdata[0] == 0xff) || (imgdata[1] == 0xd8)) {
+ trace("compiled without libjpeg support.\n");
+ return;
+ }
+ }
+
ok(hres == S_OK,"IPicture_get_Handle does not return S_OK, but 0x%08lx\n", hres);
ok(handle != 0, "IPicture_get_Handle returns a NULL handle, but it should be non NULL\n");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20050703/d4deeacc/attachment.pgp
More information about the wine-patches
mailing list