diff -ur src/lib/base64.c.orig src/lib/base64.c
old
|
new
|
|
74 | 74 | * stored (not including the EOS). |
75 | 75 | */ |
76 | 76 | int |
77 | | to_base64(intmax_t value, char *where) |
| 77 | to_base64(int64_t value, char *where) |
78 | 78 | { |
79 | | uintmax_t val; |
| 79 | uint64_t val; |
80 | 80 | int i = 0; |
81 | 81 | int n; |
82 | 82 | |
… |
… |
|
98 | 98 | val = value; |
99 | 99 | where[i] = 0; |
100 | 100 | do { |
101 | | where[--i] = base64_digits[val & (uintmax_t)0x3F]; |
| 101 | where[--i] = base64_digits[val & (uint64_t)0x3F]; |
102 | 102 | val >>= 6; |
103 | 103 | } while (val); |
104 | 104 | return n; |
… |
… |
|
112 | 112 | * Returns the value. |
113 | 113 | */ |
114 | 114 | int |
115 | | from_base64(intmax_t *value, char *where) |
| 115 | from_base64(int64_t *value, char *where) |
116 | 116 | { |
117 | | uintmax_t val = 0; |
| 117 | uint64_t val = 0; |
118 | 118 | int i, neg; |
119 | 119 | |
120 | 120 | if (!base64_inited) |
… |
… |
|
131 | 131 | val += base64_map[(uint8_t)where[i++]]; |
132 | 132 | } |
133 | 133 | |
134 | | *value = neg ? -(intmax_t)val : (intmax_t)val; |
| 134 | *value = neg ? -(int64_t)val : (int64_t)val; |
135 | 135 | return i; |
136 | 136 | } |
137 | 137 | |
diff -ur src/lib/protos.h.orig src/lib/protos.h
old
|
new
|
|
45 | 45 | |
46 | 46 | /* base64.c */ |
47 | 47 | void base64_init (void); |
48 | | int to_base64 (intmax_t value, char *where); |
49 | | int from_base64 (intmax_t *value, char *where); |
| 48 | int to_base64 (int64_t value, char *where); |
| 49 | int from_base64 (int64_t *value, char *where); |
50 | 50 | int bin_to_base64 (char *buf, int buflen, char *bin, int binlen, |
51 | 51 | int compatible); |
52 | 52 | |
diff -ur src/filed/restore.c.orig src/files/restore.c
old
|
new
|
|
155 | 155 | char ec1[50]; /* Buffer printing huge values */ |
156 | 156 | uint32_t buf_size; /* client buffer size */ |
157 | 157 | int stat; |
158 | | intmax_t rsrc_len = 0; /* Original length of resource fork */ |
| 158 | int64_t rsrc_len = 0; /* Original length of resource fork */ |
159 | 159 | r_ctx rctx; |
160 | 160 | ATTR *attr; |
161 | 161 | /* ***FIXME*** make configurable */ |
… |
… |
|
608 | 608 | continue; |
609 | 609 | } |
610 | 610 | |
611 | | rctx.fork_size = rsrc_len; |
| 611 | rctx.fork_size = (intmax_t)rsrc_len; |
612 | 612 | Dmsg0(130, "Restoring resource fork\n"); |
613 | 613 | } |
614 | 614 | |