1 Use proper C99 integer types
3 Upstream-Status: Pending
5 Signed-off-by: Khem Raj <raj.khem@gmail.com>
7 Index: quota-tools/bylabel.c
8 ===================================================================
9 --- quota-tools.orig/bylabel.c
10 +++ quota-tools/bylabel.c
19 @@ -37,32 +38,32 @@ static struct uuidCache_s {
21 #define EXT2_SUPER_MAGIC 0xEF53
22 struct ext2_super_block {
23 - u_char s_dummy1[56];
25 - u_char s_dummy2[46];
27 - u_char s_volume_name[16];
28 + uint8_t s_dummy1[56];
30 + uint8_t s_dummy2[46];
32 + uint8_t s_volume_name[16];
35 -#define ext2magic(s) ((uint) s.s_magic[0] + (((uint) s.s_magic[1]) << 8))
36 +#define ext2magic(s) ((uint32_t) s.s_magic[0] + (((uint32_t) s.s_magic[1]) << 8))
38 #define XFS_SUPER_MAGIC "XFSB"
39 #define XFS_SUPER_MAGIC2 "BSFX"
40 struct xfs_super_block {
44 - u_char s_dummy2[60];
45 - u_char s_fsname[12];
47 + uint8_t s_dummy[28];
49 + uint8_t s_dummy2[60];
50 + uint8_t s_fsname[12];
53 #define REISER_SUPER_MAGIC "ReIsEr2Fs"
54 struct reiserfs_super_block {
55 - u_char s_dummy1[52];
57 - u_char s_dummy2[22];
59 - u_char s_volume_name[16];
60 + uint8_t s_dummy1[52];
61 + uint8_t s_magic[10];
62 + uint8_t s_dummy2[22];
64 + uint8_t s_volume_name[16];
67 static inline unsigned short swapped(unsigned short a)
68 @@ -222,7 +223,7 @@ static char *get_spec_by_x(int n, const
72 -static u_char fromhex(char c)
73 +static uint8_t fromhex(char c)
77 @@ -234,7 +235,7 @@ static u_char fromhex(char c)
79 static char *get_spec_by_uuid(const char *s)
85 if (strlen(s) != 36 || s[8] != '-' || s[13] != '-' || s[18] != '-' || s[23] != '-')
86 Index: quota-tools/quot.c
87 ===================================================================
88 --- quota-tools.orig/quot.c
89 +++ quota-tools/quot.c
102 -static __uint64_t sizes[TSIZE];
103 -static __uint64_t overflow;
104 +static uint64_t sizes[TSIZE];
105 +static uint64_t overflow;
109 @@ -72,7 +73,7 @@ static time_t now;
112 static void mounttable(void);
113 -static char *idname(__uint32_t, int);
114 +static char *idname(uint32_t, int);
115 static void report(const char *, const char *, int);
116 static void creport(const char *, const char *);
118 @@ -173,7 +174,7 @@ static int qcmp(du_t * p1, du_t * p2)
119 static void creport(const char *file, const char *fsdir)
125 printf(_("%s (%s):\n"), file, fsdir);
126 for (i = 0; i < TSIZE - 1; i++)
127 @@ -219,7 +220,7 @@ static void report(const char *file, con
131 -static idcache_t *getnextent(int type, __uint32_t id, int byid)
132 +static idcache_t *getnextent(int type, uint32_t id, int byid)
136 @@ -240,7 +241,7 @@ static idcache_t *getnextent(int type, _
140 -static char *idname(__uint32_t id, int type)
141 +static char *idname(uint32_t id, int type)
143 idcache_t *ncp, *idp;
144 static idcache_t nc[2][NID];
145 @@ -286,8 +287,8 @@ static void acctXFS(xfs_bstat_t *p)
154 if ((p->bs_mode & S_IFMT) == 0)
156 Index: quota-tools/quot.h
157 ===================================================================
158 --- quota-tools.orig/quot.h
159 +++ quota-tools/quot.h
161 #define SEC24HR (60*60*24) /* seconds per day */
166 char name[UT_NAMESIZE + 1];
172 - __uint64_t blocks30;
173 - __uint64_t blocks60;
174 - __uint64_t blocks90;
186 Index: quota-tools/rquota_server.c
187 ===================================================================
188 --- quota-tools.orig/rquota_server.c
189 +++ quota-tools/rquota_server.c
190 @@ -60,7 +60,7 @@ extern char nfs_pseudoroot[PATH_MAX];
192 extern struct authunix_parms *unix_cred;
194 -int in_group(gid_t * gids, u_int len, gid_t gid)
195 +int in_group(gid_t * gids, uint32_t len, gid_t gid)
197 gid_t *gidsp = gids + len;