Use #if instead of #ifdef

This commit is contained in:
emersion 2018-11-18 00:33:06 +01:00
parent eda3bfeed5
commit cad851805b
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
23 changed files with 85 additions and 85 deletions

View file

@ -1,7 +1,7 @@
#include <stdint.h>
#include <cairo/cairo.h>
#include "cairo.h"
#ifdef HAVE_GDK_PIXBUF
#if HAVE_GDK_PIXBUF
#include <gdk-pixbuf/gdk-pixbuf.h>
#endif
@ -46,7 +46,7 @@ cairo_surface_t *cairo_image_surface_scale(cairo_surface_t *image,
return new;
}
#ifdef HAVE_GDK_PIXBUF
#if HAVE_GDK_PIXBUF
cairo_surface_t* gdk_cairo_image_surface_create_from_pixbuf(const GdkPixbuf *gdkbuf) {
int chan = gdk_pixbuf_get_n_channels(gdkbuf);
if (chan < 3) {
@ -140,4 +140,4 @@ cairo_surface_t* gdk_cairo_image_surface_create_from_pixbuf(const GdkPixbuf *gdk
cairo_surface_mark_dirty(cs);
return cs;
}
#endif //HAVE_GDK_PIXBUF
#endif // HAVE_GDK_PIXBUF