Fix build under Cygwin

This commit is contained in:
Přemysl Eric Janouch 2023-07-07 12:00:54 +02:00
parent 92deba3890
commit ab75d2b61d
Signed by: p
GPG Key ID: A0420B94F92B9493
4 changed files with 13 additions and 3 deletions

View File

@ -17,9 +17,6 @@
#include "config.h" #include "config.h"
#include <math.h>
#include <pixman.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
#ifdef GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
#include <gdk/gdkx.h> #include <gdk/gdkx.h>
@ -27,6 +24,10 @@
#ifdef GDK_WINDOWING_QUARTZ #ifdef GDK_WINDOWING_QUARTZ
#include <gdk/gdkquartz.h> #include <gdk/gdkquartz.h>
#endif // GDK_WINDOWING_QUARTZ #endif // GDK_WINDOWING_QUARTZ
#include <pixman.h>
#include <math.h>
#include <stdlib.h>
#include "fiv-browser.h" #include "fiv-browser.h"
#include "fiv-collection.h" #include "fiv-collection.h"
@ -240,10 +241,12 @@ relayout(FivBrowser *self, int width)
pango_layout_set_wrap(label, PANGO_WRAP_WORD_CHAR); pango_layout_set_wrap(label, PANGO_WRAP_WORD_CHAR);
pango_layout_set_ellipsize(label, PANGO_ELLIPSIZE_END); pango_layout_set_ellipsize(label, PANGO_ELLIPSIZE_END);
#if PANGO_VERSION_CHECK(1, 44, 0)
PangoAttrList *attrs = pango_attr_list_new(); PangoAttrList *attrs = pango_attr_list_new();
pango_attr_list_insert(attrs, pango_attr_insert_hyphens_new(FALSE)); pango_attr_list_insert(attrs, pango_attr_insert_hyphens_new(FALSE));
pango_layout_set_attributes(label, attrs); pango_layout_set_attributes(label, attrs);
pango_attr_list_unref (attrs); pango_attr_list_unref (attrs);
#endif
} }
g_array_append_val(items, ((Item) { g_array_append_val(items, ((Item) {

View File

@ -18,6 +18,9 @@
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <turbojpeg.h> #include <turbojpeg.h>
#include <stdlib.h>
#include <string.h>
#include "config.h" #include "config.h"
// --- Utilities --------------------------------------------------------------- // --- Utilities ---------------------------------------------------------------

1
fiv.c
View File

@ -27,6 +27,7 @@
#include <stdarg.h> #include <stdarg.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h>
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
#include <io.h> #include <io.h>

3
xdg.c
View File

@ -17,6 +17,9 @@
#include <glib.h> #include <glib.h>
#include <stdlib.h>
#include <string.h>
/// Add `element` to the `output` set. `relation` is a map of sets of strings /// Add `element` to the `output` set. `relation` is a map of sets of strings
/// defining is-a relations, and is traversed recursively. /// defining is-a relations, and is traversed recursively.
static void static void