Imported Upstream version 3.3.1
[platform/upstream/libarchive.git] / doc / html / libarchive_changes.3.html
1 <!-- Creator     : groff version 1.22.3 -->
2 <!-- CreationDate: Sat Feb 25 11:22:07 2017 -->
3 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
4 "http://www.w3.org/TR/html4/loose.dtd">
5 <html>
6 <head>
7 <meta name="generator" content="groff -Thtml, see www.gnu.org">
8 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
9 <meta name="Content-Style" content="text/css">
10 <style type="text/css">
11        p       { margin-top: 0; margin-bottom: 0; vertical-align: top }
12        pre     { margin-top: 0; margin-bottom: 0; vertical-align: top }
13        table   { margin-top: 0; margin-bottom: 0; vertical-align: top }
14        h1      { text-align: center }
15 </style>
16 <title></title>
17 </head>
18 <body>
19
20 <hr>
21
22
23 <p>LIBARCHIVE_CHANGES(3) BSD Library Functions Manual
24 LIBARCHIVE_CHANGES(3)</p>
25
26 <p style="margin-top: 1em"><b>NAME</b></p>
27
28 <p style="margin-left:6%;">&mdash; changes in libarchive
29 interface</p>
30
31 <p style="margin-top: 1em"><b>CHANGES IN LIBARCHIVE
32 3</b></p>
33
34 <p style="margin-left:6%;">This page describes user-visible
35 changes in libarchive3, and lists public functions and other
36 symbols changed, deprecated or removed in libarchive3, along
37 with their replacements if any.</p>
38
39 <p style="margin-left:6%; margin-top: 1em"><b>Multiple
40 Filters</b> <br>
41 Libarchive2 permitted a single (input or output) filter
42 active on an archive. Libarchive3 extends this into a
43 variable-length stack. Where
44 <b>archive_write_set_compression_XXX</b>() would replace any
45 existing filter, <b>archive_write_add_filter_XXX</b>()
46 extends the write pipeline with another filter.</p>
47
48 <p style="margin-left:6%; margin-top: 1em"><b>Character Set
49 Handling</b> <br>
50 Libarchive2 assumed that the local platform uses Unicode as
51 the native wchar_t encoding, which is true on Windows,
52 modern Linux, and a few other systems, but is certainly not
53 universal. As a result, pax format archives were written
54 incorrectly on some systems, since pax format requires UTF-8
55 and libarchive 2 incorrectly assumed that wchar_t strings
56 can be easily converted to UTF-8.</p>
57
58 <p style="margin-left:6%; margin-top: 1em">Libarchive3 uses
59 the standard iconv library to convert between character sets
60 and is introducing the notion of a &lsquo;&lsquo;default
61 character set for the archive&rsquo;&rsquo;. To support
62 this, archive_entry objects can now be bound to a particular
63 archive when they are created. The automatic character set
64 conversions performed by archive_entry objects when reading
65 and writing filenames, usernames, and other strings will now
66 use an appropriate default character set:</p>
67
68 <p style="margin-left:6%; margin-top: 1em">If the
69 archive_entry object is bound to an archive, it will use the
70 default character set for that archive.</p>
71
72 <p style="margin-left:6%; margin-top: 1em">The platform
73 default character encoding (as returned by
74 <b>nl_langinfo</b>(<i>CHARSET</i>)) will be used if nothing
75 else is specified.</p>
76
77 <p style="margin-left:6%; margin-top: 1em">Libarchive3 also
78 introduces charset options to many of the archive readers
79 and writers to control the character set that will be used
80 for filenames written in those archives. When possible, this
81 will be set automatically based on information in the
82 archive itself. Combining this with the notion of a default
83 character set for the archive should allow you to configure
84 libarchive to read archives from other platforms and have
85 the filenames and other information transparently converted
86 to the character encoding suitable for your application.</p>
87
88 <p style="margin-left:6%; margin-top: 1em"><b>Prototype
89 Changes</b> <br>
90 These changes break binary compatibility; libarchive3 has a
91 new shared library version to reflect these changes. The
92 library now uses portable wide types such as int64_t instead
93 of less-portable types such as off_t, gid_t, uid_t, and
94 ino_t.</p>
95
96 <p style="margin-left:6%; margin-top: 1em">There are a few
97 cases where these changes will affect your source code:</p>
98
99 <p style="margin-top: 1em"><b>&bull;</b></p>
100
101 <p style="margin-left:13%;">In some cases,
102 libarchive&rsquo;s wider types will introduce the
103 possibility of truncation: for example, on a system with a
104 16-bit uid_t, you risk having uid 65536 be truncated to uid
105 0, which can cause serious security problems.</p>
106
107 <p style="margin-top: 1em"><b>&bull;</b></p>
108
109 <p style="margin-left:13%;">Typedef function pointer types
110 will be incompatible. For example, if you define custom skip
111 callbacks, you may have to use code similar to the following
112 if you want to support building against libarchive2 and
113 libarchive3:</p>
114
115 <p style="margin-left:13%; margin-top: 1em">#if
116 ARCHIVE_VERSION_NUMBER &lt; 3000000 <br>
117 typedef off_t myoff_t; <br>
118 #else <br>
119 typedef int64_t myoff_t; <br>
120 #endif</p>
121
122 <p style="margin-left:13%; margin-top: 1em">myoff_t <br>
123 my_skip_function(struct archive *a, void *v, myoff_t o) <br>
124 { <br>
125 ... implementation ... <br>
126 }</p>
127
128 <p style="margin-left:6%; margin-top: 1em">Affected
129 functions:</p>
130
131 <p style="margin-top: 1em"><b>&bull; <br>
132 archive_entry_gid</b>(), <b>archive_entry_set_gid</b>()
133 <b><br>
134 &bull; <br>
135 archive_entry_uid</b>(), <b>archive_entry_set_uid</b>()
136 <b><br>
137 &bull; <br>
138 archive_entry_ino</b>(), <b>archive_entry_set_ino</b>()
139 <b><br>
140 &bull; <br>
141 archive_read_data_block</b>(),
142 <b>archive_write_data_block</b>() <b><br>
143 &bull; <br>
144 archive_read_disk_gname</b>(),
145 <b>archive_read_disk_uname</b>() <b><br>
146 &bull; <br>
147 archive_read_disk_set_gname_lookup</b>(),
148 <b>archive_read_disk_set_group_lookup</b>(),
149 <b>archive_read_disk_set_uname_lookup</b>(),
150 <b>archive_read_disk_set_user_lookup</b>() <b><br>
151 &bull;</b></p>
152
153
154 <p style="margin-left:12%;"><b>archive_skip_callback</b>()</p>
155
156 <p><b>&bull; <br>
157 archive_read_extract_set_skip_file</b>(),
158 <b>archive_write_disk_set_skip_file</b>(),
159 <b>archive_write_set_skip_file</b>() <b><br>
160 &bull; <br>
161 archive_write_disk_set_group_lookup</b>(),
162 <b>archive_write_disk_set_user_lookup</b>()</p>
163
164 <p style="margin-left:6%; margin-top: 1em">Where these
165 functions or their arguments took or returned gid_t, ino_t,
166 off_t, or uid_t they now take or return int64_t or
167 equivalent.</p>
168
169 <p style="margin-left:6%; margin-top: 1em"><b>Deprecated
170 Symbols</b> <br>
171 Symbols deprecated in libarchive3 will be removed in
172 libarchive4. These symbols, along with their replacements if
173 any, are listed below:</p>
174
175
176 <p style="margin-top: 1em"><b>archive_position_compressed</b>(),
177 <b>archive_position_uncompressed</b>()</p>
178
179
180 <p style="margin-left:13%;"><b>archive_filter_bytes</b>()</p>
181
182
183 <p style="margin-top: 1em"><b>archive_compression</b>()</p>
184
185
186 <p style="margin-left:13%;"><b>archive_filter_code</b>()</p>
187
188
189 <p style="margin-top: 1em"><b>archive_compression_name</b>()</p>
190
191
192 <p style="margin-left:13%;"><b>archive_filter_name</b>()</p>
193
194 <p style="margin-top: 1em"><b>archive_read_finish</b>(),
195 <b>archive_write_finish</b>()</p>
196
197 <p style="margin-left:13%;"><b>archive_read_free</b>(),
198 <b>archive_write_free</b>()</p>
199
200
201 <p style="margin-top: 1em"><b>archive_read_open_file</b>(),
202 <b>archive_write_open_file</b>()</p>
203
204
205 <p style="margin-left:13%;"><b>archive_read_open_filename</b>(),
206 <b>archive_write_open_filename</b>()</p>
207
208
209 <p style="margin-top: 1em"><b>archive_read_support_compression_all</b>()</p>
210
211
212 <p style="margin-left:13%;"><b>archive_read_support_filter_all</b>()</p>
213
214
215 <p style="margin-top: 1em"><b>archive_read_support_compression_bzip2</b>()</p>
216
217
218 <p style="margin-left:13%;"><b>archive_read_support_filter_bzip2</b>()</p>
219
220
221 <p style="margin-top: 1em"><b>archive_read_support_compression_compress</b>()</p>
222
223
224 <p style="margin-left:13%;"><b>archive_read_support_filter_compress</b>()</p>
225
226
227 <p style="margin-top: 1em"><b>archive_read_support_compression_gzip</b>()</p>
228
229
230 <p style="margin-left:13%;"><b>archive_read_support_filter_gzip</b>()</p>
231
232
233 <p style="margin-top: 1em"><b>archive_read_support_compression_lzip</b>()</p>
234
235
236 <p style="margin-left:13%;"><b>archive_read_support_filter_lzip</b>()</p>
237
238
239 <p style="margin-top: 1em"><b>archive_read_support_compression_lzma</b>()</p>
240
241
242 <p style="margin-left:13%;"><b>archive_read_support_filter_lzma</b>()</p>
243
244
245 <p style="margin-top: 1em"><b>archive_read_support_compression_none</b>()</p>
246
247
248 <p style="margin-left:13%;"><b>archive_read_support_filter_none</b>()</p>
249
250
251 <p style="margin-top: 1em"><b>archive_read_support_compression_program</b>()</p>
252
253
254 <p style="margin-left:13%;"><b>archive_read_support_filter_program</b>()</p>
255
256
257 <p style="margin-top: 1em"><b>archive_read_support_compression_program_signature</b>()</p>
258
259
260 <p style="margin-left:13%;"><b>archive_read_support_filter_program_signature</b>()</p>
261
262
263 <p style="margin-top: 1em"><b>archive_read_support_compression_rpm</b>()</p>
264
265
266 <p style="margin-left:13%;"><b>archive_read_support_filter_rpm</b>()</p>
267
268
269 <p style="margin-top: 1em"><b>archive_read_support_compression_uu</b>()</p>
270
271
272 <p style="margin-left:13%;"><b>archive_read_support_filter_uu</b>()</p>
273
274
275 <p style="margin-top: 1em"><b>archive_read_support_compression_xz</b>()</p>
276
277
278 <p style="margin-left:13%;"><b>archive_read_support_filter_xz</b>()</p>
279
280
281 <p style="margin-top: 1em"><b>archive_write_set_compression_bzip2</b>()</p>
282
283
284 <p style="margin-left:13%;"><b>archive_write_add_filter_bzip2</b>()</p>
285
286
287 <p style="margin-top: 1em"><b>archive_write_set_compression_compress</b>()</p>
288
289
290 <p style="margin-left:13%;"><b>archive_write_add_filter_compress</b>()</p>
291
292
293 <p style="margin-top: 1em"><b>archive_write_set_compression_gzip</b>()</p>
294
295
296 <p style="margin-left:13%;"><b>archive_write_add_filter_gzip</b>()</p>
297
298
299 <p style="margin-top: 1em"><b>archive_write_set_compression_lzip</b>()</p>
300
301
302 <p style="margin-left:13%;"><b>archive_write_add_filter_lzip</b>()</p>
303
304
305 <p style="margin-top: 1em"><b>archive_write_set_compression_lzma</b>()</p>
306
307
308 <p style="margin-left:13%;"><b>archive_write_add_filter_lzma</b>()</p>
309
310
311 <p style="margin-top: 1em"><b>archive_write_set_compression_none</b>()</p>
312
313
314 <p style="margin-left:13%;"><b>archive_write_add_filter_none</b>()</p>
315
316
317 <p style="margin-top: 1em"><b>archive_write_set_compression_program</b>()</p>
318
319
320 <p style="margin-left:13%;"><b>archive_write_add_filter_program</b>()</p>
321
322
323 <p style="margin-top: 1em"><b>archive_write_set_compression_filter</b>()</p>
324
325
326 <p style="margin-left:13%;"><b>archive_write_add_filter_filter</b>()</p>
327
328 <p style="margin-left:6%; margin-top: 1em"><b>Removed
329 Symbols</b> <br>
330 These symbols, listed below along with their replacements if
331 any, were deprecated in libarchive2, and are not part of
332 libarchive3.</p>
333
334
335 <p style="margin-top: 1em"><b>archive_api_feature</b>()</p>
336
337
338 <p style="margin-left:13%;"><b>archive_version_number</b>()</p>
339
340
341 <p style="margin-top: 1em"><b>archive_api_version</b>()</p>
342
343
344 <p style="margin-left:13%;"><b>archive_version_number</b>()</p>
345
346 <p style="margin-top: 1em"><b>archive_version</b>()</p>
347
348
349 <p style="margin-left:13%;"><b>archive_version_string</b>()</p>
350
351
352 <p style="margin-top: 1em"><b>archive_version_stamp</b>()</p>
353
354
355 <p style="margin-left:13%;"><b>archive_version_number</b>()</p>
356
357
358 <p style="margin-top: 1em"><b>archive_read_set_filter_options</b>()</p>
359
360
361 <p style="margin-left:13%;"><b>archive_read_set_options</b>()
362 or <b>archive_read_set_filter_option</b>()</p>
363
364
365 <p style="margin-top: 1em"><b>archive_read_set_format_options</b>()</p>
366
367
368 <p style="margin-left:13%;"><b>archive_read_set_options</b>()
369 or <b>archive_read_set_format_option</b>()</p>
370
371
372 <p style="margin-top: 1em"><b>archive_write_set_filter_options</b>()</p>
373
374
375 <p style="margin-left:13%;"><b>archive_write_set_options</b>()
376 or <b>archive_write_set_filter_option</b>()</p>
377
378
379 <p style="margin-top: 1em"><b>archive_write_set_format_options</b>()</p>
380
381
382 <p style="margin-left:13%;"><b>archive_write_set_options</b>()
383 or <b>archive_write_set_format_option</b>()</p>
384
385 <p style="margin-top: 1em">ARCHIVE_API_FEATURE</p>
386
387 <p style="margin-left:13%;">ARCHIVE_VERSION_NUMBER</p>
388
389 <p style="margin-top: 1em">ARCHIVE_API_VERSION</p>
390
391 <p style="margin-left:13%;">ARCHIVE_VERSION_NUMBER</p>
392
393 <p style="margin-top: 1em">ARCHIVE_VERSION_STAMP</p>
394
395 <p style="margin-left:13%;">ARCHIVE_VERSION_NUMBER</p>
396
397 <p style="margin-top: 1em">ARCHIVE_LIBRARY_VERSION</p>
398
399 <p style="margin-left:13%;">ARCHIVE_VERSION_STRING</p>
400
401 <p style="margin-top: 1em">ARCHIVE_COMPRESSION_NONE</p>
402
403 <p style="margin-left:13%;">ARCHIVE_FILTER_NONE</p>
404
405 <p style="margin-top: 1em">ARCHIVE_COMPRESSION_GZIP</p>
406
407 <p style="margin-left:13%;">ARCHIVE_FILTER_GZIP</p>
408
409 <p style="margin-top: 1em">ARCHIVE_COMPRESSION_BZIP2</p>
410
411 <p style="margin-left:13%;">ARCHIVE_FILTER_BZIP2</p>
412
413
414 <p style="margin-top: 1em">ARCHIVE_COMPRESSION_COMPRESS</p>
415
416 <p style="margin-left:13%;">ARCHIVE_FILTER_COMPRESS</p>
417
418 <p style="margin-top: 1em">ARCHIVE_COMPRESSION_PROGRAM</p>
419
420 <p style="margin-left:13%;">ARCHIVE_FILTER_PROGRAM</p>
421
422 <p style="margin-top: 1em">ARCHIVE_COMPRESSION_LZMA</p>
423
424 <p style="margin-left:13%;">ARCHIVE_FILTER_LZMA</p>
425
426 <p style="margin-top: 1em">ARCHIVE_COMPRESSION_XZ</p>
427
428 <p style="margin-left:13%;">ARCHIVE_FILTER_XZ</p>
429
430 <p style="margin-top: 1em">ARCHIVE_COMPRESSION_UU</p>
431
432 <p style="margin-left:13%;">ARCHIVE_FILTER_UU</p>
433
434 <p style="margin-top: 1em">ARCHIVE_COMPRESSION_RPM</p>
435
436 <p style="margin-left:13%;">ARCHIVE_FILTER_RPM</p>
437
438 <p style="margin-top: 1em">ARCHIVE_COMPRESSION_LZIP</p>
439
440 <p style="margin-left:13%;">ARCHIVE_FILTER_LZIP</p>
441
442 <p style="margin-top: 1em">ARCHIVE_BYTES_PER_RECORD</p>
443
444 <p style="margin-left:13%;">512</p>
445
446
447 <p style="margin-top: 1em">ARCHIVE_DEFAULT_BYTES_PER_BLOCK</p>
448
449 <p style="margin-left:13%;">10240</p>
450
451 <p style="margin-top: 1em"><b>SEE ALSO</b></p>
452
453 <p style="margin-left:6%;">libarchive(3), archive_read(3),
454 archive_read_filter(3), archive_read_format(3),
455 archive_read_set_options(3), archive_write(3),
456 archive_write_filter(3), archive_write_format(3),
457 archive_write_set_options(3), archive_util(3)</p>
458
459 <p style="margin-left:6%; margin-top: 1em">BSD
460 December&nbsp;23, 2011 BSD</p>
461 <hr>
462 </body>
463 </html>