author | Mike Sullivan <Mike.Sullivan@Oracle.COM> |
Tue, 26 Jan 2016 16:40:09 -0800 | |
changeset 5349 | aad9f1baf245 |
permissions | -rw-r--r-- |
5349
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
1 |
solaris now provides its own b64_encode which |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
2 |
conflicts with our private one. |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
3 |
|
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
4 |
--- libarchive-3.1.2/libarchive/archive_write_add_filter_b64encode.c.orig Sun Jan 24 10:08:09 2016 |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
5 |
+++ libarchive-3.1.2/libarchive/archive_write_add_filter_b64encode.c Sun Jan 24 10:08:54 2016 |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
6 |
@@ -60,7 +60,7 @@ |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
7 |
const void *, size_t); |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
8 |
static int archive_filter_b64encode_close(struct archive_write_filter *); |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
9 |
static int archive_filter_b64encode_free(struct archive_write_filter *); |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
10 |
-static void b64_encode(struct archive_string *, const unsigned char *, size_t); |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
11 |
+static void archive_private_b64_encode(struct archive_string *, const unsigned char *, size_t); |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
12 |
static int64_t atol8(const char *, size_t); |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
13 |
|
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
14 |
static const char base64[] = { |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
15 |
@@ -180,7 +180,7 @@ |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
16 |
} |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
17 |
|
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
18 |
static void |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
19 |
-b64_encode(struct archive_string *as, const unsigned char *p, size_t len) |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
20 |
+archive_private_b64_encode(struct archive_string *as, const unsigned char *p, size_t len) |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
21 |
{ |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
22 |
int c; |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
23 |
|
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
24 |
@@ -234,12 +234,12 @@ |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
25 |
} |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
26 |
if (state->hold_len < LBYTES) |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
27 |
return (ret); |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
28 |
- b64_encode(&state->encoded_buff, state->hold, LBYTES); |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
29 |
+ archive_private_b64_encode(&state->encoded_buff, state->hold, LBYTES); |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
30 |
state->hold_len = 0; |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
31 |
} |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
32 |
|
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
33 |
for (; length >= LBYTES; length -= LBYTES, p += LBYTES) |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
34 |
- b64_encode(&state->encoded_buff, p, LBYTES); |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
35 |
+ archive_private_b64_encode(&state->encoded_buff, p, LBYTES); |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
36 |
|
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
37 |
/* Save remaining bytes. */ |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
38 |
if (length > 0) { |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
39 |
@@ -270,7 +270,7 @@ |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
40 |
|
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
41 |
/* Flush remaining bytes. */ |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
42 |
if (state->hold_len != 0) |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
43 |
- b64_encode(&state->encoded_buff, state->hold, state->hold_len); |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
44 |
+ archive_private_b64_encode(&state->encoded_buff, state->hold, state->hold_len); |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
45 |
archive_string_sprintf(&state->encoded_buff, "====\n"); |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
46 |
/* Write the last block */ |
aad9f1baf245
22593018 libarchives b64_encode conflicts with system one on 91
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff
changeset
|
47 |
archive_write_set_bytes_in_last_block(f->archive, 1); |