diff options
| author | Paul Eggert | 2019-05-08 08:37:40 -0700 |
|---|---|---|
| committer | Paul Eggert | 2019-05-08 08:38:15 -0700 |
| commit | caa28f031b65ff6512e777f8996d7f3c3144c17a (patch) | |
| tree | 971c5914bc1b6dc74d39a3e519c765e4e5a1a33e | |
| parent | 8b789755b45e6e10ed2809d7a7b89146b28452fc (diff) | |
| download | emacs-caa28f031b65ff6512e777f8996d7f3c3144c17a.tar.gz emacs-caa28f031b65ff6512e777f8996d7f3c3144c17a.zip | |
Port LIBRSVG_CHECK_VERSION fix to picky cpp
* src/image.c (LIBRSVG_CHECK_VERSION): Define to yield false
if it isn’t already defined.
(svg_load_image): Port to C preprocessors that check the
syntax of the entire preprocessing expression before
evaluating any of it.
| -rw-r--r-- | src/image.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/image.c b/src/image.c index 725eb4b8d09..e8cb4341773 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -9248,6 +9248,11 @@ svg_image_p (Lisp_Object object) | |||
| 9248 | 9248 | ||
| 9249 | # include <librsvg/rsvg.h> | 9249 | # include <librsvg/rsvg.h> |
| 9250 | 9250 | ||
| 9251 | /* librsvg is too old for us if it doesn't define this macro. */ | ||
| 9252 | # ifndef LIBRSVG_CHECK_VERSION | ||
| 9253 | # define LIBRSVG_CHECK_VERSION(v, w, x) false | ||
| 9254 | # endif | ||
| 9255 | |||
| 9251 | # ifdef WINDOWSNT | 9256 | # ifdef WINDOWSNT |
| 9252 | 9257 | ||
| 9253 | /* Restore the original definition of __MINGW_MAJOR_VERSION. */ | 9258 | /* Restore the original definition of __MINGW_MAJOR_VERSION. */ |
| @@ -9465,8 +9470,7 @@ svg_load_image (struct frame *f, struct image *img, char *contents, | |||
| 9465 | #if GNUC_PREREQ (4, 6, 0) | 9470 | #if GNUC_PREREQ (4, 6, 0) |
| 9466 | #pragma GCC diagnostic push | 9471 | #pragma GCC diagnostic push |
| 9467 | #endif | 9472 | #endif |
| 9468 | #if defined LIBRSVG_CHECK_VERSION && LIBRSVG_CHECK_VERSION (2, 45, 1) \ | 9473 | #if LIBRSVG_CHECK_VERSION (2, 45, 1) && GNUC_PREREQ (4, 2, 0) |
| 9469 | && GNUC_PREREQ (4, 2, 0) | ||
| 9470 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" | 9474 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
| 9471 | #endif | 9475 | #endif |
| 9472 | 9476 | ||