!2 upgrade version to 4.2.4.6

From: @tong_1001
Reviewed-by: @overweight
Signed-off-by: @overweight
This commit is contained in:
openeuler-ci-bot 2021-02-03 09:13:12 +08:00 committed by Gitee
commit a30c6a4847
9 changed files with 55 additions and 72 deletions

View File

@ -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

View File

@ -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

View File

@ -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 <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
+#include <string.h>
#ifdef DIRENT
# include <dirent.h>
@@ -214,7 +215,7 @@
#if !defined(DOS) && !defined(WINDOWS)
# include <unistd.h>
@@ -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);
}

View File

@ -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 <unistd.h>
@@ -140,6 +140,7 @@
# define MINGW
#endif
+#include <unistd.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -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 */

View File

@ -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

View File

@ -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;

Binary file not shown.

BIN
ncompress-4.2.4.6.tar.gz Normal file

Binary file not shown.

View File

@ -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<shixuantong@huawei.com> - 4.2.4.6-1
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:upgrade version to 4.2.4.6
* Sat Sep 21 2019 shenyangyang<shenyangyang4@huawei.com> - 4.2.4.4-18
- Type:enhancement
- ID:NA