From c0156726370d112b96e755032fe581c672626a97 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Sat, 6 Feb 2010 13:25:35 -0700 Subject: [PATCH] Don't inhibit large file support. tar should always use fseeko, not fseek, to avoid arbitrary limits on 32-bit platforms. Noticed from a gnulib compilation warning. * src/incremen.c (write_directory_file): Use fseeko. * scripts/xsparse.c (read_map): Likewise. Signed-off-by: Eric Blake --- scripts/xsparse.c | 6 +++--- src/incremen.c | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/xsparse.c b/scripts/xsparse.c index c77c3f5c..cf621add 100644 --- a/scripts/xsparse.c +++ b/scripts/xsparse.c @@ -1,7 +1,7 @@ /* xsparse - expands compressed sparse file images extracted from GNU tar archives. - Copyright (C) 2006, 2007 Free Software Foundation, Inc. + Copyright (C) 2006, 2007, 2010 Free Software Foundation, Inc. Written by Sergey Poznyakoff @@ -279,8 +279,8 @@ read_map (FILE *ifp) sparse_map[i].numbytes = string_to_size (nbuf, NULL); } - fseek (ifp, ((ftell (ifp) + BLOCKSIZE - 1) / BLOCKSIZE) * BLOCKSIZE, - SEEK_SET); + fseeko (ifp, ((ftell (ifp) + BLOCKSIZE - 1) / BLOCKSIZE) * BLOCKSIZE, + SEEK_SET); } void diff --git a/src/incremen.c b/src/incremen.c index 7cad838a..33ca9340 100644 --- a/src/incremen.c +++ b/src/incremen.c @@ -1,7 +1,8 @@ /* GNU dump extensions to tar. Copyright (C) 1988, 1992, 1993, 1994, 1996, 1997, 1999, 2000, 2001, - 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. + 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software + Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the @@ -1410,7 +1411,7 @@ write_directory_file (void) if (! fp) return; - if (fseek (fp, 0L, SEEK_SET) != 0) + if (fseeko (fp, 0L, SEEK_SET) != 0) seek_error (listed_incremental_option); if (sys_truncate (fileno (fp)) != 0) truncate_error (listed_incremental_option); -- 2.11.4.GIT