]> git.pld-linux.org Git - packages/cpio.git/commitdiff
- rel 2 auto/th/cpio-2_11-2
authorJan Rękorajski <baggins@pld-linux.org>
Mon, 21 May 2012 10:35:59 +0000 (10:35 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- fix 7 years old bug, http://www.mail-archive.com/bug-cpio@gnu.org/msg00068.html

Changed files:
    cpio-crc-is-32-bit.patch -> 1.1
    cpio.spec -> 1.81

cpio-crc-is-32-bit.patch [new file with mode: 0644]
cpio.spec

diff --git a/cpio-crc-is-32-bit.patch b/cpio-crc-is-32-bit.patch
new file mode 100644 (file)
index 0000000..7b6213c
--- /dev/null
@@ -0,0 +1,64 @@
+> The header stores only 4 bytes for crc, so it is quite reasonable.
+
+Then I would suggest something like this, though it could be made more
+efficient.
+
+--- orig/configure.ac
++++ mod/configure.ac
+@@ -51,6 +51,9 @@
+ AC_CHECK_TYPE(gid_t, int)
+ AC_HEADER_STDC
+ AC_HEADER_DIRENT
++AC_CHECK_TYPES(uint32_t)
++AC_CHECK_SIZEOF(unsigned long)
++AC_CHECK_SIZEOF(unsigned int)
+ AC_CHECK_FUNCS([fchmod fchown])
+ # This is needed for mingw build
+--- orig/src/extern.h
++++ mod/src/extern.h
+@@ -66,7 +66,17 @@
+ extern int archive_des;
+ extern char *archive_name;
+ extern char *rsh_command_option;
++#ifdef HAVE_UINT32_T
++extern uint32_t crc;
++#else
++# if SIZEOF_UNSIGNED_LONG == 4
+ extern unsigned long crc;
++# elif SIZEOF_UNSIGNED_INT == 4
++extern unsigned int crc;
++# else
++# error Wrong size for crc
++# endif
++#endif
+ extern int delayed_seek_count;
+ #ifdef DEBUG_CPIO
+ extern int debug_flag;
+
+
+--- orig/src/global.c
++++ mod/src/global.c
+@@ -139,7 +139,17 @@
+ char *rsh_command_option = NULL;
+ /* CRC checksum.  */
++#ifdef HAVE_UINT32_T
++uint32_t crc;
++#else
++# if SIZEOF_UNSIGNED_LONG == 4
+ unsigned long crc;
++# elif SIZEOF_UNSIGNED_INT == 4
++unsigned int crc;
++# else
++# error Wrong size for crc
++# endif
++#endif
+ /* Input and output buffers.  */
+ char *input_buffer, *output_buffer;
+
+
+
+
+
index efcf8caa6fd57b9da640b0f3b2b649a95b016546..4a71c5a81ca4b4888d5ffc6ff10e525967971c70 100644 (file)
--- a/cpio.spec
+++ b/cpio.spec
@@ -9,7 +9,7 @@ Summary(tr.UTF-8):      GNU cpio arşivleme programı
 Summary(uk.UTF-8):     Архівна програма GNU
 Name:          cpio
 Version:       2.11
-Release:       1
+Release:       2
 License:       GPL v3+
 Group:         Applications/Archiving
 Source0:       http://ftp.gnu.org/gnu/cpio/%{name}-%{version}.tar.bz2
@@ -18,6 +18,7 @@ Source1:      http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-ma
 # Source1-md5: 027552f4053477462a09fadc162a5e65
 Patch0:                %{name}-info.patch
 Patch1:                %{name}-ifdef.patch
+Patch2:                %{name}-crc-is-32-bit.patch
 URL:           http://www.gnu.org/software/cpio/
 BuildRequires: autoconf >= 2.63
 BuildRequires: automake >= 1:1.11.1
@@ -104,6 +105,7 @@ cpio копіює файли в або з архіву cpio або tar, який
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
 %{__gettextize}
This page took 0.050061 seconds and 4 git commands to generate.