From: YAMAMOTO Mitsuharu Date: Wed, 3 Nov 2021 07:16:28 +0000 (+0900) Subject: * src/image.c: Fix building with giflib 4. X-Git-Tag: emacs-29.0.90~3671^2~270 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=42a7ee5c719a8dc7babe3eb4c92c73c9f141d28c;p=emacs.git * src/image.c: Fix building with giflib 4. --- 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. */