bug-cpio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-cpio] cpio


From: Peter Vrabec
Subject: [Bug-cpio] cpio
Date: Mon, 08 Nov 2004 16:54:12 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510

Hello,

I have enhanced the latest release of cpio-2.5.90 to support files larger than 2GB. The attached patch could be applied smoothly to the
version of cpio.

Furthermore I updated it to be compilable with the gcc >= 3.4.x (the patches for this are also attached)



--- cpio-2.5.90/src/makepath.c.error    2004-09-06 12:14:29.000000000 +0000
+++ cpio-2.5.90/src/makepath.c  2004-11-08 15:37:22.637175640 +0000
@@ -64,7 +64,7 @@
 #include <strings.h>
 #endif
 
-void error ();
+#include <error.h>
 
 /* Ensure that the directory ARGPATH exists.
    Remove any trailing slashes from ARGPATH before calling this function.
--- cpio-2.5.90/src/extern.h.lfs        2004-09-08 10:49:57.000000000 +0000
+++ cpio-2.5.90/src/extern.h    2004-11-05 15:55:40.631563728 +0000
@@ -165,9 +165,9 @@
 void tape_buffered_read P_((char *in_buf, int in_des, long num_bytes));
 int tape_buffered_peek P_((char *peek_buf, int in_des, int num_bytes));
 void tape_toss_input P_((int in_des, long num_bytes));
-void copy_files_tape_to_disk P_((int in_des, int out_des, long num_bytes));
-void copy_files_disk_to_tape P_((int in_des, int out_des, long num_bytes, char 
*filename));
-void copy_files_disk_to_disk P_((int in_des, int out_des, long num_bytes, char 
*filename));
+void copy_files_tape_to_disk P_((int in_des, int out_des, off_t num_bytes));
+void copy_files_disk_to_tape P_((int in_des, int out_des, off_t num_bytes, 
char *filename));
+void copy_files_disk_to_disk P_((int in_des, int out_des, off_t num_bytes, 
char *filename));
 void warn_if_file_changed P_((char *file_name, unsigned long old_file_size,
                               unsigned long old_file_mtime));
 void create_all_directories P_((char *name));
--- cpio-2.5.90/src/util.c.lfs  2004-09-08 10:44:49.000000000 +0000
+++ cpio-2.5.90/src/util.c      2004-11-05 15:52:41.857741480 +0000
@@ -428,10 +428,10 @@
    NUM_BYTES is the number of bytes to copy.  */
 
 void
-copy_files_tape_to_disk (int in_des, int out_des, long num_bytes)
+copy_files_tape_to_disk (int in_des, int out_des, off_t num_bytes)
 {
-  long size;
-  long k;
+  off_t size;
+  off_t k;
 
   while (num_bytes > 0)
     {
@@ -458,13 +458,13 @@
    NUM_BYTES is the number of bytes to copy.  */
 
 void
-copy_files_disk_to_tape (int in_des, int out_des, long num_bytes,
+copy_files_disk_to_tape (int in_des, int out_des, off_t num_bytes,
                         char *filename)
 {
-  long size;
-  long k;
+  off_t size;
+  off_t k;
   int rc;
-  long original_num_bytes;
+  off_t original_num_bytes;
 
   original_num_bytes = num_bytes;
 
@@ -505,12 +505,12 @@
    NUM_BYTES is the number of bytes to copy.  */
 
 void
-copy_files_disk_to_disk (int in_des, int out_des, long num_bytes,
+copy_files_disk_to_disk (int in_des, int out_des, off_t num_bytes,
                         char *filename)
 {
-  long size;
-  long k;
-  long original_num_bytes;
+  off_t size;
+  off_t k;
+  off_t original_num_bytes;
   int rc;
 
   original_num_bytes = num_bytes;
--- cpio-2.5.90/lib/argp-fs-xinl.c.optimize     2003-07-09 01:25:14.000000000 
+0200
+++ cpio-2.5.90/lib/argp-fs-xinl.c      2004-11-08 16:56:08.494281112 +0100
@@ -23,7 +23,7 @@
 
 #define ARGP_FS_EI
 #undef __OPTIMIZE__
-#define __OPTIMIZE__
+#define __OPTIMIZE__ 1
 #include "argp-fmtstream.h"
 
 #if 0
--- cpio-2.5.90/lib/argp.h.throw        2003-11-29 13:37:46.000000000 +0000
+++ cpio-2.5.90/lib/argp.h      2004-11-08 14:37:13.467852776 +0000
@@ -557,13 +557,19 @@
 # endif
 
 ARGP_EI void
-__argp_usage (__const struct argp_state *__state) __THROW
+__argp_usage (__const struct argp_state *__state) __THROW;
+
+ARGP_EI void
+__argp_usage (__const struct argp_state *__state)
 {
   __argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE);
 }
 
 ARGP_EI int
-__option_is_short (__const struct argp_option *__opt) __THROW
+__option_is_short (__const struct argp_option *__opt) __THROW;
+
+ARGP_EI int
+__option_is_short (__const struct argp_option *__opt)
 {
   if (__opt->flags & OPTION_DOC)
     return 0;
@@ -575,7 +581,10 @@
 }
 
 ARGP_EI int
-__option_is_end (__const struct argp_option *__opt) __THROW
+__option_is_end (__const struct argp_option *__opt) __THROW;
+
+ARGP_EI int
+__option_is_end (__const struct argp_option *__opt)
 {
   return !__opt->key && !__opt->name && !__opt->doc && !__opt->group;
 }

reply via email to

[Prev in Thread] Current Thread [Next in Thread]