win32: move some code into #ifdef G_OS_UNIX

Fix various bits of code/declarations that are only used by G_OS_UNIX
but were still visible to G_OS_WIN32.

https://bugzilla.gnome.org/show_bug.cgi?id=688109
This commit is contained in:
Dan Winship
2012-11-11 11:32:40 -05:00
parent 731b469908
commit f248c86b0a
4 changed files with 16 additions and 7 deletions

View File

@@ -193,22 +193,23 @@ mounts_changed (GUnixMountMonitor *mount_monitor,
gpointer user_data)
{
GLocalDirectoryMonitor *local_monitor = user_data;
#ifdef G_OS_UNIX
GUnixMountEntry *mount;
#endif
gboolean is_mounted;
GFile *file;
/* Emulate unmount detection */
#ifdef G_OS_WIN32
mount = NULL;
/*claim everything was mounted */
is_mounted = TRUE;
#else
#ifdef G_OS_UNIX
mount = g_unix_mount_at (local_monitor->dirname, NULL);
is_mounted = mount != NULL;
if (mount)
g_unix_mount_free (mount);
#else
/*claim everything was mounted */
is_mounted = TRUE;
#endif
if (local_monitor->was_mounted != is_mounted)