Line 0
Link Here
|
|
|
1 |
--- t/gen-stat.c.orig 2006-06-28 11:54:00 UTC |
2 |
+++ t/gen-stat.c |
3 |
@@ -48,9 +48,9 @@ |
4 |
/* - shamelessly stolen from other source headers */ |
5 |
|
6 |
|
7 |
-static void pr(const char *name, unsigned long value) |
8 |
+static void pr(const char *name, dev_t value) |
9 |
{ |
10 |
- printf("sub %-12s () { 0%06lo }\n", name, value); |
11 |
+ printf("sub %-12s () { 0%06llo }\n", name, value); |
12 |
} |
13 |
|
14 |
static void prundef(const char *name) |
15 |
@@ -113,13 +113,13 @@ static void constants(void) |
16 |
|
17 |
#ifdef _HAVE_MAJOR_MINOR |
18 |
|
19 |
-#define MASK(bit) ( ((unsigned long)1) << (bit) ) |
20 |
+#define MASK(bit) ( ((dev_t)1) << (bit) ) |
21 |
|
22 |
-static void test(unsigned long (*f)(unsigned long), |
23 |
- unsigned long *_mask, unsigned int *_shift) |
24 |
+static void test(dev_t (*f)(dev_t), |
25 |
+ dev_t *_mask, unsigned int *_shift) |
26 |
{ |
27 |
unsigned int shift; |
28 |
- unsigned long mask, old_mask; |
29 |
+ dev_t mask, old_mask; |
30 |
|
31 |
for(shift=0; mask=MASK(shift), f(mask) == 0; ++shift) |
32 |
; |
33 |
@@ -137,12 +137,12 @@ static void test(unsigned long (*f)(unsigned long), |
34 |
} |
35 |
|
36 |
|
37 |
-static unsigned long Major( unsigned long dev ) |
38 |
+static dev_t Major( dev_t dev ) |
39 |
{ |
40 |
return major(dev); |
41 |
} |
42 |
|
43 |
-static unsigned long Minor( unsigned long dev ) |
44 |
+static dev_t Minor( dev_t dev ) |
45 |
{ |
46 |
return minor(dev); |
47 |
} |
48 |
@@ -153,7 +153,7 @@ static unsigned long Minor( unsigned long dev ) |
49 |
int main(void) |
50 |
{ |
51 |
#ifdef _HAVE_MAJOR_MINOR |
52 |
- unsigned long major_mask , minor_mask; |
53 |
+ dev_t major_mask , minor_mask; |
54 |
unsigned int major_shift, minor_shift; |
55 |
|
56 |
test( Major, &major_mask, &major_shift ); |