From 42a7ee5c719a8dc7babe3eb4c92c73c9f141d28c Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Wed, 3 Nov 2021 16:16:28 +0900 Subject: [PATCH] * src/image.c: Fix building with giflib 4. --- src/image.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/image.c b/src/image.c index 2ec44584b66..102f3a1c3a0 100644 --- a/src/image.c +++ b/src/image.c @@ -8232,23 +8232,24 @@ gif_image_p (Lisp_Object object) # undef DrawText # endif -/* Giflib before 5.0 didn't define these macros (used only if HAVE_NTGUI). */ -# ifndef GIFLIB_MINOR -# define GIFLIB_MINOR 0 -# endif -# ifndef GIFLIB_RELEASE -# define GIFLIB_RELEASE 0 -# endif - # else /* HAVE_NTGUI */ # include # endif /* HAVE_NTGUI */ -/* Giflib before 5.0 didn't define these macros. */ +/* Giflib before 4.1.6 didn't define these macros. */ # ifndef GIFLIB_MAJOR # define GIFLIB_MAJOR 4 +# endif +# ifndef GIFLIB_MINOR +# define GIFLIB_MINOR 0 +# endif +# ifndef GIFLIB_RELEASE +# define GIFLIB_RELEASE 0 +# endif +/* Giflib before 5.0 didn't define these macros. */ +# if GIFLIB_MAJOR < 5 # define DISPOSAL_UNSPECIFIED 0 /* No disposal specified. */ # define DISPOSE_DO_NOT 1 /* Leave image in place. */ # define DISPOSE_BACKGROUND 2 /* Set area too background color. */ -- 2.39.5