jartool.c (main): Ensure that only one of ftruncate and _chsize is used.
authorBryce McKinlay <mckinlay@redhat.com>
Mon, 19 Jul 2004 20:41:03 +0000 (20:41 +0000)
committerBryce McKinlay <bryce@gcc.gnu.org>
Mon, 19 Jul 2004 20:41:03 +0000 (21:41 +0100)
2004-07-19  Bryce McKinlay  <mckinlay@redhat.com>

* jartool.c (main): Ensure that only one of ftruncate and _chsize
is used.

From-SVN: r84931

fastjar/ChangeLog
fastjar/jartool.c

index 2b54f3bde3cadaab3efb36b25b61d20b5429414c..d3ee407ac1b1e2b215ce115a34e7e11dfcf4e541 100644 (file)
@@ -1,3 +1,8 @@
+2004-07-19  Bryce McKinlay  <mckinlay@redhat.com>
+
+       * jartool.c (main): Ensure that only one of ftruncate and _chsize
+       is used.
+
 2004-07-11  Bryce McKinlay  <mckinlay@redhat.com>
 
        PR 16472
index d57794dea928c79c6a07ece72284526170483b8b..f43af14a62da19e5b9667d13cfe1e6e3bb93b69a 100644 (file)
@@ -580,8 +580,7 @@ int main(int argc, char **argv){
     if (action == ACTION_UPDATE)
 #if HAVE_FTRUNCATE
       ftruncate (jarfd, lseek (jarfd, 0, SEEK_CUR));
-#endif
-#if HAVE__CHSIZE
+#else
       _chsize (jarfd, lseek (jarfd, 0, SEEK_CUR));
 #endif