summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2006-03-24 19:05:31 +0000
committerjoerg <joerg@pkgsrc.org>2006-03-24 19:05:31 +0000
commitd57216d62b7b2d5d2183f77d0f85ce928daaf0ee (patch)
tree7e64bebb640d75d1960063c8725d47d0091be454 /sysutils
parent97cbf9aecfb018bf187e4263a677a4821c89277e (diff)
downloadpkgsrc-d57216d62b7b2d5d2183f77d0f85ce928daaf0ee.tar.gz
Use getfsstat on DragonFly. Older NetBSD should most likely use it
as well.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/gworkspace/distinfo4
-rw-r--r--sysutils/gworkspace/patches/patch-aa28
2 files changed, 23 insertions, 9 deletions
diff --git a/sysutils/gworkspace/distinfo b/sysutils/gworkspace/distinfo
index fe9f2ea9b1b..90c77d1939c 100644
--- a/sysutils/gworkspace/distinfo
+++ b/sysutils/gworkspace/distinfo
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.6 2005/05/02 06:35:55 rh Exp $
+$NetBSD: distinfo,v 1.7 2006/03/24 19:05:31 joerg Exp $
SHA1 (gworkspace-0.7.1.tar.gz) = f1679a2d507e2ccc35e1cb06bbdea7e2864c4528
RMD160 (gworkspace-0.7.1.tar.gz) = 5fb43c7faaf0a2a46a150011a34ac21ab074bb39
Size (gworkspace-0.7.1.tar.gz) = 1412129 bytes
-SHA1 (patch-aa) = dc897d3e32a1e020557e489e36781088e8767a3e
+SHA1 (patch-aa) = 0e9cb7923f161796ca5426252928335289229cbd
SHA1 (patch-ab) = 421fdbb920f5efc4c91969a6391e098e489dd1ce
diff --git a/sysutils/gworkspace/patches/patch-aa b/sysutils/gworkspace/patches/patch-aa
index 1adb1f645ea..6d607d48248 100644
--- a/sysutils/gworkspace/patches/patch-aa
+++ b/sysutils/gworkspace/patches/patch-aa
@@ -1,21 +1,23 @@
-$NetBSD: patch-aa,v 1.4 2005/05/02 06:35:55 rh Exp $
+$NetBSD: patch-aa,v 1.5 2006/03/24 19:05:31 joerg Exp $
--- GWorkspace/Desktop/GWDesktopManager.m.orig 2005-04-01 09:43:39.000000000 +1000
+++ GWorkspace/Desktop/GWDesktopManager.m
-@@ -31,6 +31,12 @@
+@@ -31,6 +31,14 @@
#include "GWorkspace.h"
#include "GWViewersManager.h"
#include "TShelf/TShelfWin.h"
+#include <sys/types.h>
+#include <sys/param.h>
+
-+#if (defined(BSD) && BSD >= 199306)
++#if defined(__DragonFly__)
++#include <sys/mount.h>
++#elif (defined(BSD) && BSD >= 199306)
+#include <sys/statvfs.h>
+#endif
#define RESV_MARGIN 10
-@@ -748,9 +754,31 @@ static GWDesktopManager *desktopManager
+@@ -748,9 +756,39 @@ static GWDesktopManager *desktopManager
}
if (removables == nil) {
@@ -27,7 +29,11 @@ $NetBSD: patch-aa,v 1.4 2005/05/02 06:35:55 rh Exp $
}
+#if (defined(BSD) && BSD >= 199306)
++#if defined(__DragonFly__)
++ struct statfs *mntbuf;
++#else
+ struct statvfs *mntbuf;
++#endif
+ int mntsize = getmntinfo(&mntbuf, MNT_NOWAIT);
+
+ for (i = 0; i < mntsize; i++) {
@@ -35,7 +41,11 @@ $NetBSD: patch-aa,v 1.4 2005/05/02 06:35:55 rh Exp $
+ strcmp(mntbuf[i].f_mntonname, [fullPath cString]) == 0) {
+ *removableFlag = [removables containsObject:
+ [NSString stringWithCString: mntbuf[i].f_mntonname]];
++#if defined(__DragonFly__)
++ *writableFlag = ( mntbuf[i].f_flags & MNT_RDONLY ) ? NO : YES;
++#else
+ *writableFlag = ( mntbuf[i].f_flag & MNT_RDONLY ) ? NO : YES;
++#endif
+ *unmountableFlag = YES;
+ *fileSystemType = [NSString stringWithCString: mntbuf[i].f_fstypename];
+ *description = *fileSystemType;
@@ -47,7 +57,7 @@ $NetBSD: patch-aa,v 1.4 2005/05/02 06:35:55 rh Exp $
mtab = [NSString stringWithContentsOfFile: mtabpath];
mounts = [mtab componentsSeparatedByString: @"\n"];
-@@ -782,6 +810,7 @@ static GWDesktopManager *desktopManager
+@@ -782,6 +820,7 @@ static GWDesktopManager *desktopManager
}
}
}
@@ -55,7 +65,7 @@ $NetBSD: patch-aa,v 1.4 2005/05/02 06:35:55 rh Exp $
return NO;
}
-@@ -801,11 +830,27 @@ static GWDesktopManager *desktopManager
+@@ -801,11 +840,31 @@ static GWDesktopManager *desktopManager
}
if (reserved == nil) {
@@ -70,7 +80,11 @@ $NetBSD: patch-aa,v 1.4 2005/05/02 06:35:55 rh Exp $
+#if (defined(BSD) && BSD >= 199306)
+ names = [NSMutableArray array];
++#if defined(__DragonFly__)
++ struct statfs *mntbuf;
++#else
+ struct statvfs *mntbuf;
++#endif
+ int mntsize = getmntinfo(&mntbuf, MNT_NOWAIT);
+
+ for (i = 0; i < mntsize; i++) {
@@ -83,7 +97,7 @@ $NetBSD: patch-aa,v 1.4 2005/05/02 06:35:55 rh Exp $
mtab = [NSString stringWithContentsOfFile: mtabpath];
mounts = [mtab componentsSeparatedByString: @"\n"];
names = [NSMutableArray array];
-@@ -825,6 +870,7 @@ static GWDesktopManager *desktopManager
+@@ -825,6 +884,7 @@ static GWDesktopManager *desktopManager
}
}
}