openbsd-ports/misc/ytree/patches/patch-freesp_c
naddy 20f57f9e28 Import of ytree-1.71.
Submitted by William Yodlowsky <bsd@openbsd.rutgers.edu>.

Ytree is a nifty  filemanager similar to xtree.  With some
helper-applications (zip/zoo/tar etc.) you can also browse archive
files.  Viewers for "special" files are configurable (*.wav, *.gif
etc.).
2001-01-03 18:54:09 +00:00

46 lines
1.4 KiB
Plaintext

$OpenBSD: patch-freesp_c,v 1.1.1.1 2001/01/03 18:54:09 naddy Exp $
--- freesp.c.orig Sat Jul 15 18:01:56 2000
+++ freesp.c Sat Dec 23 22:32:23 2000
@@ -19,7 +19,10 @@
#if defined( SVR4 ) || defined( OSF1 )
#include <sys/statvfs.h>
#else
-#if ( defined( ultrix ) || defined ( __FreeBSD__ ) )
+#if ( defined( ultrix ) )
+#include <sys/mount.h>
+#else
+#if (defined(__unix__) || defined(unix)) && !defined(USG)
#include <sys/param.h>
#include <sys/mount.h>
#else
@@ -30,6 +33,7 @@
/* z.B. SVR3 */
#include <sys/statfs.h>
#endif /* QNX */
+#endif /* BSD */
#endif /* ultrix */
#endif /* SVR4 */
#endif /* WIN32 */
@@ -85,8 +89,12 @@ int GetDiskParameter( char *path,
fd = open(path, O_RDONLY );
if( ( result = disk_space( fd, &free_blocks, &total_blocks ) ) == 0 )
#else
+#if defined( __OpenBSD__ )
+ if( ( result = statfs( path, &statfs_struct ) ) == 0 )
+#else
if( ( result = STATFS( path, &statfs_struct, sizeof( statfs_struct ), 0 ) ) == 0 )
+#endif /* OpenBSD */
#endif /* QNX */
#endif /* __DJGPP__ */
#endif /* WIN32 */
@@ -127,7 +135,7 @@ int GetDiskParameter( char *path,
fname = "LINUX";
}
#else
-#if defined( sun ) || defined( hpux ) || defined( __NeXT__ ) || defined( ultrix ) || defined ( __FreeBSD__ )
+#if defined( sun ) || defined( hpux ) || defined( __NeXT__ ) || defined( ultrix ) || defined ( BSD )
fname = "UNIX";
#else
#ifdef WIN32