1 Adjust source code to work with giflib 5.1x
3 From http://giflib.sourceforge.net/gif_lib.html: GIF file openers and
4 closers - DGifOpenFileName(), DGifOpenFileHandle(), DGifOpen(),
5 DGifClose(), EGifOpenFileName(), EGifOpenFileHandle(), EGifOpen(), and
6 EGifClose() - all now take a final integer address argument. If
7 non-null, this is used to pass back an error code when the function
11 http://commit.cvs.pld.groups.com.ru/332837-packagesevas_fix_building_with_giflib_51_rel_6
13 Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
15 diff -uNr evas-1.7.10.org/src/modules/loaders/gif/evas_image_load_gif.c evas-1.7.10/src/modules/loaders/gif/evas_image_load_gif.c
16 --- evas-1.7.10.org/src/modules/loaders/gif/evas_image_load_gif.c 2013-08-01 17:41:35.000000000 +0200
17 +++ evas-1.7.10/src/modules/loaders/gif/evas_image_load_gif.c 2015-01-26 19:44:20.132955194 +0100
23 + DGifCloseFile(gif, NULL);
24 for (i = 0; i < scale_h; i++)
28 if ((w < 1) || (h < 1) || (w > IMG_MAX_SIZE) || (h > IMG_MAX_SIZE) ||
32 + DGifCloseFile(gif, NULL);
33 if (IMG_TOO_BIG(w, h))
34 *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
37 if (DGifGetRecordType(gif, &rec) == GIF_ERROR)
39 /* PrintGifError(); */
41 + DGifCloseFile(gif, NULL);
42 *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
46 if (DGifGetImageDesc(gif) == GIF_ERROR)
48 /* PrintGifError(); */
50 + DGifCloseFile(gif, NULL);
51 *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
55 if (DGifGetCode(gif, &img_code, &img) == GIF_ERROR)
57 /* PrintGifError(); */
59 + DGifCloseFile(gif, NULL);
60 *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
68 + DGifCloseFile(gif, NULL);
69 *error = EVAS_LOAD_ERROR_NONE;
75 ie->frames = eina_list_append(ie->frames, frame);
77 + DGifCloseFile(gif, NULL);
82 *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
86 + DGifCloseFile(gif, NULL);
87 *error = EVAS_LOAD_ERROR_NONE;
92 } while (rec != TERMINATE_RECORD_TYPE);
95 + DGifCloseFile(gif, NULL);