summaryrefslogtreecommitdiff
path: root/libarchive/archive_read_open_memory.c
diff options
context:
space:
mode:
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>2010-02-23 13:10:33 -0500
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>2010-02-23 13:10:33 -0500
commitf64286f4d8622af87da35f2f972c13d640dd68cf (patch)
treeda36b77f2849513fa1a921f2296e85bd2d33931e /libarchive/archive_read_open_memory.c
parent81b8193dacf21a071e8fdc919c3444f10ca7c490 (diff)
downloadlibarchive-f64286f4d8622af87da35f2f972c13d640dd68cf.tar.gz
Avoid failing some libarchive_test on Windows and some platforms,
whose the size of off_t is four bytes. SVN-Revision: 1966
Diffstat (limited to 'libarchive/archive_read_open_memory.c')
-rw-r--r--libarchive/archive_read_open_memory.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libarchive/archive_read_open_memory.c b/libarchive/archive_read_open_memory.c
index b52d9be5..559781fe 100644
--- a/libarchive/archive_read_open_memory.c
+++ b/libarchive/archive_read_open_memory.c
@@ -48,7 +48,11 @@ struct read_memory_data {
static int memory_read_close(struct archive *, void *);
static int memory_read_open(struct archive *, void *);
+#if ARCHIVE_VERSION_NUMBER < 3000000
static off_t memory_read_skip(struct archive *, void *, off_t request);
+#else
+static int64_t memory_read_skip(struct archive *, void *, int64_t request);
+#endif
static ssize_t memory_read(struct archive *, void *, const void **buff);
int
@@ -119,8 +123,13 @@ memory_read(struct archive *a, void *client_data, const void **buff)
* necessary in order to better exercise internal code when used
* as a test harness.
*/
+#if ARCHIVE_VERSION_NUMBER < 3000000
static off_t
memory_read_skip(struct archive *a, void *client_data, off_t skip)
+#else
+static int64_t
+memory_read_skip(struct archive *a, void *client_data, int64_t skip)
+#endif
{
struct read_memory_data *mine = (struct read_memory_data *)client_data;