[gegl] Define fsync to _commit on the Windows platform
- From: Michael Schumacher <schumaml src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] Define fsync to _commit on the Windows platform
- Date: Mon, 20 Jun 2011 21:21:11 +0000 (UTC)
commit e14974c1c2a3d71c8187863029d738608bf88691
Author: Michael Schumacher <schumaml gmx de>
Date: Mon Jun 20 23:12:50 2011 +0200
Define fsync to _commit on the Windows platform
configure.ac | 5 +++++
gegl/buffer/gegl-tile-backend-file.c | 8 ++++++++
2 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 9d4eaee..63cdd02 100644
--- a/configure.ac
+++ b/configure.ac
@@ -399,6 +399,11 @@ CFLAGS="$CFLAGS $MMX_EXTRA_CFLAGS $SSE_EXTRA_CFLAGS"
########################
GOBJECT_INTROSPECTION_CHECK([0.6.7])
+########################
+# Check for fsync
+########################
+AC_CHECK_FUNCS(fsync)
+
###############################
# Checks for required libraries
###############################
diff --git a/gegl/buffer/gegl-tile-backend-file.c b/gegl/buffer/gegl-tile-backend-file.c
index 294949a..75c4fef 100644
--- a/gegl/buffer/gegl-tile-backend-file.c
+++ b/gegl/buffer/gegl-tile-backend-file.c
@@ -38,6 +38,14 @@
//#include "gegl-types-internal.h"
+#ifndef HAVE_FSYNC
+
+#ifdef G_OS_WIN32
+#define fsync _commit
+#endif
+
+#endif
+
struct _GeglTileBackendFile
{
GeglTileBackend parent_instance;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]