[gnome-desktop] Pull in libgsystem, use it to read thumbnails with O_NOATIME
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-desktop] Pull in libgsystem, use it to read thumbnails with O_NOATIME
- Date: Wed, 15 Aug 2012 15:26:49 +0000 (UTC)
commit 177090152ee90742b924ca00a18ded1bf1c3681f
Author: Colin Walters <walters verbum org>
Date: Fri Aug 10 17:26:33 2012 -0400
Pull in libgsystem, use it to read thumbnails with O_NOATIME
We can use libgsystem since we don't need to care about MSVC here.
https://bugzilla.gnome.org/show_bug.cgi?id=680326
autogen.sh | 7 +++++++
libgnome-desktop/Makefile.am | 8 ++++++++
libgnome-desktop/gnome-desktop-thumbnail.c | 3 ++-
3 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index 4300767..9b115f8 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -27,4 +27,11 @@ if test ! -f libgnome-desktop/pnp.ids; then
touch libgnome-desktop/pnp.ids
fi
+# Fetch submodules if needed
+if test ! -f libgnome-desktop/libgsystem/README; then
+ echo "+ Setting up submodules"
+ git submodule init
+ git submodule update
+fi
+
. gnome-autogen.sh
diff --git a/libgnome-desktop/Makefile.am b/libgnome-desktop/Makefile.am
index f8e3078..0ab7a5b 100644
--- a/libgnome-desktop/Makefile.am
+++ b/libgnome-desktop/Makefile.am
@@ -1,9 +1,11 @@
CLEANFILES =
+noinst_LTLIBRARIES =
lib_LTLIBRARIES = libgnome-desktop-3.la
AM_CPPFLAGS = \
-I$(top_srcdir) \
+ -I$(srcdir)/libgsystem \
$(GNOME_DESKTOP_CFLAGS) \
$(XLIB_CFLAGS) \
-DG_LOG_DOMAIN=\"GnomeDesktop\" \
@@ -14,6 +16,11 @@ AM_CPPFLAGS = \
AM_CFLAGS = $(WARN_CFLAGS)
+libgsystem_srcpath := libgsystem
+libgsystem_cflags = $(GNOME_DESKTOP_CFLAGS)
+libgsystem_libs = $(GNOME_DESKTOP_LIBS)
+include libgsystem/Makefile-libgsystem.am
+
introspection_sources = \
gnome-desktop-utils.c \
gnome-desktop-thumbnail.c \
@@ -42,6 +49,7 @@ libgnome_desktop_3_la_LIBADD = \
$(XLIB_LIBS) \
$(LIBM) \
$(GNOME_DESKTOP_LIBS) \
+ libgsystem.la \
-lrt
libgnome_desktop_3_la_LDFLAGS = \
diff --git a/libgnome-desktop/gnome-desktop-thumbnail.c b/libgnome-desktop/gnome-desktop-thumbnail.c
index 310b0a3..039f7f2 100644
--- a/libgnome-desktop/gnome-desktop-thumbnail.c
+++ b/libgnome-desktop/gnome-desktop-thumbnail.c
@@ -43,6 +43,7 @@
#define GNOME_DESKTOP_USE_UNSTABLE_API
#include "gnome-desktop-thumbnail.h"
#include <glib/gstdio.h>
+#include <libgsystem.h>
#define SECONDS_BETWEEN_STATS 10
@@ -344,7 +345,7 @@ _gdk_pixbuf_new_from_uri_at_scale (const char *uri,
}
if (input_stream == NULL) {
- input_stream = G_INPUT_STREAM (g_file_read (file, NULL, NULL));
+ input_stream = gs_file_read_noatime (file, NULL, NULL);
if (input_stream == NULL) {
g_object_unref (file);
return NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]