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">
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 }
23 <p>LIBARCHIVE_CHANGES(3) BSD Library Functions Manual
24 LIBARCHIVE_CHANGES(3)</p>
26 <p style="margin-top: 1em"><b>NAME</b></p>
28 <p style="margin-left:6%;">— changes in libarchive
31 <p style="margin-top: 1em"><b>CHANGES IN LIBARCHIVE
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>
39 <p style="margin-left:6%; margin-top: 1em"><b>Multiple
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>
48 <p style="margin-left:6%; margin-top: 1em"><b>Character Set
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>
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 ‘‘default
61 character set for the archive’’. 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>
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>
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>
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>
88 <p style="margin-left:6%; margin-top: 1em"><b>Prototype
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
96 <p style="margin-left:6%; margin-top: 1em">There are a few
97 cases where these changes will affect your source code:</p>
99 <p style="margin-top: 1em"><b>•</b></p>
101 <p style="margin-left:13%;">In some cases,
102 libarchive’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>
107 <p style="margin-top: 1em"><b>•</b></p>
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
115 <p style="margin-left:13%; margin-top: 1em">#if
116 ARCHIVE_VERSION_NUMBER < 3000000 <br>
117 typedef off_t myoff_t; <br>
119 typedef int64_t myoff_t; <br>
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>
125 ... implementation ... <br>
128 <p style="margin-left:6%; margin-top: 1em">Affected
131 <p style="margin-top: 1em"><b>• <br>
132 archive_entry_gid</b>(), <b>archive_entry_set_gid</b>()
135 archive_entry_uid</b>(), <b>archive_entry_set_uid</b>()
138 archive_entry_ino</b>(), <b>archive_entry_set_ino</b>()
141 archive_read_data_block</b>(),
142 <b>archive_write_data_block</b>() <b><br>
144 archive_read_disk_gname</b>(),
145 <b>archive_read_disk_uname</b>() <b><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>
154 <p style="margin-left:12%;"><b>archive_skip_callback</b>()</p>
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>
161 archive_write_disk_set_group_lookup</b>(),
162 <b>archive_write_disk_set_user_lookup</b>()</p>
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
169 <p style="margin-left:6%; margin-top: 1em"><b>Deprecated
171 Symbols deprecated in libarchive3 will be removed in
172 libarchive4. These symbols, along with their replacements if
173 any, are listed below:</p>
176 <p style="margin-top: 1em"><b>archive_position_compressed</b>(),
177 <b>archive_position_uncompressed</b>()</p>
180 <p style="margin-left:13%;"><b>archive_filter_bytes</b>()</p>
183 <p style="margin-top: 1em"><b>archive_compression</b>()</p>
186 <p style="margin-left:13%;"><b>archive_filter_code</b>()</p>
189 <p style="margin-top: 1em"><b>archive_compression_name</b>()</p>
192 <p style="margin-left:13%;"><b>archive_filter_name</b>()</p>
194 <p style="margin-top: 1em"><b>archive_read_finish</b>(),
195 <b>archive_write_finish</b>()</p>
197 <p style="margin-left:13%;"><b>archive_read_free</b>(),
198 <b>archive_write_free</b>()</p>
201 <p style="margin-top: 1em"><b>archive_read_open_file</b>(),
202 <b>archive_write_open_file</b>()</p>
205 <p style="margin-left:13%;"><b>archive_read_open_filename</b>(),
206 <b>archive_write_open_filename</b>()</p>
209 <p style="margin-top: 1em"><b>archive_read_support_compression_all</b>()</p>
212 <p style="margin-left:13%;"><b>archive_read_support_filter_all</b>()</p>
215 <p style="margin-top: 1em"><b>archive_read_support_compression_bzip2</b>()</p>
218 <p style="margin-left:13%;"><b>archive_read_support_filter_bzip2</b>()</p>
221 <p style="margin-top: 1em"><b>archive_read_support_compression_compress</b>()</p>
224 <p style="margin-left:13%;"><b>archive_read_support_filter_compress</b>()</p>
227 <p style="margin-top: 1em"><b>archive_read_support_compression_gzip</b>()</p>
230 <p style="margin-left:13%;"><b>archive_read_support_filter_gzip</b>()</p>
233 <p style="margin-top: 1em"><b>archive_read_support_compression_lzip</b>()</p>
236 <p style="margin-left:13%;"><b>archive_read_support_filter_lzip</b>()</p>
239 <p style="margin-top: 1em"><b>archive_read_support_compression_lzma</b>()</p>
242 <p style="margin-left:13%;"><b>archive_read_support_filter_lzma</b>()</p>
245 <p style="margin-top: 1em"><b>archive_read_support_compression_none</b>()</p>
248 <p style="margin-left:13%;"><b>archive_read_support_filter_none</b>()</p>
251 <p style="margin-top: 1em"><b>archive_read_support_compression_program</b>()</p>
254 <p style="margin-left:13%;"><b>archive_read_support_filter_program</b>()</p>
257 <p style="margin-top: 1em"><b>archive_read_support_compression_program_signature</b>()</p>
260 <p style="margin-left:13%;"><b>archive_read_support_filter_program_signature</b>()</p>
263 <p style="margin-top: 1em"><b>archive_read_support_compression_rpm</b>()</p>
266 <p style="margin-left:13%;"><b>archive_read_support_filter_rpm</b>()</p>
269 <p style="margin-top: 1em"><b>archive_read_support_compression_uu</b>()</p>
272 <p style="margin-left:13%;"><b>archive_read_support_filter_uu</b>()</p>
275 <p style="margin-top: 1em"><b>archive_read_support_compression_xz</b>()</p>
278 <p style="margin-left:13%;"><b>archive_read_support_filter_xz</b>()</p>
281 <p style="margin-top: 1em"><b>archive_write_set_compression_bzip2</b>()</p>
284 <p style="margin-left:13%;"><b>archive_write_add_filter_bzip2</b>()</p>
287 <p style="margin-top: 1em"><b>archive_write_set_compression_compress</b>()</p>
290 <p style="margin-left:13%;"><b>archive_write_add_filter_compress</b>()</p>
293 <p style="margin-top: 1em"><b>archive_write_set_compression_gzip</b>()</p>
296 <p style="margin-left:13%;"><b>archive_write_add_filter_gzip</b>()</p>
299 <p style="margin-top: 1em"><b>archive_write_set_compression_lzip</b>()</p>
302 <p style="margin-left:13%;"><b>archive_write_add_filter_lzip</b>()</p>
305 <p style="margin-top: 1em"><b>archive_write_set_compression_lzma</b>()</p>
308 <p style="margin-left:13%;"><b>archive_write_add_filter_lzma</b>()</p>
311 <p style="margin-top: 1em"><b>archive_write_set_compression_none</b>()</p>
314 <p style="margin-left:13%;"><b>archive_write_add_filter_none</b>()</p>
317 <p style="margin-top: 1em"><b>archive_write_set_compression_program</b>()</p>
320 <p style="margin-left:13%;"><b>archive_write_add_filter_program</b>()</p>
323 <p style="margin-top: 1em"><b>archive_write_set_compression_filter</b>()</p>
326 <p style="margin-left:13%;"><b>archive_write_add_filter_filter</b>()</p>
328 <p style="margin-left:6%; margin-top: 1em"><b>Removed
330 These symbols, listed below along with their replacements if
331 any, were deprecated in libarchive2, and are not part of
335 <p style="margin-top: 1em"><b>archive_api_feature</b>()</p>
338 <p style="margin-left:13%;"><b>archive_version_number</b>()</p>
341 <p style="margin-top: 1em"><b>archive_api_version</b>()</p>
344 <p style="margin-left:13%;"><b>archive_version_number</b>()</p>
346 <p style="margin-top: 1em"><b>archive_version</b>()</p>
349 <p style="margin-left:13%;"><b>archive_version_string</b>()</p>
352 <p style="margin-top: 1em"><b>archive_version_stamp</b>()</p>
355 <p style="margin-left:13%;"><b>archive_version_number</b>()</p>
358 <p style="margin-top: 1em"><b>archive_read_set_filter_options</b>()</p>
361 <p style="margin-left:13%;"><b>archive_read_set_options</b>()
362 or <b>archive_read_set_filter_option</b>()</p>
365 <p style="margin-top: 1em"><b>archive_read_set_format_options</b>()</p>
368 <p style="margin-left:13%;"><b>archive_read_set_options</b>()
369 or <b>archive_read_set_format_option</b>()</p>
372 <p style="margin-top: 1em"><b>archive_write_set_filter_options</b>()</p>
375 <p style="margin-left:13%;"><b>archive_write_set_options</b>()
376 or <b>archive_write_set_filter_option</b>()</p>
379 <p style="margin-top: 1em"><b>archive_write_set_format_options</b>()</p>
382 <p style="margin-left:13%;"><b>archive_write_set_options</b>()
383 or <b>archive_write_set_format_option</b>()</p>
385 <p style="margin-top: 1em">ARCHIVE_API_FEATURE</p>
387 <p style="margin-left:13%;">ARCHIVE_VERSION_NUMBER</p>
389 <p style="margin-top: 1em">ARCHIVE_API_VERSION</p>
391 <p style="margin-left:13%;">ARCHIVE_VERSION_NUMBER</p>
393 <p style="margin-top: 1em">ARCHIVE_VERSION_STAMP</p>
395 <p style="margin-left:13%;">ARCHIVE_VERSION_NUMBER</p>
397 <p style="margin-top: 1em">ARCHIVE_LIBRARY_VERSION</p>
399 <p style="margin-left:13%;">ARCHIVE_VERSION_STRING</p>
401 <p style="margin-top: 1em">ARCHIVE_COMPRESSION_NONE</p>
403 <p style="margin-left:13%;">ARCHIVE_FILTER_NONE</p>
405 <p style="margin-top: 1em">ARCHIVE_COMPRESSION_GZIP</p>
407 <p style="margin-left:13%;">ARCHIVE_FILTER_GZIP</p>
409 <p style="margin-top: 1em">ARCHIVE_COMPRESSION_BZIP2</p>
411 <p style="margin-left:13%;">ARCHIVE_FILTER_BZIP2</p>
414 <p style="margin-top: 1em">ARCHIVE_COMPRESSION_COMPRESS</p>
416 <p style="margin-left:13%;">ARCHIVE_FILTER_COMPRESS</p>
418 <p style="margin-top: 1em">ARCHIVE_COMPRESSION_PROGRAM</p>
420 <p style="margin-left:13%;">ARCHIVE_FILTER_PROGRAM</p>
422 <p style="margin-top: 1em">ARCHIVE_COMPRESSION_LZMA</p>
424 <p style="margin-left:13%;">ARCHIVE_FILTER_LZMA</p>
426 <p style="margin-top: 1em">ARCHIVE_COMPRESSION_XZ</p>
428 <p style="margin-left:13%;">ARCHIVE_FILTER_XZ</p>
430 <p style="margin-top: 1em">ARCHIVE_COMPRESSION_UU</p>
432 <p style="margin-left:13%;">ARCHIVE_FILTER_UU</p>
434 <p style="margin-top: 1em">ARCHIVE_COMPRESSION_RPM</p>
436 <p style="margin-left:13%;">ARCHIVE_FILTER_RPM</p>
438 <p style="margin-top: 1em">ARCHIVE_COMPRESSION_LZIP</p>
440 <p style="margin-left:13%;">ARCHIVE_FILTER_LZIP</p>
442 <p style="margin-top: 1em">ARCHIVE_BYTES_PER_RECORD</p>
444 <p style="margin-left:13%;">512</p>
447 <p style="margin-top: 1em">ARCHIVE_DEFAULT_BYTES_PER_BLOCK</p>
449 <p style="margin-left:13%;">10240</p>
451 <p style="margin-top: 1em"><b>SEE ALSO</b></p>
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>
459 <p style="margin-left:6%; margin-top: 1em">BSD
460 December 23, 2011 BSD</p>