bug-coreutils
[Top][All Lists]
Advanced

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

Re: coreutils vs. NetBSD 2.0D and above


From: Matthias Scheler
Subject: Re: coreutils vs. NetBSD 2.0D and above
Date: Wed, 19 May 2004 23:55:36 +0200
User-agent: Mutt/1.4.2.1i

On Wed, May 19, 2004 at 11:12:43AM -0700, Paul Eggert wrote:
> How about if you send in the patches that you have to bug-coreutils?
> They might help explain things a bit better.

The first patch defines "statfs" as "statvfs" for NetBSD 2.0D and above
and makes sure that "f_fstypename" (in "struct statvfs", not in
"struct statfs") is used:

--- lib/mountlist.c.orig        2004-01-26 09:58:12.000000000 +0100
+++ lib/mountlist.c     2004-05-18 20:56:57.000000000 +0200
@@ -173,6 +173,11 @@
 
 #if MOUNTED_GETMNTINFO
 
+# if defined(__NetBSD__) && (__NetBSD_Version__ > 200030000)
+# define statfs                                statvfs
+# define HAVE_F_FSTYPENAME_IN_STATFS   1
+# endif
+
 # if ! HAVE_F_FSTYPENAME_IN_STATFS
 static char *
 fstype_to_string (short t)

The second patch is very similar. It redefines "statfs" as "statvfs" and
lets the code use "f_fstypename".

--- src/stat.c.orig     2004-02-05 14:46:12.000000000 +0100
+++ src/stat.c  2004-05-18 21:02:54.000000000 +0200
@@ -86,6 +86,11 @@
 # endif
 #endif
 
+#if defined(__NetBSD__) && (__NetBSD_Version__ > 200030000)
+#define        statfs                                  statvfs
+#define        STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME    f_fstypename
+#endif
+
 #define PROGRAM_NAME "stat"
 
 #define AUTHORS "Michael Meskes"

The proper solution in both case would be to let the autoconfigure code
check for "struct statvfs" under NetBSD and search for "f_fstypename"
in that structure. Actually it could just assume that NetBSD's
"struct statvfs" always has a member "f_fstypename".

        Kind regards

-- 
Matthias Scheler                                  http://scheler.de/~matthias/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]