Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Dec 2009 02:14:09 +0000 (UTC)
From:      Tim Kientzle <kientzle@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r201084 - head/lib/libarchive
Message-ID:  <200912280214.nBS2E9Zi075285@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kientzle
Date: Mon Dec 28 02:14:09 2009
New Revision: 201084
URL: http://svn.freebsd.org/changeset/base/201084

Log:
  Sync with googlecode some changes that have no impact on FreeBSD.

Modified:
  head/lib/libarchive/archive_read_disk_entry_from_file.c

Modified: head/lib/libarchive/archive_read_disk_entry_from_file.c
==============================================================================
--- head/lib/libarchive/archive_read_disk_entry_from_file.c	Mon Dec 28 02:09:57 2009	(r201083)
+++ head/lib/libarchive/archive_read_disk_entry_from_file.c	Mon Dec 28 02:14:09 2009	(r201084)
@@ -103,7 +103,7 @@ archive_read_disk_entry_from_file(struct
 	 * open file descriptor which we can use in the subsequent lookups. */
 	if ((S_ISREG(st->st_mode) || S_ISDIR(st->st_mode))) {
 		if (fd < 0)
-			fd = open(pathname, O_RDONLY | O_NONBLOCK);
+			fd = open(pathname, O_RDONLY | O_NONBLOCK | O_BINARY);
 		if (fd >= 0) {
 			unsigned long stflags;
 			int r = ioctl(fd, EXT2_IOC_GETFLAGS, &stflags);
@@ -114,6 +114,11 @@ archive_read_disk_entry_from_file(struct
 #endif
 
 	if (st == NULL) {
+		/* TODO: On Windows, use GetFileInfoByHandle() here.
+		 * Using Windows stat() call is badly broken, but
+		 * even the stat() wrapper has problems because
+		 * 'struct stat' is broken on Windows.
+		 */
 #if HAVE_FSTAT
 		if (fd >= 0) {
 			if (fstat(fd, &s) != 0)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912280214.nBS2E9Zi075285>