1 Use proper C99 integer types
3 Upstream-Status: Pending
5 Signed-off-by: Khem Raj <raj.khem@gmail.com>
6 [Thomas: borrowed from OpenEmbedded.]
7 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9 Index: quota-tools/bylabel.c
10 ===================================================================
11 --- quota-tools.orig/bylabel.c
12 +++ quota-tools/bylabel.c
21 @@ -37,32 +38,32 @@ static struct uuidCache_s {
23 #define EXT2_SUPER_MAGIC 0xEF53
24 struct ext2_super_block {
25 - u_char s_dummy1[56];
27 - u_char s_dummy2[46];
29 - u_char s_volume_name[16];
30 + uint8_t s_dummy1[56];
32 + uint8_t s_dummy2[46];
34 + uint8_t s_volume_name[16];
37 -#define ext2magic(s) ((uint) s.s_magic[0] + (((uint) s.s_magic[1]) << 8))
38 +#define ext2magic(s) ((uint32_t) s.s_magic[0] + (((uint32_t) s.s_magic[1]) << 8))
40 #define XFS_SUPER_MAGIC "XFSB"
41 #define XFS_SUPER_MAGIC2 "BSFX"
42 struct xfs_super_block {
46 - u_char s_dummy2[60];
47 - u_char s_fsname[12];
49 + uint8_t s_dummy[28];
51 + uint8_t s_dummy2[60];
52 + uint8_t s_fsname[12];
55 #define REISER_SUPER_MAGIC "ReIsEr2Fs"
56 struct reiserfs_super_block {
57 - u_char s_dummy1[52];
59 - u_char s_dummy2[22];
61 - u_char s_volume_name[16];
62 + uint8_t s_dummy1[52];
63 + uint8_t s_magic[10];
64 + uint8_t s_dummy2[22];
66 + uint8_t s_volume_name[16];
69 static inline unsigned short swapped(unsigned short a)
70 @@ -222,7 +223,7 @@ static char *get_spec_by_x(int n, const
74 -static u_char fromhex(char c)
75 +static uint8_t fromhex(char c)
79 @@ -234,7 +235,7 @@ static u_char fromhex(char c)
81 static char *get_spec_by_uuid(const char *s)
87 if (strlen(s) != 36 || s[8] != '-' || s[13] != '-' || s[18] != '-' || s[23] != '-')
88 Index: quota-tools/quot.c
89 ===================================================================
90 --- quota-tools.orig/quot.c
91 +++ quota-tools/quot.c
101 #include "quotasys.h"
104 -static __uint64_t sizes[TSIZE];
105 -static __uint64_t overflow;
106 +static uint64_t sizes[TSIZE];
107 +static uint64_t overflow;
111 @@ -72,7 +73,7 @@ static time_t now;
114 static void mounttable(void);
115 -static char *idname(__uint32_t, int);
116 +static char *idname(uint32_t, int);
117 static void report(const char *, const char *, int);
118 static void creport(const char *, const char *);
120 @@ -173,7 +174,7 @@ static int qcmp(du_t * p1, du_t * p2)
121 static void creport(const char *file, const char *fsdir)
127 printf(_("%s (%s):\n"), file, fsdir);
128 for (i = 0; i < TSIZE - 1; i++)
129 @@ -219,7 +220,7 @@ static void report(const char *file, con
133 -static idcache_t *getnextent(int type, __uint32_t id, int byid)
134 +static idcache_t *getnextent(int type, uint32_t id, int byid)
138 @@ -240,7 +241,7 @@ static idcache_t *getnextent(int type, _
142 -static char *idname(__uint32_t id, int type)
143 +static char *idname(uint32_t id, int type)
145 idcache_t *ncp, *idp;
146 static idcache_t nc[2][NID];
147 @@ -286,8 +287,8 @@ static void acctXFS(xfs_bstat_t *p)
156 if ((p->bs_mode & S_IFMT) == 0)
158 Index: quota-tools/quot.h
159 ===================================================================
160 --- quota-tools.orig/quot.h
161 +++ quota-tools/quot.h
163 #define SEC24HR (60*60*24) /* seconds per day */
168 char name[UT_NAMESIZE + 1];
174 - __uint64_t blocks30;
175 - __uint64_t blocks60;
176 - __uint64_t blocks90;
188 Index: quota-tools/rquota_server.c
189 ===================================================================
190 --- quota-tools.orig/rquota_server.c
191 +++ quota-tools/rquota_server.c
192 @@ -60,7 +60,7 @@ extern char nfs_pseudoroot[PATH_MAX];
194 extern struct authunix_parms *unix_cred;
196 -int in_group(gid_t * gids, u_int len, gid_t gid)
197 +int in_group(gid_t * gids, uint32_t len, gid_t gid)
199 gid_t *gidsp = gids + len;