Version 3.6.0.2, tag libreoffice-3.6.0.2
[LibreOffice.git] / gdk-pixbuf / gdk-pixbuf-2.23.0-win32.patch
bloba6f6a84d95ae0b48d3fe2e6f233389255ea76634
1 --- misc/gdk-pixbuf-2.23.0/config.h.win32 2011-03-24 04:59:07.000000000 +0100
2 +++ misc/build/gdk-pixbuf-2.23.0/config.h.win32 2011-03-22 01:58:24.296875000 +0100
3 @@ -1 +1,126 @@
4 -dummy
5 +/* config.h.in. Generated from configure.ac by autoheader. */
7 +/* Define to 1 if translation of program messages to the user's native
8 + language is requested. */
9 +#undef ENABLE_NLS
11 +/* Define if gio can sniff image data */
12 +#undef GDK_PIXBUF_USE_GIO_MIME
14 +/* The prefix for our gettext translation domains. */
15 +#define GETTEXT_PACKAGE "intl.dll"
17 +/* Define to 1 if you have the `bind_textdomain_codeset' function. */
18 +#undef HAVE_BIND_TEXTDOMAIN_CODESET
20 +/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
21 + CoreFoundation framework. */
22 +#undef HAVE_CFLOCALECOPYCURRENT
24 +/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
25 + the CoreFoundation framework. */
26 +#undef HAVE_CFPREFERENCESCOPYAPPVALUE
28 +/* Define if the GNU dcgettext() function is already present or preinstalled.
29 + */
30 +#undef HAVE_DCGETTEXT
32 +/* Define to 1 if you have the <dlfcn.h> header file. */
33 +#undef HAVE_DLFCN_H
35 +/* Define if the GNU gettext() function is already present or preinstalled. */
36 +#define HAVE_GETTEXT 1
38 +/* Define if you have the iconv() function and it works. */
39 +#define HAVE_ICONV 1
41 +/* Define to 1 if you have the <inttypes.h> header file. */
42 +#undef HAVE_INTTYPES_H
44 +/* Define to 1 if you have the <memory.h> header file. */
45 +#undef HAVE_MEMORY_H
47 +/* Define to 1 is libjpeg supports progressive JPEG */
48 +#define HAVE_PROGRESSIVE_JPEG 1
50 +/* Define to 1 if sigsetjmp is available */
51 +#undef HAVE_SIGSETJMP
53 +/* Define to 1 if you have the <stdint.h> header file. */
54 +#undef HAVE_STDINT_H
56 +/* Define to 1 if you have the <stdlib.h> header file. */
57 +#define HAVE_STDLIB_H 1
59 +/* Define to 1 if you have the <strings.h> header file. */
60 +#define HAVE_STRINGS_H 1
62 +/* Define to 1 if you have the <string.h> header file. */
63 +#undef HAVE_STRING_H
65 +/* Define to 1 if you have the <sys/stat.h> header file. */
66 +#undef HAVE_SYS_STAT_H
68 +/* Define to 1 if sys/sysinfo.h is available */
69 +#undef HAVE_SYS_SYSINFO_H
71 +/* Define to 1 if sys/systeminfo.h is available */
72 +#undef HAVE_SYS_SYSTEMINFO_H
74 +/* Define to 1 if you have the <sys/types.h> header file. */
75 +#undef HAVE_SYS_TYPES_H
77 +/* Define to 1 if you have the <unistd.h> header file. */
78 +#undef HAVE_UNISTD_H
80 +/* Define to the sub-directory in which libtool stores uninstalled libraries.
81 + */
82 +#undef LT_OBJDIR
84 +/* Define to 1 if your C compiler doesn't accept -c and -o together. */
85 +#undef NO_MINUS_C_MINUS_O
87 +/* Define to the address where bug reports for this package should be sent. */
88 +#undef PACKAGE_BUGREPORT
90 +/* Define to the full name of this package. */
91 +#undef PACKAGE_NAME
93 +/* Define to the full name and version of this package. */
94 +#undef PACKAGE_STRING
96 +/* Define to the one symbol short name of this package. */
97 +#undef PACKAGE_TARNAME
99 +/* Define to the home page for this package. */
100 +#undef PACKAGE_URL
102 +/* Define to the version of this package. */
103 +#undef PACKAGE_VERSION
105 +/* Define to 1 if you have the ANSI C header files. */
106 +#undef STDC_HEADERS
108 +/* Define to 1 if gmodule works and should be used */
109 +#undef USE_GMODULE
111 +/* Whether to load modules via .la files rather than directly */
112 +#undef USE_LA_MODULES
114 +/* Define to 1 if medialib is available and should be used */
115 +#undef USE_MEDIALIB
117 +/* Define to 1 if medialib 2.5 is available */
118 +#undef USE_MEDIALIB25
120 +/* Define to 1 if XXM is available and should be used */
121 +#undef USE_MMX
123 +/* Number of bits in a file offset, on hosts where this is settable. */
124 +#undef _FILE_OFFSET_BITS
126 +/* Define for large files, on AIX-style hosts. */
127 +#undef _LARGE_FILES
129 +/* Define to empty if `const' does not conform to ANSI C. */
130 +#undef const
131 --- misc/build/gdk-pixbuf-2.23.0/gdk-pixbuf/io-png.c
132 +++ misc/build/gdk-pixbuf-2.23.0/gdk-pixbuf/io-png.c
133 @@ -30,6 +30,10 @@
134 #include <pngstruct.h>
135 #include "gdk-pixbuf-private.h"
137 +#ifndef png_jmpbuf
138 +# define png_jmpbuf(png_ptr) ((png_ptr)->png_jmpbuf)
139 +#endif
143 static gboolean
144 @@ -183,7 +183,7 @@ png_simple_error_callback(png_structp png_save_ptr,
145 error_msg);
148 - longjmp (png_save_ptr->jmpbuf, 1);
149 + longjmp (png_jmpbuf (png_save_ptr), 1);
152 static void
153 @@ -287,7 +287,7 @@ gdk_pixbuf__png_image_load (FILE *f, GError **error)
154 return NULL;
157 - if (setjmp (png_ptr->jmpbuf)) {
158 + if (setjmp (png_jmpbuf (png_ptr))) {
159 g_free (rows);
161 if (pixbuf)
162 @@ -459,7 +459,7 @@ gdk_pixbuf__png_image_begin_load (GdkPixbufModuleSizeFunc size_func,
163 return NULL;
166 - if (setjmp (lc->png_read_ptr->jmpbuf)) {
167 + if (setjmp (png_jmpbuf (lc->png_read_ptr))) {
168 if (lc->png_info_ptr)
169 png_destroy_read_struct(&lc->png_read_ptr, NULL, NULL);
170 g_free(lc);
171 @@ -531,7 +531,7 @@ gdk_pixbuf__png_image_load_increment(gpointer context,
172 lc->error = error;
174 /* Invokes our callbacks as needed */
175 - if (setjmp (lc->png_read_ptr->jmpbuf)) {
176 + if (setjmp (png_jmpbuf (lc->png_read_ptr))) {
177 lc->error = NULL;
178 return FALSE;
179 } else {
180 @@ -769,7 +769,7 @@ png_error_callback(png_structp png_read_ptr,
181 error_msg);
184 - longjmp (png_read_ptr->jmpbuf, 1);
185 + longjmp (png_jmpbuf (png_read_ptr), 1);
188 static void
189 @@ -978,7 +978,7 @@ static gboolean real_save_png (GdkPixbuf *pixbuf,
190 success = FALSE;
191 goto cleanup;
193 - if (setjmp (png_ptr->jmpbuf)) {
194 + if (setjmp (png_jmpbuf (png_ptr))) {
195 success = FALSE;
196 goto cleanup;
199 --- misc/gdk-pixbuf-2.23.0/gdk-pixbuf/makefile.msc 2010-06-25 23:40:10.000000000 +0200
200 +++ misc/build/gdk-pixbuf-2.23.0/gdk-pixbuf/makefile.msc 2011-03-24 06:13:30.515625000 +0100
201 @@ -1,9 +1,19 @@
202 -TOP = ..\..
203 PRJ_TOP = ..
204 +GLIB_TOP =
205 PACKAGE = gdk_pixbuf
206 PKG_VER = $(GDK_PIXBUF_VER)
207 +GLIB_INC = -I$(OUTDIR)\inc\external\glib-2.0
208 +LIBPNG_INC = -I$(OUTDIR)\inc\external\libpng
209 +LIBJPEG_INC = -I$(OUTDIR)\inc\external\libjpeg
211 +INTL_LIB = $(OUTDIR)\lib\intl.lib
212 +GLIB_LIB = $(OUTDIR)\lib\glib-2.0.lib $(OUTDIR)\lib\gobject-2.0.lib $(OUTDIR)\lib\gmodule-2.0.lib $(OUTDIR)\lib\gio-2.0.lib $(OUTDIR)\lib\gthread-2.0.lib
213 +LIBJPEG_LIB = $(OUTDIR)\lib\jpeg.lib
214 +LIBPNG_LIB = $(OUTDIR)\lib\libpng.lib
215 +ZLIB_LIB = $(OUTDIR)\lib\zlib.lib
216 +GDIPLUS_LIB = gdiplus.lib
218 -!INCLUDE $(TOP)/glib/build/win32/make.msc
219 +!INCLUDE $(OUTDIR)\inc\external\glib-2.0\make.msc
221 !IFNDEF PERL
222 PERL = perl
223 @@ -13,22 +23,22 @@
225 # -DINCLUDE_gdiplus _replaces_ -DINCLUDE_bmp -DINCLUDE_gif -DINCLUDE_ico -DINCLUDE_jpeg -DINCLUDE_tiff
226 # but not yet -DINCLUDE_png
227 -##USEGDIP=1
228 +USEGDIP=1
229 # to get _working_ include modules we need respective defines ...
231 BUILT_IN_FORMATS = \
232 !IFDEF USEGDIP
233 -DINCLUDE_gdiplus \
234 !ELSE
235 - -DINCLUDE_bmp -DINCLUDE_gif -DINCLUDE_ico -DINCLUDE_jpeg -DINCLUDE_tiff \
236 + -DINCLUDE_bmp -DINCLUDE_gif -DINCLUDE_ico -DINCLUDE_jpeg \
237 !ENDIF
238 -DINCLUDE_png \
239 -DINCLUDE_xpm -DINCLUDE_wbmp \
240 -DINCLUDE_pnm -DINCLUDE_ras
242 -PKG_CFLAGS = -FImsvc_recommended_pragmas.h \
243 +PKG_CFLAGS = -FI$(PRJ_TOP)\msvc_recommended_pragmas.h \
244 !IFNDEF USEGDIP
245 - $(JPEG_CFLAGS) $(TIFF_CFLAGS) \
246 + $(JPEG_CFLAGS) \
247 !ENDIF
248 -I. -I.. $(GLIB_CFLAGS) \
249 $(BUILT_IN_FORMATS) \
250 @@ -39,13 +49,14 @@
251 -UUSE_GMODULE # use built-in
252 # -DUSE_GMODULE -DPIXBUF_LIBDIR=\".\"
254 -PKG_LINK = $(GLIB_LIBS) \
255 -!IFNDEF USEGDIP
256 - $(TIFF_LIBS) $(JPEG_LIBS) \
257 -!ENDIF
258 - $(PNG_LIBS) $(INTL_LIBS) \
259 - pixops\pixops.lib \
261 +PKG_LINK = $(INTL_LIB) \
262 + $(GLIB_LIB) \
263 + $(LIBPNG_LIB) \
264 + $(LIBJPEG_LIB) \
265 + $(ZLIB_LIB) \
266 + $(GDIPLUS_LIB) \
267 + pixops\pixops.lib
269 OBJECTS_NON_NATIVE = \
270 io-bmp.obj \
271 io-gif.obj \
272 @@ -95,13 +106,13 @@
273 gdk-pixbuf-transform.h
275 gdk-pixbuf-marshal.h: gdk-pixbuf-marshal.list
276 - ..\..\glib\gobject\glib-genmarshal --prefix=_gdk_pixbuf_marshal gdk-pixbuf-marshal.list --header >gdk-pixbuf-marshal.h
277 + $(OUTDIR)\bin\glib-genmarshal --prefix=_gdk_pixbuf_marshal gdk-pixbuf-marshal.list --header >gdk-pixbuf-marshal.h
279 gdk-pixbuf-marshal.c: gdk-pixbuf-marshal.h gdk-pixbuf-marshal.list
280 - ..\..\glib\gobject\glib-genmarshal --prefix=_gdk_pixbuf_marshal gdk-pixbuf-marshal.list --body >gdk-pixbuf-marshal.c
281 + $(OUTDIR)\bin\glib-genmarshal --prefix=_gdk_pixbuf_marshal gdk-pixbuf-marshal.list --body >gdk-pixbuf-marshal.c
283 -gdk-pixbuf-alias.h: gdk-pixbuf.symbols
284 - perl makegdkpixbufalias.pl < gdk-pixbuf.symbols > gdk-pixbuf-alias.h
285 +#gdk-pixbuf-alias.h: gdk-pixbuf.symbols
286 +# perl makegdkpixbufalias.pl < gdk-pixbuf.symbols > gdk-pixbuf-alias.h
288 gdk_pixbuf.def: gdk-pixbuf.symbols makefile.msc
289 echo EXPORTS > gdk_pixbuf.def
290 @@ -109,14 +120,15 @@
291 -DG_GNUC_MALLOC= -DG_GNUC_CONST= -DG_GNUC_NULL_TERMINATED= -DG_GNUC_NORETURN= -DG_GNUC_PRINTF=;G_GNUC_PRINTF \
292 gdk-pixbuf.symbols >> gdk_pixbuf.def
294 -gdk-pixbuf-aliasdef.c: gdk-pixbuf.symbols
295 - perl makegdkpixbufalias.pl -def < gdk-pixbuf.symbols > gdk-pixbuf-aliasdef.c
296 +#gdk-pixbuf-aliasdef.c: gdk-pixbuf.symbols
297 +# perl makegdkpixbufalias.pl -def < gdk-pixbuf.symbols > gdk-pixbuf-aliasdef.c
299 ## common stuff
301 INSTALL = copy
303 -CFLAGS = -I. -DHAVE_CONFIG_H
304 +CFLAGS = -I. $(SOLARINC) $(GLIB_INC) $(LIBPNG_INC) $(LIBJPEG_INC) \
305 + -DHAVE_CONFIG_H -DGDK_PIXBUF_LOCALEDIR="\"locale_dummy\""
307 sub-pixops :
308 cd pixops
309 @@ -126,19 +138,19 @@
310 ## targets
311 all : \
312 $(PRJ_TOP)\config.h \
313 - gdk-pixbuf-alias.h \
314 - gdk-pixbuf-aliasdef.c \
315 +# gdk-pixbuf-alias.h \
316 +# gdk-pixbuf-aliasdef.c \
317 gdk-pixbuf-marshal.h \
318 gdk-pixbuf-marshal.c \
319 sub-pixops \
320 lib$(PACKAGE)-$(PKG_VER)-0.dll \
321 - $(PACKAGE)-$(PKG_VER)s.lib \
322 + $(PACKAGE)-$(PKG_VER)s.lib
323 # make-inline-pixbuf.exe \
324 - gdk-pixbuf-csource.exe \
325 - test-gdk-pixbuf.exe
326 +# gdk-pixbuf-csource.exe \
327 +# test-gdk-pixbuf.exe
329 $(PACKAGE).res : $(PACKAGE).rc
330 - rc -DBUILDNUMBER=0 -r -fo $(PACKAGE).res $(PACKAGE).rc
331 + rc -I $(SOLARINCLUDES) -DBUILDNUMBER=0 -r -fo $(PACKAGE).res $(PACKAGE).rc
333 $(PACKAGE)-$(PKG_VER)s.lib : $(OBJECTS)
334 lib /out:$(PACKAGE)-$(PKG_VER)s.lib $(OBJECTS) pixops\pixops.lib
335 @@ -160,7 +172,7 @@
336 # gdk-pixbuf-enum-types.h
338 gdk-pixbuf-enum-types.h : $(gdk_pixbuf_headers) makefile.msc
339 - $(PERL) $(GLIB)\gobject\glib-mkenums \
340 + perl $(OUTDIR)\bin\glib-mkenums \
341 --fhead "#ifndef __GDK_PIXBUF__ENUM_TYPES_H__\n#define __GDK_PIXBUF_ENUM_TYPES_H__\n" \
342 --fprod "/* enumerations from \"@filename@\" */\n" \
343 --vhead "GType @enum_name@_get_type (void);\n#define GDK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
344 @@ -171,8 +183,8 @@
345 # gdk-pixbuf-enum-types.c
347 gdk-pixbuf-enum-types.c: $(gdk_pixbuf_headers) makefile.msc
348 - $(PERL) $(GLIB)\gobject\glib-mkenums \
349 - --fhead "#include <gdk-pixbuf/gdk-pixbuf.h>" \
350 + perl $(OUTDIR)\bin\glib-mkenums \
351 + --fhead "#include <gdk-pixbuf.h>" \
352 --fprod "\n/* enumerations from \"@filename@\" */" \
353 --vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {" \
354 --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
355 @@ -188,10 +200,10 @@
356 $(CC) $(CFLAGS) -GD -c $(PKG_CFLAGS) $<
358 clean::
359 - del config.h
360 - del gdk-pixbuf-marshal.h
361 - del gdk-pixbuf-marshal.c
362 - del gdk-pixbuf-alaias.h
363 + rm config.h
364 + rm gdk-pixbuf-marshal.h
365 + rm gdk-pixbuf-marshal.c
366 + rm gdk-pixbuf-alaias.h
370 --- misc/gdk-pixbuf-2.23.0/gdk-pixbuf/pixops/makefile.msc 2010-06-25 23:40:10.000000000 +0200
371 +++ misc/build/gdk-pixbuf-2.23.0/gdk-pixbuf/pixops/makefile.msc 2011-03-24 06:03:59.062500000 +0100
372 @@ -1,10 +1,11 @@
373 -TOP = ../../..
374 -PACKAGE = pixops
375 PRJ_TOP = ..\..
376 +PACKAGE = pixops
377 +GLIB_TOP =
378 +GLIB_INC = -I$(OUTDIR)\inc\external\glib-2.0
380 -!INCLUDE $(TOP)/glib/build/win32/make.msc
381 +!INCLUDE $(OUTDIR)\inc\external\glib-2.0\make.msc
383 -PKG_CFLAGS = -I.. $(GLIB_CFLAGS)
384 +PKG_CFLAGS = -I.. $(SOLARINC) $(GLIB_INC) $(GLIB_CFLAGS)
386 OBJECTS = \
387 pixops.obj \
388 @@ -50,16 +51,16 @@
389 $(CC) $(CFLAGS) -GD -c $(PKG_CFLAGS) $<
391 clean::
392 - del config.h
393 - del *.exe
394 - del *.obj
395 - del *.dll
396 - del *.lib
397 - del *.err
398 - del *.map
399 - del *.sym
400 - del *.exp
401 - del *.lk1
402 - del *.mk1
403 - del *.pdb
404 - del *.ilk
405 + rm config.h
406 + rm *.exe
407 + rm *.obj
408 + rm *.dll
409 + rm *.lib
410 + rm *.err
411 + rm *.map
412 + rm *.sym
413 + rm *.exp
414 + rm *.lk1
415 + rm *.mk1
416 + rm *.pdb
417 + rm *.ilk
418 --- misc/gdk-pixbuf-2.23.0/gdk-pixbuf/pixops/pixops.c 2010-06-25 23:40:10.000000000 +0200
419 +++ misc/build/gdk-pixbuf-2.23.0/gdk-pixbuf/pixops/pixops.c 2011-03-22 01:58:24.281250000 +0100
420 @@ -21,7 +21,7 @@
422 #include "config.h"
423 #include <math.h>
424 -#include <glib.h>
425 +#include <glib-2.0\glib.h>
427 #include "pixops.h"
428 #include "pixops-internal.h"
429 --- misc/gdk-pixbuf-2.23.0/msvc_recommended_pragmas.h 2011-03-24 04:59:07.625000000 +0100
430 +++ misc/build/gdk-pixbuf-2.23.0/msvc_recommended_pragmas.h 2011-03-22 01:58:24.359375000 +0100
431 @@ -1 +1,31 @@
432 -dummy
433 +#ifndef _MSC_VER
434 +#pragma error "This header is for Microsoft VC only."
435 +#endif /* _MSC_VER */
437 +/* Make MSVC more pedantic, this is a recommended pragma list
438 + * from _Win32_Programming_ by Rector and Newcomer.
439 + */
440 +#pragma warning(error:4002) /* too many actual parameters for macro */
441 +#pragma warning(error:4003) /* not enough actual parameters for macro */
442 +#pragma warning(1:4010) /* single-line comment contains line-continuation character */
443 +#pragma warning(error:4013) /* 'function' undefined; assuming extern returning int */
444 +#pragma warning(1:4016) /* no function return type; using int as default */
445 +#pragma warning(error:4020) /* too many actual parameters */
446 +#pragma warning(error:4021) /* too few actual parameters */
447 +#pragma warning(error:4027) /* function declared without formal parameter list */
448 +#pragma warning(error:4029) /* declared formal parameter list different from definition */
449 +#pragma warning(error:4033) /* 'function' must return a value */
450 +#pragma warning(error:4035) /* 'function' : no return value */
451 +#pragma warning(error:4045) /* array bounds overflow */
452 +#pragma warning(error:4047) /* different levels of indirection */
453 +#pragma warning(error:4049) /* terminating line number emission */
454 +#pragma warning(error:4053) /* An expression of type void was used as an operand */
455 +#pragma warning(error:4071) /* no function prototype given */
456 +#pragma warning(disable:4101) /* unreferenced local variable */
457 +#pragma warning(error:4150)
459 +#pragma warning(disable:4244) /* No possible loss of data warnings */
460 +#pragma warning(disable:4305) /* No truncation from int to char warnings */
462 +/* work around Microsoft's premature attempt to deprecate the C-Library */
463 +#pragma warning(disable:4996) /* This function or variable may be unsafe. */