pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

modified: Makefile modified: buildlink3.mk renamed: patches/patch-ac -> patches/patch-Makefile.in renamed: patches/patch-aa -> patches/patch-src_gnome-mount-properties-view.c renamed: patches/patch-ab -> patches/patch-src_gnome-mount.c



Module Name:	pkgsrc-wip
Committed By:	sergio lenzi <nervoso%k1.com.br@localhost>
Pushed By:	lenzi.sergio
Date:		Tue Sep 29 17:36:18 2020 -0300
Changeset:	5c5d2bd22b61b10273834ea4c7898689b69aefe6

Modified Files:
	gnome-mount/Makefile
	gnome-mount/buildlink3.mk
Added Files:
	gnome-mount/patches/patch-Makefile.in
	gnome-mount/patches/patch-src_gnome-mount-properties-view.c
	gnome-mount/patches/patch-src_gnome-mount.c
Removed Files:
	gnome-mount/patches/patch-aa
	gnome-mount/patches/patch-ab
	gnome-mount/patches/patch-ac

Log Message:
	modified:   Makefile
	modified:   buildlink3.mk
	renamed:    patches/patch-ac -> patches/patch-Makefile.in
	renamed:    patches/patch-aa -> patches/patch-src_gnome-mount-properties-view.c
	renamed:    patches/patch-ab -> patches/patch-src_gnome-mount.c

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=5c5d2bd22b61b10273834ea4c7898689b69aefe6

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 gnome-mount/Makefile                               |   9 +-
 gnome-mount/buildlink3.mk                          |   1 -
 gnome-mount/patches/patch-Makefile.in              |  13 ++
 gnome-mount/patches/patch-aa                       | 122 -----------------
 gnome-mount/patches/patch-ab                       | 148 ---------------------
 gnome-mount/patches/patch-ac                       |  13 --
 .../patch-src_gnome-mount-properties-view.c        | 122 +++++++++++++++++
 gnome-mount/patches/patch-src_gnome-mount.c        | 143 ++++++++++++++++++++
 8 files changed, 282 insertions(+), 289 deletions(-)

diffs:
diff --git a/gnome-mount/Makefile b/gnome-mount/Makefile
index 94988ddb75..115f45bed7 100644
--- a/gnome-mount/Makefile
+++ b/gnome-mount/Makefile
@@ -3,12 +3,12 @@
 
 DISTNAME=		gnome-mount-0.8
 PKGREVISION=		37
-CATEGORIES?=		sysutils wip
+CATEGORIES?=		sysutils mate
 MASTER_SITES=		http://hal.freedesktop.org/releases/
 
-MAINTAINER=		nervoso%NetBSD.org@localhost
-HOMEPAGE=		http://hal.freedesktop.org/
-COMMENT=		Programs for mounting, unmounting and ejecting storage devices
+MAINTAINER=	nervoso%k1.com.br@localhost
+HOMEPAGE=	http://hal.freedesktop.org/
+COMMENT=	Programs for mounting, unmounting and ejecting storage devices
 
 GNU_CONFIGURE=		YES
 USE_PKGLOCALEDIR=	YES
@@ -27,7 +27,6 @@ post-extract:
 	${CP} ${FILESDIR}/gnome-mount.schemas.in.NetBSD ${WRKSRC}/gnome-mount.schemas.in
 .endif
 
-DEPENDS+=	gvfs>0:../../sysutils/gvfs
 
 .include "../../devel/GConf/schemas.mk"
 .include "../../devel/libglade/buildlink3.mk"
diff --git a/gnome-mount/buildlink3.mk b/gnome-mount/buildlink3.mk
index d2162980d4..899be794d8 100644
--- a/gnome-mount/buildlink3.mk
+++ b/gnome-mount/buildlink3.mk
@@ -25,7 +25,6 @@ BUILDLINK_PKGSRCDIR.gnome-mount?=	../../wip/gnome-mount
 # XXX buildlink3 lines below to dependencies, remove them.
 # XXX
 
-DEPENDS+=	gvfs>0:../../sysutils/gvfs
 
 .include "../../devel/libglade/buildlink3.mk"
 .include "../../wip/libgnome-keyring/buildlink3.mk"
diff --git a/gnome-mount/patches/patch-Makefile.in b/gnome-mount/patches/patch-Makefile.in
new file mode 100644
index 0000000000..3fc1459748
--- /dev/null
+++ b/gnome-mount/patches/patch-Makefile.in
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- Makefile.in.orig	2008-02-25 21:54:37.000000000 +0000
++++ Makefile.in
+@@ -248,7 +248,7 @@ target_alias = @target_alias@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ SUBDIRS = src po
+-schemadir = $(sysconfdir)/gconf/schemas
++schemadir = $(datadir)/gconf/schemas
+ schema_in_files = gnome-mount.schemas.in
+ schema_DATA = $(schema_in_files:.schemas.in=.schemas)
+ pkgconfigdir = $(libdir)/pkgconfig
diff --git a/gnome-mount/patches/patch-aa b/gnome-mount/patches/patch-aa
deleted file mode 100644
index 8905f2356c..0000000000
--- a/gnome-mount/patches/patch-aa
+++ /dev/null
@@ -1,122 +0,0 @@
-$NetBSD: patch-aa,v 1.2 2008/12/25 05:33:20 hasso Exp $
-
---- src/gnome-mount-properties-view.c.orig	2008-02-25 23:55:05 +0200
-+++ src/gnome-mount-properties-view.c	2008-12-24 22:38:36 +0200
-@@ -35,7 +35,7 @@
- #include <string.h>
- #include <gconf/gconf-client.h>
- 
--#ifdef __FreeBSD__
-+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
- #include <fstab.h>
- #include <sys/param.h>
- #include <sys/ucred.h>
-@@ -59,7 +59,31 @@ struct _GnomeMountPropertiesViewClass {
- 	GtkVBoxClass base_class;
- };
- 
--#ifdef __FreeBSD__
-+#ifdef __NetBSD__
-+static struct opt {
-+	int o_opt;
-+	const char *o_name;
-+} optnames[] = {
-+	{ MNT_ASYNC,		"async" },
-+	{ MNT_NOCOREDUMP,	"nocoredump" },
-+	{ MNT_NODEV,		"nodev" },
-+	{ MNT_NODEVMTIME,	"nodevmtime" },
-+	{ MNT_NOEXEC,		"noexec" },
-+	{ MNT_NOSUID,		"nosuid" },
-+	{ MNT_RDONLY,		"rdonly" },
-+	{ MNT_SYNCHRONOUS,	"sync" },
-+	{ MNT_UNION,		"union" },
-+	{ MNT_NOATIME,		"noatime" },
-+	{ MNT_SYMPERM,		"symperm" },
-+	{ MNT_SOFTDEP,		"softdep" },
-+#ifdef MNT_LOG
-+	{ MNT_LOG,		"log" },
-+#endif
-+	{ MNT_IGNORE,		"hidden" },
-+	{ 0, NULL }
-+};
-+#endif
-+#if defined(__FreeBSD__) || defined(__DragonFly__)
- static struct opt {
- 	int o_opt;
- 	const char *o_name;
-@@ -79,8 +103,12 @@ static struct opt {
- 	{ MNT_NOCLUSTERW,	"noclusterw" },
- 	{ MNT_SUIDDIR,		"suiddir" },
- 	{ MNT_SOFTDEP,		"soft-updates" },
-+#ifdef MNT_MULTILABEL
- 	{ MNT_MULTILABEL,	"multilabel" },
-+#endif
-+#ifdef MNT_ACLS
- 	{ MNT_ACLS,		"acls" },
-+#endif
- #ifdef MNT_GJOURNAL
- 	{ MNT_GJOURNAL,		"gjournal" },
- #endif
-@@ -337,7 +365,7 @@ populate_ui_from_gconf (GnomeMountProper
- 	g_object_unref (gconf_client);
- }
- 
--#ifdef __FreeBSD__
-+#if defined(__FreeBSD__) || defined(__DragonFly__)
- struct mtab_handle
- {
-   struct statfs	*mounts;
-@@ -345,6 +373,14 @@ struct mtab_handle
-   int		iter;
- };
- #endif
-+#ifdef __NetBSD__
-+struct mtab_handle
-+{
-+  struct statvfs *mounts;
-+  int		n_mounts;
-+  int		iter;
-+};
-+#endif
- 
- /* borrowed from gtk/gtkfilesystemunix.c in GTK+ on 02/23/2006 */
- static void
-@@ -454,7 +490,7 @@ out:
- static gboolean
- mtab_open (gpointer *handle)
- {
--#ifdef __FreeBSD__
-+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
- 	struct mtab_handle *mtab;
- 
- 	mtab = g_new0 (struct mtab_handle, 1);
-@@ -475,7 +511,7 @@ mtab_open (gpointer *handle)
- static gboolean
- mtab_next (gpointer handle, char **device_file, char **mount_options, char **mount_fstype)
- {
--#ifdef __FreeBSD__
-+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
- 	struct mtab_handle *mtab = handle;
- 
- 	if (mtab->iter < mtab->n_mounts) {
-@@ -484,7 +520,11 @@ mtab_next (gpointer handle, char **devic
- 		GString *optstr;
- 
- 		optstr = g_string_new("");
-+#if defined(__NetBSD__)
-+		flags = mtab->mounts[mtab->iter].f_flag & MNT_VISFLAGMASK;
-+#else
- 		flags = mtab->mounts[mtab->iter].f_flags & MNT_VISFLAGMASK;
-+#endif
- 
- 		for (o = optnames; flags && o->o_opt; o++) {
- 			if (flags & o->o_opt) {
-@@ -517,7 +557,7 @@ mtab_next (gpointer handle, char **devic
- static void
- mtab_close (gpointer handle)
- {
--#ifdef __FreeBSD__
-+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
- 	g_free (handle);
- #else
- 	fclose (handle);
diff --git a/gnome-mount/patches/patch-ab b/gnome-mount/patches/patch-ab
deleted file mode 100644
index c8cb6d7d21..0000000000
--- a/gnome-mount/patches/patch-ab
+++ /dev/null
@@ -1,148 +0,0 @@
-$NetBSD: patch-ab,v 1.4 2013/08/12 14:24:36 obache Exp $
-
-* XXX
-* gtk/gtk.h is not included from libnotify/notify.h of libnotify-0.7
-* XXX
-* libnotify-0.7 API change
-
---- src/gnome-mount.c.orig	2008-04-16 23:41:32.000000000 +0000
-+++ src/gnome-mount.c
-@@ -30,6 +30,7 @@
- #include <fcntl.h>
- #include <string.h>
- #include <stdlib.h>
-+#include <locale.h>
- 
- #include <dbus/dbus.h>
- #include <dbus/dbus-glib-lowlevel.h>
-@@ -39,6 +40,7 @@
- #include <glib/gi18n.h>
- #include <gconf/gconf-client.h>
- #include <gdk/gdkx.h>
-+#include <gtk/gtk.h>
- #include "copy-paste/gnome-password-dialog.h"
- #include <gnome-keyring.h>
- #include <libnotify/notify.h>
-@@ -51,9 +53,9 @@
- #define NOTIFY_EXPIRES_DEFAULT -1
- #endif
- 
--#if !defined(sun) && !defined(__FreeBSD__)
-+#if !defined(sun) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__)
- #include <mntent.h>
--#elif defined(__FreeBSD__)
-+#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
- #include <fstab.h>
- #include <sys/param.h>
- #include <sys/ucred.h>
-@@ -677,15 +679,19 @@ static char *
- get_mntent_mount_point(const char *device_file)
- {
- 	char *mount_point;
--#if! defined(sun) && !defined(__FreeBSD__)
-+#if! defined(sun) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__)
- 	FILE *f;
- 	struct mntent mnt;
- 	struct mntent *mnte;
- 	char buf[512];
--#elif defined(__FreeBSD__)
-+#elif defined(__FreeBSD__) || defined(__DragonFly__)
- 	struct statfs *mounts;
- 	int n_mounts;
- 	int i;
-+#elif defined(__NetBSD__)
-+	struct statvfs *mounts;
-+	int n_mounts;
-+	int i;
- #elif defined(sun)
- 	FILE *f;
- 	struct mnttab mnt;
-@@ -694,7 +700,7 @@ get_mntent_mount_point(const char *devic
- 
- 	mount_point = NULL;
- 
--#if !defined(sun) && !defined(__FreeBSD__)
-+#if !defined(sun) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__)
- 	if ((f = setmntent ("/proc/mounts", "r")) != NULL) {
- 		
- 		while ((mnte = getmntent_r (f, &mnt, buf, sizeof(buf))) != NULL) {
-@@ -717,13 +723,13 @@ get_mntent_mount_point(const char *devic
- 		}
- 		fclose(f);
- 	}
--#elif defined(__FreeBSD__)
-+#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
- 	n_mounts = getmntinfo(&mounts, MNT_NOWAIT);
- 	for (i = 0; i < n_mounts; i++) {
- 		if (!strcmp(mounts[i].f_mntfromname, device_file))
- 			mount_point = g_strdup (mounts[i].f_mntonname);
- 	}
--#endif /* sun && __FreeBSD__ */
-+#endif /* sun && __FreeBSD__ && __NetBSD__ && __DragonFly__ */
- 
- out:
- 	return (mount_point);
-@@ -862,7 +868,7 @@ out:
- static gboolean
- fstab_open (gpointer *handle)
- {
--#ifdef __FreeBSD__
-+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
- 	return setfsent () == 1;
- #else
- 	*handle = fopen ("/etc/fstab", "r");
-@@ -873,7 +879,7 @@ fstab_open (gpointer *handle)
- static char *
- fstab_next (gpointer handle, char **mount_point)
- {
--#ifdef __FreeBSD__
-+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
- 	struct fstab *fstab;
- 
- 	fstab = getfsent ();
-@@ -901,7 +907,7 @@ fstab_next (gpointer handle, char **moun
- static void
- fstab_close (gpointer handle)
- {
--#ifdef __FreeBSD__
-+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
- 	endfsent ();
- #else
- 	fclose (handle);
-@@ -1116,7 +1122,7 @@ out:
- 	return ret;
- }
- 
--#ifdef __FreeBSD__
-+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
- #define MOUNT		"/sbin/mount"
- #define UMOUNT		"/sbin/umount"
- #else
-@@ -1451,7 +1457,7 @@ volume_mount (const char *udi, LibHalVol
- 	if (volume == NULL && (mount_options->len == 0)) {
- 		/* volume from a non-pollable drive, just set uid.. */
- 		
--#ifndef __FreeBSD__
-+#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__)
- 		snprintf (uidbuf, sizeof (uidbuf) - 1, "uid=%u", getuid ());
- #else
- 		snprintf (uidbuf, sizeof (uidbuf) - 1, "-u=%u", getuid ());
-@@ -1482,7 +1488,7 @@ volume_mount (const char *udi, LibHalVol
- 				g_debug ("read default option '%s' from gconf strlist key %s", option, key);
- 
- 				/* special workaround to replace "uid=" with "uid=<actual uid of caller>" */
--#ifndef __FreeBSD__
-+#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__)
- 				if (strcmp (option, "uid=") == 0) {
- 					g_free (option);
- 					option = g_strdup_printf ("uid=%u", getuid ());
-@@ -1577,8 +1583,7 @@ unmount_cache_timeout_func (gpointer dat
- 		message = g_strdup_printf (_("There is data that needs to be written to the device %s before it can be removed. Please do not remove the media or disconnect the drive."), unmount_note_drive_name);
- 		unmount_note = notify_notification_new (summary,
- 							message,
--							"gnome-dev-harddisk", /* TODO: use appropriate icon */
--							NULL);
-+							"gnome-dev-harddisk");
- 		if (unmount_note == NULL) {
- 			g_warning ("Cannot create note for unmount cache sync");
- 		} else {
diff --git a/gnome-mount/patches/patch-ac b/gnome-mount/patches/patch-ac
deleted file mode 100644
index 9f6899c5c7..0000000000
--- a/gnome-mount/patches/patch-ac
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ac,v 1.1.1.1 2008/11/22 17:54:42 jmcneill Exp $
-
---- Makefile.in.orig	2008-11-22 12:44:39.000000000 -0500
-+++ Makefile.in
-@@ -248,7 +248,7 @@ target_alias = @target_alias@
- top_builddir = @top_builddir@
- top_srcdir = @top_srcdir@
- SUBDIRS = src po
--schemadir = $(sysconfdir)/gconf/schemas
-+schemadir = $(datadir)/gconf/schemas
- schema_in_files = gnome-mount.schemas.in
- schema_DATA = $(schema_in_files:.schemas.in=.schemas)
- pkgconfigdir = $(libdir)/pkgconfig
diff --git a/gnome-mount/patches/patch-src_gnome-mount-properties-view.c b/gnome-mount/patches/patch-src_gnome-mount-properties-view.c
new file mode 100644
index 0000000000..a43e26153a
--- /dev/null
+++ b/gnome-mount/patches/patch-src_gnome-mount-properties-view.c
@@ -0,0 +1,122 @@
+$NetBSD$
+
+--- src/gnome-mount-properties-view.c.orig	2008-02-25 21:55:05.000000000 +0000
++++ src/gnome-mount-properties-view.c
+@@ -35,7 +35,7 @@
+ #include <string.h>
+ #include <gconf/gconf-client.h>
+ 
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+ #include <fstab.h>
+ #include <sys/param.h>
+ #include <sys/ucred.h>
+@@ -59,7 +59,31 @@ struct _GnomeMountPropertiesViewClass {
+ 	GtkVBoxClass base_class;
+ };
+ 
+-#ifdef __FreeBSD__
++#ifdef __NetBSD__
++static struct opt {
++	int o_opt;
++	const char *o_name;
++} optnames[] = {
++	{ MNT_ASYNC,		"async" },
++	{ MNT_NOCOREDUMP,	"nocoredump" },
++	{ MNT_NODEV,		"nodev" },
++	{ MNT_NODEVMTIME,	"nodevmtime" },
++	{ MNT_NOEXEC,		"noexec" },
++	{ MNT_NOSUID,		"nosuid" },
++	{ MNT_RDONLY,		"rdonly" },
++	{ MNT_SYNCHRONOUS,	"sync" },
++	{ MNT_UNION,		"union" },
++	{ MNT_NOATIME,		"noatime" },
++	{ MNT_SYMPERM,		"symperm" },
++	{ MNT_SOFTDEP,		"softdep" },
++#ifdef MNT_LOG
++	{ MNT_LOG,		"log" },
++#endif
++	{ MNT_IGNORE,		"hidden" },
++	{ 0, NULL }
++};
++#endif
++#if defined(__FreeBSD__) || defined(__DragonFly__)
+ static struct opt {
+ 	int o_opt;
+ 	const char *o_name;
+@@ -79,8 +103,12 @@ static struct opt {
+ 	{ MNT_NOCLUSTERW,	"noclusterw" },
+ 	{ MNT_SUIDDIR,		"suiddir" },
+ 	{ MNT_SOFTDEP,		"soft-updates" },
++#ifdef MNT_MULTILABEL
+ 	{ MNT_MULTILABEL,	"multilabel" },
++#endif
++#ifdef MNT_ACLS
+ 	{ MNT_ACLS,		"acls" },
++#endif
+ #ifdef MNT_GJOURNAL
+ 	{ MNT_GJOURNAL,		"gjournal" },
+ #endif
+@@ -337,7 +365,7 @@ populate_ui_from_gconf (GnomeMountProper
+ 	g_object_unref (gconf_client);
+ }
+ 
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__DragonFly__)
+ struct mtab_handle
+ {
+   struct statfs	*mounts;
+@@ -345,6 +373,14 @@ struct mtab_handle
+   int		iter;
+ };
+ #endif
++#ifdef __NetBSD__
++struct mtab_handle
++{
++  struct statvfs *mounts;
++  int		n_mounts;
++  int		iter;
++};
++#endif
+ 
+ /* borrowed from gtk/gtkfilesystemunix.c in GTK+ on 02/23/2006 */
+ static void
+@@ -454,7 +490,7 @@ out:
+ static gboolean
+ mtab_open (gpointer *handle)
+ {
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+ 	struct mtab_handle *mtab;
+ 
+ 	mtab = g_new0 (struct mtab_handle, 1);
+@@ -475,7 +511,7 @@ mtab_open (gpointer *handle)
+ static gboolean
+ mtab_next (gpointer handle, char **device_file, char **mount_options, char **mount_fstype)
+ {
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+ 	struct mtab_handle *mtab = handle;
+ 
+ 	if (mtab->iter < mtab->n_mounts) {
+@@ -484,7 +520,11 @@ mtab_next (gpointer handle, char **devic
+ 		GString *optstr;
+ 
+ 		optstr = g_string_new("");
++#if defined(__NetBSD__)
++		flags = mtab->mounts[mtab->iter].f_flag & MNT_VISFLAGMASK;
++#else
+ 		flags = mtab->mounts[mtab->iter].f_flags & MNT_VISFLAGMASK;
++#endif
+ 
+ 		for (o = optnames; flags && o->o_opt; o++) {
+ 			if (flags & o->o_opt) {
+@@ -517,7 +557,7 @@ mtab_next (gpointer handle, char **devic
+ static void
+ mtab_close (gpointer handle)
+ {
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+ 	g_free (handle);
+ #else
+ 	fclose (handle);
diff --git a/gnome-mount/patches/patch-src_gnome-mount.c b/gnome-mount/patches/patch-src_gnome-mount.c
new file mode 100644
index 0000000000..b51f1db39d
--- /dev/null
+++ b/gnome-mount/patches/patch-src_gnome-mount.c
@@ -0,0 +1,143 @@
+$NetBSD$
+
+--- src/gnome-mount.c.orig	2008-04-16 23:41:32.000000000 +0000
++++ src/gnome-mount.c
+@@ -30,6 +30,7 @@
+ #include <fcntl.h>
+ #include <string.h>
+ #include <stdlib.h>
++#include <locale.h>
+ 
+ #include <dbus/dbus.h>
+ #include <dbus/dbus-glib-lowlevel.h>
+@@ -39,6 +40,7 @@
+ #include <glib/gi18n.h>
+ #include <gconf/gconf-client.h>
+ #include <gdk/gdkx.h>
++#include <gtk/gtk.h>
+ #include "copy-paste/gnome-password-dialog.h"
+ #include <gnome-keyring.h>
+ #include <libnotify/notify.h>
+@@ -51,9 +53,9 @@
+ #define NOTIFY_EXPIRES_DEFAULT -1
+ #endif
+ 
+-#if !defined(sun) && !defined(__FreeBSD__)
++#if !defined(sun) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__)
+ #include <mntent.h>
+-#elif defined(__FreeBSD__)
++#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+ #include <fstab.h>
+ #include <sys/param.h>
+ #include <sys/ucred.h>
+@@ -677,15 +679,19 @@ static char *
+ get_mntent_mount_point(const char *device_file)
+ {
+ 	char *mount_point;
+-#if! defined(sun) && !defined(__FreeBSD__)
++#if! defined(sun) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__)
+ 	FILE *f;
+ 	struct mntent mnt;
+ 	struct mntent *mnte;
+ 	char buf[512];
+-#elif defined(__FreeBSD__)
++#elif defined(__FreeBSD__) || defined(__DragonFly__)
+ 	struct statfs *mounts;
+ 	int n_mounts;
+ 	int i;
++#elif defined(__NetBSD__)
++	struct statvfs *mounts;
++	int n_mounts;
++	int i;
+ #elif defined(sun)
+ 	FILE *f;
+ 	struct mnttab mnt;
+@@ -694,7 +700,7 @@ get_mntent_mount_point(const char *devic
+ 
+ 	mount_point = NULL;
+ 
+-#if !defined(sun) && !defined(__FreeBSD__)
++#if !defined(sun) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__)
+ 	if ((f = setmntent ("/proc/mounts", "r")) != NULL) {
+ 		
+ 		while ((mnte = getmntent_r (f, &mnt, buf, sizeof(buf))) != NULL) {
+@@ -717,13 +723,13 @@ get_mntent_mount_point(const char *devic
+ 		}
+ 		fclose(f);
+ 	}
+-#elif defined(__FreeBSD__)
++#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+ 	n_mounts = getmntinfo(&mounts, MNT_NOWAIT);
+ 	for (i = 0; i < n_mounts; i++) {
+ 		if (!strcmp(mounts[i].f_mntfromname, device_file))
+ 			mount_point = g_strdup (mounts[i].f_mntonname);
+ 	}
+-#endif /* sun && __FreeBSD__ */
++#endif /* sun && __FreeBSD__ && __NetBSD__ && __DragonFly__ */
+ 
+ out:
+ 	return (mount_point);
+@@ -862,7 +868,7 @@ out:
+ static gboolean
+ fstab_open (gpointer *handle)
+ {
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+ 	return setfsent () == 1;
+ #else
+ 	*handle = fopen ("/etc/fstab", "r");
+@@ -873,7 +879,7 @@ fstab_open (gpointer *handle)
+ static char *
+ fstab_next (gpointer handle, char **mount_point)
+ {
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+ 	struct fstab *fstab;
+ 
+ 	fstab = getfsent ();
+@@ -901,7 +907,7 @@ fstab_next (gpointer handle, char **moun
+ static void
+ fstab_close (gpointer handle)
+ {
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+ 	endfsent ();
+ #else
+ 	fclose (handle);
+@@ -1116,7 +1122,7 @@ out:
+ 	return ret;
+ }
+ 
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+ #define MOUNT		"/sbin/mount"
+ #define UMOUNT		"/sbin/umount"
+ #else
+@@ -1451,7 +1457,7 @@ volume_mount (const char *udi, LibHalVol
+ 	if (volume == NULL && (mount_options->len == 0)) {
+ 		/* volume from a non-pollable drive, just set uid.. */
+ 		
+-#ifndef __FreeBSD__
++#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__)
+ 		snprintf (uidbuf, sizeof (uidbuf) - 1, "uid=%u", getuid ());
+ #else
+ 		snprintf (uidbuf, sizeof (uidbuf) - 1, "-u=%u", getuid ());
+@@ -1482,7 +1488,7 @@ volume_mount (const char *udi, LibHalVol
+ 				g_debug ("read default option '%s' from gconf strlist key %s", option, key);
+ 
+ 				/* special workaround to replace "uid=" with "uid=<actual uid of caller>" */
+-#ifndef __FreeBSD__
++#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__)
+ 				if (strcmp (option, "uid=") == 0) {
+ 					g_free (option);
+ 					option = g_strdup_printf ("uid=%u", getuid ());
+@@ -1577,8 +1583,7 @@ unmount_cache_timeout_func (gpointer dat
+ 		message = g_strdup_printf (_("There is data that needs to be written to the device %s before it can be removed. Please do not remove the media or disconnect the drive."), unmount_note_drive_name);
+ 		unmount_note = notify_notification_new (summary,
+ 							message,
+-							"gnome-dev-harddisk", /* TODO: use appropriate icon */
+-							NULL);
++							"gnome-dev-harddisk");
+ 		if (unmount_note == NULL) {
+ 			g_warning ("Cannot create note for unmount cache sync");
+ 		} else {


Home | Main Index | Thread Index | Old Index