if (fputs (content, file) == EOF)
return FALSE;
+#ifndef G_OS_WIN32
fsync (fd);
+#endif
rewind (file);
return TRUE;
static gboolean
egg_recent_model_lock_file (FILE *file)
{
+#ifdef F_TLOCK
int fd;
gint try = 5;
}
return FALSE;
+#else
+ return TRUE;
+#endif
}
static gboolean
egg_recent_model_unlock_file (FILE *file)
{
+#ifdef F_TLOCK
int fd;
rewind (file);
fd = fileno (file);
return (lockf (fd, F_ULOCK, 0) == 0) ? TRUE : FALSE;
+#else
+ return TRUE;
+#endif
}
static void