diff --git a/ncompress-4.2.4.4-2GB.patch b/ncompress-4.2.4.4-2GB.patch index cf1ac52ed5060552a68b444e08c226c88f8c9f30..58e77ce7932ef5157264e9201c76dc83cbc3a40d 100644 --- a/ncompress-4.2.4.4-2GB.patch +++ b/ncompress-4.2.4.4-2GB.patch @@ -1,8 +1,8 @@ diff --git a/compress42.c b/compress42.c -index 4d33342..495bdf3 100644 +index 5d5f049..2807058 100644 --- a/compress42.c +++ b/compress42.c -@@ -1373,7 +1373,7 @@ compress(fdin, fdout) +@@ -1355,7 +1355,7 @@ compress(fdin, fdout) REG11 int boff; REG12 int n_bits; REG13 int ratio; @@ -11,3 +11,6 @@ index 4d33342..495bdf3 100644 REG15 code_int extcode; union { +-- +1.8.3.1 + diff --git a/ncompress-4.2.4.4-endians.patch b/ncompress-4.2.4.4-endians.patch index fdc9662201063ae5ac8ddc717198ec4826b4f19d..58e9b4e4e09d47211ca482d9173a615d426d01b0 100644 --- a/ncompress-4.2.4.4-endians.patch +++ b/ncompress-4.2.4.4-endians.patch @@ -1,6 +1,8 @@ ---- ncompress-4.2.4/compress42.c.endians 2006-09-19 13:53:58.000000000 +0200 -+++ ncompress-4.2.4/compress42.c 2006-09-19 13:57:54.000000000 +0200 -@@ -432,7 +432,7 @@ +diff --git a/compress42.c b/compress42.c +index 2807058..1d9e375 100644 +--- a/compress42.c ++++ b/compress42.c +@@ -468,7 +468,7 @@ typedef unsigned char char_type; union bytes { @@ -9,3 +11,6 @@ struct { #if BYTEORDER == 4321 +-- +1.8.3.1 + diff --git a/ncompress-4.2.4.4-filenamelen.patch b/ncompress-4.2.4.4-filenamelen.patch index 49b78413c9d976264e7b636b5922fd33f6eb5f64..d026ca58612a1a700364112f6260f588446531f2 100644 --- a/ncompress-4.2.4.4-filenamelen.patch +++ b/ncompress-4.2.4.4-filenamelen.patch @@ -1,33 +1,33 @@ diff --git a/compress42.c b/compress42.c -index b3b3add..6878046 100644 +index bec7a2f..ff437e5 100644 --- a/compress42.c +++ b/compress42.c -@@ -141,6 +141,7 @@ +@@ -151,6 +151,7 @@ #include #include #include +#include - #ifdef DIRENT - # include -@@ -214,7 +215,7 @@ + #if !defined(DOS) && !defined(WINDOWS) + # include +@@ -229,6 +230,8 @@ static inline access(const char *pathname, int mode) # define OBUFSIZ BUFSIZ /* Default output buffer size */ #endif --#define MAXPATHLEN 1024 /* MAXPATHLEN - maximum length of a pathname we allow */ -+#define MAXPATHLEN PATH_MAX /* MAXPATHLEN - maximum length of a pathname we allow */ - #define SIZE_INNER_LOOP 256 /* Size of the inter (fast) compress loop */ - ++#define MAXPATHLEN PATH_MAX /* MAXPATHLEN - maximum length of a pathname we allow */ ++ /* Defines for third byte of header */ -@@ -701,6 +702,7 @@ main(argc, argv) - { + #define MAGIC_1 (char_type)'\037'/* First byte of compressed file */ + #define MAGIC_2 (char_type)'\235'/* Second byte of compressed file */ +@@ -713,6 +716,7 @@ main(argc, argv) REG3 char **filelist; REG4 char **fileptr; -+ int i; + int seen_double_dash = 0; ++ int i = 0; - if (fgnd_flag = (signal(SIGINT, SIG_IGN) != SIG_IGN)) - signal(SIGINT, (SIG_TYPE)abort_compress); -@@ -714,13 +716,18 @@ main(argc, argv) + #ifdef SIGINT + if ((fgnd_flag = (signal(SIGINT, SIG_IGN)) != SIG_IGN)) +@@ -730,13 +734,18 @@ main(argc, argv) nomagic = 1; /* Original didn't have a magic number */ #endif @@ -48,7 +48,7 @@ index b3b3add..6878046 100644 *filelist = NULL; if((progname = strrchr(argv[0], '/')) != 0) -@@ -860,7 +867,9 @@ nextarg: continue; +@@ -886,7 +895,9 @@ nextarg: continue; decompress(0, 1); } diff --git a/ncompress-4.2.4.4-lfs.patch b/ncompress-4.2.4.4-lfs.patch index 2559799968f0be89c7b41b5d30f1dc4d48d90f0f..613aa872bad4bab5f70ea0bef940cdf35ba6a8e1 100644 --- a/ncompress-4.2.4.4-lfs.patch +++ b/ncompress-4.2.4.4-lfs.patch @@ -1,17 +1,17 @@ diff --git a/compress42.c b/compress42.c -index 804d099..b3b3add 100644 +index 5d5f049..bec7a2f 100644 --- a/compress42.c +++ b/compress42.c -@@ -130,6 +130,7 @@ - * Add variable bit length output. - * - */ -+#include +@@ -140,6 +140,7 @@ + # define MINGW + #endif + ++#include + #include #include #include - #include -@@ -538,8 +539,8 @@ int remove_ofname = 0; /* Remove output file on a error */ - char ofname[MAXPATHLEN]; /* Output filename */ +@@ -549,8 +550,8 @@ int remove_ofname = 0; /* Remove output file on a error */ + char *ofname = NULL; /* Output filename */ int fgnd_flag = 0; /* Running in background (SIGINT=SIGIGN) */ -long bytes_in; /* Total number of byte from input */ diff --git a/ncompress-4.2.4.4-make.patch b/ncompress-4.2.4.4-make.patch index 3d1878fef2f2726a04253f29f62ee532d4e9596f..16981374bd4a2469a736fcd6bd085a2424610514 100644 --- a/ncompress-4.2.4.4-make.patch +++ b/ncompress-4.2.4.4-make.patch @@ -1,10 +1,10 @@ diff --git a/Makefile.def b/Makefile.def -index e493d7c..1e6612f 100644 +index 0d0e6ba..5763398 100644 --- a/Makefile.def +++ b/Makefile.def -@@ -31,7 +31,14 @@ MANDIR=/usr/local/man/man1 - # -DDEF_ERRNO=1 Define error (not defined in errno.h). - # -DMAXSEG_64K=1 -BITS=16 Support segment processsor like 80286. +@@ -32,7 +32,14 @@ MANDIR=$(PREFIX)/share/man/man1 + # -DDEF_ERRNO=1 Define errno (not defined in errno.h). + # -DMAXSEG_64K=1 -BITS=16 Support segment processor like 80286. # -options= $(CFLAGS) $(CPPFLAGS) -DDIRENT=1 -DUSERMEM=800000 -DREGISTERS=3 +options= $(CFLAGS) $(CPPFLAGS) -DDIRENT=1 -DUSERMEM=800000 -DREGISTERS=20 \ @@ -16,5 +16,8 @@ index e493d7c..1e6612f 100644 + -DSYSDIR=1 \ + $(ARCH_FLAGS) - # libary options + # library options LBOPT= $(LDFLAGS) +-- +1.8.3.1 + diff --git a/ncompress-4.2.4.4-silence-gcc.patch b/ncompress-4.2.4.4-silence-gcc.patch deleted file mode 100644 index 738ce801ecad0fe2039956fb85472936cdadf263..0000000000000000000000000000000000000000 --- a/ncompress-4.2.4.4-silence-gcc.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff --git a/compress42.c b/compress42.c -index c3f6b35..834c2f2 100644 ---- a/compress42.c -+++ b/compress42.c -@@ -704,7 +704,7 @@ main(argc, argv) - REG4 char **fileptr; - int i; - -- if (fgnd_flag = (signal(SIGINT, SIG_IGN) != SIG_IGN)) -+ if ((fgnd_flag = (signal(SIGINT, SIG_IGN)) != SIG_IGN)) - signal(SIGINT, (SIG_TYPE)abort_compress); - - signal(SIGTERM, (SIG_TYPE)abort_compress); -@@ -1016,8 +1016,8 @@ comprexx(fileptr) - - if (infstat.st_nlink > 1 && (!force)) - { -- fprintf(stderr, "%s has %d other links: unchanged\n", -- tempname, infstat.st_nlink - 1); -+ fprintf(stderr, "%s has %ld other links: unchanged\n", -+ tempname, (long)(infstat.st_nlink - 1)); - exit_code = 1; - return; - } -@@ -1318,7 +1318,7 @@ compdir(dir) - ** think it's worth it. -- Dave Mack - */ - -- while (dp = readdir(dirp)) -+ while ((dp = readdir(dirp))) - { - if (dp->d_ino == 0) - continue; diff --git a/ncompress-4.2.4.4.tar.gz b/ncompress-4.2.4.4.tar.gz deleted file mode 100644 index 4da095411e31d04116e1ff31111647d1bbb0f22a..0000000000000000000000000000000000000000 Binary files a/ncompress-4.2.4.4.tar.gz and /dev/null differ diff --git a/ncompress-4.2.4.6.tar.gz b/ncompress-4.2.4.6.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..eb83fde32984ed78578d0f238bd18e8f60b05a91 Binary files /dev/null and b/ncompress-4.2.4.6.tar.gz differ diff --git a/ncompress.spec b/ncompress.spec index bf9cc45d3b4967088c36223437067b6ced7518f7..7d3bd290ea1d61480d40892853ab2551499dd77b 100644 --- a/ncompress.spec +++ b/ncompress.spec @@ -1,6 +1,6 @@ Name: ncompress -Version: 4.2.4.4 -Release: 18 +Version: 4.2.4.6 +Release: 1 Summary: A fast, simple LZW file compressor License: Public Domain URL: http://ncompress.sourceforge.net/ @@ -12,7 +12,6 @@ Patch2: %{name}-4.2.4.4-filenamelen.patch Patch3: %{name}-4.2.4.4-2GB.patch Patch4: %{name}-4.2.4.4-endians.patch Patch5: %{name}-4.2.4.4-memmove.patch -Patch6: %{name}-4.2.4.4-silence-gcc.patch Patch6000: ncompress-compression-with-9-bits-don-t-work.patch @@ -45,10 +44,16 @@ ln -sf compress.1 %{buildroot}%{_mandir}/man1/uncompress.1 %files help %defattr(-,root,root) -%doc README Changes +%doc Changes %{_mandir}/man1/*.gz %changelog +* Tue Feb 02 2021 shixuantong - 4.2.4.6-1 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC:upgrade version to 4.2.4.6 + * Sat Sep 21 2019 shenyangyang - 4.2.4.4-18 - Type:enhancement - ID:NA