2859
|
1 |
--- xmobar-0.11.1-orig/StatFS.hsc 2010-05-17 20:17:50.000000000 +1000
|
|
2 |
+++ xmobar-0.11.1/StatFS.hsc 2010-07-21 22:38:52.755410000 +1000
|
|
3 |
@@ -27,8 +27,14 @@
|
|
4 |
# include <sys/param.h>
|
|
5 |
# include <sys/mount.h>
|
|
6 |
#else
|
|
7 |
+#if defined(__sun) && defined(__SVR4)
|
|
8 |
+#include <sys/types.h>
|
|
9 |
+#include <sys/statvfs.h>
|
|
10 |
+#define statfs statvfs
|
|
11 |
+#else
|
|
12 |
#include <sys/vfs.h>
|
|
13 |
#endif
|
|
14 |
+#endif
|
|
15 |
|
|
16 |
data FileSystemStats = FileSystemStats {
|
|
17 |
fsStatBlockSize :: Integer
|
|
18 |
@@ -50,8 +56,12 @@
|
|
19 |
#if defined(__FreeBSD__)
|
|
20 |
foreign import ccall unsafe "sys/mount.h statfs"
|
|
21 |
#else
|
|
22 |
+#if defined(__sun) && defined(__SVR4)
|
|
23 |
+foreign import ccall unsafe "sys/statvfs.h statfs"
|
|
24 |
+#else
|
|
25 |
foreign import ccall unsafe "sys/vfs.h statfs64"
|
|
26 |
#endif
|
|
27 |
+#endif
|
|
28 |
c_statfs :: CString -> Ptr CStatfs -> IO CInt
|
|
29 |
|
|
30 |
toI :: CLong -> Integer
|