]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
Fix up compiler warnings/errors for cross-platform builds.
authorNathan Scott <nathans@sgi.com>
Mon, 14 Nov 2005 02:47:28 +0000 (02:47 +0000)
committerNathan Scott <nathans@sgi.com>
Mon, 14 Nov 2005 02:47:28 +0000 (02:47 +0000)
Merge of master-melb:xfs-cmds:24382a by kenmcd.

io/imap.c
quota/quot.c
quota/quota.h
quota/report.c
quota/util.c

index 73f37d00b163bc5d68cb874dee01f266a8437591..1128f0b64584c558e3cc05403c302624306369e5 100644 (file)
--- a/io/imap.c
+++ b/io/imap.c
 #include "init.h"
 #include "io.h"
 
-#if defined(__sgi__)
-# define ino64p                ino64_t *
-#else
-# define ino64p                __u64 *
-#endif
-
 static cmdinfo_t imap_cmd;
 
 int
@@ -36,7 +30,7 @@ imap_f(int argc, char **argv)
        int             count;
        int             nent;
        int             i;
-       __s64           last = 0;
+       __uint64_t      last = 0;
        xfs_inogrp_t    *t;
        xfs_fsop_bulkreq_t bulkreq;
 
@@ -47,7 +41,7 @@ imap_f(int argc, char **argv)
 
        t = malloc(nent * sizeof(*t));
 
-       bulkreq.lastip  = (ino64p)&last;
+       bulkreq.lastip  = &last;
        bulkreq.icount  = nent;
        bulkreq.ubuffer = (void *)t;
        bulkreq.ocount  = &count;
index 300656a0647c714762409abf21d5a9c647710a23..00cae68b8b85eca1aa9a1f315ff04cea6ecb3fbb 100644 (file)
@@ -139,7 +139,7 @@ quot_bulkstat_mount(
 {
        xfs_fsop_bulkreq_t      bulkreq;
        xfs_bstat_t             *buf;
-       __int64_t               last = 0;
+       __uint64_t              last = 0;
        __int32_t               count;
        int                     i, sts, fsfd;
        du_t                    **dp;
index 5646a9c546913ef5c9424fe83884c8076119ef37..f9150879df6690e4fadcd15d32feb7d1c37a3b84 100644 (file)
@@ -76,6 +76,7 @@ enum {
 /*
  * Identifier (uid/gid/prid) cache routines
  */
+#define NMAX 32
 extern char *uid_to_name(__uint32_t __uid);
 extern char *gid_to_name(__uint32_t __gid);
 extern char *prid_to_name(__uint32_t __prid);
index 0d6d8d0b36523a27097bfe44e308665181c2d629..f9d56de25a795fcfb7c5c749628899f84317d874 100644 (file)
@@ -19,6 +19,7 @@
 #include <xfs/command.h>
 #include <pwd.h>
 #include <grp.h>
+#include <utmp.h>
 #include "init.h"
 #include "quota.h"
 
@@ -389,7 +390,7 @@ report_user_mount(
        uint            flags)
 {
        struct passwd   *u;
-       char            n[MAXNAMELEN];
+       char            n[NMAX];
        uint            id;
 
        if (upper) {    /* identifier range specified */
@@ -427,7 +428,7 @@ report_group_mount(
        uint            flags)
 {
        struct group    *g;
-       char            n[MAXNAMELEN];
+       char            n[NMAX];
        uint            id;
 
        if (upper) {    /* identifier range specified */
@@ -464,7 +465,7 @@ report_project_mount(
        uint            flags)
 {
        fs_project_t    *p;
-       char            n[MAXNAMELEN];
+       char            n[NMAX];
        uint            id;
 
        if (upper) {    /* identifier range specified */
index 6499c3ef7d365848a26252d356f26dce2e3e5fed..ea177b284063a0d8bac567978db7ae84aee54478 100644 (file)
@@ -219,12 +219,6 @@ type_to_string(
  * Identifier caches - user/group/project names/IDs
  */
 
-#ifndef UT_NAMESIZE
-struct utmp utmp;
-#define NMAX           (sizeof(utmp.ut_name))
-#else
-#define NMAX           UT_NAMESIZE
-#endif
 #define NID            4096
 #define IDMASK         (NID-1)