[dia] Protect g_utime() with GLIB_CHECK_VERSION(2,18,0)
- From: Hans Breuer <hans src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [dia] Protect g_utime() with GLIB_CHECK_VERSION(2,18,0)
- Date: Sun, 11 Oct 2009 17:46:44 +0000 (UTC)
commit 94edb44d74c4209facf7557681029bf42359d5d4
Author: Hans Breuer <hans breuer org>
Date: Sun Oct 11 19:41:57 2009 +0200
Protect g_utime() with GLIB_CHECK_VERSION(2,18,0)
app/sheets_dialog_callbacks.c | 4 ++++
objects/Misc/diagram_as_object.c | 4 ++++
2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/app/sheets_dialog_callbacks.c b/app/sheets_dialog_callbacks.c
index 28d7259..7b5b532 100644
--- a/app/sheets_dialog_callbacks.c
+++ b/app/sheets_dialog_callbacks.c
@@ -1813,7 +1813,11 @@ touch_file(gchar *filename)
g_stat(filename, &stat_buf);
utim_buf.actime = stat_buf.st_atime;
utim_buf.modtime = time(NULL);
+#if GLIB_CHECK_VERSION(2,18,0)
g_utime(filename, &utim_buf);
+#else
+ utime(filename, &utim_buf);
+#endif
}
static gint
diff --git a/objects/Misc/diagram_as_object.c b/objects/Misc/diagram_as_object.c
index a70a4c0..9f55de5 100644
--- a/objects/Misc/diagram_as_object.c
+++ b/objects/Misc/diagram_as_object.c
@@ -225,7 +225,11 @@ _dae_update_data(DiagramAsElement *dae)
Element *elem = &dae->element;
if ( strlen(dae->filename)
+#if GLIB_CHECK_VERSION(2,18,0)
&& g_utime(dae->filename, &utbuf) == 0
+#else
+ && utime(dae->filename, &utbuf) == 0
+#endif
&& dae->mtime != utbuf.modtime) {
DiaImportFilter *inf;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]