1 Adjust source code to work with giflib 5.1x
3 Downloaded patch for gif.c from
4 https://projects.archlinux.org/svntogit/community.git/plain/trunk/giflib-5.1.patch?h=packages/fbv
6 Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
8 diff -wbBur fbv-1.0b/gif.c fbv-1.0b.my/gif.c
9 --- fbv-1.0b/gif.c 2003-08-25 00:23:02.000000000 +0400
10 +++ fbv-1.0b.my/gif.c 2014-05-29 18:39:41.337332872 +0400
13 #define min(a,b) ((a) < (b) ? (a) : (b))
14 #define gflush return(FH_ERROR_FILE);
15 -#define grflush { DGifCloseFile(gft); return(FH_ERROR_FORMAT); }
16 -#define mgrflush { free(lb); free(slb); DGifCloseFile(gft); return(FH_ERROR_FORMAT); }
17 +#define grflush { DGifCloseFile(gft, NULL); return(FH_ERROR_FORMAT); }
18 +#define mgrflush { free(lb); free(slb); DGifCloseFile(gft, NULL); return(FH_ERROR_FORMAT); }
19 #define agflush return(FH_ERROR_FORMAT);
20 -#define agrflush { DGifCloseFile(gft); return(FH_ERROR_FORMAT); }
21 +#define agrflush { DGifCloseFile(gft, NULL); return(FH_ERROR_FORMAT); }
24 int fh_gif_id(char *name)
29 - gft=DGifOpenFileName(name);
30 + gft=DGifOpenFileName(name, NULL);
31 if(gft==NULL){printf("err5\n"); gflush;} //////////
37 while( rt!= TERMINATE_RECORD_TYPE );
39 + DGifCloseFile(gft, NULL);
47 - gft=DGifOpenFileName(name);
48 + gft=DGifOpenFileName(name, NULL);
57 + DGifCloseFile(gft, NULL);
60 case EXTENSION_RECORD_TYPE:
64 while( rt!= TERMINATE_RECORD_TYPE );
66 + DGifCloseFile(gft, NULL);
67 return(FH_ERROR_FORMAT);
70 diff -uNr fbv-1.0b.org/configure fbv-1.0b/configure
71 --- fbv-1.0b.org/configure 2004-09-07 13:29:27.000000000 +0200
72 +++ fbv-1.0b/configure 2015-01-29 19:58:30.374599874 +0100
75 echo "libungif check" >>./config.log
76 echo " 1st:" >>./config.log
77 -$CC 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -lungif $libs
78 +$CC 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -lgif $libs
79 if [ -e \$\$~test ]; then
80 - libs="-lungif $libs" ; ungif="yes"
81 + libs="-lgif $libs" ; ungif="yes"
83 echo " 2nd: -lX11 -L$xdir/lib" >>./config.log
84 $CC 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -lungif -lX11 -L$xdir/lib $libs