]> git.ipfire.org Git - thirdparty/libarchive.git/log
thirdparty/libarchive.git
14 years agoFix build failure through cmake on linux.
Michihiro NAKAJIMA [Tue, 10 May 2011 14:53:42 +0000 (10:53 -0400)] 
Fix build failure through cmake on linux.
It needs some macro such as _GNU_SOURCE to use extension functions.

including previous changes of build/cmake/config.h.in.

SVN-Revision: 3293

14 years agoProperly detect iconv with cmake on linux.
Michihiro NAKAJIMA [Tue, 10 May 2011 14:34:44 +0000 (10:34 -0400)] 
Properly detect iconv with cmake on linux.

SVN-Revision: 3292

14 years agoAccording to Public Review Issue #121 at unicode.org http://unicode.org/review/pr...
Michihiro NAKAJIMA [Tue, 10 May 2011 12:55:01 +0000 (08:55 -0400)] 
According to Public Review Issue #121 at unicode.org http://unicode.org/review/pr-121.html , we should use U+FFFD for ill-formed subsequences.

SVN-Revision: 3291

14 years agoContinue a string conversion even if the normalization failed.
Michihiro NAKAJIMA [Tue, 10 May 2011 07:28:50 +0000 (03:28 -0400)] 
Continue a string conversion even if the normalization failed.

SVN-Revision: 3290

14 years agoDump unicode code points when comparing UTF-8 strings fail at
Michihiro NAKAJIMA [Mon, 9 May 2011 12:19:07 +0000 (08:19 -0400)] 
Dump unicode code points when comparing UTF-8 strings fail at
test_read_format_cab_filename and test_read_format_zip_filename.

SVN-Revision: 3289

14 years agoImplement a string conversion interface to archive_entry and archive_mstring
Michihiro NAKAJIMA [Mon, 9 May 2011 12:07:31 +0000 (08:07 -0400)] 
Implement a string conversion interface to archive_entry and archive_mstring
for efficient string conversion. Some platform have to do a string conversion
through wide characters. And then Windows platform cannot make locale UTF-8,
so it means use of wide characters is only way to make a internationalization
program.

SVN-Revision: 3288

14 years agoThe text conversion functions are in CoreServices.framework
Tim Kientzle [Sun, 8 May 2011 16:40:39 +0000 (12:40 -0400)] 
The text conversion functions are in CoreServices.framework

SVN-Revision: 3287

14 years agoOn Mac OS, Link CoreFoundation to avoid build failure.
Michihiro NAKAJIMA [Sat, 7 May 2011 12:49:28 +0000 (08:49 -0400)] 
On Mac OS, Link CoreFoundation to avoid build failure.

SVN-Revision: 3286

14 years agoOn Windows, merge two versions of the string conversion code between WCS and MBS.
Michihiro NAKAJIMA [Fri, 6 May 2011 06:41:08 +0000 (02:41 -0400)] 
On Windows, merge two versions of the string conversion code between WCS and MBS.

SVN-Revision: 3285

14 years agoFix build failure on Mac OS X.
Michihiro NAKAJIMA [Fri, 6 May 2011 04:47:55 +0000 (00:47 -0400)] 
Fix build failure on Mac OS X.

SVN-Revision: 3284

14 years agoChange the interface of archive_mstring_get_{utf8,mbs,wcs} so that we will be able...
Michihiro NAKAJIMA [Thu, 5 May 2011 12:52:14 +0000 (08:52 -0400)] 
Change the interface of archive_mstring_get_{utf8,mbs,wcs} so that we will be able to know the conversion result.

SVN-Revision: 3283

14 years agoChange a return code of archive_mstring_update_utf8() function;
Michihiro NAKAJIMA [Thu, 5 May 2011 11:38:18 +0000 (07:38 -0400)] 
Change a return code of archive_mstring_update_utf8() function;
  1 ==> 0 : success.
  0 ==> -1: failure.

SVN-Revision: 3282

14 years agoOn Mac OS, Use ConvertFromUnicodeToText() for decomposition instead of iconv.
Michihiro NAKAJIMA [Thu, 5 May 2011 06:36:24 +0000 (02:36 -0400)] 
On Mac OS, Use ConvertFromUnicodeToText() for decomposition instead of iconv.

SVN-Revision: 3281

14 years agoAdd assertEqualUTF8String. If two strings are not equal, that will dump their code...
Michihiro NAKAJIMA [Wed, 4 May 2011 11:05:49 +0000 (07:05 -0400)] 
Add assertEqualUTF8String. If two strings are not equal, that will dump their code points.

SVN-Revision: 3280

14 years agoEliminate an unused variable.
Michihiro NAKAJIMA [Wed, 4 May 2011 10:07:58 +0000 (06:07 -0400)] 
Eliminate an unused variable.

SVN-Revision: 3279

14 years agoDo not lose some conversion error.
Michihiro NAKAJIMA [Wed, 4 May 2011 09:26:25 +0000 (05:26 -0400)] 
Do not lose some conversion error.

SVN-Revision: 3278

14 years agoIssue 106.
Michihiro NAKAJIMA [Wed, 4 May 2011 06:00:59 +0000 (02:00 -0400)] 
Issue 106.
Check the result of FIEMAP because there is a possibility the result
has adjacent extents though the file is not sparse. So we should
clear the sparse data if it indicates the whole file.

SVN-Revision: 3277

14 years agoRemove local string conversion code from xar writer. I forgot and missed that code.
Michihiro NAKAJIMA [Tue, 3 May 2011 12:43:50 +0000 (08:43 -0400)] 
Remove local string conversion code from xar writer. I forgot and missed that code.

SVN-Revision: 3276

14 years agoIf the character-set of filenames in archives is UTF-8, we should automatically
Michihiro NAKAJIMA [Tue, 3 May 2011 09:37:31 +0000 (05:37 -0400)] 
If the character-set of filenames in archives is UTF-8, we should automatically
normalize it to avoid the scene that two filenames in one directory are, of course,
different byte sequence but they have the same sight because of NFD and NFC.
Second reason is that iconv cannot correctly convert NFD characters to other
character-set so we have to convert NFD to NFC before iconv handle it unless
iconv supports UTF-8-MAC. Third reason is for matching filenames, if filenames
in archives are NFD and the platform is not MAC OS, the uses cannot specify
the filename the uses want to extract although the users can see the filename
by listing. Recently NFD can be displayed on some platforms but creating NFD
requires character-set conversion utility, in particular that input of NFD
string is hard on Windows platform.

SVN-Revision: 3275

14 years agoProperly check if something error occured and report it after calling
Michihiro NAKAJIMA [Fri, 29 Apr 2011 03:49:07 +0000 (23:49 -0400)] 
Properly check if something error occured and report it after calling
readdir_r() and readdir().

SVN-Revision: 3274

14 years agoFix build failure when readdir_r() is not available.
Michihiro NAKAJIMA [Fri, 29 Apr 2011 03:48:02 +0000 (23:48 -0400)] 
Fix build failure when readdir_r() is not available.

SVN-Revision: 3273

14 years agoRefactor the read_open() routines into a collection of
Tim Kientzle [Tue, 26 Apr 2011 06:02:43 +0000 (02:02 -0400)] 
Refactor the read_open() routines into a collection of
single setters to set the callbacks, and a simple
archive_read_open1(a) that uses the callbacks already
registered.
In particular, this will make it easier to extend the
API in the future with new callbacks.

SVN-Revision: 3272

14 years agoCorrect a length argument to invalid_mbs().
Michihiro NAKAJIMA [Mon, 25 Apr 2011 10:44:29 +0000 (06:44 -0400)] 
Correct a length argument to invalid_mbs().

SVN-Revision: 3271

14 years agoReduce redundancy code about a NULL check of a string object value.
Michihiro NAKAJIMA [Mon, 25 Apr 2011 10:42:43 +0000 (06:42 -0400)] 
Reduce redundancy code about a NULL check of a string object value.

SVN-Revision: 3270

14 years agoRename IS_SURROGATE macro to IS_SURROGATE_PAIR_LA.
Michihiro NAKAJIMA [Mon, 25 Apr 2011 10:03:52 +0000 (06:03 -0400)] 
Rename IS_SURROGATE macro to IS_SURROGATE_PAIR_LA.

SVN-Revision: 3269

14 years agoRename strncat_from_utf8_utf8 function to strncat_from_utf8_to_utf8.
Michihiro NAKAJIMA [Mon, 25 Apr 2011 10:00:58 +0000 (06:00 -0400)] 
Rename strncat_from_utf8_utf8 function to strncat_from_utf8_to_utf8.

SVN-Revision: 3268

14 years agoGet rid of a hdrcharset option support from xar reader. It is almost useless for xar
Michihiro NAKAJIMA [Mon, 25 Apr 2011 09:48:25 +0000 (05:48 -0400)] 
Get rid of a hdrcharset option support from xar reader. It is almost useless for xar
since the options would be used only when the users needed to convert filenames
from UTF-8-MAC to UTF-8, but, unfortunately, UTF-8-MAC is not usually supported
by iconv/libiconv(including packages system such as FreeBSD ports or NetBSD pkgsrc)
except MAC OS, while the patch for libiconv has been available for many years.
That means users will not use UTF-8-MAC unless the users could build libiconv with
custom libiconv for UTF-8-MAC.

SVN-Revision: 3267

14 years agoUse en_US.UTF-8 instead of de_DE.UTF-8 at test_entry and test_pax_filename_encoding
Michihiro NAKAJIMA [Mon, 25 Apr 2011 09:11:42 +0000 (05:11 -0400)] 
Use en_US.UTF-8 instead of de_DE.UTF-8 at test_entry and test_pax_filename_encoding
because  it seems en_US.UTF-8 is widely supported by default more than de_DE.UTF-8.
For example, Ubuntu has installed "C" and en_*.UTF-8 locales whatever locale would
be selected by default but de_DE.UTF-8 is not.

SVN-Revision: 3266

14 years agoSuppress leading zeros: Print version as "3.0.0a" instead of "3.000.000a"
Tim Kientzle [Sun, 24 Apr 2011 07:13:03 +0000 (03:13 -0400)] 
Suppress leading zeros:  Print version as "3.0.0a" instead of "3.000.000a"

SVN-Revision: 3265

14 years agoProperly initialize a string conversion object.
Michihiro NAKAJIMA [Fri, 22 Apr 2011 08:12:09 +0000 (04:12 -0400)] 
Properly initialize a string conversion object.

SVN-Revision: 3264

14 years agoSkip test_compat_pax_libarchive_2x when the WCS of the platform is not Unicode.
Michihiro NAKAJIMA [Thu, 21 Apr 2011 08:29:00 +0000 (04:29 -0400)] 
Skip test_compat_pax_libarchive_2x when the WCS of the platform is not Unicode.

SVN-Revision: 3263

14 years agoAvoid a conflict of macro names on Visual Studio 9 and MSYS.
Michihiro NAKAJIMA [Thu, 21 Apr 2011 07:38:48 +0000 (03:38 -0400)] 
Avoid a conflict of macro names on Visual Studio 9 and MSYS.

SVN-Revision: 3262

14 years agoUpdate comments and rename a macro SCONV_UTF8_UTF8_COPY to SCONV_COPY_UTF8_TO_UTF8.
Michihiro NAKAJIMA [Wed, 20 Apr 2011 17:28:50 +0000 (13:28 -0400)] 
Update comments and rename a macro SCONV_UTF8_UTF8_COPY to SCONV_COPY_UTF8_TO_UTF8.

SVN-Revision: 3261

14 years agoRemove a unused variable.
Michihiro NAKAJIMA [Wed, 20 Apr 2011 15:53:20 +0000 (11:53 -0400)] 
Remove a unused variable.

SVN-Revision: 3260

14 years agoAdd a check for surrogate pairs in UTF-8; Prevent surrogate pairs in UTF-8
Michihiro NAKAJIMA [Wed, 20 Apr 2011 11:28:51 +0000 (07:28 -0400)] 
Add a check for surrogate pairs in UTF-8; Prevent surrogate pairs in UTF-8
from importing and exporting even if using iconv.

SVN-Revision: 3259

14 years agoApparently, locale_charset() is broken on Mac OS.
Tim Kientzle [Wed, 20 Apr 2011 06:18:46 +0000 (02:18 -0400)] 
Apparently, locale_charset() is broken on Mac OS.

SVN-Revision: 3258

14 years agoFix probe for readlinkat(). In particular, it was
Tim Kientzle [Wed, 20 Apr 2011 05:49:49 +0000 (01:49 -0400)] 
Fix probe for readlinkat().  In particular, it was
mis-probed on some older versions of GNU libc.

SVN-Revision: 3257

14 years agoCorrectly disable OpenSSL support even after it's
Tim Kientzle [Wed, 20 Apr 2011 05:42:21 +0000 (01:42 -0400)] 
Correctly disable OpenSSL support even after it's
been enabled.  This requires carefully overriding
CMake cached values.

SVN-Revision: 3256

14 years agoImprove Unicode handling.
Michihiro NAKAJIMA [Tue, 19 Apr 2011 14:51:35 +0000 (10:51 -0400)] 
Improve Unicode handling.
1. The conversion will fail when following conditions since those are not legal Unicode.
 - The code point larger than 0x10FFFF.
 - The code point consist of overlong sequence.
 - There is a surrogate pair in UTF-8 strings. we currently use iconv
   if available, and it does not allow a surrogate pair in UTF-8, so the behavior
   of string_append_from_utf8_to_utf16be() function should match it.
 - There is a incomplete surrogate pair in UTF-16 strings.
2. Use a table for getting bytes of UTF-8 sequence from first byte.
   It is easy to know what code is wrong and how many bytes are following.

SVN-Revision: 3255

14 years agoIntroudce "tar:utf8type=libarchive2x" option for the incorrect UTF-8 string
Michihiro NAKAJIMA [Tue, 19 Apr 2011 07:55:44 +0000 (03:55 -0400)] 
Introudce "tar:utf8type=libarchive2x" option for the incorrect UTF-8 string
which libarchive 2.x makes in wrong assumption about wchar_t. The option works
only for pax format.

Currently libarchive 3 correctly translates UTF-8 string from/to current locale
string, but we cannot accordingly handle the incorrect UTF-8 on the some
platforms wchar_t of which is not Unicode and users are not using UTF-8 locale.
So we should support the UTF-8 string to be properly translated to current
locale string.

SVN-Revision: 3254

14 years agoStyle fix.
Michihiro NAKAJIMA [Mon, 18 Apr 2011 09:42:02 +0000 (05:42 -0400)] 
Style fix.

SVN-Revision: 3253

14 years agoImprove test_pax_filename_encoding.
Michihiro NAKAJIMA [Mon, 18 Apr 2011 05:23:17 +0000 (01:23 -0400)] 
Improve test_pax_filename_encoding.
 - add a test for hdrcharset=BINARY.
 - add a test for unacceptalbe names to the hdrcharset option.

SVN-Revision: 3252

14 years agoAdd a test of hdrcharset option for ustar format.
Michihiro NAKAJIMA [Mon, 18 Apr 2011 04:53:34 +0000 (00:53 -0400)] 
Add a test of hdrcharset option for ustar format.

SVN-Revision: 3251

14 years agoChange some of sample files which I recently added, to match its test name.
Michihiro NAKAJIMA [Sun, 17 Apr 2011 16:22:54 +0000 (12:22 -0400)] 
Change some of sample files which I recently added, to match its test name.

SVN-Revision: 3250

14 years agoAdd "else" statement. it's not necessary but it should be.
Michihiro NAKAJIMA [Sun, 17 Apr 2011 08:01:43 +0000 (04:01 -0400)] 
Add "else" statement. it's not necessary but it should be.

SVN-Revision: 3249

14 years agoarchive_read_support_compression_all() is deprecated and will be
Tim Kientzle [Sun, 17 Apr 2011 03:57:56 +0000 (23:57 -0400)] 
archive_read_support_compression_all() is deprecated and will be
removed in libarchive 4.0.

SVN-Revision: 3248

14 years agoIssue 153: Clear error before returning, as found
Tim Kientzle [Sun, 17 Apr 2011 03:57:27 +0000 (23:57 -0400)] 
Issue 153:  Clear error before returning, as found
by Roman Neuhauser's recent testing.

SVN-Revision: 3247

14 years agoAvoid a extra conversion of file times in restoring file times on Windows.
Michihiro NAKAJIMA [Sat, 16 Apr 2011 06:24:13 +0000 (02:24 -0400)] 
Avoid a extra conversion of file times in restoring file times on Windows.

SVN-Revision: 3246

14 years agoTweak a test of cpio date format for Windows.
Michihiro NAKAJIMA [Sat, 16 Apr 2011 06:05:50 +0000 (02:05 -0400)] 
Tweak a test of cpio date format for Windows.

SVN-Revision: 3245

14 years agoUse Widows file handle 'HANDLE' directly in archive_read_disk_windows.c instead of...
Michihiro NAKAJIMA [Sat, 16 Apr 2011 05:27:28 +0000 (01:27 -0400)] 
Use Widows file handle 'HANDLE' directly in archive_read_disk_windows.c instead of POSIX file descriptor.

SVN-Revision: 3244

14 years agoRemove unneeded condition code.
Michihiro NAKAJIMA [Sat, 16 Apr 2011 04:18:25 +0000 (00:18 -0400)] 
Remove unneeded condition code.

SVN-Revision: 3243

14 years agoMove variables only used in directory traversals from struct archive_read_disk to...
Michihiro NAKAJIMA [Sat, 16 Apr 2011 04:08:29 +0000 (00:08 -0400)] 
Move variables only used in directory traversals from struct archive_read_disk to struct tree.

SVN-Revision: 3242

14 years agoFix build error on POSIX platform.
Michihiro NAKAJIMA [Sat, 16 Apr 2011 03:43:08 +0000 (23:43 -0400)] 
Fix build error on POSIX platform.

SVN-Revision: 3241

14 years agoAdd ENABLE_ICONV option to CMake build. At this time the ENABLE_ICONV on Windows...
Michihiro NAKAJIMA [Sat, 16 Apr 2011 02:22:34 +0000 (22:22 -0400)] 
Add ENABLE_ICONV option to CMake build. At this time the ENABLE_ICONV on Windows platform is OFF.
Tweak initial value for CMake option to correctly work on CMake GUI.

SVN-Revision: 3240

14 years agoClean up archive_string.c.
Michihiro NAKAJIMA [Sat, 16 Apr 2011 01:36:41 +0000 (21:36 -0400)] 
Clean up archive_string.c.
 - Correctly work both iconv version and Win32 API version.
 - Reduce #if directive.

SVN-Revision: 3239

14 years agoFix locale_charset detection on CMake to be worked on
Michihiro NAKAJIMA [Fri, 15 Apr 2011 14:53:12 +0000 (10:53 -0400)] 
Fix locale_charset detection on CMake to be worked on
both HAVE_POSIX_ICONV_IN_LIBICONV and HAVE_NONPOSIX_ICONV_IN_LIBICONV.

SVN-Revision: 3238

14 years agoInitialize locale on bsdcpio, and change test_option_t accordingly
Michihiro NAKAJIMA [Fri, 15 Apr 2011 14:37:42 +0000 (10:37 -0400)] 
Initialize locale on bsdcpio, and change test_option_t accordingly
because it compared date format in "C" locale to the output of bsdcpio -t option.

SVN-Revision: 3237

14 years agoImprove test_read_format_zip_filename.
Michihiro NAKAJIMA [Fri, 15 Apr 2011 11:40:33 +0000 (07:40 -0400)] 
Improve test_read_format_zip_filename.
Add the check that zip reader does not translate the filename stored in UTF-8
charset and its UTF-8 Name flag(general purpose flag bit 11) is set
whenever a hdrcharset option is specified.

SVN-Revision: 3236

14 years agoAvoid warning about iconv.h during configure.
Michihiro NAKAJIMA [Fri, 15 Apr 2011 10:53:07 +0000 (06:53 -0400)] 
Avoid warning about iconv.h during configure.

SVN-Revision: 3235

14 years agoUse locale_charset() instead of nl_langinfo(CODESET) for GNU libiconv.
Michihiro NAKAJIMA [Fri, 15 Apr 2011 09:53:13 +0000 (05:53 -0400)] 
Use locale_charset() instead of nl_langinfo(CODESET) for GNU libiconv.
The charset name which nl_langinfo(CODESET) returns is dependent on
the platform and so GNU libiconv will not recognize the charset name
on some platform. It is the same as you pass an empty name "" to iconv,
but that is GNU libiconv specific function although FreeBSD iconv allow
the empty name. I think locale_charset is better than use of "" because
It is easy to know what charset is current when debugging.

SVN-Revision: 3234

14 years agoUpdate comment and sort macros in build/cmake/config.h.in
Michihiro NAKAJIMA [Fri, 15 Apr 2011 08:05:43 +0000 (04:05 -0400)] 
Update comment and sort macros in build/cmake/config.h.in

SVN-Revision: 3233

14 years agoAddtional fix for r3231.
Michihiro NAKAJIMA [Fri, 15 Apr 2011 07:19:17 +0000 (03:19 -0400)] 
Addtional fix for r3231.
I mistook.

SVN-Revision: 3232

14 years agoFix a iconv detection of cmake.
Michihiro NAKAJIMA [Fri, 15 Apr 2011 06:24:00 +0000 (02:24 -0400)] 
Fix a iconv detection of cmake.
- Properly find optional directories such as /usr/local/{include,lib}.
- Use FIND_PATH(ICONV_INCLUDE_DIR iconv.h) instead of
  LA_CHECK_INCLUDE_FILE("iconv.h" HAVE_ICONV_H) because detecting libxml2
  headers uses ICONV_INCLUDE_DIR.

SVN-Revision: 3231

14 years agoImprove archive_string_append_from_wcs() on Windows.
Michihiro NAKAJIMA [Fri, 15 Apr 2011 03:53:56 +0000 (23:53 -0400)] 
Improve archive_string_append_from_wcs() on Windows.
Avoid a use of malloc/free and memory copy.

SVN-Revision: 3230

14 years agoAdd a hdrcharset option test for pax format.
Michihiro NAKAJIMA [Thu, 14 Apr 2011 14:24:35 +0000 (10:24 -0400)] 
Add a hdrcharset option test for pax format.
Whenever hdrcharset option is specified, we will correctly read the filename
stored in UTF-8 charset by default.
For pax format, users can specify charset to BINARY filenames only.

SVN-Revision: 3229

14 years agoAdd a hdrcharset option test for gnutar format.
Michihiro NAKAJIMA [Thu, 14 Apr 2011 12:39:16 +0000 (08:39 -0400)] 
Add a hdrcharset option test for gnutar format.

SVN-Revision: 3228

14 years agoAdd hdrcharset option support for cpio format.
Michihiro NAKAJIMA [Thu, 14 Apr 2011 10:50:43 +0000 (06:50 -0400)] 
Add hdrcharset option support for cpio format.

SVN-Revision: 3227

14 years agoDisable test_pax_filename_encoding_3(), which has been failing recently,
Michihiro NAKAJIMA [Wed, 13 Apr 2011 16:46:59 +0000 (12:46 -0400)] 
Disable test_pax_filename_encoding_3(), which has been failing recently,
until Tim check out and decide the matter.

SVN-Revision: 3226

14 years agoUnbreak build on Linux; correct second argument of futimens().
Michihiro NAKAJIMA [Wed, 13 Apr 2011 16:24:55 +0000 (12:24 -0400)] 
Unbreak build on Linux; correct second argument of futimens().

SVN-Revision: 3225

14 years agoOn Windows, this command line systemf("echo f | bsdcpio -pd copy >copy.out 2>copy...
Michihiro NAKAJIMA [Wed, 13 Apr 2011 13:54:59 +0000 (09:54 -0400)] 
On Windows, this command line systemf("echo f | bsdcpio -pd copy >copy.out 2>copy.err"),
bsdcpio will get a wrong filename "f ". this "echo f| bsdcpio ...." can correctly pass
a intended filename to bsdcpio.

SVN-Revision: 3224

14 years agor3216 was insufficient. It needs father changes.
Michihiro NAKAJIMA [Wed, 13 Apr 2011 13:43:46 +0000 (09:43 -0400)] 
r3216 was insufficient. It needs father changes.
Windows "\\.\" prefix path mechanism does not allow "../" or "./" components.
So if GetLastError() returns ERROR_INVALID_NAME we retry the operation with the corrected name
renamed through __la_win_permissive_name_w(), which returns a canonical path.

SVN-Revision: 3223

14 years agoConsider the large i-node number for the tests using cpio newc format.
Michihiro NAKAJIMA [Wed, 13 Apr 2011 10:43:55 +0000 (06:43 -0400)] 
Consider the large i-node number for the tests using cpio newc format.
Some cpio tests on Cygwin 1.7.x always failed because of the large i-node number.

SVN-Revision: 3222

14 years agoRevert path separator conversion for CYGWIN. I deleted it by mistake when removing...
Michihiro NAKAJIMA [Wed, 13 Apr 2011 04:36:14 +0000 (00:36 -0400)] 
Revert path separator conversion for CYGWIN. I deleted it by mistake when removing Windows support code.

SVN-Revision: 3221

14 years agoFix a fiex existence test for a pattern "../../fileXX".
Michihiro NAKAJIMA [Wed, 13 Apr 2011 03:48:10 +0000 (23:48 -0400)] 
Fix a fiex existence test for a pattern "../../fileXX".

SVN-Revision: 3220

14 years agoApply the default string conversion(mostly OEMCP ==> ACP) to cab reader.
Michihiro NAKAJIMA [Tue, 12 Apr 2011 15:02:35 +0000 (11:02 -0400)] 
Apply the default string conversion(mostly OEMCP ==> ACP) to cab reader.
As you know, it works for Windows platform only.

SVN-Revision: 3219

14 years agoProperly report string conversion failure.
Michihiro NAKAJIMA [Tue, 12 Apr 2011 14:19:25 +0000 (10:19 -0400)] 
Properly report string conversion failure.

SVN-Revision: 3218

14 years agoAllow to apply the charset specified by the hdrcharset option to PAX reader only...
Michihiro NAKAJIMA [Tue, 12 Apr 2011 13:32:57 +0000 (09:32 -0400)] 
Allow to apply the charset specified by the hdrcharset option to PAX reader only when
the the charset described in PAX attribute is BINARY because BINARY means
the the character-set of a bunch of metadata(filname/uname/gname) is unknown.
It might be useful users can specify charset for 'BINARY' metadata, the users
may know a proper charset or try to find what kind of charset correctly convert.

SVN-Revision: 3217

14 years agoFix the problem about full-pathnames handling with the path multiple dirs in one...
Michihiro NAKAJIMA [Tue, 12 Apr 2011 08:39:09 +0000 (04:39 -0400)] 
Fix the problem about full-pathnames handling with the path multiple dirs in one entry.

SVN-Revision: 3216

14 years agoClearly archive_write_disk object on Windows cannot handle Mac MetaData.
Michihiro NAKAJIMA [Tue, 12 Apr 2011 03:50:31 +0000 (23:50 -0400)] 
Clearly archive_write_disk object on Windows cannot handle Mac MetaData.

SVN-Revision: 3215

14 years agoIn archive_write_disk_windows.c, Use the Windows file handle 'HANDLE' instead of...
Michihiro NAKAJIMA [Tue, 12 Apr 2011 03:39:48 +0000 (23:39 -0400)] 
In archive_write_disk_windows.c, Use the Windows file handle 'HANDLE' instead of the POSIX file descriptor.

SVN-Revision: 3214

14 years agoImprove archive_write_disk_windows.c.
Michihiro NAKAJIMA [Mon, 11 Apr 2011 16:46:37 +0000 (12:46 -0400)] 
Improve archive_write_disk_windows.c.
 - Use WCS to pathname. This has made following changes.
 - FindFirstFileW and GetFileInformationByHandle instead of stat/lstat.
 - Move __la_chmod and __la_ftruncate used only in the file from archive_windows.c
   and change it to wide char version.
 - Remove __la_mkdir and directly use CreateDirectoryW in the file.
 - Remove  __la_rmdir and use _wrmdir in the file.
 - Remove __la_unlink and use _wunlink in the file.
 - Remove __la_link and Move la_CreateHardLinkW into the file to use it directly.
 - Use _wopen instead of __la_open.

Unfortunately, at this time we cannot use full-pathname through __la_win_permissive_name_w()
completely at the file because __la_win_permissive_name_w() trim "../". For example, the path
"abc/a/../b../c", which is multi dirs in one entry, will be converted to "<parent-dir>/abc/c",
so we could not make both abc/a and abc/b directories if we applied __la_win_permissive_name_w()
to the path at _archive_write_disk_header().

SVN-Revision: 3213

14 years agoRemove non Windows platform code from archive_write_disk_windows.c
Michihiro NAKAJIMA [Mon, 11 Apr 2011 10:15:14 +0000 (06:15 -0400)] 
Remove non Windows platform code from archive_write_disk_windows.c

SVN-Revision: 3212

14 years agoRemove Windows platform code from archive_write_disk_posix.c
Michihiro NAKAJIMA [Mon, 11 Apr 2011 09:35:51 +0000 (05:35 -0400)] 
Remove Windows platform code from archive_write_disk_posix.c

SVN-Revision: 3211

14 years agoMake two version of archive_write_disk.c by copying and renaming it;
Michihiro NAKAJIMA [Mon, 11 Apr 2011 09:23:29 +0000 (05:23 -0400)] 
Make two version of archive_write_disk.c by copying and renaming it;
one is for POSIX platform, other one is for Windows platform.
The Windows version will be cleaned up and some part of it will be
reimplemented by Win32 API for reducing the overhead simulates POSIX API.

SVN-Revision: 3210

14 years agoDo not compile archive_read_disk_windows.c on POSIX platform.
Michihiro NAKAJIMA [Mon, 11 Apr 2011 05:15:25 +0000 (01:15 -0400)] 
Do not compile archive_read_disk_windows.c on POSIX platform.

SVN-Revision: 3209

14 years agoAdd a wide character version of archive_entry_sourcepath() and archive_entry_copy_sou...
Michihiro NAKAJIMA [Mon, 11 Apr 2011 05:05:52 +0000 (01:05 -0400)] 
Add a wide character version of archive_entry_sourcepath() and archive_entry_copy_sourcepath().

SVN-Revision: 3208

14 years agoRename archive_string_append_from_wcs_to_mbs function to archive_string_append_from_wcs.
Michihiro NAKAJIMA [Mon, 11 Apr 2011 04:30:34 +0000 (00:30 -0400)] 
Rename archive_string_append_from_wcs_to_mbs function to archive_string_append_from_wcs.

SVN-Revision: 3207

14 years agoRemove first argument of archive_wstring_append_from_mbs/archive_string_append_from_w...
Michihiro NAKAJIMA [Mon, 11 Apr 2011 04:25:41 +0000 (00:25 -0400)] 
Remove first argument of archive_wstring_append_from_mbs/archive_string_append_from_wcs_to_mbs.
It is no longer needed for WCS<==>MBS conversion.

SVN-Revision: 3206

14 years agoCorrectly convert charset names, both "CP_ACP" and "CP_OEMCP", to current ACP and...
Michihiro NAKAJIMA [Mon, 11 Apr 2011 04:03:09 +0000 (00:03 -0400)] 
Correctly convert charset names, both "CP_ACP" and "CP_OEMCP", to current ACP and OEMCP.

SVN-Revision: 3205

14 years agoReduce a string buffer copy in the wctomb/wcrtomb version of
Michihiro NAKAJIMA [Mon, 11 Apr 2011 03:38:46 +0000 (23:38 -0400)] 
Reduce a string buffer copy in the wctomb/wcrtomb version of
archive_string_append_from_wcs_to_mbs().

SVN-Revision: 3204

14 years agoUse wcsnrtombs() at archive_string_append_from_wcs_to_mbs() if available.
Michihiro NAKAJIMA [Sun, 10 Apr 2011 15:57:06 +0000 (11:57 -0400)] 
Use wcsnrtombs() at archive_string_append_from_wcs_to_mbs() if available.
It's faster than use of wcrtomb/wctomb.

SVN-Revision: 3203

14 years agoAdd and update comments in archive_string.c.
Michihiro NAKAJIMA [Sun, 10 Apr 2011 14:27:46 +0000 (10:27 -0400)] 
Add and update comments in archive_string.c.

SVN-Revision: 3202

14 years agoAdd some CP932 filename tests.
Michihiro NAKAJIMA [Sun, 10 Apr 2011 13:48:22 +0000 (09:48 -0400)] 
Add some CP932 filename tests.

SVN-Revision: 3201

14 years agoAdd a filename encoding test for ustar.
Michihiro NAKAJIMA [Sun, 10 Apr 2011 13:09:30 +0000 (09:09 -0400)] 
Add a filename encoding test for ustar.

SVN-Revision: 3200

14 years agoAdd a test storing a CP1251 filename in zip file on non Windows Platform.
Michihiro NAKAJIMA [Sun, 10 Apr 2011 12:53:43 +0000 (08:53 -0400)] 
Add a test storing a CP1251 filename in zip file on non Windows Platform.

SVN-Revision: 3199

14 years agoAdd a filename encoding test for gnutar.
Michihiro NAKAJIMA [Sun, 10 Apr 2011 12:22:05 +0000 (08:22 -0400)] 
Add a filename encoding test for gnutar.

SVN-Revision: 3198

14 years agoAdd locale CP1251 and CP932 tests to test_pax_filename_encoding.
Michihiro NAKAJIMA [Sun, 10 Apr 2011 11:17:54 +0000 (07:17 -0400)] 
Add locale CP1251 and CP932 tests to test_pax_filename_encoding.

SVN-Revision: 3197

14 years agotorture test archive_read_support_format_XXX as well
Roman Neuhauser [Sun, 10 Apr 2011 09:13:52 +0000 (05:13 -0400)] 
torture test archive_read_support_format_XXX as well

SVN-Revision: 3196

14 years agoplug crashes in archive_read_support_filter_XXX
Roman Neuhauser [Sun, 10 Apr 2011 09:13:35 +0000 (05:13 -0400)] 
plug crashes in archive_read_support_filter_XXX

these functions lacked protection by archive_check_magic.

SVN-Revision: 3195

14 years agoSimplify a check of de_DE.UTF-8 locale in libarchive test suite on Windows.
Michihiro NAKAJIMA [Sun, 10 Apr 2011 07:49:18 +0000 (03:49 -0400)] 
Simplify a check of de_DE.UTF-8 locale in libarchive test suite on Windows.

SVN-Revision: 3194